query
stringlengths 7
33.1k
| document
stringlengths 7
335k
| metadata
dict | negatives
listlengths 3
101
| negative_scores
listlengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Method to set end time.
|
public void setEndTime(long endTime) {
this.endTime = endTime;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setEnd_time(long end_time) {\n this.end_time = end_time;\n }",
"public void setEndtime(Date endtime) {\n this.endtime = endtime;\n }",
"public void setTimeEnd(int timeEnd) {\r\n this.timeEnd = timeEnd;\r\n }",
"void setEndPosition(net.opengis.gml.x32.TimePositionType endPosition);",
"void setEnd(net.opengis.gml.x32.TimeInstantPropertyType end);",
"void setEndTime(Time endTime) {\n this.endTime = endTime;\n }",
"@Override\n\tpublic void setEndTime(float t) \n\t{\n\t\t_tend = t;\n\t}",
"public abstract void setEndTime(Date endTime);",
"void setEndTime(java.util.Calendar endTime);",
"public void setTimeEnd(long te)\n {\n this.timeEnd = (te > 0L)? te : -1L;\n }",
"public void setEndTime(String time){endTime = time;}",
"public void setEndTime(String EndTime) {\n this.EndTime = EndTime;\n }",
"public void setEndTime(long value) {\r\n this.endTime = value;\r\n }",
"void setEnd(Instant instant);",
"public void setEndTime(Date endTime) {\r\n this.endTime = endTime;\r\n }",
"public void setEndTime(java.lang.Long value) {\n this.end_time = value;\n }",
"public void setEndTime( Date endTime ) {\n this.endTime = endTime;\n }",
"public void setEndTime(long endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(Date endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(Date endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(Date endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(Date endTime) {\n this.endTime = endTime;\n }",
"public void setTime_end(java.lang.String time_end) {\r\n this.time_end = time_end;\r\n }",
"public void setEndTime(Integer endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(ENDTIME_PROP.get(), value);\n }",
"public void setEndTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(ENDTIME_PROP.get(), value);\n }",
"public void setEndTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(ENDTIME_PROP.get(), value);\n }",
"public void setEndTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(ENDTIME_PROP.get(), value);\n }",
"public void setEndtime(String endtime) {\n this.endtime = endtime == null ? null : endtime.trim();\n }",
"public com.twc.bigdata.views.avro.viewing_info.Builder setEndTime(java.lang.Long value) {\n validate(fields()[1], value);\n this.end_time = value;\n fieldSetFlags()[1] = true;\n return this; \n }",
"public void setEndTime(Date endTime) {\n\t\tthis.endTime = endTime;\n\t}",
"public void setEndTime(String endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(String endTime) {\n this.endTime = endTime;\n }",
"public void setEnd(final String end) {\n\tthis.end = LocalTime.parse(end, DateTimeFormatter.ofPattern(\"hh:mma\", Locale.US));\n }",
"public void setEndTime(java.util.Date endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(java.util.Date endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(java.util.Date endTime) {\n this.endTime = endTime;\n }",
"public M csmiUpdateTimeEnd(Object end){this.put(\"csmiUpdateTimeEnd\", end);return this;}",
"public M csseUpdateTimeEnd(Object end){this.put(\"csseUpdateTimeEnd\", end);return this;}",
"public M csmiAddTimeEnd(Object end){this.put(\"csmiAddTimeEnd\", end);return this;}",
"public void setEndTime(String endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(String endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(String endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(Calendar endTime) {\r\n\t\tthis.endTime = endTime;\r\n\t}",
"public long getEnd_time() {\n return end_time;\n }",
"void xsetEndTime(org.apache.xmlbeans.XmlDateTime endTime);",
"public Date getEndtime() {\n return endtime;\n }",
"public void setREQ_END_TIME(java.sql.Time value)\n {\n if ((__REQ_END_TIME == null) != (value == null) || (value != null && ! value.equals(__REQ_END_TIME)))\n {\n _isDirty = true;\n }\n __REQ_END_TIME = value;\n }",
"@Override\n\t\tpublic void setEndMillis(long millis) {\n\t\t\t\n\t\t}",
"public void setjEndtime(Date jEndtime) {\n this.jEndtime = jEndtime;\n }",
"public M csseAddTimeEnd(Object end){this.put(\"csseAddTimeEnd\", end);return this;}",
"public Builder setVisitEndtime(long value) {\n bitField0_ |= 0x00000080;\n visitEndtime_ = value;\n onChanged();\n return this;\n }",
"public Builder setVisitEndtime(long value) {\n bitField0_ |= 0x00000080;\n visitEndtime_ = value;\n onChanged();\n return this;\n }",
"public void setEndTime(String endTime) {\n\t\tthis.endTime = endTime;\n\t}",
"@Override\n public Date getEndTime() {\n return endTime;\n }",
"public String getEndtime() {\n return endtime;\n }",
"public void setEndTime(String endTime) {\r\n if (StringUtil.isNotNUll(endTime)) {\r\n this.endTime = DateUtils.getSpecifiedDayAfter(TimeUtils.FORMAT_DATE, endTime);\r\n } else {\r\n this.endTime = null;\r\n }\r\n }",
"void setEndTick(int endTick);",
"public final void setActualEndTime(java.util.Date actualendtime)\r\n\t{\r\n\t\tsetActualEndTime(getContext(), actualendtime);\r\n\t}",
"public int getTimeEnd() {\r\n return timeEnd;\r\n }",
"public M csolAddTimeEnd(Object end){this.put(\"csolAddTimeEnd\", end);return this;}",
"public Date getEndTime() {\n return endTime;\n }",
"public Date getEndTime() {\n return endTime;\n }",
"public Date getEndTime() {\n return endTime;\n }",
"@Override\n\tpublic float getEndTime() \n\t{\n\t\treturn _tend;\n\t}",
"public java.lang.Long getEndTime() {\n return end_time;\n }",
"public Date getEndTime() {\r\n return this.endTime;\r\n }",
"public java.lang.Long getEndTime() {\n return end_time;\n }",
"public long getEndTime() {\r\n return endTime;\r\n }",
"public void setEndTime(String endTime) {\n this.endTime = endTime == null ? null : endTime.trim();\n }",
"public long getTimeEnd()\n {\n return this.timeEnd;\n }",
"protected void setEndTimestamp(long timestamp) {\n\t\tthis.endTimestamp = timestamp;\n\t\tsetDirty(true);\n\t}",
"public Date getEndTime() {\n return this.endTime;\n }",
"public void setEndDateTime(java.util.Date endDateTime) {\n this.endDateTime = endDateTime;\n }",
"public long getEndTime() {\n return endTime;\n }",
"public long getEndTime() {\n return endTime;\n }",
"public void setEndTimeDate(Date endTimeDate) {\n this.endTimeDate = endTimeDate;\n }",
"default void onCustomEndTimeChanged(LocalTime endTime) {}",
"public void setEndTimeString(String endTimeString) {\n this.endTimeString = endTimeString;\n }",
"public Date getEndTime() {\n\t\treturn endTime;\n\t}",
"private void updateEndTime() {\n Date date = endTimeCalendar.getTime();\n String endTime = new SimpleDateFormat(\"HH:mm\").format(date);\n endHourText.setText(endTime);\n }",
"public long getEndTime() {\n\t\treturn endTime;\n\t}",
"public void setAudioVideoEndTime(Date value) {\n setAttributeInternal(AUDIOVIDEOENDTIME, value);\n }",
"public java.lang.String getTime_end() {\r\n return time_end;\r\n }",
"public void setTenderEndTime(Date tenderEndTime) {\n this.tenderEndTime = tenderEndTime;\n }",
"public void setFinishTime() {\r\n\t\t\tthis.finishTime = RNG.MAXINT;\r\n\t\t}",
"public void setSecondsEnd(double secondsEnd) {\n this.secondsEnd = secondsEnd;\n }",
"public void setTime(int time)\n {\n this.time = time;\n start = time;\n end = time;\n }",
"public LocalTime getEnd() {\n\treturn end;\n }",
"public void setEndDateTime(String s) {\n this.setEndDateTime(AppUtility.getUTCTimestamp(s));\n }",
"void setStaEnd(double staEnd);",
"net.opengis.gml.x32.TimeInstantPropertyType getEnd();",
"public double getEndTime() {\n return endTime;\n }",
"void changeEnd(int newEnd) {\n if (newEnd < 0 || newEnd <= startBeat) {\n throw new IllegalArgumentException(\"Invalid endBeat\");\n }\n this.endBeat = newEnd;\n }",
"@Test\r\n public void testSetEndTime() {\r\n System.out.println(\"setEndTime\");\r\n String endTime = \"\";\r\n \r\n instance.setEndTime(endTime);\r\n assertEquals(endTime, instance.getEndTime());\r\n \r\n }",
"public void setTimeRange(long timeStart, long timeEnd)\n {\n this.timeStart = timeStart;\n this.timeEnd = timeEnd;\n }",
"public void setEnd( GeoPoint end ){\n this.end = end;\n\n }",
"@Override\n public void setVideoEndTime(String videoId, long endTime) {\n\t\tJSONObject allVids;\n\t\ttry {\n\t\t\tallVids = super.getJSONObject(VIDEO_LIST);\n\t\t\tJSONObject vidTimes = allVids.getJSONObject(videoId);\n\t\t\tvidTimes.put(END_TIME, endTime);\n\t\t} catch (JSONException e) {\n\t\t\t//All fields are required so this should not happen\n\t\t}\n\t}",
"long getEndTime() {\n return endTime;\n }",
"public String getEndTime() {\r\n return endTime;\r\n }"
] |
[
"0.83972114",
"0.82601315",
"0.8233867",
"0.8171966",
"0.81081665",
"0.8066703",
"0.80105454",
"0.7941301",
"0.78403836",
"0.78010535",
"0.77957773",
"0.7780262",
"0.7746328",
"0.77029455",
"0.76190645",
"0.76155365",
"0.7610344",
"0.7609722",
"0.755666",
"0.755666",
"0.755666",
"0.755666",
"0.7547702",
"0.7544252",
"0.7517696",
"0.7517696",
"0.7470777",
"0.7470777",
"0.7463807",
"0.7438351",
"0.73373705",
"0.7323557",
"0.7323557",
"0.73116493",
"0.73053384",
"0.73053384",
"0.73053384",
"0.7302992",
"0.7248634",
"0.7235613",
"0.72247756",
"0.72247756",
"0.72247756",
"0.72122175",
"0.7201947",
"0.7178712",
"0.71625066",
"0.7143504",
"0.7140266",
"0.7131795",
"0.7115725",
"0.7087376",
"0.7087376",
"0.706225",
"0.7051803",
"0.7006906",
"0.69788736",
"0.69658726",
"0.6949017",
"0.69435084",
"0.6914691",
"0.69051677",
"0.69051677",
"0.69051677",
"0.68988276",
"0.6895117",
"0.68842494",
"0.6875747",
"0.6860598",
"0.68165565",
"0.68117476",
"0.6806326",
"0.6799761",
"0.6785642",
"0.67824614",
"0.67824614",
"0.6777169",
"0.6776094",
"0.67756844",
"0.67712384",
"0.6765472",
"0.67513406",
"0.67438155",
"0.6729514",
"0.67261773",
"0.6718198",
"0.67008823",
"0.6682417",
"0.6682377",
"0.66815734",
"0.6674993",
"0.6653014",
"0.66415566",
"0.6638243",
"0.6635005",
"0.6614255",
"0.660562",
"0.6600903",
"0.6568373",
"0.6567318"
] |
0.7466905
|
28
|
Method to get start time as a Calendar object.
|
public Calendar getStartDate() {
Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(startTime);
return cal;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"java.util.Calendar getStartTime();",
"public Calendar getStartTime() {\r\n\t\treturn startTime;\r\n\t}",
"public Calendar startOfDay() {\r\n\t\t\r\n\t\tCalendar c2 = Calendar.getInstance(baseCalendar.getTimeZone());\r\n\t\tc2.clear();\r\n\t\tc2.set(baseCalendar.get(Calendar.YEAR), \r\n\t\t\t\tbaseCalendar.get(Calendar.MONTH),\r\n\t\t\t\tbaseCalendar.get(Calendar.DATE));\r\n\r\n\t\treturn c2;\t\t\r\n\t}",
"public GregorianCalendar getStart() {\n return _start;\n }",
"public Date getStart() {\n return (Date) _start.clone();\n }",
"Calendar getCalendar();",
"public Calendar calculateStartTime(ConfigProperties cprop){\n\t\tCalendar d = Calendar.getInstance();\n\t\tString sd = cprop.getProperty(\"TIME.startdate\");\n\t\tString st = cprop.getProperty(\"TIME.starttime\");\n\t\t\n\t\t//SD defined\n\t\tif(sd!=null){\n\t\t\td.setTime(df.parse(sd,new ParsePosition(0)));\n\t\t}\n\t\t//SD not defined, use current date\n\t\t\n\t\t//ST defined\n\t\tif(st!=null){\n\t\t\tCalendar t = Calendar.getInstance();\n\t\t\tt.setTime(tf.parse(st,new ParsePosition(0)));\n\t\t\t//take the starttime and add it to the startdate\n\t\t\td.add(Calendar.HOUR_OF_DAY,t.get(Calendar.HOUR_OF_DAY));\n\t\t\td.add(Calendar.MINUTE,t.get(Calendar.MINUTE));\n\t\t\td.add(Calendar.SECOND,t.get(Calendar.SECOND));\n\t\t}\n\t\t//ST not defined use current plus a small delay to avoid misfires\n\t\telse {\n\t\t\td.add(Calendar.SECOND,START_DELAY);\n\t\t}\n\t\treturn d;\n\n\t}",
"public DateTime getStart() {\r\n return new DateTime(getStartMillis(), getChronology());\r\n }",
"public java.lang.Long getStartTime() {\n return start_time;\n }",
"public java.lang.Long getStartTime() {\n return start_time;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(STARTTIME_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(STARTTIME_PROP.get());\n }",
"public java.util.Calendar getStartExecDate()\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(STARTEXECDATE$8, 0);\n if (target == null)\n {\n return null;\n }\n return target.getCalendarValue();\n }\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(STARTTIME_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(STARTTIME_PROP.get());\n }",
"public Date getStartTime() {\n\t\treturn getOriginatingTime();\n\t}",
"Calendar getArrivalDateAndTime();",
"public DateTime getStartDateTime() {\r\n\t\treturn start;\r\n\t}",
"public void setStart( Calendar start );",
"Date getStartDay();",
"public java.util.Date getStartTime() {\n return startTime;\n }",
"public Date getStarttime() {\n return starttime;\n }",
"public Date getStarttime() {\n return starttime;\n }",
"public Date getStart() throws ServiceLocalException {\n\t\treturn (Date) this.getPropertyBag().getObjectFromPropertyDefinition(\n\t\t\t\tAppointmentSchema.Start);\n\t}",
"public java.util.Date getStartTime() {\n return this.startTime;\n }",
"public java.util.Date getStartTime() {\n return this.startTime;\n }",
"public java.util.Date getStartTime() {\n return this.startTime;\n }",
"public Date getStart() {\n return start;\n }",
"public java.util.Calendar getStartDate() {\n return startDate;\n }",
"public java.lang.String getTime_start() {\r\n return time_start;\r\n }",
"public Date getStartTime() {\n\t\treturn startTime;\n\t}",
"public Date getStartTime() {\n\t\treturn startTime;\n\t}",
"public Date getStartTime() {\n\t\treturn startTime;\n\t}",
"public Date getStartTime() {\n\t\treturn startTime;\n\t}",
"public Date getStartTime() {\r\n\t\treturn startTime;\r\n\t}",
"public TimeDateComponents getEventStartDate() {\n return getEventDates().getStartDate();\n }",
"public long getTimeStart()\n {\n return this.timeStart;\n }",
"public Date getStartTime() {\n return this.startTime;\n }",
"long getStartTime();",
"@Override\n public LocalTime getStart() {\n return start;\n }",
"public String getStartTime();",
"public String getStartTime();",
"public Date getStartTime() {\r\n return this.startTime;\r\n }",
"public Date getStartTime() {\n return startTime;\n }",
"public Date getStartTime() {\n return startTime;\n }",
"public Date getStartTime() {\n return startTime;\n }",
"Integer getStartDay();",
"public abstract Date getStartTime();",
"public LocalTime getStartTime () {\n\t\treturn DateUtils.toLocalTime(this.start);\n\t}",
"public long getStartTime();",
"public long getStartTime();",
"public String getTime_start() {\n return time_start;\n }",
"public long getStart_time() {\n return start_time;\n }",
"int getStartTime();",
"int getStartTime();",
"int getStartTime();",
"ScheduleStartType getScheduleStart();",
"public Calendar getCalendar() {\n Calendar c = Calendar.getInstance();\n c.setTime(cal.getTime());\n return c;\n }",
"java.util.Calendar getSearchRecurrenceStart();",
"Instant getStart();",
"public int getTimeStart() {\r\n return timeStart;\r\n }",
"public long getStartTime() {\n return startTime;\n }",
"public long getStartTime() {\n return startTime;\n }",
"public long getStartTime() {\n return startTime;\n }",
"public long getStartTime() {\n return startTime;\n }",
"public static long getStartTime() {\n return startTime;\n }",
"public long getStartTime() {\n\t\treturn startTime;\n\t}",
"org.apache.xmlbeans.XmlDateTime xgetStartTime();",
"@Override\n public Date getBeginTime() {\n return beginTime;\n }",
"public java.util.Date getStartDateTime() {\n return this.startDateTime;\n }",
"public final DtStart getStartDate() {\n return getProperty(Property.DTSTART);\n }",
"public long getStartTime() {\r\n return startTime;\r\n }",
"public String getStartTime() {\n return startTime;\n }",
"public String getStartTime() {\n return startTime;\n }",
"public String getStartTime() {\n return startTime;\n }",
"public String getStartTime() {\n return startTime;\n }",
"public LocalTime getStart() {\n\treturn start;\n }",
"public String getStarttime() {\n return starttime;\n }",
"public String getStartTime()\n {\n return this.startTime;\n }",
"public String getStartTime() {\n return startTime;\n }",
"public long getStartTime ()\r\n {\r\n return startTime;\r\n }",
"@Override\n\tpublic float getStartTime()\n\t{\n\t\treturn _tbeg;\n\t}",
"public Integer getStartTime() {\n return startTime;\n }",
"long getStartTimestamp();",
"XMLGregorianCalendar getMovementStartTime();",
"public float getStartTime()\r\n\t{\r\n\t\tif (starttime != null)\r\n\t\t\treturn starttime.getTimeInMillis();\r\n\t\t\r\n\t\treturn 0;\r\n\t}",
"public LocalDateTime getStartTime() {\n\t\treturn startTime;\n\t}",
"public java.util.Calendar getSynchronizationStartTime() {\r\n return synchronizationStartTime;\r\n }",
"public String getBeginTime() {\r\n return beginTime;\r\n }",
"public String getStartTime() {\n return this.StartTime;\n }",
"public Date getActualStart()\r\n {\r\n return (m_actualStart);\r\n }",
"void setStartTime(java.util.Calendar startTime);",
"public int getStartTime()\n\t{\n\t\treturn startTime;\n\t}",
"public double getStartTime();",
"public String getStartTime() {\n\t\treturn (new Parser(value)).getString();\n\t}",
"WeekdaySpec getStart();",
"public java.util.Calendar getJobStartDate()\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(JOBSTARTDATE$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getCalendarValue();\r\n }\r\n }",
"Calendar getTimeStamp();",
"public double getStartTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STARTTIME$22);\r\n if (target == null)\r\n {\r\n return 0.0;\r\n }\r\n return target.getDoubleValue();\r\n }\r\n }",
"java.lang.String getStartDate();"
] |
[
"0.79637295",
"0.7454102",
"0.7065269",
"0.70075566",
"0.67628175",
"0.6733714",
"0.6714372",
"0.67070884",
"0.66573554",
"0.6643242",
"0.6635216",
"0.6635216",
"0.66306573",
"0.661293",
"0.661293",
"0.6588584",
"0.65357965",
"0.6530472",
"0.64914346",
"0.6474685",
"0.64590657",
"0.64513093",
"0.64513093",
"0.64457315",
"0.6418448",
"0.6418448",
"0.6418448",
"0.6411715",
"0.6407463",
"0.63975847",
"0.6380929",
"0.6380929",
"0.6380929",
"0.6380929",
"0.6377063",
"0.6368736",
"0.6364756",
"0.6344604",
"0.6343955",
"0.6341273",
"0.6340677",
"0.6340677",
"0.63394594",
"0.6323918",
"0.6323918",
"0.6323918",
"0.6314378",
"0.628153",
"0.6270798",
"0.6268498",
"0.6268498",
"0.62634224",
"0.6249702",
"0.6241097",
"0.6241097",
"0.6241097",
"0.62391734",
"0.6220385",
"0.62146145",
"0.6206709",
"0.619693",
"0.61959344",
"0.61959344",
"0.61959344",
"0.61959344",
"0.6189647",
"0.61894023",
"0.6187903",
"0.61817765",
"0.61789674",
"0.6173194",
"0.61726445",
"0.6147635",
"0.6147635",
"0.6147635",
"0.6147635",
"0.6135939",
"0.6112606",
"0.61065406",
"0.6102669",
"0.60773605",
"0.60757333",
"0.60732514",
"0.6072826",
"0.60696197",
"0.60678935",
"0.6056041",
"0.60509074",
"0.6037341",
"0.6035111",
"0.60343647",
"0.60328865",
"0.6026958",
"0.60211354",
"0.6009326",
"0.59945136",
"0.5978581",
"0.5976737",
"0.5958252",
"0.59470505"
] |
0.7761896
|
1
|
Method to get end time as a Calendar object.
|
public Calendar getEndDate() {
Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(startTime);
return cal;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"java.util.Calendar getEndTime();",
"public Calendar getEndTime() {\r\n\t\treturn endTime;\r\n\t}",
"public DateTime getEnd() {\r\n return new DateTime(getEndMillis(), getChronology());\r\n }",
"public java.util.Calendar getEndDate() {\n return endDate;\n }",
"public Calendar calculateEndTime(ConfigProperties cprop){\n\t\tCalendar d = Calendar.getInstance();\n\t\tString ed = cprop.getProperty(\"TIME.enddate\");\n\t\tString et = cprop.getProperty(\"TIME.endtime\");\n\t\t\n\t\t//ED defined\n\t\tif(ed!=null){\n\t\t\td.setTime(df.parse(ed,new ParsePosition(0)));\n\t\t}\n\t\t//ED not defined, set to 1 year ahead\n\t\telse {\n\t\t\td.add(Calendar.YEAR,1);\n\t\t}\n\t\t\n\t\t//ET defined\n\t\tif(et!=null){\n\t\t\tCalendar t = Calendar.getInstance();\n\t\t\tt.setTime(tf.parse(et,new ParsePosition(0)));\n\t\t\t//take the endtime and add it to enddate\n\t\t\td.add(Calendar.HOUR_OF_DAY,t.get(Calendar.HOUR_OF_DAY));\n\t\t\td.add(Calendar.MINUTE,t.get(Calendar.MINUTE));\n\t\t\td.add(Calendar.SECOND,t.get(Calendar.SECOND));\n\t\t}\n\t\t//ET not defined, use current time\n\t\t\n\t\treturn d;\n\t\t\n\t}",
"public Date getEndtime() {\n return endtime;\n }",
"public java.lang.Long getEndTime() {\n return end_time;\n }",
"public java.lang.Long getEndTime() {\n return end_time;\n }",
"Integer getEndDay();",
"public java.util.Date getEndTime() {\n return endTime;\n }",
"Date getEndDay();",
"public java.util.Date getEndDateTime() {\n return this.endDateTime;\n }",
"public Calendar endOfDay() {\r\n\t\t\r\n\t\tCalendar c2 = Calendar.getInstance(baseCalendar.getTimeZone());\r\n\t\tc2.clear();\r\n\t\tc2.set(baseCalendar.get(Calendar.YEAR), \r\n\t\t\t\tbaseCalendar.get(Calendar.MONTH),\r\n\t\t\t\tbaseCalendar.get(Calendar.DATE) + 1);\r\n\r\n\t\treturn c2;\t\t\r\n\t}",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }",
"@Override\n public Date getEndTime() {\n return endTime;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }",
"public java.util.Date getEndTime() {\n return this.endTime;\n }",
"public java.util.Date getEndTime() {\n return this.endTime;\n }",
"public TimeDateComponents getEventEndDate() {\n return getEventDates().getEndDate();\n }",
"void setEndTime(java.util.Calendar endTime);",
"public Date getEndTime() {\n return endTime;\n }",
"public Date getEndTime() {\n return endTime;\n }",
"public Date getEndTime() {\n return endTime;\n }",
"public String endTime(){\r\n\t\tsaleEnded = Calendar.getInstance().getTime();\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-mm-dd HH:mm:ss\");\r\n\t\tString endTime = dateFormat.format(time);\r\n\t\treturn endTime;\r\n\t}",
"public Date getEndTime() {\r\n return this.endTime;\r\n }",
"public Date getEndTime() {\n\t\treturn endTime;\n\t}",
"public long getEnd_time() {\n return end_time;\n }",
"public java.lang.String getTime_end() {\r\n return time_end;\r\n }",
"public Date getEndTime() {\n return this.endTime;\n }",
"public long getEndTime() {\n return endTime;\n }",
"public long getEndTime() {\n return endTime;\n }",
"public long getTimeEnd()\n {\n return this.timeEnd;\n }",
"public Rational getEndTime ()\r\n {\r\n if (isWholeDuration()) {\r\n return null;\r\n }\r\n\r\n Rational chordDur = getDuration();\r\n\r\n if (chordDur == null) {\r\n return null;\r\n } else {\r\n return startTime.plus(chordDur);\r\n }\r\n }",
"public long getEndTime() {\r\n return endTime;\r\n }",
"public Date get_end() {\n\t\treturn this.end;\n\t}",
"public String getEndtime() {\n return endtime;\n }",
"public abstract Date getEndTime();",
"int getEndTime();",
"int getEndTime();",
"int getEndTime();",
"public LocalTime getEnd() {\n\treturn end;\n }",
"public void setEndTime(Calendar endTime) {\r\n\t\tthis.endTime = endTime;\r\n\t}",
"public long getEndTime() {\n\t\treturn endTime;\n\t}",
"public int getTimeEnd() {\r\n return timeEnd;\r\n }",
"Instant getEnd();",
"XMLGregorianCalendar getMovementEndTime();",
"Date getEndDate();",
"Date getEndDate();",
"public OffsetDateTime endTime() {\n return this.endTime;\n }",
"public LocalTime getEndTime () {\n\t\treturn DateUtils.toLocalTime(this.end);\n\t}",
"net.opengis.gml.x32.TimeInstantPropertyType getEnd();",
"public M csolAddTimeEnd(Object end){this.put(\"csolAddTimeEnd\", end);return this;}",
"public String getEndTime() {\r\n return endTime;\r\n }",
"public String getEndTime() {\n return endTime;\n }",
"public String getEndTime() {\n return endTime;\n }",
"public String getEndTime() {\n return endTime;\n }",
"public Date getEnd() throws ServiceLocalException {\n\t\treturn (Date) this.getPropertyBag().getObjectFromPropertyDefinition(\n\t\t\t\tAppointmentSchema.End);\n\t}",
"public String getEndTime() {\n return endTime;\n }",
"public Integer getEndTime() {\n return endTime;\n }",
"public M csseAddTimeEnd(Object end){this.put(\"csseAddTimeEnd\", end);return this;}",
"long getEndTime() {\n return endTime;\n }",
"public TimeZoneDefinition getEndTimeZone() throws ServiceLocalException {\n\t\treturn (TimeZoneDefinition) this.getPropertyBag()\n\t\t\t\t.getObjectFromPropertyDefinition(AppointmentSchema.EndTimeZone);\n\t}",
"long getEndDate();",
"long getEndDate();",
"public double getEndTime() {\n return endTime;\n }",
"public String getEndTime()\n {\n return this.endTime;\n }",
"public long getEndTime() {\n if (endTime < 0) {\n try {\n String datestr = PropertyArray.get(props, END);\n\n if (datestr == null) {\n // this may be more expensive because it can cause a\n // reload from disk\n try {\n datestr = getProperty(END);\n } catch (Fault f) {\n }\n }\n\n if (datestr != null) {\n Date date = parseDate(datestr);\n endTime = date.getTime();\n } else {\n // info not available\n }\n } catch (ParseException e) {\n }\n }\n\n return endTime;\n }",
"@Override\n\tpublic float getEndTime() \n\t{\n\t\treturn _tend;\n\t}",
"@Override\n\tpublic Calendar getFinishDate() {\n\t\treturn Calendar.getInstance();\n\t}",
"public String getEndTime();",
"public String getEndTime();",
"public java.util.Calendar getEndExecDate()\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(ENDEXECDATE$10, 0);\n if (target == null)\n {\n return null;\n }\n return target.getCalendarValue();\n }\n }",
"public M csmiAddTimeEnd(Object end){this.put(\"csmiAddTimeEnd\", end);return this;}",
"public Temporal getEndRecurrence() { return endRecurrence; }",
"public java.lang.String getEndDay() {\r\n return localEndDay;\r\n }",
"public Date getEndTimeDate() {\n return endTimeDate;\n }",
"WeekdaySpec getEnd();",
"public String getEndTimeString() {\n return endTimeString;\n }",
"public LocalDateTime getEndTime() {\n\t\treturn endTime;\n\t}",
"public Date getDtEnd() {\r\n return dtEnd;\r\n }",
"public Calendar getLastAppendedEndDate(ReadOnlyTask task) {\n Calendar cal = new GregorianCalendar();\n cal.setTime(task.getLastAppendedComponent().getEndDate().getDate());\n return cal;\n }",
"public int getEndTime()\n {\n if (isRepeated()) return end;\n else return time;\n }",
"Calendar getCalendar();",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndDate();",
"public String getEndTime() {\n return this.EndTime;\n }",
"public GregorianCalendar getEndTimeFromSelectedTime(Film selected_film){\n\n GregorianCalendar returncalendar = new GregorianCalendar();\n returncalendar.setTimeInMillis(0);\n\n returncalendar.set(Calendar.HOUR_OF_DAY, this.getSelectedTime().get(Calendar.HOUR_OF_DAY));\n returncalendar.set(Calendar.MINUTE, this.getSelectedTime().get(Calendar.MINUTE));\n\n returncalendar.add(Calendar.HOUR_OF_DAY, selected_film.getLength().get(Calendar.HOUR_OF_DAY));\n returncalendar.add(Calendar.MINUTE, selected_film.getLength().get(Calendar.MINUTE));\n\n return returncalendar;\n }",
"public long getEndTimestamp();",
"Calendar getDepartureDateAndTime();",
"String getEndDate();",
"public M csseUpdateTimeEnd(Object end){this.put(\"csseUpdateTimeEnd\", end);return this;}",
"public Date getEND_DATE() {\n return END_DATE;\n }",
"public String getEndAmOrPm() {\n return this.endAmOrPm;\n }",
"net.opengis.gml.x32.TimePositionType getEndPosition();",
"public M csmiUpdateTimeEnd(Object end){this.put(\"csmiUpdateTimeEnd\", end);return this;}",
"public Integer getDurationEndDay() {\n return durationEndDay;\n }",
"@ApiModelProperty(value = \"The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.\")\n public String getEndTime() {\n return endTime;\n }",
"public Date getEndDate();",
"public Date getEndDate();"
] |
[
"0.82363445",
"0.77739406",
"0.7120876",
"0.69648045",
"0.69172204",
"0.68756354",
"0.68733525",
"0.6842866",
"0.68264496",
"0.6821172",
"0.68140125",
"0.6800202",
"0.67929256",
"0.6756476",
"0.6756476",
"0.67343545",
"0.6731496",
"0.6731496",
"0.67238545",
"0.67238545",
"0.6699084",
"0.66807234",
"0.6669636",
"0.6669636",
"0.6669636",
"0.66634953",
"0.66288537",
"0.6627495",
"0.6625876",
"0.66197884",
"0.6614345",
"0.65768945",
"0.65768945",
"0.6571871",
"0.65653145",
"0.6563404",
"0.6556278",
"0.65314466",
"0.6523039",
"0.6517602",
"0.6517602",
"0.6517602",
"0.650736",
"0.65061486",
"0.64985865",
"0.6483332",
"0.6483203",
"0.6482658",
"0.64780915",
"0.64780915",
"0.647344",
"0.6472926",
"0.64706755",
"0.64608383",
"0.6456681",
"0.6455464",
"0.6455464",
"0.6455464",
"0.64509267",
"0.6436389",
"0.6431631",
"0.643136",
"0.63990504",
"0.639133",
"0.63626605",
"0.63626605",
"0.63572574",
"0.63422155",
"0.6341905",
"0.63385546",
"0.6335223",
"0.6334743",
"0.6334743",
"0.6325043",
"0.63111365",
"0.6309199",
"0.63006765",
"0.62806803",
"0.62725526",
"0.62664723",
"0.6259737",
"0.62571055",
"0.62548596",
"0.6228506",
"0.62258667",
"0.62256545",
"0.6196977",
"0.6192019",
"0.6190494",
"0.61647475",
"0.61591417",
"0.61527777",
"0.6144396",
"0.61268604",
"0.6112958",
"0.6102623",
"0.60937697",
"0.6070809",
"0.6066817",
"0.6066817"
] |
0.80280495
|
1
|
TODO Autogenerated method stub
|
public static void main(String[] args) {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
Creates an instance of the uncommitted history.
|
UncommittedHistory(Supplier<Snapshot> makeSnapshot) {
this.makeSnapshot = makeSnapshot;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static SyncHistory createEntity() {\n return new SyncHistory();\n }",
"private History() {}",
"public History() {\n }",
"LoginHistory create(LoginHistory entity);",
"public UpdateHistory() {\n this(\"update_history\", null);\n }",
"@Override\n public EditHistory createFromParcel(Parcel in) {\n return new EditHistory(in);\n }",
"TCommit createCommit();",
"public static VniHistory createEntity(EntityManager em) {\n VniHistory vniHistory = new VniHistory()\n .date(DEFAULT_DATE)\n .value(DEFAULT_VALUE);\n return vniHistory;\n }",
"private static void createHistoryEntry(int docId, String username, String eventType) {\r\n History history = new History();\r\n history.setDocId(docId);\r\n history.setDate(DateBean.toCompactString());\r\n history.setUsername(username);\r\n history.setEvent(eventType);\r\n HistoryDAO historyDao = (HistoryDAO) Context.getInstance().getBean(HistoryDAO.class);\r\n historyDao.store(history);\r\n }",
"public History(History historyData) {\n\tthis.timestampMinute = historyData.getTimestampMinute();\n\tthis.status = historyData.getStatus();\n\tthis.plug = historyData.getPlug();\n }",
"Snapshot create();",
"protected abstract void createHistoryEvents();",
"public HistoryGraph() {\n revisions = new HashSet<Revision>();\n orderedRevisions = new ArrayList<Revision>();\n }",
"int createTicketHistory(TicketHistory ticketHistory, int ticketId, int userId);",
"public PurchaseHistory() {\n this.purchaseHistory = new HashMap<>();\n }",
"public IapHistory() {\n\t\tthis(\"iap_history\", null);\n\t}",
"@Transactional\n public History save(History history) {\n return historyRepository.save(history);\n }",
"private FXDealHistory() {}",
"T create() throws PersistException;",
"private static void addToHistory() {\n\t\tFileInputStream fis = null;\n\t\tFileOutputStream fos = null;\n\t\tFileChannel resultChannel = null;\n\t\tFileChannel historyChannel = null;\n\t\ttry {\n\t\t\tfis = new FileInputStream(new File(\"result.txt\"));\n\t\t\tfos = new FileOutputStream(new File(\"history.txt\"), true);\n\t\t\t\n\t\t\tfos.write(\"\\n\\n\".getBytes(\"utf-8\"));\n\t\t\tfos.flush();\n\t\t\t\n\t\t\tresultChannel = fis.getChannel();\n\t\t\thistoryChannel = fos.getChannel();\n\n\t\t\tresultChannel.transferTo(0, resultChannel.size(), historyChannel);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (fis != null) {\n\t\t\t\t\tfis.close();\n\t\t\t\t}\n\t\t\t\tif (fos != null) {\n\t\t\t\t\tfos.close();\n\t\t\t\t}\n\t\t\t\tif(resultChannel != null) {\n\t\t\t\t\tresultChannel.close();\n\t\t\t\t}\n\t\t\t\tif(historyChannel != null) {\n\t\t\t\t\thistoryChannel.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public MarketHistoricalState() {\n\t\tthis(MarketHistoricalSnapshot.newBuilder());\n\t}",
"public History(\n Long historyId,\n @JsonProperty(\"inspector_id\") Long inspectorId,\n @JsonProperty(\"estate_id\") Long estateId,\n @JsonProperty(\"view_date\") Timestamp viewDate\n ) {\n this.historyId = historyId;\n this.inspectorId = inspectorId;\n this.estateId = estateId;\n this.viewDate = viewDate;\n }",
"public BuildHistory(){\n buildHistory = new ArrayList<Build>();\n }",
"public BitHistory(BitHistory bitHistory) {\n mMaxSize = bitHistory.mMaxSize;\n mHistory.addAll(bitHistory.mHistory);\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tGUIViewTransactionHistory h = new GUIViewTransactionHistory(true);\n\t\t\t}",
"public static HistoryFragment newInstance() {\n HistoryFragment fragment = new HistoryFragment();\n return fragment;\n }",
"private void initializeUndoHistory() {\n \t\tif (fHistory != null && fUndoContext != null)\n \t\t\tfHistory.dispose(fUndoContext, true, true, false);\n \n \t}",
"public void insertHistory(RecordDTO recordDTO);",
"private void persistHistoricalData() {\n /*\n r4 = this;\n r1 = r4.mInstanceLock;\n monitor-enter(r1);\n r0 = r4.mReadShareHistoryCalled;\t Catch:{ all -> 0x000f }\n if (r0 != 0) goto L_0x0012;\n L_0x0007:\n r0 = new java.lang.IllegalStateException;\t Catch:{ all -> 0x000f }\n r2 = \"No preceding call to #readHistoricalData\";\n r0.<init>(r2);\t Catch:{ all -> 0x000f }\n throw r0;\t Catch:{ all -> 0x000f }\n L_0x000f:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x000f }\n throw r0;\n L_0x0012:\n r0 = r4.mHistoricalRecordsChanged;\t Catch:{ all -> 0x000f }\n if (r0 != 0) goto L_0x0018;\n L_0x0016:\n monitor-exit(r1);\t Catch:{ all -> 0x000f }\n L_0x0017:\n return;\n L_0x0018:\n r0 = 0;\n r4.mHistoricalRecordsChanged = r0;\t Catch:{ all -> 0x000f }\n r0 = 1;\n r4.mCanReadHistoricalData = r0;\t Catch:{ all -> 0x000f }\n r0 = r4.mHistoryFileName;\t Catch:{ all -> 0x000f }\n r0 = android.text.TextUtils.isEmpty(r0);\t Catch:{ all -> 0x000f }\n if (r0 != 0) goto L_0x0031;\n L_0x0026:\n r0 = SERIAL_EXECUTOR;\t Catch:{ all -> 0x000f }\n r2 = new com.actionbarsherlock.widget.ActivityChooserModel$HistoryPersister;\t Catch:{ all -> 0x000f }\n r3 = 0;\n r2.<init>();\t Catch:{ all -> 0x000f }\n r0.execute(r2);\t Catch:{ all -> 0x000f }\n L_0x0031:\n monitor-exit(r1);\t Catch:{ all -> 0x000f }\n goto L_0x0017;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.actionbarsherlock.widget.ActivityChooserModel.persistHistoricalData():void\");\n }",
"public History() {\n\tthis.timestampMinute = new Date();\n\tthis.status = false;\n\n }",
"public abstract HistoricalEntity persistHistoricalWrapper();",
"private Object appendHistory(final Context ctx, final NumberMgmtHistory history) throws HomeException,\r\n HomeInternalException\r\n {\r\n final Home home = getHome(ctx);\r\n if (!validate(ctx, history))\r\n {\r\n return null;\r\n }\r\n return home.create(ctx, history);\r\n }",
"public HistoryFragment() {\n }",
"public HistoryFragment() {\n }",
"InstantDt createHistoryToTimestamp() {\n\t\treturn InstantDt.withCurrentTime();\n\t}",
"public NotificationHistoryManager() {\n }",
"public UndoStack() {\n super();\n undoPointer = -1;\n }",
"@Override\n\tpublic Trunk create(final Map<String, String> params) throws TwilioRestException {\n\t\tfinal TwilioRestResponse response = getClient().safeRequest(getResourceLocation(), \"POST\", params);\n\t\treturn makeNew(getClient(), response.toMap());\n\t}",
"@Test\n public void testNewJobHistoryProcessing()\n {\n Job job = jobFakery.makeFakeJob();\n JobHistory newJobHistory = jobHistoryTx.newJobHistoryProcessing(job, START_TIME);\n\n verify(mockJobHistoryDAO).persist(newJobHistory);\n assertEquals(newJobHistory.getStatus(), JobStatus.PROCESSING);\n assertNull(newJobHistory.getEndTime());\n }",
"private EventHistoryTable() {}",
"public ConversionHistory() {\r\n conversionDate = LocalDate.now();\r\n }",
"@Override\n\tpublic Trunk create(final List<NameValuePair> params) throws TwilioRestException {\n\t\tfinal TwilioRestResponse response = getClient().safeRequest(getResourceLocation(), \"POST\", params);\n\t\treturn makeNew(getClient(), response.toMap());\n\t}",
"@Override\n\tpublic DmHistoryGoods create(int id) {\n\t\tDmHistoryGoods dmHistoryGoods = new DmHistoryGoodsImpl();\n\n\t\tdmHistoryGoods.setNew(true);\n\t\tdmHistoryGoods.setPrimaryKey(id);\n\n\t\treturn dmHistoryGoods;\n\t}",
"public void create(){}",
"public AcademicHistory() {\n listOfTerms = new ArrayList<Term>();\n }",
"private ModelTipHistory() {\n }",
"public BuildHistory(ArrayList<Build> buildHistory) {\n this.buildHistory = buildHistory;\n }",
"@Transactional\n\tpublic T create(T newInstance) {\n\t\tthis.em.persist(newInstance);\n\t\treturn newInstance;\n\t}",
"@PostMapping(\"/family-histories\")\n @Timed\n public ResponseEntity<FamilyHistory> createFamilyHistory(@Valid @RequestBody FamilyHistory familyHistory) throws URISyntaxException {\n log.debug(\"REST request to save FamilyHistory : {}\", familyHistory);\n if (familyHistory.getId() != null) {\n throw new BadRequestAlertException(\"A new familyHistory cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n FamilyHistory result = familyHistoryService.save(familyHistory);\n return ResponseEntity.created(new URI(\"/api/family-histories/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"void addRecord(HistoryRecord record) throws IOException;",
"public HistoryFileManager() {\n super(HistoryFileManager.class.getName());\n }",
"LoginHistory save(LoginHistory entity);",
"private LocalHistorySet(final int index) {\n\t\t\tsuper();\n\t\t\tthis.index = index;\n\t\t\tif (table[index] == null) {\n\t\t\t\ttable[index] = new BitSet(capacity);\n\t\t\t}\n\t\t}",
"private static HistoryImpl getImpl()\n {\n HistoryImpl impl = impls.get(Context.getCurrentContext());\n if (impl == null)\n {\n impls.put(Context.getCurrentContext(), impl = new HistoryImpl());\n Context.getCurrentContext().getClient().addListener(new GwtJavaClientListener()\n {\n @Override\n public void onFinish(GwtJavaClient client)\n {\n impls.remove(Context.getCurrentContext());\n }\n\n });\n }\n return impl;\n }",
"public History(ArrayList<Order> orders) {\n this.orders = orders;\n }",
"private void setHistory(final CreateUrlRequest request)\n {\n String token = Session.getInstance().generateUrl(request);\n History.newItem(token, true);\n }",
"public static Locks create() {\n\t\tString uuid = ObjectId.get().toHexString();\n\t\treturn owner( uuid );\n\t}",
"@Override\n protected void commitCreates(ViewImpl view, ObjectInstance oi)\n {\n }",
"@Override\n\tprotected Trunk makeNew(final TwilioTrunkingClient client, final Map<String, Object> params) {\n\t\treturn new Trunk(client, params);\n\t}",
"@Test\n\tpublic void test2() {\n\t\tHistoryStorage historyObj = HistoryStorage.getInstance();\n\t\tboolean result = historyObj.writeToHistory(HISTORY_TXT, null);\n\t\tassertFalse(result);\n\t}",
"public DispatchRouteHistoricalEntryBuilder() {\r\n dispatchRouteHistoricalEntry = new DispatchRouteHistoricalEntry();\r\n }",
"public DjDeploymentStateHistRecord() {\n super(DjDeploymentStateHist.DJ_DEPLOYMENT_STATE_HIST);\n }",
"public HistoryEditorPanel(ToolBelt toolBelt) {\n super(toolBelt);\n initialize();\n setLocked(isLocked());\n approveHistoryTask = toolBelt.getApproveHistoryTask();\n rejectHistoryTask = toolBelt.getRejectHistoryTask();\n }",
"void create( State state );",
"public CommandHistoryLinkedList() {\r\n\t\thistoryDate = new LinkedList<String>();\r\n\t\thistoryAL = new LinkedList<ArrayList<String>>();\r\n\t}",
"public Commit() {\n }",
"public Commit() {\n }",
"public interface TokenHistoryMapper {\n\n\n void create(TokenHistory tokenHistory);\n\n}",
"public static FileContentsProxy create(FileStatus stat) throws IOException {\n return new FileContentsProxy(stat.getLastChangeTime(), stat.getNodeId());\n }",
"Bundle createSaveState() {\n Bundle saveState = new Bundle();\n mTabControl.saveState(saveState);\n if (!saveState.isEmpty()) {\n // Save time so that we know how old incognito tabs (if any) are.\n saveState.putSerializable(\"lastActiveDate\", Calendar.getInstance());\n }\n return saveState;\n }",
"public StringBuilder getHistory() {\r\n\t\treturn history;\r\n\t}",
"protected PersistenceEnvironment<ReadBuffer> createPersistenceEnv(File fileActive, File fileSnapshot,\n File fileTrash)\n throws IOException\n {\n return new BerkeleyDBEnvironment(fileActive, fileSnapshot, fileTrash);\n }",
"public static TimeTakenLogEntry create() {\n return builder().build();\n }",
"private History convertDTOToEntity(HistoryDTO historyDto) {\n\t\tHistory history = modelMapper.map(historyDto, History.class);\n\t\treturn history;\n\t}",
"WithCreate withBranch(String branch);",
"private MetaSparqlRequest createRollbackPreInsered() {\n\t\treturn createRollbackMT1();\n\t}",
"public void createEditLog(long startingTransactionId) throws IOException {\n mEditLog = new EditLog(mEditLogPath, false, startingTransactionId);\n }",
"@Override\r\n\tpublic void create() {\n\t\t\r\n\t}",
"public History(long exhibit_id, String name, String description, Long section_id, Long category_id, long count, String rfid, Long museum_id, double wert, Long outsourced_id, Timestamp startdate, \r\n long id, Timestamp deleted, Timestamp insert, Timestamp update)\r\n {\r\n super(id, deleted, insert, update);\r\n this.exhibit_id = exhibit_id;\r\n this.name = name;\r\n this.description = description;\r\n /** @author Christian Landel */\r\n if (section_id!=null && section_id.equals(0L))\r\n \tthis.section_id=null;\r\n else\r\n \tthis.section_id = section_id;\r\n /** @author Christian Landel */\r\n if (category_id!=null && category_id.equals(0L))\r\n \tcategory_id=null;\r\n else\r\n \tthis.category_id = category_id;\r\n this.count = count;\r\n this.rfid = rfid;\r\n this.museum_id = museum_id;\r\n this.startdate = startdate;\r\n this.wert = wert;\r\n \r\n this.outsourced_id = outsourced_id;\r\n }",
"Lehrkraft createLehrkraft();",
"private void rememberState() {\n int size = pageHistory.size();\n for ( int i = historyCursor + 1; i < size; i++ ) {\n pageHistory.remove( historyCursor + 1 );\n }\n // Add current state to history if different from current one\n PageState newState = new PageState();\n if ( historyCursor < 0 || !pageHistory.get( historyCursor ).equals( newState ) ) {\n pageHistory.add( newState );\n historyCursor = pageHistory.size() - 1;\n }\n }",
"public UpdateHistory(String alias) {\n this(alias, UPDATE_HISTORY);\n }",
"public static FragmentHistoryVerticalTabbed newInstance() {\n return new FragmentHistoryVerticalTabbed();\n }",
"public ReservationhistoryExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}",
"void createBranchAtCommit(TCommit commit, String branchName, TRepo repo);",
"public static void newTrans(Transaction t) {\r\n\t\ttransList = new ArrayList<Transaction>();\r\n\t\tload();\r\n\t\ttransList.add(t);\r\n\t\tsave();\r\n\t}",
"private void openHistoryManagementWindow() {\r\n\t\tnew JFrameHistory(this.jFrameMainWindow.getUser());\r\n\t}",
"@SubL(source = \"cycl/stacks.lisp\", position = 1818) \n public static final SubLObject create_stack() {\n return clear_stack(make_stack(UNPROVIDED));\n }",
"public VitalSignsHistory(){\n \n vitalSignsHistory = new ArrayList<VitalSigns>(); //Initiaizing ArrayList\n \n }",
"public Changelog() {\n\t\tthis(\"changelog\", null);\n\t}",
"private ArrayList<Progress> generateFakeProgressHistory() {\n ArrayList<Progress> history = new ArrayList<>();\n\n Progress progress;\n\n int prevDay = -1;\n\n for (int i = 0; i < 5; i++) {\n progress = new Progress();\n progress.setUsername(Util.getUsername());\n progress.setDate(Util.getPrevDate(prevDay));\n progress.setSteps(\"1467\");\n progress.setMilestones_day(\"3\");\n history.add(progress);\n prevDay--;\n }\n\n return history;\n }",
"void create(T instance) throws IOException;",
"public void openHistory() {\n usingHistoryScreen = true;\n myActivity.setContentView(R.layout.history);\n Button historyButtonToGame = myActivity.findViewById(R.id.button8);\n TextView historyText = myActivity.findViewById(R.id.textView46);\n historyText.setText(state.getHistory());\n historyText.setMovementMethod(new ScrollingMovementMethod());\n gui.invalidate();\n historyButtonToGame.setOnClickListener(\n new View.OnClickListener() {\n public void onClick(View v) {\n ShogiHumanPlayer.this.setAsGui(myActivity);\n usingHistoryScreen = false;\n if (state != null) {\n receiveInfo(state);\n }\n }\n });\n }",
"public ViewHistory(ElectricityCompany m,ControllerHistory c) {//construction of view history\r\n\t\tsuper(m,c);\t\t\r\n\t\tthis.setTitle(\"View History\");\r\n\t\tthis.setSize(400,300);\r\n\t\tHistoryPanel history = new HistoryPanel(m);\r\n\t\tthis.add(history);\r\n\t\t\r\n\t}",
"public void create() {\n\t\t\n\t}",
"private void setActiveHistory(History activeHistory) {\n\t\tthis.activeHistory = activeHistory;\n\t\tactiveHistory.activate();\n\t}",
"Habit createHabit(Habit habit);",
"protected abstract Transaction createAndAdd();",
"public SavedState createFromParcel(Parcel parcel) {\r\n return new SavedState(parcel, null);\r\n }",
"public void loadHistory(SyncedList<MSensor> history) {\n this.history = history;\n }"
] |
[
"0.75713146",
"0.6779951",
"0.6547535",
"0.6390588",
"0.61611336",
"0.60672563",
"0.6011959",
"0.5855723",
"0.58553773",
"0.57460505",
"0.57454884",
"0.572838",
"0.56459534",
"0.5638035",
"0.5625076",
"0.55831796",
"0.5541692",
"0.55258524",
"0.55176216",
"0.5495956",
"0.54490966",
"0.54452413",
"0.54331887",
"0.5421844",
"0.5399823",
"0.53968996",
"0.5389914",
"0.5354086",
"0.5350135",
"0.53349876",
"0.53270507",
"0.5314505",
"0.52989995",
"0.52989995",
"0.5254106",
"0.5251314",
"0.5213195",
"0.52131414",
"0.5197375",
"0.51890045",
"0.51702005",
"0.5143933",
"0.51337016",
"0.5130735",
"0.50709504",
"0.5061649",
"0.50424415",
"0.5040027",
"0.502936",
"0.50145316",
"0.50117916",
"0.5011573",
"0.50096333",
"0.50041485",
"0.5000206",
"0.4996812",
"0.49790373",
"0.4970855",
"0.49563563",
"0.49529243",
"0.49345174",
"0.49304873",
"0.49239963",
"0.49146894",
"0.49057767",
"0.49028966",
"0.49028966",
"0.48910314",
"0.48846963",
"0.48819685",
"0.48788708",
"0.48649415",
"0.48633364",
"0.48628828",
"0.48619702",
"0.48522553",
"0.48503485",
"0.48452297",
"0.4839066",
"0.48254198",
"0.4822959",
"0.48208964",
"0.4815399",
"0.4812823",
"0.48127028",
"0.48105222",
"0.48078704",
"0.48004067",
"0.4798583",
"0.4793261",
"0.47793093",
"0.4778264",
"0.47744834",
"0.47741872",
"0.47707343",
"0.47657865",
"0.47649255",
"0.47636235",
"0.476111",
"0.47582218"
] |
0.5736115
|
11
|
Returns all tracked uncommitted events.
|
UncommittedEvents events() {
var events = get().stream()
.flatMap(segment -> segment.getEventList()
.stream())
.collect(toList());
return UncommittedEvents.ofNone()
.append(events);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"DomainEventStream getUncommittedEvents();",
"public Collection<Event> getEvents() {\n\t\treturn null;\n\t}",
"public Set<EventTO> getEvents() {\n\n Iterable<Event> events = eventRepository.findAll();\n LOGGER.info(\"Returning all events\");\n return mapperService.convertToEventTO(events);\n\n }",
"public List<LogEvent> getEvents() {\n return publicEvents;\n }",
"public ArrayList<Event> getAllEvents()\r\n\t{\r\n\t\treturn dataService.getAllEvents();\r\n\t}",
"@Override\n\tpublic Set<Event> getEvents() {\n return events;\n }",
"public List<EventDesc> getEvents()\r\n {\r\n return Collections.unmodifiableList(events);\r\n }",
"public List getReleasedTopLevelEvents() {\n Collection releasedEvents = getReleasedEvents();\n try {\n return grepTopLevelEvents(releasedEvents);\n }\n catch (Exception e) {\n System.err.println(\"EventReleaseCheckPane.getReleaseTopLevelEvents(): \" + e);\n e.printStackTrace();\n }\n return new ArrayList();\n }",
"@Override\r\n public List<Events> findAllEvents() {\r\n return em.createNamedQuery(\"Events.findAll\").getResultList();\r\n }",
"int getUncommittedEventCount();",
"public List<Event> getEventsList() {\n List<Event> eventDetails = eventRepository.findAll();\n return eventDetails;\n }",
"public List<PluginStatsEvent> getPastEvents() {\n\t\tsynchronized (queue) {\n\t\t\tPluginStatsEvent[] info = new PluginStatsEvent[queue.size()];\n\t\t\tList<PluginStatsEvent> returnList = new ArrayList<PluginStatsEvent>();\n\t\t\tCollections.addAll(returnList, queue.toArray(info));\n\t\t\treturn returnList;\n\t\t}\n\t}",
"public Set<T> getHistoryEvents() {\n\t\tif (historyEvents == null) {\n\t\t\tcreateHistoryEvents();\n\t\t}\n\t\treturn historyEvents;\n\t}",
"private ArrayList<Item> getEvents() {\n\t\tArrayList<Item> events = Magical.getStorage().getList(\n\t\t\t\tStorage.EVENTS_INDEX);\n\t\treturn events;\n\t}",
"public Collection<SapEvent> getEvents()\n\t{\n\t\treturn getEvents( getSession().getSessionContext() );\n\t}",
"default public Set<UpdateEvent> getCustomEvents() {\n\t\treturn Collections.emptySet();\n\t}",
"public Collection<BaseDocument> getUnsavedDocuments() {\n\t\tVector<BaseDocument> ret = new Vector<BaseDocument>();\n\t\tif (theStructures.hasChanged())\n\t\t\tret.add(theStructures);\n\t\treturn ret;\n\t}",
"IEvent[] getEvents();",
"public ProgressEvent [] getReceivedEvents() {\n ProgressEvent [] answer = new ProgressEvent[this.receivedEvents.size()];\n return (ProgressEvent []) this.receivedEvents.toArray(answer);\n }",
"public AbstractList<Event> getEvents() {\r\n\t\treturn (AbstractList<Event>) events;\r\n\t}",
"public List<Event> getEvents() {\n List<Event> events = new ArrayList<>();\n\n Query query = new Query(\"Event\");\n PreparedQuery results = datastore.prepare(query);\n\n for (Entity entity : results.asIterable()) {\n try {\n String idString = entity.getKey().getName();\n UUID eventId = UUID.fromString(idString);\n String speaker = (String) entity.getProperty(\"speaker\");\n String organization = (String) entity.getProperty(\"organization\");\n String eventDate = (String) entity.getProperty(\"eventDate\");\n Location location = (Location) entity.getProperty(\"location\");\n List<String> amenities = getAmenities(eventId);\n String externalLink = (String) entity.getProperty(\"externalLink\");\n PublicType publicType = (PublicType) entity.getProperty(\"publicType\");\n long ownerId = (long) entity.getProperty(\"ownerId\");\n List<ThreadComment> thread = getThread(eventId);\n // long timeStamp = (long) entity.getProperty(\"timestamp\");\n\n Event event = new Event(eventId, speaker, organization, eventDate, location, amenities, externalLink,\n publicType, ownerId);\n event.copyThread(thread);\n events.add(event);\n // An exception can occur here for multiple reasons (Type casting error, any\n // property not existing, key error, etc...)\n } catch (Exception e) {\n System.err.println(\"Error reading event.\");\n System.err.println(entity.toString());\n e.printStackTrace();\n }\n }\n\n return events;\n }",
"public List<Events> getAllSystemEventsListForAll();",
"@Override\n\tpublic List<Evento> getAll() throws HibernateException {\n\t\treturn null;\n\t}",
"@WebMethod public List<Event> getAllEvents();",
"@NotNull\n\tpublic ArrayList<ArrayList<Event<?>>> getEvents() {\n\t\tif (events == null)\n\t\t\tevents = new ArrayList<>();\n\t\t\n\t\treturn events;\n\t}",
"@Override\r\n\tpublic List<String> downloadPendingTracking() {\n\t\treturn trackEventsRepository.fetchPendingArticleIDs();\r\n\t}",
"static Map<Integer, Event> getEvents() {\n\t\treturn events;\n\t}",
"public Vector<ESItem> getUnsavedChanges() {\n Vector<ESItem> vars = new Vector<ESItem>();\n Enumeration en = root.depthFirstEnumeration();\n while (en.hasMoreElements()) {\n DefaultMutableTreeNode node = (DefaultMutableTreeNode) en.nextElement();\n Object obj = node.getUserObject();\n if (obj instanceof ESItem) {\n ESItem var = (ESItem) obj;\n if (var.isChanged()) {\n vars.add(var);\n }\n }\n }\n return vars;\n }",
"public ArrayList<Event> getEvents(){\n return this.events;\n }",
"@NonNull\n public List<HubEvent<?>> await() {\n Latch.await(latch);\n return Immutable.of(events);\n }",
"@NotNull\n\tpublic Set<EventCreateRequest> getEvents() {\n\t\treturn events;\n\t}",
"public List<String> getAllCommits() {\n return Utils.plainFilenamesIn(Main.ALL_COMMITS);\n }",
"@RequestMapping(value = \"/allEvent\")\n\tpublic List<Events> getAllEvents() {\n\t\treturn eventDAO.getAllEventsList();\n\t}",
"public ArrayList<Event> getEvents(){return new ArrayList<Event>(events);}",
"public ArrayList<FbEvent> getPastEvents() throws SQLException {\n\t\tArrayList<FbEvent> events = new ArrayList<FbEvent>();\n\t\tSQLiteDatabase db = tableHelper.getReadableDatabase();\n\t\ttry {\n\t\t\tCursor cursor = db.query(SQLTablesHelper.MY_EVENT_TABLE_NAME, columns,\n\t\t\t\t\tSQLTablesHelper.MY_EVENT_START_TIME + \" < ?\",\n\t\t\t\t\tnew String[] {String.valueOf(TimeFrame.getUnixTime(TimeFrame.getTodayDate()))}, \n\t\t\t\t\tnull, null, null);\n\t\t\tcursor.moveToFirst();\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tFbEvent event = cursorToEvent(cursor);\n\t\t\t\tevents.add(event);\n\t\t\t\tcursor.moveToNext();\n\t\t\t}\n\t\t\tcursor.close();\n\t\t} finally {\n\t\t\tdb.close();\n\t\t}\n\t\treturn events;\n\t}",
"public List<InputEvent> getEvents() {\n return new ArrayList<>(events);\n }",
"public ArrayList<String> getEvents() {\n // TODO\n return res;\n }",
"private List grepTopLevelEvents(Collection events) throws Exception {\n\t // Grep all events that are contained by other events\n\t Set containedEvents = new HashSet();\n\t GKInstance event = null;\n\t for (Iterator it = events.iterator(); it.hasNext();) {\n\t event = (GKInstance) it.next();\n\t if (event.getSchemClass().isValidAttribute(ReactomeJavaConstants.hasEvent)) {\n\t List components = event.getAttributeValuesList(ReactomeJavaConstants.hasEvent);\n\t if (components != null && components.size() > 0) { \n\t for (Iterator it1 = components.iterator(); it1.hasNext();) {\n\t GKInstance tmp = (GKInstance) it1.next();\n\t Boolean dnr = (Boolean) tmp.getAttributeValue(DO_NOT_RELEASE);\n\t if (dnr != null && !dnr.booleanValue())\n\t containedEvents.add(tmp);\n\t }\n\t }\n\t }\n\t }\n\t List topEvents = new ArrayList(events);\n\t topEvents.removeAll(containedEvents);\n\t return topEvents;\n\t}",
"public List<Commit> getAllCommits() {\r\n return datastore.createQuery(Commit.class)\r\n .field(\"vcs_system_id\").equal(vcSystem.getId())\r\n .asList();\r\n }",
"public List<Event> getCreatedEvents() {\n return createdEvents;\n }",
"public Collection<SapEvent> getEvents(final SessionContext ctx)\n\t{\n\t\treturn EVENTSHANDLER.getValues( ctx, this );\n\t}",
"public List getChangedEvents() {\n return new ArrayList(originalDnr.keySet());\n }",
"public LiveData<List<DatabaseObject<Event>>> getAttendingEvents() {\n return mCachedEventsLiveData;\n }",
"public ArrayList<FbEvent> getOngoingEvents() throws SQLException {\n\t\tArrayList<FbEvent> events = new ArrayList<FbEvent>();\n\t\tSQLiteDatabase db = tableHelper.getReadableDatabase();\n\t\ttry {\n\t\t\tCursor cursor = db.query(SQLTablesHelper.MY_EVENT_TABLE_NAME, columns,\n\t\t\t\t\tSQLTablesHelper.MY_EVENT_START_TIME + \" >= ?\",\n\t\t\t\t\tnew String[] {String.valueOf(TimeFrame.getUnixTime(TimeFrame.getTodayDate()))}, \n\t\t\t\t\tnull, null, null);\n\t\t\tcursor.moveToFirst();\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tFbEvent event = cursorToEvent(cursor);\n\t\t\t\tevents.add(event);\n\t\t\t\tcursor.moveToNext();\n\t\t\t}\n\t\t\tcursor.close();\n\t\t} finally {\n\t\t\tdb.close();\n\t\t}\n\t\treturn events;\n\t}",
"private Collection getReleasedEvents() {\n Set events = new HashSet();\n Collection topEvents = eventPane.getTopLevelEvents();\n Set current = new HashSet();\n current.addAll(topEvents);\n Set next = new HashSet();\n GKInstance event = null;\n List values = null;\n Boolean dnr = null;\n try {\n while (current.size() > 0) {\n for (Iterator it = current.iterator(); it.hasNext();) {\n event = (GKInstance) it.next();\n dnr = (Boolean) event.getAttributeValue(DO_NOT_RELEASE);\n if (dnr != null && !dnr.booleanValue())\n events.add(event);\n if (event.getSchemClass().isValidAttribute(\"hasComponent\")) {\n values = event.getAttributeValuesList(\"hasComponent\");\n if (values != null)\n next.addAll(values);\n }\n if (event.getSchemClass().isValidAttribute(\"hasInstance\")) {\n values = event.getAttributeValuesList(\"hasInstance\");\n if (values != null)\n next.addAll(values);\n }\n }\n current.clear();\n current.addAll(next);\n next.clear();\n }\n }\n catch(Exception e) {\n System.err.println(\"EventReleaseCheckPane.getReleasedEvents(): \" + e);\n e.printStackTrace();\n }\n return events;\n }",
"static HistoryEvent[] getHistoryEvents() {\n/* 73 */ HISTORY_RW_LOCK.readLock().lock();\n/* */ \n/* */ try {\n/* 76 */ return HISTORY.<HistoryEvent>toArray(new HistoryEvent[HISTORY.size()]);\n/* */ }\n/* */ finally {\n/* */ \n/* 80 */ HISTORY_RW_LOCK.readLock().unlock();\n/* */ } \n/* */ }",
"public List<InteractionEvent> getInteractionHistory() {\n \t\tSet<InteractionEvent> events = new HashSet<InteractionEvent>();\n \t\tfor (InteractionContext taskscape : contexts.values()) {\n \t\t\tevents.addAll(taskscape.getInteractionHistory());\n \t\t}\n \t\treturn new ArrayList<InteractionEvent>(events);\n \t}",
"@GetMapping(\"/events\")\n\t\tpublic List<Event> getEvents() {\n\t\t\t\t\treturn theEvents;\n\t\t}",
"@Override\n public List<Event> getEvents()\n {\n return Arrays.asList(new DocumentUpdatedEvent());\n }",
"public List<Event> flush() {\n List<Event> flush;\n synchronized (this) {\n flush = this.queue.flush();\n }\n return flush;\n }",
"public List<Event> getParticipatedEvents() {\n return participatedEvents;\n }",
"public Observable getEvents(){\n QBRequestGetBuilder requestBuilder = new QBRequestGetBuilder();\n requestBuilder.sortDesc(\"startDate\");\n return makeObservable(requestBuilder);\n }",
"@CrossOrigin(\"*\")\n @GetMapping(value = \"/all\")\n public ResponseEntity<List<SpecialeventsDTO>> getAllSpecialEvents() {\n List<SpecialeventsDTO> all = specialeventsService.getAllSpecialEvents();\n\n return new ResponseEntity<>(all, HttpStatus.OK);\n }",
"public ArrayList<Event> remainingEventsForTheWeek() {\n\t\tArrayList<Event> result = new ArrayList();\n\n\t\tLocalDateTime now = this.now.get();\n\t\tLocalDate today = now.toLocalDate();\n\t\tLocalTime moment = now.toLocalTime();\n\t\tboolean after = false;\n\n\t\tdo {\n\t\t\tTreeSet<Event> todayEvents = this.events.get(today);\n\t\t\tif (todayEvents != null) {\n\t\t\t\t// Events are sorted\n\t\t\t\tfor (Event e: todayEvents) {\n\t\t\t\t\tif (after) {\n\t\t\t\t\t\tresult.add(e);\n\t\t\t\t\t} else if (e.startTime.compareTo(moment) >= 0) {\n\t\t\t\t\t\tresult.add(e);\n\t\t\t\t\t\tafter = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\tafter = true;\n\t\ttoday = today.plusDays(1);\n\t\t// Week ends on Sunday.\n\t\t} while (today.getDayOfWeek() != DayOfWeek.MONDAY);\n\n\t\treturn result;\n\t}",
"public PageableList<AuditEvent> listAuditEvents() {\n return listAuditEvents(new AuditEventPageRequest());\n }",
"@Override\n\tpublic List<Notification> findAll() {\n\t\treturn null;\n\t}",
"ObservableList<ReadOnlyEvent> getFilteredEventList();",
"@Nullable\n public static Collection<EnvoyContainer> getAllEnvoys(){\n return envoys.values();\n }",
"@Override\n public ReadOnlyEventList getEventList() {\n throw new AssertionError(\"This method should not be called.\");\n }",
"@Override\r\n\t@Transactional\r\n\tpublic List<eventuales> findAll() {\n\t\treturn (List<eventuales>) dao.findAll();\r\n\t}",
"public ArrayList<CampusEvent> fetchEvents() {\n SQLiteDatabase dbObj = getReadableDatabase();\n ArrayList<CampusEvent> entryList = new ArrayList<CampusEvent>();\n\n Cursor cursor = dbObj.query(TABLE_EVENT_ENTRIES, mColumnList, null,\n null, null, null, null);\n\n while (cursor.moveToNext()) {\n CampusEvent event = cursorToEvent(cursor);\n entryList.add(event);\n }\n\n cursor.close();\n dbObj.close();\n\n return entryList;\n }",
"public Collection getUpdatedObjectIds() {\n if (_payload == PAYLOAD_EXTENTS)\n throw new UserException(s_loc.get(\"extent-only-event\"));\n return (_updates == null) ? Collections.EMPTY_LIST : _updates;\n }",
"public abstract Event[] getInitialEvents();",
"public static ArrayList<Events> getEventsArrayList(){\n if (EVENTS_ARRAY_LIST.isEmpty()){\n EVENTS_ARRAY_LIST.addAll(generateEventList());\n }\n return EVENTS_ARRAY_LIST;\n }",
"public List<Evento> getEventos() {\r\n\t\treturn eventos;\r\n\t}",
"public PriorityQueue<Event> getEventList() {\n return new PriorityQueue<Event>(eventsList);\n }",
"public ObservableList<DetailViewEvent> getAllNestedEvents() {\n return nestedEvents;\n }",
"public String showAllEvents() {\n String allEvents = \"\";\n for (Event e: events)\n {\n allEvents = allEvents + e.getName() + \"\\n\";\n }\n return allEvents;\n }",
"public GameEvent[] getEvents();",
"@GetMapping\n public List<JoinEvent> getAll() {\n return this.service.getAll();\n }",
"List<IGameEvent> getEntireGameLog() throws RpcException, StateMachineNotExpectedEventException;",
"public Collection<File> getUpToDateFiles() {\n return new ArrayList<>(upToDateFiles);\n }",
"public Map<String, Integer> trackedFiles() {\r\n\t\treturn trackedFiles;\r\n\t}",
"public Set<T> getSaveEntities() {\n return unmodifiableSet(saveEntities);\n }",
"@Override\n public List<EventNotification> getList() throws EwpException {\n String sql = \"SELECT * From PFEventNotification\";\n return executeSqlAndGetEntityList(sql);\n }",
"public abstract Map<String, Event> getEvents();",
"@Override\n public Cursor<Event> streamEvents() {\n ensureRatingCache();\n return cache.streamEvents();\n }",
"@Override\r\n\tpublic List<Evento> listar() {\n\t\treturn repository.findAll();\r\n\t}",
"public Iterable<Console> getAllNotifications(){\n return consoleRepository.findAll();\n }",
"public List<TrackedTime> trackedTimes(String owner, String repo) {\n return apiClient.deserializeAsList(apiClient.get(String.format(\"/repos/%s/%s/times\", owner, repo)), TrackedTime.class);\n }",
"Collection<String> getSavedEntries() {\n return Collections.unmodifiableCollection(savedEntries);\n }",
"@XmlElement(name = \"events\")\n public List<TimelineEvent> getEvents() {\n return events;\n }",
"public void clearReceivedEvents() {\n this.receivedEvents.clear();\n }",
"public int[] enabledEvents() {\n boolean[] userRecordableEvts0 = userRecordableEvts;\n\n int[] enabledEvts = new int[len];\n int enabledEvtsLen = 0;\n\n for (int type = 0; type < len; type++) {\n if (userRecordableEvts0[type])\n enabledEvts[enabledEvtsLen++] = type;\n }\n\n return U.unique(enabledEvts, enabledEvtsLen, inclEvtTypes, inclEvtTypes.length);\n }",
"@SuppressWarnings ( \"unchecked\" )\n public static List<LogEntry> getLogEntries () {\n return (List<LogEntry>) getAll( LogEntry.class );\n }",
"public PriorityQueue<CustomerEvent> getEventList()\r\n {\r\n return this.eventSet;\r\n }",
"ArrayList<HabitEvent> getHabitEvents();",
"public ArrayList<TimeLineEvent> getTimeLineEvents() {\n\t\treturn info;\n\t}",
"public Collection getReceivedNotifications();",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<Notification> getAllNotificationsByEvent(Event event) {\n\t\tEntityManager manager = Resources.getEntityManager();\n\t\tList<Notification> notifications = manager.createQuery(\"SELECT x FROM Notification x WHERE x.event.id = :id\")\n\t\t\t\t.setParameter(\"id\", event.getId()).getResultList();\n\t\treturn notifications;\n\t}",
"public java.util.List<EncounterStatusHistory> statusHistory() {\n return getList(EncounterStatusHistory.class, FhirPropertyNames.PROPERTY_STATUS_HISTORY);\n }",
"@Override\r\n\tpublic IGameEvents getGameEvents() {\r\n\t\treturn replay.gameEvents;\r\n\t}",
"@Path(\"/showAll\")\n\t@GET\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic List<EventData> getAllEvent() throws JSONException {\n\t\tString today_frm = DateUtil.getNow(DateUtil.SHORT_FORMAT_TYPE);\n\t\tList<Event> list = eventService.getEventsByType(today_frm,\n\t\t\t\tEventType.EVENTTODAY);\n\t\tList<EventData> d = null;\n\t\tif (null != list && list.size() > 0) {\n\t\t\td = getEventsByDateList(list);\n\t\t} else {\n\t\t\td = new ArrayList<EventData>();\n\t\t}\n\t\treturn d;\n\t}",
"@Override\n public Set<Event> getNextEvents(LocalDateTime to) {\n return null;\n }",
"public List<EventSource> getEventList() {\n List<EventSource> result = new ArrayList<>();\n for (EventSource event : this.eventList) {\n // Create a deep-copy of each EventSource.\n result.add(new EventSource(event));\n }\n // Return an unmodifiable list.\n return Collections.unmodifiableList(result);\n }",
"public List<LovedTracksEntry> readPendingLoves() {\n return SQLite.select()\n .from(LovedTracksEntry.class)\n .where(LovedTracksEntry_Table.status.in(LastfmClient.TRANSIENT_ERROR_CODES))\n .queryList();\n }",
"public GitCommit[] getCommits()\n {\n List <GitCommit> list = new ArrayList(); for(GitCommit c=getCommit(); c!=null; c = c.getParent()) list.add(c);\n return list.toArray(new GitCommit[list.size()]);\n }",
"public List<KeyEvent> getKeyEvents() {\n synchronized (this) {\n int len = keyEvents.size();\n for (int i = 0; i < len; i++) {\n keyEventPool.free(keyEvents.get(i));\n }\n keyEvents.clear();\n keyEvents.addAll(keyEventsBuffer);\n keyEventsBuffer.clear();\n return keyEvents;\n }\n }",
"Collection<EventDetector> getEventsDetectors();",
"public static List<Event> generateExpiredEvents() {\n\t\tEvent event1 = Event.create(0);\r\n\t\tevent1.infoStore().add(Info.create(1, 2, 3));\r\n\t\tList<Event> events = new ArrayList<Event>();\r\n\t\tevents.add(event1);\r\n\t\treturn events;\r\n\t}"
] |
[
"0.7946483",
"0.66182935",
"0.6250365",
"0.62073004",
"0.6148778",
"0.61461896",
"0.6117569",
"0.6117053",
"0.61105394",
"0.6091177",
"0.6089549",
"0.6023422",
"0.6019001",
"0.5981392",
"0.59347796",
"0.5869428",
"0.582751",
"0.58246404",
"0.57687414",
"0.5761236",
"0.5749077",
"0.57356083",
"0.57311994",
"0.57246625",
"0.5698446",
"0.5690576",
"0.56731534",
"0.5656727",
"0.5649258",
"0.5638316",
"0.55954623",
"0.5587285",
"0.5575481",
"0.557398",
"0.5553354",
"0.5551969",
"0.55324584",
"0.55316186",
"0.55143845",
"0.5492055",
"0.54874724",
"0.5481685",
"0.5478009",
"0.5469683",
"0.5468236",
"0.5467906",
"0.54375356",
"0.543538",
"0.5422109",
"0.5394538",
"0.53908813",
"0.53713965",
"0.5359486",
"0.5291383",
"0.5256999",
"0.5241151",
"0.52338064",
"0.5213168",
"0.52114093",
"0.5209215",
"0.520586",
"0.5201505",
"0.5200054",
"0.5186426",
"0.5183167",
"0.51612204",
"0.51335555",
"0.5132918",
"0.51246196",
"0.509548",
"0.50917006",
"0.50869334",
"0.5084035",
"0.50792766",
"0.5078679",
"0.5075875",
"0.5052401",
"0.50272423",
"0.5013693",
"0.49977407",
"0.49807474",
"0.4976093",
"0.49704158",
"0.49673882",
"0.49620372",
"0.49613196",
"0.49515504",
"0.49508658",
"0.4947519",
"0.4937855",
"0.4934113",
"0.4932579",
"0.49320075",
"0.4931487",
"0.49231377",
"0.4921968",
"0.4915723",
"0.49126127",
"0.4907876",
"0.4904436"
] |
0.79589313
|
0
|
Tells if this history contains any uncommitted events.
|
boolean hasEvents() {
return !currentSegment.isEmpty() || !historySegments.isEmpty();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tboolean hasUnsavedChanges();",
"public boolean isEmpty() {\n return indexedEvents.isEmpty();\n }",
"public boolean isEmpty() {\n return history.size() == 0;\n }",
"@Override\n\tpublic boolean isHistoryEmpty() {\n\t\tif (this.movements == null) {\n\t\t\tString token = \"UNKOWN\";\n\t\t\tif((session != null)&&(session.getParticipant() != null)&&(session.getParticipant().getToken() != null))token = session.getParticipant().getToken();\n\t\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\t\tLOGGER.debug(\"history null while empty check for token {}\",token);\n\t\t\t}\n\t\t\treturn true;\n\t\t} \n\t\telse if (this.movements.isEmpty()) {\n\t\t\treturn true;\n\t\t} \n\t\telse {\n\t\t\tif ((this.movements.size() == 1)\n\t\t\t\t\t&& ((this.movements.get(0)).equals(this.retrieveViewId()))) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean hasChanges() {\n return !(changed.isEmpty() && defunct.isEmpty());\n }",
"public boolean isCommitted() {\n\t\treturn false;\n\t}",
"public boolean isUniversallyCommitted(long transId) {\n return commitList.isUniversallyCommitted(transId);\n }",
"public boolean isSetEvents() {\n return this.events != null;\n }",
"DomainEventStream getUncommittedEvents();",
"public boolean isUndoPossible() {\n return (roundsHistory.size() > 1);\n }",
"@Override\r\n\tpublic boolean hasPendingChanges() throws RepositoryException {\n\t\treturn false;\r\n\t}",
"public boolean hasChanges();",
"public boolean isEmpty() {\n return unitChanges == null || unitChanges.isEmpty();\n }",
"public boolean checkEmpty(){\n if (history.empty() || historyValues.empty()){\n return true;\n }\n else {\n return false;\n }\n }",
"public boolean emptyBuffer() {\n if(eventBeans.size() == 0)\n return true;\n else return false;\n }",
"private boolean canUndo() {\n return !frozen && !past.isEmpty();\n }",
"@Override\n\tpublic boolean isCommitted() {\n\t\treturn false;\n\t}",
"@Override\n public boolean canUndo(History history) {\n try {\n List<Meeting> meetings = transactionFetcher.query().getMeetings().\n get((Integer) history.getData(\"transactionId\"));\n for (Meeting meeting : meetings) {\n if (meeting.isAgreedTo()) return false;\n }\n return true;\n } catch (Exception e) {\n return false;\n }\n }",
"private boolean commitChecker() {\n\t\tFile file = new File(stagePath);\n\t\tFile[] files = file.listFiles();\n\t\tif (files.length == 0 && untrackedFiles.size() == 0) {\n\t\t\tSystem.out.println(\"No changes added to the commit.\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"UncommittedEvents events() {\n var events = get().stream()\n .flatMap(segment -> segment.getEventList()\n .stream())\n .collect(toList());\n return UncommittedEvents.ofNone()\n .append(events);\n }",
"int getUncommittedEventCount();",
"boolean hasChangeEvent();",
"public boolean hasHistoryId() {\n return result.hasHistoryId();\n }",
"boolean hasTransactionChangesPending() {\n// System.out.println(transaction_mod_list);\n return transaction_mod_list.size() > 0;\n }",
"public boolean isRecordsAwaitingToBeCommitted() {\n var partitionWorkRemainingCount = getNumberOfEntriesInPartitionQueues();\n return partitionWorkRemainingCount > 0;\n }",
"private boolean isHistoryEable() {\n String suid = SRMiddleManage.getInstance().getSuid();\n List<HistoryBean> confid_list_ = HistoryUtil.getInstance(mContext).getHistoryListBySuid(suid);\n if (confid_list_ == null || confid_list_.size() <= 0)\n return false;\n return true;\n }",
"public boolean isEmpty(){return numEvents==0;}",
"public boolean canUndo()\n {\n if (undoableChanges == null || undoableChanges.size() > 0)\n return true;\n else\n return false;\n }",
"@Override\n\tfinal public boolean hasDoneChanges() {\n\t\treturn false;\n\t}",
"public boolean isUndoAvailable() throws ProvisioningException {\n return StateHistoryUtils.isUndoAvailable(home, log);\n }",
"public boolean isCommitOnFailure () {\n return commitOnFailure;\n }",
"public boolean isEndState()\n {\n return !this.safe || (this.e.size() == 0) || (this.d.size() == 0);\n }",
"boolean hasEvent();",
"public boolean hasGetUserHistory() {\n return getUserHistory_ != null;\n }",
"public boolean isUnsaved(Object obj) {\n return null;\r\n }",
"public boolean canUndo() {\n return statePointer > 0;\n }",
"public boolean isEmpty () {\n DBHandler handler = new DBHandler(this,null,null,1);\n Cursor c = handler.getEvent();\n String print = \"\";\n c.moveToFirst();\n\n do {\n } while (c.moveToNext());\n if(c.getCount() == 0) return true;\n else return false;\n }",
"boolean hasChangeStatus();",
"@SuppressWarnings(\"WeakerAccess\")\n public boolean hasObservers() {\n return mObservers.size() > 0;\n }",
"public boolean isCommitted() {\n return this.response.isCommitted();\n }",
"public boolean hasNext() {\n return position < history.size() - 1;\n }",
"boolean isSetEvent();",
"private boolean isTransactionAlreadySeen(Transaction tx){\n return allTransactions.contains(tx);\n }",
"public boolean hasKeepPropertiesHistoryInHours() {\n return keepPropertiesHistoryInHours_ != null;\n }",
"@Override\n public boolean isCommitted() {\n return false;\n }",
"public boolean getNotUndoablePurgesUndoHistory() {\n\t\treturn false;\n\t}",
"public boolean hasEntries(){\n\t\treturn ! errorList.isEmpty();\n\t}",
"public boolean hasEvent(Event event) {\n requireNonNull(event);\n return versionedAddressBook.hasEvent(event);\n }",
"public boolean containsChanges() {\n return genClient.containsChanges();\n }",
"private boolean transactionCanBeEnded(Transaction tx) {\n return tx != null && !(tx.getStatus() != null && tx.getStatus().isOneOf(TransactionStatus.COMMITTED, TransactionStatus.ROLLED_BACK));\n }",
"public boolean isUndoAvailable() {\n\t\treturn lastCommand != null;\n\t}",
"public boolean hasUnsavedParts() { return (bSave != null ? bSave.isEnabled() : false); }",
"public boolean hasPushEvent();",
"@Override\n public boolean isEmpty() {\n return getSnapshot() == null;\n }",
"public boolean isCommitted(long transId) {\n return commitList.isCommitted(transId);\n }",
"private boolean isEmpty() {\n int ro = reserveOffset;\n if (ro >= reserve) {\n if (queue[reserve].isCommitted()) {\n ro = reserve + 1;\n } else {\n ro = reserve;\n }\n }\n\n LOG.debug(\"Effective flush/reserve offset {}/{}\", flushOffset, ro);\n return ro <= flushOffset;\n }",
"public void reportNothingToUndoYet() {\r\n Assert.isTrue(isReceiving());\r\n setNothingToUndoReported(true);\r\n }",
"@Override\r\n public boolean hasPrevious() {\r\n if (previous.data == null) {\r\n return false;\r\n }\r\n return true;\r\n }",
"public boolean canBeRemovedFromCache() {\n\t\treturn !hasUnsavedChanges();\n\t}",
"public static boolean deletePastEvents (Event event){\r\n\t int currentDate = getCurrentDate();\r\n\t int date = event.date;\r\n\t if (date<currentDate){\r\n\t\t masterEventsFile.remove(event.getEventLine());\r\n\t\t return true;\r\n\t }\r\n\t return false;\r\n }",
"@CheckReturnValue\n public boolean hasPrevious() {\n return offset > 0;\n }",
"public boolean hasStateChange() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }",
"@Override\n public boolean isDirty() {\n return !conflicts.isEmpty() || super.isDirty();\n }",
"public boolean noUndoBoard() {\n\t\treturn (cloneForUndo == null);\n\t}",
"public static boolean canUndo() {\r\n\t\treturn undoCommands.isEmpty();\r\n\t}",
"public boolean isInError()\r\n {\r\n return myCurrentState.equals(State.ERROR);\r\n }",
"public boolean hasStateChange() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }",
"boolean hasUnReceived();",
"@Override\n public boolean isValid() {\n return isAdded() && !isDetached();\n }",
"public boolean hasPreviousSet() { \n return (firstIndexOfCurrentSet > firstIndex);\n }",
"public boolean hasKeepPropertiesHistoryInHours() {\n return keepPropertiesHistoryInHoursBuilder_ != null || keepPropertiesHistoryInHours_ != null;\n }",
"private static boolean isStackEmpty(SessionState state)\n\t{\n\t\tStack operations_stack = (Stack) state.getAttribute(STATE_SUSPENDED_OPERATIONS_STACK);\n\t\tif(operations_stack == null)\n\t\t{\n\t\t\toperations_stack = new Stack();\n\t\t\tstate.setAttribute(STATE_SUSPENDED_OPERATIONS_STACK, operations_stack);\n\t\t}\n\t\treturn operations_stack.isEmpty();\n\t}",
"public void checkUntracked(Commit givenCommit) {\n for (String fileName: givenCommit.getFile().keySet()) {\n File fileInCWD = new File(Main.CWD, fileName);\n if (fileInCWD.exists()) {\n String contentInCWD = Utils.readContentsAsString(fileInCWD);\n Blob curBlob = getHeadCommit().getFile().get(fileName);\n if (curBlob == null) {\n if (!contentInCWD.equals(givenCommit.getFile()\n .get(fileName))) {\n System.out.println(\"There is an \"\n + \"untracked file in the way;\"\n + \" delete it, or add and commit it first.\");\n System.exit(0);\n }\n } else if (curBlob != null) {\n String contentInCurr = curBlob.getContent();\n if (!contentInCurr.equals(contentInCWD)\n && !contentInCWD.equals(givenCommit.getFile()\n .get(fileName))) {\n System.out.println(\"There is \"\n + \"an untracked file in the way; \"\n + \"delete it, or add and commit it first.\");\n System.exit(0);\n }\n }\n }\n }\n }",
"public boolean canUndo() {\n/* 834 */ return !Utils.isNullOrEmpty(getNextUndoAction());\n/* */ }",
"boolean hasIsErasing();",
"public boolean hasCardsLeftOver() {\r\n\r\n return !(currentCards.isEmpty());\r\n\r\n }",
"public boolean hasEventId() {\n return fieldSetFlags()[13];\n }",
"boolean hasGetUserHistory();",
"public boolean hasNotifications()\n {\n return !this.notifications.isEmpty();\n }",
"public boolean hasChanges() {\n return Math.abs(this.x) > 1.0E-5f || Math.abs(this.y) > 1.0E-5f || Math.abs(this.scale - this.minimumScale) > 1.0E-5f || Math.abs(this.rotation) > 1.0E-5f || Math.abs(this.orientation) > 1.0E-5f;\n }",
"private boolean shouldProcessEvent(TimeSeriesEvent e) {\r\n return modCountOnLastRefresh < e.getSeriesModCount();\r\n }",
"public boolean hasPast();",
"public boolean hasGetUserHistory() {\n return getUserHistoryBuilder_ != null || getUserHistory_ != null;\n }",
"boolean hasKeepPropertiesHistoryInHours();",
"public boolean isOutstanding() {\n return !cancelled && !invitationSent;\n }",
"private boolean hasChanges() {\n for (Map.Entry<EditText, Integer> e : mPrefKeys.entrySet()) {\n String field = e.getKey().getText().toString();\n String pref = Pref.get(this, e.getValue()).replace(Data.DEACTIVATED_MARKER, \"\");\n if (!field.equals(pref))\n return true;\n }\n return false;\n }",
"final boolean shouldCancelDropsFor( final BlockSnapshot snapshot ) {\n return this.pendingMends.stream().anyMatch( mend -> mend.contains(snapshot) );\n }",
"@JsonIgnore\n\tpublic boolean isEmptyEdit() {\n\t\treturn getUpdatedStatements().isEmpty();\n\t}",
"boolean hasLastAction();",
"public boolean hasEtag() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean isEmpty() {\n\t\treturn callbacks.isEmpty();\n\t}",
"public boolean empty() {\n return popStack.empty() && pushStack.empty();\n }",
"public final boolean hasChangeDateTime() {\n \treturn m_changeDate != 0L ? true : false;\n }",
"public boolean hasUncompletedPendingDeletes() {\n return numUncompletedDeletes.get() > 0;\n }",
"public boolean hasEtag() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"private void checkUnsavedChanges()\n {\n if (hasChanges) {\n DialogActivity.showConfirmDialog(mContext,\n R.string.service_gui_UNSAVED_CHANGES_TITLE,\n R.string.service_gui_UNSAVED_CHANGES,\n R.string.service_gui_SAVE, this);\n }\n else {\n cancel();\n }\n }",
"public boolean isIncomplete()\n {\n\treturn toDo.size() > 0;\n }",
"public boolean hasScriptRun() {\n return scriptHistory != null && scriptHistory.isRan();\n }",
"public boolean empty() {\n return storeStack.isEmpty();\n }",
"public boolean empty() {\n return storeStack.isEmpty();\n }"
] |
[
"0.661019",
"0.64297575",
"0.6361325",
"0.6319891",
"0.6277752",
"0.6184033",
"0.6179611",
"0.61185074",
"0.6096125",
"0.6081947",
"0.60388446",
"0.6031673",
"0.59767294",
"0.597021",
"0.5949019",
"0.5930497",
"0.58745223",
"0.58677816",
"0.58596736",
"0.58574724",
"0.58556956",
"0.58318186",
"0.57999444",
"0.57918686",
"0.57525396",
"0.5717887",
"0.5709346",
"0.5706242",
"0.56890434",
"0.5665313",
"0.5659294",
"0.5640173",
"0.5639417",
"0.562148",
"0.56155705",
"0.5598504",
"0.5542606",
"0.55420184",
"0.5536064",
"0.5522721",
"0.5521404",
"0.5521197",
"0.5520936",
"0.5520342",
"0.55132616",
"0.5506531",
"0.5498808",
"0.5496566",
"0.5493644",
"0.5493396",
"0.54821205",
"0.54666734",
"0.5463327",
"0.54475266",
"0.5446098",
"0.5427572",
"0.5417563",
"0.54174143",
"0.5413744",
"0.54100406",
"0.5395931",
"0.53900534",
"0.5387694",
"0.5385514",
"0.5380714",
"0.535972",
"0.5355736",
"0.53528464",
"0.53488356",
"0.5343371",
"0.5326834",
"0.5322842",
"0.52996325",
"0.5299167",
"0.5296841",
"0.52863085",
"0.52813447",
"0.5279511",
"0.52719903",
"0.5270209",
"0.5268263",
"0.5267363",
"0.52657104",
"0.5264876",
"0.52584434",
"0.5255058",
"0.5245494",
"0.52432203",
"0.5238995",
"0.52386564",
"0.5236452",
"0.52282757",
"0.52274823",
"0.52256405",
"0.5225203",
"0.52219164",
"0.5215304",
"0.52064395",
"0.5205068",
"0.5205068"
] |
0.72022307
|
0
|
Marks this history as stored and no longer uncommitted.
|
void commit() {
historySegments.clear();
currentSegment.clear();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void markAsNotPersisted() {\n systemId=NOT_PERSISTED;\n externalSystemId=null;\n serialVersion=0;\n }",
"public final void undo() {\n\t\tthis.historyManager.undo();\n\t}",
"public void markFileAsNotSaved()\r\n {\r\n saved = false;\r\n }",
"public void undo() {\n setExecuted(false);\n }",
"void markAbandoned();",
"@Override\n void undo() {\n assert false;\n }",
"@Override\r\n public void undoTransaction() {\n data.getStudents().remove(newStu);\r\n data.getStudents().add(stu);\r\n }",
"public void undo() {\n if (!canUndo()) {\n throw new VersionedAssignmentList.NoUndoableStateException();\n }\n currentStatePointer--;\n resetData(assignmentListStateList.get(currentStatePointer));\n }",
"public void undo() {\r\n pop( true );\r\n announce( null );\r\n }",
"public void resetModification()\n {\n _modifiedSinceSave = false;\n }",
"public void saveHistoryToStorage() {\r\n\t\tfor(Document i: strategy.getEntireHistory()) {\r\n\t\t\tif(!i.getContent().isEmpty()) {\r\n\t\t\t\ti.save(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public void undo() {\n Memento temp = createMemento();\n memento.restore();\n memento = temp;\n }",
"public static void clearHistoryData() {\n try {\n clearFile(HISTORY_FILE_PATH);\n } catch (Exception e) {\n StorageSavingException exception = new StorageSavingException(e);\n Ui.printExceptionMessage(exception);\n }\n }",
"public void markForDeletion() {\n\t\tthis.mustBeDeleted = true;\n\t}",
"public void commit() {\n\t\tcommitted = true;\n\t}",
"public void setHistoryCleared() {\n\n // If jelly bean or above.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n\n // Finish all activities on\n // the current stack.\n activity.finishAffinity();\n } else {\n activity.finish();\n }\n }",
"@Override\n\t\tprotected void _delete() {\n\t\t\toldValue = 0;\n\t\t\tnewValue = 0;\n\t\t}",
"@Override\n public void undo()\n {\n story.setEstimate(oldEstimate);\n\n if (ready) {\n story.setReadinessToReady();\n }\n }",
"@Override\n public void rollbackValues() {\n \n }",
"protected final void undo() {\n requireAllNonNull(model, previousResidentBook, previousEventBook);\n model.resetData(previousResidentBook, previousEventBook);\n model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);\n model.updateFilteredEventList(PREDICATE_SHOW_ALL_EVENTS);\n\n }",
"public void markDirty() {\n dirty = true;\n }",
"void clearHistoryData();",
"void markInactive();",
"public void checkpoint(boolean hasUncommittedData) throws SQLException;",
"public void markDirty()\n {\n }",
"protected void commit()\n\t{\n\t\t_Status = DBRowStatus.Unchanged;\n\t}",
"public void undo() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void undo(Transaction tx) {\r\n\t\t// do nothing\r\n\t\t\r\n\t}",
"public void commit() {\n\t\tcommitted = true;\n\t\tbackUp();\n\t\t//back up the current board info at the meanwhile\n\t}",
"public void unReset () {\n count = lastSave;\n }",
"public void storeAndCommit() {\n \tsynchronized(mDB.lock()) {\n \t\ttry {\n \t \t\tstoreWithoutCommit();\n \t \t\tcheckedCommit(this);\n \t\t}\n \t\tcatch(RuntimeException e) {\n \t\t\tcheckedRollbackAndThrow(e);\n \t\t}\n \t}\n }",
"public void undoChanges() {\r\n if (getPageDataStoresStatus() == DataStoreBuffer.STATUS_NOT_MODIFIED)\r\n return;\r\n else\r\n _ds.undoChanges(_ds.getRow());\r\n }",
"public void setDirty() {\r\n\t\tif (LOG.isLoggable(Level.FINE)) { LOG.fine(\"setDirty\"); }\r\n\r\n \tif(clean) { fireFileCleanStatusChangedEvent(new FileChangeEvent(eventSource, false)); }\r\n \tfireFileChangedEvent(new FileChangeEvent(this, false));\r\n \tclean = false;\r\n }",
"static void setNotSaved(){saved=false;}",
"public void rollback() {\r\n info.setIcon(lastIcon);\r\n info.setText(lastInfo);\r\n }",
"private void setDirty() {\n\t}",
"public void undo() {\n\t\tif(committed){\n\t\t\treturn;\n\t\t}\n\t\tboolean [][] tempGrid = grid;\n\t\tgrid = backupGrid;\n\t\tbackupGrid = tempGrid;\n\n\t\tint [] tempWidths = widths;\n\t\twidths = backupWidths;\n\t\tbackupWidths = tempWidths;\n\n\t\tint [] tempHeights = heights;\n\t\theights = backupHeights;\n\t\tbackupHeights = tempHeights;\n\n\t\tint tempMaxColumnHeight = maxColumnHeight;\n\t\tmaxColumnHeight = backupMaxColumnHeight;\n\t\tbackupMaxColumnHeight = tempMaxColumnHeight;\n\n\t\tcommit();\n\t}",
"public void clear() {\n history.clear();\n position = -1;\n }",
"@Override\n\tpublic void undo()\n\t{\n\t}",
"public void undo() {\n target.setCombatState( oldState );\n }",
"public void undo() {\n if (!history.isEmpty()) {\n Command c = history.get(0);\n c.undo();\n history.remove(0);\n future.add(0, c);\n }\n }",
"public void undo() {\n }",
"public void markAsDeleted() {\n\t\tthis.setDeleted(true);\t\t\n\t}",
"@Override\r\n\tpublic int clearHistory() throws NotesApiException {\n\t\treturn 0;\r\n\t}",
"UncommittedHistory(Supplier<Snapshot> makeSnapshot) {\n this.makeSnapshot = makeSnapshot;\n }",
"public void unsetValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(VALUE$12);\n }\n }",
"@Override\n public void undo() {\n\n }",
"@Override\n public void undo() {\n\n }",
"public void reset () {\n lastSave = count;\n count = 0;\n }",
"public void undo() {\n\t\tstudentWorkerOperation.UndoNewBadgeHelper(badgeId);\n\t}",
"protected void toggleHistory(final Context ctx,\r\n final SubscriberNumberMgmtHistory history)\r\n throws AgentException\r\n {\r\n\r\n try\r\n {\r\n SubscriberNumberMgmtHistory cloneHistory = (SubscriberNumberMgmtHistory) history.clone();\r\n\r\n if (cloneHistory.getLatest() != latest_)\r\n {\r\n cloneHistory.setLatest(latest_);\r\n cloneHistory.setEndTimestamp(endTimestamp_);\r\n }\r\n setHistory((SubscriberNumberMgmtHistory)home_.store(ctx, cloneHistory));\r\n // there should only be one entry with latest set to true\r\n setAddNewHistoryRequired(true);\r\n count_++;\r\n throw new AbortVisitException();\r\n }\r\n catch(CloneNotSupportedException cloneEx)\r\n {\r\n throw new AgentException(cloneEx);\r\n }\r\n catch (HomeException hEx)\r\n {\r\n throw new AgentException(hEx);\r\n }\r\n }",
"private void unsetLast() { this._last = false; }",
"public void resetHistory() {\n SharedPreferences.Editor editor = preferences.edit();\n editor.remove(\"usernameHistory\");\n editor.apply();\n }",
"public static void lost() {\n\t\tPig.alterStorage(false);\n\t}",
"@Override\n\tpublic void clearChanged() {\n\t\tthis.changed = false;\n\t}",
"void save() {\r\n if (actionCompleted) {\r\n forget();\r\n } else {\r\n AccountSettings.stateStored = new Bundle();\r\n save(AccountSettings.stateStored);\r\n }\r\n }",
"@Override\n\tpublic void undo() {\n\t\t\n\t}",
"@Override\n\tpublic void undo() {\n\t\t\n\t}",
"@Override\n\tpublic void undo() {\n\t\t\n\t}",
"void unsetValue();",
"void unsetValue();",
"public abstract HistoricalEntity persistHistoricalWrapper();",
"public void clearMark()\n {\n mark = false;\n }",
"public void clear() throws ChangeVetoException;",
"private void persistHistoricalData() {\n /*\n r4 = this;\n r1 = r4.mInstanceLock;\n monitor-enter(r1);\n r0 = r4.mReadShareHistoryCalled;\t Catch:{ all -> 0x000f }\n if (r0 != 0) goto L_0x0012;\n L_0x0007:\n r0 = new java.lang.IllegalStateException;\t Catch:{ all -> 0x000f }\n r2 = \"No preceding call to #readHistoricalData\";\n r0.<init>(r2);\t Catch:{ all -> 0x000f }\n throw r0;\t Catch:{ all -> 0x000f }\n L_0x000f:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x000f }\n throw r0;\n L_0x0012:\n r0 = r4.mHistoricalRecordsChanged;\t Catch:{ all -> 0x000f }\n if (r0 != 0) goto L_0x0018;\n L_0x0016:\n monitor-exit(r1);\t Catch:{ all -> 0x000f }\n L_0x0017:\n return;\n L_0x0018:\n r0 = 0;\n r4.mHistoricalRecordsChanged = r0;\t Catch:{ all -> 0x000f }\n r0 = 1;\n r4.mCanReadHistoricalData = r0;\t Catch:{ all -> 0x000f }\n r0 = r4.mHistoryFileName;\t Catch:{ all -> 0x000f }\n r0 = android.text.TextUtils.isEmpty(r0);\t Catch:{ all -> 0x000f }\n if (r0 != 0) goto L_0x0031;\n L_0x0026:\n r0 = SERIAL_EXECUTOR;\t Catch:{ all -> 0x000f }\n r2 = new com.actionbarsherlock.widget.ActivityChooserModel$HistoryPersister;\t Catch:{ all -> 0x000f }\n r3 = 0;\n r2.<init>();\t Catch:{ all -> 0x000f }\n r0.execute(r2);\t Catch:{ all -> 0x000f }\n L_0x0031:\n monitor-exit(r1);\t Catch:{ all -> 0x000f }\n goto L_0x0017;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.actionbarsherlock.widget.ActivityChooserModel.persistHistoricalData():void\");\n }",
"public void markDestroyed() {\n\t\tsetupResult = environmentStatus;\n\t\tenvironmentStatus = State.DESTROYED.name();\n\t\tdestroyedAt = System.currentTimeMillis();\n\t\tBasicDBObject updateQuery = new BasicDBObject(); \n\t\tBasicDBObject fieldSets = new BasicDBObject(); \n\t\tfieldSets.put(\"environmentStatus\", environmentStatus); \n\t\tfieldSets.put(\"destroyedAt\", destroyedAt); \n\t\tfieldSets.put(\"numDestroyed\", numDestroyed); \n\t\tfieldSets.put(\"destroyError\", destroyError); \n\t\tfieldSets.put(\"setupResult\", setupResult); \n\t\tupdateQuery.put( \"$set\", fieldSets); \n\t\tappendData(updateQuery);\n\t}",
"@Override\n\tpublic void undo() {\n\t\tsecurity.off();\n\t}",
"public void undo() {\n // only check the action can be undo or not\n if (!this.canUndo()) {\n throw new CannotUndoException();\n }\n }",
"@Override\r\n\tpublic Spitter save(Spitter unsaved) {\n\t\tlist.add(unsaved);\r\n\t\treturn null;\r\n\t}",
"public void commit() throws IOException {\n\t\t\tif (hasErrors) {\n\t\t\t\tcompleteEdit(this, false);\n\t\t\t\tremove(entry.key); // the previous entry is stale\n\t\t\t} else {\n\t\t\t\tcompleteEdit(this, true);\n\t\t\t}\n\t\t}",
"public void commit() {\n tryCommit(true);\n }",
"@Override\n public boolean undo() {\n // nothing required to be done\n return false;\n }",
"@Override\n public void setDirty(boolean arg0)\n {\n \n }",
"public void saveState() {\n table.saveState(store);\n }",
"public void markTouched(String space, String blobKey) {\n if (Strings.isEmpty(blobKey)) {\n return;\n }\n\n if (blobStorage == null) {\n return;\n }\n\n boolean added = touchedBlobs.offer(Tuple.create(space, blobKey));\n if (!added && logLimit.check()) {\n StorageUtils.LOG.WARN(\"Layer2: Dropping touch events as the internal queue is full!\");\n }\n }",
"protected synchronized void clearChanged() {\n changed = false;\n }",
"public final synchronized void mo47208b() {\n this.f49753d.clear();\n C18331bb.m60419a(this.f49751b);\n this.f49750a.edit().clear().commit();\n }",
"public void discardAndGoBack() {\n try {\n currentEditor.setValue(null);\n if (currentEditor instanceof RestrictedEntityEditor) {\n ((RestrictedEntityEditor) currentEditor).refreshListOfValues();\n }\n } catch (Exception ex) {\n throw new RuntimeException(\"Exception while discarding value of an editor. \", ex);\n }\n goBack();\n }",
"protected void markUnstable() {\n if (this.step == null || this.step.markUnstable) {\n if (this.run != null) {\n this.run.setResult(Result.UNSTABLE);\n }\n }\n }",
"public void markUnsold(){\n\n myMaxRejectCountCount--;\n }",
"@Override\n public boolean isDirty() {\n return false;\n }",
"protected void storeWithoutCommit(ExtObjectContainer db) {\n \ttry {\n \t\tcheckedActivate(3); // TODO: Figure out a suitable depth.\n \t\tthrowIfNotStored(mBoard);\n \t\tif(mMessage != null) throwIfNotStored(mMessage);\n \n \t\tcheckedStore();\n \t}\n \tcatch(RuntimeException e) {\n \t\tcheckedRollbackAndThrow(e);\n \t}\n }",
"public void MarkForDeletion();",
"public void resetStore() {\n try {\n db.close();\n uncommited = null;\n uncommitedDeletes = null;\n autoCommit = true;\n bloom = new BloomFilter();\n utxoCache = new LRUCache(openOutCache, 0.75f);\n } catch (IOException e) {\n log.error(\"Exception in resetStore.\", e);\n }\n\n File f = new File(filename);\n if (f.isDirectory()) {\n for (File c : f.listFiles())\n c.delete();\n }\n openDB();\n }",
"public void checkWriteLock() {\n checkNotDeleted();\n super.checkWriteLock();\n }",
"@Override\n\tprotected void setDirty(boolean dirty) {\n\t\tsuper.setDirty(dirty);\n\t}",
"@Override\n\tpublic void zapBlob() throws PersistBlobException {\n\t\twriteBlob(\"\");\n\t}",
"public void clearHistory() {\n historyStack.clear();\n lastTransition = null;\n }",
"@Override\r\n public void undo() {\n\r\n }",
"public void saveState() {\n\t\tsuper.saveState();\n\t}",
"public void rollback();",
"public synchronized void setCommitted(CommitInfo info) {\n\t\t// We can't be committed twice.\n\t\tAssert.assertTrue(null == _commitInfo);\n\t\t// The commit offset must be a positive number.\n\t\tAssert.assertTrue(info.intentionOffset > 0L);\n\t\t\n\t\t_commitInfo = info;\n\t\tthis.notifyAll();\n\t}",
"public void setDeleted();",
"@Override\n public void save(Composition composition) {\n FilePointerSet filePointerSet = composition.getFilePointerSet();\n // bl: there's a save order issue here that is giving a null/transient value error on cascade\n // from Composition to FilePointerSet. FilePointerSet's composition is being reported as a null/transient\n // value. very strange, since the error is happening from the context of a call to Composition.dao().save.\n // in any event, to fix this one strange scenario, I'm going to set the FilePointerSet to null prior to save.\n // then, once the save is done, we can re-add the FilePointerSet, which should be cascaded to save automatically.\n // LAME.\n composition.setFilePointerSet(null);\n super.save(composition);\n if (exists(filePointerSet)) {\n composition.setFilePointerSet(filePointerSet);\n }\n }",
"@Override\n\tpublic void undoAction() {\n\t\tfield.setValue(oldValue);\n\n\t\tif (checkBox != null)\n\t\t\tcheckBox.setSelected(oldValue);\n\t}",
"@Override\n public boolean isDirty()\n {\n return false;\n }",
"public void setClean() {\r\n \tif(!clean) { fireFileCleanStatusChangedEvent(new FileChangeEvent(eventSource, true)); }\r\n \tclean = true;\r\n }",
"protected void cancelChanges() {\n }",
"public void undo() {\n\t\tif(!committed) {\n\t\t\tSystem.arraycopy(undoWidths, 0, widths, 0, widths.length);\n\t\t\t//Undo the widths\n\t\t\tSystem.arraycopy(undoHeights, 0, heights, 0, heights.length);\n\t\t\t//Undo the heights\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\tSystem.arraycopy(undoGrid[i], 0, grid[i], 0,undoGrid[i].length);\n\t\t\t}\n\t\t\t//Undo the heights\n\t\t\tmaxHeight = undoMaxHeight;\n\t\t\t//Undo the max height\n\t\t}\n\t\t//if committed then we can not undo and do nothing\n\t\tcommit();\n\t\t// YOUR CODE HERE\n\t}",
"private void setDirty(boolean dirty) {\n bSave.setEnabled(dirty);\n }"
] |
[
"0.6307724",
"0.6055755",
"0.59588593",
"0.56752205",
"0.5628883",
"0.55913305",
"0.5588754",
"0.5583425",
"0.5556751",
"0.5516118",
"0.55002797",
"0.5495106",
"0.548023",
"0.54307497",
"0.5424741",
"0.5407555",
"0.5380282",
"0.5369356",
"0.5352294",
"0.5351956",
"0.53411674",
"0.53275317",
"0.5318765",
"0.53126615",
"0.5296309",
"0.52917886",
"0.52750736",
"0.5272341",
"0.5271518",
"0.5271321",
"0.5267419",
"0.52672035",
"0.52620405",
"0.52532214",
"0.5250532",
"0.5238797",
"0.5231137",
"0.52197146",
"0.5201265",
"0.51527786",
"0.5151888",
"0.51472527",
"0.51299983",
"0.51289237",
"0.51278305",
"0.5094112",
"0.5093818",
"0.5093818",
"0.5088156",
"0.5079994",
"0.5076509",
"0.50693125",
"0.5067928",
"0.50661767",
"0.50595057",
"0.5058232",
"0.5046895",
"0.5046895",
"0.5046895",
"0.5043341",
"0.5043341",
"0.503771",
"0.50297946",
"0.5022713",
"0.5020645",
"0.50198925",
"0.50086534",
"0.50078565",
"0.50063735",
"0.50020766",
"0.49855876",
"0.49798593",
"0.4978467",
"0.49779758",
"0.49755463",
"0.49592945",
"0.49590486",
"0.49427554",
"0.49366003",
"0.49179134",
"0.49146488",
"0.49136817",
"0.49037787",
"0.490113",
"0.4896965",
"0.48933896",
"0.48929176",
"0.48857397",
"0.48827618",
"0.48803988",
"0.48650822",
"0.48620433",
"0.48612988",
"0.4860614",
"0.48554853",
"0.48519298",
"0.48359415",
"0.4831374",
"0.48227048",
"0.482262"
] |
0.58485967
|
3
|
Records the history loaded from the aggregate storage. This is only required in order to know the number of events since the last snapshot.
|
void onAggregateRestored(AggregateHistory history) {
this.eventCountAfterLastSnapshot = history.getEventCount();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void saveActivityHistForAddEntity(Record inputRecord);",
"public void storeFileHistory() {\n\t\ttheFileHistory.store(theConfiguration);\n\t}",
"public RecordSet loadAllProcessEventHistory(Record inputRecord);",
"public void trackRetention() {\n track(\"_retention\");\n }",
"public void storeResidueHistory() {\n\t\ttheResidueHistory.store(theConfiguration);\n\t}",
"void addRecord(HistoryRecord record) throws IOException;",
"public void record() {\n stats.record();\n }",
"public void saveHistoryToStorage() {\r\n\t\tfor(Document i: strategy.getEntireHistory()) {\r\n\t\t\tif(!i.getContent().isEmpty()) {\r\n\t\t\t\ti.save(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void setStatisticsHistorySize(int historySize);",
"private void persistHistoricalData() {\n /*\n r4 = this;\n r1 = r4.mInstanceLock;\n monitor-enter(r1);\n r0 = r4.mReadShareHistoryCalled;\t Catch:{ all -> 0x000f }\n if (r0 != 0) goto L_0x0012;\n L_0x0007:\n r0 = new java.lang.IllegalStateException;\t Catch:{ all -> 0x000f }\n r2 = \"No preceding call to #readHistoricalData\";\n r0.<init>(r2);\t Catch:{ all -> 0x000f }\n throw r0;\t Catch:{ all -> 0x000f }\n L_0x000f:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x000f }\n throw r0;\n L_0x0012:\n r0 = r4.mHistoricalRecordsChanged;\t Catch:{ all -> 0x000f }\n if (r0 != 0) goto L_0x0018;\n L_0x0016:\n monitor-exit(r1);\t Catch:{ all -> 0x000f }\n L_0x0017:\n return;\n L_0x0018:\n r0 = 0;\n r4.mHistoricalRecordsChanged = r0;\t Catch:{ all -> 0x000f }\n r0 = 1;\n r4.mCanReadHistoricalData = r0;\t Catch:{ all -> 0x000f }\n r0 = r4.mHistoryFileName;\t Catch:{ all -> 0x000f }\n r0 = android.text.TextUtils.isEmpty(r0);\t Catch:{ all -> 0x000f }\n if (r0 != 0) goto L_0x0031;\n L_0x0026:\n r0 = SERIAL_EXECUTOR;\t Catch:{ all -> 0x000f }\n r2 = new com.actionbarsherlock.widget.ActivityChooserModel$HistoryPersister;\t Catch:{ all -> 0x000f }\n r3 = 0;\n r2.<init>();\t Catch:{ all -> 0x000f }\n r0.execute(r2);\t Catch:{ all -> 0x000f }\n L_0x0031:\n monitor-exit(r1);\t Catch:{ all -> 0x000f }\n goto L_0x0017;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.actionbarsherlock.widget.ActivityChooserModel.persistHistoricalData():void\");\n }",
"@Override\n public Class<UpdateHistoryRecord> getRecordType() {\n return UpdateHistoryRecord.class;\n }",
"public float[] getCountHistory() {\n return countMonitor.getHistory();\n }",
"private void logCurrentSensorEntriesBatch() {\n\t\tentriesRecorded++;\n\n\t\tint targetBatchSize = Constants.MS_FREQUENCY_FOR_CAMERA_CAPTURE / Constants.MS_INS_SAMPLING_FREQUENCY;\n\n\t\tArrayList<SensorEntry> toProcess = new ArrayList<SensorEntry>(this.sensorEntryBatch.subList(0, targetBatchSize));\n\t\tthis.sensorEntryBatch = new ArrayList<SensorEntry>(this.sensorEntryBatch.subList(targetBatchSize,\n\t\t\t\ttargetBatchSize));\n\n\t\tthis.writeBatchToFile(toProcess);\n\t}",
"protected abstract void createHistoryEvents();",
"public void insertHistory(RecordDTO recordDTO);",
"public RecordSet loadAllProcessDetailHistory(Record inputRecord);",
"public int getSizeOfHistory() {\n return this.history.size();\n }",
"@Override\n public void handleEvent(HistoryEvent historyEvent) {\n if (historyEvent instanceof HistoricVariableUpdateEventEntity) {\n // emulate the history event processing and persisting\n countCustomHistoryEventHandler++;\n }\n }",
"public void PushEventStatisticsFromDB() {\n\t\tmyDBUtil.open();\n\t\tCursor mCursor = myDBUtil.queryMarkIsZero();\n\t\tmCursor.moveToFirst();\n\t\tdo {\n\t\t\tfinal EventStatisticsData eventStatisticsData = new EventStatisticsData();\n\t\t\tString[] colums = new String[]{\n\t\t\t\t\t\"behavior\", \"appId\", \"appSrc\", \"packageName\", \"client\", \"listenArea\",\n\t\t\t\t\t\"listenContextId\", \"listenContextSrc\", \"clientVersion\", \"referenceId\",\n\t\t\t\t\t\"appName\", \"appVersion\"};\n\t\t\tint index;\n\t\t\tString value;\n\t\t\tfor (int i = 0; i < colums.length; i++) {\n\t\t\t\tindex = mCursor.getColumnIndex(colums[i]);\n\t\t\t\tvalue = mCursor.getString(index);\n\t\t\t\teventStatisticsData.SetParamFromApp(i, value);\n\t\t\t}\n\t\t\tindex = mCursor.getColumnIndex(\"_id\");\n\t\t\tfinal int id = mCursor.getInt(index);\n\t\t\tGetIPFromServer(new GetIpCallback() {\n\t\t\t\t@Override\n\t\t\t\tpublic void solve(String result) {\n\t\t\t\t\tif (result != null && eventStatisticsData != null) {\n\t\t\t\t\t\tpushStatisticsEvent(eventStatisticsData, false, id);\n\t\t\t\t\t\tLog.d(TAG, \"im here don't insert to db,just update\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t} while (mCursor.moveToNext());\n\t\tmCursor.close();\n\t\tmyDBUtil.close();\n\t}",
"List<HistoryData> loadAllHistoryData();",
"@Override\n public void updateHistory() {\n List<Integer> allItemIds = determineItemIds();\n if (allItemIds == null || allItemIds.size() == 0) {\n Log.i(TAG, \"No Item Ids exists to create history data sets.\");\n return;\n }\n\n long processTs = System.currentTimeMillis();\n long startLastMonth;\n long endLastMonth;\n // determine the last month depending from the process timestamp. In the first iteration\n // the process timestamp is the current timestamp. With the second iteration,\n startLastMonth = DateHelper.startOfLastMonth(processTs);\n endLastMonth = DateHelper.endOfLastMonth(processTs);\n // iterate through all known IDs. This is required because we want to create a history entry\n // for each item\n for (int itemId : allItemIds) {\n updatePriceHistory(itemId, startLastMonth, endLastMonth);\n }\n }",
"protected void saveHistoryData() throws RemoteHomeManagerException {\n int expected = (isCurrentState()) ? 1 : 0;\n if (isEnabledScheduler()) {\n Boolean action = getLightSchedule().getCurrentSchedule();\n expected = action?1:0;\n }\n HistoryData history = new HistoryData();\n history.setDeviceId(getDeviceId());\n history.setDataName(\"ONOFF\");\n history.setDataValue(((isCurrentState())?1:0)+\"|\"+expected);\n history.setDataTimestamp();\n m.getPersistance().addHistoryData(history);\n RemoteHomeManager.log.debug(\"Saved history data: \"+history.toString());\n }",
"public void saveAllHistory() {\n\n\t\tfor (Map.Entry<Integer, History> entry : mapOfHistorys.entrySet()) {\n\t\t\tHistory history = entry.getValue();\n\t\t\thistory.save();\n\t\t\t\n\t\t}\n\t}",
"private void addSnapshot(MetricsRecordBuilder builder, String name, String desc,\n Snapshot snapshot, long count) {\n builder.addGauge(Interns.info(name + \"_count\", desc), count);\n addSnapshot(builder, name, desc, snapshot);\n }",
"@Override\n\tpublic Class<IapHistoryRecord> getRecordType() {\n\t\treturn IapHistoryRecord.class;\n\t}",
"static HistoryEvent[] getHistoryEvents() {\n/* 73 */ HISTORY_RW_LOCK.readLock().lock();\n/* */ \n/* */ try {\n/* 76 */ return HISTORY.<HistoryEvent>toArray(new HistoryEvent[HISTORY.size()]);\n/* */ }\n/* */ finally {\n/* */ \n/* 80 */ HISTORY_RW_LOCK.readLock().unlock();\n/* */ } \n/* */ }",
"public RecordSet loadExpHistoryInfo(Record inputRecord);",
"public abstract HistoricalEntity persistHistoricalWrapper();",
"void storeEvents()\n {\n this.storedPresences = new ArrayList<Presence>();\n this.storeEvents = true;\n }",
"public SubscriberNumberMgmtHistory getHistory()\r\n {\r\n return history_;\r\n }",
"private void updateRecordCount() {\n // Set the count to 0, if the storage can not be accessed then the stored record count\n // will be left as 0\n mStoredRecordCount = 0;\n File rootFolder = getBaseFolder();\n if (rootFolder == null) {\n return;\n }\n\n // Each directory in this folder represents one record.\n File[] fileList = rootFolder.listFiles();\n if (fileList != null) {\n for (File eachFile : fileList) {\n if (eachFile.isDirectory()) {\n mStoredRecordCount++;\n }\n }\n }\n }",
"private void LogPurchaseHistoryTable() {\n SQLiteDatabase db = DBHelper.getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + DBHelper.TABLE_PURCHASEHISTORY, null);\n Log.d(DatabaseHelper.class.getName(), \"Contents of PurchaseHistory Table:\");\n\n c.moveToFirst();\n while (!c.isAfterLast()) {\n Log.d(DatabaseHelper.class.getName(), \"\\t _id:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_ID))) +\n \", pid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PID))) +\n \", sid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_SID))) +\n \", price:\" + String.valueOf(c.getDouble(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PRICE))) +\n \", quality:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_QUALITY))) +\n \", timestamp:\" + String.valueOf(c.getString(c.getColumnIndex(DBHelper.PURCHASEHISTORY_DATE))) );\n c.moveToNext();\n }\n\n db.close();\n }",
"public void trackRevenue() {\n track(\"_revenue\");\n }",
"public void uploadLogCollection();",
"private void storeEvent() throws IOException {\n\t\tMagical.getStorage().create(Storage.EVENTS_INDEX, event);\n\t\tMagical.addDisplayList(Storage.EVENTS_INDEX, event);\n\t}",
"public Set<T> getHistoryEvents() {\n\t\tif (historyEvents == null) {\n\t\t\tcreateHistoryEvents();\n\t\t}\n\t\treturn historyEvents;\n\t}",
"@Override\n public int getCurrentRecordsProcessed() {\n return 0;\n }",
"boolean addHistoricVisitsToUsageReportsBuffer();",
"ListRecordHistoryResult listRecordHistory(ListRecordHistoryRequest listRecordHistoryRequest);",
"@Override\r\n\tpublic List<Logbook> viewRecords() {\n\t\treturn user.viewRecords();\r\n\t}",
"public interface LogStorage {\n\n /**\n * Returns first log index in log.\n */\n long getFirstLogIndex();\n\n /**\n * Returns last log index in log.\n */\n long getLastLogIndex();\n\n /**\n * Get logEntry by index.\n */\n LogEntry getEntry(final long index);\n\n /**\n * Get logEntry's term by index. This method is deprecated, you should use {@link #getEntry(long)} to get the log id's term.\n * @deprecated\n */\n @Deprecated\n long getTerm(final long index);\n\n /**\n * Append entries to log.\n */\n boolean appendEntry(final LogEntry entry);\n\n /**\n * Append entries to log, return append success number.\n */\n int appendEntries(final List<LogEntry> entries);\n\n /**\n * Delete logs from storage's head, [first_log_index, first_index_kept) will\n * be discarded.\n */\n boolean truncatePrefix(final long firstIndexKept);\n\n /**\n * Delete uncommitted logs from storage's tail, (last_index_kept, last_log_index]\n * will be discarded.\n */\n boolean truncateSuffix(final long lastIndexKept);\n\n /**\n * Drop all the existing logs and reset next log index to |next_log_index|.\n * This function is called after installing snapshot from leader.\n */\n boolean reset(final long nextLogIndex);\n\n\n boolean init();\n}",
"public synchronized Map<String, Long> getHistory() {\r\n return settings.getMap(HISTORY_SETTING);\r\n }",
"@Override\n public Class<SpeedAlertsHistoryRecord> getRecordType() {\n return SpeedAlertsHistoryRecord.class;\n }",
"public interface EventRepository\n{\n Event getEventToReplay(ObjectId recordingId, int offset);\n\n long countByRecordingId(ObjectId recordingId);\n\n void save(List<Event> lineEvents);\n\n long getAdded();\n}",
"public int getHistoryCount() {\n String countQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(countQuery, null);\n int count = cursor.getCount();\n cursor.close();\n\n // return count\n return count;\n }",
"public String getHistory () {\r\n\t\treturn history;\r\n\t}",
"public String getHistory () {\r\n\t\treturn history;\r\n\t}",
"public void addData(AggregateRecord record) {\n this.data.add(record);\n }",
"@Subscribe\n public void receiveHistory(AccountHistoryResponse accountHistoryResponse) {\n accountHistory = accountHistoryResponse.getHistory();\n RxBus.get().post(new WalletHistoryUpdate());\n }",
"@Override\n public void append( LogEvent event ) {\n long eventTimestamp;\n if (event instanceof AbstractLoggingEvent) {\n eventTimestamp = ((AbstractLoggingEvent) event).getTimestamp();\n } else {\n eventTimestamp = System.currentTimeMillis();\n }\n LogEventRequest packedEvent = new LogEventRequest(Thread.currentThread().getName(), // Remember which thread this event belongs to\n event, eventTimestamp); // Remember the event time\n\n if (event instanceof AbstractLoggingEvent) {\n AbstractLoggingEvent dbLoggingEvent = (AbstractLoggingEvent) event;\n switch (dbLoggingEvent.getEventType()) {\n\n case START_TEST_CASE: {\n\n // on Test Executor side we block until the test case start is committed in the DB\n waitForEventToBeExecuted(packedEvent, dbLoggingEvent, true);\n\n // remember the test case id, which we will later pass to ATS agent\n testCaseState.setTestcaseId(eventProcessor.getTestCaseId());\n\n // clear last testcase id\n testCaseState.clearLastExecutedTestcaseId();\n\n //this event has already been through the queue\n return;\n }\n case END_TEST_CASE: {\n\n // on Test Executor side we block until the test case start is committed in the DB\n waitForEventToBeExecuted(packedEvent, dbLoggingEvent, true);\n\n // remember the last executed test case id\n testCaseState.setLastExecutedTestcaseId(testCaseState.getTestcaseId());\n\n // clear test case id\n testCaseState.clearTestcaseId();\n // this event has already been through the queue\n return;\n }\n case GET_CURRENT_TEST_CASE_STATE: {\n // get current test case id which will be passed to ATS agent\n ((GetCurrentTestCaseEvent) event).setTestCaseState(testCaseState);\n\n //this event should not go through the queue\n return;\n }\n case START_RUN:\n\n /* We synchronize the run start:\n * Here we make sure we are able to connect to the log DB.\n * We also check the integrity of the DB schema.\n * If we fail here, it does not make sense to run tests at all\n */\n atsConsoleLogger.info(\"Waiting for \"\n + event.getClass().getSimpleName()\n + \" event completion\");\n\n /** disable root logger's logging in order to prevent deadlock **/\n Level level = LogManager.getRootLogger().getLevel();\n Configurator.setRootLevel(Level.OFF);\n\n AtsConsoleLogger.setLevel(level);\n\n // create the queue logging thread and the DbEventRequestProcessor\n if (queueLogger == null) {\n initializeDbLogging(null);\n }\n\n waitForEventToBeExecuted(packedEvent, dbLoggingEvent, false);\n //this event has already been through the queue\n\n /*Revert Logger's level*/\n Configurator.setRootLevel(level);\n AtsConsoleLogger.setLevel(level);\n\n return;\n case END_RUN: {\n /* We synchronize the run end.\n * This way if there are remaining log events in the Test Executor's queue,\n * the JVM will not be shutdown prior to committing all events in the DB, as\n * the END_RUN event is the last one in the queue\n */\n atsConsoleLogger.info(\"Waiting for \"\n + event.getClass().getSimpleName()\n + \" event completion\");\n\n /** disable root logger's logging in order to prevent deadlock **/\n level = LogManager.getRootLogger().getLevel();\n Configurator.setRootLevel(Level.OFF);\n\n AtsConsoleLogger.setLevel(level);\n\n waitForEventToBeExecuted(packedEvent, dbLoggingEvent, true);\n\n /*Revert Logger's level*/\n Configurator.setRootLevel(level);\n AtsConsoleLogger.setLevel(level);\n\n //this event has already been through the queue\n return;\n }\n case DELETE_TEST_CASE: {\n // tell the thread on the other side of the queue, that this test case is to be deleted\n // on first chance\n eventProcessor.requestTestcaseDeletion( ((DeleteTestCaseEvent) dbLoggingEvent).getTestCaseId());\n // this event is not going through the queue\n return;\n }\n default:\n // do nothing about this event\n break;\n }\n }\n\n passEventToLoggerQueue(packedEvent);\n }",
"public FileHistory getFileHistory() {\n\t\treturn theFileHistory;\n\t}",
"public void startLog()\n\t{\n\t\tint lastRow = m_records.size() - 1;\n\t\tif(lastRow >= 0)\n\t\t{\n\t\t\tm_records.clear();\n\t\t\tfireTableRowsDeleted(0, lastRow);\n\t\t}\n\t}",
"public List<DataGroupInfoActiveHistoryRecord> getActiveHistoryList()\n {\n return myActiveSetConfig.getActivityHistory();\n }",
"public String history(){\n return this.inventoryHistory.toString();\n }",
"@Override\n\tpublic void writeToParcel(Parcel dest, int flags) {\n\t\tdest.writeInt(history.size());\n\n\t\t// Save each chat message\n\t\tfor (ChatMessage cm : history) {\n\t\t\tdest.writeInt(cm.getIdx());\n\t\t\tdest.writeString(cm.getUser().toString());\n\t\t\tdest.writeString(cm.getMessage().toString());\n\t\t\tdest.writeLong(cm.getTimestamp());\n\t\t}\n\t}",
"int insert(TbSnapshot record);",
"public String getHistory () {\n\t\treturn history;\n\t}",
"private void logCacheStatus() {\n if (!LOGGER.canLogAtLevel(LogLevel.VERBOSE)) {\n return;\n }\n\n final int size = cache.size();\n final int length = cache.getTotalLength();\n\n LOGGER.atVerbose()\n .addKeyValue(SIZE_KEY, size)\n .addKeyValue(TOTAL_LENGTH_KEY, length)\n .log(\"Cache entry added or updated. Total number of entries: {}; Total schema length: {}\",\n size, length);\n }",
"private void addSnapshot(MetricsRecordBuilder builder, String name, String desc,\n Snapshot snapshot) {\n builder.addGauge(Interns.info(name + \"_mean\", desc), convertDuration(snapshot.getMean()));\n builder.addGauge(Interns.info(name + \"_min\", desc), convertDuration(snapshot.getMin()));\n builder.addGauge(Interns.info(name + \"_max\", desc), convertDuration(snapshot.getMax()));\n builder.addGauge(Interns.info(name + \"_median\", desc), convertDuration(snapshot.getMedian()));\n builder.addGauge(Interns.info(name + \"_stddev\", desc), convertDuration(snapshot.getStdDev()));\n\n builder.addGauge(Interns.info(name + \"_75thpercentile\", desc),\n convertDuration(snapshot.get75thPercentile()));\n builder.addGauge(Interns.info(name + \"_95thpercentile\", desc),\n convertDuration(snapshot.get95thPercentile()));\n builder.addGauge(Interns.info(name + \"_98thpercentile\", desc),\n convertDuration(snapshot.get98thPercentile()));\n builder.addGauge(Interns.info(name + \"_99thpercentile\", desc),\n convertDuration(snapshot.get99thPercentile()));\n builder.addGauge(Interns.info(name + \"_999thpercentile\", desc),\n convertDuration(snapshot.get999thPercentile()));\n }",
"public void loadHistory(SyncedList<MSensor> history) {\n this.history = history;\n }",
"public void logDeviceEnterpriseInfo() {\n Callback<OwnedState> callback = (result) -> {\n recordManagementHistograms(result);\n };\n\n getDeviceEnterpriseInfo(callback);\n }",
"public int getCurrentRecordCount() {\n return mStoredRecordCount;\n }",
"@Override\n public void add(Event event) {\n persist(event);\n }",
"public void addGPSCoordinateToHistory(GPSCoordinate coordinate){\r\n if(coordinateHistory.size() == MAX_SIZE){\r\n ArrayList<GPSCoordinate> temp = new ArrayList();\r\n for(int i = 1; i < coordinateHistory.size(); i++){\r\n temp.add(coordinateHistory.get(i));\r\n }\r\n temp.add(coordinate);\r\n coordinateHistory = temp;\r\n \r\n if(DEBUG_PRINT){\r\n for(GPSCoordinate p: coordinateHistory){\r\n System.out.println(\"****************\");\r\n System.out.println(p);\r\n }\r\n }\r\n }else{\r\n coordinateHistory.add(coordinate);\r\n }\r\n }",
"public float[] getByteHistory() {\n return byteMonitor.getHistory();\n }",
"@Test\n public void listAppHistoryTest() throws ApiException {\n Boolean naked = null;\n String appId = null;\n String status = null;\n String created = null;\n Long limit = null;\n Long offset = null;\n // HistoryEvent response = api.listAppHistory(naked, appId, status, created, limit, offset);\n\n // TODO: test validations\n }",
"@Override\n protected void append(LoggingEvent event) {\n if (event.getMessage() instanceof WrsAccessLogEvent) {\n WrsAccessLogEvent wrsLogEvent = (WrsAccessLogEvent) event.getMessage();\n\n try {\n HttpServletRequest request = wrsLogEvent.getRequest();\n if (request != null) {\n String pageHash = ((String)MDC.get(RequestLifeCycleFilter.MDC_KEY_BCD_PAGEHASH));\n String requestHash = ((String)MDC.get(RequestLifeCycleFilter.MDC_KEY_BCD_REQUESTHASH));\n String sessionId = ((String)MDC.get(RequestLifeCycleFilter.MDC_KEY_SESSION_ID));\n String requestUrl = request.getRequestURL().toString();\n String reqQuery = request.getQueryString();\n requestUrl += (reqQuery != null ? \"?\" + reqQuery : \"\");\n if (requestUrl.length()> 2000)\n requestUrl = requestUrl.substring(0, 2000);\n String bindingSetName = wrsLogEvent.getBindingSetName();\n if (bindingSetName != null && bindingSetName.length()> 255)\n bindingSetName = bindingSetName.substring(0, 255);\n String requestXML = wrsLogEvent.getRequestDoc()!=null ? Utils.serializeElement(wrsLogEvent.getRequestDoc()) : null;\n\n // log access\n if(AccessSqlLogger.getInstance().isEnabled()) {\n final AccessSqlLogger.LogRecord recordAccess = new AccessSqlLogger.LogRecord(\n sessionId\n , requestUrl\n , pageHash\n , requestHash\n , bindingSetName\n , requestXML\n , wrsLogEvent.getRowCount()\n , wrsLogEvent.getValueCount()\n , wrsLogEvent.getRsStartTime()\n , wrsLogEvent.getRsEndTime()\n , wrsLogEvent.getWriteDuration()\n , wrsLogEvent.getExecuteDuration()\n );\n AccessSqlLogger.getInstance().process(recordAccess);\n }\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }\n }",
"public PurchaseHistory() {\n this.purchaseHistory = new HashMap<>();\n }",
"abstract protected void _log(Snapshot snapshot) throws Exception;",
"private boolean dataToHistory(DataEntry oldEntry) {\n\t\tif (oldEntry != null) {\n\t\t\tif (bufferIndex < MAX_HISTORY_ENTRIES) {\n\t\t\t\toldEntries[bufferIndex++] = new HistoryEntry(oldEntry.getProductId(), oldEntry);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public void saveManyHistory() {\n Map<String, String> status = new HashMap<>();\n String userID = \"15\";\n List<User> allUsers = dumpDao.getAllUsers();\n Random random = new Random();\n for (int x = 0; x < 1000; x++) {\n System.out.println(\"Loop Counter : \" + x);\n userID = allUsers.get(random.nextInt(allUsers.size() - 1)).getId().toString();\n int numberOfHistory = random.nextInt(20);\n for (int y = 0; y < numberOfHistory + 1; y++) {\n System.out.println(\"\\nHistory Save\\n\");\n History history = new History();\n history.setUserId(userID);//will be set from service.\n history.setDate(DateUtil.getDate().toString());\n history.setLocation(DumpData.getLocation());\n history.setPatientDescription(DumpData.getPatientDescription());\n history.setRefferedBy(DumpData.getRefferedBy());\n history.setNote(DumpData.getNote());\n history.setUserId(userID);\n dao_history_i.save(history);\n System.out.println(history.getId());\n }//for\n }\n// bug : data are not being save\n// for (int x = 0; x < 100; x++) {\n// System.out.println(\"\\nHistory Save\\n\");\n// History history = new History();\n// history.setUserId(userID);//will be set from service.\n// history.setDate(DateUtil.getDate().toString());\n// history.setLocation(DumpData.getLocation());\n// history.setPatientDescription(DumpData.getPatientDescription());\n// history.setRefferedBy(DumpData.getRefferedBy());\n// history.setNote(DumpData.getNote());\n// history.setUserId(userID);\n// entityManager.persist(history);\n// System.out.println(history.getId());\n// }\n\n// bug : data are not being save\n// History history = new History();\n// history.setUserId(userID);//will be set from service.\n// history.setDate(DateUtil.getDate().toString());\n// history.setLocation(DumpData.getLocation());\n// history.setPatientDescription(DumpData.getPatientDescription());\n// history.setRefferedBy(DumpData.getRefferedBy());\n// history.setNote(DumpData.getNote());\n// history.setUserId(userID);\n// entityManager.persist(history);\n// System.out.println(history.getId());\n //working, insertion of history, just for one.\n// for (int x = 0; x < 10; x++) {\n// System.out.println(\"\\nHistory Save\\n\");\n// History history = new History();\n// history.setUserId(userID);//will be set from service.\n// history.setDate(DateUtil.getDate().toString());\n// history.setLocation(DumpData.getLocation());\n// history.setPatientDescription(DumpData.getPatientDescription());\n// history.setRefferedBy(DumpData.getRefferedBy());\n// history.setNote(DumpData.getNote());\n// history.setUserId(userID);\n// dao_history_i.save(history);\n// System.out.println(history.getId());\n// }//for\n }",
"public ExternalRequestHistoryRecord() {\n super(ExternalRequestHistory.EXTERNAL_REQUEST_HISTORY);\n }",
"@Transactional\n public History save(History history) {\n return historyRepository.save(history);\n }",
"public History() {\n\tthis.timestampMinute = new Date();\n\tthis.status = false;\n\n }",
"public com.sybase.collections.GenericList<com.sybase.persistence.LogRecord> getLogRecords()\n {\n return ru.terralink.mvideo.sap.LogRecordImpl.findByEntity(\"Orders\", keyToString());\n }",
"@Test\n public void testKeepsNoMoreThanMaxHistoryItems() throws Exception {\n for (int i = 0; i < ((MAX_NUMBER_STATUS_EVENTS_TO_RETAIN) + 20); i++) {\n writer.saveHistoryItem(TaskHistoryWriterTest.TASK_STATUS, ((TaskHistoryWriterTest.TIMESTAMP) + i));\n Thread.sleep(50);// just to allow other stuff a chance to run in the background\n\n }\n // Should converge to 30 items\n List<TaskStatusEvent> events = Polling.await(1, TimeUnit.MINUTES, new Callable<List<TaskStatusEvent>>() {\n @Override\n public List<TaskStatusEvent> call() throws Exception {\n if (!(writer.isEmpty())) {\n return null;\n }\n final List<TaskStatusEvent> events = masterModel.getJobHistory(TaskHistoryWriterTest.JOB_ID);\n if ((events.size()) == (TaskHistoryWriter.MAX_NUMBER_STATUS_EVENTS_TO_RETAIN)) {\n return events;\n }\n return null;\n }\n });\n Assert.assertEquals((((TaskHistoryWriterTest.TIMESTAMP) + (MAX_NUMBER_STATUS_EVENTS_TO_RETAIN)) + 19), Iterables.getLast(events).getTimestamp());\n Assert.assertEquals(((TaskHistoryWriterTest.TIMESTAMP) + 20), Iterables.get(events, 0).getTimestamp());\n }",
"public int logs()\n {\n return m_Log.size();\n }",
"private static void createHistoryEntry(int docId, String username, String eventType) {\r\n History history = new History();\r\n history.setDocId(docId);\r\n history.setDate(DateBean.toCompactString());\r\n history.setUsername(username);\r\n history.setEvent(eventType);\r\n HistoryDAO historyDao = (HistoryDAO) Context.getInstance().getBean(HistoryDAO.class);\r\n historyDao.store(history);\r\n }",
"private void logAllMessages() {\r\n HistoricalMessage message;\r\n SessionProvider provider = SessionProvider.createSystemProvider();\r\n while (!logQueue.isEmpty()) {\r\n message = logQueue.poll();\r\n if (message != null) {\r\n this.addHistoricalMessage(message, provider);\r\n }\r\n }\r\n provider.close();\r\n }",
"public StringBuilder getHistory() {\r\n\t\treturn history;\r\n\t}",
"TrackerHistory loadTrackerHistory(final Integer id);",
"@RequiresApi(api = Build.VERSION_CODES.N)\n public long AddRecord(SHUBORecord EventRecord) {\n return model.AddRecord(EventRecord);\n }",
"private void readHistoricalData() {\n /*\n r4 = this;\n r1 = r4.mInstanceLock;\n monitor-enter(r1);\n r0 = r4.mCanReadHistoricalData;\t Catch:{ all -> 0x0028 }\n if (r0 == 0) goto L_0x000b;\n L_0x0007:\n r0 = r4.mHistoricalRecordsChanged;\t Catch:{ all -> 0x0028 }\n if (r0 != 0) goto L_0x000d;\n L_0x000b:\n monitor-exit(r1);\t Catch:{ all -> 0x0028 }\n L_0x000c:\n return;\n L_0x000d:\n r0 = 0;\n r4.mCanReadHistoricalData = r0;\t Catch:{ all -> 0x0028 }\n r0 = 1;\n r4.mReadShareHistoryCalled = r0;\t Catch:{ all -> 0x0028 }\n r0 = r4.mHistoryFileName;\t Catch:{ all -> 0x0028 }\n r0 = android.text.TextUtils.isEmpty(r0);\t Catch:{ all -> 0x0028 }\n if (r0 != 0) goto L_0x0026;\n L_0x001b:\n r0 = SERIAL_EXECUTOR;\t Catch:{ all -> 0x0028 }\n r2 = new com.actionbarsherlock.widget.ActivityChooserModel$HistoryLoader;\t Catch:{ all -> 0x0028 }\n r3 = 0;\n r2.<init>();\t Catch:{ all -> 0x0028 }\n r0.execute(r2);\t Catch:{ all -> 0x0028 }\n L_0x0026:\n monitor-exit(r1);\t Catch:{ all -> 0x0028 }\n goto L_0x000c;\n L_0x0028:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x0028 }\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.actionbarsherlock.widget.ActivityChooserModel.readHistoricalData():void\");\n }",
"@Test\n public void testNewJobHistoryProcessing()\n {\n Job job = jobFakery.makeFakeJob();\n JobHistory newJobHistory = jobHistoryTx.newJobHistoryProcessing(job, START_TIME);\n\n verify(mockJobHistoryDAO).persist(newJobHistory);\n assertEquals(newJobHistory.getStatus(), JobStatus.PROCESSING);\n assertNull(newJobHistory.getEndTime());\n }",
"public void saveMetadata(IoStatisticsHolder statHolder) throws IgniteCheckedException {\n long nextPageId = metaPageId;\n\n assert nextPageId != 0;\n\n flushBucketsCache(statHolder);\n\n if (!changed)\n return;\n\n // This guaranteed that any concurrently changes of list will be detected.\n changed = false;\n\n try {\n long unusedPageId = writeFreeList(nextPageId);\n\n markUnusedPagesDirty(unusedPageId);\n }\n catch (Throwable e) {\n changed = true; // Return changed flag due to exception.\n\n throw e;\n }\n }",
"public int getExchangeHistoryListCount() {\n return exchangeHistoryList_.size();\n }",
"Snapshot refresh();",
"@Override\n public void onPurchaseHistoryRestored() {\n }",
"public void processStartedEvent(HttpArtifactCacheEvent.Started event) {\n if (event.getOperation() != ArtifactCacheEvent.Operation.STORE) {\n return;\n }\n\n ongoingCount.incrementAndGet();\n }",
"@Override\r\n\tpublic Record getNextSnapShotRecord() {\n\t\tif (iterSnapshot == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tif (iterSnapshot.hasNext())\r\n\t\t\treturn iterSnapshot.next();\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}",
"public ArrayList<Integer> getPointsHistory() {\n return pointsHistory;\n }",
"public void logToConsole(){\n logger.trace(\"Records total: \" + employees.size());\n }",
"int insert(EventsWaitsSummaryByInstance record);",
"public void addMedicalHistory(MedicalHistory medicalHistory){}",
"int insert(BpmInstanciaHistorica record);",
"@Override\n public void handleSnapshot(FarmUtilDomain.PublishUtilState snapshot) {\n \n }",
"Event persist(String origin, String aggregateId, String type, String payload);",
"public List<GlucoseData> getCompleteHistory() {\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n // Adding to list\n history.add(glucosedata);\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }",
"@Override\n public Class<SearchLogsRecord> getRecordType() {\n return SearchLogsRecord.class;\n }",
"private List<Multiset.Entry<E>> snapshot() {\n\t\t\tList<Multiset.Entry<E>> list = Lists\n\t\t\t\t\t.newArrayListWithExpectedSize(size());\n\t\t\tfor (Multiset.Entry<E> entry : this) {\n\t\t\t\tlist.add(entry);\n\t\t\t}\n\t\t\treturn list;\n\t\t}"
] |
[
"0.61931044",
"0.5949002",
"0.59476775",
"0.5943062",
"0.5898352",
"0.58400786",
"0.5725064",
"0.5716961",
"0.5649224",
"0.56356007",
"0.56010556",
"0.55263025",
"0.5514896",
"0.5509808",
"0.5492963",
"0.5492434",
"0.5439115",
"0.5419929",
"0.5412437",
"0.53948087",
"0.5394531",
"0.53694075",
"0.53602195",
"0.5357806",
"0.53096104",
"0.5308375",
"0.5256083",
"0.5244168",
"0.52152795",
"0.5207463",
"0.51962316",
"0.51722103",
"0.5146801",
"0.5125995",
"0.51128846",
"0.51084477",
"0.51046395",
"0.5098122",
"0.50303996",
"0.5001004",
"0.4995783",
"0.4990255",
"0.49882254",
"0.4986275",
"0.49757352",
"0.49520135",
"0.49520135",
"0.49485266",
"0.4946026",
"0.49404386",
"0.49341616",
"0.4926257",
"0.49227336",
"0.49009028",
"0.48944178",
"0.48937666",
"0.48933005",
"0.48885176",
"0.48878068",
"0.4883583",
"0.48668814",
"0.48647508",
"0.48615593",
"0.48512733",
"0.4836887",
"0.48295915",
"0.4827489",
"0.4826865",
"0.48245522",
"0.482429",
"0.4801023",
"0.47964165",
"0.47954363",
"0.4795247",
"0.47916695",
"0.47831285",
"0.47819507",
"0.47774374",
"0.477708",
"0.47755653",
"0.47704753",
"0.47675982",
"0.47666523",
"0.47496626",
"0.47450787",
"0.47427675",
"0.4730547",
"0.4720815",
"0.47139472",
"0.47108486",
"0.47102872",
"0.47098866",
"0.47050887",
"0.4705077",
"0.46915764",
"0.4690896",
"0.46839646",
"0.46830198",
"0.4677656",
"0.46705088"
] |
0.70389736
|
0
|
Represents a model of a single document. Provides useful methods for retrieving information about the current state of a document.
|
public interface SingleDocumentModel {
/**
* Returns {@link JTextArea} component used by {@code this} document.
*
* @return {@link JTextArea} component used by {@code this} document
*/
JTextArea getTextComponent();
/**
* Returns path of this document. If document was not saved yet returned
* path is {@code null}.
*
* @return path of this document. If document was not saved yet returned
* path is {@code null}
*/
Path getFilePath();
/**
* Sets the path of {@code this} document to the given one. Given path
* cannot be {@code null}.
*
* @param path
* new path of {@code this} document
* @throws NullPointerException if the given path is {@code null}
*/
void setFilePath(Path path);
/**
* Returns {@code true} is this document was modified after last saving.
*
* @return {@code true} is this document was modified after last saving
*/
boolean isModified();
/**
* Sets modification status of this document to the given one.
*
* @param modified
* new modification status of {@code this} document
*/
void setModified(boolean modified);
/**
* Adds listener to {@code this} document intern collection.
*
* @param l
* listener to be added
* @throws NullPointerException if the given listener is {@code null}
*/
void addSingleDocumentListener(SingleDocumentListener l);
/**
* Removes given listener from {@code this} document.
*
* @param l
* listener to be removed
*/
void removeSingleDocumentListener(SingleDocumentListener l);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"SingleDocumentModel getCurrentDocument();",
"public Document getModel(){\n return getDocument();\n }",
"public Document getDocument() {\n return document;\n }",
"public Document getDocument() {\n return document;\n }",
"public Document getDocument() {\n return document;\n }",
"public Document getDocument() {\n return _document;\n }",
"public Document getDocument() {\n return this.document;\n }",
"public Document getDocument() {\n return doc;\n }",
"SingleDocumentModel loadDocument(Path path);",
"protected Document createDefaultModel() {\n return new PlainDocument();\n }",
"public Document getDocument() {\r\n\t\treturn document;\r\n\t}",
"public Document getDocument()\n\t{\n\t\treturn document;\n\t}",
"public Document getDocument() {\n\t\treturn document;\n\t}",
"public Document getDocument() {\n\t\treturn document;\n\t}",
"public Document getDocument()\n\t{\n\t\treturn this.document;\n\t}",
"public OpenDefinitionsDocument getDocument() { return _document; }",
"SingleDocumentModel getDocument(int index);",
"public Document getDocument() {\n\t\treturn doc;\n\t}",
"public Map<String, Object> getDocument() {\n return document;\n }",
"Documentable createDocumentable();",
"public Document getDocument() {\r\n return mDocument;\r\n }",
"public Document getDocument()\n {\n return m_Document;\n }",
"public String getDocument() {\n\t\treturn document;\n\t}",
"DocumentModel readDocumentModel( File documentDescriptor )\n throws DocumentRendererException, IOException;",
"@Override\r\n public Class<Doc> getEntityType() {\n return Doc.class;\r\n }",
"public interface IModelDocumentProvider {\r\n\t/** \r\n\t * Locate an existing document or load it. Listen for future changes\r\n\t * to the document and to the file. \r\n\t * @param file full pathed file\r\n\t * @return IDocument instance; return null only if the file does not exist. \r\n\t */\r\n\tIDocument getDocument(File file);\r\n}",
"@DISPID(-2147417094)\n @PropGet\n com4j.Com4jObject document();",
"@Override\r\n\tpublic Book getModel() {\n\t\treturn book;\r\n\t}",
"public Document getDocument() {\r\n\t\treturn mDocument;\r\n\t}",
"public Document getDocument() {\n\t\treturn this.doc;\n\t}",
"public CouchDoc() {\n super();\n docType = getClass().getSimpleName();\n }",
"protected Document createDefaultModel()\n\t{\n\t\treturn new IntegerDocument();\n\t}",
"@java.lang.Override\n public trinsic.services.common.v1.CommonOuterClass.JsonPayload getDocument() {\n return document_ == null ? trinsic.services.common.v1.CommonOuterClass.JsonPayload.getDefaultInstance() : document_;\n }",
"@java.lang.Override\n public trinsic.services.common.v1.CommonOuterClass.JsonPayload getDocument() {\n return document_ == null ? trinsic.services.common.v1.CommonOuterClass.JsonPayload.getDefaultInstance() : document_;\n }",
"@java.lang.Override\n public trinsic.services.common.v1.CommonOuterClass.JsonPayload getDocument() {\n return document_ == null ? trinsic.services.common.v1.CommonOuterClass.JsonPayload.getDefaultInstance() : document_;\n }",
"public Model getModel () { return _model; }",
"public interface IDocument {\n /**\n * Returns the content of the document, in a byte array.\n */\n byte[] getByteContent() throws IOException;\n /**\n * Returns the content of the document, in a char array.\n */\n char[] getCharContent() throws IOException;\n /**\n * returns the name of the document (e.g. its path for a <code>File</code>, or its relative path\n * in the workbench for an <code>IFile</code>).\n */\n String getName();\n /**\n * returns the value of the given property, or null if this document does not have\n * such a property.\n */\n String getProperty(String property);\n /**\n * Returns an enumeration of the names of the properties the document has.\n */\n java.util.Enumeration getPropertyNames();\n /**\n * Returns the content of the document, as a String.\n */\n public String getStringContent() throws IOException;\n /**\n * Returns the type of the document.\n */\n String getType();\n /**\n * Sets the given property of the document to the given value.\n */\n void setProperty(String attribute, String value); }",
"public interface MultipleDocumentModel extends Iterable<SingleDocumentModel> {\r\n\t/**\r\n\t * Creates new document\r\n\t * \r\n\t * @return new document\r\n\t */\r\n\tSingleDocumentModel createNewDocument();\r\n\r\n\t/**\r\n\t * Returns currently selected document\r\n\t * \r\n\t * @return currently selected document\r\n\t */\r\n\tSingleDocumentModel getCurrentDocument();\r\n\r\n\t/**\r\n\t * Loads document from given path\r\n\t * \r\n\t * @param path from which file is loaded\r\n\t * @return new Single document model\r\n\t * @throws NullPointerException if path is null\r\n\t */\r\n\tSingleDocumentModel loadDocument(Path path);\r\n\r\n\t/**\r\n\t * Saves document to disc. If given path isn't null, path of document is changed\r\n\t * to it after saving. Otherwise saves to original path\r\n\t * \r\n\t * @param model that is saved\r\n\t * @param newPath path to which is saved, if null saved to origin\r\n\t */\r\n\tvoid saveDocument(SingleDocumentModel model, Path newPath);\r\n\r\n\t/**\r\n\t * Closes selected single document model\r\n\t * \r\n\t * @param model that is closed\r\n\t */\r\n\tvoid closeDocument(SingleDocumentModel model);\r\n\r\n\t/**\r\n\t * Adds listener to this model\r\n\t * \r\n\t * @param l that is added\r\n\t */\r\n\tvoid addMultipleDocumentListener(MultipleDocumentListener l);\r\n\r\n\t/**\r\n\t * Removes document listener from this model\r\n\t * \r\n\t * @param l listener to be removed\r\n\t */\r\n\tvoid removeMultipleDocumentListener(MultipleDocumentListener l);\r\n\r\n\t/**\r\n\t * Returns number of stored documents\r\n\t * \r\n\t * @return num of documents\r\n\t */\r\n\tint getNumberOfDocuments();\r\n\r\n\t/**\r\n\t * Returns document at given index\r\n\t * @param index of document\r\n\t * @return\r\n\t */\r\n\tSingleDocumentModel getDocument(int index);\r\n}",
"public interface SingleDocumentListener {\n\n\t/**\n\t * Method that notifies the model when the single document model has been\n\t * modified.\n\t * \n\t * @param model\n\t * Currently opened document model.\n\t */\n\tvoid documentModifyStatusUpdated(SingleDocumentModel model);\n\n\t/**\n\t * Method that notifies the model when the single document model has its\n\t * location on the disk changed.\n\t * \n\t * @param model\n\t * Currently opened document model.\n\t */\n\tvoid documentFilePathUpdated(SingleDocumentModel model);\n}",
"ModelData getModel();",
"public String getDocumentInfo() {\n MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());\n return dt.getName() + \" \" + getDocumentNo();\n }",
"public ModelSnapshot getModel() {\n return model;\n }",
"public Document getDocument()\n {\n return field.getDocument();\n }",
"public RepriceDocEditModelBean getRepriceDocModel()\n\t{\n\t\treturn ModelsAccessPoint.read(getRepriceDocModelKey(),\n\t\t RepriceDocEditModelBean.class);\n\t}",
"public Document readDocument();",
"public VEXDocument getDocument() {\n\t\treturn this.doc;\n\t}",
"public DocumentTypeDTO getSelectedDocument() {\n\t\treturn selectedDocument;\n\t}",
"public Gedcomx getDocument() {\n return doc;\n }",
"trinsic.services.common.v1.CommonOuterClass.JsonPayload getDocument();",
"trinsic.services.common.v1.CommonOuterClass.JsonPayload getDocument();",
"trinsic.services.common.v1.CommonOuterClass.JsonPayload getDocument();",
"public DocumentType getDocumentType() {\n return documentType;\n }",
"public trinsic.services.common.v1.CommonOuterClass.JsonPayload getDocument() {\n if (documentBuilder_ == null) {\n return document_ == null ? trinsic.services.common.v1.CommonOuterClass.JsonPayload.getDefaultInstance() : document_;\n } else {\n return documentBuilder_.getMessage();\n }\n }",
"public trinsic.services.common.v1.CommonOuterClass.JsonPayload getDocument() {\n if (documentBuilder_ == null) {\n return document_ == null ? trinsic.services.common.v1.CommonOuterClass.JsonPayload.getDefaultInstance() : document_;\n } else {\n return documentBuilder_.getMessage();\n }\n }",
"public trinsic.services.common.v1.CommonOuterClass.JsonPayload getDocument() {\n if (documentBuilder_ == null) {\n return document_ == null ? trinsic.services.common.v1.CommonOuterClass.JsonPayload.getDefaultInstance() : document_;\n } else {\n return documentBuilder_.getMessage();\n }\n }",
"public boolean isDocument() {\n\n return this.document;\n }",
"@Override\r\n\tpublic String getDocumentInfo() {\n\t\treturn null;\r\n\t}",
"public String getDocumentType() {\n return this.documentType;\n }",
"com.google.firestore.v1beta1.Precondition getCurrentDocument();",
"public Object getModel();",
"public IndexableDocument() {\n\t\tthis.id=new ObjectId();\n\t}",
"public interface SingleDocumentListener {\n\t/**\n\t * Called when Modify flag of model is changed\n\t * @param model observed\n\t */\n\tvoid documentModifyStatusUpdated(SingleDocumentModel model);\n\n\t/**\n\t * Called when File path of model is changed\n\t * @param model observed\n\t */\n\tvoid documentFilePathUpdated(SingleDocumentModel model);\n}",
"public String getDocumentType();",
"@DISPID(4) //= 0x4. The runtime will prefer the VTID if present\r\n @VTID(11)\r\n visiotool.IVDocument document();",
"public String getDocument() {\n\t\treturn null;\r\n\t}",
"public String getDocumentNote();",
"public String getModel();",
"@Override\r\n\tpublic Dictionary getModel() {\n\t\treturn dictionary;\r\n\t}",
"com.google.firestore.v1beta1.PreconditionOrBuilder getCurrentDocumentOrBuilder();",
"public int getDocumentNumber() {\n return documentNumber;\n }",
"public String getDocumentType() {\n return documentType;\n }",
"void documentAdded(SingleDocumentModel model);",
"@Override\n public Document getMutableDocument() {\n return this;\n }",
"public static String getDoc() {\n return doc;\n }",
"public URL getDocument() {\r\n return this.document;\r\n }",
"@Override\n\tpublic DocumentView getDocument() {\n\t\treturn null;\n\t}",
"public Diadoc.Api.Proto.Recognition.RecognitionProtos.RecognizedDocumentType getDocumentType() {\n return documentType_;\n }",
"@Override\n\tpublic CalEntity getModel() {\n\t\treturn model;\n\t}",
"public ModelBean provideModel();",
"public interface DocumentDataModel extends Serializable {\n\n\t/**\n\t * Create's a view for this DocumentComponent that is suitable for\n\t * embedding directly in a frame. The view must create its own\n\t * menubar if it needs one. Standard menus that are usable as-is\n\t * are passed as parameters.\n\t *\n\t * @param selection The selection listener that keeps \"Edit\" menu updated\n\t * @param editListener The listener that keeps the Undo/Redo menu item\n\t * and undo history up to date.\n\t * @param menuKeys The listener that handles menu keys\n\t * @param fileMenu the standard file menu\n\t * @param editMenu the standard edit menu\n\t * @return the view\n\t */\n\tComponent createRootGUI(AppMain app, Frame f,\n\t\t\tSelectionListener selection, UndoableEditListener editListener,\n\t\t\tKeyListener menuKeys, JMenu fileMenu, JMenu editMenu);\n\n}",
"Model getModel();",
"Model getModel();",
"Model getModel();",
"public Diadoc.Api.Proto.Recognition.RecognitionProtos.RecognizedDocumentType getDocumentType() {\n return documentType_;\n }",
"public Document() {\n }",
"public Model getCurrentModel() {\n return currentModel;\n }",
"public java.lang.Integer getDocumentNumber() {\n return documentNumber;\n }",
"java.lang.String getModel();",
"public DataModel getModel() {\n return model;\n }",
"public java.lang.String getDocumentType() {\n return documentType;\n }",
"public java.lang.String getDocumentType() {\n return documentType;\n }",
"@Override\r\n\tpublic T getModel() {\n\t\treturn model;\r\n\t}",
"@java.lang.Override\n public trinsic.services.common.v1.CommonOuterClass.JsonPayloadOrBuilder getDocumentOrBuilder() {\n return getDocument();\n }",
"@java.lang.Override\n public trinsic.services.common.v1.CommonOuterClass.JsonPayloadOrBuilder getDocumentOrBuilder() {\n return getDocument();\n }",
"@java.lang.Override\n public trinsic.services.common.v1.CommonOuterClass.JsonPayloadOrBuilder getDocumentOrBuilder() {\n return getDocument();\n }",
"@JsonProperty(\"document_id\")\n @ApiModelProperty(value = \"The unique identifier of the document\")\n public String getDocumentId() {\n return documentId;\n }",
"public String getDocumentId() {\n return this.documentId;\n }",
"@Override\n public boolean isDocumentState() {\n return true;\n }",
"@Override\r\n\tpublic Object getModel() {\n\t\treturn searchInfo;\r\n\t}",
"public Document obtainEditableInstance()\n throws WorkflowException, MappingException, RepositoryException, RemoteException;"
] |
[
"0.7674045",
"0.7203142",
"0.66517574",
"0.6626125",
"0.6626125",
"0.6613072",
"0.6565656",
"0.6542304",
"0.65365595",
"0.6521884",
"0.64840907",
"0.6482819",
"0.6446297",
"0.6446297",
"0.63338095",
"0.6332499",
"0.6331556",
"0.6297107",
"0.62824017",
"0.62812436",
"0.6278417",
"0.6247534",
"0.6243592",
"0.6198245",
"0.6186639",
"0.6173958",
"0.6130296",
"0.61278",
"0.6126378",
"0.611861",
"0.60969",
"0.6089466",
"0.606766",
"0.606766",
"0.606766",
"0.6060817",
"0.6026321",
"0.601778",
"0.60127366",
"0.60100996",
"0.60003513",
"0.59829354",
"0.59794",
"0.5960659",
"0.59408164",
"0.5917929",
"0.5860498",
"0.58467084",
"0.58347636",
"0.58347636",
"0.58347636",
"0.58182824",
"0.5809976",
"0.5809976",
"0.5809976",
"0.5809967",
"0.57916075",
"0.5790427",
"0.57763207",
"0.5768271",
"0.5752538",
"0.574965",
"0.5745128",
"0.57244986",
"0.5723743",
"0.57077354",
"0.57072115",
"0.57007766",
"0.5676374",
"0.5670824",
"0.5662518",
"0.56486714",
"0.5634846",
"0.56342214",
"0.56329757",
"0.5632572",
"0.56298536",
"0.56238407",
"0.56204885",
"0.561881",
"0.5618756",
"0.5618756",
"0.5618756",
"0.56111264",
"0.56056726",
"0.5605471",
"0.5603248",
"0.5597471",
"0.55948883",
"0.5593042",
"0.55818945",
"0.5580301",
"0.55745983",
"0.55745983",
"0.55745983",
"0.5552368",
"0.55479157",
"0.553758",
"0.55329424",
"0.5530373"
] |
0.70355046
|
2
|
TODO Autogenerated method stub
|
public static void main(String[] args) {
bonusDos();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
/IndexSpecification iSpec = new IndexSpecification(indexName); new IndexAdmin
|
public void createIndex(Configuration configuration){
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public SimpleIndexFactory() {\n\t}",
"IndexNameReference createIndexNameReference();",
"InstAssignIndex createInstAssignIndex();",
"@Ignore\n @Test\n public void testCreateIndex() {\n System.out.println(\"createIndex\");\n Util.commonServiceIPs=\"127.0.0.1\";\n \n EntityManager em=Util.getEntityManagerFactory(100).createEntityManager();\n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client client = ESUtil.getClient(em,platformEm,1,false);\n \n RuntimeContext.dataobjectTypes = Util.getDataobjectTypes();\n String indexName = \"test000000\";\n try {\n ESUtil.createIndex(platformEm, client, indexName, true);\n }\n catch(Exception e)\n {\n \n }\n \n\n }",
"public Indexer() {\n }",
"public Index initIndex(String indexName) {\n return new Index(this, indexName);\n }",
"indexSet createindexSet();",
"@Test\n public void testCreate() throws Exception {\n System.out.println(\"create\");\n Index entity = TestUtils.getTestIndex();\n IndexResponse result = instance.create(entity);\n assertNotNull(result);\n assertEquals(entity.getDatabaseName(), result.getIndex().getDatabaseName());\n assertEquals(entity.getName(), result.getIndex().getName());\n assertEquals(entity.getTableName(), result.getIndex().getTableName());\n assertEquals(entity.getFields(), result.getIndex().getFields());\n }",
"private Indexers()\r\n {\r\n // Private constructor to prevent instantiation\r\n }",
"public interface IIndexBuilder {\n\n public IIndex getIndex( Class<?> searchable ) throws BuilderException;\n\n public IFieldVisitor getFieldVisitor();\n\n public void setFieldVisitor( IFieldVisitor visitor );\n\n}",
"public generateIndex() {\n\n\t\tthis.analyzer = \"StandardAnalyzer\";\n\t}",
"boolean createIndex(String indexName);",
"public ProductIndexQuery() {\n\t}",
"@Ignore \n @Test\n public void testIndexDocument() {\n System.out.println(\"IndexDocument\");\n Client client = null;\n String indexName = \"\";\n String indexTypeName = \"\";\n String docId = \"\";\n Map<String, Object> jsonMap = null;\n long expResult = 0L;\n //long result = ESUtil.indexDocument(client, indexName, indexTypeName, docId, jsonMap);\n //assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"public static IndexExpression makeIndex(Expression instance, PropertyInfo indexer, Iterable<Expression> arguments) { throw Extensions.todo(); }",
"@Test\n public void testCreateIndexMapping() throws Exception {\n String json = EsJsonUtils.generateItemMapping();\n System.out.println(json);\n elasticSearchDao.createIndexMapping(TENANT_ID+Constants.INDEX_SPLIT+ Constants.ITEM,json);\n }",
"public void testCreIdx(){\r\n\t \r\n\t String dataDir = \"C:\\\\study\\\\Lucene\\\\Data\";\r\n\t String idxDir = \"C:\\\\study\\\\Lucene\\\\Index\";\r\n\t \r\n\t LuceneUtils.delAll(idxDir);\r\n\t \r\n\t CreateIndex ci = new CreateIndex();\r\n\t \r\n\t ci.Indexer(new File(idxDir), new File(dataDir));\r\n\t \r\n\t\t\r\n\t}",
"public void testIndexCosts() {\n this.classHandler.applyIndexes();\n }",
"public ATExpression base_indexExpression();",
"public void setIndexName(String indexName){\r\n\t\tthis.indexName=indexName;\r\n\t}",
"String createIndex() {\n\t\tboolean res = indexExists();\n\t\t@SuppressWarnings(\"unused\")\n\t\tint resCode;\n\t\tif (!res) {\n\t\t\tresCode = doHttpOperation(esIndexUrl, HTTP_PUT, null);\n\t\t}\n\t\treturn lastResponse;\n\t}",
"public H_index() {\n\t\tsuper();\n\t}",
"public IndexBuilderTest(String testName) {\n super(testName);\n }",
"private BrowseIndex() {\n }",
"public String getIndexName() {\n return indexName;\n }",
"public createIndex_result(createIndex_result other) {\n }",
"IndexCreated createIndex(String name, Index index) throws ElasticException;",
"public IndexBuilder(InvertedIndex index) {\n\t\tthis.index = index;\n\t}",
"@Override\n public void setupIndex() {\n List lst = DBClient.getList(\"SELECT a FROM AppMenu a WHERE a.moduleName='MyBranchMemberExt'\");\n if (lst!=null && !lst.isEmpty()) {\n return;\n }\n AppMenu.createAppMenuObj(\"MyBranchMemberExt\", \"Main\", \"Branch Member\", 110).save();\n AppMenu.createAppMenuObj(\"MyCenterMemberExt\", \"Main\", \"Center Member\", 120).save();\n AppMenu.createAppMenuObj(\"SearchAllMembersOnlyExt\", \"Main\", \"Search Member\", 130).save();\n AppMenu.createAppMenuObj(\"ReferenceForm\", \"Reference\", \"Reference\", 200).save();\n runUniqueIndex(8, \"firstName\", \"lastName\");\n }",
"public void beforeIndexCreated(Index index) {\n\n }",
"public interface Index {\n\t\n\tvoid index(AddOnInfoAndVersions infoAndVersions) throws Exception;\n\t\n\tCollection<AddOnInfoSummary> search(AddOnType type, String query) throws Exception;\n\t\n\tCollection<AddOnInfoAndVersions> getAllByType(AddOnType type) throws Exception;\n\t\n\tCollection<AddOnInfoAndVersions> getByTag(String tag) throws Exception;\n\t\n\tAddOnInfoAndVersions getByUid(String uid) throws Exception;\n}",
"LuceneMemoryIndex createLuceneMemoryIndex();",
"public interface IndexBuilder {\n\n /**\n * Rebuilds the index only when the existing index is not populated.\n */\n void rebuildIfNecessary();\n\n}",
"public IndexRecord()\n {\n }",
"public String index() {\r\n\t\treturn \"index\";\r\n\t}",
"public createIndex_args(createIndex_args other) {\n }",
"@Test\n public void testCreateIdxOnClient() {\n getDefaultCacheOnClient().query(new SqlFieldsQuery(((\"CREATE INDEX IDX_11 ON \" + (GridCacheDynamicLoadOnClientTest.FULL_TABLE_NAME)) + \" (name asc)\"))).getAll();\n }",
"public CreateIndexRequest prepareCreate(String index) {\n \treturn new CreateIndexRequest(hClient, index);\n }",
"void create(QueryCursor cursor, String indexName, String... templateProperties) throws SQLException;",
"public IndexBeans() {\r\n }",
"@Test\n public void testCreateIndexType() throws Exception {\n//TODO: Test goes here... \n }",
"@VTID(10)\n int getIndex();",
"public void start() throws Exception {\n\n createIndex();\n }",
"protected void setIndex(Expression expr)\n {\n index = expr;\n }",
"private void createIndex(Message<JsonObject> msg, int timeout, JsonObject headers, String dbName) {\n // check required params / attributes\n \n // REQUIRED: The name of the collection for which to create the index\n String collection = helper.getMandatoryString(msg.body(), MSG_PROPERTY_COLLECTION, msg);\n if (collection == null) return;\n\n // REQUIRED: A JSON representation of the index (see ArangoDB docs for details)\n JsonObject document = helper.getMandatoryObject(msg.body(), MSG_PROPERTY_DOCUMENT, msg);\n if (document == null) return;\n\n if (!ensureAttribute(document, DOC_ATTRIBUTE_TYPE, msg)) return;\n if (!document.getString(DOC_ATTRIBUTE_TYPE).equals(TYPE_CAP)) {\n if (!ensureAttribute(document, DOC_ATTRIBUTE_FIELDS, msg)) return;\n }\n\n // prepare PATH\n StringBuilder apiPath = new StringBuilder();\n if (dbName != null) apiPath.append(\"/_db/\").append(dbName);\n apiPath.append(API_PATH);\n apiPath.append(\"/?\").append(MSG_PROPERTY_COLLECTION).append(\"=\").append(collection);\n\n httpPost(persistor, apiPath.toString(), headers, document, timeout, msg);\n }",
"private void indexItem(IndexDocument indexDoc) {\n if(bDebug) System.out.println(\"\\n*** document to index - \" + indexDoc);\n Indexer indexer=null;\n try {\n indexer=new Indexer(PetstoreConstants.PETSTORE_INDEX_DIRECTORY, false);\n PetstoreUtil.getLogger().log(Level.FINE, \"Adding document to index: \" + indexDoc.toString());\n indexer.addDocument(indexDoc);\n } catch (Exception e) {\n PetstoreUtil.getLogger().log(Level.WARNING, \"index.exception\", e);\n e.printStackTrace();\n } finally {\n try {\n // must close file or will not be able to reindex\n if(indexer != null) {\n indexer.close();\n }\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n }",
"@Override\n\tpublic void build(Index index) {\n\t\tthis.indexdir = index.getPath();\n\t\tLuceneIndex luceneIndex = (LuceneIndex) index;\n\t\tthis.indexSearcher = new IndexSearcher(luceneIndex.getReader());\n\n\t}",
"@Override\n public void buildIndexes(Properties props)\n {\n Statement statement;\n try\n {\n statement = connection.createStatement();\n \n //Create Indexes\n statement.executeUpdate(\"CREATE INDEX CONFFRIENDSHIP_INVITEEID ON CONFFRIENDSHIP (INVITEEID)\");\n statement.executeUpdate(\"CREATE INDEX CONFFRIENDSHIP_INVITERID ON CONFFRIENDSHIP (INVITERID)\");\n statement.executeUpdate(\"CREATE INDEX PENDFRIENDSHIP_INVITEEID ON PENDFRIENDSHIP (INVITEEID)\");\n statement.executeUpdate(\"CREATE INDEX PENDFRIENDSHIP_INVITERID ON PENDFRIENDSHIP (INVITERID)\");\n statement.executeUpdate(\"CREATE INDEX MANIPULATION_RID ON MANIPULATION (RID)\");\n statement.executeUpdate(\"CREATE INDEX MANIPULATION_CREATORID ON MANIPULATION (CREATORID)\");\n statement.executeUpdate(\"CREATE INDEX RESOURCES_WALLUSERID ON RESOURCES (WALLUSERID)\");\n statement.executeUpdate(\"CREATE INDEX RESOURCE_CREATORID ON RESOURCES (CREATORID)\");\n \n System.out.println(\"Indexes Built\");\n }\n catch (Exception ex)\n {\n Logger.getLogger(WindowsAzureClientInit.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Error in building indexes!\");\n }\n }",
"public DIndexDescription() {\n super(COMMAND);\n }",
"public static void main(String[] args) throws Exception {\n\t\tqueryIndexPattern();\n\t\t\n\t}",
"@Test\n public void getIndex(){\n\n }",
"public\tString\ttoString()\n {\n // Do not put this under SanityManager.DEBUG - it is needed for\n // error reporting.\n return \"CREATE INDEX \" + indexName;\n }",
"public void createIndex() {\n String indexName = INDEX_BASE + \"-\" +\n LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyyMMddHHmmss\"));\n\n Settings settings = Settings.builder()\n .put(\"number_of_shards\", 1)\n .put(\"number_of_replicas\", 0)\n .build();\n CreateIndexRequest request = new CreateIndexRequest(indexName, settings);\n\n String mapping = \"{\\n\" +\n \" \\\"article\\\": {\\n\" +\n \" \\\"properties\\\": {\\n\" +\n \" \\\"title\\\": {\\n\" +\n \" \\\"type\\\": \\\"text\\\"\\n\" +\n \" },\\n\" +\n \" \\\"author\\\": {\\n\" +\n \" \\\"type\\\": \\\"keyword\\\"\\n\" +\n \" },\\n\" +\n \" \\\"issue\\\": {\\n\" +\n \" \\\"type\\\": \\\"keyword\\\"\\n\" +\n \" },\\n\" +\n \" \\\"link\\\": {\\n\" +\n \" \\\"type\\\": \\\"keyword\\\"\\n\" +\n \" },\\n\" +\n \" \\\"description\\\": {\\n\" +\n \" \\\"type\\\": \\\"text\\\"\\n\" +\n \" },\\n\" +\n \" \\\"postDate\\\": {\\n\" +\n \" \\\"type\\\": \\\"date\\\",\\n\" +\n \" \\\"format\\\": \\\"yyyy-MM-dd\\\"\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" }\";\n\n request.mapping(\"article\", mapping, XContentType.JSON);\n request.alias(new Alias(INDEX_BASE));\n\n try {\n CreateIndexResponse createIndexResponse = this.client.admin().indices().create(request).get();\n if (!createIndexResponse.isAcknowledged()) {\n throw new ElasticExecutionException(\"Create java_magazine index was not acknowledged\");\n }\n } catch (InterruptedException | ExecutionException e) {\n logger.error(\"Error while creating an index\", e);\n throw new ElasticExecutionException(\"Error when trying to create an index\");\n }\n }",
"public updateIndexServlet() {\r\n\t\tsuper();\r\n\t}",
"public interface AssigsSearchRepository extends ElasticsearchRepository<Assigs, Long> {\n}",
"public InnodbIndexStats(Name alias) {\n this(alias, INNODB_INDEX_STATS);\n }",
"private IndexOperations getIndexOperations() {\n return elasticsearchOperations.indexOps(itemClazz);\n }",
"@ProjectSingleton\npublic interface DeprecatedEntitiesByEntityIndex extends Index {\n\n boolean isDeprecated(@Nonnull OWLEntity entity);\n}",
"public SingleElasticIndexCsdlEdmProvider(MappingMetaDataProvider metaDataProvider,\r\n String index) {\r\n super(metaDataProvider);\r\n this.index = index;\r\n }",
"private BrowseIndex(String baseName) {\n this(baseName, \"item\");\n }",
"public boolean qualifyIndexName() {\n \t\treturn true;\n \t}",
"public indexing() {\n initComponents();\n }",
"public interface IndexDocsInES {\n\n void indexDocs(Client client, String index_name, String type_name, List<Pair> docs);\n}",
"public interface IndexSearch {\n /**\n * Returns the index type.\n * @return type\n */\n IndexType type();\n\n /**\n * Returns the current token.\n * @return token\n */\n byte[] token();\n}",
"com.google.firestore.admin.v1beta1.Index getIndex();",
"public InnodbIndexStatsExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"private void ensureIndexes() throws Exception {\n LOGGER.info(\"Ensuring all Indexes are created.\");\n\n QueryResult indexResult = bucket.query(\n Query.simple(select(\"indexes.*\").from(\"system:indexes\").where(i(\"keyspace_id\").eq(s(bucket.name()))))\n );\n\n\n List<String> indexesToCreate = new ArrayList<String>();\n indexesToCreate.addAll(Arrays.asList(\n \"def_sourceairport\", \"def_airportname\", \"def_type\", \"def_faa\", \"def_icao\", \"def_city\"\n ));\n\n boolean hasPrimary = false;\n List<String> foundIndexes = new ArrayList<String>();\n for (QueryRow indexRow : indexResult) {\n String name = indexRow.value().getString(\"name\");\n if (name.equals(\"#primary\")) {\n hasPrimary = true;\n } else {\n foundIndexes.add(name);\n }\n }\n indexesToCreate.removeAll(foundIndexes);\n\n if (!hasPrimary) {\n String query = \"CREATE PRIMARY INDEX def_primary ON `\" + bucket.name() + \"` WITH {\\\"defer_build\\\":true}\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully created primary index.\");\n } else {\n LOGGER.warn(\"Could not create primary index: {}\", result.errors());\n }\n }\n\n for (String name : indexesToCreate) {\n String query = \"CREATE INDEX \" + name + \" ON `\" + bucket.name() + \"` (\" + name.replace(\"def_\", \"\") + \") \"\n + \"WITH {\\\"defer_build\\\":true}\\\"\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully created index with name {}.\", name);\n } else {\n LOGGER.warn(\"Could not create index {}: {}\", name, result.errors());\n }\n }\n\n LOGGER.info(\"Waiting 5 seconds before building the indexes.\");\n\n Thread.sleep(5000);\n\n StringBuilder indexes = new StringBuilder();\n boolean first = true;\n for (String name : indexesToCreate) {\n if (first) {\n first = false;\n } else {\n indexes.append(\",\");\n }\n indexes.append(name);\n }\n\n if (!hasPrimary) {\n indexes.append(\",\").append(\"def_primary\");\n }\n\n String query = \"BUILD INDEX ON `\" + bucket.name() + \"` (\" + indexes.toString() + \")\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully executed build index query.\");\n } else {\n LOGGER.warn(\"Could not execute build index query {}.\", result.errors());\n }\n }",
"public void createIndex(Index index) {\n Span span = this.tracer.buildSpan(\"Client.CreateIndex\").start();\n try {\n String path = String.format(\"/index/%s\", index.getName());\n String body = index.getOptions().toString();\n ByteArrayEntity data = new ByteArrayEntity(body.getBytes(StandardCharsets.UTF_8));\n clientExecute(\"POST\", path, data, null, \"Error while creating index\");\n } finally {\n span.finish();\n }\n }",
"public interface IndexCreator {\n\n /**\n * Creates indexes for specified persistent entity\n *\n * @param type persistent entity class, e.g. class annotated {@link org.springframework.data.mongodb.core.mapping.Document}\n * @return empty {@link Mono}\n */\n Mono<Void> createIndexes(Class<?> type);\n\n /**\n * Creates indexes for all persistent entities presented in {@link org.springframework.data.mongodb.core.mapping.MongoMappingContext}\n *\n * @return empty {@link Mono}\n */\n Mono<Void> createIndexes();\n}",
"@Test\n public void fieldIndexFilter() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n // Create an INDEX field which will display an entry for each XE field found in the document.\n // Each entry will display the XE field's Text property value on the left side\n // and the page containing the XE field on the right.\n // If the XE fields have the same value in their \"Text\" property,\n // the INDEX field will group them into one entry.\n FieldIndex index = (FieldIndex) builder.insertField(FieldType.FIELD_INDEX, true);\n\n // Configure the INDEX field only to display XE fields that are within the bounds\n // of a bookmark named \"MainBookmark\", and whose \"EntryType\" properties have a value of \"A\".\n // For both INDEX and XE fields, the \"EntryType\" property only uses the first character of its string value.\n index.setBookmarkName(\"MainBookmark\");\n index.setEntryType(\"A\");\n\n Assert.assertEquals(\" INDEX \\\\b MainBookmark \\\\f A\", index.getFieldCode());\n\n // On a new page, start the bookmark with a name that matches the value\n // of the INDEX field's \"BookmarkName\" property.\n builder.insertBreak(BreakType.PAGE_BREAK);\n builder.startBookmark(\"MainBookmark\");\n\n // The INDEX field will pick up this entry because it is inside the bookmark,\n // and its entry type also matches the INDEX field's entry type.\n FieldXE indexEntry = (FieldXE) builder.insertField(FieldType.FIELD_INDEX_ENTRY, true);\n indexEntry.setText(\"Index entry 1\");\n indexEntry.setEntryType(\"A\");\n\n Assert.assertEquals(\" XE \\\"Index entry 1\\\" \\\\f A\", indexEntry.getFieldCode());\n\n // Insert an XE field that will not appear in the INDEX because the entry types do not match.\n builder.insertBreak(BreakType.PAGE_BREAK);\n indexEntry = (FieldXE) builder.insertField(FieldType.FIELD_INDEX_ENTRY, true);\n indexEntry.setText(\"Index entry 2\");\n indexEntry.setEntryType(\"B\");\n\n // End the bookmark and insert an XE field afterwards.\n // It is of the same type as the INDEX field, but will not appear\n // since it is outside the bookmark's boundaries.\n builder.endBookmark(\"MainBookmark\");\n builder.insertBreak(BreakType.PAGE_BREAK);\n indexEntry = (FieldXE) builder.insertField(FieldType.FIELD_INDEX_ENTRY, true);\n indexEntry.setText(\"Index entry 3\");\n indexEntry.setEntryType(\"A\");\n\n doc.updatePageLayout();\n doc.updateFields();\n doc.save(getArtifactsDir() + \"Field.INDEX.XE.Filtering.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.INDEX.XE.Filtering.docx\");\n index = (FieldIndex) doc.getRange().getFields().get(0);\n\n TestUtil.verifyField(FieldType.FIELD_INDEX, \" INDEX \\\\b MainBookmark \\\\f A\", \"Index entry 1, 2\\r\", index);\n Assert.assertEquals(\"MainBookmark\", index.getBookmarkName());\n Assert.assertEquals(\"A\", index.getEntryType());\n\n indexEntry = (FieldXE) doc.getRange().getFields().get(1);\n\n TestUtil.verifyField(FieldType.FIELD_INDEX_ENTRY, \" XE \\\"Index entry 1\\\" \\\\f A\", \"\", indexEntry);\n Assert.assertEquals(\"Index entry 1\", indexEntry.getText());\n Assert.assertEquals(\"A\", indexEntry.getEntryType());\n\n indexEntry = (FieldXE) doc.getRange().getFields().get(2);\n\n TestUtil.verifyField(FieldType.FIELD_INDEX_ENTRY, \" XE \\\"Index entry 2\\\" \\\\f B\", \"\", indexEntry);\n Assert.assertEquals(\"Index entry 2\", indexEntry.getText());\n Assert.assertEquals(\"B\", indexEntry.getEntryType());\n\n indexEntry = (FieldXE) doc.getRange().getFields().get(3);\n\n TestUtil.verifyField(FieldType.FIELD_INDEX_ENTRY, \" XE \\\"Index entry 3\\\" \\\\f A\", \"\", indexEntry);\n Assert.assertEquals(\"Index entry 3\", indexEntry.getText());\n Assert.assertEquals(\"A\", indexEntry.getEntryType());\n }",
"public void index(List<Entity> entities) {\n\t\t\n\t}",
"@Test\n public void ruleIndexTest() {\n // TODO: test ruleIndex\n }",
"public void enableIndexAutoCreation() {\n client.setIndexAutoCreationEnabled(true);\n }",
"void initiateIndexing(HarvestResultDTO harvestResult) throws DigitalAssetStoreException;",
"private static RDFIndex createDefaultIndex() {\n defaultIndex = new RDFIndex(com.hp.hpl.jena.graph.Factory.createGraphMem());\n try {\n File indexFile = new File(INDEX_FILE);\n if(indexFile.exists()) {\n defaultIndex.read(new FileReader(indexFile),Constants.RESOURCE_URL);\n }\n } catch(Throwable t) {\n t.printStackTrace();\n }\n return defaultIndex;\n }",
"static String composeIndexName() {\n\t\treturn TYPE.toLowerCase();\n\t}",
"Expression getIndexExpr();",
"public Index getIndex() {\r\n // TODO: Implement this!\r\n return new WebIndex();\r\n }",
"public interface ThinkAloudSearchRepository extends ElasticsearchRepository<ThinkAloud, Long> {\n}",
"public void setIndexObjectFactory(BLIndexObjectFactory factory) {\n this.indexObjectFactory = factory;\n }",
"private IndexSettings buildIndexSettings(IndexMetadata metadata) {\n return new IndexSettings(metadata, settings);\n }",
"public interface TicketSearchRepository extends ElasticsearchRepository<Ticket, Long> {\n}",
"public ElasticSearchWrapper(String index, String type, String serverIP, String port) {\n\t\tthis.index = index;\n\t\tthis.type = type;\n\t\tthis.subdocType = type + \"1\";\n\n\t\t// esUrl = \"http://75.101.244.195:8081/\" + index + \"/\" + type + \"/\";\n\t\tesInsertDeleteUrl = \"http://\" + serverIP + \":\" + port + \"/\" + index\n\t\t\t\t+ \"/\" + type + \"/\";\n\t\tesInsertDeleteSubdocUrl = \"http://\" + serverIP + \":\" + port + \"/\"\n\t\t\t\t+ index + \"/\" + subdocType + \"/\";\n\t\tesSearchUrl = \"http://\" + serverIP + \":\" + port + \"/\" + index + \"/\"\n\t\t\t\t+ type + \"/_search\";\n\t\tesSearchSubdocUrl = \"http://\" + serverIP + \":\" + port + \"/\" + index\n\t\t\t\t+ \"/\" + subdocType + \"/_search\";\n\t\tesIndexUrl = \"http://\" + serverIP + \":\" + port + \"/\" + index + \"/\";\n\t\tesIndexTypeUrl = \"http://\" + serverIP + \":\" + port + \"/\" + index + \"/\"\n\t\t\t\t+ type + \"/\";\n\t\tesIndexTypeSubdocUrl = \"http://\" + serverIP + \":\" + port + \"/\" + index\n\t\t\t\t+ \"/\" + subdocType + \"/\";\n\t\tesMapping = \"http://\" + serverIP + \":\" + port + \"/\" + index + \"/\"\n\t\t\t\t+ type + \"/_mapping\";\n\t\tesMappingSubdoc = \"http://\" + serverIP + \":\" + port + \"/\" + index + \"/\"\n\t\t\t\t+ subdocType + \"/_mapping\";\n\t\tesScanUrl = \"http://\" + serverIP + \":\" + port + \"/\" + index + \"/\"\n\t\t\t\t+ type + \"/_search?search_type=scan&scroll=2m&size=\";\n\t\tesScanSubdocUrl = \"http://\" + serverIP + \":\" + port + \"/\" + index + \"/\"\n\t\t\t\t+ subdocType + \"/_search?search_type=scan&scroll=2m&size=\";\n\t\tesScrollUrl = \"http://\" + serverIP + \":\" + port\n\t\t\t\t+ \"/_search/scroll?scroll=2m&scroll_id=\";\n\t\tesRefreshIndexUrl = \"http://\" + serverIP + \":\" + port + \"/\" + index\n\t\t\t\t+ \"/_refresh\";\n\t}",
"private Document createMapping() {\n return getIndexOperations().createMapping();\n }",
"boolean isNewIndex();",
"public static void main(String[] args) throws Exception {\n\t\tClient client = ESClient.createClientShield();\n//\t\tXContentBuilder builder = XContentFactory.jsonBuilder()\n//\t\t .startObject()\n//\t\t .field(\"user\", \"kimchy\")\n//\t\t .field(\"postDate\", new Date())\n//\t\t .field(\"message\", \"trying out Elasticsearch\")\n//\t\t .endObject();\n//\t\tIndexResponse response = client.prepareIndex(\"twitter\", \"tweet\")\n// .setSource(builder.string())\n// .get();\n\t\tclient.close();\n\t\t\n\t}",
"void addIndexForRepository(long repositoryId);",
"@Test\n @Ignore\n public void testDelete_Index() throws Exception {\n System.out.println(\"delete\");\n Index entity = TestUtils.getTestIndex();\n Identifier identifier = entity.getId();\n instance.create(entity);\n assertTrue(instance.exists(identifier));\n instance.delete(entity);\n assertFalse(instance.exists(identifier));\n }",
"private Pageable constructPageSpecification(int pageIndex) {\n Pageable pageSpecification = new PageRequest(pageIndex, 10, sortByLastNameAsc());\n return pageSpecification;\n }",
"@Test\n public void fieldIndexFormatting() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n // Create an INDEX field which will display an entry for each XE field found in the document.\n // Each entry will display the XE field's Text property value on the left side,\n // and the number of the page that contains the XE field on the right.\n // If the XE fields have the same value in their \"Text\" property,\n // the INDEX field will group them into one entry.\n FieldIndex index = (FieldIndex) builder.insertField(FieldType.FIELD_INDEX, true);\n index.setLanguageId(\"1033\");\n\n // Setting this property's value to \"A\" will group all the entries by their first letter,\n // and place that letter in uppercase above each group.\n index.setHeading(\"A\");\n\n // Set the table created by the INDEX field to span over 2 columns.\n index.setNumberOfColumns(\"2\");\n\n // Set any entries with starting letters outside the \"a-c\" character range to be omitted.\n index.setLetterRange(\"a-c\");\n\n Assert.assertEquals(\" INDEX \\\\z 1033 \\\\h A \\\\c 2 \\\\p a-c\", index.getFieldCode());\n\n // These next two XE fields will show up under the \"A\" heading,\n // with their respective text stylings also applied to their page numbers.\n builder.insertBreak(BreakType.PAGE_BREAK);\n FieldXE indexEntry = (FieldXE) builder.insertField(FieldType.FIELD_INDEX_ENTRY, true);\n indexEntry.setText(\"Apple\");\n indexEntry.isItalic(true);\n\n Assert.assertEquals(\" XE Apple \\\\i\", indexEntry.getFieldCode());\n\n builder.insertBreak(BreakType.PAGE_BREAK);\n indexEntry = (FieldXE) builder.insertField(FieldType.FIELD_INDEX_ENTRY, true);\n indexEntry.setText(\"Apricot\");\n indexEntry.isBold(true);\n\n Assert.assertEquals(\" XE Apricot \\\\b\", indexEntry.getFieldCode());\n\n // Both the next two XE fields will be under a \"B\" and \"C\" heading in the INDEX fields table of contents.\n builder.insertBreak(BreakType.PAGE_BREAK);\n indexEntry = (FieldXE) builder.insertField(FieldType.FIELD_INDEX_ENTRY, true);\n indexEntry.setText(\"Banana\");\n\n builder.insertBreak(BreakType.PAGE_BREAK);\n indexEntry = (FieldXE) builder.insertField(FieldType.FIELD_INDEX_ENTRY, true);\n indexEntry.setText(\"Cherry\");\n\n // INDEX fields sort all entries alphabetically, so this entry will show up under \"A\" with the other two.\n builder.insertBreak(BreakType.PAGE_BREAK);\n indexEntry = (FieldXE) builder.insertField(FieldType.FIELD_INDEX_ENTRY, true);\n indexEntry.setText(\"Avocado\");\n\n // This entry will not appear because it starts with the letter \"D\",\n // which is outside the \"a-c\" character range that the INDEX field's LetterRange property defines.\n builder.insertBreak(BreakType.PAGE_BREAK);\n indexEntry = (FieldXE) builder.insertField(FieldType.FIELD_INDEX_ENTRY, true);\n indexEntry.setText(\"Durian\");\n\n doc.updatePageLayout();\n doc.updateFields();\n doc.save(getArtifactsDir() + \"Field.INDEX.XE.Formatting.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.INDEX.XE.Formatting.docx\");\n index = (FieldIndex) doc.getRange().getFields().get(0);\n\n Assert.assertEquals(\"1033\", index.getLanguageId());\n Assert.assertEquals(\"A\", index.getHeading());\n Assert.assertEquals(\"2\", index.getNumberOfColumns());\n Assert.assertEquals(\"a-c\", index.getLetterRange());\n Assert.assertEquals(\" INDEX \\\\z 1033 \\\\h A \\\\c 2 \\\\p a-c\", index.getFieldCode());\n Assert.assertEquals(\"\\fA\\r\" +\n \"Apple, 2\\r\" +\n \"Apricot, 3\\r\" +\n \"Avocado, 6\\r\" +\n \"B\\r\" +\n \"Banana, 4\\r\" +\n \"C\\r\" +\n \"Cherry, 5\\r\\f\", index.getResult());\n\n indexEntry = (FieldXE) doc.getRange().getFields().get(1);\n\n TestUtil.verifyField(FieldType.FIELD_INDEX_ENTRY, \" XE Apple \\\\i\", \"\", indexEntry);\n Assert.assertEquals(\"Apple\", indexEntry.getText());\n Assert.assertFalse(indexEntry.isBold());\n Assert.assertTrue(indexEntry.isItalic());\n\n indexEntry = (FieldXE) doc.getRange().getFields().get(2);\n\n TestUtil.verifyField(FieldType.FIELD_INDEX_ENTRY, \" XE Apricot \\\\b\", \"\", indexEntry);\n Assert.assertEquals(\"Apricot\", indexEntry.getText());\n Assert.assertTrue(indexEntry.isBold());\n Assert.assertFalse(indexEntry.isItalic());\n\n indexEntry = (FieldXE) doc.getRange().getFields().get(3);\n\n TestUtil.verifyField(FieldType.FIELD_INDEX_ENTRY, \" XE Banana\", \"\", indexEntry);\n Assert.assertEquals(\"Banana\", indexEntry.getText());\n Assert.assertFalse(indexEntry.isBold());\n Assert.assertFalse(indexEntry.isItalic());\n\n indexEntry = (FieldXE) doc.getRange().getFields().get(4);\n\n TestUtil.verifyField(FieldType.FIELD_INDEX_ENTRY, \" XE Cherry\", \"\", indexEntry);\n Assert.assertEquals(\"Cherry\", indexEntry.getText());\n Assert.assertFalse(indexEntry.isBold());\n Assert.assertFalse(indexEntry.isItalic());\n\n indexEntry = (FieldXE) doc.getRange().getFields().get(5);\n\n TestUtil.verifyField(FieldType.FIELD_INDEX_ENTRY, \" XE Avocado\", \"\", indexEntry);\n Assert.assertEquals(\"Avocado\", indexEntry.getText());\n Assert.assertFalse(indexEntry.isBold());\n Assert.assertFalse(indexEntry.isItalic());\n\n indexEntry = (FieldXE) doc.getRange().getFields().get(6);\n\n TestUtil.verifyField(FieldType.FIELD_INDEX_ENTRY, \" XE Durian\", \"\", indexEntry);\n Assert.assertEquals(\"Durian\", indexEntry.getText());\n Assert.assertFalse(indexEntry.isBold());\n Assert.assertFalse(indexEntry.isItalic());\n }",
"private void createIndex(final String index, int numShards, int numReplicas) throws IOException {\n LOGGER.warn(\"CREATE ES INDEX {} with {} shards and {} replicas\", index, numShards, numReplicas);\n final Settings indexSettings = Settings.builder().put(\"number_of_shards\", numShards)\n .put(\"number_of_replicas\", numReplicas).build();\n CreateIndexRequest indexRequest = new CreateIndexRequest(index, indexSettings);\n getClient().admin().indices().create(indexRequest).actionGet();\n\n final String mapping = IOUtils.toString(\n this.getClass().getResourceAsStream(\"/elasticsearch/mapping/map_person_5x_snake.json\"));\n getClient().admin().indices().preparePutMapping(index)\n .setType(getConfig().getElasticsearchDocType()).setSource(mapping, XContentType.JSON).get();\n }",
"private Query getQuery(String index, String type, String query){\r\n\t\tSearchQuery esQuery = new SearchQuery();\r\n\t\tesQuery.setIndex(this.indexName);\r\n\t\t\r\n\t\tif(StringUtils.isNotEmpty(type))\r\n\t\t\tesQuery.setType(type);\r\n\t\t\r\n\t\tesQuery.setQuery(query);\r\n\t\t\r\n\t\treturn esQuery;\t\t\r\n\t}",
"public interface HrDepartmentHeadSetupSearchRepository extends ElasticsearchRepository<HrDepartmentHeadSetup, Long> {\n}",
"public interface CmsSyllabusSearchRepository extends ElasticsearchRepository<CmsSyllabus, Long> {\n}",
"public interface ILuceneIndexDAO extends IStatefulIndexerSession {\n // ===================================================================\n // The domain of indexing creates a separation between\n // readers and writers. In lucene, these are searchers\n // and writers. This DAO creates the more familiar DAO-ish interface\n // for developers to use and attempts to hide the details of\n // the searcher and write.\n // Calls are stateless meaning calling a find after a save does\n // not guarantee data will be reflected for the instance of the DAO\n // ===================================================================\n\n /**\n * Updates a document by first deleting the document(s) containing a term and then adding the new document. A Term is created by termFieldName, termFieldValue.\n *\n * @param termFieldName - Field name of the index.\n * @param termFieldValue - Field value of the index.\n * @param document - Lucene document to be updated.\n * @return - True for successful addition.\n */\n boolean saveDocument(String termFieldName, String termFieldValue, Document document);\n\n /**\n * Generates a BooleanQuery from the given fields Map and uses it to delete the documents matching in the IndexWriter.\n *\n * @param fields - A Map data structure containing a field(Key) and text(value) pair.\n * @return - True for successful deletion.\n */\n boolean deleteDocuments(Map<String, String> fields);\n\n /**\n * Find the documents in the IndexSearcher matching the Terms generated from fields.\n *\n * @param fields - A Map data structure contains the field(Key) and text(value).\n * @return - Collection of Documents obtained from the search.\n */\n Set<Document> findDocuments(Map<String, String> fields);\n\n /**\n * Find the documents in the IndexSearcher matching the Terms generated from fields. Offset is the starting position for the search and numberOfResults\n * is the length from offset position.\n *\n * @param fields - A Map data structure containing a field(Key) and text(value) pair.\n * @param offset - Starting position of the search.\n * @param numberOfResults - Number of documents to be searched from an offset position.\n * @return - Collection of Documents obtained from the search.\n */\n Set<Document> findDocuments(Map<String, String> fields, int offset, int numberOfResults);\n\n /**\n * Return the count of the documents present in the IndexSearcher.\n *\n * @return - Integer representing the count of documents.\n */\n int getDocumentCount();\n\n}",
"public IndexWriter(String indexDir) {\n\t\t//TODO : YOU MUST IMPLEMENT THIS\n\tif (indexDir!=null)\n\t{System.setProperty(\"INDEX.DIR\",(this.indexDir=indexDir));\n\tisvaliddir=true;\n\tiutil=new IndexUtil(indexDir);\n\t}\n\t\n\t}",
"public interface IndexRegistry\n{\n void registerIndex(Index index);\n void unregisterIndex(Index index);\n\n Index getIndex(IndexMetadata indexMetadata);\n Collection<Index> listIndexes();\n}",
"public static void main(String[] args)\n\t{\n\t\tsqlindexer si=new sqlindexer();\n\t\tsi.indexAll();\n\t\t\n\t\t\n\t}",
"public interface PerCompanySearchRepository extends ElasticsearchRepository<PerCompany, Long> {\n}",
"public Expression getIndex()\n {\n return index;\n }"
] |
[
"0.65782964",
"0.6543969",
"0.65415955",
"0.6472992",
"0.6344739",
"0.62694544",
"0.62341213",
"0.6210918",
"0.61791617",
"0.6136026",
"0.6130912",
"0.61277336",
"0.5962831",
"0.59323704",
"0.58755577",
"0.5853533",
"0.5834842",
"0.58284867",
"0.5827028",
"0.58265257",
"0.5799681",
"0.5785461",
"0.576055",
"0.5755601",
"0.57413423",
"0.5715163",
"0.57140636",
"0.57024443",
"0.57011396",
"0.57010245",
"0.56819487",
"0.56670433",
"0.5665164",
"0.56605506",
"0.566031",
"0.5647687",
"0.56339675",
"0.562212",
"0.5588393",
"0.55819577",
"0.55804247",
"0.55647916",
"0.55319077",
"0.55267996",
"0.55118257",
"0.55081695",
"0.5507881",
"0.55002",
"0.5496426",
"0.549602",
"0.5483628",
"0.5477327",
"0.5465483",
"0.54573643",
"0.5454988",
"0.54497325",
"0.54481566",
"0.5438166",
"0.5434059",
"0.5422718",
"0.5419121",
"0.5405223",
"0.5388563",
"0.5383854",
"0.5383432",
"0.5371705",
"0.536554",
"0.5358434",
"0.53576183",
"0.53532034",
"0.5349742",
"0.5349352",
"0.5346304",
"0.5341242",
"0.533437",
"0.53314006",
"0.5330564",
"0.5323181",
"0.531596",
"0.5310457",
"0.5306563",
"0.52998954",
"0.52980393",
"0.5292646",
"0.5290895",
"0.52876014",
"0.5282788",
"0.5282436",
"0.5278709",
"0.52743125",
"0.5271111",
"0.52687335",
"0.52646077",
"0.5261761",
"0.52557033",
"0.52501744",
"0.5245572",
"0.5243452",
"0.52416444",
"0.52405906"
] |
0.6426545
|
4
|
A scriptable object is one that has custom defined behavior. A scriptable object defines three methods: start: called when the object enters scope. If it is persistent, then this is when the quest is first loaded. If it is a regular object, then this is when the object enters the view. Returns an int representing the number of milliseconds to wait before calling update update: called while the object is in scope. It returns an int that represents the number of milliseconds that we should wait until calling update again. stop is called when the object goes out of scope. It should be used to stop timers, clear state variables, etc.
|
public interface Scriptable {
public int start();
public int update();
public void stop();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public abstract void gameObjectStartsSleeping();",
"public long startTime();",
"Duration subsystemFreezeDuration();",
"public interface Startable extends Runnable {\n \n /**\n * Waits until the thread this object is running in is finished before returning.\n */\n public void join();\n \n /**\n * Checks whether the component is done with its work.\n * @return <code>true</code> if the component is finished its work\n */\n public boolean isDone();\n \n /**\n * Sets the thread that this object is running in.\n * \n * @param t the thread that this object is running in\n */\n public void setThread(Thread t);\n\n /**\n * Gets the thread that this object is running in.\n * \n * @return the thread that this object is running in\n */\n public Thread getThread();\n\n}",
"void startUpdateTimer();",
"@Override\n\tpublic long getTime() {\n\t\treturn System.nanoTime() - startTime;\n\t}",
"public int getDuration();",
"public boolean isAwake();",
"public abstract void startObject();",
"Integer getStartTimeout();",
"public long startTimeNanos();",
"int getDuration();",
"int getDuration();",
"@java.lang.Override\n public long getCombatStartMs() {\n return combatStartMs_;\n }",
"public long timeElapsed()\n {\n return (System.currentTimeMillis() - this.startTime) / 1000;\n }",
"long getElapsedTime();",
"boolean typeIsTimed() {\n return true;\n }",
"@Override\n public void execute() {\n if (System.currentTimeMillis() - currentMs >= timeMs) {\n // Delay has passed so initialize object11\n super.initialize();\n }\n }",
"public int getTimer() {\n return worldTimer;\n }",
"public void Start();",
"private long getGameDuration() {\n return ((System.currentTimeMillis() - startGameTime) / 1000);\n }",
"Posn getDuration();",
"public interface ITimed {\n\t\t/**\n\t\t * Runs the action to be profiled, and returns the elapsed time of the\n\t\t * profiled section in seconds.\n\t\t */\n\t\tdouble time() throws Throwable;\n\t}",
"public double getFinishTime(){return finishTime;}",
"@Override\r\n public void update(long timePassed) {\n\r\n }",
"public void timePassed() { }",
"@java.lang.Override\n public long getMinigameEndMs() {\n return minigameEndMs_;\n }",
"public void Update(double elapsedTime){\n }",
"void startUpdate();",
"Time started() {\n return started;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Long getWorkElapsed() {\n return (java.lang.Long)__getInternalInterface().getFieldValue(WORKELAPSED_PROP.get());\n }",
"public abstract void interactionStarts(long ms);",
"public Cooldown getCooldownObject() {\n return cooldown;\n }",
"public long getStarted () {\n\treturn started;\n }",
"Timer getTimer();",
"@java.lang.Override\n public long getCombatStartMs() {\n return combatStartMs_;\n }",
"public void timePassed() {\n }",
"public void timePassed() {\n }",
"public boolean isStartable () ;",
"long getDuration();",
"void onStart(int duration);",
"public void timePassed() {\r\n\r\n }",
"public float getElapsed()\n {\n return this.elapsed;\n }",
"public void timePassed() {\r\n }",
"public void timePassed() {\r\n }",
"int aggroHitTimer(IGeneticMob geneticMob, EntityLiving attacker);",
"public long getTimeGameStarted() {\n \t\treturn timeGameStarted;\n \t}",
"int checkElapsedTime(){\r\n\t\treturn gc.getElapsedTime();\r\n\t}",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Long getWorkElapsed() {\n return (java.lang.Long)__getInternalInterface().getFieldValue(WORKELAPSED_PROP.get());\n }",
"private boolean isStartable()\n {\n if (! isAlive() && nextStartTime <= System.currentTimeMillis())\n {\n return true;\n }\n else\n {\n return false;\n }\n }",
"int delay(Player player);",
"public long getElapsedTime()\r\n {\r\n if(isRunning)\r\n {\r\n long endTime = System.currentTimeMillis();\r\n return elapsedTime=endTime-startTime;\r\n }\r\n else\r\n {\r\n return elapsedTime;\r\n }\r\n }",
"public double getSlowToFire();",
"public Double waitTimeCalculatior(long start) {\n\t\t\t\tdouble difference = (System.currentTimeMillis() - start);\n\t\t\t\treturn difference;\n\t\t\t}",
"int getRunningDuration();",
"public GameTimer getTimer()\n {\n return timer;\n }",
"protected double getElapsedTime() {\n\t\treturn Utilities.getTime() - startTime;\n\t}",
"Instant getStart();",
"@java.lang.Override\n public long getMinigameEndMs() {\n return minigameEndMs_;\n }",
"void playerPassedStart(Player player);",
"long duration();",
"public double getHoldTime();",
"int getStart();",
"@Override\r\n public void timePassed() {\r\n }",
"public interface CanalLifeCycle {\n void start();\n\n void stop();\n\n boolean isStart();\n}",
"void startMovement();",
"@Override\n public void timePassed() {\n }",
"public void gameRunning()\n{\n}",
"@Transient\n \tpublic int getDuration() {\n \t\tint duration = (int) (this.endTime.getTime() - this.startTime.getTime());\n \t\treturn duration / 1000;\n \t}",
"public interface Holdable {\n\t/**\n\t * @return\n\t * \t\ttrue when picked up, false otherwise\n\t */\n\tboolean isPickedUp();\n\t\n\t/**\n\t * Method called when the entity is picked up.\n\t */\n\tvoid pickUp();\n\t\n\t/**\n\t * Method called when the entity is dropped.\n\t */\n\tvoid drop();\n\t\n\t/**\n\t * Called every frame.\n\t * \n\t * @param tpf\n\t * \t\tthe time per frame of this frame\n\t */\n\tdefault void update(float tpf) { }\n}",
"public static long getTotalHitTime() {\r\n return _time;\r\n }",
"public long getLoopTime();",
"@java.lang.Override\n public long getCombatEndMs() {\n return combatEndMs_;\n }",
"public int getTime() {\n\t\tif(player == null) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn player.getPosition();\n\t}",
"public interface Stopwatch {\n\n /** Mark the start time. */\n void start();\n\n /** Mark the end time. */\n void stop();\n\n /** Reset the stopwatch so that it can be used again. */\n void reset();\n\n /** Returns the duration in the specified time unit. */\n long getDuration(TimeUnit timeUnit);\n\n /** Returns the duration in nanoseconds. */\n long getDuration();\n}",
"public int getTimer() {\n return timer;\n }",
"public static void ComienzaTimer(){\n timer = System.nanoTime();\n }",
"public double getElapsedTime()\n\t{\n\t\treturn elapsedTime;\n\t}",
"@Override\n\t\tpublic long getStartMillis() {\n\t\t\treturn 0;\n\t\t}",
"public static long startTimer() {\n return System.currentTimeMillis();\n }",
"long elapsedTime();",
"public abstract float getSecondsPerUpdate();",
"@Override\n public Duration getWait() {\n return duration;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Long getManagementElapsed() {\n return (java.lang.Long)__getInternalInterface().getFieldValue(MANAGEMENTELAPSED_PROP.get());\n }",
"public Long getDurationMs();",
"int getStartTime();",
"int getStartTime();",
"int getStartTime();",
"boolean isAlive(Unit unit);",
"public int getDuration() {\n\t\treturn (int) ((endTime.getTime()-startTime.getTime())/1000) + 1;\n\t}",
"public void setup() {\naddBehaviour(new TickerBehaviour(this, 100) {\n//call onTick every 1000ms\nprotected void onTick() {\n//Count down\nif (w > 0) {\nSystem.out.println(w + \" seconds left.\");\n\nw--;\n} else {\nSystem.out.println(\"Bye, bye\");\nmyAgent.doDelete(); //Delete this agent\n}\n}\n});\n}",
"@Override\n public void Start() {\n\n }",
"@Override\n public void Start() {\n\n }",
"@Override\n public void Start() {\n\n }",
"@Override\n public void start() {\n final LivingEntity target = mob.getTarget();\n if( target == null )\n return;\n \n // Perform the jump\n mob.getLookControl().setLookAt( target, 180.0F, 0.0F );\n final Vector3d jumpXZ = new Vector3d( target.getX() - mob.getX(), 0.0, target.getZ() - mob.getZ() )\n .normalize().scale( Config.ELITE_AI.JUMP.jumpSpeedForward.get() ).add( mob.getDeltaMovement().scale( 0.2 ) );\n mob.setDeltaMovement( jumpXZ.x, Config.ELITE_AI.JUMP.jumpSpeedUpward.get(), jumpXZ.z );\n \n // Start the cooldown (this won't tick down until the entity has landed)\n cooldownTimer = Config.ELITE_AI.JUMP.cooldown.next( mob.getRandom() );\n }",
"public int getLivesRemaining();",
"boolean hasUpdateTime();",
"boolean hasUpdateTime();",
"boolean hasUpdateTime();",
"public long duration() {\n\t\treturn end - start;\n\t}"
] |
[
"0.5830736",
"0.5589975",
"0.55546165",
"0.54641694",
"0.53911775",
"0.53421605",
"0.5335093",
"0.53216535",
"0.52920693",
"0.5280625",
"0.5277016",
"0.52634484",
"0.52634484",
"0.5227023",
"0.5217511",
"0.5205522",
"0.52035046",
"0.5201867",
"0.51882136",
"0.5186511",
"0.51842135",
"0.5183215",
"0.51776016",
"0.51730436",
"0.51565224",
"0.5153838",
"0.51506907",
"0.5141356",
"0.5132808",
"0.513109",
"0.5127903",
"0.5111563",
"0.5108794",
"0.5104963",
"0.5103123",
"0.50925887",
"0.50801927",
"0.50801927",
"0.507736",
"0.5076837",
"0.5066812",
"0.5065327",
"0.5062086",
"0.50589174",
"0.50589174",
"0.5056546",
"0.50496936",
"0.5047798",
"0.50454676",
"0.50443596",
"0.50415814",
"0.5034308",
"0.50262296",
"0.50235397",
"0.50212497",
"0.50194615",
"0.50140584",
"0.50124073",
"0.50107247",
"0.49927312",
"0.49915683",
"0.4987744",
"0.49866217",
"0.49736512",
"0.49689105",
"0.49650523",
"0.49635905",
"0.49622735",
"0.49590963",
"0.49496433",
"0.49413884",
"0.49413642",
"0.49383742",
"0.49266067",
"0.49261656",
"0.49260437",
"0.49250245",
"0.49249393",
"0.49243295",
"0.4922134",
"0.49200454",
"0.49091005",
"0.4909011",
"0.49089003",
"0.4905505",
"0.49053735",
"0.49053735",
"0.49053735",
"0.48996764",
"0.4897615",
"0.48915687",
"0.4883587",
"0.4883587",
"0.4883587",
"0.48735544",
"0.48707464",
"0.4867841",
"0.4867841",
"0.4867841",
"0.4867677"
] |
0.5948194
|
0
|
This constructor reads mirror data from the modifier structure. The stored data is a map of parameters for mirror modifier. No additional data is loaded. When the modifier is applied it is necessary to get the newly created node.
|
public MirrorModifier(Structure modifierStructure, BlenderContext blenderContext) {
if(this.validate(modifierStructure, blenderContext)) {
modifierData.put("flag", modifierStructure.getFieldValue("flag"));
modifierData.put("tolerance", modifierStructure.getFieldValue("tolerance"));
Pointer pMirrorOb = (Pointer) modifierStructure.getFieldValue("mirror_ob");
if (pMirrorOb.isNotNull()) {
modifierData.put("mirrorob", pMirrorOb);
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public NodeMap<CDMNode, DapNode> create() throws DapException {\n // Netcdf Dataset will already have a root group\n Group cdmroot = ncfile.getRootGroup();\n this.nodemap.put(cdmroot, this.dmr);\n fillGroup(cdmroot, this.dmr, ncfile);\n return this.nodemap;\n }",
"public NetworkNode(Node treeNode) {\n height = treeNode.getHeight();\n label = treeNode.getID();\n metaDataString = treeNode.metaDataString;\n for (String metaDataKey: treeNode.getMetaDataNames()) {\n Object metaDataValue = treeNode.getMetaData(metaDataKey);\n metaData.put(metaDataKey, metaDataValue);\n }\n }",
"public Node(Word d) {\n data = d;\n left = null;\n right = null;\n }",
"Node(String d) {\n data = d;\n }",
"@Override\n public void instantiate() {\n //Preconditions\n assert roles != null : \"roles must not be null\";\n assert !roles.isEmpty() : \"roles must not be empty for node \" + name;\n\n stateValueBindings.stream().forEach((stateValueBinding) -> {\n stateValueBinding.instantiate();\n });\n roles.stream().forEach((role) -> {\n role.instantiate();\n // ensure that the referred-to node is not a copy\n role.setNode(this);\n });\n }",
"public CloneNodeCommand() {\n// validator.configureTemplate().add(new StringToken(Commands.CLONE.getValue()))\n// .add(new StringToken()).add(new StringToken(\"from\"))\n// .add(new StringToken());\n validator.configureTemplate().add(new StringToken(Commands.CLONE.getValue()))\n .add(new MapListToken());\n }",
"public Node() {\n this.nodeMap = new HashMap<>();\n }",
"public Parser() {\n\t\tpopulateMaps();\n\t}",
"private void createMirrorAttributes() {\n for (NodeAttributeToPreserve attribute : nodeAttributesToPreserve) {\n assert (originalGraph.hasNodeAttribute(attribute.id)) : \"The node attribute to be mirrored does not exist in the original graph.\";\n mirrorGraph.newNodeAttribute(attribute.id, originalGraph.nodeAttribute(attribute.id).getDefault());\n }\n\n for (String attrId : edgeAttributesToPreserve) {\n assert (originalGraph.hasEdgeAttribute(attrId)) : \"The edge attribute to be mirrored does not exist in the original graph.\";\n mirrorGraph.newEdgeAttribute(attrId, originalGraph.edgeAttribute(attrId).getDefault());\n }\n }",
"public MapNode()\n\t{\n\t\t// Call alternative constructor\n\t\tthis((AbstractNode)null);\n\t}",
"public DancingNode()\n {\n L=R=U=D=this;\n }",
"public LevelParser clone(){\n\t\tchar[][] level = new char[this.level.length][this.level[0].length];\n\t\tfor(int y=0;y<this.level.length;y++)\n\t\t\tfor(int x=0;x<this.level[0].length;x++)\n\t\t\t\tlevel[y][x] = this.level[y][x];\n\t\ttry {\n\t\t\treturn new LevelParser(level);\n\t\t} catch (SyntacticIncException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"public Node(T data, Node<T> l, Node<T> r) {\n this.data = data;this.left = l;this.right = r;\n }",
"public Node(String data) {\n this.data = data;\n status = Visited.NEW;\n neighbors = new ArrayList();\n }",
"public Transition(NamedNodeMap node){\n\t\tthis.effect = new Effect();\n\t\tthis.guardRule = new Rule();\n\t\tthis.comment = new Comment();\n\t\tString delimiter =\"xmi:\";\n\t\tString temp[] = null;\n\t\tfor (int i=0; i < node.getLength(); i++){\n\t\t\ttemp = null;\n\t\t\tdelimiter =\"xmi:\";\n\t\t\ttemp = node.item(i).getNodeName().split(delimiter);\n\t\t\tif (temp[0].equalsIgnoreCase(\"\")) {\n\t\t\t\ttemp[0] = temp[1];\n\t\t\t}\n\t\t\tif (temp.length > 0){\n\t\t\t\t\n\t\t\t\tswitch (temp[0]){\n\t\t\t\tcase \"id\":\n\t\t\t\t\tthis.setId(node.item(i).getNodeValue());\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"name\":\n\t\t\t\t\tString tmp = node.item(i).getNodeValue();\n\t\t\t\t\ttmp = tmp.replace(\"-|.|!\", \"_\");\n\t\t\t\t\t\n\t\t\t\t\tthis.setName(tmp);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"source\":\n\t\t\t\t\tthis.setSource(node.item(i).getNodeValue());\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"target\":\n\t\t\t\t\tthis.setTarget(node.item(i).getNodeValue());\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"guard\":\n\t\t\t\t\tthis.setIdGuardRule(node.item(i).getNodeValue());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public abstract mapnik.Map createMap(Object recycleTag);",
"public Node(String dictionaryName){\n this.rowWithoutDslTags = true;\n this.closedNode = false;\n this.children = new ArrayList<>();\n this.level = 0;\n this.dictionaryName = dictionaryName;\n }",
"public Node() {\n name = null;\n missionDescription = null;\n roles = null;\n stateValueBindings = null;\n nodeRuntime = null;\n isNetworkSingleton = false;\n }",
"public NodeInfo() {\n }",
"public MagicDictionary() {\n root=new Node();\n }",
"public Node(){\n\n\t\t}",
"private Noder(E data) {\n this.data = data;\n }",
"public ModifierData getModifier() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn new ModifierData(__io__address + 0, __io__block, __io__blockTable);\n\t\t} else {\n\t\t\treturn new ModifierData(__io__address + 0, __io__block, __io__blockTable);\n\t\t}\n\t}",
"public ModifierData getModifier() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn new ModifierData(__io__address + 0, __io__block, __io__blockTable);\n\t\t} else {\n\t\t\treturn new ModifierData(__io__address + 0, __io__block, __io__blockTable);\n\t\t}\n\t}",
"private Node( T data_ )\n {\n data = data_;\n parent = this;\n }",
"private NodeTypeHolder(Attributes a)\r\n\t{\r\n\t this.attributes = a;\r\n\t}",
"public InternalNode (int d, Node p0, String k1, Node p1, Node n, Node p){\n\n super (d, n, p);\n ptrs [0] = p0;\n keys [1] = k1;\n ptrs [1] = p1;\n lastindex = 1;\n\n if (p0 != null) p0.setParent (new Reference (this, 0, false));\n if (p1 != null) p1.setParent (new Reference (this, 1, false));\n }",
"public Node(T data) {this.data = data;}",
"private Node(Object dataPortion) {\n\t\t\tdata = dataPortion;\n\t\t\tnext = null;\n\t\t}",
"public void setModifier(ModifierData modifier) throws IOException\n\t{\n\t\tlong __dna__offset;\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__dna__offset = 0;\n\t\t} else {\n\t\t\t__dna__offset = 0;\n\t\t}\n\t\tif (__io__equals(modifier, __io__address + __dna__offset)) {\n\t\t\treturn;\n\t\t} else if (__io__same__encoding(this, modifier)) {\n\t\t\t__io__native__copy(__io__block, __io__address + __dna__offset, modifier);\n\t\t} else {\n\t\t\t__io__generic__copy( getModifier(), modifier);\n\t\t}\n\t}",
"public void setModifier(ModifierData modifier) throws IOException\n\t{\n\t\tlong __dna__offset;\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__dna__offset = 0;\n\t\t} else {\n\t\t\t__dna__offset = 0;\n\t\t}\n\t\tif (__io__equals(modifier, __io__address + __dna__offset)) {\n\t\t\treturn;\n\t\t} else if (__io__same__encoding(this, modifier)) {\n\t\t\t__io__native__copy(__io__block, __io__address + __dna__offset, modifier);\n\t\t} else {\n\t\t\t__io__generic__copy( getModifier(), modifier);\n\t\t}\n\t}",
"public Node(Node cloneNode) {\n\t\tthis.name = cloneNode.getName();\n\t\tthis.type = cloneNode.getType();\n\t\tthis.setX(cloneNode.getX());\n\t\tthis.setY(cloneNode.getY());\n\t\tthis.position = new Vector2(cloneNode.getPosition());\n\t}",
"private BTNode createNode() {\n BTNode btNode;\n btNode = new <DataPair>BTNode ();\n btNode.mIsLeaf = true;\n btNode.mCurrentKeyNum = 0;\n return btNode;\n }",
"private NodeDB() {\n\t\tNodeInfo me = new NodeInfo();\n\t\tme.alive = true;\n\t\tme.nodecomms = ConfigManager.get().node_interface;\n\t\tme.nodehash = ConfigManager.get().nodehash;\n\t\tme.timestamp = System.currentTimeMillis();\n\t\tthis.update(new NodeDB.NodeInfo[] { me });\n\t\tthis.random = new Random();\n\t\tthis.random.setSeed(System.currentTimeMillis());\n\t}",
"public MapData(String mapName) {\n this.mapName = mapName;\n readFile();\n}",
"public Node(Object data) {\n\t\t\tthis.data = data;\n\t\t}",
"public Reflector(String name0, String permutation0, String notch0,\n char position0) {\n super(name0, permutation0, notch0, position0);\n }",
"protected Node(T dataPortion) {\n data = dataPortion;\n next = null;\n }",
"public TreeImpl(T dato) {\r\n\t\traiz = new NodeImpl<T>(dato, null);// El null dice que es raiz\r\n\t}",
"private Node() {\n\n }",
"public Node(String newdata)\n {\n previous = null;\n next = null;\n data = newdata;\n }",
"public Node(Node<D> n) {\n\t\tdata = n.getData();\n\t\tnext = n.getNext();\n\t}",
"public Node (Person data, Priority priority) {\r\n\t\tthis.priorityLevel = priority;\r\n\t\tthis.data = data;\r\n\t}",
"public Node(int data) {\n payload = data;\n priority = 0;\n }",
"private void constructMirrorEdge(Edge edge) {\n MirrorEdge mirrorEdge = new MirrorEdge();\n mirrorEdge.original = edge;\n mirrorEdge.source = edge.source();\n mirrorEdge.target = edge.target();\n directEdgeMap.put(edge, mirrorEdge);\n }",
"private void init(String command) {\n if (command == null) throw new IllegalArgumentException(\"Empty command\");\n this.raw = command;\n\n String[] data = this.raw.split(\" \");\n this.map = new HashMap<>();\n for ( int i = 0; i < data.length; i++) {\n map.put( Index.values()[i], data[i] );\n }\n }",
"public DescriptorCacheImpl() {\n super();\n \n LOG2.debug(\"New instance!\");\n \n _typeMap = new HashMap();\n _xmlNameMap = new HashMap();\n _missingTypes = new ArrayList();\n }",
"public JSONNode() {\n map = new HashMap<>();\n }",
"public Node (String newW ) {\n word = newW;\n left = null;\n right = null;\n freq = 0;\n }",
"public void initNodeReferenceData(Map<String, Set<String>> pathwayToData) {\n// Set<String> keySet = pathwayToData.keySet();\n// RandomData random = new RandomDataImpl(new JDKRandomGenerator());\n// int sampleSize = Math.min(nodeList.size(), keySet.size());\n// Object[] sample = random.nextSample(keySet, sampleSize);\n// for (int i = 0; i < sampleSize; i++) {\n// ReferenceNode node = nodeList.get(i);\n// // Objects in sample are String\n// node.setReferenceData(pathwayToData.get(sample[i].toString()));\n// }\n // Implement a new way to random reference data\n // Find the average size\n Set<String> allDataPoints = new HashSet<String>();\n for (Iterator<String> it = pathwayToData.keySet().iterator(); it.hasNext();) {\n String pathway = it.next();\n Set<String> data = pathwayToData.get(pathway);\n allDataPoints.addAll(data);\n }\n int averageSize = allDataPoints.size() / pathwayToData.size();\n Random seeder = new Random();\n RandomDataImpl sampler = new RandomDataImpl();\n for (ReferenceNode node : nodeList) {\n sampler.reSeedSecure(seeder.nextLong());\n Object[] sample = sampler.nextSample(allDataPoints, averageSize);\n Set<String> set = new HashSet<String>();\n for (Object obj : sample)\n set.add(obj.toString());\n //node.setReferenceData(set);\n node.addInputReferenceData(set);\n }\n }",
"public TreeNode(T nodeData){\n data = nodeData;\n leftNode = rightNode = null;\n }",
"protected IndigoReactionAutomapperNodeModel() {\n super(1, 2);\n }",
"public Matchdata()\n {\n }",
"public Node()\n {\n \n name = new String();\n type = new String(\"internal\"); //Initial Node type set to internal\n length = new Double(0); //Set initial branch length to zero\n children = new ArrayList<Node>();\n level = 0;\n treesize = new Double(0);\n depth = 0;\n newicklength = 0;\n startycoord = -1;\n startxcoord = -1;\n endxcoord = -1;\n endycoord = -1;\n standardy = -1;\n selected = false;\n xmultiplier = 0;\n ymultiplier = 0;\n }",
"public Node(T data) {\n this(data, null, null, null);\n }",
"public Node(T data) {\r\n this.data = data;\r\n }",
"public RepositoryParser() {\n pageElementsMap = new HashMap<String, Map<String, PageElement>>();\n }",
"Node(T data) {\n\t\t\tthis(data, null);\n\t\t}",
"public Node(Node< ? > node)\n {\n id = node.getId();\n name = node.getName();\n idVirtualAppliance = node.getIdVirtualAppliance();\n nodeType = node.getNodeType();\n posX = node.getPosX();\n posY = node.getPosY();\n modified = node.getModified();\n }",
"private static <T> Map<Character,Node<T>> newNodeMap(Map<Character,Node<T>> prev)\n\t\t{\n\t\t\treturn new HashMap<Character,Node<T>>(prev);\n\t\t}",
"public DataDiscord(Main main) {\n String DEFAULT_NAME = \"Bot\";\n String DEFAULT_TOKEN = \"42\";\n long DEFAULT_ID = 42L;\n\n FileManager file = new FileManager(main, \"discord.yml\");\n file.write(\"version\", main.getDescription().getVersion());\n\n if (file.read(\"name\") == null) file.write(\"name\", DEFAULT_NAME);\n if (file.read(\"token\") == null) file.write(\"token\", DEFAULT_TOKEN);\n if (file.read(\"id\") == null) file.write(\"id\", DEFAULT_ID);\n\n name = (String) file.read(\"name\");\n token = (String) file.read(\"token\");\n id = (long) file.read(\"id\");\n }",
"public Node(T data, Node<T> parent, Node<T> left, Node<T> right) {\n this.data = data;\n this.parent = parent;\n this.left = left;\n this.right = right;\n }",
"private DungeonRecord(Parcel in){\n _id = in.readLong();\n mDate = in.readString();\n mType = in.readString();\n mOutcome = in.readInt();\n mDistance = in.readInt();\n mTime = in.readInt();\n mReward = in.readString();\n mCoords = in.readString();\n mSkips = in.readString();\n\n }",
"Node(int d) {\n data = d;\n left = null;\n right = null;\n }",
"private void init() throws UnknownHostException, RemoteException {\n\n FileApp.setMapper(this);\n predKey = 0;\n toDistribute = readNodeEntries();\n //System.out.println(\"Mapper.init() :: toDistribute=\"+toDistribute);\n }",
"public RegionTransitionData() {}",
"public Node(\n final String name,\n final String missionDescription,\n final Set<Role> roles,\n final boolean isNetworkSingleton) {\n //Preconditions\n assert StringUtils.isNonEmptyString(name) : \"name must be a non-null string\";\n assert StringUtils.isNonEmptyString(missionDescription) : \"name must be a non-null missionDescription\";\n assert roles != null : \"roles must not be null\";\n assert !roles.isEmpty() : \"roles must not be empty\";\n\n this.name = name;\n this.missionDescription = missionDescription;\n this.roles = roles;\n this.isNetworkSingleton = isNetworkSingleton;\n this.stateValueBindings = new HashSet<>();\n }",
"public MDS() {\n\t\ttreeMap = new TreeMap<>();\n\t\thashMap = new HashMap<>();\n\t}",
"public Node(T data) {\n\n this.data = data;\n\n\n }",
"public void Mirror() {\n\t\t\r\n\t}",
"public BinaryNode(String dataPortion) {\n\t\tthis(dataPortion, null, null);\t\t\t// Call next constructor\n\t}",
"public Plane() {\r\n\t\tvecX = new Vector3D();\r\n\t\tvecY = new Vector3D();\r\n\t\tnorm = new Vector3D();\r\n\t\tthis.setD(0);\r\n\t\tpos = new Position3D();\r\n\t}",
"public Node(T data){\n this.data = data;\n }",
"private void instantiate(){\n inputAddressList = new LinkedList<Address>();\n inputGroupList = new LinkedList<Group>();\n root = new Group(\"root\", 0);\n }",
"public Node(){}",
"@Override\n\tpublic DataType clone(DataTypeManager dtm) {\n\t\tStructureDataType struct =\n\t\t\tnew StructureDataType(getCategoryPath(), getName(), getLength(), getUniversalID(),\n\t\t\t\tgetSourceArchive(), getLastChangeTime(), getLastChangeTimeInSourceArchive(), dtm);\n\t\tstruct.setDescription(getDescription());\n\t\tstruct.replaceWith(this);\n\t\treturn struct;\n\t}",
"private static HoReCa createFromTpAccess(Node tpAccessNode)\n {\n HoReCa retVal = null;\n\n String title = tpAccessNode.getTitle();\n String description = tpAccessNode.getField_omschrijving_nl();\n String address = null;\n String postalCode = null;\n String city = null;\n if (tpAccessNode.getAddress() != null && !tpAccessNode.getAddress().isEmpty()) {\n NodeAddress nodeAddress = tpAccessNode.getAddress().iterator().next();\n if (nodeAddress != null) {\n address = \"\" + (nodeAddress.getField_straatnaam() == null ? \"\" : nodeAddress.getField_straatnaam())\n + \" \" + (nodeAddress.getField_huisnummer() == null ? \"\" : nodeAddress.getField_huisnummer());\n postalCode = nodeAddress.getField_postcode();\n city = nodeAddress.getField_gemeente();\n }\n }\n\n String phoneNumber = null;\n String email = null;\n String website = null;\n\n MapLocation location = null;\n if (tpAccessNode.getCoordinates() != null && !tpAccessNode.getCoordinates().isEmpty()) {\n NodeCoordinates nodeCoordinates = tpAccessNode.getCoordinates().iterator().next();\n if (nodeCoordinates != null) {\n try {\n location = new MapLocation(Double.parseDouble(nodeCoordinates.getLatitude()), Double.parseDouble(nodeCoordinates.getLongitude()));\n }\n catch (NumberFormatException e) {\n Logger.warn(\"Unable to parse coordinates of TPAccess node with ID \" + tpAccessNode.getNid());\n }\n }\n }\n\n Media[] media = null;\n if (tpAccessNode.getImages() != null && !tpAccessNode.getImages().isEmpty()) {\n List<Media> mediaList = new ArrayList<>();\n for (Image image : tpAccessNode.getImages()) {\n mediaList.add(new com.beligum.thomasmore.mobielegidsen.beans.app.Image(URI.create(\"/webhdfs/v1/assets/images/app/routes/dorpswandeling-terhagen/poort-de-beukelaer/1.jpg\")));\n }\n }\n\n if (tpAccessNode.getTypeCode().equals(TPAccessRepository.TYPE_CODE_HOTEL)) {\n retVal = new Hotel(title, address, postalCode, city, phoneNumber, email, website, location, media, description);\n }\n else if (tpAccessNode.getTypeCode().equals(TPAccessRepository.TYPE_CODE_HOTEL)) {\n retVal = new Restaurant(title, address, postalCode, city, phoneNumber, email, website, location, media, description);\n }\n\n return retVal;\n }",
"public View() {\n\t\tlastBlk = new HashMap<>();\n\t\tstate = new HashMap<>();\n\t\tbalance = new HashMap<>();\n\t\tmode = new HashMap<>();\n\t\ttoken = new HashMap<>();\n\t}",
"private static <T> Map<Character,Node<T>> newNodeMap()\n\t\t{\n\t\t\treturn new HashMap<Character,Node<T>>();\n\t\t}",
"public Node()\r\n {\r\n initialize(null);\r\n lbl = id;\r\n }",
"private Rotor readRotor() {\n try {\n String currCycle = _config.next();\n String permutation = \"\";\n while (currCycle.contains(\"(\")) {\n if (!currCycle.contains(\")\") || currCycle.contains(\"*\")) {\n throw error(\"Wrong cycle format\");\n }\n if (_config.hasNext()) {\n permutation = permutation + currCycle;\n currCycle = _config.next();\n } else if (!_config.hasNext()) {\n permutation = permutation + currCycle;\n break;\n }\n }\n String tempname = _name.toUpperCase();\n if (_config.hasNext()) {\n _name = currCycle;\n }\n if (notches.charAt(0) == 'M') {\n return new MovingRotor(tempname,\n new Permutation(permutation, _alphabet),\n notches.substring(1));\n } else if (notches.charAt(0) == 'N') {\n return new FixedRotor(tempname,\n new Permutation(permutation, _alphabet));\n } else {\n return new Reflector(tempname,\n new Permutation(permutation, _alphabet));\n }\n } catch (NoSuchElementException excp) {\n throw error(\"bad rotor description\");\n }\n }",
"public Node(E data) {\r\n\t\tthis.data = data;\r\n\t}",
"public TurtleMapDescriptor() {}",
"public Model(DataHandler data){\n //assign the data parameter to the instance\n //level variable data. The scope of the parameter\n //is within the method and that is where the JVM \n //looks first for a variable or parameter so we \n //need to specify that the instance level variable \n //is to be used by using the keyword 'this' followed \n //by the '.' operator.\n this.data = data;\n }",
"@Override\n protected void readFromArgs(PacketArgs args) {\n this.creator = args.getString(0);\n }",
"private ModifierChange(\n final String changeText,\n final int srcStart,\n final int srcLength,\n final int dstStart,\n final int dstLength, final int priority) {\n super(changeText, ChangeType.MODIFIER, srcStart, srcLength, dstStart, dstLength);\n this.changePriority = priority;\n }",
"public Node() {\r\n\t}",
"public Node() {\r\n\t}",
"private Node(E dataItem)\n {\n data = dataItem;\n next = null;\n }",
"public TreeDictionary() {\n\t\t\n\t}",
"public Pattern(Delta... pattern)\n {\n assert(pattern.length > 0);\n\n _pattern = pattern;\n _index = 0;\n }",
"public Regular(Node t) {\n }",
"public DataNodeTable() {\r\n\t\tnodeMap = new HashMap<String, NodeRef>();\r\n\t}",
"public MyNode() {\r\n\t\tdefine(\"load\",new Integer(getID()),true);\r\n }",
"public TreeNode deserialize(String data) {\n return build(new Scanner(data));\n }",
"public Node(E data, Node<E> link) {\r\n\t\tthis.data = data;\r\n\t\tthis.link = link;\r\n\t\tthis.counter = 0;\r\n\t}",
"ROp() {super(null); _ops=new HashMap<>(); }",
"public Node() {}",
"public Node() {}",
"public Node() {}"
] |
[
"0.51930255",
"0.5042065",
"0.48803726",
"0.48518702",
"0.4796629",
"0.47775087",
"0.476264",
"0.47405535",
"0.47129685",
"0.47014093",
"0.46705955",
"0.46569684",
"0.46482506",
"0.46445397",
"0.4629687",
"0.46258676",
"0.46222237",
"0.46015716",
"0.45707586",
"0.4543647",
"0.45373312",
"0.4526933",
"0.45068744",
"0.45068744",
"0.44908953",
"0.44892162",
"0.44854203",
"0.44810635",
"0.44805843",
"0.44800326",
"0.44800326",
"0.44752514",
"0.44677198",
"0.44537702",
"0.44535643",
"0.44525066",
"0.44420227",
"0.44323045",
"0.4431084",
"0.44220546",
"0.44164872",
"0.44022954",
"0.4391879",
"0.43916953",
"0.43892136",
"0.4383642",
"0.43829745",
"0.4381145",
"0.43752414",
"0.43671185",
"0.43625945",
"0.43610346",
"0.43586528",
"0.4349316",
"0.43491894",
"0.43452254",
"0.43446833",
"0.43402445",
"0.43400475",
"0.4339714",
"0.43377963",
"0.43126032",
"0.4310953",
"0.43081355",
"0.43052253",
"0.43044752",
"0.43024606",
"0.42989457",
"0.42985636",
"0.4297263",
"0.42966855",
"0.4290888",
"0.4288475",
"0.42868638",
"0.42836016",
"0.42816702",
"0.42773715",
"0.4275096",
"0.42691046",
"0.42601085",
"0.42576143",
"0.42561147",
"0.42519444",
"0.42452037",
"0.4243328",
"0.42405427",
"0.42397892",
"0.42397892",
"0.4238746",
"0.42376637",
"0.423408",
"0.42331386",
"0.42312324",
"0.42309466",
"0.42259073",
"0.42255288",
"0.4225456",
"0.42240718",
"0.42240718",
"0.42240718"
] |
0.6159965
|
0
|
testRemaining(); testmark(); allocateTest(); flipFunTest(); clearFunTest(); rewindFunTest();
|
public static void main(String[] args) {
markFunTest();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void doTests()\n {\n doDeleteTest(); // doSelectTest();\n }",
"public void testReset() {\n\t}",
"void test02(){\n\t}",
"private void test() {\n\n\t}",
"@Test\n public void test() {\n\n testBookExample();\n // testK5();\n // testK3_3();\n }",
"public static void resetTestCount() {\n mTestCount = 0;\n }",
"@Test\n\tpublic void testGive20Back() {\n\t\n\t}",
"public void test() {\n\t}",
"public void test5() {\n\t\t\n\t}",
"@Test\n public void testUndo(){\n //TODO\n }",
"@Test\n\tpublic void testUndo()\n\t{\n\t}",
"private void runAllTests(){\n System.out.println(\"------ RUNNING TESTS ------\\n\");\n testAdd(); // call tests for add(int element)\n testGet(); // tests if the values were inserted correctly\n testSize(); // call tests for size()\n testRemove(); // call tests for remove(int index)\n testAddAtIndex(); // call tests for add(int index, int element)\n\n // This code below will test that the program can read the file\n // and store the values into an array. This array will then be sorted\n // by the insertionSort and it should write the sorted data back into the file\n\n testReadFile(); // call tests for readFile(String filename)\n testInsertionSort(); // call tests for insertionSort()\n testSaveFile(); // call tests for saveFile(String filename)\n System.out.println(\"\\n----- TESTING COMPLETE ----- \");\n }",
"@Override\n public void runTest() {\n }",
"@Override\n\tpublic void test() {\n\t\t\n\t}",
"@Test\n public void testNextWaiting() {\n }",
"private void testMethod(){jnkkjnknk\n //Jocke\n //jocke2\n //pew\n //testcommit\n\n }",
"protected void runTest() {\n\t\trunTest(getIterations());\n\t}",
"@Test\n public void testClearingStats() {\n innerClear();\n innerClear();\n }",
"public void testPerformance() {\n \t}",
"public static void incTestCount() {\n mTestCount++;\n }",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"@Test\n public void abandonFight() {\n }",
"public void testOperation();",
"private test5() {\r\n\t\r\n\t}",
"private void test2(){\n\t}",
"public void test();",
"public void test();",
"public void test() {\n }",
"public void test() {\n }",
"@Test\n public void testUndo1() {\n System.out.println(\"testUndo\");\n Counter myCounter = new Counter(10);\n int expResult = 0;\n myCounter.undo();\n int result = myCounter.getCount();\n assertEquals(expResult, result);\n }",
"@Test(timeout = 4000)\n public void test06() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n MockFile mockFile0 = new MockFile(\"l<\", \"l<\");\n mockFile0.delete();\n fileUtil0.isAgeGood(mockFile0);\n fileUtil0.fetchASINFile(\"QS|v?htZLQ_f\\\"4\", \"cacheLife\", \"k_\", \"cacheDir\");\n fileUtil0.getBrowseNodeFile(\"cacheDir\", \"cacheDir\", \"cacheDir\");\n fileUtil0.fetchThirdPartySearchFile(\"l<\", \"l<\", \"QS|v?htZLQ_f\\\"4\", \"3rd_\");\n fileUtil0.getASINFile(\"cacheDir\", \"\", \"\", (String) null);\n fileUtil0.deleteFile(\"k_\");\n }",
"public void testLizard(){\n }",
"@Test\n public void testGetNext() throws Exception {\n//TODO: Test goes here... \n }",
"@Test\n public void doTest3() {\n }",
"@Test\r\n public void testRentOut() {\r\n }",
"public void test(){\n }",
"public void TestMain(){\n SampleStatements();\n TestMyPow();\n }",
"public interface FastTest {\n}",
"@Test\n public void doTest4() {\n }",
"@Test\n\tvoid test() {\n\t\tTable[] myTables = new Table[5];\n\t\tfor(int i = 0; i < myTables.length; i++) {\n\t\t\tmyTables[i] = new Table(i);\n\t\t}\n\t\tBusBoy busBoy = new BusBoy(myTables);\n\t\tSystem.out.println(myTables[0]);\n\t\tassert(myTables[0].toString().equals(\"ReadyTable\"));\n\t\tmyTables[0].nextState();\n\t\tassert(myTables[0].toString().equals(\"InUseTable\"));\n\t\tmyTables[0].nextState();\n\t\tSystem.out.println(busBoy.tablesToClean.peek());\n\t\tSystem.out.println(myTables[0]);\n\t\tassertEquals(busBoy.tablesToClean.peek(), myTables[0]);\n\t\tmyTables[0].nextState();\n\t\tassert(myTables[0].toString().equals(\"BeingCleanedTable\"));\n\t}",
"public static void main (String[] args){\n\t\tincPieceCountTest();\n\t\tdecPieceCountTest();\n\t\tsetPieceTest();\n\t\tmoveTest();\n\t\tanyMoveTest();\n\t\tgetPiecesTest();\n\t\tsetPieceTest2();\n\t}",
"public static void dummyTest(){}",
"public static void dummyTest(){}",
"public void test() {\n\n }",
"public void testaReclamacao() {\n\t}",
"public void testDummy()\n {\n }",
"public interface FunctionTest {\n public void testReport(int succCount, int actualSize);\n}",
"static void testCaculator(){\n }",
"public void incrementerTest() {\n\t\tthis.nbTests++;\n\t}",
"@Test\n\tvoid test() {\n\t\t\n\t}",
"@Test\n public void testTimelyTest() {\n }",
"@Test\n public void resetTest() {\n Deck deck = new DeckImplementation();\n for (int i = 0; i < 50; i++) {\n deck.drawACard();\n }\n deck.reset();\n\n assertEquals(\"Deck did not reset to correct size\", 180,\n deck.numberOfCardsRemaining());\n }",
"public void testDumbJUnit() {\n }",
"void teardown();",
"void teardown();",
"@Test\r\n\tpublic void testSanity() {\n\t}",
"public ResultatTest() {\n\t\tthis.nbTests = 0;\n\t\tthis.echecs = new ArrayList<TestExecute>();\n\t\tthis.erreurs = new ArrayList<TestExecute>();\n\t}",
"@Test\n void test() {\n Game g = init(\"gen_2p_02\");\n List<Player> players = g.getData().getPlayers();\n wrappedIllegalCommand(g, players.get(0), \"tool 6\");\n wrappedLegalCommand(g, players.get(0), \"pick 1\");\n assertTrue(g.isUndoAvailable());\n wrappedLegalCommand(g, players.get(0), \"tool 6\");\n assertFalse(g.isUndoAvailable());\n lightestShade(g, players);\n notLightestShade(g, players);\n }",
"protected void runAfterTest() {}",
"@Test\n\tfinal void test() {\n\t}",
"public void testDummy() {\n }",
"@Test\n public void test() throws Exception {\n// diversifiedRankingxPM2()\n diversifiedRankingxQuAD();\n }",
"@Override\n public void test() {\n \n }",
"public void soaktest() {\n\t\ttry {\n\t\t\tint errCount = 0;\n\n\t\t\tfor (int i = 1; i <= 100; i++) {\n\t\t\t\tRegression test = new Regression();\n\t\t\t\ttest0();\n\t\t\t\ttest.test1(m1);\n\t\t\t\ttest.test2(m1);\n\t\t\t\ttest.test3(m1);\n\t\t\t\ttest.test4(m1);\n\t\t\t\ttest.test5(m1);\n\t\t\t\ttest.test6(m1);\n\t\t\t\ttest.test7(m1, m2);\n\t\t\t\ttest.test8(m1);\n\t\t\t\ttest.test9(m2);\n\t\t\t\ttest.test10(m3);\n\t\t\t\ttest.test11(m1, m2);\n\t\t\t\ttest.test12(m1);\n\t\t\t\ttest.test13(m1);\n\t\t\t\ttest.test14(m1);\n\t\t\t\ttest.test15(m1);\n\t\t\t\ttest.test16(m1);\n\t\t\t\ttest.test17(m1);\n\t\t\t\ttest.test18(m4);\n\t\t\t\ttest.test19(m2, m3);\n\t\t\t\ttest.test97(m1);\n\t\t\t\tif (test.getErrors())\n\t\t\t\t\terrCount++;\n\t\t\t\tif ((i % 10) == 0) {\n\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\"error count = \" + errCount + \" rounds = \" + i);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\tassertTrue(false);\n\t\t}\n\t}",
"@Test\n public void testcancelwithoutrefund()\n {\n\n BusinessManager businessManager = new BusinessManager();\n\n //how do i test void\n //how to i move back to current\n //assertEquals(businessManager.cancelConfirm(\"yes\"), );\n\n\n }",
"public void load_game() {\n testing();\n}",
"@Test\n void displayIncompleteTasks() {\n }",
"public static void main(String[] args) {\n\t\ttest4();\n//\t\ttest7();\n//\t\ttest8();\n//\t\ttest9();\n//\t\ttest10();\n//\t\ttest11();\n//\t\t test13() ;\n\t}",
"@Before\n\tpublic void testEachSetup() {\n\t\ttestGrid = new Grid(50,50);\n\t\tundoRedo_TestStack = new UndoRedo();\n\t\tSystem.out.println(\"Setting up test...\");\n\t}",
"public static void UnitTests() {\n System.out.println(\"---\");\n\n int input = 0;\n boolean running = true;\n\n while(running) {\n System.out.println(\"1. Test Layer Class\\n2. Test NeuralNetwork Class\\n3. Go Back\\n\");\n input = getInput();\n switch (input) {\n case 1:\n UnitTests.testLayers();\n break;\n case 2:\n UnitTests.testNeuralNetwork();\n break;\n case 3:\n running = false;\n break;\n default:\n System.out.println(\"That's not an option.\");\n }\n }\n\n System.out.println(\"---\\n\");\n }",
"@Test\n public void testingTheSixFlatbed2017Order() {\n }",
"public interface SlowTests {\n \n}",
"@Test\n\tpublic void testTotalPuzzleGenerated() {\n\t}",
"@Test\n public void proximaSequencia(){\n\n }",
"@Test\n public void testShuffle() {\n System.out.println(\"shuffle\");\n // can't really test something random\n }",
"@Test\n public void sustainMassiveDamage() {\n }",
"public void selfTest() {\n \n \n \n /**\n * TESTING CONFIGURATION RIGHT HERE:\n */\n int total = 1; //How many tests should we run\n int start = 0; //The first test to run\n //TestStubs.storePrints(); //store prints until the end\n TestStubs.displayDebugWhileTesting(false); //shows all the debug prints (with context switches) if set to true\n \n \n //MemoryMap.selfTest();\n //Swap.selfTest();\n \n UserProcess.testing = true;\n TestStubs.debugPrint(\"SELF TESTING VMKERNEL!\");\n \n int passed = 0;\n \n for (int i = 0; i < total; i++) {\n if (runTest(i+start))\n passed += 1;\n }\n \n if (passed != total) {\n TestStubs.debugPrint(\"SOME TESTS FAILED! \" + passed + \"/\" + total + \" passed.\");\n } else {\n TestStubs.debugPrint(\"ALL TESTS PASSED! \" + passed + \"/\" + total + \" passed.\");\n }\n \n UserProcess.testing = false;\n \n\n \n //System.out.println(TestStubs.getStoredPrints());\n //TestStubs.clearAndDontStorePrints();\n \n if (passed != total) {\n System.out.flush();\n /// kernel.terminate();\n }\n \n TestStubs.disable();\n \n }",
"public static void run() {\n testAlgorithmOptimality();\n// BenchmarkGraphSets.testMapLoading();\n //testAgainstReferenceAlgorithm();\n //countTautPaths();\n// other();\n// testLOSScan();\n //testRPSScan();\n }",
"@Test\n public void reopenClosedTeamUnavalableOption() {\n\n }",
"public abstract void test();",
"public abstract void test();",
"public static boolean runAllTests() {\r\n\r\n return testLinkedCart() && testAlphabetListConstructorIsEmpty()\r\n && testAlphabetListConstructorBadInput() && testAlphabetListAddBadInput1()&&\r\n testAlphabetListAddBadInput2()&&testAlphabetListAddBadInput2()&&\r\n testAlphabetListAdd() && testAlphabetListRemove();\r\n }",
"public void testDummy() {\n }",
"@Override\n public void tests() {\n System.out.println(\"222222222222222222\"); \n }",
"public void testAct() {\n\t\tSystem.out.println(\"RothErevAgentTest.testAct()\");\n\t\tSystem.out.print(\"\tInitial: \");\n\t\tRELearner learner = agent.getLearner();\n\t\tREPolicy policy = learner.getPolicy();\n\t\tdouble[] probs = policy.getProbabilities();\n\t\tfor (int j = 0; j < probs.length; j++)\n\t\t\tSystem.out.print(probs[j] + \", \");\n\t\tSystem.out.println();\n\n\t\tSimpleAction<Integer> nextAction;\n\t\tint index;\n\n\t\tSimpleAction<Integer> benchmark_nextAction;\n\t\tint benchmark_index;\n\n\t\tfor (int i = 0; i < 100; i++) {\n\t\t\tnextAction = agent.chooseAction();\n\t\t\tindex = nextAction.getAct();\n\t\t\tagent.receiveFeedback(rewards[index]);\n\n\t\t\tbenchmark_nextAction = benchmark_learner.chooseAction();\n\t\t\tbenchmark_index = benchmark_nextAction.getAct();\n\t\t\tbenchmark_learner.update(rewards[benchmark_index]);\n\n\t\t\tassertEquals(index, benchmark_index);\n\t\t\tassertEquals(agent.getLearner().getUpdateCount(), i + 1);\n\n\t\t\tprobs = agent.getLearner().getPolicy().getProbabilities();\n\t\t\tSystem.out.print(\"\t\" + index + \"\t\");\n\t\t\tfor (int j = 0; j < probs.length; j++)\n\t\t\t\tSystem.out.print(probs[j] + \", \");\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"@Test\n\tpublic void test4() {\n\t}",
"protected void TestProcess() {\n\t\tchangeCPUWDStatus(false);\n\t\twhile (testIsNotDoneStatus) {\n\t\t\tresetParams();\n\t\t\ttry {\n\t\t\t\tif (!startTrafficAndSample()) {\n\t\t\t\t\ttestIsNotDoneStatus = false;\n\t\t\t\t\tresetTestBol = false;\n\t\t\t\t\texceptionThrown = true;\n\t\t\t\t\tGeneralUtils.stopAllLevels();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\treport.report(\"Stopping Parallel Commands From Java Exception\" + e.getMessage());\t\t\t\t\n\t\t\t\ttestIsNotDoneStatus = false;\n\t\t\t\tresetTestBol = false;\n\t\t\t\texceptionThrown = true;\n\t\t\t\treason = \"network connection Error\";\n\t\t\t\treport.report(e.getMessage() + \" caused Test to stop\", Reporter.FAIL);\n\t\t\t\te.printStackTrace();\n\t\t\t\tGeneralUtils.stopAllLevels();\n\t\t\t}\n\t\t\tif (resetTestBol) {\n\t\t\t\tnumberOfResets++;\n\t\t\t\tif (syncCommands != null) {\n\t\t\t\t\treport.report(\"Stopping Parallel Commands\");\n\t\t\t\t\tsyncCommands.stopCommands();\n\t\t\t\t}\n\t\t\t\tmakeThreadObjectFinish();\n\t\t\t\tif (syncCommands != null) {\n\t\t\t\t\treport.report(\"Commands File Path: \" + syncCommands.getFile());\n\t\t\t\t}\n\t\t\t\ttestIsNotDoneStatus = true;\n\t\t\t\t// stop level\n\t\t\t\ttry {\n\t\t\t\t\tif (syncCommands != null) {\n\t\t\t\t\t\tsyncCommands.moveFileToReporterAndAddLink();\n\t\t\t\t\t}\n\t\t\t\t\treport.report(\"Stopping Traffic\");\n\t\t\t\t\ttrafficSTC.stopTraffic();\n\t\t\t\t\ttrafficSTC.addResultFilesToReport(String.valueOf(numberOfResets));\n\t\t\t\t\treport.report(\"Resetting test\", Reporter.WARNING);\n\t\t\t\t\treason = \"reset Test because of stream halt\";\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (numberOfResets >= 3) {\n\t\t\t// using this flag in order to NOT print results.\n\t\t\ttestIsNotDoneStatus = false;\n\t\t\tprintResultsForTest = false;\n\t\t\treport.report(\"Test Was Reseted Too many times because of more then \" + PRECENT_OF_UE_RESET + \"%\"\n\t\t\t\t\t+ \" Of the Streams are in Halt - check Setup\", Reporter.FAIL);\n\t\t\treason = \"Test Was Restarted Too many Times due to Traffic halt\";\n\t\t}\n\t\ttry {\n\t\t\tif (syncCommands != null) {\n\t\t\t\tsyncCommands.stopCommands();\n\t\t\t}\n\t\t} catch (Exception e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tmakeThreadObjectFinish();\n\t\ttry {\n\t\t\tif (syncCommands != null) {\n\t\t\t\tsyncCommands.moveFileToReporterAndAddLink();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\treport.report(\"Exception in ReporterHelper.copyFileToReporterAndAddLink could not attach Command File\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tchangeCPUWDStatus(true);\n\t}",
"@AfterAll\n static void cleanOperate()\n { \n //clear reference of operate after all the tests done\n operate = null;\n System.out.println(\"only After all the tests....\");\n }",
"protected void assertCallbacksReset()\n {\n int expectedCalls = 0;\n this.assertCallsExpected(expectedCalls);\n }",
"private static void initTestOffset() {\n ArtMethodSizeTest.method1();\n ArtMethodSizeTest.method2();\n // get test methods\n try {\n testOffsetMethod1 = ArtMethodSizeTest.class.getDeclaredMethod(\"method1\");\n testOffsetMethod2 = ArtMethodSizeTest.class.getDeclaredMethod(\"method2\");\n } catch (NoSuchMethodException e) {\n throw new RuntimeException(\"SandHook init error\", e);\n }\n initTestAccessFlag();\n }",
"public interface BackTestService {\n\n BackTestResult doSimulationBackTest (String code, Symbol symbol, Period period, Date startDate, Date endDate)\n throws PrerequisiteException;\n\n BackTestResult doBackTest(String code, Symbol symbol, Period period, Date startDate, Date endDate)\n throws PrerequisiteException;\n\n BackTestResult doBackTest(SignalGenerator signalGenerator, Symbol symbol, Period period, Date startDate, Date endDate)\n throws PrerequisiteException;\n\n boolean doBackTestAndSave(SignalGenerator signalGenerator, Symbol symbol, Period period, Date startDate, Date endDate)\n throws PrerequisiteException;;\n}",
"@Test\n public void testTankMoveLeftRight() {\n tank.moveRight();\n tank.notMoveLeft();\n tank.tick();\n assertEquals(tank.x(), 321);\n tank.tick();\n tank.tick();\n tank.tick();\n assertEquals(tank.x(), 324);\n\n tank.moveLeft();\n tank.notMoveRight();\n tank.tick();\n tank.tick();\n assertEquals(tank.x(), 322);\n }",
"protected TestBench() {}",
"void testMethod() {\n f();\n }",
"public FunctionsTest( String testName )\r\n {\r\n super( testName );\r\n }",
"@Test\n public void test8(){\n\n }",
"@Test\n\tpublic void t3() {\n\n\t\tlogger.info(\"start\");\n\n\t\ttestFinalize();\n\t\tSystem.gc();\n\n\t\tlogger.info(\"done\");\n\n\t}",
"@Test\n public void test11() {\n cashRegister.addPennies(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n cashRegister.addDimes(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n cashRegister.addDimes(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n cashRegister.addFives(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n cashRegister.addNickels(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n cashRegister.addOnes(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n cashRegister.addQuarters(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n cashRegister.addTens(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n }",
"@Test\n void cupTesting() {\n Assertions.assertFalse(machine.isCupPositioned());\n Assertions.assertFalse(machine.removeCup());\n\n Assertions.assertDoesNotThrow(() -> machine.positionCup());\n\n Assertions.assertTrue(machine.removeCup());\n Assertions.assertFalse(machine.isCupPositioned());\n machine.setCupPositioned(true);\n Assertions.assertTrue(machine.isCupPositioned());\n\n }",
"@Test\n public void testObject()\n throws Exception\n {\n initialize();\n genericTests();\n for (int i = 0; i < 10; i++)\n {\n permutateObjects();\n genericTests();\n } // for\n }",
"private JumbleResult runInitialTests(List testClassNames) {\n mMutationCount = countMutationPoints();\n if (mMutationCount == -1) {\n return new InterfaceResult(mClassName);\n }\n \n Class[] testClasses = new Class[testClassNames.size()];\n for (int i = 0; i < testClasses.length; i++) {\n try {\n testClasses[i] = Class.forName((String) testClassNames.get(i));\n } catch (ClassNotFoundException e) {\n // test class did not exist\n return new MissingTestsTestResult(mClassName, testClassNames, mMutationCount);\n }\n }\n \n try {\n // RED ALERT - heinous reflective execution of the initial tests in\n // another classloader\n assert Debug.println(\"Parent. Starting initial run without mutating\");\n MutatingClassLoader jumbler = new MutatingClassLoader(mClassName, createMutater(-1));\n Class suiteClazz = jumbler.loadClass(\"jumble.fast.TimingTestSuite\");\n Object suiteObj = suiteClazz.getDeclaredConstructor(new Class[] {List.class }).newInstance(new Object[] {testClassNames });\n Class trClazz = jumbler.loadClass(TestResult.class.getName());\n Class jtrClazz = jumbler.loadClass(JUnitTestResult.class.getName());\n Object trObj = jtrClazz.newInstance();\n suiteClazz.getMethod(\"run\", new Class[] {trClazz }).invoke(suiteObj, new Object[] {trObj });\n boolean successful = ((Boolean) trClazz.getMethod(\"wasSuccessful\", new Class[] {}).invoke(trObj, new Object[] {})).booleanValue();\n assert Debug.println(\"Parent. Finished\");\n \n // Now, if the tests failed, can return straight away\n if (!successful) {\n if (mVerbose) {\n System.err.println(trObj);\n }\n return new BrokenTestsTestResult(mClassName, testClassNames, mMutationCount);\n }\n \n // Set the test runtime so we can calculate timeouts when running the\n // mutated tests\n mTotalRuntime = ((Long) suiteClazz.getMethod(\"getTotalRuntime\", new Class[] {}).invoke(suiteObj, new Object[] {})).longValue();\n \n // Store the test suite information serialized in a temporary file so\n // FastJumbler can load it.\n Object order = suiteClazz.getMethod(\"getOrder\", new Class[] {Boolean.TYPE }).invoke(suiteObj, new Object[] {Boolean.valueOf(mOrdered) });\n ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(mTestSuiteFile));\n oos.writeObject(order);\n oos.close();\n \n } catch (RuntimeException e) {\n throw e;\n } catch (Exception e) {\n RuntimeException r = new IllegalStateException(\"Problem using reflection to set up run under another classloader\");\n r.initCause(e);\n throw r;\n }\n \n return null;\n }"
] |
[
"0.69104755",
"0.68086517",
"0.67845976",
"0.6542514",
"0.63691837",
"0.6312736",
"0.62872124",
"0.62846696",
"0.62129235",
"0.6145084",
"0.614492",
"0.614407",
"0.6138511",
"0.61304647",
"0.6129774",
"0.6124357",
"0.6111207",
"0.60817915",
"0.60418004",
"0.6025298",
"0.6022385",
"0.60168695",
"0.6012889",
"0.5982587",
"0.5965246",
"0.59533405",
"0.59533405",
"0.594437",
"0.594437",
"0.5939551",
"0.5937982",
"0.5933972",
"0.5922728",
"0.5916963",
"0.591511",
"0.5914539",
"0.59056866",
"0.5889204",
"0.5884667",
"0.5875353",
"0.5864858",
"0.5847263",
"0.5847263",
"0.58227587",
"0.58204603",
"0.5813773",
"0.58104545",
"0.5796525",
"0.57938945",
"0.579319",
"0.57888174",
"0.5785591",
"0.57837754",
"0.5778775",
"0.5778775",
"0.576914",
"0.5748444",
"0.57435006",
"0.57374984",
"0.5731066",
"0.5727607",
"0.57244337",
"0.57232475",
"0.5715634",
"0.5715124",
"0.57139957",
"0.5710731",
"0.57078403",
"0.5705539",
"0.56910515",
"0.5689566",
"0.56894106",
"0.56874037",
"0.56861144",
"0.56831396",
"0.5678153",
"0.5676029",
"0.5675163",
"0.56720555",
"0.5667164",
"0.5667164",
"0.5666187",
"0.5659105",
"0.5656006",
"0.5655915",
"0.5654412",
"0.56526333",
"0.56475663",
"0.5646301",
"0.5642734",
"0.5639464",
"0.56356925",
"0.5632997",
"0.5632236",
"0.563173",
"0.5630283",
"0.5627665",
"0.56199604",
"0.56168747",
"0.5609055",
"0.5606948"
] |
0.0
|
-1
|
Created by 57014 on 2017/2/27.
|
public interface UserDao {
//添加新用户
public int addUser(User user);
public User getUserByOpenId(String openId);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public void init() {\n }",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\n void init() {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n public void init() {}",
"private void init() {\n\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"public void mo38117a() {\n }",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void init() {\n }",
"@Override\r\n\tpublic void init() {}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"private void m50366E() {\n }",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"public void mo4359a() {\n }",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n public void memoria() {\n \n }",
"private void kk12() {\n\n\t}",
"@Override\n public void initialize() { \n }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo6081a() {\n }",
"public Pitonyak_09_02() {\r\n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n public void init() {\n }",
"@Override\n\t\tpublic void init() {\n\t\t}",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"private void init() {\n\n\n\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"@Override\n public int getSize() {\n return 1;\n }",
"@Override\n\tpublic void afterInit() {\n\t\t\n\t}",
"@Override\n\tpublic void afterInit() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}"
] |
[
"0.60233957",
"0.58578074",
"0.5827032",
"0.57720107",
"0.5738626",
"0.5738626",
"0.56915677",
"0.5665688",
"0.56499064",
"0.5649681",
"0.5613133",
"0.56085944",
"0.5600617",
"0.5600371",
"0.5596324",
"0.5596324",
"0.5596324",
"0.5596324",
"0.5596324",
"0.5595621",
"0.55886495",
"0.5585623",
"0.5582639",
"0.55694497",
"0.5559064",
"0.55547893",
"0.5551308",
"0.5545429",
"0.5545429",
"0.5544629",
"0.55430377",
"0.5532421",
"0.5529986",
"0.5526244",
"0.5522365",
"0.55202234",
"0.5501789",
"0.5501789",
"0.5497137",
"0.5491059",
"0.5491059",
"0.5491059",
"0.5487274",
"0.5480728",
"0.5476149",
"0.5476149",
"0.5476149",
"0.5476149",
"0.5476149",
"0.5476149",
"0.547415",
"0.54727536",
"0.54702014",
"0.54702014",
"0.54702014",
"0.546727",
"0.54490596",
"0.54490596",
"0.54490596",
"0.542931",
"0.5421503",
"0.5415684",
"0.5408563",
"0.5408563",
"0.5408147",
"0.54017603",
"0.54003125",
"0.53869975",
"0.53869575",
"0.5385113",
"0.5383175",
"0.53816015",
"0.5380274",
"0.5371661",
"0.53501517",
"0.5348546",
"0.5347301",
"0.53335565",
"0.53325355",
"0.53318644",
"0.530414",
"0.53030217",
"0.53030217",
"0.53030217",
"0.53030217",
"0.53030217",
"0.53030217",
"0.53030217",
"0.5298",
"0.5293981",
"0.5293182",
"0.5292592",
"0.52879673",
"0.52846295",
"0.52656096",
"0.52638835",
"0.5259852",
"0.52543724",
"0.5243181",
"0.5243181",
"0.5241319"
] |
0.0
|
-1
|
Always returns null currently because: the Linux kernel does not currently support obtaining it in userspace. and Java 11 does not seem to support detection if the above is still the case, it will just return a different one of the timestamps. TODO: Remove the implementation and thereby the above limitation once it is possible to get the birth time from the kernel. Once you do that also make this abstract class an interface instead to match its name prefix.
|
public final Date getBirthTime() {
return null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public com.walgreens.rxit.ch.cda.TS getBirthTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.TS target = null;\n target = (com.walgreens.rxit.ch.cda.TS)get_store().find_element_user(BIRTHTIME$12, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public int getBirthTime() {\n return firstTimestamp;\n }",
"String getTimestamp();",
"String getTimestamp();",
"public abstract long getTimestampMillis();",
"Long timestamp();",
"@Override\n public final long getTimeStamp() {\n synchronized (TIMESTAMP_LOCK) {\n return this.timeStamp;\n }\n }",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"int getTimestamp();",
"java.lang.String getTimestamp();",
"java.lang.String getTimestamp();",
"long getTimestamp();",
"private long getUserTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadUserTime() : 0L;\n }",
"long getTimeStamp();",
"String getTimestampFunction();",
"public long getTimestamp();",
"public long getTimestamp();",
"public abstract long now();",
"public abstract long getStartTimestamp();",
"@Override\n\tpublic Map<String, Object> getCurrentTime() {\n\t\treturn null;\n\t}",
"@Override\n public long getTimestamp() {\n return timestamp;\n }",
"public java.lang.String getTimeStamp(){\r\n return localTimeStamp;\r\n }",
"@Override\r\n\tpublic long getTimestamp() {\n\t\treturn -1;\r\n\t}",
"public long getUserTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n bean.getCurrentThreadUserTime( ) : 0L;\n}",
"abstract Long getStartTimestamp();",
"public Timestamp getBirthDate() {\n return birthDate;\n }",
"com.google.protobuf.Timestamp getTimestamp();",
"public abstract long startTimestamp();",
"public Date mo6949c() {\n try {\n Attribute attribute = this.f4352b.getSignedAttributes().get(CMSAttributes.signingTime);\n if (attribute != null) {\n return ASN1UTCTime.getInstance(attribute.getAttrValues().getObjectAt(0)).getDate();\n }\n return null;\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }",
"public long baseTimestamp() {\n return buffer.getLong(BASE_TIMESTAMP_OFFSET);\n }",
"public com.walgreens.rxit.ch.cda.TS addNewBirthTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.TS target = null;\n target = (com.walgreens.rxit.ch.cda.TS)get_store().add_element_user(BIRTHTIME$12);\n return target;\n }\n }",
"public abstract long getUptime();",
"com.google.protobuf.Timestamp getCurrentStateTime();",
"public long get_infos_timestamp() {\n return (long)getUIntBEElement(offsetBits_infos_timestamp(), 32);\n }",
"private String getTimestamp() {\n return Calendar.getInstance().getTime().toString();\n }",
"public abstract long getCreatedTime();",
"com.google.protobuf.TimestampOrBuilder getCurrentStateTimeOrBuilder();",
"public long getTimeStamp() {return attributes.getLongValue(TIMESTAMP,-1);}",
"public Timestamp getBirthdate() {\n return birthdate;\n }",
"UtcT time_stamp () throws BaseException;",
"public static long getUserTime () {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported()?\n bean.getCurrentThreadUserTime(): 0L;\n }",
"public interface ITimeProvider {\n\t\n\t/**\n\t * \n\t * @return time in miliseconds since epoch\n\t */\n\tlong getTime();\n}",
"Date getTimestamp()\n{\n return time_stamp;\n}",
"@Override\n\tpublic java.util.Date getDateOfBirth() {\n\t\treturn _candidate.getDateOfBirth();\n\t}",
"private long getSystemTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? (bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime()) : 0L;\n }",
"abstract public int getTime();",
"public abstract Date getPreviousFireTime();",
"@Override\n default String getTs() {\n return null;\n }",
"public interface ITimeService {\n\n /**\n\t * Get current time.\n\t * \n\t * @return Long current time in milliseconds since Jan 1, 1970. Will not\n\t * return <code>null</code>.\n\t */\n public Long getCurrentTime();\n}",
"@Override\r\n\tpublic String gettime() {\n\t\treturn user.gettime();\r\n\t}",
"public long getTimeStamp() {return timeStamp;}",
"public static long getUserTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n bean.getCurrentThreadUserTime( ) : 0L;\n }",
"public abstract Timestamp getDate();",
"Date getTimeStamp();",
"@MavlinkFieldInfo(\n position = 1,\n unitSize = 4,\n description = \"Timestamp (time since system boot).\"\n )\n public final long timeBootMs() {\n return this.timeBootMs;\n }",
"TimeStamp getT();",
"public long getTimestamp() {\n return timestamp_;\n }",
"@Override\n\tpublic long getCurrentTime() {\n\t\treturn 0;\n\t}",
"public long getCreationTime();",
"Date getTimestamp();",
"public long getSystemTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n (bean.getCurrentThreadCpuTime( ) - bean.getCurrentThreadUserTime( )) : 0L;\n}",
"Date getBirthDate();",
"com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder();",
"public long getTimestamp() {\r\n return timestamp_;\r\n }",
"public long getTimestamp() {\r\n return timestamp_;\r\n }",
"@Nullable\n default Long extractTimestamp(OUT record) {\n return null;\n }",
"public Timestamp getStatusTime() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic long getCreationTime() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic long getCreationTime() {\n\t\treturn 0;\n\t}",
"public long getTimestamp() {\r\n return timestamp_;\r\n }",
"public long getTimestamp() {\r\n return timestamp_;\r\n }",
"public abstract long getCreated();",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public String getTimestamp()\n {\n return timestamp;\n }",
"@SuppressWarnings(\"unused\")\n Date getLastUpdateTime();",
"public final long getLocalTimeStamp()\n {\n return getTimeStamp( TimeZone.getDefault());\n }",
"String getDate() { return epoch; }",
"@Override\n\tpublic List getTime() {\n\t\treturn null;\n\t}"
] |
[
"0.71731627",
"0.6394494",
"0.61131996",
"0.61131996",
"0.6101269",
"0.6099227",
"0.60895497",
"0.5999025",
"0.5999025",
"0.5999025",
"0.5999025",
"0.5999025",
"0.5999025",
"0.5999025",
"0.5999025",
"0.5999025",
"0.5999025",
"0.5999025",
"0.5999025",
"0.5999025",
"0.5999025",
"0.5999025",
"0.5999025",
"0.59976465",
"0.59911823",
"0.59911823",
"0.5958556",
"0.5958168",
"0.59433454",
"0.5934296",
"0.5924723",
"0.5924723",
"0.5923395",
"0.5918476",
"0.5905565",
"0.58797896",
"0.5864382",
"0.5863791",
"0.5851087",
"0.58508956",
"0.5818175",
"0.5798651",
"0.578498",
"0.5782424",
"0.57795805",
"0.5777442",
"0.5765523",
"0.57538515",
"0.5753736",
"0.5753536",
"0.5740036",
"0.57296795",
"0.56919175",
"0.5675531",
"0.56725794",
"0.56610006",
"0.5655316",
"0.5653752",
"0.56529886",
"0.5652034",
"0.56450325",
"0.56421095",
"0.56402594",
"0.56363744",
"0.563009",
"0.5625777",
"0.5607223",
"0.5602627",
"0.5594129",
"0.5586831",
"0.5571833",
"0.55647767",
"0.5561419",
"0.5555568",
"0.5539001",
"0.55379647",
"0.55341446",
"0.5532826",
"0.5513745",
"0.5513745",
"0.5513125",
"0.5502372",
"0.5497276",
"0.5497276",
"0.54961514",
"0.54961514",
"0.5487434",
"0.54870003",
"0.54870003",
"0.54870003",
"0.54870003",
"0.54870003",
"0.54870003",
"0.54870003",
"0.54870003",
"0.5485923",
"0.54761595",
"0.5462924",
"0.5458178",
"0.54555976"
] |
0.66851336
|
1
|
find view by id
|
protected void findViewByIds(View layout) {
contentStub = (ViewStub) layout.findViewById(R.id.stub_content);
netView = (NetworkView) layout.findViewById(R.id.net_view);
int rid = getContentLayout();
if (rid <= 0) {
throw new RuntimeException("network base fragment has none valid sub content layout");
}
contentStub.setLayoutResource(rid);
contentView = contentStub.inflate();
netView.setOnNetFailClickLister(this);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@SuppressWarnings(\"unchecked\")\n\tpublic View getView(String id) {\n\t\tid =id.trim();\n\t\tt = (T) activity.findViewById(getId(id));\n\t\treturn (View)t;\n\t}",
"public View findViewById(int id) {\r\n\t\tView _view;\r\n\r\n\t\t// get parent view\r\n\t\tView _presentView = getPresentView();\r\n\r\n\t\t// check present view\r\n\t\tif (null == _presentView) {\r\n\t\t\t_view = null;\r\n\r\n\t\t\tLog.e(LOG_TAG, \"Simple imeeting base view present view is null.\");\r\n\t\t} else {\r\n\t\t\t_view = _presentView.findViewById(id);\r\n\t\t}\r\n\r\n\t\treturn _view;\r\n\t}",
"public View findViewById(int id) {\n Activity activity = ((Activity) context_);\n return activity.findViewById(id);\n }",
"public View findViewById(int id) {\n Activity activity_ = ((Activity) context_);\n return activity_.findViewById(id);\n }",
"int getViewId();",
"public View findViewById(int viewId){\r\n return AppContext.getCurrent().getActivity().getCurrentView().findViewById(viewId);\r\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic View getView(int id) {\n\t\t\n\t\tt = (T) activity.findViewById(id);\n\t\treturn (View)t;\n\t}",
"public TransportView getTransportView(String id) {\n if (id == null)\n return null;\n for (TransportView t: _transportViews) {\n if (t.getId().equals(id))\n return t;\n }\n return null;\n }",
"@NonNull\n public static <T> T find(@NonNull View a, int viewID) {\n return (T) a.findViewById(viewID);\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic S<T> get(View view,int id) {\n\t\t\n\t\tt = (T) view.findViewById(id);\n\t\treturn this;\n\t}",
"@Override\r\n public Visitors visfindById(Integer id) {\n return userMapper.visfindById(id);\r\n }",
"protected static View getView(String workspaceId, String modelId,\n String moduleId, String viewId) throws AnaplanAPIException {\n Module module = getModule(workspaceId, modelId, moduleId);\n\n if (module == null) {\n return null;\n }\n if (viewId == null || viewId.isEmpty()) {\n LOG.error(\"A view ID must be provided\");\n return null;\n }\n View view = module.getView(viewId);\n if (view == null) {\n LOG.error(\"View \\\"{}\\\" not found in workspace \\\"{}\\\", model \\\"{}\\\", module \\\"{}\\\"\",\n viewId, workspaceId, modelId, moduleId);\n }\n return view;\n }",
"public Voto find(int id ) { \n\t\treturn em.find(Voto.class, id);\n\t}",
"@SuppressWarnings(\"unchecked\")\n public static <T extends View> T get(View view, int id) {\n SparseArray<View> viewHolder = (SparseArray<View>) view.getTag();\n if (viewHolder == null) {\n viewHolder = new SparseArray<>();\n view.setTag(viewHolder);\n }\n View childView = viewHolder.get(id);\n if (childView == null) {\n childView = view.findViewById(id);\n viewHolder.put(id, childView);\n }\n return (T) childView;\n }",
"@NonNull\n public static <T> T find(@NonNull Activity a, int viewID) {\n return (T) a.findViewById(viewID);\n }",
"void loadById(int id, LoadView mLoadView);",
"@SuppressWarnings(\"unchecked\")\n\tpublic S<T> get(View view,String id) {\n\t\tid =id.trim();\n\t\tt = (T) view.findViewById(getId(id));\n\t\treturn this;\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic <T extends View> T id(int id, Class<T> clz) {\n\t\treturn (T) id(id);\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic S<T> get(String id){\n\t\tid =id.trim();\n\t\t\n\t\tif(id.contains(\"*\")){\n\t\t\tif(l==null)\n\t\t\tl = (LinkedList<Sview>) getTableId();\n\t\t\t\n\t\t\tString sufix = getSufix(id);\n\t\t\tLinkedList<View> lv = new LinkedList<View>();\n\t\t\tfor (Sview v : l) {\n\t\t\t\tif(v.name.startsWith(sufix)){\n\t\t\t\t\tView vi = activity.findViewById(v.id);\n\t\t\t\t\tif(vi!=null)\n\t\t\t\t\tlv.add(vi);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(lv.size()!=0){\n\t\t\t\tt = (T) lv;\n\t\t\t}\n\t\t\t\n\t\t\treturn this;\n\t\t}\n\t\tif(id.equals(\"TextView\")){\t\t\n\t\t\tgetViewByType(\"TextView\");\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\tif(id.equals(\"Button\")){\n\t\t\tgetViewByType(\"Button\");\n\t\t\treturn this;\n\t\t}\n\t\tif(id.equals(\"ImageView\")){\n\t\t\tgetViewByType(\"ImageView\");\n\t\t\treturn this;\n\t\t}\n\t\tif(id.equals(\"EditText\")){\n\t\t\tgetViewByType(\"EditText\");\n\t\t\treturn this;\n\t\t}\n\t\tif(id.equals(\"CheckBox)\")){\n\t\t\tgetViewByType(\"CheckBox\");\n\t\t\treturn this;\n\t\t}\n\t\tif(id.equals(\"ImageButton)\")){\n\t\t\tgetViewByType(\"ImageButton\");\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\tif(id.equals(\"RadioButton)\")){\n\t\t\tgetViewByType(\"RadioButton\");\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t\n\t\t\tt = (T) activity.findViewById(getId(id));\n\n\t\treturn this;\n\t}",
"public int getViewId() {\n return 123456;\n }",
"@RequestMapping(value = \"/friendlink_view.jspx\", method = RequestMethod.GET)\r\n\tpublic void view(Integer id, HttpServletRequest request, HttpServletResponse response, ModelMap model) {\r\n\t\tif (id != null) {\r\n\t\t\tcmsFriendlinkMng.updateViews(id);\r\n\t\t\tResponseUtils.renderJson(response, \"true\");\r\n\t\t} else {\r\n\t\t\tResponseUtils.renderJson(response, \"false\");\r\n\t\t}\r\n\t}",
"String getUview_id();",
"AdminTab selectByPrimaryKey(String id);",
"public Activity getById(int id){ \n\t\tActivity e=(Activity)template.get(Activity.class,id); \n\t return e; \n\t}",
"@Override\r\n\tpublic void find(Integer id) {\n\r\n\t}",
"@GetMapping(\"/viewItem/{id}\")\n\tpublic ModelAndView viewItemById(@PathVariable(value=\"id\") long id) {\n\t\tModelAndView mv = new ModelAndView();\n\t\tItem item = itemService.findItemById(id);\n\t\tmv.setViewName(\"preview\");\n\t\tmv.addObject(\"item\", item);\n\t\t\n\t\treturn mv;\n\t}",
"@Override\r\n\tpublic Botany show(int id) {\n\t\treturn dao.show(id);\r\n\t}",
"@Override\n\tpublic View getView(String viewName) {\n\n\t\tint resourceID = context.getResources().getIdentifier(viewName, \"id\",\n\t\t\t\tcontext.getPackageName());\n\t\tviewObject = activity.findViewById(resourceID);\n\n\t\treturn viewObject;\n\t}",
"Tourst selectByPrimaryKey(String id);",
"@Override\n\tpublic void staticFindViewByView() {\n\t\t\n\t}",
"TempletLink selectByPrimaryKey(String id);",
"public ProductView get(String id, String developerId) {\n LOG.debug(\"Enter. id: {}, developerId: {}.\", id, developerId);\n\n ProductView result = cacheApplication.getProductById(developerId, id);\n\n if (result == null) {\n LOG.debug(\"Cache fail, get from database.\");\n\n List<ProductView> productViews = fetchProducts(developerId);\n\n result = productViews.stream().filter(view -> id.equals(view.getId())).findAny().orElse(null);\n }\n\n LOG.debug(\"Exit. productView: {}.\", result);\n return result;\n }",
"private void findViewsById() {\n\n scanQR = findViewById(R.id.scanQR);\n scanQR.setOnClickListener(this);\n\n// generateQR = findViewById(R.id.generateQR);\n// generateQR.setOnClickListener(this);\n\n// qrImage = findViewById(R.id.qrimage);\n }",
"@Override\r\n\tpublic Visit findById(Long id) {\n\t\treturn super.findById(id);\r\n\t}",
"public void getDetail(int id) {\n\t\t\n\t}",
"public LogModel findLog(String id);",
"public static int getViewId() {\n\t\tviewId += 0x00000001;\n\t\treturn viewId;\n\t}",
"public ViewIdentificator getView() {\r\n return view;\r\n }",
"V get(K id);",
"@RequestMapping(value = \"/findID\")\n\tpublic ModelAndView findID(ModelAndView mv) {\n\t\tmv.setViewName(\"user/login/findID\");\n\t\treturn mv;\n\t}",
"@Override\n public T findById(Long id) {\n return manager.find(elementClass, id);\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic S<T> get(int id){\n\t\tt = (T) activity.findViewById(id);\n\t\treturn this;\n\t}",
"T findById(ID id) ;",
"public static View getView(Context context, int resourceId, View view) {\n\t\tLayoutInflater inflater = LayoutInflater.from(context);\n\t\tif (view != null) {\n\t\t\treturn view;\n\t\t}\n\t\tif (resourceId != INVALID) {\n\t\t\tview = inflater.inflate(resourceId, null);\n\t\t}\n\t\treturn view;\n\t}",
"T getbyId(I id);",
"SwipersDO selectByPrimaryKey(Integer id);",
"AppStandard selectById(String id);",
"@GetMapping(path = \"/view/{id}\")\n public String showById(@PathVariable(\"id\") Long id, Model model) {\n log.info(\"READ itinerary by ID : {}\", id);\n \n Itinerary itinerary = itineraryService.findById(id);\n \n if (Objects.isNull(itinerary)) {\n log.info(\"Any sector found with ID : {}\", id);\n return \"redirect:/itineraries/view\";\n }\n \n TreeSet<Comment> comments = new TreeSet<>(itinerary.getComments());\n \n model.addAttribute(\"itinerary\", itinerary);\n model.addAttribute(\"comment\", new Comment());\n model.addAttribute(\"comments\", comments);\n \n return VIEW;\n }",
"void viewProductById(long id);",
"String get(String id);",
"D getById(K id);",
"@Override\n\tpublic CentreVisite getId(Long id) {\n\t\treturn CR.getOne(id);\n\t}",
"public TileView getTileView(int diksId) {\n if (mGrid != null) {\n try {\n for (int i = 0; i < mGrid.getCount(); i++) {\n TileView each = (TileView) mGrid.getChildAt(i);\n if (each != null && each.mDisk.getId() == diksId) {\n return each;\n }\n }\n } catch (Exception e) {\n }\n }\n\n return null;\n }",
"@RequestMapping(value = \"/messageresource/{id}/view\", method = RequestMethod.GET)\n\tpublic String showView(Authentication authentication, @PathVariable(\"id\") int id, \n\t\tfinal RedirectAttributes redirectAttributes) {\n\t\tString returnPath = null;\n\n\t\tlogger.debug(\"showView() : {}\", id);\n\t\t\n\t\tSecurityUser user = (SecurityUser)authentication.getPrincipal();\n Long userId = user.getApplicationUser().getId();\n\t\t//TODO: Needs exception handling\n\t\t\n\t\tList<View> viewList = this.messageResourceService.getMessageResourceBo().getMessageResourceDao().listViewByMessageResourceId(Long.valueOf(id), userId);\n\n\t\tif (viewList.size() == 1){\n\t\t\treturnPath = \"forward:/view/\" + viewList.get(0).getId() + \"/update\";\n\t\t}\n\t\telse{\n\t\t\treturnPath = \"forward:/view/all\";\n\t\t}\n\t\t\n\t\treturn returnPath;\n\n\t}",
"public T findById(int id) {\n\t\tConnection connection = null;\n\t\tPreparedStatement st = null;\n\t\tResultSet rs = null;\n\t\tString query = createSelectQuery(\"id\");\n\t\ttry {\n\t\t\tconnection = ConnectionFactory.createCon();\n\t\t\tst = connection.prepareStatement(query);\n\t\t\tst.setInt(1, id);\n\t\t\trs = st.executeQuery();\n\t\t\t\n\t\t\treturn createObjects(rs).get(0);\n\t\t}catch(SQLException e) {\n\t\t\tLOGGER.fine(type.getName() + \"DAO:findBy\" + e.getMessage());\n\t\t}\n\t\treturn null;\n\t}",
"Tour selectByPrimaryKey(Integer id);",
"public Data findById(Object id);",
"@Override\n\tpublic Object findByID(Serializable id) {\n\t\treturn getSession().get(DirectTalentAdvertBean.class, id);\n\t}",
"@Override\r\n\tpublic Vtype findById(int id) {\n\t\tVtype v=null;\r\n\t\tHibernateUtil.getCurrentSession().beginTransaction();\r\n\t\ttry{\r\n\t\t\tv=this.vdao.findById(id);\r\n\t\t\tHibernateUtil.getCurrentSession().getTransaction().commit();\r\n\t\t}catch(Exception e){\r\n\t\t\ttry{\r\n\t\t\t\tHibernateUtil.getCurrentSession().getTransaction().rollback();\r\n\t\t\t}catch(Exception e1){\r\n\t\t\t\tthrow e1;\r\n\t\t\t}\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t\treturn v;\r\n\t}",
"public T find(int id) {\n\t \treturn getEntityManager().find(getEntityClass(), id);\n\t }",
"@Override\r\n\tpublic LookMast findOne(int id) {\n\t\treturn lookMastRepository.findOne(id);\r\n\t}",
"private void findView() {\n\t\tibtn_trigger = (ImageButton) findViewById(R.id.ibtn_right_menu);\n\t}",
"public MenuItem findItem(int id);",
"Shareholder selectByPrimaryKey(Integer id);",
"Videogioco findVideogiocoById(int id);",
"String getService_uview_id();",
"Procdef selectByPrimaryKey(String id);",
"View getActiveView();",
"private void findById(){\n\n eventName = (TextView) findViewById(R.id.confirmEventName);\n eventTime = (TextView) findViewById(R.id.confirmEventTime);\n eventAddress = (TextView) findViewById(R.id.confirmEventAddress);\n eventDescription = (TextView) findViewById(R.id.confirmEventDescription);\n eventTags = (TextView) findViewById(R.id.confirmEventTags);\n\n back = (Button) findViewById(R.id.backToCreateEvent);\n back.setOnClickListener(backListener);\n\n finish = (Button) findViewById(R.id.finishEventCreation);\n finish.setOnClickListener(finishListener);\n\n }",
"public itemView getItem(int id) {\n return mData.get(id);\n }",
"public final E find(final K id) {\n return getJpaTemplate().find(getEntityClass(), id);\n }",
"Caiwu selectByPrimaryKey(Integer id);",
"@Override\r\n\tpublic TopicContent findById(Serializable id) {\n\t\treturn topicContentDao.findById(id);\r\n\t}",
"public Node find(int id) {\n return tree.find(id);\n }",
"public o selectById(long id);",
"@Override\n\tpublic Document find(int id) {\n\t\treturn null;\n\t}",
"TCpySpouse selectByPrimaryKey(Integer id);",
"E findById(K id);",
"public Object lookup(String id) {\n return null;\n }",
"@Override\n public Model findByID(PK id) throws ServiceException {\n \t\n \tModel model = getModel();\n \t\n \tMethod method = null;\n\t\ttry {\n\t\t\tmethod = model.getClass().getMethod(\"setId\", new Class[]{ Integer.class });\n\t\t\tmethod.setAccessible(true);\n\t\t\tmethod.invoke(model, new Object[]{ id });\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\n \tModel result = null;\n \t\n \ttry {\n \t\tMap<String, Object> map = getDao().findByID(model);\n \tresult = buildModel(map);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tlogger.error(e.getMessage());\n\t\t\tthrow new ServiceException(ResultCode.DB_ERROR);\n\t\t}\n \t\n return result;\n }",
"public abstract T findOne(int id);",
"public T findById(int id)\n {\n Connection connection = null;\n PreparedStatement statement = null;\n ResultSet resultSet = null;\n String query = createSelectQuery(\"id\");\n try\n {\n connection = ConnectionFactory.getConnection();\n statement = connection.prepareStatement(query);\n statement.setInt(1,id);\n resultSet = statement.executeQuery();\n\n return createObjects(resultSet).get(0);\n }catch (SQLException e)\n {\n LOGGER.log(Level.WARNING,type.getName() + \"DAO:findById\"+ e.getMessage());\n }finally {\n ConnectionFactory.close(resultSet);\n ConnectionFactory.close(statement);\n ConnectionFactory.close(connection);\n }\n return null;\n }",
"@Override\r\n\tpublic Element findById(int id) {\n\t\t\r\n\t\treturn em.find(Element.class, id);\r\n\t}",
"Prueba selectByPrimaryKey(Integer id);",
"public abstract String getFacesViewIdFromPath(String viewPath, boolean mustExist);",
"public MemberPo findMember(final String id);",
"@Override\n\tpublic User find(int id) {\n\t\tSystem.out.println(\"OracleDao is find\");\n\t\treturn null;\n\t}",
"Visituser selectByPrimaryKey(Integer id);",
"RouteBean findRouteId(String routeID);",
"Model selectByPrimaryKey(Integer id);",
"Access selectByPrimaryKey(Long id_access);",
"public void findById() {\n String answer = view.input(message_get_id);\n if (answer != null){\n try{\n long id = Long.parseLong(answer);\n Customer c = model.findById(id);\n if(c!=null)\n view.showCustomerForm(c);\n else\n view.showMessage(not_found_error);\n }catch(NumberFormatException nfe){\n view.showMessage(\"ID must be number\");\n }\n }\n }",
"public T get( final int id )\n\t{\n\t\treturn this.dao.findById( id ).get();\n\t}",
"public HexModel searchByID(String id) {\n\t\tfor (int y = 0; y < grid[0].length; y++) {\r\n\t\t\tfor (int x = 0; x < grid[y].length; x++) {\r\n\t\t\t\tif (grid[y][x] != null && grid[y][x].getId().equals(id))\r\n\t\t\t\t\treturn grid[y][x];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic Dorf findById(int id) {\n\t\treturn (Dorf) getSession().get(Dorf.class,id);\r\n\t}",
"public Route findRoutById(int id) throws SQLException {\n\t\treturn rDb.findRoutById(id);\n\t}",
"@Override\n\tpublic Eleve findById(int id) {\n\t\treturn map.get(id);\n\t}",
"@Override\n\tpublic Oeuvre findOeuvreById(Long id) {\n\t\treturn oeuvreDao.findById(id).get();\n\t}",
"public abstract String getFacesViewIdFromPath(String viewPath);",
"Notice selectByPrimaryKey(Integer id);",
"private void findViewsByID() {\n dinnerName = (EditText) findViewById(R.id.add_dinner_edit_dinner_name);\n dinnerCategory = (EditText) findViewById(R.id.add_dinner_edit_category);\n dinnerDescription = (EditText) findViewById(R.id.add_dinner_edit_dinner_description);\n dinnerRating = (RatingBar) findViewById(R.id.add_dinner_edit_rating);\n dateText = (TextView) findViewById(R.id.add_dinner_date_chosen);\n dinnerPrice = (EditText) findViewById(R.id.add_dinner_edit_price);\n dinnerDate = Calendar.getInstance();\n //We want to set the date to the current date\n dateText.setText(new SimpleDateFormat(\"dd-MM-yyyy\", new Locale(\"da\", \"DK\"))\n .format(dinnerDate.getTime()));\n chooseDate = (Button) findViewById(R.id.add_dinner_choose_date_button);\n saveButton = (Button) findViewById(R.id.add_dinner_save_button);\n cancelButton = (Button) findViewById(R.id.add_dinner_cancel_button);\n chooseIngredientsButton = (Button) findViewById(R.id.add_dinner_choose_ingredients);\n gridView = (GridView) findViewById(R.id.add_dinner_ingredient_gridview);\n }"
] |
[
"0.7231291",
"0.7224539",
"0.7221255",
"0.7173908",
"0.7104514",
"0.6994234",
"0.69177836",
"0.659414",
"0.6472925",
"0.63974106",
"0.63638794",
"0.63214713",
"0.6320859",
"0.63099355",
"0.62851244",
"0.6241746",
"0.62195414",
"0.62191504",
"0.614961",
"0.6064633",
"0.60524535",
"0.60485905",
"0.60459864",
"0.6036728",
"0.60142225",
"0.60025007",
"0.5997098",
"0.5987683",
"0.5979814",
"0.59188926",
"0.59168684",
"0.59089786",
"0.5898279",
"0.5895026",
"0.5879699",
"0.5875997",
"0.58725023",
"0.5859953",
"0.58417416",
"0.5840998",
"0.58216375",
"0.5791296",
"0.5781154",
"0.5761597",
"0.57541025",
"0.5736442",
"0.5726794",
"0.5715493",
"0.5714372",
"0.569849",
"0.5697511",
"0.56909466",
"0.5680583",
"0.5672318",
"0.56698906",
"0.5667405",
"0.5658916",
"0.5657801",
"0.56493163",
"0.56407624",
"0.56381917",
"0.56378955",
"0.5624036",
"0.5617689",
"0.56166434",
"0.56130135",
"0.5610349",
"0.56037176",
"0.5588504",
"0.55795515",
"0.5575741",
"0.5573244",
"0.55718213",
"0.5566571",
"0.55657554",
"0.55634",
"0.55540425",
"0.5552123",
"0.55465585",
"0.55402",
"0.55369276",
"0.5536613",
"0.553054",
"0.552856",
"0.55259275",
"0.55235606",
"0.5517768",
"0.5517234",
"0.55109704",
"0.5506799",
"0.5504649",
"0.5504535",
"0.5502719",
"0.54924047",
"0.5491557",
"0.54886883",
"0.5486213",
"0.54861206",
"0.5477912",
"0.54744196",
"0.5469558"
] |
0.0
|
-1
|
cartesian angle if lower coordinate was origin, result 0180
|
public double findAngle() {
return 0d;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private double getAngle() {\n double normal= Math.sqrt(((getgAxis(ADXL345_I2C.Axes.kX))*(getgAxis(ADXL345_I2C.Axes.kX)))+((getgAxis(ADXL345_I2C.Axes.kY))*(getgAxis(ADXL345_I2C.Axes.kY))));\n\n return MathUtils.atan(normal / getgAxis(ADXL345_I2C.Axes.kZ));\n }",
"public double getAngleXY() {\r\n\t\tdouble l = this.lenght();\r\n\t\tif (l==0)\r\n\t\t\treturn 0;\r\n\t\treturn Math.asin(this.z/l);\r\n\t}",
"public double getAngleYZ() {\r\n\t\tdouble l = this.lenght();\r\n\t\tif (l==0)\r\n\t\t\treturn 0;\r\n\t\treturn Math.asin(this.x/l);\r\n\t}",
"public double betweenAngle(Coordinates a, Coordinates b, Coordinates origin);",
"public double toAngle()\n\t{\n\t\treturn Math.toDegrees(Math.atan2(y, x));\n\t}",
"public int angleOX() {\n if (B.getY() == A.getY()) {\r\n return 0;\r\n } else if (A.getX() == B.getX()) {\r\n return 90;\r\n }\r\n else {\r\n float fi = ((float) (B.getY() - A.getY()) / (B.getX() - A.getX()));\r\n if (fi<0){\r\n return (int)(fi*(-1));\r\n }\r\n else return (int)(fi);\r\n }\r\n }",
"public double getAngle();",
"double getAngle();",
"double getAngle();",
"private double getAngle(){\n //Get a new angle measurement\n angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n //Get the difference between current angle measurement and last angle measurement\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n //Process the angle to keep it within (-180,180)\n //(Once angle passes +180, it will rollback to -179, and vice versa)\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n //Add the change in angle since last measurement (deltaAngle)\n //to the change in angle since last reset (globalAngle)\n globalAngle += deltaAngle;\n //Set last angle measurement to current angle measurement\n lastAngles = angles;\n\n return globalAngle;\n }",
"public double angle() {\n return Math.atan2(_y,_x);\n }",
"public double getAngle() {\n\t\treturn 180 * (this.N - 2) / this.N;\n\t}",
"public double getAngle(float x, float y )\n {\n double dx = x - centerX;\n // Minus to correct for coord re-mapping\n double dy = -(y - centerY);\n\n double inRads = Math.atan2(dy,dx);\n\n // We need to map to coord system when 0 degree is at 3 O'clock, 270 at 12 O'clock\n if (inRads < 0)\n inRads = Math.abs(inRads);\n else\n inRads = 2*Math.PI - inRads;\n\n return Math.toDegrees(inRads);\n }",
"public int getAngle(){\n\t\tif(!resetCoordinates()&&robot.imu1.isGyroCalibrated()){\n\t\t\trobot.angles=robot.imu1.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\t\t\tdouble currentAngle=robot.angles.firstAngle;\n\t\t\tint finalAngle= robot.startingAngle+(int)Math.round(currentAngle);\n\t\t\tif(finalAngle<0){\n\t\t\t\treturn 360+finalAngle;\n\t\t\t}\n\t\t\treturn finalAngle;\n\n\t\t}\n\t\telse if(!resetCoordinates()&&robot.imu.isGyroCalibrated()){\n\t\t\trobot.angles=robot.imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.YZX, AngleUnit.DEGREES);\n\t\t\tdouble currentAngle=robot.angles.firstAngle;\n\t\t\tint finalAngle= robot.startingAngle+(int)Math.round(currentAngle);\n\t\t\tif(finalAngle<0){\n\t\t\t\treturn 360+finalAngle;\n\t\t\t}\n\t\t\treturn finalAngle;\n\n\t\t}\n\t\telse if(resetCoordinates()){\n\t\t\tdouble oldAngle = robot.rotation.thirdAngle;\n\t\t\tdouble posAngle = oldAngle;\n\t\t\tint finalAngle;\n\t\t\tif (oldAngle < 0) posAngle = 360 - Math.abs(oldAngle);\n\t\t\tif((int) (Math.round(posAngle)) - 45 < 0){\n\t\t\t\tfinalAngle = 360-(int)Math.round(posAngle);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfinalAngle = (int) (Math.round(posAngle)) - 45;\n\t\t\t}\n\t\t\treturn finalAngle;\n\t\t}\n\t\telse{\n\t\t\treturn 10000;\n\t\t}\n\t}",
"public float getAngle() {\n if(vectorAngle < 0 )\n return (float) Math.toDegrees(Math.atan(longComponent / latComponent));\n else\n return vectorAngle;\n\n }",
"private double getAngle()\n {\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n return angles.firstAngle;\n }",
"public double getAngle() {\n\t\treturn Math.atan2(imaginary, real);\n\t}",
"public double angle()\n {\n return Math.atan2(this.y, this.x);\n }",
"public double getAngle() {\n if (r == 0) {\n if (i == 0)\n return 0;// error?\n if (i > 0)\n return p2;\n else\n return -p2;\n }\n double d = Math.atan(i / r);\n if (r >= 0) {\n return d;\n }\n if (i >= 0)\n return Math.PI + d;\n return d + Math.PI;\n }",
"public double angle(final Vec4 o) {\n return Math.asin(Math.sqrt(normalized().cross(o.normalized()).lengthSq()));\n }",
"public double getAngleXZ() {\r\n\t\tdouble l = this.lenght();\r\n\t\tif (l==0)\r\n\t\t\treturn 0;\r\n\t\treturn Math.asin(this.y/l);\r\n\t}",
"public double getAngle() {\n return Math.atan2(sinTheta, cosTheta);\n }",
"public double getAngle() {\n\t\tdouble angle = Math.atan2(imaginary, real);\n\t\tangle = fixNegativeAngle(angle);\n\n\t\treturn angle;\n\t}",
"public float getAngleForPoint(float x, float y) {\n /* 262 */\n MPPointF c = getCenterOffsets();\n /* */\n /* 264 */\n double tx = (x - c.x), ty = (y - c.y);\n /* 265 */\n double length = Math.sqrt(tx * tx + ty * ty);\n /* 266 */\n double r = Math.acos(ty / length);\n /* */\n /* 268 */\n float angle = (float) Math.toDegrees(r);\n /* */\n /* 270 */\n if (x > c.x) {\n /* 271 */\n angle = 360.0F - angle;\n /* */\n }\n /* */\n /* 274 */\n angle += 90.0F;\n /* */\n /* */\n /* 277 */\n if (angle > 360.0F) {\n /* 278 */\n angle -= 360.0F;\n /* */\n }\n /* 280 */\n MPPointF.recycleInstance(c);\n /* */\n /* 282 */\n return angle;\n /* */\n }",
"public double getFirstAngle(){\r\n\t\treturn Math.atan( \r\n\t\t\t\t(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterY()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterY()\r\n\t\t\t\t)\r\n\t\t\t\t/ (\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterX()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterX()\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t}",
"public float getXAngle(){\n Point project=new Point(0,accel.y,accel.z);\n\n float angl=(float)Math.asin(project.y / project.module())* PreferenceHelper.sensetivity;\n //float angl=(float)Math.acos(accel.z/accel.module())*100f;\n if(Float.isNaN(angl)) angl=0.5f;\n return (float)(Math.rint( toFlowX(angl)/1.0) * 1.0);\n }",
"public double getAngle2() {\n\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return (globalAngle);\n\n }",
"public double currentAngle() {\n return imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES).firstAngle;\r\n }",
"public double\nangleInXYPlane()\n{\n\tBVector2d transPt = new BVector2d(\n\t\tthis.getP2().getX() - this.getP1().getX(),\n\t\tthis.getP2().getY() - this.getP1().getY());\n\t\n\t// debug(\"transPt: \" + transPt);\n\n\tdouble angle = MathDefines.RadToDeg * new Vector2d(1.0, 0.0).angle(transPt);\n\tif (transPt.getY() < 0.0)\n\t{\n\t\t// debug(\"ang0: \" + (360.0 - angle));\n\t\treturn(360.0 - angle);\n\t}\n\t// debug(\"ang1: \" + angle);\n\treturn(angle);\n}",
"private double getAngle(double y, double x) {\n\t\tdouble angle = Math.atan2(y, x);\n\t\tif (angle < 0)\n\t\t\tangle += 2 * Math.PI;\n\t\treturn angle;\n\t}",
"public double getAngle() {\n\t\treturn this.position[2];\n\t}",
"public double getStartAngle();",
"public double theta() { return Math.atan2(y, x); }",
"AngleSmaller createAngleSmaller();",
"Angle createAngle();",
"private double getAngle() {\n // We experimentally determined the Z axis is the axis we want to use for\n // heading angle. We have to process the angle because the imu works in\n // euler angles so the Z axis is returned as 0 to +180 or 0 to -180\n // rolling back to -179 or +179 when rotation passes 180 degrees. We\n // detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC,\n AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }",
"public double ang()\n {\n \treturn Math.atan(y/x);\n }",
"private double getAngle()\n {\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }",
"double getCalibratedLevelAngle();",
"public double getAngle() {\n try {\n switch(Coordinates.angleUnit()) {\n case Coordinates.RADIAN:\n\treturn Double.parseDouble(deg.getText().trim());\n case Coordinates.DEGRE:\n\treturn Math.PI * Double.parseDouble(deg.getText().trim()) / 180.0;\n case Coordinates.DEGMN:\n\tString d = deg.getText().trim();\n\tif(d.length() == 0)\n\t d = \"0\";\n\tString m = mn.getText().trim();\n\tif(m.length() == 0)\n\t m = \"0\";\n\treturn Coordinates.parseAngle(d + \"11\" + m + \"'\");\n case Coordinates.DEGMNSEC:\n\td = deg.getText().trim();\n\tif(d.length() == 0)\n\t d = \"0\";\n\tm = mn.getText().trim();\n\tif(m.length() == 0)\n\t m = \"0\";\n\tString s = sec.getText().trim();\n\tif(s.length() == 0)\n\t s = \"0\";\n\treturn Coordinates.parseAngle(d + \"11\" + m + \"'\" + s + \"\\\"\");\n }\n }\n catch(NumberFormatException e) {\n }\n return 0.0;\n }",
"public double getAngle() { return angle; }",
"private float calculateAngle() {\r\n\r\n\t\tdouble angleTemp = Math.atan2(Target.getY() - y, Target.getX() - x);\r\n\t\t// I needed to use wikipedia to get this i\r\n\t\t// did not learn this in math and needed\r\n\t\t// to use a couplle youtube tutorials to\r\n\t\t// find out how to do the math in java\r\n\t\t// aswell thank fully one had the exact\r\n\t\t// way of doing this\r\n\t\treturn (float) Math.toDegrees(angleTemp) + 90;\r\n\t}",
"public static double getAngle( GameObject one, GameObject two )\n {\n return Math.atan2( getDeltaY( one, two ), +getDeltaX( one, two ) );\n }",
"public double getAngle()\n {\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }",
"public double calculateAngle(Point2D dir) {\n\t\tPoint2D normDir = dir.normalize();\n\t\treturn (normDir.getX() >= 0 ? new Point2D(0, 1).angle(normDir) : new Point2D(0, -1).angle(normDir) + 180);\n\t}",
"static double angle(PointDouble a, PointDouble o, PointDouble b) {\n Vec oa = vector(o, a), ob = vector(o, b);\n return Math.acos(dot(oa, ob) / (norm(oa) * norm(ob)));\n }",
"public double getAngle () {\n return super.getAngle() % 360D;\n }",
"public static double conicalAngle(double angle) \r\n {\r\n return (angle < 0.0 ? 2.0 * Math.PI + angle % (2.0 * Math.PI) : angle) % (2.0 * Math.PI);\r\n }",
"public double getRotation()\n\t{\n\t\tdouble determinant = this.basisDeterminant();\n\t\tTransform2D m = orthonormalized();\n\t\tif (determinant < 0) \n\t\t{\n\t\t\tm.scaleBasis(new Vector2(1, -1)); // convention to separate rotation and reflection for 2D is to absorb a flip along y into scaling.\n\t\t}\n\t\treturn Math.atan2(m.matrix[0].y, m.matrix[0].x);\n\t}",
"public float calculateCelestialAngle(long par1, float par3) {\n\t\treturn 0.0F;\n\t}",
"public double getAngle(float x1, float y1, float x2, float y2) {\n\n double rad = Math.atan2(y1-y2,x2-x1) + Math.PI;\n return (rad*180/Math.PI + 180)%360;\n }",
"EDataType getAngleDegrees();",
"@Override\n\tpublic float calculateCelestialAngle(long par1, float par3) {\n\t\treturn 2.0F;\n\t}",
"public double getRotation() {\n return Degrees.atan2(y, x);\n }",
"public double getMyAngle() {\n return myAngle- STARTING_ANGLE;\n }",
"public double getInteriorAngle() {\n\t\tdouble angle = 180 * (numberOfSides - 2) / numberOfSides;\n\t\treturn angle;\n\t}",
"public double getOrientation()\r\n\t{\r\n\t\treturn Math.atan2(-end.getY()+start.getY(), end.getX()-start.getX());\r\n\t}",
"public static float getAngle(float x, float y)\n\t{\n\t\treturn MathUtils.atan2(y, x) * MathUtils.radiansToDegrees - 90;\n\t}",
"public static double rotation()\r\n\t{\r\n\t\treturn -(mxp.getAngle()/45);\r\n\t}",
"private double angleTo(Point2D that) {\r\n double dx = that.x - this.x;\r\n double dy = that.y - this.y;\r\n return Math.atan2(dy, dx);\r\n }",
"private double calculateAngle(Point2D p, Point2D q)\n {\n return Math.atan2(q.getY() - p.getY(), q.getX() - p.getX());\n }",
"public double getAngle ()\n {\n return angle_;\n }",
"public double angleToSide1(double x,double y)\n\t{\n\t\tif(x1==x)\n\t\t{\t\n\t\t\t//Then either the angle is 90 or 270\n\t\t\tif(y1>y)\n\t\t\t\treturn Math.PI/2;\n\t\t\telse\n\t\t\t\treturn 3*Math.PI/2;\n\t\t}\n\t\t\n\t\t\n\t\tdouble slope = (y1-y)/(x1-x);\n\t\tdouble angle = Math.atan(slope);\n\t\t\n\t\tif(x1<x)\n\t\t{\n\t\t\t//Then we have to change the angle\n\t\t\t//since it is on the left side of the x axis\n\t\t\treturn angle+Math.PI;\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(angle>=0)\n\t\t\t\treturn angle;\n\t\t\treturn angle+2*Math.PI;\n\t\t}\n\t\t\n\t}",
"static double calculateAngle(Line2D line, ArrowEnd end) {\n \t\t// Translate the line to 0,0\n \t\tdouble x1 = line.getX1();\n \t\tdouble y1 = line.getY1();\n \t\tdouble x2 = line.getX2();\n \t\tdouble y2 = line.getY2();\n \t\tdouble opposite = y2-y1;\n \t\tdouble adjacent = x2-x1;\n \n \t\tdouble radians = Math.atan(opposite/adjacent);\n \n \t\tif (adjacent < 0) radians += Math.PI;\n \n \t\t// TODO: Flip for other end\n \t\treturn radians;\n \t}",
"private static Vector2 CartesianToPolar(Vector2 t)\r\n {\n\r\n Vector2 a = new Vector2((float)Math.atan(-t.Y/t.X), (float)Math.sqrt((t.X * t.X) + (t.Y * t.Y)));\r\n if (t.X < 0)a.X += Math.PI;\r\n else if (t.Y < 0) a.X += Math.PI * 2;\r\n return a;\r\n }",
"public float angle (Vector2f other)\n {\n return FloatMath.acos(dot(other) / (length() * other.length()));\n }",
"public int getAngle(){\n\t\treturn (int)angle;\n\t}",
"public double getAngle() {\n\t\treturn navx.getAngle();\n\t}",
"public float calculateCelestialAngle(long par1, float par3)\n {\n return 0.5F;\n }",
"public double getAngle() {\n\treturn CVector.heading(v1, v2);\n }",
"double getAngle(int id);",
"public double getRawAngle()\n {\n double Angle = 0.0;\n\n switch (MajorAxis)\n {\n case X:\n Angle = getAngleX();\n break;\n case Y:\n Angle = getAngleY();\n break;\n case Z:\n Angle = getAngleZ();\n break;\n }\n\n return(Angle);\n }",
"@Override\r\n public double getRotation(double x, double y) {\n if (alignment == Alignment.horizontal || alignment == Alignment.vertical) {\r\n return 0;\r\n }\r\n\r\n // Map to circular alignment\r\n else {\r\n // Bottom line segment\r\n if (x < spaceLength) {\r\n return 0;\r\n }\r\n\r\n // Right half circle\r\n else if (x < spaceLength + spaceCircumference) {\r\n // Length of the arc (from the beginning of the half circle too x)\r\n double arcLength = x - spaceLength;\r\n\r\n // Ratio of the arc length compared to the circumference\r\n double ratio = arcLength / spaceCircumference;\r\n\r\n // Length of the arc in world coordinates\r\n double arcWorldLength = ratio * worldCircumference;\r\n\r\n // Angle of the arc in degrees\r\n return (arcWorldLength * 360) / (2 * Math.PI * radius);\r\n }\r\n\r\n // Top line segment\r\n else if (x < 2 * spaceLength + spaceCircumference) {\r\n return 180;\r\n }\r\n\r\n // Left half circle\r\n else {\r\n // Length of the arc (from the beginning of the half circle too x)\r\n double arcLength = x - (2 * spaceLength - spaceCircumference);\r\n\r\n // Ratio of the arc length compared to the circumference\r\n double ratio = arcLength / spaceCircumference;\r\n\r\n // Length of the arc in world coordinates\r\n double arcWorldLength = ratio * worldCircumference;\r\n\r\n // Angle of the arc in degrees\r\n return (arcWorldLength * 360) / (2 * Math.PI * radius) + 180;\r\n }\r\n }\r\n }",
"public static double angle(double x, double y) {\n\t\treturn atan2(y, x);\n\t}",
"public double getAngle() {\n return angle;\n }",
"public double getAngle() {\n return angle;\n }",
"public static int vectorAngle(int x, int y) {\n return (Math.round((float)Math.toDegrees(Math.atan2(x, y))));\n }",
"public static double getRotationAngleInDegrees(Location centerLocation, Location targetLocation) {\n double longitudeDelta = Math.toRadians(targetLocation.longitude - centerLocation.longitude);\n double centerLocationLatitude = Math.toRadians(centerLocation.latitude);\n double targetLocationLatitude = Math.toRadians(targetLocation.latitude);\n\n double x = (Math.cos(centerLocationLatitude) * Math.sin(targetLocationLatitude))\n - (Math.sin(centerLocationLatitude) * Math.cos(targetLocationLatitude) * Math.cos(longitudeDelta));\n double y = Math.sin(longitudeDelta) * Math.cos(targetLocationLatitude);\n\n double angle = Math.toDegrees(Math.atan2(y, x));\n\n // convert the interval (-180, 180] to [0, 360)\n if (angle < 0) {\n angle += 360;\n }\n\n return angle; // note that the angle can be '-0.0'\n }",
"public double getAngleBetween(Vector other){\n\t\treturn Math.acos(dot(other)/(magnitude() * other.magnitude()));\n\t}",
"public double getAngle() {\n synchronized (this.angleLock) {\n return this.movementComposer.getOrientationAngle();\n }\n }",
"public double angle(Vector2D v)\n\t{\n\t\treturn Math.toDegrees(Math.acos(this.dot(v)/v.length()/this.length()));\n\t}",
"public int getAngle() {\r\n return angle;\r\n }",
"public double Angle2D(double x1, double y1, double x2, double y2)\n {\n double dtheta,theta1,theta2;\n\n theta1 = Math.atan2(y1,x1);\n theta2 = Math.atan2(y2,x2);\n dtheta = theta2 - theta1;\n while (dtheta > Math.PI)\n dtheta -= 2*Math.PI;\n while (dtheta < -Math.PI)\n dtheta += 2*Math.PI;\n\n return(dtheta);\n}",
"public static double calculateAngleInDegrees(Vector base, Vector target1, Vector target2) {\n Vector baseToTarget1 = target1.subtract(base);\n Vector baseToTarget1Direction = normalize(baseToTarget1);\n Vector baseToTarget2 = target2.subtract(base);\n Vector baseToTarget2Direction = normalize(baseToTarget2);\n double dotProduct = safeDotProduct(baseToTarget1Direction, baseToTarget2Direction);\n double angleInRadians = Math.acos(dotProduct);\n return Math.toDegrees(angleInRadians);\n }",
"public double getGryoAngle() {\n\n\t\t// Normalize the angle\n\t\tdouble angle = gyro.getAngle() % 360;\n\n\t\tif (angle < 0) {\n\t\t\tangle = angle + 360;\n\t\t}\n\n\t\treturn angle;\n\t}",
"public double getAngle()\n {\n return (AngleAverage);\n }",
"public static double angle(ThreeVector v1,ThreeVector v2) {\r\n\t\tdouble a = (scalarProduct(v1,v2))/(v1.magnitude()*v2.magnitude());\r\n\t\tdouble b = Math.acos(a);\r\n\t\treturn Math.toDegrees(b);\r\n\t}",
"private double angleBP(int cx, int cy, int ex, int ey){\n\t return Math.atan2(((float)ey-cy),((float)ex-cx));\r\n\t }",
"private static double angulo(Point2D.Double p2,Point2D.Double p1){\n \t\n return Math.atan2(p2.x - p1.x, p2.y - p1.y);\n }",
"public double getAngle() {\n\t\treturn armMotor.getEncPosition();\n\t}",
"public double getAngle(){\n\t\treturn this.angle;\n\t}",
"private double getPolarAngle(double refX, double refY, double px, double py) {\n\t\tdouble tethaRadian = -1;\n\t\tif ((px - refX) > 0 && (refY - py) >= 0) {\n\t\t\ttethaRadian = Math.atan((refY - py) / (px - refX));\n\t\t} else if ((px - refX) > 0 && (refY - py) < 0) {\n\t\t\ttethaRadian = Math.atan((refY - py) / (px - refX)) + 2 * Math.PI;\n\t\t} else if ((px - refX) < 0) {\n\t\t\ttethaRadian = Math.atan((refY - py) / (px - refX)) + Math.PI;\n\t\t} else if ((px - refX) == 0 && (refY - py) > 0) {\n\t\t\ttethaRadian = Math.PI / 2;\n\t\t} else if ((px - refX) == 0 && (refY - py) < 0) {\n\t\t\ttethaRadian = 3 * Math.PI / 2;\n\t\t}\n\t\treturn tethaRadian;\n\t}",
"public int getAngle() {\r\n\t\treturn angle;\r\n\t}",
"public double angle() {\n double angle = Math.toDegrees(Utilities.calculateAngle(this.dx, -this.dy));\n return angle;\n }",
"public double getCounterclockwiseAngleBetween(Vector other){\n\t\tdouble sign = signum(cross(other).getZ()); //the sign of the cross product - will be zero if the vectors are paralell\n\t\t\n\t\tif(sign!=0){\n\t\t\treturn 2*Math.PI - sign*getAngleBetween(other);\n\t\t}else{\n\t\t\treturn getAngleBetween(other);\n\t\t}\n\t}",
"public Rotation2d getAngle() {\n // Note: This assumes the CANCoders are setup with the default feedback coefficient\n // and the sesnor value reports degrees.\n return Rotation2d.fromDegrees(canCoder.getAbsolutePosition());\n }",
"public double betweenAngle(Coordinates vectorA, Coordinates vectorB);",
"double adjust_angle_rotation(double angle) {\n double temp;\n temp=angle;\n if(temp>90) {\n temp=180-temp;\n }\n return temp;\n }",
"public double getAngle() {\n\t\treturn angle;\n\t}",
"public double getAngle() {\n\t\treturn angle;\n\t}"
] |
[
"0.7042089",
"0.698532",
"0.69801635",
"0.6925555",
"0.6827021",
"0.67443687",
"0.67201144",
"0.67147243",
"0.67147243",
"0.6612739",
"0.66093975",
"0.6603316",
"0.6599892",
"0.6570884",
"0.6568324",
"0.656495",
"0.6538432",
"0.65169585",
"0.64868844",
"0.6472751",
"0.6468498",
"0.64245045",
"0.6416178",
"0.638872",
"0.6386936",
"0.63713425",
"0.6345135",
"0.63288856",
"0.6320676",
"0.6314137",
"0.6307733",
"0.6294068",
"0.62768656",
"0.6269092",
"0.6268416",
"0.62404877",
"0.6231931",
"0.62229633",
"0.62119395",
"0.61836624",
"0.61670643",
"0.6150331",
"0.6147406",
"0.61455035",
"0.6140341",
"0.6136771",
"0.6126241",
"0.6098125",
"0.60965145",
"0.60901195",
"0.60773814",
"0.6072432",
"0.60581875",
"0.60513043",
"0.6050905",
"0.6044121",
"0.6031389",
"0.60309446",
"0.6021228",
"0.6020611",
"0.6008045",
"0.60061806",
"0.6002604",
"0.60010856",
"0.6000832",
"0.59992546",
"0.59986115",
"0.5988612",
"0.59826523",
"0.59824646",
"0.59824044",
"0.5963379",
"0.5962258",
"0.59521395",
"0.59520406",
"0.59520406",
"0.5949231",
"0.5946074",
"0.5944152",
"0.5942697",
"0.5940986",
"0.59408486",
"0.59303457",
"0.5929738",
"0.5926332",
"0.5925445",
"0.5920001",
"0.59075236",
"0.5891103",
"0.5879242",
"0.58723456",
"0.58474314",
"0.5843846",
"0.5839258",
"0.5838341",
"0.58311945",
"0.582912",
"0.58158654",
"0.5815784",
"0.5815784"
] |
0.6166714
|
41
|
/ compiled from: ILoggerFactory
|
public interface a {
b nJ(String str);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public interface LogFactory {\n\n /**\n * Check if logger class is compatible with the log factory.\n *\n * @param loggerClass logger class\n * @return true if compatible and false - otherwise\n */\n boolean isCompatible(Class<?> loggerClass);\n\n /**\n * Create logger with the given name (as configuration parameter).\n *\n * @param name logger name\n * @return logger instance\n */\n Object createLogger(String name);\n\n /**\n * Create logger with the given class (as configuration parameter).\n *\n * @param clazz class\n * @return logger instance\n */\n Object createLogger(Class<?> clazz);\n\n}",
"public interface FsmLogger {\n\t/**\n\t * Get name of the logger.\n\t * \n\t * @return the name\n\t */\n\tpublic String getName();\n\n\t/**\n\t * Log a fatal message.\n\t * \n\t * @param message\n\t * the message\n\t */\n\tpublic void fatal(String message);\n\n\t/**\n\t * Log a fatal message.\n\t * \n\t * @param message\n\t * the message\n\t * @param throwable\n\t * a throwable object\n\t */\n\tpublic void fatal(String message, Throwable throwable);\n\n\t/**\n\t * Log an error message.\n\t * \n\t * @param message\n\t * the message\n\t */\n\tpublic void error(String message);\n\n\t/**\n\t * Log an error message.\n\t * \n\t * @param message\n\t * the message\n\t * @param throwable\n\t * a throwable object\n\t */\n\tpublic void error(String message, Throwable throwable);\n\n\t/**\n\t * Log a warning message.\n\t * \n\t * @param message\n\t * the message\n\t */\n\tpublic void warn(String message);\n\n\t/**\n\t * Log a warning message.\n\t * \n\t * @param message\n\t * the message\n\t * @param throwable\n\t * a throwable object\n\t */\n\tpublic void warn(String message, Throwable throwable);\n\n\t/**\n\t * Log an info message.\n\t * \n\t * @param message\n\t * the message\n\t */\n\tpublic void info(String message);\n\n\t/**\n\t * Log an info message.\n\t * \n\t * @param message\n\t * the message\n\t * @param throwable\n\t * a throwable object\n\t */\n\tpublic void info(String message, Throwable throwable);\n\n\t/**\n\t * Log a debug message.\n\t * \n\t * @param message\n\t * the message\n\t */\n\tpublic void debug(String message);\n\n\t/**\n\t * Log a debug message.\n\t * \n\t * @param message\n\t * the message\n\t * @param throwable\n\t * a throwable object\n\t */\n\tpublic void debug(String message, Throwable throwable);\n\n\t/**\n\t * Log a trace message.\n\t * \n\t * @param message\n\t * the message\n\t */\n\tpublic void trace(String message);\n\n\t/**\n\t * Log a trace message.\n\t * \n\t * @param message\n\t * the message\n\t * @param throwable\n\t * a throwable object\n\t */\n\tpublic void trace(String message, Throwable throwable);\n\n\t/**\n\t * Get status of info messages logging in this logger.\n\t * \n\t * @return true if logging of info messages is enabled otherwise false\n\t */\n\tpublic boolean isInfoEnabled();\n\n\t/**\n\t * Get status of debug messages logging in this logger.\n\t * \n\t * @return true if logging of debug messages is enabled otherwise false\n\t */\n\tpublic boolean isDebugEnabled();\n\n\t/**\n\t * Get status of trace messages logging in this logger.\n\t * \n\t * @return true if logging of trace messages is enabled otherwise false\n\t */\n\tpublic boolean isTraceEnabled();\n}",
"public interface NSAutoLogger {\n\n void info(String msg);\n \n void info(String msg, Color color);\n\n void error(String msg);\n\n void debug(String msg);\n}",
"IFileLogger log();",
"public interface Logger {\n\tpublic void log(String msg);\n}",
"protected abstract ILogger getLogger();",
"abstract public LoggingService getLoggingService();",
"public interface Logger {\n void enable(boolean enabled);\n\n void d(String s, Object... args);\n\n void i(String s, Object... args);\n\n void w(String s, Object... args);\n\n void e(Throwable e, String s, Object... args);\n}",
"public MyLoggingFacade(Logger logger) {\n this.logger = logger;\n }",
"void initializeLogging();",
"public interface Logger {\n void verbose(String message, Object... args);\n void debug(Object msg);\n void debug(String message, Object... args);\n void info(String message, Object... args);\n void warning(String message, Object... args);\n void error(String message, Object... args);\n void error(Throwable throwable, String message, Object... args);\n}",
"public interface LoggerUtil {\n\t/**\n\t * Set the logger for the controller\n\t * \n\t * @param logName\n\t * @param filePath\n\t * @param logLevel\n\t * @return\n\t */\n\tLogger loggerArrangement(String logName, String filePath, LogeLevel logLevel);\n}",
"interface Solution {\n\n// use this Object to print the log (call from slf4j facade)\nstatic Logger log = LoggerFactory.getLogger(Solution.class);\n\n String decodeString(String s);\n}",
"private JavaUtilLogHandlers() { }",
"protected static Logger initLogger() {\n \n \n File logFile = new File(\"workshop2_slf4j.log\");\n logFile.delete();\n return LoggerFactory.getLogger(Slf4j.class.getName());\n }",
"private ExtentLogger() {}",
"public interface Logger {\n public void writeLog();\n}",
"public interface Logger\n{\n /**\n * Returns the name of the object.\n *\n * @return name of the Logger class\n */\n public String getName();\n\n /**\n * Rerturns the time of the object.\n *\n * @return time of the Logger object\n */\n public double getTime();\n}",
"@Override\n\tpublic void initLogger() {\n\t\t\n\t}",
"private HeaderBrandingTest()\n\t{\n\t\tBaseTest.classLogger = LoggerFactory.getLogger( HeaderBrandingTest.class );\n\t}",
"interface Logger {\n\n void d(String tag, String message);\n\n void e(String tag, String message, Throwable t);\n\n void e(String tag, String message);\n}",
"public interface LoggingManager {\n \n /**\n * Method configure is called at Shark start up, to configure\n * implementation of LoggingManager.\n *\n * @param cus an instance of CallbackUtilities used to get\n * properties for configuring logging in Shark.\n *\n * @exception RootException Thrown if configuring doesn't succeed.\n */\n void configure (CallbackUtilities cus) throws RootException;\n \n /**\n * Log a message object with the <i>ERROR</i> Level.\n *\n * @param msg the message to log.\n *\n * @exception RootException If something unexpected happens.\n *\n */\n void error (String msg) throws RootException;\n \n /**\n * Log a message object with the <i>ERROR</i> Level.\n *\n * @param msg the message to log.\n * @param ex the exception to log, including its stack trace. \n *\n * @exception RootException If something unexpected happens.\n *\n */\n void error (String msg, RootException ex) throws RootException;\n \n /**\n * Log a message object with the <i>ERROR</i> Level.\n *\n * @param channel the log channel to be used for logging. \n * @param msg the message to log.\n *\n * @exception RootException If something unexpected happens.\n *\n */\n void error (String channel, String msg) throws RootException;\n \n /**\n * Log a message object with the <i>ERROR</i> Level.\n *\n * @param channel the log channel to be used for logging. \n * @param msg the message to log.\n * @param ex the exception to log, including its stack trace. \n *\n * @exception RootException If something unexpected happens.\n *\n */\n void error (String channel, String msg, RootException ex) throws RootException;\n\n /**\n * Log a message object with the <i>WARN</i> Level.\n *\n * @param msg the message to log.\n *\n * @exception RootException If something unexpected happens.\n *\n */\n void warn (String msg) throws RootException;\n\n /**\n * Log a message object with the <i>WARN</i> Level.\n *\n * @param msg the message to log.\n * @param ex the exception to log, including its stack trace. \n *\n * @exception RootException If something unexpected happens.\n *\n */\n void warn (String msg, RootException ex) throws RootException;\n\n /**\n * Log a message object with the <i>WARN</i> Level.\n *\n * @param channel the log channel to be used for logging. \n * @param msg the message to log.\n *\n * @exception RootException If something unexpected happens.\n *\n */\n void warn (String channel,String msg) throws RootException;\n\n /**\n * Log a message object with the <i>WARN</i> Level.\n *\n * @param channel the log channel to be used for logging. \n * @param msg the message to log.\n * @param ex the exception to log, including its stack trace. \n *\n * @exception RootException If something unexpected happens.\n *\n */\n void warn (String channel, String msg, RootException ex) throws RootException;\n\n /**\n * Log a message object with the <i>INFO</i> Level.\n *\n * @param msg the message to log.\n *\n * @exception RootException If something unexpected happens.\n *\n */\n void info (String msg) throws RootException;\n\n /**\n * Log a message object with the <i>INFO</i> Level.\n *\n * @param msg the message to log.\n * @param ex the exception to log, including its stack trace. \n *\n * @exception RootException If something unexpected happens.\n *\n */\n void info (String msg, RootException ex) throws RootException;\n\n /**\n * Log a message object with the <i>INFO</i> Level.\n *\n * @param channel the log channel to be used for logging. \n * @param msg the message to log.\n *\n * @exception RootException If something unexpected happens.\n *\n */\n void info (String channel, String msg) throws RootException;\n\n /**\n * Log a message object with the <i>INFO</i> Level.\n *\n * @param channel the log channel to be used for logging. \n * @param msg the message to log.\n * @param ex the exception to log, including its stack trace. \n *\n * @exception RootException If something unexpected happens.\n *\n */\n void info (String channel, String msg, RootException ex) throws RootException;\n\n /**\n * Log a message object with the <i>DEBUG</i> level.\n *\n * @param msg the message to log.\n *\n * @exception RootException If something unexpected happens.\n *\n */\n void debug (String msg) throws RootException;\n\n /**\n * Log a message object with the <i>DEBUG</i> level.\n *\n * @param msg the message to log.\n * @param ex the exception to log, including its stack trace. \n *\n * @exception RootException If something unexpected happens.\n *\n */\n void debug (String msg, RootException ex) throws RootException;\n\n /**\n * Log a message object with the <i>DEBUG</i> level.\n *\n * @param channel the log channel to be used for logging. \n * @param msg the message to log.\n *\n * @exception RootException If something unexpected happens.\n *\n */\n void debug (String channel, String msg) throws RootException;\n\n /**\n * Log a message object with the <i>DEBUG</i> level.\n *\n * @param channel the log channel to be used for logging. \n * @param msg the message to log.\n * @param ex the exception to log, including its stack trace. \n *\n * @exception RootException If something unexpected happens.\n *\n */\n void debug (String channel, String msg, RootException ex) throws RootException;\n\n\n}",
"protected abstract Logger getLogger();",
"public interface IMesaLogger {\n\n\t/**\n\t * Writes a text string to the MESA log\n\t * \n\t * @param message The text string to display\n\t */\n\tpublic void writeString(String message);\n\n\t/**\n\t * Writes a SOAP message to the MESA log\n\t * \n\t * @param message The SOAP message to display\n\t */\n\tpublic void writeSoapMessage(SOAPMessage message);\n\n\t/**\n\t * Writes out an Axiom OMElement message to the logger.\n\t * \n\t * @param message the element to display\n\t */\n\tpublic void writeAxiomElementMessage(OMElement message);\n\n\t/**\n\t * Writes an HL7 message to the MESA log\n\t * \n\t * @param message the HL7 message to display\n\t */\n\tpublic void writeHL7Message(Message message);\n}",
"@Override\n public void logs() {\n \n }",
"public interface LogBootstrap {\n /**\n * Launch the logging system\n * @param properties - the full set of overlayed properties to bootstrap the logger\n * @throws IOException\n */\n public void init(Properties properties) throws IOException;\n}",
"@Override\n protected Logger getLogger() {\n return LOGGER;\n }",
"public interface Log {\n void debug(String msg, Object... args);\n\n void info(String msg, Object... args);\n\n void warn(String msg, Object... args);\n}",
"@Override\n\tprotected Logger getLogger() {\n\t\treturn HMetis.logger;\n\t}",
"public interface LogViewer {\n\n\t/**\n\t * General application info.\n\t * @param text\n\t */\n\tvoid info(String text);\n\t\n\t/**\n\t * General error info.\n\t * @param text\n\t */\n\tvoid err(String text);\n\t\n\t/**\n\t * Info related to GA.\n\t * @param text\n\t */\n\tvoid gaInfo(String text);\n\t\n\t/**\n\t * Info related to ANTS.\n\t * @param text\n\t */\n\tvoid antsInfo(String text);\n\t\n\t/**\n\t * Info related to BA.\n\t * @param text\n\t */\n\tvoid baInfo(String text);\n}",
"@Produces\n public Logger logger(InjectionPoint injectionPoint) {\n return Logger.getLogger(\n injectionPoint.getMember().getDeclaringClass().getName());\n }",
"Object createLogger(String name);",
"Map<String, Logger> loggers();",
"@Override\n public MagicLogger getLogger() {\n return logger;\n }",
"@Test\n public void shouldFilterTheFirstMessageAndLogTheSecond() {\n ILogger logger = new SysoutLogger();\n IFilter filter = new FilterLogStartingWith(\"w\");\n ILogger filterLogger = new FilterLogger(filter, logger);\n\n filterLogger.log(\"hello\");\n filterLogger.log(\"world\");\n assertThat(outContent.toString(), is(\"world\" + System.getProperty(\"line.separator\")));\n\n // TODO: Enhance functional interface Logger to take a filter and to have no more FilterLogger\n }",
"private Logger getLogger() {\n return LoggerFactory.getLogger(ApplicationManager.class);\n }",
"public Logger getLogger() {\t\t\n\t\treturn logger = LoggerFactory.getLogger(getClazz());\n\t}",
"public Logger getLogger(String name, LoggerFactory factory) {\n\t\treturn this.hierarchy.getLogger(name,factory);\n\t}",
"protected Logger getLogger() {\n return LoggerFactory.getLogger(getClass());\n }",
"public MyLogger () {}",
"public RevisorLogger getLogger();",
"public Logger (){}",
"public LogKitLogger(String name)\n/* */ {\n/* 64 */ this.name = name;\n/* 65 */ this.logger = getLogger();\n/* */ }",
"void setupFileLogging();",
"public interface LogFormatter {\n\n /**\n * Creates a log message.\n *\n * @param className The class name that the logger targets at.\n * @param message The original message that is specified with a log method of {@link Log}.\n * @return A log message.\n */\n String format(String className, String message);\n\n /**\n * Creates a log message.\n *\n * @param className The class name that the logger targets at.\n * @param format The format that is specified with a log method of {@link Log}.\n * @param args The additional arguments that are specified with a log method of {@link Log}.\n * @return A log message.\n */\n String format(String className, String format, Object... args);\n}",
"public interface LogConfig {\n\tLogCfg getLogCfg();\n}",
"protected TechnicalLoggerService getLoggerService() {\n\n return new TechnicalLoggerService() {\n\n @Override\n public void log(Class<?> callerClass, TechnicalLogSeverity severity, String message, Throwable t) {\n // TODO Auto-generated method stub\n\n }\n\n @Override\n public void log(Class<?> callerClass, TechnicalLogSeverity severity, String message) {\n // TODO Auto-generated method stub\n\n }\n\n @Override\n public void log(Class<?> callerClass, TechnicalLogSeverity severity, Throwable t) {\n // TODO Auto-generated method stub\n\n }\n\n @Override\n public boolean isLoggable(Class<?> callerClass, TechnicalLogSeverity severity) {\n // TODO Auto-generated method stub\n return false;\n }\n };\n\n\n }",
"@Override\r\n\tpublic Logger getLogger() {\r\n\t\t\r\n\t\treturn LogFileGenerator.getLogger();\r\n\t\t\r\n\t}",
"public Slf4jLogService() {\n this(System.getProperties());\n }",
"private Logger getLogger() {\n return LoggingUtils.getLogger();\n }",
"public interface InstrumenterLogger {\n\n void important(String msg, Object... args);\n\n void lessImportant(String msg, Object... args);\n}",
"private Logger(){ }",
"private Log() {\r\n\t}",
"public interface ILog {\n /**\n * 打印日志\n * @param L 虚拟机地址,可通过 {@link org.luaj.vm2.Globals#getGlobalsByLState(long)}获取\n */\n void l(long L, String tag, String log);\n\n /**\n * 打印错误日志\n * @param L 虚拟机地址,可通过 {@link org.luaj.vm2.Globals#getGlobalsByLState(long)}获取\n */\n void e(long L, String tag, String log);\n}",
"private Logger() {\n\n }",
"public interface ILog {\n\n /**\n * Send an information level log message, used by time-related log.\n *\n * @param tag Used to identify the source of a log message. It usually identifies\n * the class or activity where the log call occurs.\n * @param msg The message you would like logged.\n */\n void info(String tag, String msg);\n\n\n /**\n * Send an warning level log message, used by exception-related log.\n *\n * @param tag Used to identify the source of a log message. It usually identifies\n * the class or activity where the log call occurs.\n * @param msg The message you would like logged.\n */\n void warn(String tag, String msg);\n}",
"public interface ErrorLogger {\n\n public void onError(JudoException e, RequestInterface request);\n\n}",
"@Override\n public Logger getLog(Class clazz) {\n return new Slf4jLogger(LoggerFactory.getLogger(clazz));\n }",
"public interface ILogger {\r\n //name of columns for measuring multiple values together\r\n public void init(String... names) throws IOException;\r\n //datapoints per column for measuring multiple values together\r\n public void log(Object... vals) throws IOException;\r\n //all datapoints where submitted so clean up\r\n public void finish() throws IOException;\r\n}",
"public Logger getLogger()\n/* */ {\n/* 77 */ if (this.logger == null) {\n/* 78 */ this.logger = Hierarchy.getDefaultHierarchy().getLoggerFor(this.name);\n/* */ }\n/* 80 */ return this.logger;\n/* */ }",
"public interface ILog {\n void print(LogLevel logLevel, String tag, String msg, long tid);\n}",
"private Logger(){\n\n }",
"void printHellow() {\n logger.debug(\"hellow world begin....\");\n logger.info(\"it's a info message\");\n logger.warn(\"it's a warning message\");\n loggerTest.warn(\"from test1 :....\");\n loggerTest.info(\"info from test1 :....\");\n\n // print internal state\n LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();\n StatusPrinter.print(lc);\n }",
"public static Logger getLogger(final String name, final LoggerFactory factory) {\n\t\treturn getLogger(name);\n\t}",
"private native void initialiseLoggerReference(Logger logger);",
"private native void initialiseLoggerReference(Logger logger);",
"public interface TestReporterAppender {\n\n void logMessage(String sMessage, boolean bError);\n\n void logMessage(String sMessage, Throwable t);\n\n void init();\n\n void traceExecution(CommandRequest cRequest, OpResult rResult);\n\n void traceExecution(HttpOpRequest request);\n}",
"private final AbstractC33303b getLogger() {\n AbstractC32572g gVar = this.logger$delegate;\n AbstractC32607k kVar = $$delegatedProperties[2];\n return (AbstractC33303b) gVar.mo102348b();\n }",
"protected AbstractLogger() {\n \n }",
"Appendable getLog();",
"public Logger() {\n map = new LinkedHashMap<>();\n }",
"private static Logger getLogger() {\n return LogDomains.getLogger(ClassLoaderUtil.class, LogDomains.UTIL_LOGGER);\n }",
"public LoggerProxy(org.jboss.logging.Logger logger)\n/* */ {\n/* 23 */ this.logger = logger;\n/* */ }",
"private LogUtil() {\r\n /* no-op */\r\n }",
"private static void defineLogger() {\n HTMLLayout layout = new HTMLLayout();\n DailyRollingFileAppender appender = null;\n try {\n appender = new DailyRollingFileAppender(layout, \"/Server_Log/log\", \"yyyy-MM-dd\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n logger.addAppender(appender);\n logger.setLevel(Level.DEBUG);\n }",
"Object createLogger(Class<?> clazz);",
"private void loggerEinrichten() {\n\t\tlogger.setLevel(Level.INFO);\n//\t\tHandler handler = new FileHandler(\"/home/programmieren/TestFiles/iCalender/temp.log\");\n\t\tHandler handler = new ConsoleHandler();\n\t\thandler.setLevel(Level.FINEST);\n\t\thandler.setFormatter(new Formatter() {\n\t\t\t@Override\n\t\t\tpublic String format(LogRecord record) {\n\t\t\t\treturn record.getSourceClassName() + \".\" + record.getSourceMethodName() + \": \" + record.getMessage()\n\t\t\t\t\t\t+ \"\\n\";\n\t\t\t}\n\t\t});\n\t\tlogger.addHandler(handler);\n\t\tlogger.setUseParentHandlers(false);\n\t\tlogger.finest(\"begonnen\");\n\t}",
"public interface RepositoryLookupFailureCallback extends IErrorLogger {\n}",
"public String getLog();",
"private void initLoggers() {\n _logger = LoggerFactory.getInstance().createLogger();\n _build_logger = LoggerFactory.getInstance().createAntLogger();\n }",
"@Inject\n private void setLogger(Logger log) {\n logger = log;\n }",
"@Override\n\t\tpublic ConnectorLogger getLogFactory() {\n\t\t\treturn new MockConnectorLogger();\n\t\t}",
"private ErrorFactory() {\r\n\t}",
"private void initJulLogger() {\n SLF4JBridgeHandler.removeHandlersForRootLogger();\n SLF4JBridgeHandler.install();\n }",
"private TypicalLogEntries() {}",
"static public void setup() throws IOException {\n Logger logger = Logger.getLogger(\"\");\n\n logger.setLevel(Level.INFO);\n Calendar cal = Calendar.getInstance();\n //SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH-mm-ss\");\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n String dateStr = sdf.format(cal.getTime());\n fileTxt = new FileHandler(\"log_\" + dateStr + \".txt\");\n fileHTML = new FileHandler(\"log_\" + dateStr + \".html\");\n\n // Create txt Formatter\n formatterTxt = new SimpleFormatter();\n fileTxt.setFormatter(formatterTxt);\n logger.addHandler(fileTxt);\n\n // Create HTML Formatter\n formatterHTML = new LogHTMLFormatter();\n fileHTML.setFormatter(formatterHTML);\n logger.addHandler(fileHTML);\n }",
"Logger getLog(Class clazz);",
"public ServicioLogger() {\n }",
"public interface LogManager {\n\n void setInfo(boolean isInfo);\n\n void setError(boolean isError);\n\n void setWarning(boolean isWarning);\n\n void setDebug(boolean isDebug);\n\n\n void info(String text);\n\n void error(String text);\n\n void debug(String text);\n\n void warning(String text);\n\n}",
"public interface ThrowableFormatter extends Formatter<Throwable> {\n}",
"protected abstract Logger newInstance(String name);",
"void log();",
"@Override\n public void log()\n {\n }",
"@BeforeClass\n\tpublic static void setup() {\n\t\tLogger root = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);\n\t\troot.setLevel(Level.INFO);\n\t}",
"public static Logger get() {\n\t\treturn LoggerFactory.getLogger(WALKER.getCallerClass());\n\t}",
"protected Logger getLogger(final Class<?> klaz) {\n\t\treturn MavenLoggerFactory.getLogger(klaz, getLog());\n\t}",
"private void initLogger(BundleContext bc) {\n\t\tBasicConfigurator.configure();\r\n\t\tlogger = Logger.getLogger(Activator.class);\r\n\t\tLogger.getLogger(\"org.directwebremoting\").setLevel(Level.WARN);\r\n\t}",
"private static DefaultLogger getConsoleLogger() {\n DefaultLogger consoleLogger = new DefaultLogger();\n consoleLogger.setErrorPrintStream(System.err);\n consoleLogger.setOutputPrintStream(System.out);\n consoleLogger.setMessageOutputLevel(Project.MSG_INFO);\n \n return consoleLogger;\n }",
"@Test\n\tpublic void test() {\n\t\tLoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();\n\t\t// print logback's internal status\n\t\tStatusPrinter.print(lc);\n\t\t\n\t\tLOG.trace(\"this is a trace message\");\n\n\t\tLOG.debug(\"this is a debug message\");\n\n\t\tLOG.info(\"this is an info message\");\n\n\t\tLOG.warn(\"this is a warn message\");\n\n\t\tLOG.error(\"this is an error message\");\n\n\t}",
"@Override\n protected Logger newLogger(String name) {\n return new JettyLogger(name);\n }",
"private DAOLogger() {\n\t}"
] |
[
"0.6516323",
"0.64115417",
"0.6258581",
"0.6238512",
"0.61845505",
"0.61704814",
"0.61454487",
"0.60936064",
"0.60757595",
"0.6040329",
"0.60401726",
"0.6026679",
"0.5988575",
"0.5969397",
"0.59513754",
"0.59039813",
"0.5897599",
"0.5832124",
"0.5826622",
"0.5798065",
"0.5789376",
"0.5738229",
"0.5725055",
"0.5709368",
"0.5695468",
"0.56908303",
"0.568538",
"0.5684214",
"0.5664898",
"0.56565714",
"0.5648595",
"0.56440985",
"0.5642584",
"0.56372285",
"0.56293184",
"0.56267565",
"0.5619517",
"0.56093067",
"0.5607776",
"0.559865",
"0.55903774",
"0.5571255",
"0.55550647",
"0.5554916",
"0.5545058",
"0.55429804",
"0.55301946",
"0.5520186",
"0.54959756",
"0.5494635",
"0.54927707",
"0.5485014",
"0.5435564",
"0.5418465",
"0.5417642",
"0.54143834",
"0.5406769",
"0.54010904",
"0.53962547",
"0.53835297",
"0.53694",
"0.536676",
"0.5363503",
"0.53570986",
"0.5350971",
"0.5350971",
"0.5344291",
"0.53437567",
"0.53435266",
"0.53433365",
"0.5334795",
"0.53291935",
"0.53287065",
"0.53208053",
"0.53194666",
"0.5302079",
"0.5300174",
"0.5294099",
"0.5292381",
"0.5292044",
"0.528988",
"0.528644",
"0.5283631",
"0.5282553",
"0.52760726",
"0.5264765",
"0.52462703",
"0.52438545",
"0.52389127",
"0.52383566",
"0.52321446",
"0.5226186",
"0.52194023",
"0.5211908",
"0.52076995",
"0.52002484",
"0.5196926",
"0.51952934",
"0.5190846",
"0.5189836",
"0.51780033"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
String s=sc.nextLine();
char c[]=s.toCharArray();
int flag=0;
for(int i=0;i<c.length;i++)
{ for(int j=i+1;j<c.length;j++)
if(c[i]==c[j])
flag=1;
else
continue;
}
if(flag==1)
System.out.println("No");
else
System.out.println("Yes");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
public static void main(String[] args) {
BankAccount joe = new BankAccount();
System.out.println(joe.getAccountNumber());
joe.deposit("checking", 4000.00);
joe.withdraw("savings", 300.00);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
Returns a page of transactions data as a JSON object by passing a paging restriction in a GET request.
|
@GetMapping
public Page<Transaction> getTransactionsByPageable(Pageable pageable) {
Page<Transaction> pageOfTransactions = transactionService.getTransactionsByPageable(pageable);
return pageOfTransactions;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"long getAmountPage();",
"Page<BalanceDTO> findAll(Pageable pageable);",
"@PostMapping(\"/tlb-trade/pageList\")\n @Timed\n public ResponseEntity<ResponseResult> pageList(@RequestBody HashMap<String, Object> params) {\n log.debug(\"REST request to get a page of TlbTrades\");\n HashMap<String,Object> response = tlbTradeService.pageList(params);\n //HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/tbl-user\");\n ResponseResult json = new ResponseResult();\n HashMap<String, Object> retMap = new HashMap<>();\n Page<TlbTradeDTO> page=(Page<TlbTradeDTO>)response.get(\"page\");\n retMap.put(\"list\", page.getContent());\n retMap.put(\"total\", page.getTotalElements());\n retMap.put(\"totalPage\", page.getTotalPages());\n retMap.put(\"sumLots\", response.get(\"sumLots\"));\n retMap.put(\"sumAmount\", response.get(\"sumAmount\"));\n json.setData(retMap);\n json.setStatusCode(ResponseResult.SUCCESS_CODE);\n return new ResponseEntity<>(json, null, HttpStatus.OK);\n }",
"public interface TransactionService {\r\n public Map<String, Object> findByPage(Query query);\r\n}",
"public List<Timetable> pagging(int pageIndex, int pageSize) throws Exception;",
"public List<Transaction> getAllDepositTransactions(int start, int numOfRows) throws MiddlewareQueryException;",
"PageInfo list(Date beginDate, Date endDate, List<Integer> resources, int pageNo, int pageSize);",
"Page<BalanceSheetDTO> findAll(Pageable pageable);",
"Page<AccountDTO> findAllAccount(Pageable pageable);",
"Page<TITransferDetails> findAll(Pageable pageable);",
"cosmos.base.query.v1beta1.Pagination.PageResponse getPagination();",
"cosmos.base.query.v1beta1.Pagination.PageResponse getPagination();",
"cosmos.base.query.v1beta1.Pagination.PageResponse getPagination();",
"PaginatedResponse<Office> findAllPaginated( int page, int pageSize );",
"@CrossOrigin(origins = \"http://localhost:3000\")\n @RequestMapping(value = \"/get\", method = RequestMethod.GET, produces = \"application/json\")\n Page<Student> getStudentsByPagination(@RequestParam(value = \"page\", required = false) int page,\n @RequestParam(value = \"size\", required = false) int size){\n page = page <0 ? PAGINATION_DEFAULT_PAGE : page;\n size = (size <0) ? PAGINATION_DEFAULT_SIZE: size;\n return studentService.findAllByPaging(PageRequest.of(page, size));\n }",
"LiveData<PagedList<Response>> pagedList();",
"@Override\n\tpublic JSONObject getByPage(String param) {\n\t\tJSONObject data = new JSONObject();\n\t\tJSONObject result = new JSONObject();\n\t\tMainUtility mainUtil = new MainUtility();\n\t\tJSONObject jsonParams = mainUtil.stringToJson(param);\n\t\tStringBuilder builder = new StringBuilder();\n\t\tStringBuilder builderGetTotal = new StringBuilder();\n\n\t\tbuilder.append(\"SELECT `wt_id`, `wt_title`, `wt_content`, user.full_name, \"\n\t\t\t\t+ \"IF(writing_test.created_date IS NULL,null, DATE_FORMAT(writing_test.created_date, '%d-%m-%Y')) AS created_date FROM writing_test \"\n\t\t\t\t+ \"LEFT JOIN crm_user AS user ON writing_test.created_by = user.user_id WHERE 1=1 \");\n\t\tbuilderGetTotal.append(\"SELECT COUNT(1) FROM `writing_test` \"\n\t\t\t\t+ \" WHERE 1=1\");\n\t\t// filter header\n\t\tif (jsonParams.get(\"status\") == null || Integer.parseInt(jsonParams.get(\"status\").toString()) == -1) {\n\t\t\tbuilder.append(\" AND writing_test.deleted <> 1\");\n\t\t\tbuilderGetTotal.append(\" AND writing_test.deleted <> 1\");\n\t\t} else if (Integer.parseInt(jsonParams.get(\"status\").toString()) == -2) {// thùng rác\n\t\t\tbuilder.append(\" AND writing_test.deleted = 1\");\n\t\t\tbuilderGetTotal.append(\" AND writing_test.deleted = 1\");\n\t\t}\n\t\tif (jsonParams.get(\"wt_title\") != null && !\"\".equals(jsonParams.get(\"wt_title\").toString())) {\n\t\t\tbuilder.append(\" AND wt_title LIKE N'%\" + jsonParams.get(\"wt_title\").toString() + \"%'\");\n\t\t\tbuilderGetTotal\n\t\t\t\t\t.append(\" AND wt_title LIKE N'%\" + jsonParams.get(\"wt_title\").toString() + \"%'\");\n\t\t}\n\t\tif (jsonParams.get(\"wt_content\") != null && !\"\".equals(jsonParams.get(\"wt_content\").toString())) {\n\t\t\tbuilder.append(\" AND wt_content LIKE N'%\" + jsonParams.get(\"wt_content\").toString() + \"%'\");\n\t\t\tbuilderGetTotal\n\t\t\t\t\t.append(\" AND wt_content LIKE N'%\" + jsonParams.get(\"wt_content\").toString() + \"%'\");\n\t\t}\n\t\t// sortby\n\t\tif (jsonParams.get(\"sortField\") != null && !\"\".equals(jsonParams.get(\"sortField\").toString())) {\n\t\t\tswitch (jsonParams.get(\"sortField\").toString()) {\n\t\t\tdefault:\n\t\t\t\tbuilder.append(\" ORDER BY writing_test.created_date DESC\");\n\t\t\t\tbreak;\n\t\t\t}\n//\t\t\tif (jsonParams.get(\"sortOrder\") != null && \"descend\".equals(jsonParams.get(\"sortOrder\").toString())) {\n//\t\t\t\tbuilder.append(\" DESC\");\n//\t\t\t}\n//\t\t\tif (jsonParams.get(\"sortOrder\") != null && \"ascend\".equals(jsonParams.get(\"sortOrder\").toString())) {\n//\t\t\t\tbuilder.append(\" ASC\");\n//\t\t\t}\n\t\t}\n\t\tmainUtil.getLimitOffset(builder, jsonParams);\n\t\ttry {\n\t\t\tint totalRow = this.jdbcTemplate.queryForObject(builderGetTotal.toString(), Integer.class);\n\t\t\tList<Map<String, Object>> lstWrittingTest = this.jdbcTemplate.queryForList(builder.toString());\n\t\t\tJSONObject results = new JSONObject();\n\t\t\tresults.put(\"results\", lstWrittingTest);\n\t\t\tresults.put(\"total\", totalRow);\n\t\t\tdata.put(\"data\", results);\n\t\t\tdata.put(\"success\", true);\n\t\t} catch (Exception e) {\n\t\t\tdata.put(\"success\", false);\n\t\t\tdata.put(\"err\", e.getMessage());\n\t\t\tdata.put(\"msg\", \"Lấy danh sách bài kiểm tra thất bại\");\n\t\t}\n\t\treturn data;\n\t}",
"void findWithPagination(Pagination<Task, Project> pagination);",
"List<Activity> findAllPageable(int page, int size);",
"List<E> page(Page page, Long...params);",
"@Override\n\t@RequestMapping(value=\"/item/list\")\n\tpublic EasyUIDatagrid<TbItem> getItemsByPage(@RequestParam(value = \"page\", defaultValue=\"1\") Integer page,\n\t\t\t@RequestParam(value = \"rows\" ,defaultValue=\"30\") Integer rows) {\n\t\treturn service.getItemsByPage(page, rows);\n\t}",
"@Override\n\tpublic <T> PageResult<T> page(Map<String, CustmerCriteria> params, Integer currentPage, Integer pageSize,\n\t\t\tClass<T> entityClass) throws Exception {\n\t\treturn null;\n\t}",
"List selectByExampleWithPage(PaymentTradeExample example);",
"@GetMapping\n public ResponseEntity<PersonPageResponse> getAll(\n @RequestParam(name = \"page\", required = false, defaultValue = \"1\") int pageNumber,\n @RequestParam(name = \"size\", required = false, defaultValue = \"20\") int pageSize) {\n return ResponseEntity.ok(personService.getAllPaginated(pageNumber, pageSize));\n }",
"Page<BaacDTO> findAll(Pageable pageable);",
"List<MasterZipcode> getByPage(int pageNo);",
"Page<ItemPriceHistoryDTO> findAll(Pageable pageable);",
"public Page<Account> getAccPage(Pageable page);",
"@PreAuthorize(\"hasAnyRole('ADMIN')\")\n\t@RequestMapping(value=\"/page\",method=RequestMethod.GET) \n\tpublic ResponseEntity<Page<ClienteDTO>> findPage(\n\t\t\t@RequestParam(value=\"page\", defaultValue=\"0\") Integer page, \n\t\t\t@RequestParam(value=\"linesPerPage\", defaultValue=\"24\") Integer linesPerPage, //24 pq eh multiplo de 1, 2 3 e 4\n\t\t\t@RequestParam(value=\"orderBy\", defaultValue=\"nome\") String orderBy, \n\t\t\t@RequestParam(value=\"direction\", defaultValue=\"ASC\") String directionOrder) { //asc eh ascendente \n\t\t\n\t\tPage<Cliente> list = service.findPage(page,linesPerPage,orderBy,directionOrder);\n\t\t\n\t\tPage<ClienteDTO> listDTO = list.map(obj->new ClienteDTO(obj));\n\t\t\n\t\treturn ResponseEntity.ok().body(listDTO); \n\t\t\n\t}",
"@GetMapping(params = \"type\")\n\tpublic Page<Transaction> getTransactionsByTypeAndPageable(\n\t\t@RequestParam String type, \n\t\tPageable pageable) \n\t{\n\t\tPage<Transaction> pageOfTransactions = null;\n\t\t\n\t\ttry {\n\t\t\tpageOfTransactions = transactionService.getTransactionsByTypeAndPageable(type, pageable);\n\t\t}\n\t\tcatch (InvalidDataException e) {\n\t\t\tString exceptionMessage = e.getMessage();\n\t\t\tthrow new InvalidDataException(exceptionMessage);\n\t\t}\n\t\t\n\t\treturn pageOfTransactions;\n\t}",
"List<Product> getProductPage(int pageNumber, int pageSize);",
"cosmos.base.query.v1beta1.Pagination.PageRequest getPagination();",
"cosmos.base.query.v1beta1.Pagination.PageRequest getPagination();",
"cosmos.base.query.v1beta1.Pagination.PageRequest getPagination();",
"@GetMapping(\"all\")\n\tpublic ResponseEntity<Page<Person>> getAllPeople(@RequestParam(defaultValue = \"0\") int pageNum, @RequestParam(defaultValue = \"100\") int pageSize){\n\t\t//20 is the number of results which can also be an input if we decide to have the user be able to pick how many results appear\n\t\t//I just figured that 20 was probably a good number\n\t\tPageable page = PageRequest.of(pageNum, pageSize, Sort.by(\"firstName\"));\n\t\t\t\t\n\t\treturn new ResponseEntity<>(pRepo.findAll(page), HttpStatus.OK);\n\t}",
"List<CustomerInformation> queryListByCustomer(Integer page, Integer rows, CustomerInformation cust);",
"Page<EstimateProductDTO> findAll(Pageable pageable);",
"Page<ConsultationInfoDTO> findAll(Pageable pageable);",
"Page<EventActivityDTO> findAll(Pageable pageable);",
"Page<CoveredActivityDTO> findAll(Pageable pageable);",
"@RequestMapping(value = \"/transactionservice/transaction/{transaction_id}\", method=RequestMethod.GET, produces = \"application/json\")\n\t@ResponseBody\n\tpublic Transaction getTransaction(@PathVariable long transaction_id) {\n\t\tif(transactions.size() > transaction_id) {\n\t\t\treturn transactions.get((int) transaction_id);\n\t\t} else {\n\t\t\tthrow new TransactionNotFoundException(transaction_id);\n\t\t}\n\t}",
"public CustomerPaymentList getCustomerPayments(String response) throws Exception {\n\n CustomerPaymentList customerPaymentList = new CustomerPaymentList();\n\n JSONObject jsonObject = new JSONObject(response.trim());\n\n JSONArray customerpayments = jsonObject.getJSONArray(\"customerpayments\"); //No I18N\n\n for (int i = 0; i < customerpayments.length(); i++) {\n CustomerPayment customerPayment = new CustomerPayment();\n\n customerPayment.setPaymentId(customerpayments.getJSONObject(i).getString(\"payment_id\"));\n customerPayment.setPaymentNumber(customerpayments.getJSONObject(i).getString(\"payment_number\"));\n customerPayment.setInvoiceNumbers(customerpayments.getJSONObject(i).getString(\"invoice_numbers\"));\n customerPayment.setDate(customerpayments.getJSONObject(i).getString(\"date\"));\n customerPayment.setPaymentMode(customerpayments.getJSONObject(i).getString(\"payment_mode\"));\n customerPayment.setAmount(customerpayments.getJSONObject(i).getDouble(\"amount\")); //No I18N\n customerPayment.setBcyAmount(customerpayments.getJSONObject(i).getDouble(\"bcy_amount\")); //No I18N\n customerPayment.setUnusedAmount(customerpayments.getJSONObject(i).getDouble(\"unused_amount\")); //No I18N\n customerPayment.setBcyUnusedAmount(customerpayments.getJSONObject(i).getDouble(\"bcy_unused_amount\")); //No I18N\n customerPayment.setAccountId(customerpayments.getJSONObject(i).getString(\"account_id\"));\n customerPayment.setAccountName(customerpayments.getJSONObject(i).getString(\"account_name\"));\n customerPayment.setDescription(customerpayments.getJSONObject(i).getString(\"description\"));\n customerPayment.setReferenceNumber(customerpayments.getJSONObject(i).getString(\"reference_number\"));\n customerPayment.setCustomerId(customerpayments.getJSONObject(i).getString(\"customer_id\"));\n customerPayment.setCustomerName(customerpayments.getJSONObject(i).getString(\"customer_name\"));\n\n customerPaymentList.add(customerPayment);\n }\n\n PageContext pageContext = new PageContext();\n\n JSONObject pagecontext = jsonObject.getJSONObject(\"page_context\"); //No I18N\n\n pageContext.setPage(pagecontext.getInt(\"page\")); //No I18N\n pageContext.setPerPage(pagecontext.getInt(\"per_page\")); //No I18N\n pageContext.setHasMorePage(pagecontext.getBoolean(\"has_more_page\")); //No I18N\n pageContext.setReportName(pagecontext.getString(\"report_name\"));\n pageContext.setAppliedFilter(pagecontext.getString(\"applied_filter\"));\n pageContext.setSortColumn(pagecontext.getString(\"sort_column\"));\n pageContext.setSortOrder(pagecontext.getString(\"sort_order\"));\n\n customerPaymentList.setPageContext(pageContext);\n\n return customerPaymentList;\n }",
"@SneakyThrows\n public List<Map<String, String>> getTable(String tableName, int page, int pageSize) {\n try (CloseableHttpClient client = HttpClientBuilder.create()\n .setDefaultRequestConfig(getRequestConfig())\n .build()) {\n String url = KodexaPlatform.getUrl() + \"/api/stores/\" + ref.replace(\":\", \"/\") + \"/rows\";\n log.info(\"Connecting to [\" + url + \"]\");\n\n URIBuilder builder = new URIBuilder(url);\n builder.setParameter(\"page\", String.valueOf(page)).setParameter(\"pageSize\", String.valueOf(pageSize)).setParameter(\"table\", tableName);\n\n HttpGet httpGet = new HttpGet(builder.build());\n httpGet.addHeader(\"x-access-token\", KodexaPlatform.getAccessToken());\n\n HttpResponse response = client.execute(httpGet);\n\n if (response.getStatusLine().getStatusCode() != 200) {\n throw new KodexaException(\"Unable to create a session, check your access token and URL [\" + response.getStatusLine().getStatusCode() + \"]\");\n }\n\n String responseJson = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);\n Page<StoredRow> rowPage = jsonOm.readValue(responseJson, new TypeReference<Page<StoredRow>>() {\n });\n\n return rowPage.getContent().stream().map(StoredRow::getData).collect(Collectors.toList());\n\n\n } catch (IOException e) {\n throw new KodexaException(\"Unable to create a session on Kodexa\", e);\n }\n }",
"@RequestMapping(\"query\")\r\n\t@ResponseBody\r\n\tpublic EasyUIResult findItemByPage(@RequestParam(value=\"page\")Integer page,Integer rows) {\r\n\t\tSystem.out.println(itemService.findItemByPage(page, rows));\r\n\t\treturn itemService.findItemByPage(page, rows);\r\n\t\t\r\n\t}",
"@Test\n public void validSessionTransactionsGetLimitTest() {\n // Insert two transactions into the API.\n validSessionTransactionsGetOffsetTest();\n\n int size = given()\n .header(\"X-session-ID\", sessionId)\n .queryParam(\"limit\", TEST_OFFSET_NUMBER)\n .get(\"/api/v1/transactions\")\n .then()\n .assertThat()\n .statusCode(200)\n .body(matchesJsonSchema(TRANSACTION_LIST_SCHEMA_PATH))\n .contentType(ContentType.JSON)\n .extract()\n .jsonPath()\n .getList(\"$\")\n .size();\n\n assertThat(TEST_OFFSET_NUMBER, equalTo(size));\n }",
"Page<RegionDTO> findAll(Pageable pageable);",
"List<SpotPrice> getAll(Integer pageNumber, Integer pageSize);",
"public abstract Page<CustomerInfo> findAll(GlobalSearch globalSearch, Pageable pageable);",
"Page<ServiceUserDTO> findAll(Pageable pageable);",
"List<Commodity> selectAll(@Param(\"beginRow\") int beginRow,@Param(\"pageSize\") int pageSize);",
"Page<FinancialYearSettingsDTO> findAll(Pageable pageable);",
"List<ProjectDTO> findLimitProjects(int pageNumber);",
"Page<SeminarioDTO> findAll(Pageable pageable);",
"Page<PeopleDTO> findAll(Pageable pageable);",
"Page<AccountDTO> coverListAccountToListEmpDTO(Page<Account> accounts);",
"@RequestMapping(value = {\"/listContracts\" }, method = RequestMethod.GET)\n public String listContracts(@RequestParam(required = false) Integer page, ModelMap model) {\n List<Contract> contracts = contractService.findAll();\n PagedListHolder<Contract> pagedListHolder = new PagedListHolder<Contract>(contracts);\n pagedListHolder.setPageSize(10);\n model.addAttribute(\"maxPages\", pagedListHolder.getPageCount());\n model.addAttribute(\"page\", page);\n if(page == null || page < 1 || page > pagedListHolder.getPageCount()){\n pagedListHolder.setPage(0);\n model.addAttribute(\"contracts\", pagedListHolder.getPageList());\n }\n else if(page <= pagedListHolder.getPageCount()) {\n pagedListHolder.setPage(page-1);\n model.addAttribute(\"contracts\", pagedListHolder.getPageList());\n }\n// model.addAttribute(\"contracts\", contracts);\n model.addAttribute(\"loggedinuser\", getPrincipal());\n return \"contractslist\";\n }",
"Page<DashboardDTO> findAll(Pageable pageable);",
"public List<Object> retrievePagingList(PageBean pageBean) ;",
"Page<TypeBonDTO> findAll(Pageable pageable);",
"void findWithPagination(Pagination<Activity, Assignment> pagination);",
"@Override\n public List<ModelPerson> selectpaging(Integer start, Integer end) {\n return null;\n }",
"@Override\r\n\tpublic List<TariffModel> getAllWithPage(int rows, int page) throws Exception {\n\t\treturn null;\r\n\t}",
"Page<Accessprofile> listAllByPage(Pageable pageable);",
"@GET\n @Path( \"transactions\" )\n void getTransactions( @QueryParam( \"orderId\" ) Long orderId,\n @QueryParam( \"invoiceId\" ) Long invoiceId,\n SuccessCallback<Items<Transaction>> callback );",
"Page<T> findAll(Pageable pageable);",
"Page<ProjectCodeDTO> findAll(Pageable pageable);",
"public Page getCustomerProfiles(Integer pageNumber,String requestPage) throws EOTException;",
"Page<Student> findPaginated(int pageNo, int pageSize);",
"Page<ProjectsDTO> findAll(Pageable pageable);",
"public DataPage<CustomerBean> fetchPage(int startRow, int pageSize) {\n return getDataPage(startRow, pageSize);\r\n }",
"@SuppressWarnings(\"unchecked\")\n @CompileStatic\n public Iterable<NyQLResult> paginate(String scriptName, int pageSize, Map<String, Object> data) throws NyException {\n QScript script = new QPagedScript(parse(scriptName, data), pageSize);\n try {\n return (Iterable<NyQLResult>) configurations.getExecutorRegistry().defaultExecutorFactory().create().execute(script);\n } catch (Exception ex) {\n if (ex instanceof NyException) {\n throw (NyException) ex;\n } else {\n throw new NyScriptExecutionException(\"Ny script execution error!\", ex);\n }\n }\n }",
"Page<BannerInfoDTO> findAll(Pageable pageable);",
"@GetMapping(\"/by-to-data\")\n\tpublic Page<Transaction> getTransactionsByToDataAndPageable(\n\t\t@RequestParam TransactionToType toType,\n\t\t@RequestParam Long toId,\n\t\tPageable pageable) \n\t{\n\t\tPage<Transaction> pageOfTransactions = transactionService.getTransactionsByToDataAndPageable(toType, toId, pageable);\t\n\t\treturn pageOfTransactions;\n\t}",
"Page<LibraryDTO> findAll(Pageable pageable);",
"@PostMapping(\"/tlb-trade/getAll\")\n @Timed\n public ResponseEntity<ResponseResult> getAll() {\n log.debug(\"REST request to get a page of TlbTrades\");\n List<TlbTradeDTO> tlbTradeDTOList = tlbTradeService.findAll();\n ResponseResult json = new ResponseResult();\n json.setData(tlbTradeDTOList);\n json.setStatusCode(ResponseResult.SUCCESS_CODE);\n return new ResponseEntity<>(json, HttpStatus.OK);\n }",
"List<T> findPage(int pageNumber);",
"long getPageSize();",
"long getPageSize();",
"long getPageSize();",
"List<ShopItem> findAllByInTopPageTrue();",
"Page<ParaUserDTO> findAll(Pageable pageable);",
"Page<LoginHistoryEntity> findAll(Integer page);",
"Page<Person> findAll(Pageable pageable);",
"Page<EtatOperation> findAll(Pageable pageable);",
"private DataPage<CustomerBean> getDataPage(int startRow, int pageSize) {\r\n // Retrieve the total number of customers from the database. This\r\n // number is required by the DataPage object so the paginator will know\r\n // the relative location of the page data.\r\n int totalNumberCustomers = CUSTOMERDAO.findTotalNumberCustomers().intValue();\r\n\r\n // Calculate indices to be displayed in the ui.\r\n int endIndex = startRow + pageSize;\r\n if (endIndex > totalNumberCustomers) {\r\n endIndex = totalNumberCustomers;\r\n }\r\n // The final record has been deleted, pushing us into the previous page\r\n if(endIndex-startRow == 0){\r\n startRow = startRow - pageSize;\r\n onePageDataModel.setRowIndex(startRow);\r\n\r\n }\r\n \r\n // Query database for sorted results.\r\n List<Customer> pageCustomers = CUSTOMERDAO.findPageCustomers(sortColumnName, sortAscending, startRow, endIndex - startRow);\r\n\r\n // Remove this Renderable from the existing render groups.\r\n leaveRenderGroups();\r\n\r\n // Populate the list of uiCustomerBeans for binding to the dataTable.\r\n uiCustomerBeans.clear();\r\n for (Customer pageCustomer : pageCustomers) {\r\n uiCustomerBeans.add(new CustomerBean(pageCustomer, this));\r\n }\r\n // Add this Renderable to the new render groups.\r\n joinRenderGroups();\r\n\r\n // Reset the dirtyData flag.\r\n onePageDataModel.setDirtyData(false);\r\n\r\n // This is required when using Hibernate JPA. If the EntityManager is not\r\n // cleared or closed objects are cached and stale objects will show up\r\n // in the table.\r\n // This way, the detached objects are reread from the database.\r\n // This call is not required with TopLink JPA, which uses a Query Hint\r\n // to clear the l2 cache in CustomerDAO.\r\n EntityManagerHelper.getEntityManager().clear();\r\n\r\n return new DataPage<CustomerBean>(totalNumberCustomers, startRow, uiCustomerBeans);\r\n }",
"@GET\n @Path(\"account/transactions/{account_id}\")\n public Response getAccountTransactions(@PathParam(\"account_id\") \n String accountId) {\n \n String output = \"This entry point will return all transactions related to the account: \" + accountId;\n return Response.status(200).entity(output).build();\n \n }",
"@Override\n public BaseListDto<GoodsNameDto> selectPage(Map<String, Object> params) throws Exception {\n int currentPage = Integer.parseInt(params.getOrDefault(\"currentPage\", 1).toString());\n int pageSize = Integer.parseInt(params.getOrDefault(\"pageSize\", 10).toString());\n QueryWrapper<GoodsName> qw = new QueryWrapper<>();\n DaoUtil.parseGenericQueryWrapper(qw, params, GoodsName.class);\n IPage<GoodsName> pages = goodsNameMapper.selectPage((Page<GoodsName>) DaoUtil.queryPage(currentPage, pageSize), qw);\n List<GoodsNameDto> list = pages.getRecords().stream().map(entity -> entity2Dto(entity)).collect(Collectors.toList());\n return new BaseListDto<GoodsNameDto>(list, (int) pages.getTotal());\n }",
"@GetMapping(produces=\"application/json\" )\n public ResponseEntity<PaginatedResponse> getAllProducts(@RequestParam Map<String, String> requestParams) {\n \n int limit = DEFAULT_LIMIT;\n if (requestParams.containsKey(\"limit\")) {\n limit = Integer.parseInt(requestParams.get(\"limit\"));\n }\n \n int page = FIRST_PAGE;\n if (requestParams.containsKey(\"page\")) {\n page = Integer.parseInt(requestParams.get(\"page\"));\n }\n \n List<Product> products = productDao.findAll(requestParams);\n int numberOfProducts = products.size();\n \n int endValue = (page * limit) + limit;\n if (endValue > numberOfProducts) {\n endValue = numberOfProducts;\n }\n \n LOGGER.debug(\"total: {} page: {} end: {}\", numberOfProducts, page, endValue);\n\n // only provide a page worth of data\n products = products.subList(page * limit, endValue);\n \n // add self links to each product\n products.forEach(p -> {\n p.add(linkTo(methodOn(ProductSearchService.class).getProduct(p.getProductId())).withSelfRel());\n });\n \n return new ResponseEntity<>(new PaginatedResponse(numberOfProducts, requestParams, products, page, limit), HttpStatus.OK);\n }",
"private ArrayList<Transaction> getTransactionsOfTheDay(int assetID) throws Exception {\n int i = 1;\n ArrayList<Transaction> currentTransactions = new ArrayList<Transaction>();\n ArrayList<Transaction> allTransactions = new ArrayList<Transaction>();\n\n while (true) {\n String url = MASTER_URL + ASSETS + assetID + \"/history_paginate.api?page=\" + i;\n\n URL obj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\n // request method\n con.setRequestMethod(\"GET\");\n\n // request headers\n con.setRequestProperty(\"token\", USER_TOKEN);\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n // reading input stream\n BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n String inputLine;\n String response = \"\";\n while ((inputLine = in.readLine()) != null) {\n response += inputLine;\n }\n in.close();\n\n DateTime assetActiveDateTime = new DateTime().minusDays(1);\n// System.out.println(assetActiveDateTime);\n int day = assetActiveDateTime.getDayOfMonth();\n int month = assetActiveDateTime.getMonthOfYear();\n int year = assetActiveDateTime.getYear();\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(org.codehaus.jackson.map.DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n String emptyHistory = \"{\\\"history\\\":[]\";\n if (!response.substring(0,13).equals(emptyHistory)) {\n String arrayResponse = response.substring(11, response.length() - 1);\n CollectionType constructCollectionType =\n TypeFactory.defaultInstance().constructCollectionType(ArrayList.class,\n Transaction.class);\n currentTransactions = mapper.readValue(arrayResponse, constructCollectionType);\n for (Transaction t : currentTransactions){\n DateTime checkoutDateTime = t.getCheckOutDateTime();\n if (day == checkoutDateTime.getDayOfMonth() &&\n month == checkoutDateTime.getMonthOfYear() &&\n year == checkoutDateTime.getYear()) {\n allTransactions.add(t);\n }\n }\n// System.out.println(allTransactions);\n currentTransactions.clear();\n } else {\n break;\n }\n i++;\n }\n return allTransactions;\n }",
"int getPageSize();",
"int getPageSize();",
"int getPageSize();",
"int getPageSize();",
"Page<PolicyRecord> findAll(Pageable pageable);",
"@RequestMapping(value = \"/operations\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n @Transactional(readOnly = true)\n public ResponseEntity<List<OperationDTO>> getAll(@RequestParam(value = \"page\" , required = false) Integer offset,\n @RequestParam(value = \"per_page\", required = false) Integer limit)\n throws URISyntaxException {\n \tPageable p = null;\n \tif (limit != null && limit.intValue() < 0) {\n \t\tp = new PageRequest(0, Integer.MAX_VALUE);\n \t} else {\n \t\tp = PaginationUtil.generatePageRequest(offset, limit);\n \t}\n Page<Operation> page = operationRepository.findAll(p);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/operations\", offset, limit);\n return new ResponseEntity<>(page.getContent().stream()\n .map(operationMapper::operationToOperationDto)\n .collect(Collectors.toCollection(LinkedList::new)), headers, HttpStatus.OK);\n }",
"public List<Transaction> getAllReserveTransactions(int start, int numOfRows) throws MiddlewareQueryException;",
"@GetMapping(\"/by-from-data\")\n\tpublic Page<Transaction> getTransactionsByFromDataAndPageable(\n\t\t@RequestParam TransactionFromType fromType,\n\t\t@RequestParam Long fromId,\n\t\tPageable pageable) \n\t{\n\t\tPage<Transaction> pageOfTransactions = transactionService.getTransactionsByFromDataAndPageable(fromType, fromId, pageable);\n\t\treturn pageOfTransactions;\n\t}",
"@Transactional\n @Override\n public PageUtils queryPage(Map<String, Object> params) {\n QueryWrapper<PurchaseDetailEntity> wrapper = new QueryWrapper<>();\n String key = (String) params.get(\"key\");\n if (!StringUtils.isEmpty(key)) {\n wrapper.and(w->{\n w.eq(\"purchase_id\", key).or().like(\"sku_id\", key);\n });\n }\n String status = (String) params.get(\"status\");\n if (!StringUtils.isEmpty(status)) {\n wrapper.eq(\"status\", status);\n }\n String wareId = (String) params.get(\"wareId\");\n if (!StringUtils.isEmpty(wareId)) {\n wrapper.eq(\"ware_id\", wareId);\n }\n IPage<PurchaseDetailEntity> page = this.page(\n new Query<PurchaseDetailEntity>().getPage(params),\n wrapper\n );\n\n return new PageUtils(page);\n }",
"public Page<CustomersListSearchConditionsDTO> findAll(Pageable pageable);",
"@Override\n public PageInfo<OrderPojo> findAll(int pageNum, int pageSize) {\n return null;\n }"
] |
[
"0.64720666",
"0.62258196",
"0.6136524",
"0.6114454",
"0.61090183",
"0.6042395",
"0.5988201",
"0.59235394",
"0.58942336",
"0.5878266",
"0.58758104",
"0.58758104",
"0.58758104",
"0.5875067",
"0.58541924",
"0.584401",
"0.5836903",
"0.5835543",
"0.5820804",
"0.5809535",
"0.58092666",
"0.5800495",
"0.57882077",
"0.5787702",
"0.5786223",
"0.57758635",
"0.57636136",
"0.5762643",
"0.5748936",
"0.5741732",
"0.57324594",
"0.571519",
"0.571519",
"0.571519",
"0.5715083",
"0.5711516",
"0.57102793",
"0.57005847",
"0.5688449",
"0.56878096",
"0.56701434",
"0.56681967",
"0.5659825",
"0.5658975",
"0.56589687",
"0.5656763",
"0.5648132",
"0.56247413",
"0.5623545",
"0.5621327",
"0.5619765",
"0.56161535",
"0.5613593",
"0.5603304",
"0.5592277",
"0.55910575",
"0.55804443",
"0.5578846",
"0.55763614",
"0.5575968",
"0.5575673",
"0.55705917",
"0.5555123",
"0.5550206",
"0.5550077",
"0.55465394",
"0.55412525",
"0.5528219",
"0.5519713",
"0.5506652",
"0.5505629",
"0.54987234",
"0.5497522",
"0.5497404",
"0.54915506",
"0.5490094",
"0.54891396",
"0.54891396",
"0.54891396",
"0.54875356",
"0.5485846",
"0.54849374",
"0.54816675",
"0.5474962",
"0.5463375",
"0.54605824",
"0.54518014",
"0.54475784",
"0.5443371",
"0.5438642",
"0.5438642",
"0.5438642",
"0.5438642",
"0.5433179",
"0.5425463",
"0.5425353",
"0.5418222",
"0.5416286",
"0.541074",
"0.5408344"
] |
0.5505506
|
71
|
Returns a page of transactions of a specified type's data as a JSON object by passing a paging restriction in a GET request. Allowed transaction types (caseinsensitive): "INCOME" "EXPENSE" "TRANSFER"
|
@GetMapping(params = "type")
public Page<Transaction> getTransactionsByTypeAndPageable(
@RequestParam String type,
Pageable pageable)
{
Page<Transaction> pageOfTransactions = null;
try {
pageOfTransactions = transactionService.getTransactionsByTypeAndPageable(type, pageable);
}
catch (InvalidDataException e) {
String exceptionMessage = e.getMessage();
throw new InvalidDataException(exceptionMessage);
}
return pageOfTransactions;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public List<HCLFieldTransaction> getTransactionbyType(String transactionType)\r\n\t\t\tthrows JsonProcessingException, IOException {\r\n\r\n\t\tlogger.info(\"Logger Name: getTransactionbyType() :: \" + logger.getName());\r\n\t\tlogger.debug(\"Transaction Type : getTransactionbyType() :: \" + transactionType);\r\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\r\n\t\tlogger.info(\"Open Bank API URL :: getTotalAmountbyTransactionType() :: \"\r\n\t\t\t\t+ TransactionConstant.THIRD_PARTY_REST_API);\r\n\t\tJsonNode root = mapper.readTree(new URL(TransactionConstant.THIRD_PARTY_REST_API));\r\n\r\n\t\tList<HCLFieldTransaction> transactionList = new ArrayList<HCLFieldTransaction>();\r\n\r\n\t\t/* Traversing Nested JSON node to publish the relevant data */\r\n\t\ttry {\r\n\t\t\tJsonNode transactionsNodes = root.path(\"transactions\");\r\n\r\n\t\t\tfor (JsonNode transactionsNode : transactionsNodes) {\r\n\r\n\t\t\t\tHCLFieldTransaction hclFieldTransaction = new HCLFieldTransaction();\r\n\t\t\t\tJsonNode details = transactionsNode.path(\"details\");\r\n\t\t\t\thclFieldTransaction.setTransactionType(details.path(\"type\").asText());\r\n\r\n\t\t\t\t/* When transactionType is null or empty */\r\n\t\t\t\tif (transactionType == null && details.path(\"type\").isNull() == true) {\r\n\t\t\t\t\thclFieldTransaction.setId(transactionsNode.path(\"id\").asText());\r\n\r\n\t\t\t\t\tJsonNode thisAccount_Node = transactionsNode.path(\"this_account\");\r\n\t\t\t\t\thclFieldTransaction.setAccountId(thisAccount_Node.path(\"id\").asText());\r\n\r\n\t\t\t\t\tJsonNode otherAccount_Node = transactionsNode.path(\"other_account\");\r\n\t\t\t\t\thclFieldTransaction.setCounterpartyAccount(otherAccount_Node.path(\"number\").asText());\r\n\r\n\t\t\t\t\tJsonNode otherAccount_holder_Node = otherAccount_Node.path(\"holder\");\r\n\t\t\t\t\thclFieldTransaction.setCounterpartyName(otherAccount_holder_Node.path(\"name\").asText());\r\n\t\t\t\t\tJsonNode metadata = otherAccount_Node.path(\"metadata\");\r\n\t\t\t\t\thclFieldTransaction.setCounterPartyLogoPath(metadata.path(\"open_corporates_URL\").asText());\r\n\r\n\t\t\t\t\thclFieldTransaction.setTransactionType(details.path(\"type\").asText());\r\n\t\t\t\t\thclFieldTransaction.setDescription(details.path(\"description\").asText());\r\n\r\n\t\t\t\t\tJsonNode value = details.path(\"value\");\r\n\t\t\t\t\thclFieldTransaction.setInstructedAmount(value.path(\"amount\").asDouble());\r\n\r\n\t\t\t\t\thclFieldTransaction.setInstructedCurrency(value.path(\"currency\").asText());\r\n\r\n\t\t\t\t\thclFieldTransaction.setTransactionAmount(value.path(\"amount\").asDouble());\r\n\t\t\t\t\thclFieldTransaction.setTransactionCurrency(value.path(\"currency\").asText());\r\n\t\t\t\t\tlogger.debug(\"Transaction Field Row Value:: \" + hclFieldTransaction.toString());\r\n\r\n\t\t\t\t\t/* Adding specific type of transaction list into one ArrayList */\r\n\t\t\t\t\ttransactionList.add(hclFieldTransaction);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* When transactionType is not null or empty */\r\n\t\t\t\telse if (transactionType != null) {\r\n\r\n\t\t\t\t\tif (hclFieldTransaction.getTransactionType().equalsIgnoreCase(transactionType.trim())) {\r\n\r\n\t\t\t\t\t\tlogger.debug(\"Transaction Type :: \" + transactionType);\r\n\t\t\t\t\t\thclFieldTransaction.setId(transactionsNode.path(\"id\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode thisAccount_Node = transactionsNode.path(\"this_account\");\r\n\t\t\t\t\t\thclFieldTransaction.setAccountId(thisAccount_Node.path(\"id\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode otherAccount_Node = transactionsNode.path(\"other_account\");\r\n\t\t\t\t\t\thclFieldTransaction.setCounterpartyAccount(otherAccount_Node.path(\"number\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode otherAccount_holder_Node = otherAccount_Node.path(\"holder\");\r\n\t\t\t\t\t\thclFieldTransaction.setCounterpartyName(otherAccount_holder_Node.path(\"name\").asText());\r\n\t\t\t\t\t\tJsonNode metadata = otherAccount_Node.path(\"metadata\");\r\n\t\t\t\t\t\thclFieldTransaction.setCounterPartyLogoPath(metadata.path(\"open_corporates_URL\").asText());\r\n\r\n\t\t\t\t\t\thclFieldTransaction.setTransactionType(details.path(\"type\").asText());\r\n\t\t\t\t\t\thclFieldTransaction.setDescription(details.path(\"description\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode value = details.path(\"value\");\r\n\t\t\t\t\t\thclFieldTransaction.setInstructedAmount(value.path(\"amount\").asDouble());\r\n\r\n\t\t\t\t\t\thclFieldTransaction.setInstructedCurrency(value.path(\"currency\").asText());\r\n\r\n\t\t\t\t\t\thclFieldTransaction.setTransactionAmount(value.path(\"amount\").asDouble());\r\n\t\t\t\t\t\thclFieldTransaction.setTransactionCurrency(value.path(\"currency\").asText());\r\n\t\t\t\t\t\tlogger.debug(\"Transaction Field Row Value:: \" + hclFieldTransaction.toString());\r\n\r\n\t\t\t\t\t\t/* Adding specific type of transaction list into one ArrayList */\r\n\t\t\t\t\t\ttransactionList.add(hclFieldTransaction);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"Exception : getTransactionbyType() :: \", e);\r\n\t\t}\r\n\t\tlogger.info(\"Return value from service layer:: getTransactionbyType() :: \" + transactionList.toString());\r\n\t\treturn transactionList;\r\n\r\n\t}",
"Page<TypeBonDTO> findAll(Pageable pageable);",
"@GetMapping(\"/between-dates\")\n\tpublic Page<Transaction> getTransactionsBetweenDatesByTypeAndPageable(\n\t\t@RequestParam String type,\n\t\t@RequestParam @DateTimeFormat(pattern = \"dd.MM.yyyy\") Date startDate,\n\t\t@RequestParam @DateTimeFormat(pattern = \"dd.MM.yyyy\") Date endDate,\n\t\tPageable pageable) \n\t{\n\t\tPage<Transaction> pageOfTransactions = null;\n\t\t\n\t\ttry {\n\t\t\tpageOfTransactions = transactionService.getTransactionsBetweenDatesByTypeAndPageable(type, startDate, endDate, pageable);\n\t\t}\n\t\tcatch (InvalidDataException e) {\n\t\t\tString exceptionMessage = e.getMessage();\n\t\t\tthrow new InvalidDataException(exceptionMessage);\n\t\t}\n\t\t\n\t\treturn pageOfTransactions;\n\t}",
"@GetMapping(\"/by-to-data\")\n\tpublic Page<Transaction> getTransactionsByToDataAndPageable(\n\t\t@RequestParam TransactionToType toType,\n\t\t@RequestParam Long toId,\n\t\tPageable pageable) \n\t{\n\t\tPage<Transaction> pageOfTransactions = transactionService.getTransactionsByToDataAndPageable(toType, toId, pageable);\t\n\t\treturn pageOfTransactions;\n\t}",
"long getAmountPage();",
"List selectByExampleWithPage(PaymentTradeExample example);",
"@PostMapping(\"/tlb-trade/pageList\")\n @Timed\n public ResponseEntity<ResponseResult> pageList(@RequestBody HashMap<String, Object> params) {\n log.debug(\"REST request to get a page of TlbTrades\");\n HashMap<String,Object> response = tlbTradeService.pageList(params);\n //HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/tbl-user\");\n ResponseResult json = new ResponseResult();\n HashMap<String, Object> retMap = new HashMap<>();\n Page<TlbTradeDTO> page=(Page<TlbTradeDTO>)response.get(\"page\");\n retMap.put(\"list\", page.getContent());\n retMap.put(\"total\", page.getTotalElements());\n retMap.put(\"totalPage\", page.getTotalPages());\n retMap.put(\"sumLots\", response.get(\"sumLots\"));\n retMap.put(\"sumAmount\", response.get(\"sumAmount\"));\n json.setData(retMap);\n json.setStatusCode(ResponseResult.SUCCESS_CODE);\n return new ResponseEntity<>(json, null, HttpStatus.OK);\n }",
"Page<TITransferDetails> findAll(Pageable pageable);",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<T> getPage(Class<T> type, int PageNo,int PageSize,int StartNo) {\n\t\tQuery query=super.getSessionFactory().getCurrentSession().createQuery(\"from \"+type.getName()+\"\");\r\n\t\tquery.setMaxResults(PageSize);\r\n\t\tquery.setFirstResult(StartNo+PageNo*PageSize);\r\n\t\treturn (List<T>)query.list();\r\n\t}",
"Page<BalanceDTO> findAll(Pageable pageable);",
"@Override\n\tpublic <T> PageResult<T> page(Map<String, CustmerCriteria> params, Integer currentPage, Integer pageSize,\n\t\t\tClass<T> entityClass) throws Exception {\n\t\treturn null;\n\t}",
"Collection<Transaction> findAllByTransactiontype(int type, Sort sort);",
"@GetMapping(\"/by-from-data\")\n\tpublic Page<Transaction> getTransactionsByFromDataAndPageable(\n\t\t@RequestParam TransactionFromType fromType,\n\t\t@RequestParam Long fromId,\n\t\tPageable pageable) \n\t{\n\t\tPage<Transaction> pageOfTransactions = transactionService.getTransactionsByFromDataAndPageable(fromType, fromId, pageable);\n\t\treturn pageOfTransactions;\n\t}",
"@RequestMapping(value=\"/terrains\", method=RequestMethod.GET)\n\tpublic Page<Terrain> listTerrains(int page , int size , String type) {\n\t\treturn terrainRepository.getTerrainByType(type, new PageRequest(page, size));\n\t}",
"Page<SygTypeServiceDTO> findAll(Pageable pageable);",
"public interface TransactionService {\r\n public Map<String, Object> findByPage(Query query);\r\n}",
"public abstract <T> Page<T> list(Pageable pageable, Class<T> clazz);",
"@Override\n\tpublic JSONObject getByPage(String param) {\n\t\tJSONObject data = new JSONObject();\n\t\tJSONObject result = new JSONObject();\n\t\tMainUtility mainUtil = new MainUtility();\n\t\tJSONObject jsonParams = mainUtil.stringToJson(param);\n\t\tStringBuilder builder = new StringBuilder();\n\t\tStringBuilder builderGetTotal = new StringBuilder();\n\n\t\tbuilder.append(\"SELECT `wt_id`, `wt_title`, `wt_content`, user.full_name, \"\n\t\t\t\t+ \"IF(writing_test.created_date IS NULL,null, DATE_FORMAT(writing_test.created_date, '%d-%m-%Y')) AS created_date FROM writing_test \"\n\t\t\t\t+ \"LEFT JOIN crm_user AS user ON writing_test.created_by = user.user_id WHERE 1=1 \");\n\t\tbuilderGetTotal.append(\"SELECT COUNT(1) FROM `writing_test` \"\n\t\t\t\t+ \" WHERE 1=1\");\n\t\t// filter header\n\t\tif (jsonParams.get(\"status\") == null || Integer.parseInt(jsonParams.get(\"status\").toString()) == -1) {\n\t\t\tbuilder.append(\" AND writing_test.deleted <> 1\");\n\t\t\tbuilderGetTotal.append(\" AND writing_test.deleted <> 1\");\n\t\t} else if (Integer.parseInt(jsonParams.get(\"status\").toString()) == -2) {// thùng rác\n\t\t\tbuilder.append(\" AND writing_test.deleted = 1\");\n\t\t\tbuilderGetTotal.append(\" AND writing_test.deleted = 1\");\n\t\t}\n\t\tif (jsonParams.get(\"wt_title\") != null && !\"\".equals(jsonParams.get(\"wt_title\").toString())) {\n\t\t\tbuilder.append(\" AND wt_title LIKE N'%\" + jsonParams.get(\"wt_title\").toString() + \"%'\");\n\t\t\tbuilderGetTotal\n\t\t\t\t\t.append(\" AND wt_title LIKE N'%\" + jsonParams.get(\"wt_title\").toString() + \"%'\");\n\t\t}\n\t\tif (jsonParams.get(\"wt_content\") != null && !\"\".equals(jsonParams.get(\"wt_content\").toString())) {\n\t\t\tbuilder.append(\" AND wt_content LIKE N'%\" + jsonParams.get(\"wt_content\").toString() + \"%'\");\n\t\t\tbuilderGetTotal\n\t\t\t\t\t.append(\" AND wt_content LIKE N'%\" + jsonParams.get(\"wt_content\").toString() + \"%'\");\n\t\t}\n\t\t// sortby\n\t\tif (jsonParams.get(\"sortField\") != null && !\"\".equals(jsonParams.get(\"sortField\").toString())) {\n\t\t\tswitch (jsonParams.get(\"sortField\").toString()) {\n\t\t\tdefault:\n\t\t\t\tbuilder.append(\" ORDER BY writing_test.created_date DESC\");\n\t\t\t\tbreak;\n\t\t\t}\n//\t\t\tif (jsonParams.get(\"sortOrder\") != null && \"descend\".equals(jsonParams.get(\"sortOrder\").toString())) {\n//\t\t\t\tbuilder.append(\" DESC\");\n//\t\t\t}\n//\t\t\tif (jsonParams.get(\"sortOrder\") != null && \"ascend\".equals(jsonParams.get(\"sortOrder\").toString())) {\n//\t\t\t\tbuilder.append(\" ASC\");\n//\t\t\t}\n\t\t}\n\t\tmainUtil.getLimitOffset(builder, jsonParams);\n\t\ttry {\n\t\t\tint totalRow = this.jdbcTemplate.queryForObject(builderGetTotal.toString(), Integer.class);\n\t\t\tList<Map<String, Object>> lstWrittingTest = this.jdbcTemplate.queryForList(builder.toString());\n\t\t\tJSONObject results = new JSONObject();\n\t\t\tresults.put(\"results\", lstWrittingTest);\n\t\t\tresults.put(\"total\", totalRow);\n\t\t\tdata.put(\"data\", results);\n\t\t\tdata.put(\"success\", true);\n\t\t} catch (Exception e) {\n\t\t\tdata.put(\"success\", false);\n\t\t\tdata.put(\"err\", e.getMessage());\n\t\t\tdata.put(\"msg\", \"Lấy danh sách bài kiểm tra thất bại\");\n\t\t}\n\t\treturn data;\n\t}",
"@GetMapping(\"/buy-types\")\n @Timed\n public ResponseEntity<List<BuyTypeDTO>> getAllBuyTypes(@RequestParam(required = false) String query, @ApiParam Pageable pageable) {\n log.debug(\"REST request to get a page of BuyTypes\");\n Page<BuyTypeDTO> page = buyTypeService.findAll(query,pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/buy-types\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }",
"Page<BalanceSheetDTO> findAll(Pageable pageable);",
"List selectByExampleWithPage(PaymentTradeExampleExtended exampleExtended);",
"public Page<Account> getAccPage(Pageable page);",
"public TransactionResponse getTransactionByIdAndType(String id, String type) throws ParseException {\n TransactionResponse response = new TransactionResponse();\n Predicate<Transaction> byId = t -> t.getId().equals(id);\n Predicate<Transaction> byType = t -> t.getType().equals(type);\n response.setTransaction(idAndTypefilterTransaction(byType, byId));\n return response;\n }",
"Page<AccountDTO> coverListAccountToListEmpDTO(Page<Account> accounts);",
"Page<AccountDTO> findAllAccount(Pageable pageable);",
"Page<EnumEmpTypeDTO> findAll(Pageable pageable);",
"@PreAuthorize(\"hasAnyRole('ADMIN')\")\n\t@RequestMapping(value=\"/page\",method=RequestMethod.GET) \n\tpublic ResponseEntity<Page<ClienteDTO>> findPage(\n\t\t\t@RequestParam(value=\"page\", defaultValue=\"0\") Integer page, \n\t\t\t@RequestParam(value=\"linesPerPage\", defaultValue=\"24\") Integer linesPerPage, //24 pq eh multiplo de 1, 2 3 e 4\n\t\t\t@RequestParam(value=\"orderBy\", defaultValue=\"nome\") String orderBy, \n\t\t\t@RequestParam(value=\"direction\", defaultValue=\"ASC\") String directionOrder) { //asc eh ascendente \n\t\t\n\t\tPage<Cliente> list = service.findPage(page,linesPerPage,orderBy,directionOrder);\n\t\t\n\t\tPage<ClienteDTO> listDTO = list.map(obj->new ClienteDTO(obj));\n\t\t\n\t\treturn ResponseEntity.ok().body(listDTO); \n\t\t\n\t}",
"public interface ITBKRest {\r\n\r\n public Page<GoodsItem> search(String q,String cat,String itemloc,String sort,boolean is_tmall,boolean is_overseas,long start_price,long end_price,long start_tk_rate,long end_tk_rate,long platform,long page_no,long page_size);\r\n\r\n public Page<ShopItem> searchShop(String q, String sort, boolean is_tmall, long start_credit, long start_commission_rate, long end_commission_rate, long start_total_action, long end_total_action, long start_auction_count, long end_auction_count,long platform,long page_no,long page_size );\r\n\r\n public Page<CatItem> getCat(long[] cids,long parentCid);\r\n}",
"public abstract Page<CustomerInfo> findAll(GlobalSearch globalSearch, Pageable pageable);",
"Page<TypeBonDTO> search(String query, Pageable pageable);",
"public List<Timetable> pagging(int pageIndex, int pageSize) throws Exception;",
"Page<CoveredActivityDTO> findAll(Pageable pageable);",
"Page<BaacDTO> findAll(Pageable pageable);",
"public Page<AccountDTO> findAllByGender(String gender, Pageable pageable);",
"public Page getCustomerProfiles(Integer pageNumber,String requestPage) throws EOTException;",
"public Page<LearningType> findAll(Pageable pageable);",
"Page<FinancialYearSettingsDTO> findAll(Pageable pageable);",
"@GetMapping(value = \"/leave\") // demo on postman:\n\t\t\t\t\t\t\t\t\t// \"http://localhost:8080/api/balance/leave?page=1&limit=2&type=sick\"\n\tpublic LeaveOutput show(@RequestParam(\"page\") int page, @RequestParam(\"limit\") int limit,\n\t\t\t@RequestParam(\"type\") String type) {\n\n\t\treturn leaveService.findAllByType(page, limit, type);\n\t}",
"@Override\n\tpublic List<Object> modifyByPage(JSONObject params) {\n\t\tList<Object> resultData = new ArrayList<Object>();\n\t\tString type = StringUtil.ToString(params.getString(\"type\"));\n\t\tSystem.out.println(type);\n\t\tString tip = StringUtil.ToString(params.getString(\"tip\"));\n\t\tString area = StringUtil.ToString(params.getString(\"area\"));\n\t\tString releaseDate = StringUtil.ToString(params.getString(\"releaseDate\"));\n\t\tint size = Integer.parseInt(params.getString(\"size\"));\n\t\tint currentPage = Integer.parseInt(params.getString(\"currentPage\"));\n \n\t\tMap<String, Object> data = new HashMap<String, Object>();\n\t\tdata.put(\"type\", type);\n\t\tif(!tip.equals(\"\")){\n\t\t\tdata.put(\"tip\", tip);\n\t\t} else if(!area.equals(\"\")){\n\t\t\tdata.put(\"area\", area);\n\t\t} else if(!releaseDate.equals(\"\")){\n\t\t\tdata.put(\"releaseDate\", releaseDate);\n\t\t}\n\t\tPageResultBean prb = new PageResultBean();\n\t\tprb.setPageSize(size);\n\t\tprb.setCurrentPage(currentPage);\n\t\tprb.setToPage(currentPage);\n\t\tPageResultBean resultPrb = new PageResultBean();\n\t\tString orderBy = \"asc\";\n\t\tresultPrb = this.queryForPage(prb, \"Movie.selectByType\", \"Movie.selectPage\", data, orderBy);\n\t\tresultData.add(resultPrb);\n\n\t\treturn resultData;\n\t}",
"public List<Transaction> getAllDepositTransactions(int start, int numOfRows) throws MiddlewareQueryException;",
"@Test\n public void getTransactionsByType() throws Exception {\n String expectedFile = \"src/test/resources/expected-transactions.json\";\n List<Transaction> expectedTransactions = Arrays.asList(new ObjectMapper()\n .readValue(JsonUtils.readFileAsString(expectedFile), Transaction[].class));\n List<Transaction> actualTransactions = openBankTransactionsService.getTransactionsByType(TEST_TRANSACTION_TYPE);\n assertEquals(expectedTransactions, actualTransactions);\n }",
"void findWithPagination(Pagination<Activity, Assignment> pagination);",
"@Transactional\n @Override\n public PageUtils queryPage(Map<String, Object> params) {\n QueryWrapper<PurchaseDetailEntity> wrapper = new QueryWrapper<>();\n String key = (String) params.get(\"key\");\n if (!StringUtils.isEmpty(key)) {\n wrapper.and(w->{\n w.eq(\"purchase_id\", key).or().like(\"sku_id\", key);\n });\n }\n String status = (String) params.get(\"status\");\n if (!StringUtils.isEmpty(status)) {\n wrapper.eq(\"status\", status);\n }\n String wareId = (String) params.get(\"wareId\");\n if (!StringUtils.isEmpty(wareId)) {\n wrapper.eq(\"ware_id\", wareId);\n }\n IPage<PurchaseDetailEntity> page = this.page(\n new Query<PurchaseDetailEntity>().getPage(params),\n wrapper\n );\n\n return new PageUtils(page);\n }",
"Page<ConsultationInfoDTO> findAll(Pageable pageable);",
"public Page<Event> findEventsByEventTypeId(Long typeId , Pageable pageable);",
"@RequestMapping(value = {\"/listContracts\" }, method = RequestMethod.GET)\n public String listContracts(@RequestParam(required = false) Integer page, ModelMap model) {\n List<Contract> contracts = contractService.findAll();\n PagedListHolder<Contract> pagedListHolder = new PagedListHolder<Contract>(contracts);\n pagedListHolder.setPageSize(10);\n model.addAttribute(\"maxPages\", pagedListHolder.getPageCount());\n model.addAttribute(\"page\", page);\n if(page == null || page < 1 || page > pagedListHolder.getPageCount()){\n pagedListHolder.setPage(0);\n model.addAttribute(\"contracts\", pagedListHolder.getPageList());\n }\n else if(page <= pagedListHolder.getPageCount()) {\n pagedListHolder.setPage(page-1);\n model.addAttribute(\"contracts\", pagedListHolder.getPageList());\n }\n// model.addAttribute(\"contracts\", contracts);\n model.addAttribute(\"loggedinuser\", getPrincipal());\n return \"contractslist\";\n }",
"Page<EstimateProductDTO> findAll(Pageable pageable);",
"void findWithPagination(Pagination<Task, Project> pagination);",
"PaginatedSearchResponseModel findAllPostsForType(String type, Pageable page);",
"Page<EventActivityDTO> findAll(Pageable pageable);",
"@Override\n\tpublic List<Record> getRecordByTypePageNum(Type type, int pageNum, int line) {\n\t\t Session session=HibernateSessionFactory.getSession();\n\t\t\tTransaction tx=session.beginTransaction();\n\t\t\tList<Record> list=new ArrayList<Record>();\n\t\t\tRecordDAO recordDAO=new RecordDAO();\n\t\t\t\n\t\t\ttry{\n\t\t\t\tlist=recordDAO.getRecordByTypePageNum(type, pageNum, line);\n\t\t\t\ttx.commit();\n\t\t\t}catch(RuntimeException e){\n\t\t\t\te.printStackTrace();\n\t\t\t\ttx.rollback();\n\t\t\t}finally{\n\t\t\t\tsession.close();\n\t\t\t}\n\t\t\treturn list;\n\t\t}",
"Page<SeminarioDTO> findAll(Pageable pageable);",
"public List<Lot> getLotsByEntityType(String type, int start, int numOfRows) throws MiddlewareQueryException;",
"@GetMapping(\"all\")\n\tpublic ResponseEntity<Page<Person>> getAllPeople(@RequestParam(defaultValue = \"0\") int pageNum, @RequestParam(defaultValue = \"100\") int pageSize){\n\t\t//20 is the number of results which can also be an input if we decide to have the user be able to pick how many results appear\n\t\t//I just figured that 20 was probably a good number\n\t\tPageable page = PageRequest.of(pageNum, pageSize, Sort.by(\"firstName\"));\n\t\t\t\t\n\t\treturn new ResponseEntity<>(pRepo.findAll(page), HttpStatus.OK);\n\t}",
"List<MasterZipcode> getByPage(int pageNo);",
"public void callGetProfilePost(final BaseActivity activity, String filter, final int queryType, int limit, int offset) {\n String mOrderBy = \"CreatedAt DESC\";\r\n // DialogManager.showProgress(activity);\r\n activity.sysOut(\"API-TYPE: \" + \"GET\");\r\n activity.sysOut(\"API-OPERATION: \" + UrlUtils.BASE_URL + UrlUtils.POSTS + \"?filter=\" +\r\n filter + \"&related=\" + APIConstants.POST_FEED_RELATION + \"&order=\" + mOrderBy + \"&limit=\" + limit + \"&offset=\" + offset);\r\n RetrofitClient.getRetrofitInstance().getRetrofitApiInterface().callGetProfilePosts(filter, APIConstants.POST_FEED_RELATION, mOrderBy, limit, offset, true)\r\n .enqueue(new Callback<PostsModel>() {\r\n @Override\r\n public void onResponse(Call<PostsModel> call, Response<PostsModel> response) {\r\n if (response.isSuccessful()) {\r\n // DialogManager.hideProgress();\r\n Object mResponseObj = response.body();\r\n activity.retrofitOnResponse(mResponseObj, queryType);\r\n } else {\r\n activity.retrofitOnError(response.code(), response.message());\r\n }\r\n }\r\n\r\n @Override\r\n public void onFailure(Call<PostsModel> call, Throwable t) {\r\n // DialogManager.hideProgress();\r\n activity.retrofitOnFailure();\r\n }\r\n });\r\n\r\n }",
"Page<ItemPriceHistoryDTO> findAll(Pageable pageable);",
"@Override\r\n\tpublic Type getRequestType() {\n\t\treturn Type.PAGE;\r\n\t}",
"public CustomerPaymentList getCustomerPayments(String response) throws Exception {\n\n CustomerPaymentList customerPaymentList = new CustomerPaymentList();\n\n JSONObject jsonObject = new JSONObject(response.trim());\n\n JSONArray customerpayments = jsonObject.getJSONArray(\"customerpayments\"); //No I18N\n\n for (int i = 0; i < customerpayments.length(); i++) {\n CustomerPayment customerPayment = new CustomerPayment();\n\n customerPayment.setPaymentId(customerpayments.getJSONObject(i).getString(\"payment_id\"));\n customerPayment.setPaymentNumber(customerpayments.getJSONObject(i).getString(\"payment_number\"));\n customerPayment.setInvoiceNumbers(customerpayments.getJSONObject(i).getString(\"invoice_numbers\"));\n customerPayment.setDate(customerpayments.getJSONObject(i).getString(\"date\"));\n customerPayment.setPaymentMode(customerpayments.getJSONObject(i).getString(\"payment_mode\"));\n customerPayment.setAmount(customerpayments.getJSONObject(i).getDouble(\"amount\")); //No I18N\n customerPayment.setBcyAmount(customerpayments.getJSONObject(i).getDouble(\"bcy_amount\")); //No I18N\n customerPayment.setUnusedAmount(customerpayments.getJSONObject(i).getDouble(\"unused_amount\")); //No I18N\n customerPayment.setBcyUnusedAmount(customerpayments.getJSONObject(i).getDouble(\"bcy_unused_amount\")); //No I18N\n customerPayment.setAccountId(customerpayments.getJSONObject(i).getString(\"account_id\"));\n customerPayment.setAccountName(customerpayments.getJSONObject(i).getString(\"account_name\"));\n customerPayment.setDescription(customerpayments.getJSONObject(i).getString(\"description\"));\n customerPayment.setReferenceNumber(customerpayments.getJSONObject(i).getString(\"reference_number\"));\n customerPayment.setCustomerId(customerpayments.getJSONObject(i).getString(\"customer_id\"));\n customerPayment.setCustomerName(customerpayments.getJSONObject(i).getString(\"customer_name\"));\n\n customerPaymentList.add(customerPayment);\n }\n\n PageContext pageContext = new PageContext();\n\n JSONObject pagecontext = jsonObject.getJSONObject(\"page_context\"); //No I18N\n\n pageContext.setPage(pagecontext.getInt(\"page\")); //No I18N\n pageContext.setPerPage(pagecontext.getInt(\"per_page\")); //No I18N\n pageContext.setHasMorePage(pagecontext.getBoolean(\"has_more_page\")); //No I18N\n pageContext.setReportName(pagecontext.getString(\"report_name\"));\n pageContext.setAppliedFilter(pagecontext.getString(\"applied_filter\"));\n pageContext.setSortColumn(pagecontext.getString(\"sort_column\"));\n pageContext.setSortOrder(pagecontext.getString(\"sort_order\"));\n\n customerPaymentList.setPageContext(pageContext);\n\n return customerPaymentList;\n }",
"public abstract Page<CustomerOrder> findAll(GlobalSearch globalSearch, Pageable pageable);",
"Page<RegionDTO> findAll(Pageable pageable);",
"List<TransactionType> listClientTransactionTypes();",
"Page<ProjectCodeDTO> findAll(Pageable pageable);",
"@PostMapping(\"/J314Authorities.pag\")\n\t@Timed\n\t\n\tpublic ResultExt< Page< J314AuthorityPoj >> getAllPag(HttpServletRequest request,HttpServletResponse response, @Valid @RequestBody J314AuthorityCritPaged pag)\n\t{\n\t\t\n\t\tString params=UtilParams.paramsToString(\"J314AuthorityCritPaged\",pag);\n\n\t\tContexto ctx = Contexto.init();\n\t\tctx.put(Contexto.REQUEST,request);\n\t\tctx.put(Contexto.RESPONSE,response);\n\t\tctx.put(Contexto.CLAVE_SEGURIDAD,\"REST_ENTITY_J314AUTHORITY_GETALLPAG\");\n\t\tctx.put(Contexto.URL_SOLICITADA,\"/J314Authorities.pag\");\n\t\tResult< Page< J314AuthorityPoj >> res=new Result<>();\n\t\tif (log.isInfoEnabled()) log.info(\"Entrada en REST POST:getAllPag(\"+params+\")\"+params);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tif(!verificaPermisos(\"REST_ENTITY_J314AUTHORITY_GETALLPAG\"))\n\t\t\t{\n\t\t\t\tres.addError(new ErrorSinPermiso(\"REST_ENTITY_J314AUTHORITY_GETALLPAG\",\"/J314Authorities.pag\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tparams=UtilParams.paramsToString(\"J314AuthorityCritPaged\",pag);\n\t\t\t\tif (log.isInfoEnabled()) log.info(\"Verificado en REST POST:getAllPag(\"+params+\")\"+params);\n\n\t\t\t\tJ314AuthorityCritPaged pag_ = pag;\n\n\t\t\t\tResult< Page< J314Authority > > res_=service.findAll(pag_);\n\t\t\t\tres.setInfoEWI(res_);\n\n\t\t\t\tres.setData(J314AuthorityPoj.toPOJOPage(res_.getData()));\n\n\t\t\t}\n\t\t\taddTiempoSesion();\n\t\t}\tcatch(Exception e)\n\t\t{\n\t\t\tres.addError(new ErrorGeneral(e));\n\t\t\tif (log.isErrorEnabled()) log.error(\"Error en REST POST:getAllPag(\"+params+\"). Excepcion:\"+UtilException.printStackTrace(e));\n\t\t}\n\t\tif (log.isInfoEnabled()) log.info(\"Salida de REST POST:getAllPag(\"+params+\"). Resultado:\"+res.toString());\n\n\t\tResultExt< Page< J314AuthorityPoj > > resFin=new ResultExt<>(res,ctx.getAs(\"ticketStr\"));\n\t\tContexto.close();\n\t\treturn resFin;\n\t}",
"Page<EtatOperation> findAll(Pageable pageable);",
"Page<SpecimenStatusDTO> findAll(Pageable pageable);",
"public static List<Transaction> getTransactionsFilteredByDate(String startDate, String endDate,\r\n\t\t\tTransactionType transactionType) {\r\n\t\tList<Transaction> transactions = new ArrayList<>();\r\n\t\tdbConnect();\r\n\t\tStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\t// SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\t// Date start = (Date) sdf.parse(startDate);\r\n\t\t// Date end = (Date) sdf.parse(endDate);\r\n\t\tfinal String OPEN_TRANSACTIONS_FROM_DB;\r\n\t\tif (transactionType == TransactionType.PURCHASE)\r\n\t\t\tOPEN_TRANSACTIONS_FROM_DB = \"SELECT * FROM purchase WHERE DATE(purchase_date) >= DATE('\" + startDate\r\n\t\t\t\t\t+ \"') AND DATE(purchase_date) <= DATE('\" + endDate + \"') ORDER BY purchase_id DESC\";\r\n\t\telse\r\n\t\t\tOPEN_TRANSACTIONS_FROM_DB = \"SELECT * FROM sales WHERE DATE(sales_date) >= DATE('\" + startDate\r\n\t\t\t\t\t+ \"') AND DATE(sales_date) <= DATE('\" + endDate + \"') ORDER BY sales_id DESC\";\r\n\t\ttry {\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\trs = stmt.executeQuery(OPEN_TRANSACTIONS_FROM_DB);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tint transactionNumber = rs.getInt(1);\r\n\t\t\t\tString transactionDate = rs.getString(2);\r\n\t\t\t\tString nameOfClient = getClient(rs.getInt(3), transactionType).getName();\r\n\t\t\t\tdouble cashGiven = rs.getDouble(4);\r\n\t\t\t\tObservableList<Product> productList = getProductTransaction(rs.getInt(1), transactionType);\r\n\r\n\t\t\t\ttransactions.add(new Transaction(transactionNumber, transactionDate, nameOfClient, cashGiven, cashGiven,\r\n\t\t\t\t\t\tproductList.size(), productList));\r\n\t\t\t}\r\n\t\t\tstmt.close();\r\n\t\t\trs.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn transactions;\r\n\t}",
"public void queryBytransType(String transType) {\n\t\tTRANSACTION_TYPE = transType;\n\t}",
"Page<ExtendedTextHeader> findAll(Pageable pageable);",
"@Override\n public PageInfo<OrderPojo> findAll(int pageNum, int pageSize) {\n return null;\n }",
"@CrossOrigin(origins = \"http://localhost:3000\")\n @RequestMapping(value = \"/get\", method = RequestMethod.GET, produces = \"application/json\")\n Page<Student> getStudentsByPagination(@RequestParam(value = \"page\", required = false) int page,\n @RequestParam(value = \"size\", required = false) int size){\n page = page <0 ? PAGINATION_DEFAULT_PAGE : page;\n size = (size <0) ? PAGINATION_DEFAULT_SIZE: size;\n return studentService.findAllByPaging(PageRequest.of(page, size));\n }",
"@Override\n public BaseListDto<GoodsNameDto> selectPage(Map<String, Object> params) throws Exception {\n int currentPage = Integer.parseInt(params.getOrDefault(\"currentPage\", 1).toString());\n int pageSize = Integer.parseInt(params.getOrDefault(\"pageSize\", 10).toString());\n QueryWrapper<GoodsName> qw = new QueryWrapper<>();\n DaoUtil.parseGenericQueryWrapper(qw, params, GoodsName.class);\n IPage<GoodsName> pages = goodsNameMapper.selectPage((Page<GoodsName>) DaoUtil.queryPage(currentPage, pageSize), qw);\n List<GoodsNameDto> list = pages.getRecords().stream().map(entity -> entity2Dto(entity)).collect(Collectors.toList());\n return new BaseListDto<GoodsNameDto>(list, (int) pages.getTotal());\n }",
"public Page<CustomersListSearchConditionsDTO> findAll(Pageable pageable);",
"@RequestMapping(value = \"/contracts/types\", method = RequestMethod.GET)\n public JsonListWrapper<String> listAllTypes() {\n Collection<String> items = ((ContractService) service).findAllInsuranceTypes();\n return JsonListWrapper.withTotal(items);\n }",
"public List<Lot> getLotsByEntityTypeAndEntityId(String type, Integer entityId, int start, int numOfRows) throws MiddlewareQueryException;",
"Page<RequestOtherNiazsanjiDTO> findAll(Pageable pageable);",
"cosmos.base.query.v1beta1.Pagination.PageResponse getPagination();",
"cosmos.base.query.v1beta1.Pagination.PageResponse getPagination();",
"cosmos.base.query.v1beta1.Pagination.PageResponse getPagination();",
"Page<Accessprofile> listAllByPage(Pageable pageable);",
"@Override\n\t@RequestMapping(value=ZuelControllerValue.Manage+\"getItems\")\n\tpublic ZuelPageResult<TbItem> getItems(int page, int size, String search) {\n\t\tSystem.out.println(\"我受够了\");\n\t\treturn service.getItems(page, size, search);\n\t}",
"@Test\n public void getHouseholdClientTransactionUsingGetTest() throws ApiException {\n UUID householdId = null;\n Boolean ascending = null;\n String currencyConversion = null;\n LocalDate endDate = null;\n String filter = null;\n String orderBy = null;\n Integer page = null;\n Integer size = null;\n LocalDate startDate = null;\n PagePortfolioTransaction response = api.getHouseholdClientTransactionUsingGet(householdId, ascending, currencyConversion, endDate, filter, orderBy, page, size, startDate);\n\n // TODO: test validations\n }",
"@Override\n\tpublic List<PendingTransaction> getAllTransactionsByType(String transactionType) {\n\t\treturn null;\n\t}",
"@GetMapping\n public ResponseEntity<PersonPageResponse> getAll(\n @RequestParam(name = \"page\", required = false, defaultValue = \"1\") int pageNumber,\n @RequestParam(name = \"size\", required = false, defaultValue = \"20\") int pageSize) {\n return ResponseEntity.ok(personService.getAllPaginated(pageNumber, pageSize));\n }",
"Page<RefTarifDTO> findAll(Pageable pageable);",
"public static List<Transaction> getTransactionsFilteredByClientName(String clientName,\r\n\t\t\tTransactionType transactionType) {\r\n\t\tList<Transaction> transactions = new ArrayList<>();\r\n\t\tdbConnect();\r\n\t\tStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tint clientId = getClientId(clientName, transactionType);\r\n\t\tfinal String OPEN_TRANSACTIONS_FROM_DB;\r\n\t\tif (transactionType == TransactionType.PURCHASE)\r\n\t\t\tOPEN_TRANSACTIONS_FROM_DB = \"SELECT * FROM purchase WHERE purchase_client_id = \" + clientId\r\n\t\t\t\t\t+ \" ORDER BY purchase_id DESC\";\r\n\t\telse\r\n\t\t\tOPEN_TRANSACTIONS_FROM_DB = \"SELECT * FROM sales WHERE sales_client_id = \" + clientId\r\n\t\t\t\t\t+ \" ORDER BY sales_id DESC\";\r\n\t\ttry {\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\trs = stmt.executeQuery(OPEN_TRANSACTIONS_FROM_DB);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tint transactionNumber = rs.getInt(1);\r\n\t\t\t\tString transactionDate = rs.getString(2);\r\n\t\t\t\tString nameOfClient = getClient(rs.getInt(3), transactionType).getName();\r\n\t\t\t\tdouble cashGiven = rs.getDouble(4);\r\n\t\t\t\tObservableList<Product> productList = getProductTransaction(rs.getInt(1), transactionType);\r\n\r\n\t\t\t\ttransactions.add(new Transaction(transactionNumber, transactionDate, nameOfClient, cashGiven, cashGiven,\r\n\t\t\t\t\t\tproductList.size(), productList));\r\n\t\t\t}\r\n\t\t\tstmt.close();\r\n\t\t\trs.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn transactions;\r\n\t}",
"List<Commodity> selectAll(@Param(\"beginRow\") int beginRow,@Param(\"pageSize\") int pageSize);",
"Page<DashboardDTO> findAll(Pageable pageable);",
"List<Activity> findAllPageable(int page, int size);",
"List<T> findPage(int pageNumber);",
"@RequestMapping(\"query\")\r\n\t@ResponseBody\r\n\tpublic EasyUIResult findItemByPage(@RequestParam(value=\"page\")Integer page,Integer rows) {\r\n\t\tSystem.out.println(itemService.findItemByPage(page, rows));\r\n\t\treturn itemService.findItemByPage(page, rows);\r\n\t\t\r\n\t}",
"PaginatedResponse<Office> findAllPaginated( int page, int pageSize );",
"Page<LevelElementDTO> findAll(Pageable pageable);",
"public Page<AccountDTO> findAllByEmail(String gender, Pageable pageable);",
"Page<PeopleDTO> findAll(Pageable pageable);",
"@Override\n\t@RequestMapping(value=\"/item/list\")\n\tpublic EasyUIDatagrid<TbItem> getItemsByPage(@RequestParam(value = \"page\", defaultValue=\"1\") Integer page,\n\t\t\t@RequestParam(value = \"rows\" ,defaultValue=\"30\") Integer rows) {\n\t\treturn service.getItemsByPage(page, rows);\n\t}",
"@Override\r\n\tpublic JsonResult getInvigilate(String condition, Integer pageNum, Integer pageSize) {\n\t\tJsonResult res = new JsonResult();\r\n\t\tInvigilateQueryCondition cond = JSONObject.parseObject(condition, InvigilateQueryCondition.class);\r\n\t\tint total = invigilateMapper.selectByCondition(cond).size();\r\n\t\tif(pageNum!=null && pageSize!=null){\r\n\t\t\tPageHelper.startPage(pageNum,pageSize);\r\n\t\t}\r\n\t\tList<Map<String, Object>> selectByCondition = invigilateMapper.selectByCondition(cond);\r\n\t\tif(selectByCondition!=null){\r\n\t\t\tres.setStatus(\"200\");\r\n\t\t\tres.setRows(selectByCondition);\r\n\t\t\tres.setTotal(total);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tres.setStatus(\"500\");\r\n\t\t\tres.setResult(\"查询无结果!\");\r\n\t\t}\r\n\t\treturn res;\r\n\t}",
"cosmos.base.query.v1beta1.Pagination.PageRequest getPagination();",
"cosmos.base.query.v1beta1.Pagination.PageRequest getPagination();",
"cosmos.base.query.v1beta1.Pagination.PageRequest getPagination();"
] |
[
"0.6208336",
"0.6185962",
"0.61406195",
"0.60567725",
"0.60110146",
"0.59041893",
"0.5875894",
"0.5861357",
"0.58481574",
"0.58437485",
"0.5842148",
"0.5829919",
"0.5811512",
"0.5807885",
"0.57914364",
"0.571719",
"0.5685893",
"0.5676234",
"0.56722885",
"0.5651801",
"0.5643436",
"0.56392795",
"0.55910885",
"0.5571398",
"0.5560987",
"0.55565685",
"0.55507636",
"0.55396414",
"0.5500599",
"0.54960763",
"0.5487556",
"0.5474883",
"0.5444835",
"0.5442178",
"0.5440985",
"0.54405046",
"0.54292417",
"0.54232496",
"0.541885",
"0.5404818",
"0.5404817",
"0.5403636",
"0.5392811",
"0.53917027",
"0.53905493",
"0.53807324",
"0.5367935",
"0.5339543",
"0.5327405",
"0.5324229",
"0.53172266",
"0.53169644",
"0.53127706",
"0.5304505",
"0.530132",
"0.5296289",
"0.529445",
"0.5266888",
"0.52653426",
"0.5263066",
"0.52517784",
"0.5250482",
"0.5249132",
"0.52448654",
"0.524457",
"0.52416766",
"0.52415866",
"0.5237666",
"0.5235075",
"0.52321637",
"0.52276945",
"0.5227361",
"0.5215318",
"0.5209499",
"0.520777",
"0.5203381",
"0.51994413",
"0.51994413",
"0.51994413",
"0.5198287",
"0.5193508",
"0.51913756",
"0.51892453",
"0.5189042",
"0.51826113",
"0.51794267",
"0.51736146",
"0.51717615",
"0.5170186",
"0.516742",
"0.5162065",
"0.51615983",
"0.51594293",
"0.5158764",
"0.51567596",
"0.5153614",
"0.51481485",
"0.5139257",
"0.5139257",
"0.5139257"
] |
0.72378045
|
0
|
Returns the total sum for transactions of a specified type. Allowed transaction types (caseinsensitive): "INCOME" "EXPENSE" "TRANSFER"
|
@GetMapping("/total-sum")
public Double getTotalTransactionsSumByType(@RequestParam String type) {
Double totalSum = null;
try {
totalSum = transactionService.getTotalTransactionsSumByType(type);
}
catch (InvalidDataException e) {
String exceptionMessage = e.getMessage();
throw new InvalidDataException(exceptionMessage);
}
return totalSum;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Double getTotalAmountbyTransactionType(String transactionType) throws JsonProcessingException, IOException {\r\n\r\n\t\tlogger.info(\"Logger Name: getTotalAmountbyTransactionType() :: \" + logger.getName());\r\n\t\tlogger.debug(\"Transaction Type : getTotalAmountbyTransactionType() :: \" + transactionType);\r\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\t\tDouble totalAmount = 0.00;\r\n\r\n\t\tlogger.info(\"Open Bank API URL :: getTotalAmountbyTransactionType() :: \"\r\n\t\t\t\t+ TransactionConstant.THIRD_PARTY_REST_API);\r\n\t\tJsonNode root = mapper.readTree(new URL(TransactionConstant.THIRD_PARTY_REST_API));\r\n\r\n\t\t/* Traversing Nested JSON node to get/add the total amount */\r\n\t\ttry {\r\n\t\t\tJsonNode transactionsNodes = root.path(\"transactions\");\r\n\t\t\tfor (JsonNode transactionsNode : transactionsNodes) {\r\n\t\t\t\tJsonNode details = transactionsNode.path(\"details\");\r\n\r\n\t\t\t\t/* When transactionType is null or empty */\r\n\t\t\t\tif (transactionType == null && details.path(\"type\").isNull() == true) {\r\n\t\t\t\t\tJsonNode value = details.path(\"value\");\r\n\t\t\t\t\tDouble tempAmount = value.path(\"amount\").asDouble();\r\n\t\t\t\t\ttotalAmount = totalAmount + tempAmount;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* When transactionType is not null or empty */\r\n\t\t\t\telse if (transactionType != null) {\r\n\r\n\t\t\t\t\tif ((details.path(\"type\").asText()).equalsIgnoreCase(transactionType.trim())) {\r\n\t\t\t\t\t\tJsonNode value = details.path(\"value\");\r\n\t\t\t\t\t\tDouble tempAmount = value.path(\"amount\").asDouble();\r\n\t\t\t\t\t\ttotalAmount = totalAmount + tempAmount;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"Exception : getTotalAmountbyTransactionType() :: \", e);\r\n\t\t}\r\n\t\tlogger.info(\"Response from Service layer :: Total Amount: getTotalAmountbyTransactionType() :: \" + totalAmount);\r\n\t\treturn totalAmount;\r\n\r\n\t}",
"public static int getSum(String type) {\n\t\tVector<BookInfo> tmp = getAllBook();\n\t\tint result = 0;\n\n\t\tfor (BookInfo b : tmp) {\n\t\t\tif ( b.getBookID().substring(0, 2).equals(type) ) {\n\t\t\t\tresult += 1;\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}",
"@GetMapping(\"/total-sum-between-dates\")\n\tpublic Double getTotalTransactionsSumBetweenDatesByType(\n\t\t@RequestParam String type,\n\t\t@RequestParam @DateTimeFormat(pattern = \"dd.MM.yyyy\") Date startDate,\n\t\t@RequestParam @DateTimeFormat(pattern = \"dd.MM.yyyy\") Date endDate) \n\t{\n\t\tDouble totalSum = null;\n\t\t\n\t\ttry {\n\t\t\ttotalSum = transactionService.getTotalTransactionsSumBetweenDatesByType(type, startDate, endDate);\n\t\t}\n\t\tcatch (InvalidDataException e) {\n\t\t\tString exceptionMessage = e.getMessage();\n\t\t\tthrow new InvalidDataException(exceptionMessage);\n\t\t}\n\t\t\n\t\treturn totalSum;\n\t}",
"public Double calculateTotal(String type, Double price, Double numberOfCoins, Double fees) {\n\t\tif (type == \"Kauf\") {\n\t\t\treturn (price * numberOfCoins) + fees;\n\t\t} else {\n\t\t\treturn ((price * numberOfCoins) + fees) * -1;\n\t\t}\n\t}",
"BigDecimal getSumOfTransactions(StatisticalDTO dto) throws DaoException;",
"public void deposit(String accountType, double amount) {\r\n\t\tif(accountType.equals(\"savings\")) {\r\n\t\t\tthis.savingsBalance += amount;\r\n\t\t\ttotalAmount += amount;\r\n\t\t}\r\n\t\telse if(accountType.equals(\"checking\")) {\r\n\t\t\tthis.checkingBalance += amount;\r\n\t\t\ttotalAmount += amount;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Deposit failed\");\r\n\t\t}\r\n\t}",
"TotalInvoiceAmountType getTotalInvoiceAmount();",
"public Integer calculateSum() {\n logger.debug(\"Calculating and returning the sum of expenses.\");\n return listOfTargets.stream().map(T::getAmount).reduce(0, Integer::sum);\n }",
"List<TypeSumDto> somaValoresPorTipo(TransactionType transactionType, Integer mes);",
"public double calculate_total_sales_of_transaction() {\n char ismember = 'n';\n discounts = 1;\n String member_typ = \"null\";\n ismember = order.getIsMember();\n member_typ = order_member.getMemberType();\n\n total_sales_of_transaction = order.getBike().getPrice();\n\n if (Character.toUpperCase(ismember) == 'Y') {\n if (member_typ == \"Premium\") {\n discounts = 0.85;\n } else {\n discounts = 0.9;\n }\n }\n double price = total_sales_of_transaction * discounts;\n return price;\n }",
"public List<HCLFieldTransaction> getTransactionbyType(String transactionType)\r\n\t\t\tthrows JsonProcessingException, IOException {\r\n\r\n\t\tlogger.info(\"Logger Name: getTransactionbyType() :: \" + logger.getName());\r\n\t\tlogger.debug(\"Transaction Type : getTransactionbyType() :: \" + transactionType);\r\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\r\n\t\tlogger.info(\"Open Bank API URL :: getTotalAmountbyTransactionType() :: \"\r\n\t\t\t\t+ TransactionConstant.THIRD_PARTY_REST_API);\r\n\t\tJsonNode root = mapper.readTree(new URL(TransactionConstant.THIRD_PARTY_REST_API));\r\n\r\n\t\tList<HCLFieldTransaction> transactionList = new ArrayList<HCLFieldTransaction>();\r\n\r\n\t\t/* Traversing Nested JSON node to publish the relevant data */\r\n\t\ttry {\r\n\t\t\tJsonNode transactionsNodes = root.path(\"transactions\");\r\n\r\n\t\t\tfor (JsonNode transactionsNode : transactionsNodes) {\r\n\r\n\t\t\t\tHCLFieldTransaction hclFieldTransaction = new HCLFieldTransaction();\r\n\t\t\t\tJsonNode details = transactionsNode.path(\"details\");\r\n\t\t\t\thclFieldTransaction.setTransactionType(details.path(\"type\").asText());\r\n\r\n\t\t\t\t/* When transactionType is null or empty */\r\n\t\t\t\tif (transactionType == null && details.path(\"type\").isNull() == true) {\r\n\t\t\t\t\thclFieldTransaction.setId(transactionsNode.path(\"id\").asText());\r\n\r\n\t\t\t\t\tJsonNode thisAccount_Node = transactionsNode.path(\"this_account\");\r\n\t\t\t\t\thclFieldTransaction.setAccountId(thisAccount_Node.path(\"id\").asText());\r\n\r\n\t\t\t\t\tJsonNode otherAccount_Node = transactionsNode.path(\"other_account\");\r\n\t\t\t\t\thclFieldTransaction.setCounterpartyAccount(otherAccount_Node.path(\"number\").asText());\r\n\r\n\t\t\t\t\tJsonNode otherAccount_holder_Node = otherAccount_Node.path(\"holder\");\r\n\t\t\t\t\thclFieldTransaction.setCounterpartyName(otherAccount_holder_Node.path(\"name\").asText());\r\n\t\t\t\t\tJsonNode metadata = otherAccount_Node.path(\"metadata\");\r\n\t\t\t\t\thclFieldTransaction.setCounterPartyLogoPath(metadata.path(\"open_corporates_URL\").asText());\r\n\r\n\t\t\t\t\thclFieldTransaction.setTransactionType(details.path(\"type\").asText());\r\n\t\t\t\t\thclFieldTransaction.setDescription(details.path(\"description\").asText());\r\n\r\n\t\t\t\t\tJsonNode value = details.path(\"value\");\r\n\t\t\t\t\thclFieldTransaction.setInstructedAmount(value.path(\"amount\").asDouble());\r\n\r\n\t\t\t\t\thclFieldTransaction.setInstructedCurrency(value.path(\"currency\").asText());\r\n\r\n\t\t\t\t\thclFieldTransaction.setTransactionAmount(value.path(\"amount\").asDouble());\r\n\t\t\t\t\thclFieldTransaction.setTransactionCurrency(value.path(\"currency\").asText());\r\n\t\t\t\t\tlogger.debug(\"Transaction Field Row Value:: \" + hclFieldTransaction.toString());\r\n\r\n\t\t\t\t\t/* Adding specific type of transaction list into one ArrayList */\r\n\t\t\t\t\ttransactionList.add(hclFieldTransaction);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* When transactionType is not null or empty */\r\n\t\t\t\telse if (transactionType != null) {\r\n\r\n\t\t\t\t\tif (hclFieldTransaction.getTransactionType().equalsIgnoreCase(transactionType.trim())) {\r\n\r\n\t\t\t\t\t\tlogger.debug(\"Transaction Type :: \" + transactionType);\r\n\t\t\t\t\t\thclFieldTransaction.setId(transactionsNode.path(\"id\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode thisAccount_Node = transactionsNode.path(\"this_account\");\r\n\t\t\t\t\t\thclFieldTransaction.setAccountId(thisAccount_Node.path(\"id\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode otherAccount_Node = transactionsNode.path(\"other_account\");\r\n\t\t\t\t\t\thclFieldTransaction.setCounterpartyAccount(otherAccount_Node.path(\"number\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode otherAccount_holder_Node = otherAccount_Node.path(\"holder\");\r\n\t\t\t\t\t\thclFieldTransaction.setCounterpartyName(otherAccount_holder_Node.path(\"name\").asText());\r\n\t\t\t\t\t\tJsonNode metadata = otherAccount_Node.path(\"metadata\");\r\n\t\t\t\t\t\thclFieldTransaction.setCounterPartyLogoPath(metadata.path(\"open_corporates_URL\").asText());\r\n\r\n\t\t\t\t\t\thclFieldTransaction.setTransactionType(details.path(\"type\").asText());\r\n\t\t\t\t\t\thclFieldTransaction.setDescription(details.path(\"description\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode value = details.path(\"value\");\r\n\t\t\t\t\t\thclFieldTransaction.setInstructedAmount(value.path(\"amount\").asDouble());\r\n\r\n\t\t\t\t\t\thclFieldTransaction.setInstructedCurrency(value.path(\"currency\").asText());\r\n\r\n\t\t\t\t\t\thclFieldTransaction.setTransactionAmount(value.path(\"amount\").asDouble());\r\n\t\t\t\t\t\thclFieldTransaction.setTransactionCurrency(value.path(\"currency\").asText());\r\n\t\t\t\t\t\tlogger.debug(\"Transaction Field Row Value:: \" + hclFieldTransaction.toString());\r\n\r\n\t\t\t\t\t\t/* Adding specific type of transaction list into one ArrayList */\r\n\t\t\t\t\t\ttransactionList.add(hclFieldTransaction);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"Exception : getTransactionbyType() :: \", e);\r\n\t\t}\r\n\t\tlogger.info(\"Return value from service layer:: getTransactionbyType() :: \" + transactionList.toString());\r\n\t\treturn transactionList;\r\n\r\n\t}",
"RecordAmountTypeEnum getSummaryAmountType();",
"BigDecimal getSumOfTransactionsRest(TransferQuery query);",
"@Test\n public void transactionSum() {\n final Transaction transaction1 = new Transaction(\"774cedda\", State.CANCELED, 1000L, new Date());\n final Account account1 = new Account(\"1001\", 0L, Collections.singletonList(transaction1));\n final Transaction transaction2 = new Transaction(\"337868a7\", State.FINISHED, 8000L, new Date());\n final Transaction transaction3 = new Transaction(\"f8047f86\", State.CANCELED, 10000L, new Date());\n final Account account2 = new Account(\"1002\", 8000L, Arrays.asList(transaction2, transaction3));\n\n final long actual = calcSumOfCancelledTransOnNonEmptyAccounts(Arrays.asList(account1, account2));\n\n Assert.assertEquals(actual, 10_000L);\n }",
"public int getTotalAmount();",
"public double sumTransactions() {\n\t\treturn checkIfTransactionsExist(true);\n\t}",
"@Override\n\tpublic BigDecimal sumAllCompensatoryMoney(String planId, String peridId,\n\t\t\tString fundType) {\n\t\treturn dao.sumAllCompensatoryMoney(planId, peridId, fundType);\n\t}",
"public void addToStatement(String account, double amount, String transactionType, String accountType) {\n\t\tList<String> myList = getStatement();\n\t\tDecimalFormat df = new DecimalFormat(\".##\");\n\t\tmyList.add(LocalDate.now() +\"\\t\"+ account +\" \\t\"+ df.format(amount) +\" \\t\"+ df.format(balance) +\" \\t\"+ transactionType +\n\t\t\t\t\" \\t\" + accountType);\n\t}",
"@Override\r\n\t@Transactional\r\n\tpublic Integer TotalEventuales(int tipo, int estado) {\n\t\treturn dao.TotalEventuales(tipo, estado);\r\n\t}",
"public double sumMoney(){\n\t\tdouble result = 0;\n\t\tfor(DetailOrder detail : m_DetailOrder){\n\t\t\tresult += detail.calMoney();\n\t\t}\n\t\tif(exportOrder == true){\n\t\t\tresult = result * 1.1;\n\t\t}\n\t\treturn result;\n\t}",
"public Double getSalesForPaymentTypeWithoutDiscount(int month, int day, int year, int storeCode, int paymentType) {\r\n\t\tResultSet rs = Main.getDBManager().executeQuery(\"SELECT SUM(p.AMT) FROM payment_item p \" +\r\n\t\t\t\t\" WHERE MONTH (p.TRANS_DT) = '\"+month+\r\n\t\t\t\t \"' && YEAR(p.TRANS_DT) = '\"+year+\r\n\t\t\t\t \"' && DAY(p.TRANS_DT) = '\"+day+\r\n\t\t\t\t \"' AND p.STORE_CODE = '\"+storeCode+\"'\"+\r\n\t\t\t\t \" AND p.PT_CODE = \" + paymentType);\r\n\t\t\r\n\t\t//logger.debug(\"SELECT SUM(i.SELL_PRICE) FROM invoice_item i, invoice o WHERE MONTH (o.TRANS_DT) = '\"+month+\"' && YEAR(o.TRANS_DT) = '\"+year+\"' && DAY(o.TRANS_DT) = '\"+day+\"' AND i.OR_NO = o.OR_NO AND o.STORE_CODE = '\"+storeCode+\"'\");\r\n\t\tDouble amt = 0.0d;\r\n\t\ttry {\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tamt = rs.getDouble(1);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tLoggerUtility.getInstance().logStackTrace(e);\r\n\t\t}\r\n\t\tif (paymentType == 1) {\r\n\t\t\tamt += getSalesForPaymentTypeWithoutDiscount(month, day, year, storeCode, 2);\r\n\t\t}\r\n\t\t\r\n//\t\tamt = amt / VatService.getVatRate();\r\n\t\tlogger.debug(\"PAYMENT TYPE=\" + paymentType + \" SALES: \"+amt);\r\n\t\treturn amt;\r\n\t}",
"private void sumarTropa(int tipo){\n int cantActual;\n //Buscar tipo\n switch(tipo){\n case vg.BARBARO:\n cantActual = Integer.parseInt(jTextFieldBarbaro.getText());\n jTextFieldBarbaro.setText(String.valueOf(cantActual+1));\n break;\n case vg.ARQUERA:\n cantActual = Integer.parseInt(jTextFieldArquera.getText());\n jTextFieldArquera.setText(String.valueOf(cantActual+1));\n break;\n case vg.GIGANTE:\n cantActual = Integer.parseInt(jTextFieldGigante.getText());\n jTextFieldGigante.setText(String.valueOf(cantActual+1));\n break;\n case vg.DUENDE:\n cantActual = Integer.parseInt(jTextFieldDuende.getText());\n jTextFieldDuende.setText(String.valueOf(cantActual+1));\n break;\n }\n }",
"public int calculatePrice(FruitEnum type, List<Fruit> list){\n if (list.isEmpty()) return 0;\n Fruit fruit = list.get(0);\n //System.out.println(\"Fruit \" + fruit);\n Promotion promotion = fruit.promotion;\n //System.out.println(\"Promotion \" + promotion);\n return promotion.promotionalTotal(list);\n }",
"public Coin getBalance(BalanceType balanceType) {\n try {\n if (balanceType == BalanceType.AVAILABLE || balanceType == BalanceType.AVAILABLE_SPENDABLE) {\n List<TransactionOutput> candidates = calculateAllSpendCandidates(true, balanceType == BalanceType.AVAILABLE_SPENDABLE);\n CoinSelection selection = coinSelector.select(NetworkParameters.MAX_MONEY, candidates);\n return selection.valueGathered;\n } else if (balanceType == BalanceType.ESTIMATED || balanceType == BalanceType.ESTIMATED_SPENDABLE) {\n List<TransactionOutput> all = calculateAllSpendCandidates(false, balanceType == BalanceType.ESTIMATED_SPENDABLE);\n Coin value = Coin.ZERO;\n for (TransactionOutput out : all) value = value.add(out.getValue());\n return value;\n } else {\n throw new AssertionError(\"Unknown balance type\"); // Unreachable.\n }\n } finally {\n }\n }",
"public String getSum();",
"private double getIncomeAmount(long startTimestamp, long endTimestamp) {\n Points p = getTransactions(startTimestamp, endTimestamp);\n if (p.x == -1 && p.y == -1)\n return 0;\n double total = 0;\n for (int i = p.x; i <= p.y; i++) {\n if (transactionList.get(i).transactionType == 1)\n total += transactionList.get(i).transactionAmount;\n }\n return total;\n }",
"public Integer getTotalCountForType(DasType type) throws DataSourceException {\n return null;\n }",
"public x0101.oecdStandardAuditFileTaxPT1.SAFmonetaryType xgetTotalDebit()\n {\n synchronized (monitor())\n {\n check_orphaned();\n x0101.oecdStandardAuditFileTaxPT1.SAFmonetaryType target = null;\n target = (x0101.oecdStandardAuditFileTaxPT1.SAFmonetaryType)get_store().find_element_user(TOTALDEBIT$0, 0);\n return target;\n }\n }",
"public static int calculateDiscount(ItemType type, int quantity) {\n int discount = 0;\n switch (type) {\n case NEW:\n return 0;\n case SECOND_FREE:\n if (quantity > 1)\n discount = 50;\n break;\n case SALE:\n discount = 70;\n break;\n }\n discount += quantity / 10;\n if (discount > 80)\n discount = 80;\n return discount;\n }",
"public T sum();",
"Double somaValoresPorTransactionType(TransactionType transactionType, Integer mes);",
"int deposit(int id, int amount, int accountType) {\n int idCompare; // will contain the ID needed\n double accountBalance = 0;\n String account; // 0 = chequing, 1 = savings\n\n // If the accountType is 0, then it's a Chequing account the user wants to deposit to, if it's 1 then\n // it's savings\n account = accountType == 0 ? \"UserBalanceC\" : \"UserBalanceS\";\n\n // Look into the account number and user balance for the deposit\n String sql = \"SELECT AccountNum, \" + account + \" FROM CashiiDB2\";\n\n try {\n rs = st.executeQuery(sql);\n while (rs.next()) {\n idCompare = rs.getInt(\"AccountNum\"); // grab the id to compare with after\n\n // If the ID turns about to be the one that's needed, get the balance and add the amount needed\n if (idCompare == id) {\n accountBalance = rs.getDouble(account);\n accountBalance += amount;\n break;\n } else\n return -1;\n }\n // Run the operation to update the balance only for the user's account\n updateAccount(id, accountBalance, account);\n } catch (java.sql.SQLException e) {\n e.printStackTrace();\n }\n System.out.println(\"AMOUNT: \" + accountBalance);\n return 1;\n }",
"@Override\r\n\tpublic int getTotalCount(Class<T> type) {\n\t\treturn (int) super.getSessionFactory().getCurrentSession().createQuery(\"select count(1) as num from \"+\r\n\t\t\t\ttype.getName()+\"\").uniqueResult();\r\n\t}",
"List<Number> getTransactionAmounts(final StatisticalDTO dto);",
"public Sum sumTransactions(long transactionId) {\n log.trace(\"sumTransactions {}\", transactionId);\n TransactionEntity t = transactionRepository.findOne(transactionId);\n if (t == null) {\n throw new NotFoundException(\"not found\");\n }\n\n List<Double> amounts = transactionDescendantRepository.amountsByParent(t);\n double sum = t.getAmount() +\n amounts.stream().reduce(0.0, Double::sum);\n return new Sum(sum);\n }",
"public int getTotalRow(int id,int type) {\n\t\treturn dao.getTotalRow(id,type);\n\t}",
"public static double calculateTotals(double[] money) {\n int element = 0; //The element to add\n double total = 0; //The total sales/commissions\n \n while (element < money.length) { //Add each element\n total += money[element];\n element++;\n }\n \n //Return total\n return total;\n }",
"public Double getBalance(){\n Double sum = 0.0;\n // Mencari balance dompet dari transaksi dengan cara menghitung total transaksi\n for (Transaction transaction : transactions) {\n sum += transaction.getAmount().doubleValue();\n }\n return sum;\n }",
"public int incloan()\n {\n SQLiteDatabase db1 = this.getReadableDatabase();\n String stmt = \"SELECT SUM(AMOUNT) FROM INCOME GROUP BY TYPE HAVING TYPE='LOAN'\";\n Cursor tot = db1.rawQuery(stmt, null);\n if(tot.getCount()==0)\n {\n return 0;\n }\n else {\n tot.moveToFirst();\n int amount = tot.getInt(0);\n tot.close();\n return amount;\n }\n }",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount getAmount();",
"public int getTotal() {\r\n\r\n\t\treturn getAmount() + getPrice();\r\n\r\n\t}",
"Message getRevenueForType(String type);",
"int getRequiredAmountFor(AResourceType type);",
"TransactionSummaryType createTransactionSummaryType();",
"public Quantity<Q> getSum(Unit<Q> unit) {\n return sum.to(unit);\n }",
"public final void mSUM() throws RecognitionException {\n try {\n int _type = SUM;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/dannluciano/Sources/MyLanguage/expr.g:175:5: ( '+' )\n // /Users/dannluciano/Sources/MyLanguage/expr.g:175:7: '+'\n {\n match('+'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public double sumMoney(MoneyNode p) {\r\n // Base case: empty list\r\n if (p == null)\r\n return 0;\r\n if (p.data instanceof Bill) // Bill type\r\n return ((Bill) p.data).getValue() + sumMoney(p.next); // add up the\r\n // dollar\r\n // amount\r\n else // Coin type\r\n return ((Coin) p.data).getValue() / 100.0 + sumMoney(p.next); // add\r\n // up\r\n // the\r\n // cents\r\n // amount\r\n }",
"private void sumarEdificio(int tipo){\n int cantActual;\n //Buscar tipo\n switch(tipo){\n case vg.CHOZA:\n cantActual = Integer.parseInt(jTextFieldChoza.getText());\n jTextFieldChoza.setText(String.valueOf(cantActual+1));\n break;\n case vg.CAMPAMENTO:\n cantActual = Integer.parseInt(jTextFieldCampamento.getText());\n jTextFieldCampamento.setText(String.valueOf(cantActual+1));\n break;\n case vg.CUARTEL:\n cantActual = Integer.parseInt(jTextFieldCuartel.getText());\n jTextFieldCuartel.setText(String.valueOf(cantActual+1));\n break;\n case vg.MINA:\n cantActual = Integer.parseInt(jTextFieldMina.getText());\n jTextFieldMina.setText(String.valueOf(cantActual+1));\n break;\n case vg.RECOLECTOR:\n cantActual = Integer.parseInt(jTextFieldRecolector.getText());\n jTextFieldRecolector.setText(String.valueOf(cantActual+1));\n break;\n case vg.TORRE:\n cantActual = Integer.parseInt(jTextFieldTorre.getText());\n jTextFieldTorre.setText(String.valueOf(cantActual+1));\n break;\n case vg.CAÑON:\n cantActual = Integer.parseInt(jTextFieldCañon.getText());\n jTextFieldCañon.setText(String.valueOf(cantActual+1));\n break;\n case vg.MORTERO:\n cantActual = Integer.parseInt(jTextFieldMortero.getText());\n jTextFieldMortero.setText(String.valueOf(cantActual+1));\n break;\n default:\n break;\n }\n }",
"private double getExpenditureAmount(long startTimestamp, long endTimestamp) {\n Points p = getTransactions(startTimestamp, endTimestamp);\n if (p.x == -1 && p.y == -1)\n return 0;\n double total = 0;\n for (int i = p.x; i <= p.y; i++) {\n if (transactionList.get(i).transactionType == 0)\n total += transactionList.get(i).transactionAmount;\n }\n return total;\n }",
"@Override\r\n\tpublic List<InformationDTO> findSum() {\n\t\treturn sqlSessionTemplate.selectList(typeNameSpace + \".findSum\");\r\n\t}",
"cosmos.base.v1beta1.Coin getTotalDeposit(int index);",
"@Override\n\tpublic Double getVolumeTotalPorTipoBebida(Integer tipoBebida) {\n\t\tList<SecaoEstoqueDTO> result = this.mongoTemplate\n\t\t\t\t.aggregate(getSumBebidaVolumeGroupedByBebidaTipo(getMatchTipoBebida(tipoBebida)), Estoque.class, SecaoEstoqueDTO.class)\n\t\t\t\t.getMappedResults();\n\t\treturn result != null && !result.isEmpty() ? result.get(0).getTotal() : 0;\n\n\t}",
"int withdraw(int id, int amount, int accountType) {\n int idCompare; // will contain the ID needed\n double accountBalance = 0;\n String account; // 0 = chequing, 1 = savings\n\n // If the accountType is 0, then it's a Chequing account the user wants to deposit to, if it's 1 then\n // it's savings\n account = accountType == 0 ? \"UserBalanceC\" : \"UserBalanceS\";\n\n // Look into the account number and user balance for the deposit\n String sql = \"SELECT AccountNum, \" + account + \" FROM CashiiDB2\";\n\n try {\n rs = st.executeQuery(sql);\n while (rs.next()) {\n idCompare = rs.getInt(\"AccountNum\"); // grab the id to compare with after\n\n // If the ID turns about to be the one that's needed, get the balance and add the amount needed\n if (idCompare == id) {\n accountBalance = rs.getDouble(account);\n if (accountBalance <= amount)\n return -1;\n else {\n accountBalance -= amount;\n }\n }\n }\n updateAccount(id, accountBalance, account); // update command\n } catch (java.sql.SQLException e) {\n e.printStackTrace();\n }\n\n return 1;\n }",
"private double calculateTotal(){\r\n double total = 0;\r\n\r\n for(Restaurant restaurant: restaurantMap.getRestaurantMap().values()){\r\n total += restaurant.getRevenue();\r\n }\r\n\r\n return total;\r\n }",
"public double getTotal() {\r\n\r\n return getSubtotal() + getTax();\r\n }",
"public int expfood()\n {\n SQLiteDatabase db1 = this.getReadableDatabase();\n String stmt = \"SELECT SUM(AMOUNT) FROM EXPENSE GROUP BY TYPE HAVING TYPE='FOOD'\";\n Cursor tot = db1.rawQuery(stmt, null);\n if(tot.getCount()==0)\n {\n return 0;\n }\n else {\n tot.moveToFirst();\n int amount = tot.getInt(0);\n tot.close();\n return amount;\n }\n }",
"public String getWalletTotal() {\n return \"$\" + wallet.getMoney();\n }",
"private static void printSettledAmount(final List<Instruction> list,final String settlementType) {\n\t\tfinal LocalDate today = LocalDate.now();\n\t\tfinal double totalAmount = list.stream().filter(l -> l.getActualSellementDate().compareTo(today)==0)\n\t\t.mapToDouble(i -> i.getTotalAmount()).sum();\n\t\tSystem.out.println(settlementType+\" Amount Settled :\"+totalAmount);\n\t\t\n\t}",
"public double getTotalByMonthAndCategory(String userId, String categoryId,\r\n String type, String month) {\r\n double dbl = 0.0;\r\n\r\n try {\r\n ClaimFormItemDao dao = (ClaimFormItemDao) getDao();\r\n dbl = dao.selectTotalByMonthAndCategory(userId, categoryId, type,\r\n month);\r\n } catch (Exception e) {\r\n Log.getLog(getClass()).error(\"getTotalByMonthAndCategory:\", e);\r\n }\r\n\r\n return dbl;\r\n }",
"@Override\n\tpublic BigDecimal getSumActualInComeAmount(Map<String, Object> params)\n\t\t\tthrows ServiceException {\n\t\treturn cashTransactionDtlMapper.getSumActualInComeAmount(params);\n\t}",
"@Override\n\tpublic List<PendingTransaction> getAllTransactionsByType(String transactionType) {\n\t\treturn null;\n\t}",
"public TransactionType performTransaction() {\n while(true){\n try{\n TransactionType transactionType = ui.chooseTransactionType();\n\n switch (transactionType){\n case CHECK_BALANCE:\n this.doCheckBalance();\n return transactionType;\n case DEPOSIT:\n this.doDeposit();\n return transactionType;\n\n case WITHDRAWAL:\n this.doWithdrawal();\n return transactionType;\n default:\n return null;\n }\n\n }catch (Exception e){\n ui.displayError(\"Please enter a valid transaction type.\");\n }\n\n }\n\n\n }",
"@Override\n\tpublic double sumMoney() {\n\t\treturn ob.sumMoney();\n\t}",
"Integer total();",
"public String getSum() {\n return sum;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"private double prixTotal() \r\n\t{\r\n\t\tdouble pt = getPrix() ; \r\n\t\t\r\n\t\tfor(Option o : option) \r\n\t\t\tpt += o.getPrix();\t\r\n\t\treturn pt;\r\n\t}",
"public Amount getAmountTotal() {\n return this.amountTotal;\n }",
"public int totalCostOfComponents(String component_type) {\n\t\tint total=0;\n\t\tint indexofat=0;\n\t\tString toClassName;\n\n\t\tfor (Component temp : components){\n\n\t\t\t/*\n\t\t\t * getting the index of @ char: calling toString method on an object usually\n\t\t\t * returns something similar to this: ClassName@13123133 where numbers\n\t\t\t * after @ refer to the object id.\n\t\t\t */\n\n\t\t\tindexofat = temp.toString().indexOf(\"@\"); \n\t\t\ttoClassName=temp.toString().substring(0, indexofat); //getting rid of the rest of the string\n\t\t\t//there was a simpler method using getClass\n\t\t\t//String toClassName = temp.getClass().getSimpleName(); //getName() or getTypeName() worked too\n\t\t\tif (toClassName.contentEquals(component_type) ) total+=temp.getCost(); //comparing the if the required class should be added to the sum\n\t\t}\n\t\treturn total;\n\n\n\t}",
"public String findUserBalance(String beneficiaryId, String beneficiaryType, String accountType) {\n String path = balancesByIdsPath + \"?beneficiaryIds=\" + beneficiaryId + \"&beneficiaryType=\" + beneficiaryType + \"&accountType=\" + accountType;\n\n return sendRequest(getResponseType, systemUserAuthToken(), path, allResult, statusCode200);\n }",
"private static void recalculateSummary(Sheet sheet, Payment payment) {\r\n BigDecimal income =(BigDecimal) sheet.getCellAt(\"B1\").getValue();\r\n BigDecimal expense = (BigDecimal) sheet.getCellAt(\"B2\").getValue();\r\n BigDecimal sum = (BigDecimal) sheet.getCellAt(\"B3\").getValue();\r\n \r\n if (payment.getType() == PaymentType.INCOME){\r\n sum = sum.add(payment.getAmount());\r\n income = income.add(payment.getAmount());\r\n } else if (payment.getType() == PaymentType.EXPENSE){\r\n sum = sum.subtract(payment.getAmount());\r\n expense = expense.add(payment.getAmount());\r\n }\r\n \r\n sheet.getCellAt(\"B1\").setValue(income);\r\n sheet.getCellAt(\"B2\").setValue(expense);\r\n sheet.getCellAt(\"B3\").setValue(sum);\r\n }",
"int getAmountEntriesListTariffActiveStatus(String tariffType) throws ServiceException;",
"public Map<FruitType, Integer> groupByTypeWithQuantitySum() {\n\t\treturn fruits.stream()\n\t\t\t\t.collect(Collectors.groupingBy(Fruit::getType, Collectors.summingInt(Fruit::getQuantity)));\n\t}",
"public double getIncomeTotal(){\n\t\tdouble incomeTotal = (((Number)(salaryFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(socialSecurityFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(utilityFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(unemploymentFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(disabilityFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(foodStampsFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(childSupportFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(otherIncomeFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(tanfFTF.getValue())).doubleValue() );\n\t\t\n\t\treturn incomeTotal;\n\t}",
"double getSum();",
"double getSum();",
"boolean addTransaction(int accountNumber, double transactionAmount,\n int transactionType, String transactionJournalEntry, long transactionTimestamp) {\n if (transactionType == 0 || transactionType == 2) {\n if (AccountList.getInstance(context).getAccount(accountNumber).withdraw(transactionAmount)) {\n databaseHandler.addTransaction(transactionList.size(),\n accountNumber, transactionAmount, transactionType, transactionJournalEntry, transactionTimestamp);\n transactionList.add(new Transaction(transactionList.size() + 1, accountNumber, transactionAmount, transactionType, transactionJournalEntry, transactionTimestamp));\n databaseHandler.updateAccount(accountNumber,\n -transactionAmount);\n return true;\n } else {\n return false;\n }\n } else {\n AccountList.getInstance(context).getAccount(accountNumber).deposit(transactionAmount);\n databaseHandler.addTransaction(transactionList.size(),\n accountNumber, transactionAmount, transactionType, transactionJournalEntry, transactionTimestamp);\n transactionList.add(new Transaction(transactionList.size() + 1, accountNumber, transactionAmount, transactionType, transactionJournalEntry, transactionTimestamp));\n databaseHandler.updateAccount(accountNumber, transactionAmount);\n return true;\n }\n }",
"public String getPaymentAmountType() {\r\n return paymentAmountType;\r\n }",
"@SuppressWarnings(BookFlowConstants.BOXING)\r\n private int getCount(final Collection<String> types, final String type)\r\n {\r\n int paxCount = 0;\r\n for (final String passengerType : types)\r\n {\r\n if (StringUtils.equalsIgnoreCase(passengerType.trim(), type))\r\n {\r\n paxCount++;\r\n }\r\n }\r\n return paxCount;\r\n }",
"BigDecimal getTotal();",
"BigDecimal getTotal();",
"public double getBuyPrice(ShipType type) {\n if (type.getMinTechLevel() > planet.getTechLevel().getValue()) {\n return -1;\n }\n return prices.get(type);\n }",
"public double calcTotal(){\n\t\tdouble total; // amount to be returned\n\t\t\n\t\t// add .50 cents for any milk that isn't whole or skim, and .35 cents for flavoring\n\t\tif ((milk != \"whole\" && milk != \"skim\") && flavor != \"no\"){\n\t\t\tcost += 0.85;\t\n\t\t}\n\t\t\n\t\t// add .35 cents for flavoring\n\t\telse if (flavor != \"no\"){\n\t\t\tcost += 0.35;\t\n\t\t}\n\t\t\n\t\t// add .50 cents for milk that isn't whole or skim\n\t\telse if (milk != \"whole\" && milk != \"skim\"){\n\t\t\tcost += 0.50;\n\t\t}\n\t\t\n\t\telse{\n\t\t}\n\t\t\n\t\t// add .50 cents for extra shot of espresso\n\t\tif (extraShot != false){\n\t\t\ttotal = cost + 0.50;\n\t\t}\n\t\telse\n\t\t\ttotal = cost;\n\t\t\n\t\treturn total;\n\t}",
"private int sum(AFormula o1){\n\t\t\t\t\n\t\t\t\treturn o1.calculate(customerType, weekdayCount, weekendCount);\n\t\t\t\t\n\t\t\t}",
"public double calTotalAmount(){\n\t\tdouble result=0;\n\t\tfor (int i = 0; i < this.cd.size(); i++) {\n\t\t\tresult += this.cd.get(i).getPrice();\n\t\t}\n\t\treturn result;\n\t}",
"public int totalCostOfComponents(String component_type)\n\t{\n\t\tint total = 0;\n\t\tfor(Component comp: configuration.values())\n\t\t{\n\t\t\tif (component_type.equalsIgnoreCase(\"HardDisk\")) {\n\t\t\t if (comp instanceof HardDisk) {\n\t\t\t total += comp.getCost();\n\t\t\t }\n\t\t\t }\n\t\t\t if (component_type.equalsIgnoreCase(\"Processor\")) {\n\t\t\t if (comp instanceof Processor) {\n\t\t\t total += comp.getCost();\n\t\t\t }\n\t\t\t }\n\t\t\t if (component_type.equalsIgnoreCase(\"Display\")) {\n\t\t\t if (comp instanceof Display) {\n\t\t\t total += comp.getCost();\n\t\t\t }\n\t\t\t }\n\t\t}\n\t\treturn total;\n\t}",
"protected final Transaction createTransaction(TransactionTypeKeys type) {\n\t\tTransaction trans = null;\n\t\tString payee = getForm().getPayFrom();\n\t\tdouble amount = parseAmount();\n\n\t\t// Put amount in proper form.\n\t\tif ((type == INCOME && amount < 0.0)\n\t\t\t\t|| (type == EXPENSE && amount >= 0.0)) {\n\t\t\tamount = -amount;\n\t\t}\n\n\t\t// Put payee in proper form.\n\t\tpayee = purgeIdentifier(payee);\n\n\t\ttrans = new Transaction(getForm().getField(CHECK_NUMBER).getText(),\n\t\t\t\tparseDate(), payee, Money.of(amount,\n\t\t\t\t\t\tUI_CURRENCY_SYMBOL.getCurrency()), getCategory(),\n\t\t\t\tgetForm().getField(NOTES).getText());\n\n\t\t// Set attributes not applicable in the constructor.\n\t\ttrans.setIsReconciled(getForm().getButton(PENDING).isSelected() == false);\n\n\t\tif (isInEditMode() == true) {\n\t\t\ttrans.setLabel(getEditModeTransaction().getLabel());\n\t\t}\n\n\t\treturn trans;\n\t}",
"private double calculateTotal(){\r\n double total = 0;\r\n for(int i = 0; i < orderList.size(); i++){\r\n total += orderList.getOrder(i).calculatePrice();\r\n }\r\n return total;\r\n }",
"public void calcularTotal() {\n double valor = 0;\n String servico = (String)consultaSelecionada.getSelectedItem().toString();\n switch(servico) {\n case \"Consulta\":\n valor += 100;\n break;\n case \"Limpeza\":\n valor += 130;\n break;\n case \"Clareamento\":\n valor += 450;\n break;\n case \"Aparelho\":\n valor += 100;\n break;\n case \"Raio-x\":\n valor += 80;\n break;\n case \"Cirurgia\":\n valor += 70;\n break;\n }\n Total.setText(String.valueOf(valor));\n }",
"@GetMapping(params = \"type\")\n\tpublic Page<Transaction> getTransactionsByTypeAndPageable(\n\t\t@RequestParam String type, \n\t\tPageable pageable) \n\t{\n\t\tPage<Transaction> pageOfTransactions = null;\n\t\t\n\t\ttry {\n\t\t\tpageOfTransactions = transactionService.getTransactionsByTypeAndPageable(type, pageable);\n\t\t}\n\t\tcatch (InvalidDataException e) {\n\t\t\tString exceptionMessage = e.getMessage();\n\t\t\tthrow new InvalidDataException(exceptionMessage);\n\t\t}\n\t\t\n\t\treturn pageOfTransactions;\n\t}",
"@Override\n public String getTotalSavings() {\n\n setLogString(\"Get total Savings Amount\", true, CustomLogLevel.HIGH);\n final String savingsValue = getElement(getDriver(), By.className(SAVINGS_DOLLARS),\n TINY_TIMEOUT).getText();\n setLogString(\"Total Savings :\" + savingsValue, true, CustomLogLevel.LOW);\n return savingsValue;\n }",
"public KualiDecimal getCurrencyTotal(CashDrawer drawer);",
"public void setPaymentAmountType(String paymentAmountType) {\r\n this.paymentAmountType = paymentAmountType;\r\n }",
"public double total(){\n\tdouble total=0;\n\tfor(Map.Entry<String, Integer> pro:proScan.getProducts().entrySet()){\n\t\tString proName=pro.getKey();\n\t\tint quantity=pro.getValue();\n\t\tProductCalculator proCal=priceRule.get(proName);\n\t\tif(proCal==null)\n\t\t\tthrow new MissingProduct(proName);\n\t\t\n\t\tProductCalculator cal=priceRule.get(proName);\n\t\tdouble subtotal=cal.getTotal(quantity);\n\t\ttotal+=subtotal;\n\t\t//System.out.println(total);\n\t}\n\t//round the total price to two digit\n\treturn round(total, 2);\n}",
"public KualiDecimal getCoinTotal(CashDrawer drawer);",
"private int getGoodsCount(GoodsType type) {\n return colony.getGoodsCount(type);\n }",
"public String calcTransNotifyTPS(String secretKey, String transID, String transStatus, String transType,\n\t String amount, String batchID, String batchStatus, String totalCount, String totalAmount,\n\t String batchUploadID, String rebillID, String rebillAmount, String rebillStatus)\n\t\t\tthrows java.security.NoSuchAlgorithmException {\n\t\tString tps = secretKey + transID + transStatus + transType + amount + batchID + batchStatus +\n\t\t\t\ttotalCount + totalAmount + batchUploadID + rebillID + rebillAmount + rebillStatus;\n\t\treturn md5(tps);\n\t}",
"public void calculateSale()\n {\n double total = 0.00;\n int numTimbits = 0;\n int numDoughnuts = 0;\n int smallCoffee = 0;\n int mediumCoffee = 0;\n int largeCoffee = 0;\n String order;\n \n for(int i = 0; salesItem[i] != null && i < salesItem.length; i++)\n {\n if(salesItem[i] instanceof Timbit) \n {\n numTimbits = numTimbits + salesItem[i].getNumOfItems();\n }\n else if(salesItem[i] instanceof Doughnut)\n {\n numDoughnuts = numDoughnuts + salesItem[i].getNumOfItems();\n }\n else if(salesItem[i] instanceof Coffee)\n {\n if(salesItem[i].getNumOfItems()==1)\n {\n smallCoffee ++;\n }\n else if(salesItem[i].getNumOfItems()==2)\n {\n mediumCoffee ++;\n }\n else\n {\n largeCoffee ++;\n }\n }\n \n total += salesItem[i].getFinalPrice();\n }\n \n order = \"Timbits: \" + numTimbits + \"\\nDoughnuts: \" + numDoughnuts + \"\\nSmall Coffees: \" + smallCoffee + \"\\nMedium Coffees: \" + mediumCoffee + \"\\nLarge Coffees: \" + largeCoffee ; \n showText(order + String.format(\"\\nTotal Price: $%5.2f\", total), 150, 175);\n }",
"public String getAccountDailySpent(){\n if (currentAccount instanceof SavingAccount){\n Integer myInt = ((SavingAccount)currentAccount).getDailySpentCounter();\n return myInt.toString();\n \n }\n else if (currentAccount instanceof NetSavingAccount){\n Integer myInt = ((NetSavingAccount)currentAccount).getDailySpentCounter();\n return myInt.toString();\n }\n else if (currentAccount instanceof ChequeAccount){\n Integer myInt = ((ChequeAccount)currentAccount).getDailySpentCounter();\n return myInt.toString();\n }\n else if (currentAccount instanceof FixedAccount){\n Integer myInt = ((FixedAccount)currentAccount).getDailySpentCounter();\n return myInt.toString();\n }\n else{\n System.out.println(\"Get Account Daily spent count not found\");\n return \"error\";\n }\n }",
"float getAmount();"
] |
[
"0.71558654",
"0.64647",
"0.6439451",
"0.6358833",
"0.620706",
"0.5992195",
"0.5976083",
"0.5946288",
"0.5909173",
"0.58215445",
"0.5786642",
"0.5774706",
"0.5767801",
"0.5745366",
"0.5639643",
"0.5606071",
"0.5552366",
"0.55426985",
"0.5539011",
"0.5517396",
"0.550875",
"0.5427117",
"0.5424966",
"0.5418651",
"0.5411049",
"0.5401718",
"0.5363886",
"0.53493184",
"0.53414476",
"0.53308135",
"0.5320173",
"0.52996254",
"0.52978367",
"0.5293425",
"0.5292063",
"0.5287497",
"0.5279363",
"0.52776945",
"0.52641433",
"0.5232539",
"0.5226552",
"0.5223992",
"0.5203743",
"0.5203584",
"0.51978445",
"0.5184111",
"0.51811516",
"0.5167842",
"0.51643926",
"0.5162093",
"0.5151209",
"0.5134278",
"0.5133188",
"0.5117023",
"0.51076186",
"0.50995326",
"0.5095585",
"0.5093535",
"0.5083615",
"0.50750524",
"0.5071745",
"0.5060766",
"0.50586784",
"0.5048739",
"0.50235605",
"0.50220406",
"0.501605",
"0.49911058",
"0.4982018",
"0.4977684",
"0.49723917",
"0.4969281",
"0.49640474",
"0.4947104",
"0.49359682",
"0.49359682",
"0.49274942",
"0.49199444",
"0.49139923",
"0.491072",
"0.491072",
"0.49059215",
"0.49029148",
"0.49028572",
"0.49014476",
"0.48932576",
"0.48639724",
"0.48606384",
"0.48520544",
"0.48511672",
"0.4849261",
"0.48481566",
"0.48431537",
"0.48403496",
"0.48371252",
"0.48284295",
"0.4826789",
"0.48249",
"0.48215264",
"0.48146343"
] |
0.8004295
|
0
|
Returns a page of transactions of a specified type's data (which were made between two dates INCLUSIVE), as a JSON object by passing a paging restriction in a GET request. Allowed transaction types (caseinsensitive): "INCOME" "EXPENSE" "TRANSFER"
|
@GetMapping("/between-dates")
public Page<Transaction> getTransactionsBetweenDatesByTypeAndPageable(
@RequestParam String type,
@RequestParam @DateTimeFormat(pattern = "dd.MM.yyyy") Date startDate,
@RequestParam @DateTimeFormat(pattern = "dd.MM.yyyy") Date endDate,
Pageable pageable)
{
Page<Transaction> pageOfTransactions = null;
try {
pageOfTransactions = transactionService.getTransactionsBetweenDatesByTypeAndPageable(type, startDate, endDate, pageable);
}
catch (InvalidDataException e) {
String exceptionMessage = e.getMessage();
throw new InvalidDataException(exceptionMessage);
}
return pageOfTransactions;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@GetMapping(params = \"type\")\n\tpublic Page<Transaction> getTransactionsByTypeAndPageable(\n\t\t@RequestParam String type, \n\t\tPageable pageable) \n\t{\n\t\tPage<Transaction> pageOfTransactions = null;\n\t\t\n\t\ttry {\n\t\t\tpageOfTransactions = transactionService.getTransactionsByTypeAndPageable(type, pageable);\n\t\t}\n\t\tcatch (InvalidDataException e) {\n\t\t\tString exceptionMessage = e.getMessage();\n\t\t\tthrow new InvalidDataException(exceptionMessage);\n\t\t}\n\t\t\n\t\treturn pageOfTransactions;\n\t}",
"public static List<Transaction> getTransactionsFilteredByDate(String startDate, String endDate,\r\n\t\t\tTransactionType transactionType) {\r\n\t\tList<Transaction> transactions = new ArrayList<>();\r\n\t\tdbConnect();\r\n\t\tStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\t// SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\t// Date start = (Date) sdf.parse(startDate);\r\n\t\t// Date end = (Date) sdf.parse(endDate);\r\n\t\tfinal String OPEN_TRANSACTIONS_FROM_DB;\r\n\t\tif (transactionType == TransactionType.PURCHASE)\r\n\t\t\tOPEN_TRANSACTIONS_FROM_DB = \"SELECT * FROM purchase WHERE DATE(purchase_date) >= DATE('\" + startDate\r\n\t\t\t\t\t+ \"') AND DATE(purchase_date) <= DATE('\" + endDate + \"') ORDER BY purchase_id DESC\";\r\n\t\telse\r\n\t\t\tOPEN_TRANSACTIONS_FROM_DB = \"SELECT * FROM sales WHERE DATE(sales_date) >= DATE('\" + startDate\r\n\t\t\t\t\t+ \"') AND DATE(sales_date) <= DATE('\" + endDate + \"') ORDER BY sales_id DESC\";\r\n\t\ttry {\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\trs = stmt.executeQuery(OPEN_TRANSACTIONS_FROM_DB);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tint transactionNumber = rs.getInt(1);\r\n\t\t\t\tString transactionDate = rs.getString(2);\r\n\t\t\t\tString nameOfClient = getClient(rs.getInt(3), transactionType).getName();\r\n\t\t\t\tdouble cashGiven = rs.getDouble(4);\r\n\t\t\t\tObservableList<Product> productList = getProductTransaction(rs.getInt(1), transactionType);\r\n\r\n\t\t\t\ttransactions.add(new Transaction(transactionNumber, transactionDate, nameOfClient, cashGiven, cashGiven,\r\n\t\t\t\t\t\tproductList.size(), productList));\r\n\t\t\t}\r\n\t\t\tstmt.close();\r\n\t\t\trs.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn transactions;\r\n\t}",
"@GetMapping(\"/by-to-data\")\n\tpublic Page<Transaction> getTransactionsByToDataAndPageable(\n\t\t@RequestParam TransactionToType toType,\n\t\t@RequestParam Long toId,\n\t\tPageable pageable) \n\t{\n\t\tPage<Transaction> pageOfTransactions = transactionService.getTransactionsByToDataAndPageable(toType, toId, pageable);\t\n\t\treturn pageOfTransactions;\n\t}",
"@GetMapping(\"/by-from-data\")\n\tpublic Page<Transaction> getTransactionsByFromDataAndPageable(\n\t\t@RequestParam TransactionFromType fromType,\n\t\t@RequestParam Long fromId,\n\t\tPageable pageable) \n\t{\n\t\tPage<Transaction> pageOfTransactions = transactionService.getTransactionsByFromDataAndPageable(fromType, fromId, pageable);\n\t\treturn pageOfTransactions;\n\t}",
"public List<HCLFieldTransaction> getTransactionbyType(String transactionType)\r\n\t\t\tthrows JsonProcessingException, IOException {\r\n\r\n\t\tlogger.info(\"Logger Name: getTransactionbyType() :: \" + logger.getName());\r\n\t\tlogger.debug(\"Transaction Type : getTransactionbyType() :: \" + transactionType);\r\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\r\n\t\tlogger.info(\"Open Bank API URL :: getTotalAmountbyTransactionType() :: \"\r\n\t\t\t\t+ TransactionConstant.THIRD_PARTY_REST_API);\r\n\t\tJsonNode root = mapper.readTree(new URL(TransactionConstant.THIRD_PARTY_REST_API));\r\n\r\n\t\tList<HCLFieldTransaction> transactionList = new ArrayList<HCLFieldTransaction>();\r\n\r\n\t\t/* Traversing Nested JSON node to publish the relevant data */\r\n\t\ttry {\r\n\t\t\tJsonNode transactionsNodes = root.path(\"transactions\");\r\n\r\n\t\t\tfor (JsonNode transactionsNode : transactionsNodes) {\r\n\r\n\t\t\t\tHCLFieldTransaction hclFieldTransaction = new HCLFieldTransaction();\r\n\t\t\t\tJsonNode details = transactionsNode.path(\"details\");\r\n\t\t\t\thclFieldTransaction.setTransactionType(details.path(\"type\").asText());\r\n\r\n\t\t\t\t/* When transactionType is null or empty */\r\n\t\t\t\tif (transactionType == null && details.path(\"type\").isNull() == true) {\r\n\t\t\t\t\thclFieldTransaction.setId(transactionsNode.path(\"id\").asText());\r\n\r\n\t\t\t\t\tJsonNode thisAccount_Node = transactionsNode.path(\"this_account\");\r\n\t\t\t\t\thclFieldTransaction.setAccountId(thisAccount_Node.path(\"id\").asText());\r\n\r\n\t\t\t\t\tJsonNode otherAccount_Node = transactionsNode.path(\"other_account\");\r\n\t\t\t\t\thclFieldTransaction.setCounterpartyAccount(otherAccount_Node.path(\"number\").asText());\r\n\r\n\t\t\t\t\tJsonNode otherAccount_holder_Node = otherAccount_Node.path(\"holder\");\r\n\t\t\t\t\thclFieldTransaction.setCounterpartyName(otherAccount_holder_Node.path(\"name\").asText());\r\n\t\t\t\t\tJsonNode metadata = otherAccount_Node.path(\"metadata\");\r\n\t\t\t\t\thclFieldTransaction.setCounterPartyLogoPath(metadata.path(\"open_corporates_URL\").asText());\r\n\r\n\t\t\t\t\thclFieldTransaction.setTransactionType(details.path(\"type\").asText());\r\n\t\t\t\t\thclFieldTransaction.setDescription(details.path(\"description\").asText());\r\n\r\n\t\t\t\t\tJsonNode value = details.path(\"value\");\r\n\t\t\t\t\thclFieldTransaction.setInstructedAmount(value.path(\"amount\").asDouble());\r\n\r\n\t\t\t\t\thclFieldTransaction.setInstructedCurrency(value.path(\"currency\").asText());\r\n\r\n\t\t\t\t\thclFieldTransaction.setTransactionAmount(value.path(\"amount\").asDouble());\r\n\t\t\t\t\thclFieldTransaction.setTransactionCurrency(value.path(\"currency\").asText());\r\n\t\t\t\t\tlogger.debug(\"Transaction Field Row Value:: \" + hclFieldTransaction.toString());\r\n\r\n\t\t\t\t\t/* Adding specific type of transaction list into one ArrayList */\r\n\t\t\t\t\ttransactionList.add(hclFieldTransaction);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* When transactionType is not null or empty */\r\n\t\t\t\telse if (transactionType != null) {\r\n\r\n\t\t\t\t\tif (hclFieldTransaction.getTransactionType().equalsIgnoreCase(transactionType.trim())) {\r\n\r\n\t\t\t\t\t\tlogger.debug(\"Transaction Type :: \" + transactionType);\r\n\t\t\t\t\t\thclFieldTransaction.setId(transactionsNode.path(\"id\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode thisAccount_Node = transactionsNode.path(\"this_account\");\r\n\t\t\t\t\t\thclFieldTransaction.setAccountId(thisAccount_Node.path(\"id\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode otherAccount_Node = transactionsNode.path(\"other_account\");\r\n\t\t\t\t\t\thclFieldTransaction.setCounterpartyAccount(otherAccount_Node.path(\"number\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode otherAccount_holder_Node = otherAccount_Node.path(\"holder\");\r\n\t\t\t\t\t\thclFieldTransaction.setCounterpartyName(otherAccount_holder_Node.path(\"name\").asText());\r\n\t\t\t\t\t\tJsonNode metadata = otherAccount_Node.path(\"metadata\");\r\n\t\t\t\t\t\thclFieldTransaction.setCounterPartyLogoPath(metadata.path(\"open_corporates_URL\").asText());\r\n\r\n\t\t\t\t\t\thclFieldTransaction.setTransactionType(details.path(\"type\").asText());\r\n\t\t\t\t\t\thclFieldTransaction.setDescription(details.path(\"description\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode value = details.path(\"value\");\r\n\t\t\t\t\t\thclFieldTransaction.setInstructedAmount(value.path(\"amount\").asDouble());\r\n\r\n\t\t\t\t\t\thclFieldTransaction.setInstructedCurrency(value.path(\"currency\").asText());\r\n\r\n\t\t\t\t\t\thclFieldTransaction.setTransactionAmount(value.path(\"amount\").asDouble());\r\n\t\t\t\t\t\thclFieldTransaction.setTransactionCurrency(value.path(\"currency\").asText());\r\n\t\t\t\t\t\tlogger.debug(\"Transaction Field Row Value:: \" + hclFieldTransaction.toString());\r\n\r\n\t\t\t\t\t\t/* Adding specific type of transaction list into one ArrayList */\r\n\t\t\t\t\t\ttransactionList.add(hclFieldTransaction);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"Exception : getTransactionbyType() :: \", e);\r\n\t\t}\r\n\t\tlogger.info(\"Return value from service layer:: getTransactionbyType() :: \" + transactionList.toString());\r\n\t\treturn transactionList;\r\n\r\n\t}",
"Page<TypeBonDTO> findAll(Pageable pageable);",
"@PostMapping(\"/tlb-trade/pageList\")\n @Timed\n public ResponseEntity<ResponseResult> pageList(@RequestBody HashMap<String, Object> params) {\n log.debug(\"REST request to get a page of TlbTrades\");\n HashMap<String,Object> response = tlbTradeService.pageList(params);\n //HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/tbl-user\");\n ResponseResult json = new ResponseResult();\n HashMap<String, Object> retMap = new HashMap<>();\n Page<TlbTradeDTO> page=(Page<TlbTradeDTO>)response.get(\"page\");\n retMap.put(\"list\", page.getContent());\n retMap.put(\"total\", page.getTotalElements());\n retMap.put(\"totalPage\", page.getTotalPages());\n retMap.put(\"sumLots\", response.get(\"sumLots\"));\n retMap.put(\"sumAmount\", response.get(\"sumAmount\"));\n json.setData(retMap);\n json.setStatusCode(ResponseResult.SUCCESS_CODE);\n return new ResponseEntity<>(json, null, HttpStatus.OK);\n }",
"Page<BalanceDTO> findAll(Pageable pageable);",
"long getAmountPage();",
"Collection<Transaction> findAllByTransactiontype(int type, Sort sort);",
"@Override\n\tpublic JSONObject getByPage(String param) {\n\t\tJSONObject data = new JSONObject();\n\t\tJSONObject result = new JSONObject();\n\t\tMainUtility mainUtil = new MainUtility();\n\t\tJSONObject jsonParams = mainUtil.stringToJson(param);\n\t\tStringBuilder builder = new StringBuilder();\n\t\tStringBuilder builderGetTotal = new StringBuilder();\n\n\t\tbuilder.append(\"SELECT `wt_id`, `wt_title`, `wt_content`, user.full_name, \"\n\t\t\t\t+ \"IF(writing_test.created_date IS NULL,null, DATE_FORMAT(writing_test.created_date, '%d-%m-%Y')) AS created_date FROM writing_test \"\n\t\t\t\t+ \"LEFT JOIN crm_user AS user ON writing_test.created_by = user.user_id WHERE 1=1 \");\n\t\tbuilderGetTotal.append(\"SELECT COUNT(1) FROM `writing_test` \"\n\t\t\t\t+ \" WHERE 1=1\");\n\t\t// filter header\n\t\tif (jsonParams.get(\"status\") == null || Integer.parseInt(jsonParams.get(\"status\").toString()) == -1) {\n\t\t\tbuilder.append(\" AND writing_test.deleted <> 1\");\n\t\t\tbuilderGetTotal.append(\" AND writing_test.deleted <> 1\");\n\t\t} else if (Integer.parseInt(jsonParams.get(\"status\").toString()) == -2) {// thùng rác\n\t\t\tbuilder.append(\" AND writing_test.deleted = 1\");\n\t\t\tbuilderGetTotal.append(\" AND writing_test.deleted = 1\");\n\t\t}\n\t\tif (jsonParams.get(\"wt_title\") != null && !\"\".equals(jsonParams.get(\"wt_title\").toString())) {\n\t\t\tbuilder.append(\" AND wt_title LIKE N'%\" + jsonParams.get(\"wt_title\").toString() + \"%'\");\n\t\t\tbuilderGetTotal\n\t\t\t\t\t.append(\" AND wt_title LIKE N'%\" + jsonParams.get(\"wt_title\").toString() + \"%'\");\n\t\t}\n\t\tif (jsonParams.get(\"wt_content\") != null && !\"\".equals(jsonParams.get(\"wt_content\").toString())) {\n\t\t\tbuilder.append(\" AND wt_content LIKE N'%\" + jsonParams.get(\"wt_content\").toString() + \"%'\");\n\t\t\tbuilderGetTotal\n\t\t\t\t\t.append(\" AND wt_content LIKE N'%\" + jsonParams.get(\"wt_content\").toString() + \"%'\");\n\t\t}\n\t\t// sortby\n\t\tif (jsonParams.get(\"sortField\") != null && !\"\".equals(jsonParams.get(\"sortField\").toString())) {\n\t\t\tswitch (jsonParams.get(\"sortField\").toString()) {\n\t\t\tdefault:\n\t\t\t\tbuilder.append(\" ORDER BY writing_test.created_date DESC\");\n\t\t\t\tbreak;\n\t\t\t}\n//\t\t\tif (jsonParams.get(\"sortOrder\") != null && \"descend\".equals(jsonParams.get(\"sortOrder\").toString())) {\n//\t\t\t\tbuilder.append(\" DESC\");\n//\t\t\t}\n//\t\t\tif (jsonParams.get(\"sortOrder\") != null && \"ascend\".equals(jsonParams.get(\"sortOrder\").toString())) {\n//\t\t\t\tbuilder.append(\" ASC\");\n//\t\t\t}\n\t\t}\n\t\tmainUtil.getLimitOffset(builder, jsonParams);\n\t\ttry {\n\t\t\tint totalRow = this.jdbcTemplate.queryForObject(builderGetTotal.toString(), Integer.class);\n\t\t\tList<Map<String, Object>> lstWrittingTest = this.jdbcTemplate.queryForList(builder.toString());\n\t\t\tJSONObject results = new JSONObject();\n\t\t\tresults.put(\"results\", lstWrittingTest);\n\t\t\tresults.put(\"total\", totalRow);\n\t\t\tdata.put(\"data\", results);\n\t\t\tdata.put(\"success\", true);\n\t\t} catch (Exception e) {\n\t\t\tdata.put(\"success\", false);\n\t\t\tdata.put(\"err\", e.getMessage());\n\t\t\tdata.put(\"msg\", \"Lấy danh sách bài kiểm tra thất bại\");\n\t\t}\n\t\treturn data;\n\t}",
"List selectByExampleWithPage(PaymentTradeExample example);",
"public interface TransactionService {\r\n public Map<String, Object> findByPage(Query query);\r\n}",
"@Override\n\tpublic <T> PageResult<T> page(Map<String, CustmerCriteria> params, Integer currentPage, Integer pageSize,\n\t\t\tClass<T> entityClass) throws Exception {\n\t\treturn null;\n\t}",
"public List<Timetable> pagging(int pageIndex, int pageSize) throws Exception;",
"Page<TITransferDetails> findAll(Pageable pageable);",
"Page<AccountDTO> coverListAccountToListEmpDTO(Page<Account> accounts);",
"public List<Transaction> getAllDepositTransactions(int start, int numOfRows) throws MiddlewareQueryException;",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<T> getPage(Class<T> type, int PageNo,int PageSize,int StartNo) {\n\t\tQuery query=super.getSessionFactory().getCurrentSession().createQuery(\"from \"+type.getName()+\"\");\r\n\t\tquery.setMaxResults(PageSize);\r\n\t\tquery.setFirstResult(StartNo+PageNo*PageSize);\r\n\t\treturn (List<T>)query.list();\r\n\t}",
"Page<BalanceSheetDTO> findAll(Pageable pageable);",
"Page<SygTypeServiceDTO> findAll(Pageable pageable);",
"List selectByExampleWithPage(PaymentTradeExampleExtended exampleExtended);",
"public Page<CustomersListSearchConditionsDTO> findAll(Pageable pageable);",
"public TransactionResponse getTransactionByIdAndType(String id, String type) throws ParseException {\n TransactionResponse response = new TransactionResponse();\n Predicate<Transaction> byId = t -> t.getId().equals(id);\n Predicate<Transaction> byType = t -> t.getType().equals(type);\n response.setTransaction(idAndTypefilterTransaction(byType, byId));\n return response;\n }",
"@GetMapping(value = \"/leave\") // demo on postman:\n\t\t\t\t\t\t\t\t\t// \"http://localhost:8080/api/balance/leave?page=1&limit=2&type=sick\"\n\tpublic LeaveOutput show(@RequestParam(\"page\") int page, @RequestParam(\"limit\") int limit,\n\t\t\t@RequestParam(\"type\") String type) {\n\n\t\treturn leaveService.findAllByType(page, limit, type);\n\t}",
"@GetMapping(\"/buy-types\")\n @Timed\n public ResponseEntity<List<BuyTypeDTO>> getAllBuyTypes(@RequestParam(required = false) String query, @ApiParam Pageable pageable) {\n log.debug(\"REST request to get a page of BuyTypes\");\n Page<BuyTypeDTO> page = buyTypeService.findAll(query,pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/buy-types\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }",
"Page<EnumEmpTypeDTO> findAll(Pageable pageable);",
"public Page<Event> findEventsByEventTypeId(Long typeId , Pageable pageable);",
"PageInfo list(Date beginDate, Date endDate, List<Integer> resources, int pageNo, int pageSize);",
"@Override\r\n\tpublic JsonResult getInvigilate(String condition, Integer pageNum, Integer pageSize) {\n\t\tJsonResult res = new JsonResult();\r\n\t\tInvigilateQueryCondition cond = JSONObject.parseObject(condition, InvigilateQueryCondition.class);\r\n\t\tint total = invigilateMapper.selectByCondition(cond).size();\r\n\t\tif(pageNum!=null && pageSize!=null){\r\n\t\t\tPageHelper.startPage(pageNum,pageSize);\r\n\t\t}\r\n\t\tList<Map<String, Object>> selectByCondition = invigilateMapper.selectByCondition(cond);\r\n\t\tif(selectByCondition!=null){\r\n\t\t\tres.setStatus(\"200\");\r\n\t\t\tres.setRows(selectByCondition);\r\n\t\t\tres.setTotal(total);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tres.setStatus(\"500\");\r\n\t\t\tres.setResult(\"查询无结果!\");\r\n\t\t}\r\n\t\treturn res;\r\n\t}",
"@RequestMapping(value=\"/terrains\", method=RequestMethod.GET)\n\tpublic Page<Terrain> listTerrains(int page , int size , String type) {\n\t\treturn terrainRepository.getTerrainByType(type, new PageRequest(page, size));\n\t}",
"Page<TypeBonDTO> search(String query, Pageable pageable);",
"Page<CoveredActivityDTO> findAll(Pageable pageable);",
"Page<FinancialYearSettingsDTO> findAll(Pageable pageable);",
"@GetMapping(\"/total-sum-between-dates\")\n\tpublic Double getTotalTransactionsSumBetweenDatesByType(\n\t\t@RequestParam String type,\n\t\t@RequestParam @DateTimeFormat(pattern = \"dd.MM.yyyy\") Date startDate,\n\t\t@RequestParam @DateTimeFormat(pattern = \"dd.MM.yyyy\") Date endDate) \n\t{\n\t\tDouble totalSum = null;\n\t\t\n\t\ttry {\n\t\t\ttotalSum = transactionService.getTotalTransactionsSumBetweenDatesByType(type, startDate, endDate);\n\t\t}\n\t\tcatch (InvalidDataException e) {\n\t\t\tString exceptionMessage = e.getMessage();\n\t\t\tthrow new InvalidDataException(exceptionMessage);\n\t\t}\n\t\t\n\t\treturn totalSum;\n\t}",
"Page<ConsultationInfoDTO> findAll(Pageable pageable);",
"Page<AccountDTO> findAllByBirthday(LocalDate birthday, Pageable pageable);",
"@Transactional\n @Override\n public PageUtils queryPage(Map<String, Object> params) {\n QueryWrapper<PurchaseDetailEntity> wrapper = new QueryWrapper<>();\n String key = (String) params.get(\"key\");\n if (!StringUtils.isEmpty(key)) {\n wrapper.and(w->{\n w.eq(\"purchase_id\", key).or().like(\"sku_id\", key);\n });\n }\n String status = (String) params.get(\"status\");\n if (!StringUtils.isEmpty(status)) {\n wrapper.eq(\"status\", status);\n }\n String wareId = (String) params.get(\"wareId\");\n if (!StringUtils.isEmpty(wareId)) {\n wrapper.eq(\"ware_id\", wareId);\n }\n IPage<PurchaseDetailEntity> page = this.page(\n new Query<PurchaseDetailEntity>().getPage(params),\n wrapper\n );\n\n return new PageUtils(page);\n }",
"Page<EventActivityDTO> findAll(Pageable pageable);",
"public static List<Transaction> getTransactionsFilteredByClientName(String clientName,\r\n\t\t\tTransactionType transactionType) {\r\n\t\tList<Transaction> transactions = new ArrayList<>();\r\n\t\tdbConnect();\r\n\t\tStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tint clientId = getClientId(clientName, transactionType);\r\n\t\tfinal String OPEN_TRANSACTIONS_FROM_DB;\r\n\t\tif (transactionType == TransactionType.PURCHASE)\r\n\t\t\tOPEN_TRANSACTIONS_FROM_DB = \"SELECT * FROM purchase WHERE purchase_client_id = \" + clientId\r\n\t\t\t\t\t+ \" ORDER BY purchase_id DESC\";\r\n\t\telse\r\n\t\t\tOPEN_TRANSACTIONS_FROM_DB = \"SELECT * FROM sales WHERE sales_client_id = \" + clientId\r\n\t\t\t\t\t+ \" ORDER BY sales_id DESC\";\r\n\t\ttry {\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\trs = stmt.executeQuery(OPEN_TRANSACTIONS_FROM_DB);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tint transactionNumber = rs.getInt(1);\r\n\t\t\t\tString transactionDate = rs.getString(2);\r\n\t\t\t\tString nameOfClient = getClient(rs.getInt(3), transactionType).getName();\r\n\t\t\t\tdouble cashGiven = rs.getDouble(4);\r\n\t\t\t\tObservableList<Product> productList = getProductTransaction(rs.getInt(1), transactionType);\r\n\r\n\t\t\t\ttransactions.add(new Transaction(transactionNumber, transactionDate, nameOfClient, cashGiven, cashGiven,\r\n\t\t\t\t\t\tproductList.size(), productList));\r\n\t\t\t}\r\n\t\t\tstmt.close();\r\n\t\t\trs.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn transactions;\r\n\t}",
"public Page<Account> getAccPage(Pageable page);",
"public abstract Page<CustomerInfo> findAll(GlobalSearch globalSearch, Pageable pageable);",
"Page<AccountDTO> findAllAccount(Pageable pageable);",
"ArrayList<Transaction> getFilteredTransactions(long startTimestamp,\n long endTimestamp, long accountNumber, boolean showExpense, boolean showIncome) {\n ArrayList<Transaction> filteredTransactionList = new ArrayList<>();\n int low = 0;\n int high = transactionList.size() - 1;\n if (startTimestamp != -1 && endTimestamp != -1) {\n /*\n If start and end time are set, then get the range of\n transaction corresponding to the time range.\n */\n Points p = getTransactions(startTimestamp, endTimestamp);\n if (p.x == -1 && p.y == -1)\n return filteredTransactionList;\n low = p.x;\n high = p.y;\n }\n for (int i = low; i <= high; i++) {\n if (accountNumber != -1 && transactionList.get(i).transactionAccountNumber != accountNumber)\n continue;\n if (!showExpense && (transactionList.get(i).transactionType == 0 || transactionList.get(i).transactionType == 2))\n continue;\n if (!showIncome && (transactionList.get(i).transactionType == 1 || transactionList.get(i).transactionType == 3))\n continue;\n filteredTransactionList.add(transactionList.get(i));\n }\n return filteredTransactionList;\n }",
"@Test\n public void getTransactionsByType() throws Exception {\n String expectedFile = \"src/test/resources/expected-transactions.json\";\n List<Transaction> expectedTransactions = Arrays.asList(new ObjectMapper()\n .readValue(JsonUtils.readFileAsString(expectedFile), Transaction[].class));\n List<Transaction> actualTransactions = openBankTransactionsService.getTransactionsByType(TEST_TRANSACTION_TYPE);\n assertEquals(expectedTransactions, actualTransactions);\n }",
"public interface ITBKRest {\r\n\r\n public Page<GoodsItem> search(String q,String cat,String itemloc,String sort,boolean is_tmall,boolean is_overseas,long start_price,long end_price,long start_tk_rate,long end_tk_rate,long platform,long page_no,long page_size);\r\n\r\n public Page<ShopItem> searchShop(String q, String sort, boolean is_tmall, long start_credit, long start_commission_rate, long end_commission_rate, long start_total_action, long end_total_action, long start_auction_count, long end_auction_count,long platform,long page_no,long page_size );\r\n\r\n public Page<CatItem> getCat(long[] cids,long parentCid);\r\n}",
"public List<Lot> getLotsByEntityType(String type, int start, int numOfRows) throws MiddlewareQueryException;",
"@PreAuthorize(\"hasAnyRole('ADMIN')\")\n\t@RequestMapping(value=\"/page\",method=RequestMethod.GET) \n\tpublic ResponseEntity<Page<ClienteDTO>> findPage(\n\t\t\t@RequestParam(value=\"page\", defaultValue=\"0\") Integer page, \n\t\t\t@RequestParam(value=\"linesPerPage\", defaultValue=\"24\") Integer linesPerPage, //24 pq eh multiplo de 1, 2 3 e 4\n\t\t\t@RequestParam(value=\"orderBy\", defaultValue=\"nome\") String orderBy, \n\t\t\t@RequestParam(value=\"direction\", defaultValue=\"ASC\") String directionOrder) { //asc eh ascendente \n\t\t\n\t\tPage<Cliente> list = service.findPage(page,linesPerPage,orderBy,directionOrder);\n\t\t\n\t\tPage<ClienteDTO> listDTO = list.map(obj->new ClienteDTO(obj));\n\t\t\n\t\treturn ResponseEntity.ok().body(listDTO); \n\t\t\n\t}",
"public List<Transaction> getAllDepositTransactionsByDonor(Integer personId, int start, int numOfRows) throws MiddlewareQueryException;",
"Page<ItemPriceHistoryDTO> findAll(Pageable pageable);",
"public List<Goods> selectByDate(int page,int maxResults);",
"public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }",
"@Override\n @Transactional\n public Page pageQuery(String orgcode, String cnname, String startdate, String enddate, String pageno) {\n p.setPageno(Integer.parseInt(pageno));\n List<En> ens = ed.pageQuery(orgcode,cnname,startdate,enddate);\n p.setTotalsize(ens.size());\n p.setTotalpage((p.getTotalsize()%p.getPagesize())==0?p.getTotalsize()/p.getPagesize():p.getTotalsize()/p.getPagesize()+1);\n PageHelper.startPage(Integer.parseInt(pageno),p.getPagesize());\n List<En> ens1 = ed.pageQuery(orgcode,cnname,startdate,enddate);\n p.setInvs(ens1);\n return p;\n }",
"@Override\n\tpublic List<Object> modifyByPage(JSONObject params) {\n\t\tList<Object> resultData = new ArrayList<Object>();\n\t\tString type = StringUtil.ToString(params.getString(\"type\"));\n\t\tSystem.out.println(type);\n\t\tString tip = StringUtil.ToString(params.getString(\"tip\"));\n\t\tString area = StringUtil.ToString(params.getString(\"area\"));\n\t\tString releaseDate = StringUtil.ToString(params.getString(\"releaseDate\"));\n\t\tint size = Integer.parseInt(params.getString(\"size\"));\n\t\tint currentPage = Integer.parseInt(params.getString(\"currentPage\"));\n \n\t\tMap<String, Object> data = new HashMap<String, Object>();\n\t\tdata.put(\"type\", type);\n\t\tif(!tip.equals(\"\")){\n\t\t\tdata.put(\"tip\", tip);\n\t\t} else if(!area.equals(\"\")){\n\t\t\tdata.put(\"area\", area);\n\t\t} else if(!releaseDate.equals(\"\")){\n\t\t\tdata.put(\"releaseDate\", releaseDate);\n\t\t}\n\t\tPageResultBean prb = new PageResultBean();\n\t\tprb.setPageSize(size);\n\t\tprb.setCurrentPage(currentPage);\n\t\tprb.setToPage(currentPage);\n\t\tPageResultBean resultPrb = new PageResultBean();\n\t\tString orderBy = \"asc\";\n\t\tresultPrb = this.queryForPage(prb, \"Movie.selectByType\", \"Movie.selectPage\", data, orderBy);\n\t\tresultData.add(resultPrb);\n\n\t\treturn resultData;\n\t}",
"public Page<AccountDTO> findAllByGender(String gender, Pageable pageable);",
"void findWithPagination(Pagination<Activity, Assignment> pagination);",
"@Override\n\tpublic List<Record> getRecordByTypePageNum(Type type, int pageNum, int line) {\n\t\t Session session=HibernateSessionFactory.getSession();\n\t\t\tTransaction tx=session.beginTransaction();\n\t\t\tList<Record> list=new ArrayList<Record>();\n\t\t\tRecordDAO recordDAO=new RecordDAO();\n\t\t\t\n\t\t\ttry{\n\t\t\t\tlist=recordDAO.getRecordByTypePageNum(type, pageNum, line);\n\t\t\t\ttx.commit();\n\t\t\t}catch(RuntimeException e){\n\t\t\t\te.printStackTrace();\n\t\t\t\ttx.rollback();\n\t\t\t}finally{\n\t\t\t\tsession.close();\n\t\t\t}\n\t\t\treturn list;\n\t\t}",
"public abstract <T> Page<T> list(Pageable pageable, Class<T> clazz);",
"List<TransactionType> listClientTransactionTypes();",
"@Test\n\tpublic void shouldReturnPagedOpenDocumentsForCustomRetailFilteredByAmountRange()\n\t{\n\t\tfinal SearchPageData<B2BDocumentModel> result = pagedB2BDocumentDao.getPagedDocumentsForUnit(UNIT_CUSTOM_RETAIL,\n\t\t\t\tcreatePageableData(0, 10, StringUtils.EMPTY), Collections.singletonList(AccountSummaryAddonUtils\n\t\t\t\t\t\t.createAmountRangeCriteriaObject(\"24\", \"27\", DOCUMENT_STATUS_OPEN, FILTER_BY_AMOUNT)));\n\n\t\tTestCase.assertEquals(1, result.getResults().size());\n\t\tTestCase.assertEquals(DOCUMENT_NUMBER_DBN_002, result.getResults().get(0).getDocumentNumber());\n\t\tTestCase.assertEquals(\"26.28\", result.getResults().get(0).getAmount().toPlainString());\n\t}",
"@Override\r\n\t@Transactional(\"transactionManager\")\r\n\tpublic Map getAllTransactionsForConsumer(Consumer consumer,String status,int start,int size,String fromDateParm,String toDateParm,String onDateParm,int transactionId,double startAmount,double endAmount,String merchantOrderId,String organizationName,String sort,String order)\r\n\t{\r\n\r\n\t\tMap<String,Object> Response = new HashMap<String,Object>();\r\n\t\tMap<String,Object> parm = new HashMap<String,Object>();\r\n\t\tMerchant merchant =null;\r\n\t\tDate fromDate=null;\r\n\t\tDate toDate=null;\r\n\t\tDate onDate=null;\r\n\t\t\r\n\t\tif(transactionId!=-1)\r\n\t\t\tparm.put(\"transactionId\", transactionId);\t\r\n\t\telse if(!merchantOrderId.equals(\"\"))\r\n\t\t{\r\n\t\t\tparm.put(\"merchantOrderId\", merchantOrderId);\r\n\t\t\tstart=0;\r\n\t\t\tsize=1;\r\n\t\t}else\r\n\t\t{\r\n\t\t\tif(!status.equals(\"\")) // Check only valid success states\r\n\t\t\t\tparm.put(\"status\", status);\r\n\t\t\tif(!sort.equals(\"\"))\r\n\t\t\t\tparm.put(\"sort\", sort);\r\n\t\t\tif(!order.equals(\"\"))\r\n\t\t\t\tparm.put(\"order\", order);\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\t\t\tif(!fromDateParm.equals(\"\"))\r\n\t\t\t\t\tfromDate = df.parse(fromDateParm);\r\n\r\n\t\t\t\tif(!toDateParm.equals(\"\"))\r\n\t\t\t\t\ttoDate = df.parse(toDateParm);\r\n\r\n\t\t\t\tif(!onDateParm.equals(\"\"))\r\n\t\t\t\t\tonDate = df.parse(onDateParm);\r\n\r\n\t\t\t}catch(IllegalArgumentException ex)\r\n\t\t\t{\r\n\t\t\t\tthrow new CustomValidationException(ErrorConstants.INVALID_DATE, ErrorConstants.STR_INVALID_DATE); \r\n\t\t\t}catch(ParseException ex)\r\n\t\t\t{\r\n\t\t\t\tthrow new CustomValidationException(ErrorConstants.INVALID_DATE, ErrorConstants.STR_INVALID_DATE); \r\n\t\t\t}\r\n\r\n\t\t\tif(onDate!=null)\r\n\t\t\t{\r\n\t\t\t\tparm.put(\"onDate\", onDate);\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\tif(fromDate!=null)\r\n\t\t\t\t\tparm.put(\"fromDate\", fromDate);\r\n\t\t\t\tif(toDate!=null)\r\n\t\t\t\t\tparm.put(\"toDate\", toDate);\r\n\t\t\t}\r\n\r\n\t\t\tif(startAmount != -1)\r\n\t\t\t\tparm.put(\"startAmount\", startAmount);\r\n\t\t\tif(endAmount != -1)\r\n\t\t\t\tparm.put(\"endAmount\", endAmount);\r\n\t\t\tif(!organizationName.equals(\"\"))\r\n\t\t\t{\r\n\t\t\t\tmerchant = userDao.getMerchantByOrganizationName(organizationName);\r\n\t\t\t\tif(merchant==null)\r\n\t\t\t\t{\r\n\t\t\t\t\tMap<String,Object> temp = new HashMap<String,Object>();\r\n\t\t\t\t\ttemp.put(\"Message\", \"No results found ! \");\r\n\t\t\t\t\ttemp.put(\"Transactions\", null);\r\n\t\t\t\t\treturn temp;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tResultSetSize resultSetSize = new ResultSetSize();\r\n\t\tMap<String,Object> array[]=null;\r\n\t\tArrayList<Transactions> transactions=this.orderDao.getTransactions(merchant,consumer, parm,start,size,resultSetSize);\r\n\r\n\t\tif(transactions.size()==0)\r\n\t\t{\r\n\t\t\tMap<String,Object> temp = new HashMap<String,Object>();\r\n\t\t\ttemp.put(\"Message\", \"No results found ! \");\r\n\t\t\ttemp.put(\"Transactions\", null);\r\n\t\t\treturn temp;\r\n\t\t}\r\n\t\tarray = new Map[transactions.size()];\r\n\t\tint i;\r\n\t\tfor(i=0;i<transactions.size();i++)\r\n\t\t{\r\n\t\t\tMap<String,Object> temp = new HashMap<String,Object>();\r\n\t\t\tTransactions trans= transactions.get(i);\r\n\t\t\ttemp.put(\"transaction_id\", trans.getTransaction_id());\r\n\t\t\ttemp.put(\"merchant_order_id\", trans.getMerchant_order_id());\r\n\t\t\ttemp.put(\"status\", trans.getStatus());\r\n\t\t\ttemp.put(\"amount\", trans.getTransaction_amount());\r\n\t\t\ttemp.put(\"date\",trans.getMerchant_activity_time().toString());\r\n\t\t\tarray[i]=temp;\r\n\t\t}\r\n\r\n\t\tif(resultSetSize.getRowCount()!=0){\r\n\t\t\tResponse.put(\"resultSetSize\", resultSetSize);\r\n\t\t}\r\n\t\t\r\n\t\tResponse.put(\"Transactions\", array);\r\n\t\t\r\n\t\treturn Response;\r\n\t}",
"public List<LotReportRow> generateReportOnLotsByEntityType(String type, int start, int numOfRows) throws MiddlewareQueryException;",
"public List<Orderlinecharges> findBycreatettsBetween(Date start,Date end,Pageable pageable);",
"public Page getCustomerProfiles(Integer pageNumber,String requestPage) throws EOTException;",
"@Test\n public void getHouseholdClientTransactionUsingGetTest() throws ApiException {\n UUID householdId = null;\n Boolean ascending = null;\n String currencyConversion = null;\n LocalDate endDate = null;\n String filter = null;\n String orderBy = null;\n Integer page = null;\n Integer size = null;\n LocalDate startDate = null;\n PagePortfolioTransaction response = api.getHouseholdClientTransactionUsingGet(householdId, ascending, currencyConversion, endDate, filter, orderBy, page, size, startDate);\n\n // TODO: test validations\n }",
"public List<Lot> getLotsByEntityTypeAndEntityId(String type, Integer entityId, int start, int numOfRows) throws MiddlewareQueryException;",
"PaginatedResponse<Office> findAllPaginated( int page, int pageSize );",
"void findWithPagination(Pagination<Task, Project> pagination);",
"@Override\n\tpublic List<Payments> query(Map<String, Object> filter, int start, int rows) {\n\t\tRowBounds rb = new RowBounds(start, rows);\n\n\t\treturn this.mapper.queryPage(filter, rb);\n\t}",
"Page<RegionDTO> findAll(Pageable pageable);",
"Page<BaacDTO> findAll(Pageable pageable);",
"@PostMapping(\"/tlb-trade/openPageList\")\n @Timed\n public ResponseEntity<ResponseResult> openPageList(@RequestBody HashMap<String, Object> params) {\n log.debug(\"REST request to get a page of TlbTrades\");\n params.put(\"closed\", \"N\");\n ResponseResult json = new ResponseResult();\n HashMap<String, Object> retMap = new HashMap<>();\n HashMap<String,Object> response = tlbTradeService.pageList(params);\n Page<TlbTradeDTO> page=(Page<TlbTradeDTO>)response.get(\"page\");\n retMap.put(\"list\", page.getContent());\n retMap.put(\"total\", page.getTotalElements());\n retMap.put(\"totalPage\", page.getTotalPages());\n retMap.put(\"sumLots\", response.get(\"sumLots\"));\n retMap.put(\"sumAmount\", response.get(\"sumAmount\"));\n json.setData(retMap);\n json.setStatusCode(ResponseResult.SUCCESS_CODE);\n return new ResponseEntity<>(json, null, HttpStatus.OK);\n }",
"private ArrayList<Transaction> getTransactionsOfTheDay(int assetID) throws Exception {\n int i = 1;\n ArrayList<Transaction> currentTransactions = new ArrayList<Transaction>();\n ArrayList<Transaction> allTransactions = new ArrayList<Transaction>();\n\n while (true) {\n String url = MASTER_URL + ASSETS + assetID + \"/history_paginate.api?page=\" + i;\n\n URL obj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\n // request method\n con.setRequestMethod(\"GET\");\n\n // request headers\n con.setRequestProperty(\"token\", USER_TOKEN);\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n // reading input stream\n BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n String inputLine;\n String response = \"\";\n while ((inputLine = in.readLine()) != null) {\n response += inputLine;\n }\n in.close();\n\n DateTime assetActiveDateTime = new DateTime().minusDays(1);\n// System.out.println(assetActiveDateTime);\n int day = assetActiveDateTime.getDayOfMonth();\n int month = assetActiveDateTime.getMonthOfYear();\n int year = assetActiveDateTime.getYear();\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(org.codehaus.jackson.map.DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n String emptyHistory = \"{\\\"history\\\":[]\";\n if (!response.substring(0,13).equals(emptyHistory)) {\n String arrayResponse = response.substring(11, response.length() - 1);\n CollectionType constructCollectionType =\n TypeFactory.defaultInstance().constructCollectionType(ArrayList.class,\n Transaction.class);\n currentTransactions = mapper.readValue(arrayResponse, constructCollectionType);\n for (Transaction t : currentTransactions){\n DateTime checkoutDateTime = t.getCheckOutDateTime();\n if (day == checkoutDateTime.getDayOfMonth() &&\n month == checkoutDateTime.getMonthOfYear() &&\n year == checkoutDateTime.getYear()) {\n allTransactions.add(t);\n }\n }\n// System.out.println(allTransactions);\n currentTransactions.clear();\n } else {\n break;\n }\n i++;\n }\n return allTransactions;\n }",
"public CustomerPaymentList getCustomerPayments(String response) throws Exception {\n\n CustomerPaymentList customerPaymentList = new CustomerPaymentList();\n\n JSONObject jsonObject = new JSONObject(response.trim());\n\n JSONArray customerpayments = jsonObject.getJSONArray(\"customerpayments\"); //No I18N\n\n for (int i = 0; i < customerpayments.length(); i++) {\n CustomerPayment customerPayment = new CustomerPayment();\n\n customerPayment.setPaymentId(customerpayments.getJSONObject(i).getString(\"payment_id\"));\n customerPayment.setPaymentNumber(customerpayments.getJSONObject(i).getString(\"payment_number\"));\n customerPayment.setInvoiceNumbers(customerpayments.getJSONObject(i).getString(\"invoice_numbers\"));\n customerPayment.setDate(customerpayments.getJSONObject(i).getString(\"date\"));\n customerPayment.setPaymentMode(customerpayments.getJSONObject(i).getString(\"payment_mode\"));\n customerPayment.setAmount(customerpayments.getJSONObject(i).getDouble(\"amount\")); //No I18N\n customerPayment.setBcyAmount(customerpayments.getJSONObject(i).getDouble(\"bcy_amount\")); //No I18N\n customerPayment.setUnusedAmount(customerpayments.getJSONObject(i).getDouble(\"unused_amount\")); //No I18N\n customerPayment.setBcyUnusedAmount(customerpayments.getJSONObject(i).getDouble(\"bcy_unused_amount\")); //No I18N\n customerPayment.setAccountId(customerpayments.getJSONObject(i).getString(\"account_id\"));\n customerPayment.setAccountName(customerpayments.getJSONObject(i).getString(\"account_name\"));\n customerPayment.setDescription(customerpayments.getJSONObject(i).getString(\"description\"));\n customerPayment.setReferenceNumber(customerpayments.getJSONObject(i).getString(\"reference_number\"));\n customerPayment.setCustomerId(customerpayments.getJSONObject(i).getString(\"customer_id\"));\n customerPayment.setCustomerName(customerpayments.getJSONObject(i).getString(\"customer_name\"));\n\n customerPaymentList.add(customerPayment);\n }\n\n PageContext pageContext = new PageContext();\n\n JSONObject pagecontext = jsonObject.getJSONObject(\"page_context\"); //No I18N\n\n pageContext.setPage(pagecontext.getInt(\"page\")); //No I18N\n pageContext.setPerPage(pagecontext.getInt(\"per_page\")); //No I18N\n pageContext.setHasMorePage(pagecontext.getBoolean(\"has_more_page\")); //No I18N\n pageContext.setReportName(pagecontext.getString(\"report_name\"));\n pageContext.setAppliedFilter(pagecontext.getString(\"applied_filter\"));\n pageContext.setSortColumn(pagecontext.getString(\"sort_column\"));\n pageContext.setSortOrder(pagecontext.getString(\"sort_order\"));\n\n customerPaymentList.setPageContext(pageContext);\n\n return customerPaymentList;\n }",
"Page<EstimateProductDTO> findAll(Pageable pageable);",
"@RequestMapping(value = {\"/listContracts\" }, method = RequestMethod.GET)\n public String listContracts(@RequestParam(required = false) Integer page, ModelMap model) {\n List<Contract> contracts = contractService.findAll();\n PagedListHolder<Contract> pagedListHolder = new PagedListHolder<Contract>(contracts);\n pagedListHolder.setPageSize(10);\n model.addAttribute(\"maxPages\", pagedListHolder.getPageCount());\n model.addAttribute(\"page\", page);\n if(page == null || page < 1 || page > pagedListHolder.getPageCount()){\n pagedListHolder.setPage(0);\n model.addAttribute(\"contracts\", pagedListHolder.getPageList());\n }\n else if(page <= pagedListHolder.getPageCount()) {\n pagedListHolder.setPage(page-1);\n model.addAttribute(\"contracts\", pagedListHolder.getPageList());\n }\n// model.addAttribute(\"contracts\", contracts);\n model.addAttribute(\"loggedinuser\", getPrincipal());\n return \"contractslist\";\n }",
"Page<SeminarioDTO> findAll(Pageable pageable);",
"public List<LotReportRow> generateReportOnLotsByEntityTypeAndEntityId(String type, Integer entityId, int start, int numOfRows) throws MiddlewareQueryException;",
"Page<SpecimenStatusDTO> findAll(Pageable pageable);",
"public List<Income> getAllIncomeWithPage(int pageNow, int pageSize) {\n\t\tSession session=null;\n\t\tTransaction tx=null;\n\t\tList<Income> list=null;\n\t\ttry {\n\t\t\tsession=BuildSessionFactory.getCurrentSession();\n\t\t\ttx=session.beginTransaction();\n\t\t\tlist=incomeDao.findAllByPage(session, \"from Income\", pageNow, pageSize);\n\t\t\ttx.commit();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\tif(tx!=null){\n\t\t\t\ttx.rollback();\n\t\t\t\tthrow new UserException(e.getMessage());\n\t\t\t}\n\t\t}finally{\n\t\t\tif(session!=null && session.isOpen()){\n\t\t\t\tsession.close();\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}",
"public List<Transaction> getTransactions(String startdate, String enddate) {\r\n List<Transaction> transactionList = null;\r\n Session session = HibernateUtil.getSessionFactory().getCurrentSession();\r\n try {\r\n org.hibernate.Transaction hbtransaction = session.beginTransaction();\r\n Query q = session.createQuery (\"from finance.entity.Transaction trans WHERE (trans.effdate BETWEEN :startdate AND :enddate) AND trans.category.extra = false AND trans.deleted = false ORDER BY trans.effdate, trans.category.sortId\");\r\n q.setParameter(\"startdate\", java.sql.Date.valueOf(startdate));\r\n q.setParameter(\"enddate\", java.sql.Date.valueOf(enddate));\r\n transactionList = (List<Transaction>) q.list();\r\n hbtransaction.commit();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n return transactionList;\r\n }",
"@Transactional\r\n\tpublic List<Trip> getPageTripByCondition(Integer start, Integer maxCount) {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String getPage(String userInfo, String paramater) {\n\t\tDubboServiceResultInfo info=new DubboServiceResultInfo();\r\n\t\ttry {\r\n\t\t\tif(StringUtils.isNotBlank(paramater)){\r\n\t\t\t\tMap map=JacksonUtils.fromJson(paramater, HashMap.class);\r\n\t\t\t\tPage page=standardRoleService.getPage(map, (Integer)map.get(\"start\"), (Integer)map.get(\"limit\"));\r\n\t\t\t\tinfo.setResult(JacksonUtils.toJson(page));\r\n\t\t\t info.setSucess(true);\r\n\t\t\t info.setMsg(\"获取分页对象成功!\");\r\n\t\t\t}else{\r\n\t\t\t\tPage page=standardRoleService.getPage(new HashMap(), null, null);\r\n\t\t\t\tinfo.setResult(JacksonUtils.toJson(page));\r\n\t\t\t info.setSucess(true);\r\n\t\t\t info.setMsg(\"获取分页对象成功!\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\t log.error(\"获取分页对象失败!\"+e.getMessage());\r\n\t\t\t info.setSucess(false);\r\n\t\t\t info.setMsg(\"获取分页对象失败!\");\r\n\t\t\t info.setExceptionMsg(e.getMessage());\r\n\t\t}\r\n\t\treturn JacksonUtils.toJson(info);\r\n\t}",
"Page<RequestOtherNiazsanjiDTO> findAll(Pageable pageable);",
"List<Commodity> selectAll(@Param(\"beginRow\") int beginRow,@Param(\"pageSize\") int pageSize);",
"public abstract Page<CustomerOrder> findAll(GlobalSearch globalSearch, Pageable pageable);",
"@GET(\"/sight/list_by_region\")\n\t\tvoid getSightsByRegion(@Query(\"region\") String region, @Query(\"type\") String type, @Query(\"offset\") int start, @Query(\"limit\") int limit, Callback<List<Long>> callback);",
"@RequestMapping(value=\"/generateanalysis\",method=RequestMethod.GET)\r\n\tpublic List<PaymentDetailsBean> transactionAnalysis(Date start, Date end){\r\n \r\n\t\treturn service.transactionAnalysis(start, end);\r\n\t}",
"public void callGetProfilePost(final BaseActivity activity, String filter, final int queryType, int limit, int offset) {\n String mOrderBy = \"CreatedAt DESC\";\r\n // DialogManager.showProgress(activity);\r\n activity.sysOut(\"API-TYPE: \" + \"GET\");\r\n activity.sysOut(\"API-OPERATION: \" + UrlUtils.BASE_URL + UrlUtils.POSTS + \"?filter=\" +\r\n filter + \"&related=\" + APIConstants.POST_FEED_RELATION + \"&order=\" + mOrderBy + \"&limit=\" + limit + \"&offset=\" + offset);\r\n RetrofitClient.getRetrofitInstance().getRetrofitApiInterface().callGetProfilePosts(filter, APIConstants.POST_FEED_RELATION, mOrderBy, limit, offset, true)\r\n .enqueue(new Callback<PostsModel>() {\r\n @Override\r\n public void onResponse(Call<PostsModel> call, Response<PostsModel> response) {\r\n if (response.isSuccessful()) {\r\n // DialogManager.hideProgress();\r\n Object mResponseObj = response.body();\r\n activity.retrofitOnResponse(mResponseObj, queryType);\r\n } else {\r\n activity.retrofitOnError(response.code(), response.message());\r\n }\r\n }\r\n\r\n @Override\r\n public void onFailure(Call<PostsModel> call, Throwable t) {\r\n // DialogManager.hideProgress();\r\n activity.retrofitOnFailure();\r\n }\r\n });\r\n\r\n }",
"public List<HCLFieldTransaction> getAllTransactionListService()\r\n\t\t\tthrows JsonProcessingException, MalformedURLException, IOException {\r\n\t\tlogger.info(\"Logger Name: getAllTransactionListService() :: \" + logger.getName());\r\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\r\n\t\tlogger.info(\"Open Bank API URL :: getTotalAmountbyTransactionType() :: \"\r\n\t\t\t\t+ TransactionConstant.THIRD_PARTY_REST_API);\r\n\t\tJsonNode root = mapper.readTree(new URL(TransactionConstant.THIRD_PARTY_REST_API));\r\n\r\n\t\tList<HCLFieldTransaction> transactionList = new ArrayList<HCLFieldTransaction>();\r\n\r\n\t\t/* Traversing Nested JSON node to publish the relevant data */\r\n\t\ttry {\r\n\t\t\tJsonNode transactionsNodes = root.path(\"transactions\");\r\n\r\n\t\t\tfor (JsonNode transactionsNode : transactionsNodes) {\r\n\r\n\t\t\t\tHCLFieldTransaction hclFieldTransaction = new HCLFieldTransaction();\r\n\t\t\t\thclFieldTransaction.setId(transactionsNode.path(\"id\").asText());\r\n\r\n\t\t\t\tJsonNode thisAccount_Node = transactionsNode.path(\"this_account\");\r\n\t\t\t\thclFieldTransaction.setAccountId(thisAccount_Node.path(\"id\").asText());\r\n\r\n\t\t\t\tJsonNode otherAccount_Node = transactionsNode.path(\"other_account\");\r\n\t\t\t\thclFieldTransaction.setCounterpartyAccount(otherAccount_Node.path(\"number\").asText());\r\n\r\n\t\t\t\tJsonNode otherAccount_holder_Node = otherAccount_Node.path(\"holder\");\r\n\t\t\t\thclFieldTransaction.setCounterpartyName(otherAccount_holder_Node.path(\"name\").asText());\r\n\t\t\t\tJsonNode metadata = otherAccount_Node.path(\"metadata\");\r\n\t\t\t\thclFieldTransaction.setCounterPartyLogoPath(metadata.path(\"open_corporates_URL\").asText());\r\n\r\n\t\t\t\tJsonNode details = transactionsNode.path(\"details\");\r\n\t\t\t\thclFieldTransaction.setTransactionType(details.path(\"type\").asText());\r\n\t\t\t\thclFieldTransaction.setDescription(details.path(\"description\").asText());\r\n\r\n\t\t\t\tJsonNode value = details.path(\"value\");\r\n\t\t\t\thclFieldTransaction.setInstructedAmount(value.path(\"amount\").asDouble());\r\n\r\n\t\t\t\thclFieldTransaction.setInstructedCurrency(value.path(\"currency\").asText());\r\n\r\n\t\t\t\thclFieldTransaction.setTransactionAmount(value.path(\"amount\").asDouble());\r\n\t\t\t\thclFieldTransaction.setTransactionCurrency(value.path(\"currency\").asText());\r\n\t\t\t\tlogger.debug(\"Transaction Field Row Value:: \" + hclFieldTransaction.toString());\r\n\r\n\t\t\t\t/* Adding all transaction list into one ArrayList */\r\n\t\t\t\ttransactionList.add(hclFieldTransaction);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"Exception : getAllTransactionListService() :: \", e);\r\n\t\t}\r\n\t\tlogger.info(\r\n\t\t\t\t\"Return value from service layer :: getAllTransactionListService() :: \" + transactionList.toString());\r\n\t\treturn transactionList;\r\n\t}",
"@PostMapping(\"/J314Authorities.pag\")\n\t@Timed\n\t\n\tpublic ResultExt< Page< J314AuthorityPoj >> getAllPag(HttpServletRequest request,HttpServletResponse response, @Valid @RequestBody J314AuthorityCritPaged pag)\n\t{\n\t\t\n\t\tString params=UtilParams.paramsToString(\"J314AuthorityCritPaged\",pag);\n\n\t\tContexto ctx = Contexto.init();\n\t\tctx.put(Contexto.REQUEST,request);\n\t\tctx.put(Contexto.RESPONSE,response);\n\t\tctx.put(Contexto.CLAVE_SEGURIDAD,\"REST_ENTITY_J314AUTHORITY_GETALLPAG\");\n\t\tctx.put(Contexto.URL_SOLICITADA,\"/J314Authorities.pag\");\n\t\tResult< Page< J314AuthorityPoj >> res=new Result<>();\n\t\tif (log.isInfoEnabled()) log.info(\"Entrada en REST POST:getAllPag(\"+params+\")\"+params);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tif(!verificaPermisos(\"REST_ENTITY_J314AUTHORITY_GETALLPAG\"))\n\t\t\t{\n\t\t\t\tres.addError(new ErrorSinPermiso(\"REST_ENTITY_J314AUTHORITY_GETALLPAG\",\"/J314Authorities.pag\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tparams=UtilParams.paramsToString(\"J314AuthorityCritPaged\",pag);\n\t\t\t\tif (log.isInfoEnabled()) log.info(\"Verificado en REST POST:getAllPag(\"+params+\")\"+params);\n\n\t\t\t\tJ314AuthorityCritPaged pag_ = pag;\n\n\t\t\t\tResult< Page< J314Authority > > res_=service.findAll(pag_);\n\t\t\t\tres.setInfoEWI(res_);\n\n\t\t\t\tres.setData(J314AuthorityPoj.toPOJOPage(res_.getData()));\n\n\t\t\t}\n\t\t\taddTiempoSesion();\n\t\t}\tcatch(Exception e)\n\t\t{\n\t\t\tres.addError(new ErrorGeneral(e));\n\t\t\tif (log.isErrorEnabled()) log.error(\"Error en REST POST:getAllPag(\"+params+\"). Excepcion:\"+UtilException.printStackTrace(e));\n\t\t}\n\t\tif (log.isInfoEnabled()) log.info(\"Salida de REST POST:getAllPag(\"+params+\"). Resultado:\"+res.toString());\n\n\t\tResultExt< Page< J314AuthorityPoj > > resFin=new ResultExt<>(res,ctx.getAs(\"ticketStr\"));\n\t\tContexto.close();\n\t\treturn resFin;\n\t}",
"public Page<AccountDTO> findAllByEmail(String gender, Pageable pageable);",
"public interface VaccinePurchaseRecordReadService {\n /**\n * 查询 采购中心-疫苗购置 单据 单条\n *\n * @param id 单据id\n * @return VaccinePurchaseRecord对象\n */\n Response<VaccinePurchaseRecord> findById(Long id);\n\n /**\n * @param id 主 键\n * @return 状态\n */\n Response<Map<String, Object>> findStatusById(Long id);\n\n /**\n * 分页查询 采购中心-疫苗购置 单据 -- 养殖端\n *\n * @param pageNo 页码\n * @param pageSize 每页多少条\n * @param status 参数\n * @return Paging<VaccinePurchaseRecord>\n */\n Response<Paging<VaccinePurchaseRecord>> pagingVaccinePurchaseRecord(Integer pageNo, Integer pageSize,Long breedFactoryId, Integer status);\n\n /**\n * 根据从日期到日期和养殖场名称查看防疫中心5项纪录的列表\n */\n\n Response<Paging<VaccinePurchaseRecord>> pagingVaccinePurchaseRecordGqv(Integer pageNo, Integer pageSize, String factoryName, Date fromDate, Date toDate);\n Response<Paging<VaccinePurchaseRecord>> pagingVaccinePurchaseRecordGqv(Integer pageNo, Integer pageSize,Map map);\n\n Response<Paging<VaccinePurchaseRecord>> pagingVaccinePurchaseRecordGqv(Integer pageNo, Integer pageSize, Long breedFactoryId,Integer breedType, Date fromDate, Date toDate);\n\n\n}",
"@GetMapping(\"/_search/payments\")\n @Timed\n public ResponseEntity<List<PaymentDTO>> searchPayments(@RequestParam String query, Pageable pageable) {\n log.debug(\"REST request to search for a page of Payments for query {}\", query);\n Page<PaymentDTO> page = paymentQueryService.search(query, pageable);\n HttpHeaders headers = PaginationUtil.generateSearchPaginationHttpHeaders(query, page, \"/api/_search/payments\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }",
"@PostMapping(\"/view-policies/page\")\n @Timed\n public ResponseEntity<ViewPolicyDT> getAllViewPolicies(@RequestBody DatatablesRequest datatablesRequest) {\n log.debug(\"REST request to get all ViewPolicies\");\n ViewPolicyDT dt = new ViewPolicyDT();\n dt.setRecordsFiltered(viewPolicyService.getCountPoliciesWithFiltter(datatablesRequest.getSearchValue()));\n dt.setRecordsTotal(viewPolicyService.getCountPolicies());\n\n try {\n final Integer page = new Double(Math.ceil(datatablesRequest.getStart() / datatablesRequest.getLength())).intValue();\n final PageRequest pr = new PageRequest(page, datatablesRequest.getLength());\n List<ViewPolicyDTO> dtos = viewPolicyService.findAll(datatablesRequest.getSearchValue(), pr).getContent();\n if(CollectionUtils.isNotEmpty(dtos)) {\n dt.setData(dtos);\n return ResponseEntity.ok().body(dt);\n } else {\n return ResponseEntity.ok().body(dt);\n }\n \n } catch (Exception e) {\n log.error(\"Erreur lors de la pagination\");\n return new ResponseEntity<>(HttpStatus.NOT_FOUND);\n }\n\n }",
"public Page<LearningType> findAll(Pageable pageable);",
"PaginatedSearchResponseModel findAllPostsForType(String type, Pageable page);",
"@Override\n public BaseListDto<GoodsNameDto> selectPage(Map<String, Object> params) throws Exception {\n int currentPage = Integer.parseInt(params.getOrDefault(\"currentPage\", 1).toString());\n int pageSize = Integer.parseInt(params.getOrDefault(\"pageSize\", 10).toString());\n QueryWrapper<GoodsName> qw = new QueryWrapper<>();\n DaoUtil.parseGenericQueryWrapper(qw, params, GoodsName.class);\n IPage<GoodsName> pages = goodsNameMapper.selectPage((Page<GoodsName>) DaoUtil.queryPage(currentPage, pageSize), qw);\n List<GoodsNameDto> list = pages.getRecords().stream().map(entity -> entity2Dto(entity)).collect(Collectors.toList());\n return new BaseListDto<GoodsNameDto>(list, (int) pages.getTotal());\n }",
"List<CustomerInformation> queryListByCustomer(Integer page, Integer rows, CustomerInformation cust);",
"@Override\n\tpublic List<PendingTransaction> getAllTransactionsByType(String transactionType) {\n\t\treturn null;\n\t}"
] |
[
"0.7160284",
"0.61342114",
"0.6027253",
"0.60142547",
"0.6008987",
"0.5859295",
"0.57943374",
"0.57307434",
"0.57193667",
"0.5713425",
"0.5702201",
"0.56737757",
"0.5612348",
"0.56118613",
"0.56050235",
"0.5571055",
"0.5565149",
"0.5557887",
"0.5557085",
"0.5552736",
"0.54814416",
"0.54558146",
"0.5445476",
"0.5418487",
"0.53876615",
"0.5386586",
"0.5377951",
"0.53671366",
"0.53630334",
"0.5356911",
"0.5355324",
"0.53494567",
"0.5343216",
"0.53386897",
"0.53294605",
"0.53268695",
"0.5320043",
"0.53162473",
"0.531425",
"0.5300752",
"0.5295119",
"0.52880913",
"0.5284543",
"0.5281337",
"0.52722615",
"0.5269376",
"0.5261272",
"0.52528834",
"0.5241419",
"0.5238187",
"0.5229347",
"0.5228162",
"0.52236515",
"0.52203375",
"0.5216671",
"0.5211451",
"0.52074784",
"0.5204287",
"0.52002156",
"0.51982266",
"0.5194754",
"0.51917",
"0.5184865",
"0.51782113",
"0.5160909",
"0.5159256",
"0.5155439",
"0.51487815",
"0.51370585",
"0.51338893",
"0.5133168",
"0.5130212",
"0.51274085",
"0.5123746",
"0.5122194",
"0.5116342",
"0.50961834",
"0.5095211",
"0.5090443",
"0.5058241",
"0.50578845",
"0.5053319",
"0.5043301",
"0.5041868",
"0.5037733",
"0.503739",
"0.50337887",
"0.50315064",
"0.5025312",
"0.50204206",
"0.50156856",
"0.5004786",
"0.5003924",
"0.5001475",
"0.49978846",
"0.49915275",
"0.49768096",
"0.4976548",
"0.4971065",
"0.4970092"
] |
0.717142
|
0
|
Returns the total sum for transactions of a specified type, which were made between two dates (inclusive). Allowed transaction types (caseinsensitive): "INCOME" "EXPENSE" "TRANSFER"
|
@GetMapping("/total-sum-between-dates")
public Double getTotalTransactionsSumBetweenDatesByType(
@RequestParam String type,
@RequestParam @DateTimeFormat(pattern = "dd.MM.yyyy") Date startDate,
@RequestParam @DateTimeFormat(pattern = "dd.MM.yyyy") Date endDate)
{
Double totalSum = null;
try {
totalSum = transactionService.getTotalTransactionsSumBetweenDatesByType(type, startDate, endDate);
}
catch (InvalidDataException e) {
String exceptionMessage = e.getMessage();
throw new InvalidDataException(exceptionMessage);
}
return totalSum;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@GetMapping(\"/total-sum\")\n\tpublic Double getTotalTransactionsSumByType(@RequestParam String type) {\n\t\tDouble totalSum = null;\n\t\t\n\t\ttry {\n\t\t\ttotalSum = transactionService.getTotalTransactionsSumByType(type);\n\t\t}\n\t\tcatch (InvalidDataException e) {\n\t\t\tString exceptionMessage = e.getMessage();\n\t\t\tthrow new InvalidDataException(exceptionMessage);\n\t\t}\n\t\t\n\t\treturn totalSum;\n\t}",
"@GetMapping(\"/between-dates\")\n\tpublic Page<Transaction> getTransactionsBetweenDatesByTypeAndPageable(\n\t\t@RequestParam String type,\n\t\t@RequestParam @DateTimeFormat(pattern = \"dd.MM.yyyy\") Date startDate,\n\t\t@RequestParam @DateTimeFormat(pattern = \"dd.MM.yyyy\") Date endDate,\n\t\tPageable pageable) \n\t{\n\t\tPage<Transaction> pageOfTransactions = null;\n\t\t\n\t\ttry {\n\t\t\tpageOfTransactions = transactionService.getTransactionsBetweenDatesByTypeAndPageable(type, startDate, endDate, pageable);\n\t\t}\n\t\tcatch (InvalidDataException e) {\n\t\t\tString exceptionMessage = e.getMessage();\n\t\t\tthrow new InvalidDataException(exceptionMessage);\n\t\t}\n\t\t\n\t\treturn pageOfTransactions;\n\t}",
"public static List<Transaction> getTransactionsFilteredByDate(String startDate, String endDate,\r\n\t\t\tTransactionType transactionType) {\r\n\t\tList<Transaction> transactions = new ArrayList<>();\r\n\t\tdbConnect();\r\n\t\tStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\t// SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\t// Date start = (Date) sdf.parse(startDate);\r\n\t\t// Date end = (Date) sdf.parse(endDate);\r\n\t\tfinal String OPEN_TRANSACTIONS_FROM_DB;\r\n\t\tif (transactionType == TransactionType.PURCHASE)\r\n\t\t\tOPEN_TRANSACTIONS_FROM_DB = \"SELECT * FROM purchase WHERE DATE(purchase_date) >= DATE('\" + startDate\r\n\t\t\t\t\t+ \"') AND DATE(purchase_date) <= DATE('\" + endDate + \"') ORDER BY purchase_id DESC\";\r\n\t\telse\r\n\t\t\tOPEN_TRANSACTIONS_FROM_DB = \"SELECT * FROM sales WHERE DATE(sales_date) >= DATE('\" + startDate\r\n\t\t\t\t\t+ \"') AND DATE(sales_date) <= DATE('\" + endDate + \"') ORDER BY sales_id DESC\";\r\n\t\ttry {\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\trs = stmt.executeQuery(OPEN_TRANSACTIONS_FROM_DB);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tint transactionNumber = rs.getInt(1);\r\n\t\t\t\tString transactionDate = rs.getString(2);\r\n\t\t\t\tString nameOfClient = getClient(rs.getInt(3), transactionType).getName();\r\n\t\t\t\tdouble cashGiven = rs.getDouble(4);\r\n\t\t\t\tObservableList<Product> productList = getProductTransaction(rs.getInt(1), transactionType);\r\n\r\n\t\t\t\ttransactions.add(new Transaction(transactionNumber, transactionDate, nameOfClient, cashGiven, cashGiven,\r\n\t\t\t\t\t\tproductList.size(), productList));\r\n\t\t\t}\r\n\t\t\tstmt.close();\r\n\t\t\trs.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn transactions;\r\n\t}",
"public Double getTotalAmountbyTransactionType(String transactionType) throws JsonProcessingException, IOException {\r\n\r\n\t\tlogger.info(\"Logger Name: getTotalAmountbyTransactionType() :: \" + logger.getName());\r\n\t\tlogger.debug(\"Transaction Type : getTotalAmountbyTransactionType() :: \" + transactionType);\r\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\t\tDouble totalAmount = 0.00;\r\n\r\n\t\tlogger.info(\"Open Bank API URL :: getTotalAmountbyTransactionType() :: \"\r\n\t\t\t\t+ TransactionConstant.THIRD_PARTY_REST_API);\r\n\t\tJsonNode root = mapper.readTree(new URL(TransactionConstant.THIRD_PARTY_REST_API));\r\n\r\n\t\t/* Traversing Nested JSON node to get/add the total amount */\r\n\t\ttry {\r\n\t\t\tJsonNode transactionsNodes = root.path(\"transactions\");\r\n\t\t\tfor (JsonNode transactionsNode : transactionsNodes) {\r\n\t\t\t\tJsonNode details = transactionsNode.path(\"details\");\r\n\r\n\t\t\t\t/* When transactionType is null or empty */\r\n\t\t\t\tif (transactionType == null && details.path(\"type\").isNull() == true) {\r\n\t\t\t\t\tJsonNode value = details.path(\"value\");\r\n\t\t\t\t\tDouble tempAmount = value.path(\"amount\").asDouble();\r\n\t\t\t\t\ttotalAmount = totalAmount + tempAmount;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* When transactionType is not null or empty */\r\n\t\t\t\telse if (transactionType != null) {\r\n\r\n\t\t\t\t\tif ((details.path(\"type\").asText()).equalsIgnoreCase(transactionType.trim())) {\r\n\t\t\t\t\t\tJsonNode value = details.path(\"value\");\r\n\t\t\t\t\t\tDouble tempAmount = value.path(\"amount\").asDouble();\r\n\t\t\t\t\t\ttotalAmount = totalAmount + tempAmount;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"Exception : getTotalAmountbyTransactionType() :: \", e);\r\n\t\t}\r\n\t\tlogger.info(\"Response from Service layer :: Total Amount: getTotalAmountbyTransactionType() :: \" + totalAmount);\r\n\t\treturn totalAmount;\r\n\r\n\t}",
"public int getTotalRate(CustomerType customerType, LocalDate initialDate, LocalDate endDate) {\n return Stream.iterate(initialDate, date -> date.plusDays(1))\n .limit(endDate.getDayOfMonth() - initialDate.getDayOfMonth() + 1)\n .map(date -> {\n if (date.getDayOfWeek().equals(DayOfWeek.SATURDAY) || date.getDayOfWeek().equals(DayOfWeek.SUNDAY))\n return this.rate.get(customerType).getWeekendRate();\n return this.rate.get(customerType).getWeekdayRate();\n })\n .reduce((total, next) -> total + next).get();\n }",
"public List<HCLFieldTransaction> getTransactionbyType(String transactionType)\r\n\t\t\tthrows JsonProcessingException, IOException {\r\n\r\n\t\tlogger.info(\"Logger Name: getTransactionbyType() :: \" + logger.getName());\r\n\t\tlogger.debug(\"Transaction Type : getTransactionbyType() :: \" + transactionType);\r\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\r\n\t\tlogger.info(\"Open Bank API URL :: getTotalAmountbyTransactionType() :: \"\r\n\t\t\t\t+ TransactionConstant.THIRD_PARTY_REST_API);\r\n\t\tJsonNode root = mapper.readTree(new URL(TransactionConstant.THIRD_PARTY_REST_API));\r\n\r\n\t\tList<HCLFieldTransaction> transactionList = new ArrayList<HCLFieldTransaction>();\r\n\r\n\t\t/* Traversing Nested JSON node to publish the relevant data */\r\n\t\ttry {\r\n\t\t\tJsonNode transactionsNodes = root.path(\"transactions\");\r\n\r\n\t\t\tfor (JsonNode transactionsNode : transactionsNodes) {\r\n\r\n\t\t\t\tHCLFieldTransaction hclFieldTransaction = new HCLFieldTransaction();\r\n\t\t\t\tJsonNode details = transactionsNode.path(\"details\");\r\n\t\t\t\thclFieldTransaction.setTransactionType(details.path(\"type\").asText());\r\n\r\n\t\t\t\t/* When transactionType is null or empty */\r\n\t\t\t\tif (transactionType == null && details.path(\"type\").isNull() == true) {\r\n\t\t\t\t\thclFieldTransaction.setId(transactionsNode.path(\"id\").asText());\r\n\r\n\t\t\t\t\tJsonNode thisAccount_Node = transactionsNode.path(\"this_account\");\r\n\t\t\t\t\thclFieldTransaction.setAccountId(thisAccount_Node.path(\"id\").asText());\r\n\r\n\t\t\t\t\tJsonNode otherAccount_Node = transactionsNode.path(\"other_account\");\r\n\t\t\t\t\thclFieldTransaction.setCounterpartyAccount(otherAccount_Node.path(\"number\").asText());\r\n\r\n\t\t\t\t\tJsonNode otherAccount_holder_Node = otherAccount_Node.path(\"holder\");\r\n\t\t\t\t\thclFieldTransaction.setCounterpartyName(otherAccount_holder_Node.path(\"name\").asText());\r\n\t\t\t\t\tJsonNode metadata = otherAccount_Node.path(\"metadata\");\r\n\t\t\t\t\thclFieldTransaction.setCounterPartyLogoPath(metadata.path(\"open_corporates_URL\").asText());\r\n\r\n\t\t\t\t\thclFieldTransaction.setTransactionType(details.path(\"type\").asText());\r\n\t\t\t\t\thclFieldTransaction.setDescription(details.path(\"description\").asText());\r\n\r\n\t\t\t\t\tJsonNode value = details.path(\"value\");\r\n\t\t\t\t\thclFieldTransaction.setInstructedAmount(value.path(\"amount\").asDouble());\r\n\r\n\t\t\t\t\thclFieldTransaction.setInstructedCurrency(value.path(\"currency\").asText());\r\n\r\n\t\t\t\t\thclFieldTransaction.setTransactionAmount(value.path(\"amount\").asDouble());\r\n\t\t\t\t\thclFieldTransaction.setTransactionCurrency(value.path(\"currency\").asText());\r\n\t\t\t\t\tlogger.debug(\"Transaction Field Row Value:: \" + hclFieldTransaction.toString());\r\n\r\n\t\t\t\t\t/* Adding specific type of transaction list into one ArrayList */\r\n\t\t\t\t\ttransactionList.add(hclFieldTransaction);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* When transactionType is not null or empty */\r\n\t\t\t\telse if (transactionType != null) {\r\n\r\n\t\t\t\t\tif (hclFieldTransaction.getTransactionType().equalsIgnoreCase(transactionType.trim())) {\r\n\r\n\t\t\t\t\t\tlogger.debug(\"Transaction Type :: \" + transactionType);\r\n\t\t\t\t\t\thclFieldTransaction.setId(transactionsNode.path(\"id\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode thisAccount_Node = transactionsNode.path(\"this_account\");\r\n\t\t\t\t\t\thclFieldTransaction.setAccountId(thisAccount_Node.path(\"id\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode otherAccount_Node = transactionsNode.path(\"other_account\");\r\n\t\t\t\t\t\thclFieldTransaction.setCounterpartyAccount(otherAccount_Node.path(\"number\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode otherAccount_holder_Node = otherAccount_Node.path(\"holder\");\r\n\t\t\t\t\t\thclFieldTransaction.setCounterpartyName(otherAccount_holder_Node.path(\"name\").asText());\r\n\t\t\t\t\t\tJsonNode metadata = otherAccount_Node.path(\"metadata\");\r\n\t\t\t\t\t\thclFieldTransaction.setCounterPartyLogoPath(metadata.path(\"open_corporates_URL\").asText());\r\n\r\n\t\t\t\t\t\thclFieldTransaction.setTransactionType(details.path(\"type\").asText());\r\n\t\t\t\t\t\thclFieldTransaction.setDescription(details.path(\"description\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode value = details.path(\"value\");\r\n\t\t\t\t\t\thclFieldTransaction.setInstructedAmount(value.path(\"amount\").asDouble());\r\n\r\n\t\t\t\t\t\thclFieldTransaction.setInstructedCurrency(value.path(\"currency\").asText());\r\n\r\n\t\t\t\t\t\thclFieldTransaction.setTransactionAmount(value.path(\"amount\").asDouble());\r\n\t\t\t\t\t\thclFieldTransaction.setTransactionCurrency(value.path(\"currency\").asText());\r\n\t\t\t\t\t\tlogger.debug(\"Transaction Field Row Value:: \" + hclFieldTransaction.toString());\r\n\r\n\t\t\t\t\t\t/* Adding specific type of transaction list into one ArrayList */\r\n\t\t\t\t\t\ttransactionList.add(hclFieldTransaction);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"Exception : getTransactionbyType() :: \", e);\r\n\t\t}\r\n\t\tlogger.info(\"Return value from service layer:: getTransactionbyType() :: \" + transactionList.toString());\r\n\t\treturn transactionList;\r\n\r\n\t}",
"public static int getSum(String type) {\n\t\tVector<BookInfo> tmp = getAllBook();\n\t\tint result = 0;\n\n\t\tfor (BookInfo b : tmp) {\n\t\t\tif ( b.getBookID().substring(0, 2).equals(type) ) {\n\t\t\t\tresult += 1;\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}",
"public void addToStatement(String account, double amount, String transactionType, String accountType) {\n\t\tList<String> myList = getStatement();\n\t\tDecimalFormat df = new DecimalFormat(\".##\");\n\t\tmyList.add(LocalDate.now() +\"\\t\"+ account +\" \\t\"+ df.format(amount) +\" \\t\"+ df.format(balance) +\" \\t\"+ transactionType +\n\t\t\t\t\" \\t\" + accountType);\n\t}",
"private double getIncomeAmount(long startTimestamp, long endTimestamp) {\n Points p = getTransactions(startTimestamp, endTimestamp);\n if (p.x == -1 && p.y == -1)\n return 0;\n double total = 0;\n for (int i = p.x; i <= p.y; i++) {\n if (transactionList.get(i).transactionType == 1)\n total += transactionList.get(i).transactionAmount;\n }\n return total;\n }",
"@Override\r\n\tpublic double getTotalRevenueBetween(Date fromDate, Date toDate) {\r\n\t\t\r\n\t\t//get invoice details for sales in given period\r\n\t\tList<Invoice> invoiceDetails=invoiceService.getInvoiceDetailsBetweenDates(fromDate, toDate);\r\n\t\t//get product return details, if present, for given period\r\n\t\tList<Return> returnDetails=returnService.getAllReturnDetails();\r\n\t\tdouble totalRevenue=0;\r\n\t\tboolean flag=false;\r\n\t\t\r\n\t\t//for every sale, see if the order was returned\r\n\t\tfor(Invoice invoice:invoiceDetails) {\r\n\t\t\tfor(Return return1:returnDetails) {\r\n\t\t\t\t\r\n\t\t\t\t//if order returned, avoid the revenue for this order\r\n\t\t\t\tif(invoice.getOrder().equals(return1.getOrder()))\r\n\t\t\t\t{\tflag=true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//else, add to revenue\r\n\t\t\tif(flag==false)\r\n\t\t\t\ttotalRevenue+=invoice.getDiscountedPrice();\r\n\t\t}\r\n\t\t\r\n\t\treturn totalRevenue;\r\n\t}",
"public Double calculateTotal(String type, Double price, Double numberOfCoins, Double fees) {\n\t\tif (type == \"Kauf\") {\n\t\t\treturn (price * numberOfCoins) + fees;\n\t\t} else {\n\t\t\treturn ((price * numberOfCoins) + fees) * -1;\n\t\t}\n\t}",
"public void deposit(String accountType, double amount) {\r\n\t\tif(accountType.equals(\"savings\")) {\r\n\t\t\tthis.savingsBalance += amount;\r\n\t\t\ttotalAmount += amount;\r\n\t\t}\r\n\t\telse if(accountType.equals(\"checking\")) {\r\n\t\t\tthis.checkingBalance += amount;\r\n\t\t\ttotalAmount += amount;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Deposit failed\");\r\n\t\t}\r\n\t}",
"public double MakeReserve(String type, LocalDate indate, LocalDate outdate)\r\n {\n if (Days.daysBetween(lastupdate, outdate).getDays() > 30)\r\n return 0.0;\r\n //Check if checkin date is before today\r\n if (Days.daysBetween(lastupdate, indate).getDays() < 0)\r\n return 0.0;\r\n \r\n int first = Days.daysBetween(lastupdate, indate).getDays();\r\n int last = Days.daysBetween(lastupdate, outdate).getDays();\r\n for (int i = 0; i < roomtypes.size(); i++)\r\n {\r\n boolean ispossible = false;\r\n if (type.equals(roomtypes.get(i).roomname))\r\n {\r\n ispossible = true;\r\n for (int j = first; j < last; j++)\r\n {\r\n if (roomtypes.get(i).reserved[j] >= roomtypes.get(i).roomcount)\r\n ispossible = false;\r\n } \r\n }\r\n if (ispossible)\r\n {\r\n for (int j = first; j < last; j++)\r\n roomtypes.get(i).reserved[j]++;\r\n return roomtypes.get(i).roomlist.get(0).getPrice();\r\n }\r\n }\r\n return 0.0;\r\n }",
"@GetMapping(params = \"type\")\n\tpublic Page<Transaction> getTransactionsByTypeAndPageable(\n\t\t@RequestParam String type, \n\t\tPageable pageable) \n\t{\n\t\tPage<Transaction> pageOfTransactions = null;\n\t\t\n\t\ttry {\n\t\t\tpageOfTransactions = transactionService.getTransactionsByTypeAndPageable(type, pageable);\n\t\t}\n\t\tcatch (InvalidDataException e) {\n\t\t\tString exceptionMessage = e.getMessage();\n\t\t\tthrow new InvalidDataException(exceptionMessage);\n\t\t}\n\t\t\n\t\treturn pageOfTransactions;\n\t}",
"private List<DailyRecord> getDaily(int year, Month month, String type) throws SQLException {\n\t\tLocalDate from = LocalDate.of(year, month, 1);\n\t\tLocalDate to = LocalDate.of(year, month, month.length(from.isLeapYear()));\n\t\ttry (PreparedStatement statement = conn.prepareStatement(\"select date, sum(Amount) from transaction where date between ? and ? and type=? group by date\" )) {\n\t\t\tstatement.setDate(1, Date.valueOf(from));\n\t\t\tstatement.setDate(2, Date.valueOf(to));\n\t\t\tstatement.setString(3, type);\n\t\t\ttry (ResultSet resultSet = statement.executeQuery()) {\n\t\t\t\tArrayList<DailyRecord> list = new ArrayList<>();\n\t\t\t\twhile (resultSet.next()) {\n\t\t\t\t\tLocalDate resultDate = resultSet.getDate(1).toLocalDate();\n\t\t\t\t\tint day = resultDate.getDayOfMonth();\n\t\t\t\t\tDayOfWeek weekDay = resultDate.getDayOfWeek();\n\t\t\t\t\tdouble amount = resultSet.getDouble(2);\t\t\t\t\t\n\t\t\t\t\tlist.add(new DailyRecord(amount, day, weekDay));\t\t\t\n\t\t\t\t}\n\t\t\t\treturn list;\n\t\t\t}\n\t\t}\n\t}",
"BigDecimal getSumOfTransactions(StatisticalDTO dto) throws DaoException;",
"public double getIncome(LocalDate from, LocalDate to) throws SQLException {\n\t\ttry (PreparedStatement statement = conn.prepareStatement(\"select sum(Amount) from transaction where date between ? and ? and type=\\\"Income\\\"\")) {\n\t\t\tstatement.setDate(1, Date.valueOf(from));\n\t\t\tstatement.setDate(2, Date.valueOf(to));\n\t\t\ttry (ResultSet resultSet = statement.executeQuery()) {\n\t\t\t\tif (resultSet.next()) {\n\t\t\t\t\treturn resultSet.getDouble(1);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t}",
"List<TypeSumDto> somaValoresPorTipo(TransactionType transactionType, Integer mes);",
"private double getExpenditureAmount(long startTimestamp, long endTimestamp) {\n Points p = getTransactions(startTimestamp, endTimestamp);\n if (p.x == -1 && p.y == -1)\n return 0;\n double total = 0;\n for (int i = p.x; i <= p.y; i++) {\n if (transactionList.get(i).transactionType == 0)\n total += transactionList.get(i).transactionAmount;\n }\n return total;\n }",
"@Test\n public void transactionSum() {\n final Transaction transaction1 = new Transaction(\"774cedda\", State.CANCELED, 1000L, new Date());\n final Account account1 = new Account(\"1001\", 0L, Collections.singletonList(transaction1));\n final Transaction transaction2 = new Transaction(\"337868a7\", State.FINISHED, 8000L, new Date());\n final Transaction transaction3 = new Transaction(\"f8047f86\", State.CANCELED, 10000L, new Date());\n final Account account2 = new Account(\"1002\", 8000L, Arrays.asList(transaction2, transaction3));\n\n final long actual = calcSumOfCancelledTransOnNonEmptyAccounts(Arrays.asList(account1, account2));\n\n Assert.assertEquals(actual, 10_000L);\n }",
"public Double getTotalDiscount(java.sql.Timestamp transDate, java.sql.Timestamp eodDate, int storeCode, int... discountType) {\r\n\t\tString query = \"SELECT o.OR_NO, i.PROD_CODE, i.SELL_PRICE, i.QUANTITY from invoice_item i, invoice o, products_lu p \" +\r\n\t\t\"WHERE p.PROD_CODE = i.PROD_CODE\" +\r\n\t\t\" AND o.TRANS_DT >= ? AND o.TRANS_DT <= ? \" +\r\n\t\t\" AND i.OR_NO = o.OR_NO \" +\r\n\t\t\" AND o.STORE_CODE = i.STORE_CODE \" +\r\n\t\t\" AND o.STORE_CODE = ?\" +\r\n\t\t\" AND NOT EXISTS (SELECT 1 FROM INVOICE_SET s WHERE s.OR_NO = o.OR_NO) \";\r\n//\t\t\r\n\t\tif (discountType.length > 0) {\r\n\t\t\tquery += \" AND i.DISC_CODE = \" + discountType[0];\r\n\t\t}\r\n//\t\tString query = \"SELECT sum(d.DISC_RATE/100 *i.sell_price*i.quantity) FROM discount_lu d, invoice_item i, invoice o, products_lu p \" +\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\"WHERE p.PROD_CODE = i.PROD_CODE\" +\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\" AND d.DISC_NO = i.DISC_CODE\" +\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\" AND o.TRANS_DT >= ? AND o.TRANS_DT <= ? \" +\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\" AND i.OR_NO = o.OR_NO \" +\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\" AND o.STORE_CODE = ?\";\r\n\t\t\r\n\t\tPreparedStatement pquery;\r\n\t\tResultSet rs = null;\r\n\t\ttry {\r\n\t\t\tpquery = Main.getDBManager().getConnection().prepareStatement(query);\r\n\t\t\t\r\n\t\t\tpquery.setTimestamp(1, transDate);\r\n\t\t\tpquery.setTimestamp(2, eodDate);\r\n\t\t\tpquery.setInt(3, storeCode);\r\n\t\t\t\r\n\t\t\trs = pquery.executeQuery();\r\n\t\t\t\r\n\t\t\tDouble amount = 0.0d;\r\n\t\t\t\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tamount += (InvoiceItemService.getInstance().getDiscountAmount(rs.getLong(\"OR_NO\"),rs.getString(\"PROD_CODE\"))) * rs.getDouble(\"QUANTITY\");\r\n\t\t\t}\r\n\t\t\r\n\t\t\tlogger.debug(\"Total Discount: \"+amount);\r\n\t\t\treturn amount;\r\n\t\t} catch (SQLException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic Double getBookingsCount(TaxiType type, Date startDate, Date endDate) throws TaxiTypeDoesnotExistException {\n\t\treturn null;\n\t}",
"public Coin getBalance(BalanceType balanceType) {\n try {\n if (balanceType == BalanceType.AVAILABLE || balanceType == BalanceType.AVAILABLE_SPENDABLE) {\n List<TransactionOutput> candidates = calculateAllSpendCandidates(true, balanceType == BalanceType.AVAILABLE_SPENDABLE);\n CoinSelection selection = coinSelector.select(NetworkParameters.MAX_MONEY, candidates);\n return selection.valueGathered;\n } else if (balanceType == BalanceType.ESTIMATED || balanceType == BalanceType.ESTIMATED_SPENDABLE) {\n List<TransactionOutput> all = calculateAllSpendCandidates(false, balanceType == BalanceType.ESTIMATED_SPENDABLE);\n Coin value = Coin.ZERO;\n for (TransactionOutput out : all) value = value.add(out.getValue());\n return value;\n } else {\n throw new AssertionError(\"Unknown balance type\"); // Unreachable.\n }\n } finally {\n }\n }",
"public Double getSalesForPaymentTypeWithoutDiscount(int month, int day, int year, int storeCode, int paymentType) {\r\n\t\tResultSet rs = Main.getDBManager().executeQuery(\"SELECT SUM(p.AMT) FROM payment_item p \" +\r\n\t\t\t\t\" WHERE MONTH (p.TRANS_DT) = '\"+month+\r\n\t\t\t\t \"' && YEAR(p.TRANS_DT) = '\"+year+\r\n\t\t\t\t \"' && DAY(p.TRANS_DT) = '\"+day+\r\n\t\t\t\t \"' AND p.STORE_CODE = '\"+storeCode+\"'\"+\r\n\t\t\t\t \" AND p.PT_CODE = \" + paymentType);\r\n\t\t\r\n\t\t//logger.debug(\"SELECT SUM(i.SELL_PRICE) FROM invoice_item i, invoice o WHERE MONTH (o.TRANS_DT) = '\"+month+\"' && YEAR(o.TRANS_DT) = '\"+year+\"' && DAY(o.TRANS_DT) = '\"+day+\"' AND i.OR_NO = o.OR_NO AND o.STORE_CODE = '\"+storeCode+\"'\");\r\n\t\tDouble amt = 0.0d;\r\n\t\ttry {\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tamt = rs.getDouble(1);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tLoggerUtility.getInstance().logStackTrace(e);\r\n\t\t}\r\n\t\tif (paymentType == 1) {\r\n\t\t\tamt += getSalesForPaymentTypeWithoutDiscount(month, day, year, storeCode, 2);\r\n\t\t}\r\n\t\t\r\n//\t\tamt = amt / VatService.getVatRate();\r\n\t\tlogger.debug(\"PAYMENT TYPE=\" + paymentType + \" SALES: \"+amt);\r\n\t\treturn amt;\r\n\t}",
"Message getRevenueForType(String type);",
"TotalInvoiceAmountType getTotalInvoiceAmount();",
"public static List<Transaction> getTransactionsFilteredByClientName(String clientName,\r\n\t\t\tTransactionType transactionType) {\r\n\t\tList<Transaction> transactions = new ArrayList<>();\r\n\t\tdbConnect();\r\n\t\tStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tint clientId = getClientId(clientName, transactionType);\r\n\t\tfinal String OPEN_TRANSACTIONS_FROM_DB;\r\n\t\tif (transactionType == TransactionType.PURCHASE)\r\n\t\t\tOPEN_TRANSACTIONS_FROM_DB = \"SELECT * FROM purchase WHERE purchase_client_id = \" + clientId\r\n\t\t\t\t\t+ \" ORDER BY purchase_id DESC\";\r\n\t\telse\r\n\t\t\tOPEN_TRANSACTIONS_FROM_DB = \"SELECT * FROM sales WHERE sales_client_id = \" + clientId\r\n\t\t\t\t\t+ \" ORDER BY sales_id DESC\";\r\n\t\ttry {\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\trs = stmt.executeQuery(OPEN_TRANSACTIONS_FROM_DB);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tint transactionNumber = rs.getInt(1);\r\n\t\t\t\tString transactionDate = rs.getString(2);\r\n\t\t\t\tString nameOfClient = getClient(rs.getInt(3), transactionType).getName();\r\n\t\t\t\tdouble cashGiven = rs.getDouble(4);\r\n\t\t\t\tObservableList<Product> productList = getProductTransaction(rs.getInt(1), transactionType);\r\n\r\n\t\t\t\ttransactions.add(new Transaction(transactionNumber, transactionDate, nameOfClient, cashGiven, cashGiven,\r\n\t\t\t\t\t\tproductList.size(), productList));\r\n\t\t\t}\r\n\t\t\tstmt.close();\r\n\t\t\trs.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn transactions;\r\n\t}",
"private int sum(AFormula o1){\n\t\t\t\t\n\t\t\t\treturn o1.calculate(customerType, weekdayCount, weekendCount);\n\t\t\t\t\n\t\t\t}",
"RecordAmountTypeEnum getSummaryAmountType();",
"public Map<LocalDate,Double> getTradeValuesByDate(List<Trade> tradeList,String tradeType) {\n\t\t\r\n\t\tMap<LocalDate,Double> tradesValueMap= new TreeMap();\r\n\t\tfor(Trade t: tradeList){\r\n\t\t\tif (t.getInstructionType().equalsIgnoreCase(tradeType)) {\r\n\t\t\t\tLocalDate dateKey = t.getSettlementDate();\r\n\t\t\t\tdouble tradeAmount = t.getTotalAmount();\r\n\t\t\t\tif (tradesValueMap.get(dateKey) != null) {\r\n\t\t\t\t\ttradeAmount += tradesValueMap.get(dateKey);\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttradesValueMap.put(dateKey, tradeAmount);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn tradesValueMap;\r\n\t}",
"public double getExpense(LocalDate from, LocalDate to) throws SQLException {\n\t\ttry (PreparedStatement statement = conn.prepareStatement(\"select sum(Amount) from transaction where date between ? and ? and type=\\\"Expense\\\"\")) {\n\t\t\tstatement.setDate(1, Date.valueOf(from));\n\t\t\tstatement.setDate(2, Date.valueOf(to));\n\t\t\ttry (ResultSet resultSet = statement.executeQuery()) {\n\t\t\t\tif (resultSet.next()) {\n\t\t\t\t\treturn resultSet.getDouble(1);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t}",
"@Query(value = \"SELECT sum(total_lkr) FROM receipt WHERE rec_date BETWEEN :Date1 and :Date2\", nativeQuery = true)\n\tBigDecimal TotalrevanuelastYear(@Param(\"Date1\") LocalDate Date1, @Param(\"Date2\") LocalDate Date2);",
"public static boolean checkRequestAmountLimit(String requestType, int clientID, double maxAmount, int range) throws SQLException\r\n {\r\n // calculate begginning date of range to check within\r\n LocalDate searchStart = LocalDate.now().minusMonths(range);\r\n \r\n Connection connection = DBConnection.getConnection();\r\n String query = \"select sum(amount) as total from scm.tcf_requestassist where \" +\r\n \"clientid = ? and datedisbursed > ? and assistanceid in \" +\r\n \"(select assistanceid from scm.tcf_assistance where description = ?)\";\r\n\r\n \r\n PreparedStatement ps = connection.prepareStatement(query); \r\n \r\n ps.setInt(1, clientID); \r\n \r\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"yyyy-MM-dd\");\r\n ps.setString(2, searchStart.format(dtf));\r\n \r\n mapDbNames(); \r\n String desc = dbMap.get(requestType);\r\n ps.setString(3, desc); \r\n \r\n ResultSet rs = ps.executeQuery();\r\n\r\n if (rs.next()) \r\n {\r\n double total = rs.getDouble(\"total\"); \r\n closeResources(ps, rs, connection);\r\n return total < maxAmount;\r\n }\r\n else \r\n {\r\n closeResources(ps, rs, connection);\r\n throw new SQLException();\r\n }\r\n }",
"@Override\r\n\t@Transactional\r\n\tpublic Integer TotalEventuales(int tipo, int estado) {\n\t\treturn dao.TotalEventuales(tipo, estado);\r\n\t}",
"public AccountTransactionDTO(String accountNumber, Date transactionTs, TransactionType type, BigDecimal amount) {\n\t\tthis.accountNumber = accountNumber;\n\t\tthis.transactionTs = transactionTs;\n\t\tthis.type = type;\n\t\tthis.amount = amount;\n\t}",
"List<ServicePaymentsStatistics> getServicePaymentStats(Date begin, Date end);",
"TransactionSummaryType createTransactionSummaryType();",
"protected final Transaction createTransaction(TransactionTypeKeys type) {\n\t\tTransaction trans = null;\n\t\tString payee = getForm().getPayFrom();\n\t\tdouble amount = parseAmount();\n\n\t\t// Put amount in proper form.\n\t\tif ((type == INCOME && amount < 0.0)\n\t\t\t\t|| (type == EXPENSE && amount >= 0.0)) {\n\t\t\tamount = -amount;\n\t\t}\n\n\t\t// Put payee in proper form.\n\t\tpayee = purgeIdentifier(payee);\n\n\t\ttrans = new Transaction(getForm().getField(CHECK_NUMBER).getText(),\n\t\t\t\tparseDate(), payee, Money.of(amount,\n\t\t\t\t\t\tUI_CURRENCY_SYMBOL.getCurrency()), getCategory(),\n\t\t\t\tgetForm().getField(NOTES).getText());\n\n\t\t// Set attributes not applicable in the constructor.\n\t\ttrans.setIsReconciled(getForm().getButton(PENDING).isSelected() == false);\n\n\t\tif (isInEditMode() == true) {\n\t\t\ttrans.setLabel(getEditModeTransaction().getLabel());\n\t\t}\n\n\t\treturn trans;\n\t}",
"public static double expenses(Scanner console) {\n System.out.print(\"Enter 1) monthly or 2) daily expenses? \");\n int expensetype = console.nextInt();\n \n System.out.print(\"How many categories of expense? \");\n int categories = console.nextInt();\n \n double totalExpense =0;\n String type =\"\";\n \n if (expensetype == 1) { \n type =\"expense1\";\n } else {\n type =\"expense2\";\n }\n for ( int i = 1; i<= categories; i++) {\n System.out.print(\" Next expense amount? $\");\n totalExpense += userInput(console, type); \n } \n System.out.println();\n \n return difference(totalExpense);\n }",
"BigDecimal getSumOfTransactionsRest(TransferQuery query);",
"List<Number> getTransactionAmounts(final StatisticalDTO dto);",
"@RequestMapping(value=\"/generateanalysis\",method=RequestMethod.GET)\r\n\tpublic List<PaymentDetailsBean> transactionAnalysis(Date start, Date end){\r\n \r\n\t\treturn service.transactionAnalysis(start, end);\r\n\t}",
"public Long countByModelAndDate(Integer ue_type, Date startDate, Date endDate){\n\t\tQuery query = em.createQuery(\"select count (c) from BaseData c where c.ue_type = :ue_type AND c.date_time >= :sDate AND c.date_time <= :eDate\");\n\t\tquery.setParameter(\"ue_type\", ue_type);\n\t\tquery.setParameter(\"sDate\",startDate);\n\t\tquery.setParameter(\"eDate\", endDate);\n\t\treturn (Long)query.getSingleResult();\n\t}",
"public List<Transaction> getTransactions(String startdate, String enddate) {\r\n List<Transaction> transactionList = null;\r\n Session session = HibernateUtil.getSessionFactory().getCurrentSession();\r\n try {\r\n org.hibernate.Transaction hbtransaction = session.beginTransaction();\r\n Query q = session.createQuery (\"from finance.entity.Transaction trans WHERE (trans.effdate BETWEEN :startdate AND :enddate) AND trans.category.extra = false AND trans.deleted = false ORDER BY trans.effdate, trans.category.sortId\");\r\n q.setParameter(\"startdate\", java.sql.Date.valueOf(startdate));\r\n q.setParameter(\"enddate\", java.sql.Date.valueOf(enddate));\r\n transactionList = (List<Transaction>) q.list();\r\n hbtransaction.commit();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n return transactionList;\r\n }",
"public Integer getTotalCountForType(DasType type) throws DataSourceException {\n return null;\n }",
"int withdraw(int id, int amount, int accountType) {\n int idCompare; // will contain the ID needed\n double accountBalance = 0;\n String account; // 0 = chequing, 1 = savings\n\n // If the accountType is 0, then it's a Chequing account the user wants to deposit to, if it's 1 then\n // it's savings\n account = accountType == 0 ? \"UserBalanceC\" : \"UserBalanceS\";\n\n // Look into the account number and user balance for the deposit\n String sql = \"SELECT AccountNum, \" + account + \" FROM CashiiDB2\";\n\n try {\n rs = st.executeQuery(sql);\n while (rs.next()) {\n idCompare = rs.getInt(\"AccountNum\"); // grab the id to compare with after\n\n // If the ID turns about to be the one that's needed, get the balance and add the amount needed\n if (idCompare == id) {\n accountBalance = rs.getDouble(account);\n if (accountBalance <= amount)\n return -1;\n else {\n accountBalance -= amount;\n }\n }\n }\n updateAccount(id, accountBalance, account); // update command\n } catch (java.sql.SQLException e) {\n e.printStackTrace();\n }\n\n return 1;\n }",
"public Integer calculateSum() {\n logger.debug(\"Calculating and returning the sum of expenses.\");\n return listOfTargets.stream().map(T::getAmount).reduce(0, Integer::sum);\n }",
"public TransactionTicket(Calendar date, String type, double amount) {\n\t\tdateOfTransaction = date;\n\t\ttypeOfTransaction = type;\n\t\tamountOfTransaction = amount;\n\t\tdateOfTransaction = Calendar.getInstance();\n\t}",
"private static void printSettledAmount(final List<Instruction> list,final String settlementType) {\n\t\tfinal LocalDate today = LocalDate.now();\n\t\tfinal double totalAmount = list.stream().filter(l -> l.getActualSellementDate().compareTo(today)==0)\n\t\t.mapToDouble(i -> i.getTotalAmount()).sum();\n\t\tSystem.out.println(settlementType+\" Amount Settled :\"+totalAmount);\n\t\t\n\t}",
"public double calculate_total_sales_of_transaction() {\n char ismember = 'n';\n discounts = 1;\n String member_typ = \"null\";\n ismember = order.getIsMember();\n member_typ = order_member.getMemberType();\n\n total_sales_of_transaction = order.getBike().getPrice();\n\n if (Character.toUpperCase(ismember) == 'Y') {\n if (member_typ == \"Premium\") {\n discounts = 0.85;\n } else {\n discounts = 0.9;\n }\n }\n double price = total_sales_of_transaction * discounts;\n return price;\n }",
"List<OperationTypeStatistics> getOperationTypePaymentPointStatistics(Long paymentPointId, Date begin, Date end);",
"int getRequiredAmountFor(AResourceType type);",
"int deposit(int id, int amount, int accountType) {\n int idCompare; // will contain the ID needed\n double accountBalance = 0;\n String account; // 0 = chequing, 1 = savings\n\n // If the accountType is 0, then it's a Chequing account the user wants to deposit to, if it's 1 then\n // it's savings\n account = accountType == 0 ? \"UserBalanceC\" : \"UserBalanceS\";\n\n // Look into the account number and user balance for the deposit\n String sql = \"SELECT AccountNum, \" + account + \" FROM CashiiDB2\";\n\n try {\n rs = st.executeQuery(sql);\n while (rs.next()) {\n idCompare = rs.getInt(\"AccountNum\"); // grab the id to compare with after\n\n // If the ID turns about to be the one that's needed, get the balance and add the amount needed\n if (idCompare == id) {\n accountBalance = rs.getDouble(account);\n accountBalance += amount;\n break;\n } else\n return -1;\n }\n // Run the operation to update the balance only for the user's account\n updateAccount(id, accountBalance, account);\n } catch (java.sql.SQLException e) {\n e.printStackTrace();\n }\n System.out.println(\"AMOUNT: \" + accountBalance);\n return 1;\n }",
"public List<Double> getAvgBalance(String account_type) {\n Session session = sessionFactory.getCurrentSession();\n List<Double> accountList = session.createQuery(\"select avg(balance) from Account where account_type='\"+account_type+\"'\", Double.class).list();\n return AccountDto.getAvgBalance(accountList);\n }",
"public static int calculateDiscount(ItemType type, int quantity) {\n int discount = 0;\n switch (type) {\n case NEW:\n return 0;\n case SECOND_FREE:\n if (quantity > 1)\n discount = 50;\n break;\n case SALE:\n discount = 70;\n break;\n }\n discount += quantity / 10;\n if (discount > 80)\n discount = 80;\n return discount;\n }",
"public List<moneytree.persist.db.generated.tables.pojos.Income> fetchRangeOfTransactionDate(LocalDate lowerInclusive, LocalDate upperInclusive) {\n return fetchRange(Income.INCOME.TRANSACTION_DATE, lowerInclusive, upperInclusive);\n }",
"@SuppressWarnings(BookFlowConstants.BOXING)\r\n private int getCount(final Collection<String> types, final String type)\r\n {\r\n int paxCount = 0;\r\n for (final String passengerType : types)\r\n {\r\n if (StringUtils.equalsIgnoreCase(passengerType.trim(), type))\r\n {\r\n paxCount++;\r\n }\r\n }\r\n return paxCount;\r\n }",
"public String findUserBalance(String beneficiaryId, String beneficiaryType, String accountType) {\n String path = balancesByIdsPath + \"?beneficiaryIds=\" + beneficiaryId + \"&beneficiaryType=\" + beneficiaryType + \"&accountType=\" + accountType;\n\n return sendRequest(getResponseType, systemUserAuthToken(), path, allResult, statusCode200);\n }",
"public String saleOrdinance(String stockSymbol, int amount, int limit, String userName, String type) throws SymbolDidntExistException, OnlyPositiveNumberException, UserDidntExistException, UserDoesntHoldingTheStockException, UserDoesntHoldEnoughStocksException, TraderDidntExistException, NonTraderUserException, OrdinanceTypeDoesNotExistException {\n OrdinanceType ordinanceType = null;\n\n Trader trader = usersList.getTrader(userName);\n if (trader == null) {\n throw new TraderDidntExistException(userName);\n }\n\n\n if (type.equalsIgnoreCase(\"MKT\") == true) {\n ordinanceType = OrdinanceType.MKT;\n } else if (type.equalsIgnoreCase(\"LMT\") == true) {\n ordinanceType = OrdinanceType.LMT;\n }\n else if (type.equalsIgnoreCase(\"FOK\") == true) {\n ordinanceType = OrdinanceType.FOK;\n }\n else if (type.equalsIgnoreCase(\"IOC\") == true) {\n ordinanceType = OrdinanceType.IOC;\n }\n else{\n throw new OrdinanceTypeDoesNotExistException(type);\n }\n\n Stock stock = stocksList.getStockBySymbol(stockSymbol);\n if (stock == null) {\n throw new SymbolDidntExistException(stockSymbol);\n }\n\n if (trader.getHoldingAmount(stock) < amount) {\n throw new UserDoesntHoldEnoughStocksException(stockSymbol, userName, trader.getHoldingAmount(stock));\n } else if (amount <= 0) {\n throw new OnlyPositiveNumberException(amount);\n } else {\n return (new Trade(new Sale(stock, amount, limit, trader, ordinanceType))).toString();\n }\n }",
"public List<Transaction> getExtraTransactions(String startdate, String enddate) {\r\n List<Transaction> transactionList = null;\r\n Session session = HibernateUtil.getSessionFactory().getCurrentSession();\r\n try {\r\n org.hibernate.Transaction hbtransaction = session.beginTransaction();\r\n Query q = session.createQuery (\"from finance.entity.Transaction trans WHERE (trans.effdate BETWEEN :startdate AND :enddate) AND trans.category.extra = true AND trans.deleted = false ORDER BY trans.effdate, trans.category.sortId\");\r\n q.setParameter(\"startdate\", java.sql.Date.valueOf(startdate));\r\n q.setParameter(\"enddate\", java.sql.Date.valueOf(enddate));\r\n transactionList = (List<Transaction>) q.list();\r\n hbtransaction.commit();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n return transactionList;\r\n }",
"public Transaction(final TransactionType type, final BuddyAccount buddyOwner, final BankAccount bankAccount,\n final LocalDate date, final String description, final BigDecimal amount, final BigDecimal fee) {\n super();\n this.type = type;\n this.buddyOwner = buddyOwner;\n this.bankAccount = bankAccount;\n this.date = date;\n this.description = description;\n this.amount = amount;\n this.fee = fee;\n }",
"Collection<Transaction> findAllByTransactiontype(int type, Sort sort);",
"private static Boolean doWithdrawCheck(\n Account fromAccount,\n Integer toAccountId,\n Integer userId,\n Integer amount,\n Transaction.TransactionType type\n ) {\n // Check that there is enough money\n switch (fromAccount.type) {\n case Credit:\n if (fromAccount.balance - amount < MAX_CREADIT) {\n return false;\n }\n break;\n default:\n if (fromAccount.balance - amount < 0) {\n return false;\n }\n break;\n }\n\n // Check that account type can be used for action\n switch (type) {\n case Transfer:\n if (fromAccount.type == AccountType.Savings) {\n return userOwnsDestination(fromAccount, toAccountId, userId);\n }\n break;\n case Payment:\n if (fromAccount.type == AccountType.Savings) {\n return false;\n }\n break;\n default:\n return true;\n }\n return true;\n }",
"@Override\n\tpublic BigDecimal getMoneyByPlanDateType(String temp, String planId,\n\t\t\tString intentDate, String type) {\n\t\treturn dao.getMoneyByPlanDateType(temp, planId, intentDate, type);\n\t}",
"public Transaction(String accountID, String type, double amount, double balance){\n\t\tthis.transactionID = UUID.randomUUID().toString();\n\t\tthis.type = type;\n\t\tthis.amount = amount;\n\t\tthis.accountID = accountID;\n\t\tthis.balance = balance;\n\n\t\tString sql = \"INSERT INTO mak213_bank1017.transaction \";\n\t\tsql += \"(transactionID, accountID, amount, transactionDate, type, balance) \";\n\t\tsql += \" VALUES \";\n\t\tsql += \"('\" + this.transactionID + \"', \";\n\t\tsql += \"'\" + this.accountID + \"', \";\n\t\tsql += amount + \", \";\n\t\tsql += \"CURDATE(), \";\n\t\tsql += \"'\" + this.type + \"', \";\n\t\tsql += balance + \");\";\n\n\t\tDbUtilities db = new MySqlUtilities();\n\t\tdb.executeQuery(sql);\n\t\ttry {\n\t\t\tdb.closeDbConnection();\n\t\t} catch (SQLException e) {\n\t\t\tErrorLogger.log(\"Could not close connection\");\n\t\t\tErrorLogger.log(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} \n\n\t}",
"@Override\n\tpublic List<ProfitResult> profitStatistic(Request staticRequest) {\n\t\tList<ProfitResult> result = new ArrayList<>();\n\t\tMap<String, int[]> buySellMap = new TreeMap<String, int[]>();\n\t\tIterator<Map.Entry<String, Map<LocalDate, List <Transaction>>>> iterator = this.result.entrySet().iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tMap.Entry<String, Map<LocalDate, List <Transaction>>> entry = iterator.next();\n\t\t\tIterator<Map.Entry<LocalDate, List <Transaction>>> iterator2 = entry.getValue().entrySet().iterator();\n\t\t\twhile (iterator2.hasNext()) {\n\t\t\t\tMap.Entry<LocalDate, List <Transaction>> entry2 = iterator2.next();\n\t\t\t\tfor (Transaction Tra : entry2.getValue()) {\n\t\t\t\t\tint buySellAmount [] = new int [] {0,0};\n\t\t\t\t\tif( Tra.getMode().equals(TransactionMode.BUY)) {\n\t\t\t\t\t\tif (buySellMap.containsKey(Tra.getCurrencyCode())) {\n\t\t\t\t\t\t\tbuySellAmount[1] = buySellMap.get(Tra.getCurrencyCode())[1];\n\t\t\t\t\t\t\tbuySellAmount[0] = buySellMap.get(Tra.getCurrencyCode())[0] + (int)(Tra.getAmount()*this.currencyMap.get(entry2.getKey()).get(Tra.getCurrencyCode())*1.005d);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tbuySellAmount[0] = (int)(Tra.getAmount()*this.currencyMap.get(entry2.getKey()).get(Tra.getCurrencyCode())*1.005d);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif( Tra.getMode().equals(TransactionMode.SELL)) {\n\t\t\t\t\t\tif (buySellMap.containsKey(Tra.getCurrencyCode())) {\n\t\t\t\t\t\t\tbuySellAmount[0] = buySellMap.get(Tra.getCurrencyCode())[0];\n\t\t\t\t\t\t\tbuySellAmount[1] = buySellMap.get(Tra.getCurrencyCode())[1] + (int)(Tra.getAmount()*this.currencyMap.get(entry2.getKey()).get(Tra.getCurrencyCode())*0.995d);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tbuySellAmount[1] = (int)(Tra.getAmount()*this.currencyMap.get(entry2.getKey()).get(Tra.getCurrencyCode())*0.995d);\n\n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tbuySellMap.put(Tra.getCurrencyCode(), buySellAmount);\n\n\t\t\t\t\t}\n\t\t\t\tIterator<Map.Entry<String, int []>> iterator3 = buySellMap.entrySet().iterator();\n\t\t\t\twhile (iterator3.hasNext()) {\n\t\t\t\t\tMap.Entry<String, int []> entry3 = iterator3.next();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tresult.add(new ProfitResult(entry3.getValue()[0], entry3.getValue()[1], entry2.getKey(), entry.getKey(), entry3.getKey()));\n\t\t\t\t}\n\t\t\t\tbuySellMap.clear();\n\t\t\t}\n\t\t}\n\t\treturn result;\n\n\t}",
"public double getTotalByMonthAndCategory(String userId, String categoryId,\r\n String type, String month) {\r\n double dbl = 0.0;\r\n\r\n try {\r\n ClaimFormItemDao dao = (ClaimFormItemDao) getDao();\r\n dbl = dao.selectTotalByMonthAndCategory(userId, categoryId, type,\r\n month);\r\n } catch (Exception e) {\r\n Log.getLog(getClass()).error(\"getTotalByMonthAndCategory:\", e);\r\n }\r\n\r\n return dbl;\r\n }",
"public int numberOfContractBetween(String start, String end){\r\n\r\n\t\tQuery query = entityManager.createQuery(\r\n\t\t\t\t\"SELECT u FROM Contract u WHERE u.dateStart BETWEEN cast(:start as date) AND cast(:end as date)\");\r\n\t\t\r\n\t\t\r\n\t\tquery.setParameter(\"start\", start);\r\n\t\tquery.setParameter(\"end\", end);\r\n\t\t\r\n\t\treturn query.getResultList().size();\r\n\t\t\r\n\t}",
"Document generateSpendingCategoryReport(String username, Date start,\n Date end);",
"@Override\n\tpublic Double getSumofCost(String supplyStartDate, String supplyLastDate) {\n\t\tString sql=\"SELECT SUM(h.cost) FROM supplier s INNER JOIN supplier_product h on s.supplier_id=h.supplier_supplier_id WHERE buy_date>=?::Date and buy_date<=?::Date\";\n\t\tDouble total=this.getJdbcTemplate().queryForObject(sql, Double.class, supplyStartDate, supplyLastDate);\n\t\treturn total;\n\t}",
"@Override\n public ResponseEntity<?> getReport(Long placeId, Long reportType, Long startDateL, Long endDateL) {\n Date endDate = midnight();\n Date startDate = new Date();\n if (reportType == 0) {\n endDate = midnight();\n startDate = setDateBefore(1);\n } else if (reportType == 1) {\n endDate = midnight();\n startDate = setDateBefore(7);\n } else if (reportType == 2) {\n endDate = midnight();\n startDate = setDateBefore(30);\n } else if (reportType == 3) {\n endDate = new Date(endDateL);\n startDate = new Date(startDateL);\n }\n List<ReportItem> reportItems = new ArrayList<>();\n // get all ticket type of place\n List<TicketType> ticketTypes = ticketTypeRepository.findByPlaceId(placeId);\n int totalRevenue = 0;\n for (TicketType ticketType : ticketTypes) {\n //get all visitor type of a ticket type\n for (VisitorType visitorType : visitorTypeRepository.findByTicketType(ticketType)) {\n ReportItem reportItem = new ReportItem();\n reportItem.setTicketTypeName(ticketType.getTypeName() + \" [\" + visitorType.getTypeName() + \"]\");\n //calculate tickets\n int quantity = ticketRepository.getAllBetweenDates(visitorType.getId(), startDate, endDate);\n reportItem.setQuantity(quantity);\n int remaining = codeRepository.getAllBetweenDates(visitorType, startDate, endDate);\n reportItem.setRemaining(remaining);\n int total = quantity * visitorType.getPrice() * quantity;\n reportItem.setTotal(total);\n reportItems.add(reportItem);\n totalRevenue += total;\n }\n }\n OutputReport outputReport = new OutputReport();\n outputReport.setEndDate(endDateL);\n outputReport.setStartDate(startDateL);\n outputReport.setPlaceId(placeId);\n outputReport.setReportType(reportType);\n outputReport.setReportItemList(reportItems);\n outputReport.setTotalRevenue(totalRevenue);\n return ResponseEntity.ok(outputReport);\n }",
"public static int SubDateTimeAndConvertToReportDay(int amount, int calendarType)\n {\n // Create an instance of SimpleDateFormat used for formatting\n // the string representation of date (month/day/year)\n DateFormat df = new SimpleDateFormat(\"yyyyMMdd\");\n\n // Get the date today using Calendar object.\n Calendar calendar = Calendar.getInstance();\n calendar.add(calendarType, -amount);\n Date newDay = calendar.getTime();\n\n // Using DateFormat format method we can create a string\n // representation of a date with the defined format.\n String reportDate = df.format(newDay);\n\n return Integer.parseInt(reportDate);\n }",
"public static void results(double netIncome){\n double absIncome = Math.abs(netIncome);\n \n if (netIncome > 0) {\n System.out.println(\"You earned $\" + netIncome + \" more than you spent this month.\");\n } else{\n System.out.println(\"You spent $\" + absIncome + \" more than you earned this month.\");\n }\n\n if (netIncome > 250) {\n System.out.println(\"You're a big saver.\");\n System.out.println(\"You're an an accountant now, Harry.\");\n } else if (netIncome > 0) {\n System.out.println(\"You're a saver.\");\n System.out.println(\"You're becoming an adult, Harry.\");\n } else if (netIncome <=-250) {\n System.out.println(\"You're a big spender.\");\n System.out.println(\"Stop buying all the treacle tart, Harry!\");\n } else { // -250< netincome <= 0\n System.out.println(\"You're a spender.\");\n System.out.println(\"You're going broke, Harry.\");\n }\n }",
"@Override\r\n\tpublic List<InformationDTO> findSum() {\n\t\treturn sqlSessionTemplate.selectList(typeNameSpace + \".findSum\");\r\n\t}",
"public PaymentSummary[] selectByDateStoreIdPaymentType(Date date, String storeId\n , String paymentType)\n throws SQLException {\n String whereSql = where(RkPaySumOracleBean.COL_PAYMENT_DATE, RkPaySumOracleBean.COL_ID_STR_RT\n , RkPaySumOracleBean.COL_PAYMENT_TYPE);\n ArrayList params = new ArrayList();\n params.add(date);\n params.add(storeId);\n params.add(paymentType);\n return fromBeansToObjects(query(new RkPaySumOracleBean(), whereSql, params));\n }",
"int getAmountEntriesListTariffActiveStatus(String tariffType) throws ServiceException;",
"public String add(Calendar calendar, Car car, String salesPerson, String type, Double salePrice){\n id = (int)(Math.random() * 300);\n Transaction newTransaction = new Transaction(id, calendar,car, salesPerson, type, salePrice);\n LinkedList<Transaction> tempTransactionByTime = new LinkedList<Transaction>();\n int m = calendar.get(Calendar.MONTH);\n int tempCount = 0;\n accSystem.put(id, newTransaction);\n allTransactionsID.add(id);\n\n if (type.equals(\"BUY\")){\n currentBuyID = id;\n totalSalesCount++;\n totalSaleProfit += car.getPrice();\n if (highestSalesMonth.get(m) != null){\n tempCount = highestSalesMonth.get(m) + 1;\n }\n }else if (type.equals(\"RETURN\") || type.equals(\"RET\")){\n currentBuyID = -1;\n totalSaleProfit -= car.getPrice();\n totalSalesCount--;\n totalReturnCount++;\n if (highestSalesMonth.get(m) != null){\n tempCount = highestSalesMonth.get(m) - 1;\n }\n }\n highestSalesMonth.put(m, tempCount);\n \n if (transactionByTime.get(m) != null){\n tempTransactionByTime.addAll(transactionByTime.get(m)); \n }\n tempTransactionByTime.add(newTransaction);\n transactionByTime.put(m, tempTransactionByTime);\n\n return newTransaction.display();\n }",
"public Transaction(final TransactionType type, final BuddyAccount buddyOwner, final BuddyAccount buddyReceiver,\n final LocalDate date, final String description, final BigDecimal amount, final BigDecimal fee) {\n super();\n this.type = type;\n this.buddyOwner = buddyOwner;\n this.buddyReceiver = buddyReceiver;\n this.date = date;\n this.description = description;\n this.amount = amount;\n this.fee = fee;\n }",
"boolean addTransaction(int accountNumber, double transactionAmount,\n int transactionType, String transactionJournalEntry, long transactionTimestamp) {\n if (transactionType == 0 || transactionType == 2) {\n if (AccountList.getInstance(context).getAccount(accountNumber).withdraw(transactionAmount)) {\n databaseHandler.addTransaction(transactionList.size(),\n accountNumber, transactionAmount, transactionType, transactionJournalEntry, transactionTimestamp);\n transactionList.add(new Transaction(transactionList.size() + 1, accountNumber, transactionAmount, transactionType, transactionJournalEntry, transactionTimestamp));\n databaseHandler.updateAccount(accountNumber,\n -transactionAmount);\n return true;\n } else {\n return false;\n }\n } else {\n AccountList.getInstance(context).getAccount(accountNumber).deposit(transactionAmount);\n databaseHandler.addTransaction(transactionList.size(),\n accountNumber, transactionAmount, transactionType, transactionJournalEntry, transactionTimestamp);\n transactionList.add(new Transaction(transactionList.size() + 1, accountNumber, transactionAmount, transactionType, transactionJournalEntry, transactionTimestamp));\n databaseHandler.updateAccount(accountNumber, transactionAmount);\n return true;\n }\n }",
"ArrayList<Transaction> getFilteredTransactions(long startTimestamp,\n long endTimestamp, long accountNumber, boolean showExpense, boolean showIncome) {\n ArrayList<Transaction> filteredTransactionList = new ArrayList<>();\n int low = 0;\n int high = transactionList.size() - 1;\n if (startTimestamp != -1 && endTimestamp != -1) {\n /*\n If start and end time are set, then get the range of\n transaction corresponding to the time range.\n */\n Points p = getTransactions(startTimestamp, endTimestamp);\n if (p.x == -1 && p.y == -1)\n return filteredTransactionList;\n low = p.x;\n high = p.y;\n }\n for (int i = low; i <= high; i++) {\n if (accountNumber != -1 && transactionList.get(i).transactionAccountNumber != accountNumber)\n continue;\n if (!showExpense && (transactionList.get(i).transactionType == 0 || transactionList.get(i).transactionType == 2))\n continue;\n if (!showIncome && (transactionList.get(i).transactionType == 1 || transactionList.get(i).transactionType == 3))\n continue;\n filteredTransactionList.add(transactionList.get(i));\n }\n return filteredTransactionList;\n }",
"public static int calculateInterval(Date sDate, Date eDate, String type) {\n int interval = 0;\n\n Calendar sCalendar = Calendar.getInstance();\n sCalendar.setTime(sDate);\n int sYears = sCalendar.get(Calendar.YEAR);\n int sMonths = sCalendar.get(Calendar.MONTH);\n int sDays = sCalendar.get(Calendar.DAY_OF_YEAR);\n\n Calendar eCalendar = Calendar.getInstance();\n eCalendar.setTime(eDate);\n int eYears = eCalendar.get(Calendar.YEAR);\n int eMonths = eCalendar.get(Calendar.MONTH);\n int eDays = eCalendar.get(Calendar.DAY_OF_YEAR);\n\n switch (type) {\n case \"Y\":\n case \"y\":\n interval = eYears - sYears;\n if(eMonths < sMonths) {\n --interval;\n }\n break;\n case \"M\":\n case \"m\":\n interval = 12 * (eYears - sYears);\n interval += (eMonths - sMonths);\n break;\n case \"D\":\n case \"d\":\n interval = 365 * (eYears - sYears);\n interval += (eDays - sDays);\n // remove days in leap year\n while(sYears < eYears) {\n if(isLeapYear(sYears)) {\n --interval;\n }\n ++sYears;\n }\n break;\n }\n return interval;\n }",
"public Double getTotalDiscount(int month, int day, int year, int storeCode, int... discountType) {\r\n\t\tString query = \"SELECT o.OR_NO, i.PROD_CODE, i.SELL_PRICE, i.QUANTITY from invoice_item i, invoice o, products_lu p \" +\r\n\t\t\"WHERE p.PROD_CODE = i.PROD_CODE\" +\r\n\t\t\" AND MONTH (o.TRANS_DT) = '\"+month+\"' && \" +\r\n\t\t\" YEAR(o.TRANS_DT) = '\"+year+\"' && \" +\r\n\t\t\" DAY(o.TRANS_DT) = '\"+day+\"' \" +\r\n\t\t\" AND i.OR_NO = o.OR_NO \" +\r\n\t\t\" AND o.STORE_CODE = i.STORE_CODE \" +\r\n\t\t\"AND o.STORE_CODE = '\"+storeCode+\"'\"\r\n\t\t+\" AND NOT EXISTS (SELECT 1 FROM INVOICE_SET s WHERE s.OR_NO = o.OR_NO) \";\r\n\t\t\r\n\t\tif (discountType.length > 0) {\r\n\t\t\tquery += \" AND i.DISC_CODE = \" + discountType[0];\r\n\t\t}\r\n\t\tSystem.out.println(\"TOTALDISCOUNT QUERY = \" + query);\r\n\t\tResultSet rs = Main.getDBManager().executeQuery(query);\r\n\t\tDouble amount = 0.0d;\r\n\t\ttry {\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tamount += (InvoiceItemService.getInstance().getDiscountAmount(rs.getLong(\"OR_NO\"),rs.getString(\"PROD_CODE\"))) * rs.getDouble(\"QUANTITY\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tLoggerUtility.getInstance().logStackTrace(e);\r\n\t\t}\r\n\t\tlogger.debug(\"TOTAL DISCOUNT: \"+ amount);\r\n\t\treturn amount;\r\n\t}",
"@Override\n\tpublic String getTxnNumber(final String txnType, final String vDate) throws ParseException\n\t{\n\t\tString finYear = \"\";\n\t\tString fiscalPeriod = \"\";\n\t\tString retVal = \"\";\n\n\t\tfinal String month[] = vDate.split(\"/\");\n\t\tif (LOGGER.isInfoEnabled())\n\t\t\tLOGGER.info(\" The month :\" + month[1]);\n\t\tfinal SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\tfinal SimpleDateFormat formatter = new SimpleDateFormat(\"dd-MMM-yyyy\");\n\t\t// Date dt=new Date();\n\t\t// dt = sdf.parse( vDate );\n\t\tfinal String txndate = formatter.format(sdf.parse(vDate));\n\n\t\tfinal StringBuilder sql = new StringBuilder(\"select a.FINANCIALYEAR,b.id from FINANCIALYEAR a,fiscalperiod b \")\n\t\t\t\t.append(\" where a.id=b.financialyearid AND ? between b.startingdate and b.endingdate\");\n\t\tif (LOGGER.isInfoEnabled())\n\t\t\tLOGGER.info(sql);\n\t\tQuery pst = persistenceService.getSession().createSQLQuery(sql.toString());\n pst.setString(0, txndate);\n List<Object[]> rset = pst.list();\n for (final Object[] element : rset) {\n \tfinYear = element[0].toString();\n \tfiscalPeriod = element[1].toString();\n \tif (LOGGER.isInfoEnabled())\n \t\tLOGGER.info(\"finYear id>>>>>>>\" + finYear + \" fiscalPeriod :\" + fiscalPeriod);\n }\n if (rset == null || rset.size() == 0)\n \tthrow new NullPointerException(\"Year is not defined in the system\");\n\n final String year = finYear.substring(2, 4) + finYear.substring(finYear.length() - 2, finYear.length());\n if (LOGGER.isInfoEnabled())\n \tLOGGER.info(\" The year String :\" + year);\n // ---\n if (LOGGER.isDebugEnabled())\n \tLOGGER.debug(\" In CommonMethodsImpl :getTxnNumber method \");\n //persistenceService.setType(CFiscalPeriod.class);\n final CFiscalPeriod fiscalPeriodObj = (CFiscalPeriod) persistenceService.find(\"from CFiscalPeriod where id=?\",\n \t\tLong.parseLong(fiscalPeriod));\n // Sequence name will be SQ_U_DBP_CGVN_FP7 for txnType U/DBP/CGVN and fiscalPeriodIdStr 7\n final String sequenceName = VoucherHelper.sequenceNameFor(txnType, fiscalPeriodObj.getName());\n Serializable runningNumber = genericSequenceNumberGenerator.getNextSequence(sequenceName);\n if (LOGGER.isDebugEnabled())\n \tLOGGER.debug(\"----- Txn Number : \" + runningNumber);\n // ---\n\n retVal = txnType + runningNumber.toString() + \"/\" + month[1] + \"/\" + year;\n if (LOGGER.isInfoEnabled())\n \tLOGGER.info(\"Return value is :\" + retVal);\n\t\treturn retVal;\n\t}",
"public int getTotalRow(int id,int type) {\n\t\treturn dao.getTotalRow(id,type);\n\t}",
"public TransactionType performTransaction() {\n while(true){\n try{\n TransactionType transactionType = ui.chooseTransactionType();\n\n switch (transactionType){\n case CHECK_BALANCE:\n this.doCheckBalance();\n return transactionType;\n case DEPOSIT:\n this.doDeposit();\n return transactionType;\n\n case WITHDRAWAL:\n this.doWithdrawal();\n return transactionType;\n default:\n return null;\n }\n\n }catch (Exception e){\n ui.displayError(\"Please enter a valid transaction type.\");\n }\n\n }\n\n\n }",
"public Double getCreditSales(java.sql.Timestamp transDate, java.sql.Timestamp eodDate, int storeCode) {\r\n\t\tString query = \"SELECT SUM(p.AMT) FROM payment_item p \" +\r\n\t\t\t\t\" WHERE p.TRANS_DT >= ? AND p.TRANS_DT <= ?\" +\r\n\t\t\t\t \" AND p.STORE_CODE = ?\"+\r\n\t\t\t\t \" AND p.PT_CODE = 3\";\r\n\t\tPreparedStatement pquery;\r\n\t\tResultSet rs = null;\r\n\t\ttry {\r\n\t\t\tpquery = Main.getDBManager().getConnection().prepareStatement(query);\r\n\t\t\t\r\n\t\t\tpquery.setTimestamp(1, transDate);\r\n\t\t\tpquery.setTimestamp(2, eodDate);\r\n\t\t\tpquery.setInt(3, storeCode);\r\n\t\t\t\r\n\t\t\trs = pquery.executeQuery();\r\n\t\t\t\r\n\t\t\tDouble amount = 0.0d;\r\n\t\t\t\r\n\t\t\tif(rs.next()){\r\n\t\t\t\tamount = rs.getDouble(1);\r\n\t\t\t}\r\n\t\t\r\n\t\t\tlogger.debug(\"CREDIT SALES: \"+amount);\r\n\t\t\treturn amount;\r\n\t\t} catch (SQLException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"private void sumarTropa(int tipo){\n int cantActual;\n //Buscar tipo\n switch(tipo){\n case vg.BARBARO:\n cantActual = Integer.parseInt(jTextFieldBarbaro.getText());\n jTextFieldBarbaro.setText(String.valueOf(cantActual+1));\n break;\n case vg.ARQUERA:\n cantActual = Integer.parseInt(jTextFieldArquera.getText());\n jTextFieldArquera.setText(String.valueOf(cantActual+1));\n break;\n case vg.GIGANTE:\n cantActual = Integer.parseInt(jTextFieldGigante.getText());\n jTextFieldGigante.setText(String.valueOf(cantActual+1));\n break;\n case vg.DUENDE:\n cantActual = Integer.parseInt(jTextFieldDuende.getText());\n jTextFieldDuende.setText(String.valueOf(cantActual+1));\n break;\n }\n }",
"public static void getAcountsWithType(String accType) {\n\t\t\t\n\t\t\taccounts.clear();\n\t\t\t\n\t\t\tString query = \"select account.accID, accType, balance, dateCreated, fName, lName \" + \n\t\t \"from ser322.account,ser322.customer \" + \n\t\t \"WHERE customer.accID = account.accID AND accType =\" + \"'\" + accType + \"'\";\n\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tStatement stmt = con.getConnection().createStatement();\n\t\t\t ResultSet rs = stmt.executeQuery(query);\n\t\t while (rs.next()) {\n\t\t \taccounts.addElement(new Account(rs.getInt(\"accID\"),rs.getString(\"accType\"),\n\t\t \t\t\t rs.getFloat(\"balance\"),rs.getDate(\"dateCreated\"), rs.getString(\"fName\"), rs.getString(\"lName\")));\n\t\t \n\t\t }\n\t\t \n\t\t } catch (SQLException e ) {\n\t\t \tSystem.out.println(\"QUERY WRONG - getAcountsWithType\");\n\t\t }\n\t\n\t\t}",
"public Double getRawGross(java.sql.Timestamp transDate, java.sql.Timestamp eodDate, int storeCode) {\r\n\t\tString query = \"SELECT SUM(i.SELL_PRICE*i.QUANTITY) FROM invoice_item i, invoice o WHERE o.TRANS_DT >= ? AND o.TRANS_DT <= ? AND i.OR_NO = o.OR_NO AND i.STORE_CODE = o.STORE_CODE AND o.STORE_CODE = ?\"\r\n\t\t+ \" AND NOT EXISTS (SELECT 1 FROM INVOICE_SET s WHERE s.OR_NO = o.OR_NO) \";\r\n\t\tPreparedStatement pquery;\r\n\t\tResultSet rs = null;\r\n\t\tDouble dailySale = 0.0d;\r\n\t\ttry {\r\n\t\t\tpquery = Main.getDBManager().getConnection().prepareStatement(query);\r\n\t\t\t\r\n\t\t\tpquery.setTimestamp(1, transDate);\r\n\t\t\tpquery.setTimestamp(2, eodDate);\r\n\t\t\tpquery.setInt(3, storeCode);\r\n\t\t\tlogger.debug(\"TRANS DATE BEFORE\"+transDate.toLocaleString());\r\n\t\t\tlogger.debug(\"TRANS DATE BEFORE\"+eodDate.toLocaleString());\r\n\t\t\t\r\n\t\t\trs = pquery.executeQuery();\r\n\t\t\t\r\n\t\t\twhile(rs.next()){\r\n//\t\t\t\tdouble amount = rs.getDouble(1);\r\n//\t\t\t\tdailySale = amount/getVatRate();\r\n\t\t\t\tdailySale = rs.getDouble(1);\r\n\t\t\t\tlogger.debug(\"Raw Gross BEFORE SUBTRACTION: \"+dailySale);\r\n\t\t\t\t// SUBTRACT all returned items\r\n\t\t\t\tdailySale = dailySale - getDeductibles(transDate, eodDate, storeCode) + getCompletedTransactions(transDate, eodDate, storeCode);\r\n\t\t\t\tlogger.debug(\"Raw Gross AFTER RETURNED SUBTRACTION: \"+dailySale);\r\n\t\t\t\treturn dailySale;\r\n\t\t\t}\r\n\t\t} catch (SQLException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\treturn dailySale;\r\n\r\n\t}",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount getAmount();",
"@Override\n\tpublic List<PendingTransaction> getAllTransactionsByType(String transactionType) {\n\t\treturn null;\n\t}",
"public static UpdateTransaction of(Long sourceId, TransactionType type, String description, BigDecimal balance,\n LocalDateTime inputDate) {\n UpdateTransaction updateTransaction = new UpdateTransaction();\n updateTransaction.setSourceId(sourceId);\n updateTransaction.setType(type);\n updateTransaction.setDescription(description);\n updateTransaction.setBalance(balance);\n updateTransaction.setInputDate(inputDate);\n\n ObjectValidator.validate(updateTransaction);\n\n return updateTransaction;\n }",
"private\n void\n createReportAndDisplayResults(Date start, Date end, TotalFilter filter)\n {\n CategoryReport report = CategoryReport.createReport(start, end, filter);\n IncomeExpenseTotal expenses = new IncomeExpenseTotal(EXPENSE_SUMMARY, TOTAL.toString());\n IncomeExpenseTotal income = new IncomeExpenseTotal(INCOME_SUMMARY, TOTAL.toString());\n\n // Add expense totals.\n for(IncomeExpenseTotal total : report.getExpenses())\n {\n getExpensePanel().getTable().add(total);\n\n // Combine all the expense totals into the total.\n expenses.setAmount(expenses.getAmount() + total.getAmount());\n }\n\n getExpensePanel().getTable().add(expenses);\n\n // Add income totals.\n for(IncomeExpenseTotal total : report.getIncome())\n {\n getIncomePanel().getTable().add(total);\n\n // Combine all the income totals into the total.\n income.setAmount(income.getAmount() + total.getAmount());\n }\n\n getIncomePanel().getTable().add(income);\n\n // Add transfer totals.\n for(TransferTotal total : report.getTransfers())\n {\n getTransferPanel().getTable().add(total);\n }\n\n // Display results.\n getExpensePanel().getTable().display();\n getIncomePanel().getTable().display();\n getTransferPanel().getTable().display();\n }",
"public long countLotsByEntityType(String type) throws MiddlewareQueryException;",
"public String getAccountDailySpent(){\n if (currentAccount instanceof SavingAccount){\n Integer myInt = ((SavingAccount)currentAccount).getDailySpentCounter();\n return myInt.toString();\n \n }\n else if (currentAccount instanceof NetSavingAccount){\n Integer myInt = ((NetSavingAccount)currentAccount).getDailySpentCounter();\n return myInt.toString();\n }\n else if (currentAccount instanceof ChequeAccount){\n Integer myInt = ((ChequeAccount)currentAccount).getDailySpentCounter();\n return myInt.toString();\n }\n else if (currentAccount instanceof FixedAccount){\n Integer myInt = ((FixedAccount)currentAccount).getDailySpentCounter();\n return myInt.toString();\n }\n else{\n System.out.println(\"Get Account Daily spent count not found\");\n return \"error\";\n }\n }",
"@Override\n\tpublic String queryMemberInvest(Long memberId, String fromUserName, String toUserName,Date date,String dateString) {\n\t\tTransactionQuery transactionQuery=new TransactionQuery();\n\t\t//transactionQuery.setMemberId(memberId);\n\t\ttransactionQuery.setTransactionStartTime(DateUtils.zerolizedTime(date));\n\t\ttransactionQuery.setTransactionEndTime(DateUtils.getEndTime(date));\n\t\tTextMsg msg = new TextMsg();\n\t\tdate=DateUtils.getDateFromString(DateUtils.getDateStrFromDate(date), DateUtils.DATE_FMT_3);\n\t\tint count=memberService.countRegisterNumberByDate(date);\n\t\ttry {\n\t\t\tBigDecimal totalAssets=BigDecimal.ZERO;\n\t\t\tBigDecimal returnAssets=BigDecimal.ZERO;\n\t\t\tBigDecimal hadAssets=BigDecimal.ZERO;\n\t\tTransactionInterest transactionInterest=transactionManager.selectWaitPayByEndDate(0,date);\n\t\tif(transactionInterest!=null){\n\t\t\t BigDecimal principal = transactionInterest.getPayablePrincipal()==null?BigDecimal.ZERO:transactionInterest.getPayablePrincipal();\n\t\t\t BigDecimal interest = transactionInterest.getPayableInterest()==null?BigDecimal.ZERO:transactionInterest.getPayableInterest();\n\t\t\t totalAssets =principal.add(interest);\n\t\t}\n\t\t\n\t\tTransactionInterest returnInterest=transactionManager.selectWaitPayByEndDate(4,date);\n\t\tif(returnInterest!=null){\n\t\t\t BigDecimal principal = returnInterest.getPayablePrincipal()==null?BigDecimal.ZERO:returnInterest.getPayablePrincipal();\n\t\t\t BigDecimal interest = returnInterest.getPayableInterest()==null?BigDecimal.ZERO:returnInterest.getPayableInterest();\n\t\t\t returnAssets =principal.add(interest);\n\t\t}\n\t\t\n\t\tTransactionInterest hadInterest=transactionManager.selectRealPayByEndDate(date);\n\t\tif(hadInterest!=null){\n\t\t\t BigDecimal principal = hadInterest.getRealPayPrincipal()==null?BigDecimal.ZERO:hadInterest.getRealPayPrincipal();\n\t\t\t BigDecimal interest = hadInterest.getRealPayInterest()==null?BigDecimal.ZERO:hadInterest.getRealPayInterest();\n\t\t\t hadAssets =principal.add(interest);\n\t\t}\n\t\t\n\t\t\tBigDecimal investAmount = transactionManager.getMemberTotalInvestByStatus(transactionQuery);\n\t\t\tint waitCount=transactionManager.getCountInterestByMemberId(memberId,0,date);\n\t\t\tint hadCount=transactionManager.getCountInterestByMemberId(memberId,1,date);\n\t\t\tint countIng=transactionManager.getCountInterestByMemberId(memberId,4,date);\n\t\t\t\n\t\t\tBigDecimal totalInvestAmount = transactionManager.getTotalInvestAmount(date);\n\t \t \t// msg.add(\"亲爱的\").add(trueName).add(\",平台\").add(dateString).add(\":\");\n\t \t \t// msg.addln();\n\t \t \t msg.add(\"平台注册量:\").add(Integer.toString(count));\n\t \t \t msg.addln();\n\t \t \t msg.add(\"平台投资额为:\").add(FormulaUtil.getFormatPriceRound(investAmount));\n\t \t \t msg.addln();\n\t \t \t msg.add(\"募集中金额:\").add(FormulaUtil.getFormatPriceRound(totalInvestAmount));\n\t \t \t msg.addln();\n\t \t \t msg.add(\"待回款笔数:\").add(Integer.toString(waitCount)).add(\"总额:\").add(FormulaUtil.getFormatPriceRound(totalAssets));\n\t \t \t msg.addln();\n\t \t \t msg.add(\"回款中笔数:\").add(Integer.toString(countIng)).add(\"总额:\").add(FormulaUtil.getFormatPriceRound(returnAssets));\n\t \t \t msg.addln();\n\t \t \t msg.add(\"已回款笔数:\").add(Integer.toString(hadCount)).add(\"总额:\").add(FormulaUtil.getFormatPriceRound(hadAssets));\n\t \t \t msg.addln();\n\t \t \t msg.setToUserName(fromUserName);\n\t \t \t msg.setFromUserName(toUserName);\n\t\t\t\n\t\t} catch (ManagerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t return msg.toXml();\n\t\t\n\t}",
"public TransactionResponse getTransactionByIdAndType(String id, String type) throws ParseException {\n TransactionResponse response = new TransactionResponse();\n Predicate<Transaction> byId = t -> t.getId().equals(id);\n Predicate<Transaction> byType = t -> t.getType().equals(type);\n response.setTransaction(idAndTypefilterTransaction(byType, byId));\n return response;\n }",
"double getTodaysIncomeAmount() {\n Long time = new Date().getTime();\n Date date = new Date(time - time % (DAY_DURATION));\n return getIncomeAmount(date.getTime(), date.getTime() + DAY_DURATION);\n }",
"String getPortfolioTotalValue(String portfolioName, Date date) throws IllegalArgumentException;",
"public void availableTrains(int type, String source, String destination) {\n\n\t\tint i = 0, temp = 0;\n\n\t\tif (type == 1) {\n\n\t\t\tIterator<PassengerTrain> itr = TrainDetails.passengerList\n\t\t\t\t\t.iterator();// For passenger train\n\n\t\t\twhile (itr.hasNext()) {\n\t\t\t\tPassengerTrain passenger = itr.next();\n\n\t\t\t\tif (source.equalsIgnoreCase(passenger.getFromPlace())\n\t\t\t\t\t\t&& destination.equalsIgnoreCase(passenger.getToPlace())) {\n\t\t\t\t\ttemp = temp + 1;\n\t\t\t\t\tSystem.out.println(temp);\n\n\t\t\t\t\tif (i == 0) {\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"TRAINID\t\tSOURCE \t\tDESTINATION\tDURATION\tSEATS\t PRICE\");\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(passenger.getTrainId() + \"\t\t \"\n\t\t\t\t\t\t\t+ passenger.getFromPlace() + \"\t\t \"\n\t\t\t\t\t\t\t+ passenger.getToPlace() + \" \t\t\"\n\t\t\t\t\t\t\t+ passenger.getDuration() + \" \t\t\"\n\t\t\t\t\t\t\t+ passenger.getSeats() + \" \t\t\"\n\t\t\t\t\t\t\t+ passenger.getPrice());\n\n\t\t\t\t}\n\n\t\t\t\tif (temp == 0) {\n\t\t\t\t\tSystem.out.println(\"No such trains.Try Another\");\n\t\t\t\t\tTrainMenu menu1 = new TrainMenu();\n\t\t\t\t\tmenu1.menu();\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\telse {// For goods train\n\t\t\tIterator<GoodsTrain> itr = TrainDetails.goodsList.iterator();\n\t\t\twhile (itr.hasNext()) {\n\t\t\t\tGoodsTrain goods = itr.next();\n\t\t\t\tif (source.equalsIgnoreCase(goods.getFromPlace())\n\t\t\t\t\t\t&& destination.equalsIgnoreCase(goods.getToPlace())) {\n\t\t\t\t\ttemp = temp + 1;\n\t\t\t\t\tif (i == 0) {\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"Train Number \tSOURCE \t\tDESTINATION\t\tTIME\t\tWEIGHT\t\tPRICE\");\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(goods.getTrainId() + \"\t\t \"\n\t\t\t\t\t\t\t+ goods.getFromPlace() + \"\t\t \" + goods.getToPlace()\n\t\t\t\t\t\t\t+ \" \t\t\" + goods.getDuration() + \" \t\t\"\n\t\t\t\t\t\t\t+ goods.getWeight() + \" \t\t\" + goods.getPrice());\n\n\t\t\t\t}\n\n\t\t\t\tif (temp == 0) {\n\t\t\t\t\tSystem.out.println(\"No such trains.Try another\");\n\t\t\t\t\tTrainMenu menu1 = new TrainMenu();\n\t\t\t\t\tmenu1.menu();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}"
] |
[
"0.6863992",
"0.62299436",
"0.61933976",
"0.61445755",
"0.55187166",
"0.54619086",
"0.54394954",
"0.5400155",
"0.53853095",
"0.53339136",
"0.5259555",
"0.52413774",
"0.5196179",
"0.5168055",
"0.5159353",
"0.5099769",
"0.509975",
"0.50910556",
"0.50615096",
"0.5051203",
"0.50304365",
"0.5025785",
"0.49789596",
"0.495401",
"0.4936238",
"0.4923274",
"0.49103767",
"0.490484",
"0.48891968",
"0.4888179",
"0.48806772",
"0.4874663",
"0.48726195",
"0.48611945",
"0.48458654",
"0.48386204",
"0.481019",
"0.47939488",
"0.47859687",
"0.47831354",
"0.47457394",
"0.47410104",
"0.47360396",
"0.47227392",
"0.46924376",
"0.46804482",
"0.46607268",
"0.46579552",
"0.46456435",
"0.4640133",
"0.46342367",
"0.46237373",
"0.46066174",
"0.46050042",
"0.4603994",
"0.45937526",
"0.458413",
"0.45799032",
"0.4577687",
"0.4573878",
"0.45610875",
"0.45600986",
"0.45570302",
"0.45505145",
"0.4547489",
"0.45459506",
"0.45456666",
"0.45408422",
"0.45189586",
"0.45108688",
"0.45041925",
"0.4500297",
"0.44980848",
"0.44979438",
"0.44913542",
"0.4485399",
"0.44830653",
"0.44814345",
"0.44799215",
"0.44776285",
"0.44695908",
"0.44628793",
"0.44607374",
"0.44511703",
"0.445085",
"0.4450456",
"0.44494796",
"0.44462094",
"0.44424155",
"0.44404984",
"0.44327757",
"0.44231427",
"0.44197625",
"0.4415298",
"0.44121373",
"0.44082755",
"0.44074342",
"0.44057012",
"0.4404427",
"0.4396337"
] |
0.7685579
|
0
|
Returns a page of transactions with the passed fromtype & fromID.
|
@GetMapping("/by-from-data")
public Page<Transaction> getTransactionsByFromDataAndPageable(
@RequestParam TransactionFromType fromType,
@RequestParam Long fromId,
Pageable pageable)
{
Page<Transaction> pageOfTransactions = transactionService.getTransactionsByFromDataAndPageable(fromType, fromId, pageable);
return pageOfTransactions;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@GetMapping(\"/by-to-data\")\n\tpublic Page<Transaction> getTransactionsByToDataAndPageable(\n\t\t@RequestParam TransactionToType toType,\n\t\t@RequestParam Long toId,\n\t\tPageable pageable) \n\t{\n\t\tPage<Transaction> pageOfTransactions = transactionService.getTransactionsByToDataAndPageable(toType, toId, pageable);\t\n\t\treturn pageOfTransactions;\n\t}",
"@GetMapping(params = \"type\")\n\tpublic Page<Transaction> getTransactionsByTypeAndPageable(\n\t\t@RequestParam String type, \n\t\tPageable pageable) \n\t{\n\t\tPage<Transaction> pageOfTransactions = null;\n\t\t\n\t\ttry {\n\t\t\tpageOfTransactions = transactionService.getTransactionsByTypeAndPageable(type, pageable);\n\t\t}\n\t\tcatch (InvalidDataException e) {\n\t\t\tString exceptionMessage = e.getMessage();\n\t\t\tthrow new InvalidDataException(exceptionMessage);\n\t\t}\n\t\t\n\t\treturn pageOfTransactions;\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<T> getPage(Class<T> type, int PageNo,int PageSize,int StartNo) {\n\t\tQuery query=super.getSessionFactory().getCurrentSession().createQuery(\"from \"+type.getName()+\"\");\r\n\t\tquery.setMaxResults(PageSize);\r\n\t\tquery.setFirstResult(StartNo+PageNo*PageSize);\r\n\t\treturn (List<T>)query.list();\r\n\t}",
"@GetMapping(\"/between-dates\")\n\tpublic Page<Transaction> getTransactionsBetweenDatesByTypeAndPageable(\n\t\t@RequestParam String type,\n\t\t@RequestParam @DateTimeFormat(pattern = \"dd.MM.yyyy\") Date startDate,\n\t\t@RequestParam @DateTimeFormat(pattern = \"dd.MM.yyyy\") Date endDate,\n\t\tPageable pageable) \n\t{\n\t\tPage<Transaction> pageOfTransactions = null;\n\t\t\n\t\ttry {\n\t\t\tpageOfTransactions = transactionService.getTransactionsBetweenDatesByTypeAndPageable(type, startDate, endDate, pageable);\n\t\t}\n\t\tcatch (InvalidDataException e) {\n\t\t\tString exceptionMessage = e.getMessage();\n\t\t\tthrow new InvalidDataException(exceptionMessage);\n\t\t}\n\t\t\n\t\treturn pageOfTransactions;\n\t}",
"@Override\n\tpublic List<TransactionHistory> getTransactionByDateRange(String userID,\n\t\t\tDate dateFrom, Date dateTo, int state) {\n\t\tList<TransactionHistory> result = null;\n\t\t\n\t\tTypedQuery<TransactionHistory> query = em.createQuery(\"SELECT t FROM TransactionHistory t WHERE\"\n\t\t\t\t+ \" (t.sendAccount.id = :id OR t.receiveAccount.id = :id) \"\n\t\t\t\t+ \"AND t.state.idState = :state \"\n\t\t\t\t+ \"AND (t.date >= :dateFrom AND t.date <= :dateTo)\", TransactionHistory.class);\t\t\t\n\t\t\n\t\tquery.setParameter(\"id\", userID);\n\t\tquery.setParameter(\"state\", state);\n\t\tquery.setParameter(\"dateFrom\", dateFrom);\n\t\tquery.setParameter(\"dateTo\", dateTo);\n\t\tresult = query.getResultList();\n\t\t\n\t\treturn result;\n\t}",
"public List getPagesByAccount(long accountid, int from, int to) {\n\t\ttry {\n\t\t\treturn getPagesDAO().getPagesOnAccountID(accountid, from, to);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Error while getting Pages on account\", e);\n\t\t}\n\t\treturn null;\n\t}",
"List selectByExampleWithPage(PaymentTradeExample example);",
"long getAmountPage();",
"public List<Transaction> getAllDepositTransactions(int start, int numOfRows) throws MiddlewareQueryException;",
"Page<TITransferDetails> findAll(Pageable pageable);",
"@Override\n\tpublic Page getRenterRecordPage(int currentPage, int renterId) {\n\t\tRenter renter = renterDao.findOne(renterId);\n\t\tPage page= new Page();\n\t\n\t\tPageRequest request = new PageRequest(page.getStartIndex(),page.getPageSize());\n\t\tpage.setTotalPage(getTotalCount(renter));\n\t\tpage.setCurrentPage(currentPage);\n\t\t List<RentPort> list=getRenterRecordByHisId(renter,page);\n\t\t page.setList(list);\n\t\treturn page;\n\t}",
"@Override\n\tpublic List<Payments> query(Map<String, Object> filter, int start, int rows) {\n\t\tRowBounds rb = new RowBounds(start, rows);\n\n\t\treturn this.mapper.queryPage(filter, rb);\n\t}",
"public List<Timetable> pagging(int pageIndex, int pageSize) throws Exception;",
"public abstract <T> Page<T> list(Pageable pageable, Class<T> clazz);",
"@Transactional\n @Override\n public PageUtils queryPage(Map<String, Object> params) {\n QueryWrapper<PurchaseDetailEntity> wrapper = new QueryWrapper<>();\n String key = (String) params.get(\"key\");\n if (!StringUtils.isEmpty(key)) {\n wrapper.and(w->{\n w.eq(\"purchase_id\", key).or().like(\"sku_id\", key);\n });\n }\n String status = (String) params.get(\"status\");\n if (!StringUtils.isEmpty(status)) {\n wrapper.eq(\"status\", status);\n }\n String wareId = (String) params.get(\"wareId\");\n if (!StringUtils.isEmpty(wareId)) {\n wrapper.eq(\"ware_id\", wareId);\n }\n IPage<PurchaseDetailEntity> page = this.page(\n new Query<PurchaseDetailEntity>().getPage(params),\n wrapper\n );\n\n return new PageUtils(page);\n }",
"List<T> findPage(int pageNumber);",
"Page<AccountDTO> coverListAccountToListEmpDTO(Page<Account> accounts);",
"public static List<Transaction> getTransactionsFilteredByDate(String startDate, String endDate,\r\n\t\t\tTransactionType transactionType) {\r\n\t\tList<Transaction> transactions = new ArrayList<>();\r\n\t\tdbConnect();\r\n\t\tStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\t// SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\t// Date start = (Date) sdf.parse(startDate);\r\n\t\t// Date end = (Date) sdf.parse(endDate);\r\n\t\tfinal String OPEN_TRANSACTIONS_FROM_DB;\r\n\t\tif (transactionType == TransactionType.PURCHASE)\r\n\t\t\tOPEN_TRANSACTIONS_FROM_DB = \"SELECT * FROM purchase WHERE DATE(purchase_date) >= DATE('\" + startDate\r\n\t\t\t\t\t+ \"') AND DATE(purchase_date) <= DATE('\" + endDate + \"') ORDER BY purchase_id DESC\";\r\n\t\telse\r\n\t\t\tOPEN_TRANSACTIONS_FROM_DB = \"SELECT * FROM sales WHERE DATE(sales_date) >= DATE('\" + startDate\r\n\t\t\t\t\t+ \"') AND DATE(sales_date) <= DATE('\" + endDate + \"') ORDER BY sales_id DESC\";\r\n\t\ttry {\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\trs = stmt.executeQuery(OPEN_TRANSACTIONS_FROM_DB);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tint transactionNumber = rs.getInt(1);\r\n\t\t\t\tString transactionDate = rs.getString(2);\r\n\t\t\t\tString nameOfClient = getClient(rs.getInt(3), transactionType).getName();\r\n\t\t\t\tdouble cashGiven = rs.getDouble(4);\r\n\t\t\t\tObservableList<Product> productList = getProductTransaction(rs.getInt(1), transactionType);\r\n\r\n\t\t\t\ttransactions.add(new Transaction(transactionNumber, transactionDate, nameOfClient, cashGiven, cashGiven,\r\n\t\t\t\t\t\tproductList.size(), productList));\r\n\t\t\t}\r\n\t\t\tstmt.close();\r\n\t\t\trs.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn transactions;\r\n\t}",
"PageInfo list(Date beginDate, Date endDate, List<Integer> resources, int pageNo, int pageSize);",
"@Transactional\r\n\tpublic List<Trip> getPageTripsByType(int id, int start, int maxCount) {\n\t\treturn dao.getPageTripsByType(id, start, maxCount);\r\n\t}",
"Page<TypeBonDTO> findAll(Pageable pageable);",
"List<T> getAllByRange(int firstItemNumber,\n int itemsCount,\n String sortBy,\n String sortTo);",
"public List<LotReportRow> generateReportOnLotsByEntityTypeAndEntityId(String type, Integer entityId, int start, int numOfRows) throws MiddlewareQueryException;",
"List<Item<T>> addItemsForPage(final long page);",
"List<MasterZipcode> getByPage(int pageNo);",
"List<TransactionRec> loadRecordsByAccount(BankAccount account);",
"public interface TransactionService {\r\n public Map<String, Object> findByPage(Query query);\r\n}",
"@Override\n\tpublic JSONObject getByPage(String param) {\n\t\tJSONObject data = new JSONObject();\n\t\tJSONObject result = new JSONObject();\n\t\tMainUtility mainUtil = new MainUtility();\n\t\tJSONObject jsonParams = mainUtil.stringToJson(param);\n\t\tStringBuilder builder = new StringBuilder();\n\t\tStringBuilder builderGetTotal = new StringBuilder();\n\n\t\tbuilder.append(\"SELECT `wt_id`, `wt_title`, `wt_content`, user.full_name, \"\n\t\t\t\t+ \"IF(writing_test.created_date IS NULL,null, DATE_FORMAT(writing_test.created_date, '%d-%m-%Y')) AS created_date FROM writing_test \"\n\t\t\t\t+ \"LEFT JOIN crm_user AS user ON writing_test.created_by = user.user_id WHERE 1=1 \");\n\t\tbuilderGetTotal.append(\"SELECT COUNT(1) FROM `writing_test` \"\n\t\t\t\t+ \" WHERE 1=1\");\n\t\t// filter header\n\t\tif (jsonParams.get(\"status\") == null || Integer.parseInt(jsonParams.get(\"status\").toString()) == -1) {\n\t\t\tbuilder.append(\" AND writing_test.deleted <> 1\");\n\t\t\tbuilderGetTotal.append(\" AND writing_test.deleted <> 1\");\n\t\t} else if (Integer.parseInt(jsonParams.get(\"status\").toString()) == -2) {// thùng rác\n\t\t\tbuilder.append(\" AND writing_test.deleted = 1\");\n\t\t\tbuilderGetTotal.append(\" AND writing_test.deleted = 1\");\n\t\t}\n\t\tif (jsonParams.get(\"wt_title\") != null && !\"\".equals(jsonParams.get(\"wt_title\").toString())) {\n\t\t\tbuilder.append(\" AND wt_title LIKE N'%\" + jsonParams.get(\"wt_title\").toString() + \"%'\");\n\t\t\tbuilderGetTotal\n\t\t\t\t\t.append(\" AND wt_title LIKE N'%\" + jsonParams.get(\"wt_title\").toString() + \"%'\");\n\t\t}\n\t\tif (jsonParams.get(\"wt_content\") != null && !\"\".equals(jsonParams.get(\"wt_content\").toString())) {\n\t\t\tbuilder.append(\" AND wt_content LIKE N'%\" + jsonParams.get(\"wt_content\").toString() + \"%'\");\n\t\t\tbuilderGetTotal\n\t\t\t\t\t.append(\" AND wt_content LIKE N'%\" + jsonParams.get(\"wt_content\").toString() + \"%'\");\n\t\t}\n\t\t// sortby\n\t\tif (jsonParams.get(\"sortField\") != null && !\"\".equals(jsonParams.get(\"sortField\").toString())) {\n\t\t\tswitch (jsonParams.get(\"sortField\").toString()) {\n\t\t\tdefault:\n\t\t\t\tbuilder.append(\" ORDER BY writing_test.created_date DESC\");\n\t\t\t\tbreak;\n\t\t\t}\n//\t\t\tif (jsonParams.get(\"sortOrder\") != null && \"descend\".equals(jsonParams.get(\"sortOrder\").toString())) {\n//\t\t\t\tbuilder.append(\" DESC\");\n//\t\t\t}\n//\t\t\tif (jsonParams.get(\"sortOrder\") != null && \"ascend\".equals(jsonParams.get(\"sortOrder\").toString())) {\n//\t\t\t\tbuilder.append(\" ASC\");\n//\t\t\t}\n\t\t}\n\t\tmainUtil.getLimitOffset(builder, jsonParams);\n\t\ttry {\n\t\t\tint totalRow = this.jdbcTemplate.queryForObject(builderGetTotal.toString(), Integer.class);\n\t\t\tList<Map<String, Object>> lstWrittingTest = this.jdbcTemplate.queryForList(builder.toString());\n\t\t\tJSONObject results = new JSONObject();\n\t\t\tresults.put(\"results\", lstWrittingTest);\n\t\t\tresults.put(\"total\", totalRow);\n\t\t\tdata.put(\"data\", results);\n\t\t\tdata.put(\"success\", true);\n\t\t} catch (Exception e) {\n\t\t\tdata.put(\"success\", false);\n\t\t\tdata.put(\"err\", e.getMessage());\n\t\t\tdata.put(\"msg\", \"Lấy danh sách bài kiểm tra thất bại\");\n\t\t}\n\t\treturn data;\n\t}",
"public List<Transaction> getAllReserveTransactions(int start, int numOfRows) throws MiddlewareQueryException;",
"List<CustomerInformation> queryListByCustomer(Integer page, Integer rows, CustomerInformation cust);",
"List selectByExampleWithPage(PaymentTradeExampleExtended exampleExtended);",
"@Override\n\tpublic Page getRenterApplyPage(int currentPage, int renterId) {\n\t\tRenter renter = renterDao.findOne(renterId);\n\t\tPage page= new Page();\n\t\tpage.setPageSize(getTotalCount(renter));\n\t\tPageRequest request = new PageRequest(page.getStartIndex(),page.getPageSize());\n\t\tpage.setTotalPage(getTotalCount(renter));\n\t\tpage.setCurrentPage(currentPage);\n\t List<RentPort> list= getRenterInfoByHisId(renter,page);\n\t page.setList(list);\n\t\treturn page;\n\t}",
"public List<Object> retrievePagingList(PageBean pageBean) ;",
"@Override\n @Transactional\n public Page pageQuery(String orgcode, String cnname, String startdate, String enddate, String pageno) {\n p.setPageno(Integer.parseInt(pageno));\n List<En> ens = ed.pageQuery(orgcode,cnname,startdate,enddate);\n p.setTotalsize(ens.size());\n p.setTotalpage((p.getTotalsize()%p.getPagesize())==0?p.getTotalsize()/p.getPagesize():p.getTotalsize()/p.getPagesize()+1);\n PageHelper.startPage(Integer.parseInt(pageno),p.getPagesize());\n List<En> ens1 = ed.pageQuery(orgcode,cnname,startdate,enddate);\n p.setInvs(ens1);\n return p;\n }",
"@Override\n\t@RequestMapping(value=\"/item/list\")\n\tpublic EasyUIDatagrid<TbItem> getItemsByPage(@RequestParam(value = \"page\", defaultValue=\"1\") Integer page,\n\t\t\t@RequestParam(value = \"rows\" ,defaultValue=\"30\") Integer rows) {\n\t\treturn service.getItemsByPage(page, rows);\n\t}",
"@Override\n public PageResult<BorrowDO> selectByQueryWithPage(BorrowQuery query) {\n PageResult<BorrowDO> result = new PageResult<BorrowDO>();\n result.setPageSize(query.getPageSize());\n result.setPageNo(query.getPageNo());\n result.setTotalCount(this.countByQuery(query));\n result.setResult(this.selectByQuery(query));\n return result;\n }",
"public Page<Account> getAccPage(Pageable page);",
"@Override\n\tpublic List<Record> getRecordByTypePageNum(Type type, int pageNum, int line) {\n\t\t Session session=HibernateSessionFactory.getSession();\n\t\t\tTransaction tx=session.beginTransaction();\n\t\t\tList<Record> list=new ArrayList<Record>();\n\t\t\tRecordDAO recordDAO=new RecordDAO();\n\t\t\t\n\t\t\ttry{\n\t\t\t\tlist=recordDAO.getRecordByTypePageNum(type, pageNum, line);\n\t\t\t\ttx.commit();\n\t\t\t}catch(RuntimeException e){\n\t\t\t\te.printStackTrace();\n\t\t\t\ttx.rollback();\n\t\t\t}finally{\n\t\t\t\tsession.close();\n\t\t\t}\n\t\t\treturn list;\n\t\t}",
"List<ShopItem> findAllByInTopPageTrue();",
"public List<LotReportRow> generateReportOnLotsByEntityType(String type, int start, int numOfRows) throws MiddlewareQueryException;",
"public TransactionResponse getTransactionByIdAndType(String id, String type) throws ParseException {\n TransactionResponse response = new TransactionResponse();\n Predicate<Transaction> byId = t -> t.getId().equals(id);\n Predicate<Transaction> byType = t -> t.getType().equals(type);\n response.setTransaction(idAndTypefilterTransaction(byType, byId));\n return response;\n }",
"public List<LotReportRow> generateReportOnLotsByEntityTypeAndEntityId(String type, List<Integer> entityIds, int start, int numOfRows) throws MiddlewareQueryException;",
"@Override\n\tpublic <T> PageResult<T> page(Map<String, CustmerCriteria> params, Integer currentPage, Integer pageSize,\n\t\t\tClass<T> entityClass) throws Exception {\n\t\treturn null;\n\t}",
"Page<TypeBonDTO> search(String query, Pageable pageable);",
"public interface ITBKRest {\r\n\r\n public Page<GoodsItem> search(String q,String cat,String itemloc,String sort,boolean is_tmall,boolean is_overseas,long start_price,long end_price,long start_tk_rate,long end_tk_rate,long platform,long page_no,long page_size);\r\n\r\n public Page<ShopItem> searchShop(String q, String sort, boolean is_tmall, long start_credit, long start_commission_rate, long end_commission_rate, long start_total_action, long end_total_action, long start_auction_count, long end_auction_count,long platform,long page_no,long page_size );\r\n\r\n public Page<CatItem> getCat(long[] cids,long parentCid);\r\n}",
"@Override\n\tpublic MemberDTO getMyPage(MemberDTO mdto) {\n\t\treturn mdao.getMember(mdto);\n\t}",
"@Override\n\tpublic List<CustomerType> queryByUsePage(Map<String, Object> entrys, int pageSize, int pageNumber) {\n\t\treturn null;\n\t}",
"Page<Contact> getContacts(int index, int size);",
"Page<BalanceSheetDTO> findAll(Pageable pageable);",
"Collection<Transaction> findAllByTransactiontype(int type, Sort sort);",
"@Override\r\n\tpublic List<TUsers> queryByPage(int page, QueryUser query) {\n\t\t\r\n\t\tint start=(page-1)*contests.PAGECONT+1;\r\n\t\tint end=page*contests.PAGECONT;\r\n\t\tquery.setStart(start);\r\n\t\tquery.setEnd(end);\r\n\t\treturn dao.queryByPage(query);\r\n\t}",
"public List<Lot> getLotsByEntityTypeAndEntityId(String type, Integer entityId, int start, int numOfRows) throws MiddlewareQueryException;",
"Page<ItemPriceHistoryDTO> findAll(Pageable pageable);",
"@PreAuthorize(\"hasAnyRole('ADMIN')\")\n\t@RequestMapping(value=\"/page\",method=RequestMethod.GET) \n\tpublic ResponseEntity<Page<ClienteDTO>> findPage(\n\t\t\t@RequestParam(value=\"page\", defaultValue=\"0\") Integer page, \n\t\t\t@RequestParam(value=\"linesPerPage\", defaultValue=\"24\") Integer linesPerPage, //24 pq eh multiplo de 1, 2 3 e 4\n\t\t\t@RequestParam(value=\"orderBy\", defaultValue=\"nome\") String orderBy, \n\t\t\t@RequestParam(value=\"direction\", defaultValue=\"ASC\") String directionOrder) { //asc eh ascendente \n\t\t\n\t\tPage<Cliente> list = service.findPage(page,linesPerPage,orderBy,directionOrder);\n\t\t\n\t\tPage<ClienteDTO> listDTO = list.map(obj->new ClienteDTO(obj));\n\t\t\n\t\treturn ResponseEntity.ok().body(listDTO); \n\t\t\n\t}",
"public Iterator<T> getPageElements();",
"void findWithPagination(Pagination<Activity, Assignment> pagination);",
"List<E> page(Page page, Long...params);",
"public void getRangeShowsList(JsonHttpResponseHandler handler, int page, String fromDate, String toDate) {\n RANGE_PAGE = page;\n client.get(RANGE_SHOWS_URL(fromDate, toDate), handler);\n }",
"public List<Transaction> getAllDepositTransactionsByDonor(Integer personId, int start, int numOfRows) throws MiddlewareQueryException;",
"@RequestMapping(\"query\")\r\n\t@ResponseBody\r\n\tpublic EasyUIResult findItemByPage(@RequestParam(value=\"page\")Integer page,Integer rows) {\r\n\t\tSystem.out.println(itemService.findItemByPage(page, rows));\r\n\t\treturn itemService.findItemByPage(page, rows);\r\n\t\t\r\n\t}",
"public List<TransactionReportRow> generateReportOnAllReserveTransactions(int start, int numOfRows) throws MiddlewareQueryException;",
"public List<Transaction> getAllReserveTransactionsByRequestor(Integer personId, int start, int numOfRows) throws MiddlewareQueryException;",
"Page<AccountDTO> findAllAccount(Pageable pageable);",
"@Transactional\r\n\tpublic List<Trip> getPageTripByCondition(Integer start, Integer maxCount) {\n\t\treturn null;\r\n\t}",
"Page<RefTarifDTO> findAll(Pageable pageable);",
"public abstract Page<CustomerInfo> findAll(GlobalSearch globalSearch, Pageable pageable);",
"@Override\n\tpublic List<Signuptable> findPage(String where, int startIndex, int pageSize) {\n\t\treturn null;\n\t}",
"Page<BalanceDTO> findAll(Pageable pageable);",
"GeneralSearchForm searchPurchaseOrderHeadersPaging(GeneralSearchForm searchForm);",
"public List<Orderlinecharges> findBycreatettsBetween(Date start,Date end,Pageable pageable);",
"Integer getPage();",
"public List<String> getListIdFromTo(String from , String to , String formid) throws AncestryException {\n\t\tList<String> listFormKey = new ArrayList<String>();\n\t\tConnection con = null;\n\t\tString sql = \"\";\n\t\ttry {\n\t\t\tsql = \"SELECT id FROM \" + management + \" WHERE step =4 AND id BETWEEN \"+ from +\" AND \"+ to +\n\t\t\t\t \" AND formid =\"+formid+\" ORDER BY id\" ;\n\t\t\tcon = db.getConnectByProject(project);\n\t\t\tlistFormKey = JdbcHelper.queryToSingleList(con, sql , true);\n\t\t} catch (Exception e) {\n\t\t\tthrow new AncestryException(\"getListIdFromTo : \" + e.toString(),e);\n\t\t}\n\t\tfinally {\n\t\t\tJdbcHelper.close(con);\n\t\t}\n\t\treturn listFormKey;\n\t}",
"public List<TransactionReportRow> generateReportOnAllWithdrawalTransactions(int start, int numOfRows) throws MiddlewareQueryException;",
"List<Activity> findAllPageable(int page, int size);",
"public abstract Page<CustomerOrder> findAll(GlobalSearch globalSearch, Pageable pageable);",
"@GET\n @Path(\"account/transactions/{account_id}\")\n public Response getAccountTransactions(@PathParam(\"account_id\") \n String accountId) {\n \n String output = \"This entry point will return all transactions related to the account: \" + accountId;\n return Response.status(200).entity(output).build();\n \n }",
"@GET\n @Path( \"transactions\" )\n void getTransactions( @QueryParam( \"orderId\" ) Long orderId,\n @QueryParam( \"invoiceId\" ) Long invoiceId,\n SuccessCallback<Items<Transaction>> callback );",
"void findWithPagination(Pagination<Task, Project> pagination);",
"public List<Payment> viewAllPaymentsPaginated(int start, int limit) {\n\t\tList<Payment> list = new ArrayList<>(payments.values());\n\t\tif(start + limit >= list.size()){\n\t\t\treturn list.subList(start, list.size());\n\t\t}\n\t\treturn list.subList(start, start + limit);\n\t}",
"@Transactional(propagation = Propagation.REQUIRED)\n public List<Item> getPagedItems(ItemPagedQueryResponse itemPagedQueryResponse) {\n return itemDao.getPagedItems(itemPagedQueryResponse);\n }",
"public List<Lot> getLotsByEntityType(String type, int start, int numOfRows) throws MiddlewareQueryException;",
"@Override\n\tpublic List<TransactionHistory> getTransactionByUserId(String id, int state) {\n\t\tList<TransactionHistory> result = null;\n\t\t\n\t\tTypedQuery<TransactionHistory> query = em.createQuery(\"SELECT t FROM TransactionHistory t WHERE (t.sendAccount.id = :id \"\n\t\t\t\t+ \" OR t.receiveAccount.id = :id) AND t.state.idState = :state\", TransactionHistory.class);\n\t\tquery.setParameter(\"id\", id);\n\t\tquery.setParameter(\"state\", state);\n\t\tresult = query.getResultList();\n\t\t\n\t\treturn result;\n\t}",
"public Page<Event> findEventsByEventTypeId(Long typeId , Pageable pageable);",
"public ArrayList<Transaction> GetUserTransactions(int UserID);",
"List<ProductView> getAllByPage(PageableAndSortable pageableAndSortable) throws ProductException;",
"public abstract Page<CustomerInfo> findAllByIdsIn(List<Long> ids, GlobalSearch globalSearch, Pageable pageable);",
"public Page getCustomerProfiles(Integer pageNumber,String requestPage) throws EOTException;",
"public TransmitirResponse transmitirPago(TransmitirPagoRequest tramitePagoRequest) {\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"======================\");\r\n\t\t\tSystem.out.println(\"Inicio: transmitirPago\");\r\n\r\n\t\t\t//1: Se recupera el CDA pagado\r\n\t\t\tBeanTasa tasa = new BeanTasa(); \r\n\t\t\ttasa.setCda(tramitePagoRequest.getCda());\r\n\t\t\ttasa.setMontoPago(tramitePagoRequest.getMonto());\r\n\t\t\ttasa.setFechaPago(tramitePagoRequest.getFechaPago());\r\n\r\n\t\t\t//2: Se actualiza el pago de la Tasa\r\n\t\t\tServicioTasa servicioTasa = new ServicioTasa();\r\n\t\t\tservicioTasa.pagarTasa(tasa);\r\n\r\n\t\t\t//3: Según el CDA pagado, se obtiene la orden y otros datos importantes\r\n\t\t\tBeanFormato formato = new BeanFormato();\r\n\t\t\tServicioOrden servicioOrden = new ServicioOrden();\r\n\t\t\tBeanOrden orden = servicioOrden.buscarOrdenPorCda(tasa.getCda());\r\n\t\t\torden = servicioOrden.buscarOrdenPorOrdenId(orden.getOrdenId(), formato);\r\n\t\t\tBeanTce tce = servicioOrden.buscarTcePorOrdenId(orden.getOrdenId());\r\n\t\t\tBeanMto mto = servicioOrden.buscarMtoVigentePorOrdenId(orden.getOrdenId());\r\n\t\t\tBeanFormatoEntidad formatoEntidad = servicioOrden.buscarFormatoEntidadPorFormato(formato.getFormato(), mto);\r\n\t\t\tBeanAdjunto adjunto = servicioOrden.buscarAdjuntoPorMto(mto);\r\n\t\t\tBeanUsuario usuarioSolicitante = servicioOrden.buscarUsuarioSolicitantePorMto(mto);\r\n\r\n\t\t\t// 2.1: Registrar estado traza 4: Pago Recibido\r\n\t\t\tBeanTraza traza = new BeanTraza();\r\n\t\t\ttraza.setEstadoTraza(4);\r\n\t\t\ttraza.setDe(4);\r\n\t\t\ttraza.setPara(3);\r\n\t\t\tservicioOrden.registrarTraza(tce, mto, null, null, traza);\r\n\r\n\t\t\t//5: Genera la SUCE\r\n\t\t\tServicioSuce servicioSuce = new ServicioSuce();\r\n\t\t\tBeanSuce suce = servicioSuce.generarSuce(orden);\r\n\r\n\t\t\t//6: Se genera el nuevo MTO\r\n\t\t\t//TODO generar nuevo mto, incluye registrar otra vez la orden\r\n\r\n\t\t\t//7: Se transmite la SUCE\r\n\t\t\tservicioSuce.transmitirSuceHaciaEntidad(formato, orden, suce, formatoEntidad, adjunto, usuarioSolicitante.getRuc());\r\n\r\n\t\t\t// 2.1: Registrar estado traza 5: Suce generada\r\n\t\t\ttraza = new BeanTraza();\r\n\t\t\ttraza.setEstadoTraza(5);\r\n\t\t\ttraza.setDe(3);\r\n\t\t\ttraza.setPara(2);\r\n\t\t\tservicioOrden.registrarTraza(tce, mto, null, null, traza);\r\n\r\n\t\t\t//8: Transmitir SUCE a Usuario\r\n\t\t\t//TODO Transmitir SUCE a Usuario\r\n\r\n\t\t\tSystem.out.println(\"Fin\");\r\n\t\t\tSystem.out.println(\"======================\");\r\n\r\n\t\t\tTransmitirResponse res = new TransmitirResponse();\r\n\t\t\tres.setCodigo(suce.getSuce()+\"\");\r\n\t\t\tres.setTexto(\"Exito\");\r\n\t\t\treturn res;\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t\tTransmitirResponse res = new TransmitirResponse();\r\n\t\t\tres.setCodigo(\"ERR\");\r\n\t\t\tres.setTexto(\"Error\");\r\n\t\t\treturn res;\r\n\t\t}\r\n\t}",
"public abstract List<T> findWithOffsetFromPosition(int from, int amount);",
"Page<CoveredActivityDTO> findAll(Pageable pageable);",
"public abstract Page<CustomerOrder> findAllByIdsIn(List<Long> ids, GlobalSearch globalSearch, Pageable pageable);",
"public List<SalePurchase> viewAllSPEntriesPaginated(int start, int limit) {\n\t\t//System.out.println(start + \" \" + limit);\n\t\tList<SalePurchase> list = new ArrayList<>(salePurchaseEntries.values());\n\t\tif(start + limit >= list.size()){\n\t\t\treturn list.subList(start, list.size());\n\t\t}\n\t\treturn list.subList(start, start + limit);\n\t}",
"cosmos.base.query.v1beta1.Pagination.PageRequest getPagination();",
"cosmos.base.query.v1beta1.Pagination.PageRequest getPagination();",
"cosmos.base.query.v1beta1.Pagination.PageRequest getPagination();",
"public ListPager doPage(int pageno, int pagesize, Date beginTime,\n\t\t\tDate endTime) throws SQLException {\n\t\tStringBuffer hql = new StringBuffer(\"from CompanyAccount \");\n\t\t List<Object> params = new ArrayList<Object>();\n\t\t boolean haveParam = false;\n\t\t \n\t\tif (beginTime != null){\n\t\t\tif(!haveParam){\n\t\t\t\t haveParam = true;\n\t\t\t\t hql.append( \" where \" );\n\t\t\t }else {\n\t\t\t\t hql.append( \" and \" );\n\t\t\t }\n\t\t\t hql.append( \" createTime >= ?\" );\n\t\t\t params.add(beginTime);\n\t\t}\n\t\tif (endTime != null){\n\t\t\tif(!haveParam){\n\t\t\t\t haveParam = true;\n\t\t\t\t hql.append( \" where \" );\n\t\t\t }else {\n\t\t\t\t hql.append( \" and \" );\n\t\t\t }\n\t\t\t hql.append( \" createTime <= ?\" );\n\t\t\t params.add(endTime);\n\t\t}\n\t\thql.append(\" order by id desc \");\n\t\tString hqlString = hql.toString();\n\t\tListPager pager = new ListPager();\n\t\tpager.setPageNo(pageno);\n\t\tpager.setRowsPerPage(pagesize);\n\t\t\n\t\tthis.selectPageByHql(hqlString, params.toArray(), pager);\n\t\t/**\n\t\t * 做翻转\n\t\t */\n\t\tif(CollectionUtils.isNotEmpty(pager.getPageData())){\n\t\t\tCollections.reverse(pager.getPageData()); \n\t\t}\n\t\treturn pager;\n\t}",
"@Override\r\n\tpublic HashMap<String, Object> selectStoreQnAPaging(int page, String productId)\r\n\t{\n\t\tHashMap<String, Object> map = new HashMap<>();\r\n\t\tPagingBean qnaBean = new PagingBean(dao.selectQnACountById(productId), page);\r\n\t\tmap.put(\"itemPerPage\", 6);\r\n\t\tmap.put(\"page\", page);\r\n\t\tmap.put(\"productId\", productId);\r\n\t\tmap.put(\"qna\", dao.selectQnAById(map));\r\n\t\tmap.put(\"qnaBean\", qnaBean);\r\n\t\treturn map;\r\n\t}",
"public interface PagedResult<T> {\r\n\r\n\t/*\r\n\t * Result code\r\n\t */\r\n\t\r\n\tpublic static final int RESULT_CODE_OK = 0;\r\n\t\r\n\tpublic static final int RESULT_CODE_KO = -1;\r\n\t\r\n\tpublic static final int FIRST_PAGE_INDEX = 1;\r\n\t\r\n\t/**\r\n\t * The method getElementCount() returns this value if the element count is unavalable\r\n\t */\r\n\tpublic final static Integer ELEMENT_COUNT_UNAVAILABLE = -1;\r\n\t\r\n\t/**\r\n\t * <p>The position of the first element of the current pages ( (currentPage-1) * perPage )</p> \r\n\t * \r\n\t * @return\toffset of the first element in this page\r\n\t */\r\n\tpublic Integer getOffset();\r\n\t\r\n\t/**\r\n\t * <p>Maximum number of elements in a page</p>\r\n\t * \r\n\t * @return\tmaximum number of elements in a page\r\n\t */\r\n\tpublic Integer getPerPage();\r\n\r\n\t/**\r\n\t * <p>Total number of elements in all pages</p>\r\n\t * \r\n\t * @return\ttotal number of elements in all pages\r\n\t */\r\n\tpublic Long getElementCount();\r\n\t\r\n\t/**\r\n\t * <p>Position of current page ( in the range 1 - n )</p>\r\n\t * \r\n\t * @return\tposition of current page\r\n\t */\r\n\tpublic Integer getCurrentPage();\t\r\n\t\r\n\t/**\r\n\t * <p>Total number of pages</p>\r\n\t * \r\n\t * @return\ttotal number of pages\r\n\t */\r\n\tpublic Integer getPageCount();\t\r\n\t\r\n\t/**\r\n\t * <p>Number of elements in current page</p>\r\n\t * \r\n\t * @return\tthe size of the current page\r\n\t */\r\n\tpublic Integer getCurrentPageSize();\r\n\t\r\n\t/**\r\n\t * <p>Elements in the current page</p>\r\n\t * \r\n\t * @return\telements in the current page\r\n\t */\r\n\tpublic Iterator<T> getPageElements();\r\n\r\n\t/**\r\n\t * <p>Elements in the current page</p>\r\n\t * \r\n\t * @return\telements in the current page\r\n\t */\r\n\tpublic List<T> getPageElementsList();\r\n\t\r\n\t/**\r\n\t * <p>Iterator over page numbers ( 1 - n )</p>\r\n\t * \r\n\t * @return\titerator over page numbers ( 1 - n )\r\n\t */\r\n\tpublic Iterator<Integer> getPageCountIterator();\r\n\t\r\n\t/**\r\n\t * Result code for this page\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic int getResultCode();\r\n\t\r\n\t/**\r\n\t * Additional info of this page.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic Map<String, Object> getInfo();\r\n\t\r\n\t\r\n\t/** \r\n\t * <code>true</code> if this is the last page.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic boolean isLastPage();\r\n\t\r\n\t/** \r\n\t * <code>true</code> if this is the last page.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic boolean isFirstPage();\t\r\n\t\r\n\t\r\n\t// ******* additiona method for virtual paging *******\r\n\t\r\n\t// *******************************************************************************************\r\n\t// *******************************************************************************************\r\n\t// * VIRTUAL PAGING IS A METHOD WHERE A VIRTUAL PAGE IS MAPPED INTO A BIGGER PAGE *\r\n\t// *******************************************************************************************\r\n\t// *******************************************************************************************\r\n\t\r\n\t/**\r\n\t * Virtual search key\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic String getVirtualSearchKey();\r\n\t\r\n\tpublic Integer getRealPerPage();\r\n\t\r\n\tpublic Integer getRealCurrentPage();\r\n\t\r\n\tpublic PagedResult<T> getVirtualPage( int currentPage );\r\n\t\r\n\tpublic boolean isSupportVirtualPaging();\r\n\t\r\n\t\r\n\t// ******* additiona method for full result *******\r\n\t\r\n\t// *******************************************************************************************\r\n\t// *******************************************************************************************\r\n\t// * FULL RESULT IS A METHOD OF ACCESS PAGE WHERE ALL ELEMENTS ARE ACCESSIBLE ONLY ITERATING *\r\n\t// *******************************************************************************************\r\n\t// *******************************************************************************************\r\n\t\r\n\t/**\r\n\t * <code>true</code> if the the page contains the full result\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic boolean isFullResult();\r\n\r\n}",
"public abstract Page<T> nextPage(final Page<T> page, final TwilioRestClient client);",
"Page<EventActivityDTO> findAll(Pageable pageable);"
] |
[
"0.6165028",
"0.5836625",
"0.56521326",
"0.5648518",
"0.5574145",
"0.5553556",
"0.5532756",
"0.5509735",
"0.55058676",
"0.55021393",
"0.5496128",
"0.5488209",
"0.53730005",
"0.5274957",
"0.52651185",
"0.5246786",
"0.523536",
"0.5213824",
"0.52003497",
"0.51971585",
"0.51694614",
"0.51566666",
"0.5145953",
"0.5124824",
"0.5115797",
"0.51102096",
"0.5109625",
"0.50091517",
"0.50069296",
"0.50061077",
"0.5002766",
"0.49850115",
"0.49845088",
"0.4972326",
"0.49712625",
"0.49645987",
"0.49620995",
"0.49610716",
"0.49586073",
"0.49454147",
"0.49432072",
"0.49412346",
"0.49296206",
"0.4911326",
"0.49028605",
"0.4894766",
"0.48880434",
"0.48880282",
"0.48864296",
"0.48793402",
"0.48735285",
"0.4873253",
"0.48728153",
"0.48630112",
"0.48521635",
"0.48515287",
"0.48475343",
"0.4844613",
"0.48445204",
"0.48428613",
"0.48416457",
"0.48202494",
"0.4815015",
"0.4814325",
"0.48113853",
"0.48042062",
"0.48002264",
"0.47951457",
"0.4794465",
"0.4792974",
"0.47815076",
"0.477439",
"0.4773137",
"0.47724688",
"0.4755741",
"0.47539634",
"0.47468853",
"0.4741529",
"0.47397283",
"0.473913",
"0.4739103",
"0.4735981",
"0.4735183",
"0.4732857",
"0.47302914",
"0.47242638",
"0.47204193",
"0.47178364",
"0.471238",
"0.47106433",
"0.47098666",
"0.4701983",
"0.47016498",
"0.47016498",
"0.47016498",
"0.47005838",
"0.47005633",
"0.46998012",
"0.46958715",
"0.46877512"
] |
0.77182466
|
0
|
Returns a page of transactions with the passed totype & toID.
|
@GetMapping("/by-to-data")
public Page<Transaction> getTransactionsByToDataAndPageable(
@RequestParam TransactionToType toType,
@RequestParam Long toId,
Pageable pageable)
{
Page<Transaction> pageOfTransactions = transactionService.getTransactionsByToDataAndPageable(toType, toId, pageable);
return pageOfTransactions;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@GetMapping(\"/by-from-data\")\n\tpublic Page<Transaction> getTransactionsByFromDataAndPageable(\n\t\t@RequestParam TransactionFromType fromType,\n\t\t@RequestParam Long fromId,\n\t\tPageable pageable) \n\t{\n\t\tPage<Transaction> pageOfTransactions = transactionService.getTransactionsByFromDataAndPageable(fromType, fromId, pageable);\n\t\treturn pageOfTransactions;\n\t}",
"@GetMapping(params = \"type\")\n\tpublic Page<Transaction> getTransactionsByTypeAndPageable(\n\t\t@RequestParam String type, \n\t\tPageable pageable) \n\t{\n\t\tPage<Transaction> pageOfTransactions = null;\n\t\t\n\t\ttry {\n\t\t\tpageOfTransactions = transactionService.getTransactionsByTypeAndPageable(type, pageable);\n\t\t}\n\t\tcatch (InvalidDataException e) {\n\t\t\tString exceptionMessage = e.getMessage();\n\t\t\tthrow new InvalidDataException(exceptionMessage);\n\t\t}\n\t\t\n\t\treturn pageOfTransactions;\n\t}",
"Page<TITransferDetails> findAll(Pageable pageable);",
"public void setToId(Integer toId) {\n this.toId = toId;\n }",
"@Override\n\tpublic MemberDTO getMyPage(MemberDTO mdto) {\n\t\treturn mdao.getMember(mdto);\n\t}",
"@GetMapping\n\tpublic Page<Transaction> getTransactionsByPageable(Pageable pageable) {\n\t\tPage<Transaction> pageOfTransactions = transactionService.getTransactionsByPageable(pageable);\n\t\treturn pageOfTransactions;\n\t}",
"public List<Comentario> buscaPorTopico(Topico t);",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<T> getPage(Class<T> type, int PageNo,int PageSize,int StartNo) {\n\t\tQuery query=super.getSessionFactory().getCurrentSession().createQuery(\"from \"+type.getName()+\"\");\r\n\t\tquery.setMaxResults(PageSize);\r\n\t\tquery.setFirstResult(StartNo+PageNo*PageSize);\r\n\t\treturn (List<T>)query.list();\r\n\t}",
"@Override\n\tpublic Page getRenterRecordPage(int currentPage, int renterId) {\n\t\tRenter renter = renterDao.findOne(renterId);\n\t\tPage page= new Page();\n\t\n\t\tPageRequest request = new PageRequest(page.getStartIndex(),page.getPageSize());\n\t\tpage.setTotalPage(getTotalCount(renter));\n\t\tpage.setCurrentPage(currentPage);\n\t\t List<RentPort> list=getRenterRecordByHisId(renter,page);\n\t\t page.setList(list);\n\t\treturn page;\n\t}",
"Page<TypeBonDTO> findAll(Pageable pageable);",
"long getAmountPage();",
"public List<Timetable> pagging(int pageIndex, int pageSize) throws Exception;",
"List<ShopItem> findAllByInTopPageTrue();",
"public List<Transaction> getAllDepositTransactionsByDonor(Integer personId, int start, int numOfRows) throws MiddlewareQueryException;",
"@POST\n\t@Produces(MediaType.APPLICATION_JSON)\n\t@Consumes(MediaType.APPLICATION_JSON)\n\t@Path(\"/search\")\n\tpublic Response searchTransactionOrder(TransactionOrderTo transactionOrderTo,\n\t\t\t@Context HttpServletRequest request) {\n\t\ttry {\n\t\t\ttransactionOrderTo = ShoppingCartFactory.getTransactionOrderDao().searchById(\n\t\t\t\t\ttransactionOrderTo.getId());\n\t\t\treturn Response.status(201).entity(transactionOrderTo).build();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tString error = \"Unable to Find Record\";\n\t\t\treturn Response.status(403).entity(error).build();\n\t\t}\n\t}",
"List selectByExampleWithPage(PaymentTradeExample example);",
"@Transactional\r\n\tpublic List<Trip> getPageTripsByType(int id, int start, int maxCount) {\n\t\treturn dao.getPageTripsByType(id, start, maxCount);\r\n\t}",
"public void setToId(java.lang.String toId) {\n this.toId = toId;\n }",
"public Set<Transaction> getTransactionsByLotId(Integer id) throws MiddlewareQueryException;",
"@Override\n\tpublic JSONObject getByPage(String param) {\n\t\tJSONObject data = new JSONObject();\n\t\tJSONObject result = new JSONObject();\n\t\tMainUtility mainUtil = new MainUtility();\n\t\tJSONObject jsonParams = mainUtil.stringToJson(param);\n\t\tStringBuilder builder = new StringBuilder();\n\t\tStringBuilder builderGetTotal = new StringBuilder();\n\n\t\tbuilder.append(\"SELECT `wt_id`, `wt_title`, `wt_content`, user.full_name, \"\n\t\t\t\t+ \"IF(writing_test.created_date IS NULL,null, DATE_FORMAT(writing_test.created_date, '%d-%m-%Y')) AS created_date FROM writing_test \"\n\t\t\t\t+ \"LEFT JOIN crm_user AS user ON writing_test.created_by = user.user_id WHERE 1=1 \");\n\t\tbuilderGetTotal.append(\"SELECT COUNT(1) FROM `writing_test` \"\n\t\t\t\t+ \" WHERE 1=1\");\n\t\t// filter header\n\t\tif (jsonParams.get(\"status\") == null || Integer.parseInt(jsonParams.get(\"status\").toString()) == -1) {\n\t\t\tbuilder.append(\" AND writing_test.deleted <> 1\");\n\t\t\tbuilderGetTotal.append(\" AND writing_test.deleted <> 1\");\n\t\t} else if (Integer.parseInt(jsonParams.get(\"status\").toString()) == -2) {// thùng rác\n\t\t\tbuilder.append(\" AND writing_test.deleted = 1\");\n\t\t\tbuilderGetTotal.append(\" AND writing_test.deleted = 1\");\n\t\t}\n\t\tif (jsonParams.get(\"wt_title\") != null && !\"\".equals(jsonParams.get(\"wt_title\").toString())) {\n\t\t\tbuilder.append(\" AND wt_title LIKE N'%\" + jsonParams.get(\"wt_title\").toString() + \"%'\");\n\t\t\tbuilderGetTotal\n\t\t\t\t\t.append(\" AND wt_title LIKE N'%\" + jsonParams.get(\"wt_title\").toString() + \"%'\");\n\t\t}\n\t\tif (jsonParams.get(\"wt_content\") != null && !\"\".equals(jsonParams.get(\"wt_content\").toString())) {\n\t\t\tbuilder.append(\" AND wt_content LIKE N'%\" + jsonParams.get(\"wt_content\").toString() + \"%'\");\n\t\t\tbuilderGetTotal\n\t\t\t\t\t.append(\" AND wt_content LIKE N'%\" + jsonParams.get(\"wt_content\").toString() + \"%'\");\n\t\t}\n\t\t// sortby\n\t\tif (jsonParams.get(\"sortField\") != null && !\"\".equals(jsonParams.get(\"sortField\").toString())) {\n\t\t\tswitch (jsonParams.get(\"sortField\").toString()) {\n\t\t\tdefault:\n\t\t\t\tbuilder.append(\" ORDER BY writing_test.created_date DESC\");\n\t\t\t\tbreak;\n\t\t\t}\n//\t\t\tif (jsonParams.get(\"sortOrder\") != null && \"descend\".equals(jsonParams.get(\"sortOrder\").toString())) {\n//\t\t\t\tbuilder.append(\" DESC\");\n//\t\t\t}\n//\t\t\tif (jsonParams.get(\"sortOrder\") != null && \"ascend\".equals(jsonParams.get(\"sortOrder\").toString())) {\n//\t\t\t\tbuilder.append(\" ASC\");\n//\t\t\t}\n\t\t}\n\t\tmainUtil.getLimitOffset(builder, jsonParams);\n\t\ttry {\n\t\t\tint totalRow = this.jdbcTemplate.queryForObject(builderGetTotal.toString(), Integer.class);\n\t\t\tList<Map<String, Object>> lstWrittingTest = this.jdbcTemplate.queryForList(builder.toString());\n\t\t\tJSONObject results = new JSONObject();\n\t\t\tresults.put(\"results\", lstWrittingTest);\n\t\t\tresults.put(\"total\", totalRow);\n\t\t\tdata.put(\"data\", results);\n\t\t\tdata.put(\"success\", true);\n\t\t} catch (Exception e) {\n\t\t\tdata.put(\"success\", false);\n\t\t\tdata.put(\"err\", e.getMessage());\n\t\t\tdata.put(\"msg\", \"Lấy danh sách bài kiểm tra thất bại\");\n\t\t}\n\t\treturn data;\n\t}",
"@Override\r\n\tpublic String makingMtListing(Integer limit, Integer offset, String sort, String order, String search,\r\n\t\t\tPrincipal principal) throws ParseException {\n\t\t\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\r\n\t\tPage<MakingMt> makingMtList = null; \r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\r\n\t\tUser user = userService.findByName(principal.getName());\r\n\t\tUserRole userRole = userRoleService.findByUser(user);\r\n\t\tMenuMast menuMast = menuMastService.findByMenuNm(\"makingMt\");\r\n\t\tRoleRights roleRights = roleRightsService.findByRoleMastAndMenuMast(userRole.getRoleMast(), menuMast);\r\n\r\n\t\tif ((search != null) && (search.trim().length() == 0)) {\r\n\t\t\tsearch = null;\r\n\t\t}\r\n\r\n\t\r\n\t\tmakingMtList = searchAll(limit, offset, sort, order, search, true);\r\n\r\n\t\tsb.append(\"{\\\"total\\\":\").append(makingMtList.getTotalElements()).append(\",\\\"rows\\\": [\");\r\n\r\n\t\tfor (MakingMt makingMt : makingMtList) {\r\n\t\t\tDate currdate = sdf.parse(sdf.format(new Date()));\r\n\t\t\tDate invDate = sdf.parse(sdf.format(makingMt.getInvDate()));\r\n\r\n\t\t\tsb.append(\"{\\\"id\\\":\\\"\")\r\n\t\t\t.append(makingMt.getId())\r\n\t\t\t.append(\"\\\",\\\"invNo\\\":\\\"\")\r\n\t\t\t.append(makingMt.getInvNo())\r\n\t\t\t.append(\"\\\",\\\"invDate\\\":\\\"\")\r\n\t\t\t.append(makingMt.getInvDateStr())\r\n\t\t\t.append(\"\\\",\\\"purity\\\":\\\"\")\r\n\t\t\t.append((makingMt.getPurity() != null ? makingMt.getPurity().getName() : \"\"))\r\n\t\t\t.append(\"\\\",\\\"color\\\":\\\"\")\r\n\t\t\t.append((makingMt.getColor() != null ? makingMt.getColor().getName() : \"\"));\r\n\t\t\tsb.append(\"\\\",\\\"action1\\\":\\\"\");\r\n\t\t\t\t\tif (userRole.getRoleMast().getRoleNm().equalsIgnoreCase(\"ADMINISTRATOR\")\r\n\t\t\t\t\t\t\t|| userRole.getRoleMast().getRoleNm().equalsIgnoreCase(\"ADMIN\")\r\n\t\t\t\t\t\t\t|| userRole.getRoleMast().getRoleNm().equalsIgnoreCase(\"ADMIN ROLE\")) {\r\n\t\t\r\n\t\t\t\t\t\tsb.append(\"<a href='/jewels/manufacturing/transactions/makingMt/edit/\")\r\n\t\t\t\t\t\t\t\t.append(makingMt.getId()).append(\".html'\");\r\n\t\t\r\n\t\t\t\t\t\tsb.append(\r\n\t\t\t\t\t\t\t\t\".html' class='btn btn-xs btn-warning' ><span class='glyphicon glyphicon-edit'></span> Edit</a>\");\r\n\t\t\r\n\t\t\t\t\t\tsb.append(\"\\\",\\\"action2\\\":\\\"\");\r\n\t\t\r\n\t\t\t\t\t\tsb.append(\"<a onClick='javascript:doDelete(event, this)' href='/jewels/manufacturing/transactions/makingMt/delete/\");\t\t\t\r\n\t\t\t\t\t\t\t\tsb.append(makingMt.getId());\r\n\t\t\r\n\t\t\t\t\t\tsb.append(\");' class='btn btn-xs btn-danger triggerRemove\").append(makingMt.getId())\r\n\t\t\t\t\t\t\t\t.append(\"'><span class='glyphicon glyphicon-trash'></span> Delete</a>\")\r\n\t\r\n\t\t\t\t\t\t.append(\"\\\"},\");\r\n\t\t\t} else {\r\n\r\n\t\t\t\tif (roleRights.getCanEdit()) {\r\n\r\n\t\t\t\t\tsb.append(\"<a href='/jewels/manufacturing/transactions/makingMt/edit/\")\r\n\t\t\t\t\t.append(makingMt.getId()).append(\".html'\");\r\n\t\t\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsb.append(\"<a onClick='javascript:displayMsg(event, this)' href='javascript:void(0)'\");\r\n\t\t\t\t}\r\n\t\t\t\tsb.append(\r\n\t\t\t\t\t\t\".html' class='btn btn-xs btn-warning' ><span class='glyphicon glyphicon-edit'></span> Edit</a>\");\r\n\r\n\t\t\t\tsb.append(\"\\\",\\\"action2\\\":\\\"\");\r\n\t\t\t\tif (roleRights.getCanDelete()) {\r\n\r\n\t\t\t\t\tif (currdate.equals(invDate)) {\r\n\t\t\t\t\t\tsb.append(\"<a onClick='javascript:doDelete(event, this)' href='/jewels/manufacturing/transactions/makingMt/delete/\")\r\n\t\t\t\t\t\t.append(makingMt.getId()).append(\".html'\");\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsb.append(\"<a onClick='javascript:displayBackDatedMsg(event, this)' href='javascript:void(0)'\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsb.append(\"<a onClick='javascript:displayMsg(event, this)' href='javascript:void(0)'\");\r\n\t\t\t\t}\r\n\t\t\t\tsb.append(\".html' class='btn btn-xs btn-danger triggerRemove\").append(makingMt.getId())\r\n\t\t\t\t\t\t.append(\"'><span class='glyphicon glyphicon-trash'></span> Delete</a>\")\r\n\t\t\t\t\t\t.append(\"\\\"},\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString str = sb.toString();\r\n\t\tstr = (str.indexOf(\"},\") != -1 ? str.substring(0, str.length() - 1) : str);\r\n\t\tstr += \"]}\";\r\n\r\n\t\t\r\n\t\treturn str;\r\n\t}",
"public List getPagesByAccount(long accountid, int from, int to) {\n\t\ttry {\n\t\t\treturn getPagesDAO().getPagesOnAccountID(accountid, from, to);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Error while getting Pages on account\", e);\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n\tpublic List<TransactionHistory> getTransactionByUserId(String id, int state) {\n\t\tList<TransactionHistory> result = null;\n\t\t\n\t\tTypedQuery<TransactionHistory> query = em.createQuery(\"SELECT t FROM TransactionHistory t WHERE (t.sendAccount.id = :id \"\n\t\t\t\t+ \" OR t.receiveAccount.id = :id) AND t.state.idState = :state\", TransactionHistory.class);\n\t\tquery.setParameter(\"id\", id);\n\t\tquery.setParameter(\"state\", state);\n\t\tresult = query.getResultList();\n\t\t\n\t\treturn result;\n\t}",
"public List<Transaction> getAllDepositTransactions(int start, int numOfRows) throws MiddlewareQueryException;",
"public Integer getToId() {\n return toId;\n }",
"Page<RefTarifDTO> findAll(Pageable pageable);",
"public List<XeBusDTO> getBusByTT(Integer TT) {\n String sql = \"select * from xe_bus where TT = ?;\";\n Object[] params = {TT};\n return jdbcTemplate.query(sql, new XeBusDTOMapper(), params);\n }",
"Page<ChatDTO> findAll(Pageable pageable);",
"@Override\n\tpublic List<TransactionHistory> getTransactionByDateRange(String userID,\n\t\t\tDate dateFrom, Date dateTo, int state) {\n\t\tList<TransactionHistory> result = null;\n\t\t\n\t\tTypedQuery<TransactionHistory> query = em.createQuery(\"SELECT t FROM TransactionHistory t WHERE\"\n\t\t\t\t+ \" (t.sendAccount.id = :id OR t.receiveAccount.id = :id) \"\n\t\t\t\t+ \"AND t.state.idState = :state \"\n\t\t\t\t+ \"AND (t.date >= :dateFrom AND t.date <= :dateTo)\", TransactionHistory.class);\t\t\t\n\t\t\n\t\tquery.setParameter(\"id\", userID);\n\t\tquery.setParameter(\"state\", state);\n\t\tquery.setParameter(\"dateFrom\", dateFrom);\n\t\tquery.setParameter(\"dateTo\", dateTo);\n\t\tresult = query.getResultList();\n\t\t\n\t\treturn result;\n\t}",
"@GET\n @Path( \"transactions\" )\n void getTransactions( @QueryParam( \"orderId\" ) Long orderId,\n @QueryParam( \"invoiceId\" ) Long invoiceId,\n SuccessCallback<Items<Transaction>> callback );",
"public ArrayList<Transaction> GetUserTransactions(int UserID);",
"public abstract Page<CustomerInfo> findAll(GlobalSearch globalSearch, Pageable pageable);",
"public abstract <T> Page<T> list(Pageable pageable, Class<T> clazz);",
"List<Activity> findAllPageable(int page, int size);",
"@Override\n\tpublic List<Signuptable> findPage(String where, int startIndex, int pageSize) {\n\t\treturn null;\n\t}",
"private String armarQueryPaginandoNoPorOid(String consultaOri, DTOSiccPaginacion dto) {\n Long ultLineaPresentada = dto.getIndicadorSituacion();\n Integer cantidadLineas = dto.getTamanioPagina();\n \n if ((ultLineaPresentada == null) || (cantidadLineas == null)) {\n return consultaOri;\n } else { \n StringBuffer salida = new StringBuffer();\n \n salida.append(\"SELECT auxi2.* FROM ( SELECT auxi.*, \");\n salida.append(\"CASE WHEN ((\"+ cantidadLineas + \" - COUNT(*) OVER (PARTITION BY 1)) < 0) THEN 0 ELSE 1 END SICC_ES_ULTIMA_PAGINA \");\n salida.append(\"FROM (\" + consultaOri + \") auxi WHERE ROWNUM <= \" +(cantidadLineas.intValue()+1)+ \" AND linea > \" +ultLineaPresentada+ \") auxi2 \");\n salida.append(\" WHERE ROWNUM <= \" + cantidadLineas);\n salida.append(\" and linea > \" + ultLineaPresentada);\n\n return salida.toString();\n }\n }",
"public TransmitirResponse transmitirPago(TransmitirPagoRequest tramitePagoRequest) {\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"======================\");\r\n\t\t\tSystem.out.println(\"Inicio: transmitirPago\");\r\n\r\n\t\t\t//1: Se recupera el CDA pagado\r\n\t\t\tBeanTasa tasa = new BeanTasa(); \r\n\t\t\ttasa.setCda(tramitePagoRequest.getCda());\r\n\t\t\ttasa.setMontoPago(tramitePagoRequest.getMonto());\r\n\t\t\ttasa.setFechaPago(tramitePagoRequest.getFechaPago());\r\n\r\n\t\t\t//2: Se actualiza el pago de la Tasa\r\n\t\t\tServicioTasa servicioTasa = new ServicioTasa();\r\n\t\t\tservicioTasa.pagarTasa(tasa);\r\n\r\n\t\t\t//3: Según el CDA pagado, se obtiene la orden y otros datos importantes\r\n\t\t\tBeanFormato formato = new BeanFormato();\r\n\t\t\tServicioOrden servicioOrden = new ServicioOrden();\r\n\t\t\tBeanOrden orden = servicioOrden.buscarOrdenPorCda(tasa.getCda());\r\n\t\t\torden = servicioOrden.buscarOrdenPorOrdenId(orden.getOrdenId(), formato);\r\n\t\t\tBeanTce tce = servicioOrden.buscarTcePorOrdenId(orden.getOrdenId());\r\n\t\t\tBeanMto mto = servicioOrden.buscarMtoVigentePorOrdenId(orden.getOrdenId());\r\n\t\t\tBeanFormatoEntidad formatoEntidad = servicioOrden.buscarFormatoEntidadPorFormato(formato.getFormato(), mto);\r\n\t\t\tBeanAdjunto adjunto = servicioOrden.buscarAdjuntoPorMto(mto);\r\n\t\t\tBeanUsuario usuarioSolicitante = servicioOrden.buscarUsuarioSolicitantePorMto(mto);\r\n\r\n\t\t\t// 2.1: Registrar estado traza 4: Pago Recibido\r\n\t\t\tBeanTraza traza = new BeanTraza();\r\n\t\t\ttraza.setEstadoTraza(4);\r\n\t\t\ttraza.setDe(4);\r\n\t\t\ttraza.setPara(3);\r\n\t\t\tservicioOrden.registrarTraza(tce, mto, null, null, traza);\r\n\r\n\t\t\t//5: Genera la SUCE\r\n\t\t\tServicioSuce servicioSuce = new ServicioSuce();\r\n\t\t\tBeanSuce suce = servicioSuce.generarSuce(orden);\r\n\r\n\t\t\t//6: Se genera el nuevo MTO\r\n\t\t\t//TODO generar nuevo mto, incluye registrar otra vez la orden\r\n\r\n\t\t\t//7: Se transmite la SUCE\r\n\t\t\tservicioSuce.transmitirSuceHaciaEntidad(formato, orden, suce, formatoEntidad, adjunto, usuarioSolicitante.getRuc());\r\n\r\n\t\t\t// 2.1: Registrar estado traza 5: Suce generada\r\n\t\t\ttraza = new BeanTraza();\r\n\t\t\ttraza.setEstadoTraza(5);\r\n\t\t\ttraza.setDe(3);\r\n\t\t\ttraza.setPara(2);\r\n\t\t\tservicioOrden.registrarTraza(tce, mto, null, null, traza);\r\n\r\n\t\t\t//8: Transmitir SUCE a Usuario\r\n\t\t\t//TODO Transmitir SUCE a Usuario\r\n\r\n\t\t\tSystem.out.println(\"Fin\");\r\n\t\t\tSystem.out.println(\"======================\");\r\n\r\n\t\t\tTransmitirResponse res = new TransmitirResponse();\r\n\t\t\tres.setCodigo(suce.getSuce()+\"\");\r\n\t\t\tres.setTexto(\"Exito\");\r\n\t\t\treturn res;\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t\tTransmitirResponse res = new TransmitirResponse();\r\n\t\t\tres.setCodigo(\"ERR\");\r\n\t\t\tres.setTexto(\"Error\");\r\n\t\t\treturn res;\r\n\t\t}\r\n\t}",
"List<T> findPage(int pageNumber);",
"public abstract Page<CustomerOrder> findAll(GlobalSearch globalSearch, Pageable pageable);",
"private Pageable createPageRequest(int page, int size) {\n\t\treturn new PageRequest(page, size, new Sort(Sort.Direction.DESC, \"_id\"));\n\t}",
"@Override\n\tpublic TodoDto getTodosByUser(Long id, Pageable pageable){\n\t\tPage<Todo> todoPage = todoRepository.findByUser(new User(id),pageable);\n\t\tTodoDto dto = new TodoDto();\n\t\tdto.setContent(todoPage.getContent());\n\t\tdto.setTotal((int)todoPage.getTotalElements());\n\t\t\n\t\treturn dto;\n\t}",
"Page<EtatOperation> findAll(Pageable pageable);",
"public List<Transaction> getAllReserveTransactionsByRequestor(Integer personId, int start, int numOfRows) throws MiddlewareQueryException;",
"public static int getPageTo(String info) {\n/* 816 */ int pageNum = 0;\n/* */ \n/* 818 */ if (!Utils.isNullOrEmpty(info)) {\n/* */ try {\n/* 820 */ JSONObject jsonObj = new JSONObject(info);\n/* 821 */ pageNum = jsonObj.getInt(\"To\");\n/* 822 */ } catch (Exception e) {\n/* 823 */ AnalyticsHandlerAdapter.getInstance().sendException(e);\n/* */ } \n/* */ }\n/* */ \n/* 827 */ return pageNum;\n/* */ }",
"@Transactional\n @Override\n public PageUtils queryPage(Map<String, Object> params) {\n QueryWrapper<PurchaseDetailEntity> wrapper = new QueryWrapper<>();\n String key = (String) params.get(\"key\");\n if (!StringUtils.isEmpty(key)) {\n wrapper.and(w->{\n w.eq(\"purchase_id\", key).or().like(\"sku_id\", key);\n });\n }\n String status = (String) params.get(\"status\");\n if (!StringUtils.isEmpty(status)) {\n wrapper.eq(\"status\", status);\n }\n String wareId = (String) params.get(\"wareId\");\n if (!StringUtils.isEmpty(wareId)) {\n wrapper.eq(\"ware_id\", wareId);\n }\n IPage<PurchaseDetailEntity> page = this.page(\n new Query<PurchaseDetailEntity>().getPage(params),\n wrapper\n );\n\n return new PageUtils(page);\n }",
"@Override\n public PageInfo<OrderPojo> findAll(int pageNum, int pageSize) {\n return null;\n }",
"public abstract Page<CustomerInfo> findAllByIdsIn(List<Long> ids, GlobalSearch globalSearch, Pageable pageable);",
"Page<BalanceDTO> findAll(Pageable pageable);",
"@POST\n\t@Produces(MediaType.APPLICATION_JSON)\n\t@Consumes(MediaType.APPLICATION_JSON)\n\t@Path(\"/search\")\n\tpublic Response searchTransactionStatus(TransactionStatusTo transactionStatusTo,\n\t\t\t@Context HttpServletRequest request) {\n\t\ttry {\n\t\t\ttransactionStatusTo = ShoppingCartFactory.getTransactionStatusDao().searchById(\n\t\t\t\t\ttransactionStatusTo.getId());\n\t\t\treturn Response.status(201).entity(transactionStatusTo).build();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tString error = \"Unable to Find Record\";\n\t\t\treturn Response.status(403).entity(error).build();\n\t\t}\n\t}",
"Page<NoteDTO> findAll(Pageable pageable);",
"Collection<Transaction> findAllByTransactiontype(int type, Sort sort);",
"@Override\n\tpublic PaginationResultsTo<Track> getTracks(Integer pageNum, Integer pageSize) {\n\t\tLOGGER.info(\"Fetching all Tracks from DB for page number : \" + pageNum);\n\t\tPaginationResultsTo<Track> paginationResults = null;\n\t\tif(Util.isNull(pageNum) || Util.isNull(pageSize)) {\n\t\t\tthrow new IllegalArgumentException(\"Missing pageNum/pageSize method arguments\");\n\t\t}\n\t\ttry {\n\t\t\t\n\t\t\tOrder o1 = new Order(Direction.DESC,\"type\").ignoreCase();\n\t\t\tOrder o2 = new Order(Direction.DESC,\"country\").ignoreCase();\n\t\t\tOrder o3 = new Order(Direction.ASC,\"id\").ignoreCase();\n\n\t\t\tSort sort = new Sort(new Order[]{o1,o2,o3}) ;\n\t\t\t\n\t\t\tPageRequest request = new PageRequest(pageNum - 1, pageSize, sort);\n\t\t\t\n\t\t\tPage<Track> tracks = tracksRepository.findAll(request);\n\t\t\tif(!Util.isNull(tracks)) {\n\t\t\t\tpaginationResults = new PaginationResultsTo<Track>();\n\t\t\t\tpaginationResults.setPageNumber(pageNum);\n\t\t\t\tpaginationResults.setPageSize(pageSize);\n\t\t\t\tpaginationResults.setTotalNumberOfPages(tracks.getTotalPages());\n\t\t\t\tpaginationResults.setTotalNumberOfResults(tracks.getTotalElements());\n\t\t\t\tpaginationResults.setResults(tracks.getContent());\n\t\t\t\ttracks.getTotalPages();\n\t\t\t}\n\t\t} catch(Exception e){\n\t\t\tLOGGER.error(\"Error while retreiving all Tracks for Pagination --> page Number : \" + pageNum + \" , Page Size : \" + pageSize, e);\n\t\t}\n\n\t\treturn paginationResults;\n\t}",
"Integer getPage();",
"Page<NotificationDTO> findAll(Pageable pageable);",
"void findWithPagination(Pagination<Task, Project> pagination);",
"public int getIdTo() {\n return idTo;\n }",
"Page<EventActivityDTO> findAll(Pageable pageable);",
"public List<Transaction> getTransactionByUser(User user) throws SQLException {\n String sql = \"SELECT * FROM LabStore.Transaction_Detail WHERE uId = ?\";\n List<Transaction> transactions = new ArrayList<>();\n\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n preStmt.setInt(1, user.getId());\n try (ResultSet rs = preStmt.executeQuery()) {\n while (rs.next()) {\n Transaction transaction = new Transaction();\n transaction.setId(rs.getInt(\"id\"));\n transaction.setUser(user);\n transaction.setPurchaseDetail(purchaseDetailDbManager\n .getPurchaseDetailById(rs.getInt(\"pdId\")));\n transaction.setCount(rs.getInt(\"count\"));\n transaction.setTime(rs.getTimestamp(\"time\"));\n transactions.add(transaction);\n }\n }\n }\n\n return transactions;\n }",
"Page<RequestOtherNiazsanjiDTO> findAll(Pageable pageable);",
"public abstract Page<CustomerOrder> findAllByIdsIn(List<Long> ids, GlobalSearch globalSearch, Pageable pageable);",
"public PageInfo<List<OrderitemPojo>> getOrderByUserid(Integer userid,\n\t\t\tint page, int row) {\n\t PageHelper.startPage(page, row);\n\t\tOrdersExample example=new OrdersExample();\n\t\texample.createCriteria().andUseridEqualTo(userid);\n\t\texample.setOrderByClause(\"oid desc\");\n\t\tList<Orders> orderList=ordersMapper.selectByExample(example);\n\t\t\n\t\tPageInfo<Orders> pageInfo1=new PageInfo<Orders>(orderList);\n\t\t\n\t\t\n\t\tList<List<OrderitemPojo>> list=new ArrayList<List<OrderitemPojo>>();\n\t\tfor(Orders orders:pageInfo1.getList()){\n\t\t\tList<OrderitemPojo> orderitemList=orderitemMapper.selectOrderitemPojoByOid(orders.getOid());\n\t\t\tfor(OrderitemPojo orderitem:orderitemList){\n\t\t\t\tString image=orderitem.getImage();\n\t\t\t\tString[] split=image.split(\",\");\n\t\t\t\torderitem.setImage(\"/pic/\"+split[0]);\n\t\t\t\torderitem.setOrdertime(orders.getOrdertime());\n\t\t\t\torderitem.setTotal(orders.getTotal());\n\t\t\t\tString status=orders.getStatus();\n\t\t\t\tif(status==null) status=\"无\";\n\t\t\t\torderitem.setStatus(status);\n\t\t\t\tInteger state=orders.getState();\n\t\t\t\tString c=\"\";\n\t\t\t\tif(state==0){\n\t\t\t\t\tc=\"未付款\";\n\t\t\t\t}else if(state==1){\n\t\t\t\t\tc=\"已付款(未发货)\";\n\t\t\t\t}else if(state==2){\n\t\t\t\t\tc=\"已发货\";\n\t\t\t\t}else if(state==3){\n\t\t\t\t\tc=\"已收货\";\n\t\t\t\t}else if(state==4){\n\t\t\t\t\tc=\"交易成功)\";\n\t\t\t\t}\n\t\t\t\torderitem.setState(c);\t\n\t\t\t}\n\t\t\tlist.add(orderitemList);\t\n\t\t}\n\t\tPageInfo<List<OrderitemPojo>> pageInfo=new PageInfo<List<OrderitemPojo>>(list);\n\t\tpageInfo.setPages(pageInfo1.getPages());\n\t\tpageInfo.setTotal(pageInfo1.getTotal());\n\t\tpageInfo.setHasNextPage(pageInfo1.isHasNextPage());\n\t\tpageInfo.setHasPreviousPage(pageInfo1.isHasPreviousPage());\t\n\t\treturn pageInfo;\n\t\t\n\t}",
"Page<ItemPriceHistoryDTO> findAll(Pageable pageable);",
"Page<Lancamento> buscarPorFuncionarioId(Long funcionarioId, PageRequest pageRequest);",
"@Override\r\n\tpublic Pagination<Tuanbiao> getPaginationfkqr(int currentPage,\r\n\t\t\tint numPerPage, Tuanbiao tuanbiao) throws Exception {\n\t\tStringBuffer sql=new StringBuffer(\"SELECT t.*,sum(t.yingshou) ,sum(t.yishou) ,sum(t.yifu) ,sum(t.yfk) ,s.userName as xiaoshouyuan from tuanbiao AS t LEFT JOIN users AS s ON s.id=t.xiaoshou group by team HAVING 1=1 \");\r\n\t\t\r\n\t\t if(tuanbiao.getTeam()!=null&&!\"\".equals(tuanbiao.getTeam())){\r\n\t \t \r\n\t \t sql.append(\" and team='\");\r\n\t\t\t\tsql.append(tuanbiao.getTeam());\r\n\t\t\t\tsql.append(\"'\");\r\n\t \t \r\n\t }\r\n\t\t if(tuanbiao.getTuanduimc()!=null&&!\"\".equals(tuanbiao.getTuanduimc())){\r\n\t \t \r\n\t \t sql.append(\" and tuanduimc='\");\r\n\t\t\t\tsql.append(tuanbiao.getTuanduimc());\r\n\t\t\t\tsql.append(\"'\");\r\n\t \t \r\n\t }\r\n\t\t if(tuanbiao.getYsyfID()!=0&&!\"\".equals(tuanbiao.getYsyfID())){\r\n\t \t \r\n\t \t sql.append(\" and ysyfid='\");\r\n\t\t\t\tsql.append(tuanbiao.getYsyfID());\r\n\t\t\t\tsql.append(\"'\");\r\n\t \t \r\n\t }\r\n\t\treturn this.getPagination(currentPage, numPerPage, sql.toString());\r\n\t}",
"@Override\n @Transactional(readOnly = true)\n public Page<ProjectTransactionRecordDTO> findAll(Pageable pageable) {\n log.debug(\"Request to get all ProjectTransactionRecords\");\n return projectTransactionRecordRepository.findAll(pageable)\n .map(projectTransactionRecordMapper::toDto);\n }",
"Page<CoveredActivityDTO> findAll(Pageable pageable);",
"public interface TransactionService {\r\n public Map<String, Object> findByPage(Query query);\r\n}",
"@Override\n\tpublic ResultSet transactionBody(String type, int id, int value, int householdNum) {\n\t\t\n\t\tSystem.out.println(\"Transaction Body 1\");\n\t\t\n\t\treturn queryTable(type);\n\t\t\n\t}",
"List<Invoice> getByDebtorIdOrderByDateDesc(int debtorId, Pageable page);",
"@Transactional\r\n\tpublic List<Room> getReservable(Integer posti, LocalDate from, LocalDate to){\r\n\t\tList<Room> l= this.getPosti(posti);\r\n\t\tl.removeAll(this.getReservedFromTo(from, to));\r\n\t\treturn l;\r\n\t}",
"public void setTo(int to) {\n this.to = to;\n }",
"@Override\n\tpublic Page<?> pagination(Integer pagenumber, Integer rows, String sortdireccion, String sortcolumn,\n\t\t\tObject filter) {\n\t\treturn null;\n\t}",
"private void getTransactionDetail(){\n myTransactions = MainActivity.user.getWallet().getDetail();\n Collections.reverse(myTransactions);\n\n //--------------------設定ViewPager--------------------//\n LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());\n layoutManager.setOrientation(LinearLayoutManager.VERTICAL);\n detailRecyView.setLayoutManager(layoutManager);\n detailRecyView.setAdapter(new transactionItemAdapter(getContext(),\n new LinkedList<>(myTransactions.subList(0, min(myTransactions.size(),10))),\n myTransactions.size() > 10 ? true : false));\n detailRecyView.addOnScrollListener(new RecyclerView.OnScrollListener() {\n @Override\n public void onScrollStateChanged(RecyclerView recyclerView, int newState) {\n super.onScrollStateChanged(recyclerView, newState);\n //當滾動事件停止時觸發一次\n if(newState == RecyclerView.SCROLL_STATE_IDLE){\n int lastVisibleItem = ((LinearLayoutManager)recyclerView.getLayoutManager()).findLastVisibleItemPosition();\n transactionItemAdapter adapter = (transactionItemAdapter)recyclerView.getAdapter();\n if (lastVisibleItem == adapter.getRealLastPosition())\n adapter.updateRecyclerView(adapter.getRealLastPosition());\n }\n }\n\n @Override\n public void onScrolled(RecyclerView recyclerView, int dx, int dy) {\n super.onScrolled(recyclerView, dx, dy);\n }\n });\n outProgress();\n }",
"public synchronized void flushPages(TransactionId tid) throws IOException {\n // some code goes here\n // not necessary for proj1\n }",
"Page<ParaUserDTO> findAll(Pageable pageable);",
"@Override\n\tpublic PageInfo<Tmenu> findByPage(int pageNo, int pageSize, Tmenu t)\n\t\t\tthrows Exception {\n\t\treturn null;\n\t}",
"public DbFileIterator iterator(TransactionId tid) {\n System.out.println(\"numPages is \" + numPages);\n return new TupleIter(numPages);\n }",
"public List<Transaction> getTransactionByPurchase(PurchaseDetail purchaseDetail)\n throws SQLException {\n String sql = \"SELECT * FROM LabStore.Transaction_Detail WHERE pdId = ?\";\n List<Transaction> transactions = new ArrayList<>();\n\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n preStmt.setInt(1, purchaseDetail.getId());\n try (ResultSet rs = preStmt.executeQuery()) {\n while (rs.next()) {\n Transaction transaction = new Transaction();\n transaction.setId(rs.getInt(\"id\"));\n transaction.setUser(userDbManager.getUser(rs.getInt(\"uId\")));\n transaction.setPurchaseDetail(purchaseDetail);\n transaction.setCount(rs.getInt(\"count\"));\n transaction.setTime(rs.getTimestamp(\"time\"));\n transactions.add(transaction);\n }\n }\n }\n\n return transactions;\n }",
"@PreAuthorize(\"hasAnyRole('ADMIN')\")\n\t@RequestMapping(value=\"/page\",method=RequestMethod.GET) \n\tpublic ResponseEntity<Page<ClienteDTO>> findPage(\n\t\t\t@RequestParam(value=\"page\", defaultValue=\"0\") Integer page, \n\t\t\t@RequestParam(value=\"linesPerPage\", defaultValue=\"24\") Integer linesPerPage, //24 pq eh multiplo de 1, 2 3 e 4\n\t\t\t@RequestParam(value=\"orderBy\", defaultValue=\"nome\") String orderBy, \n\t\t\t@RequestParam(value=\"direction\", defaultValue=\"ASC\") String directionOrder) { //asc eh ascendente \n\t\t\n\t\tPage<Cliente> list = service.findPage(page,linesPerPage,orderBy,directionOrder);\n\t\t\n\t\tPage<ClienteDTO> listDTO = list.map(obj->new ClienteDTO(obj));\n\t\t\n\t\treturn ResponseEntity.ok().body(listDTO); \n\t\t\n\t}",
"@GET(\"points-transaction-history?expand=translations&sort=-created_at\")\n Call<HistoryExchangeResponse> getTransactionHistoryAll();",
"@Override\n\tpublic List<Transaction> getTransactionsByAccountId(int accountId) throws SQLException {\n\t\tList<Transaction> tList = new ArrayList<>();\n\t\tConnection connect = db.getConnection();\n\t\tString selectQuery = \"select * from transaction_history where account_id=?\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(selectQuery);\n\t\tprepStmt.setInt(1, accountId);\n\t\tResultSet rs = prepStmt.executeQuery();\n\t\twhile (rs.next()) {\n\t\t\tTransaction t = new Transaction(rs.getInt(2), rs.getString(3), rs.getDouble(4),rs.getTimestamp(5));\n\t\t\ttList.add(t);\n\t\t}\n\t\treturn tList;\n\t}",
"protected String createPage(int taskId, HttpServletRequest req, Connection con) throws SQLException, ServletException {\n InnerPageBuffer innerPageBuffer = null;\n ByteArrayOutputStream out = null;\n try {\n innerPageBuffer = getInnerPageBuffer(taskId);\n if (innerPageBuffer == null) {\n return \"<tr><td>This statistic is not available at moment! Please try again later.</td></tr>\";\n } else {\n out = new ByteArrayOutputStream(10*1024);\n StreamUtils.writeData(innerPageBuffer.buffer, out, false, true);\n return out.toString(\"ISO-8859-1\");\n }\n } catch (IOException ioe) {\n throw new ServletException(ioe);\n } finally {\n if (innerPageBuffer != null) {\n innerPageBuffer.close();\n }\n }\n }",
"Page<BaacDTO> findAll(Pageable pageable);",
"public List<Transaction> listAllTransactionsByUserId( int userId){\n\t\t\n\t\t//String queryStr = \"SELECT trans FROM Transaction trans JOIN FETCH trans.\"\n\t\t\n\t\t\n\t\t\n\t\t\n\t\treturn null;\n\t\t\n\t}",
"public void setIdTo(int idTo) {\n this.idTo = idTo;\n }",
"public List<UserVO> pagingUser(Criteria cri);",
"@RequestMapping(value=\"/terrains\", method=RequestMethod.GET)\n\tpublic Page<Terrain> listTerrains(int page , int size , String type) {\n\t\treturn terrainRepository.getTerrainByType(type, new PageRequest(page, size));\n\t}",
"Page<AccountDTO> findAllByPhoneNumber(String phone, Pageable pageable);",
"Page<TeamDTO> findAll(Pageable pageable);",
"public Page<Event> findAllProcessEvents(int processNumber , Pageable pageable);",
"List<E> page(Page page, Long...params);",
"@Override\n\t@RequestMapping(value=ZuelControllerValue.Manage+\"getItems\")\n\tpublic ZuelPageResult<TbItem> getItems(int page, int size, String search) {\n\t\tSystem.out.println(\"我受够了\");\n\t\treturn service.getItems(page, size, search);\n\t}",
"public static com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Orders> findByIV_FO_TOR_ID(java.lang.String IV_FO_TOR_ID, int skip, int take)\n {\n String intervalName = null;\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n intervalName = \"Orders.findByIV_FO_TOR_ID\";\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().startInterval(intervalName, com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.PersistenceRead);\n }\n try\n {\n \n \n String _selectSQL = \" x.\\\"a\\\",x.\\\"b\\\",x.\\\"c\\\",x.\\\"d\\\",x.\\\"e\\\",x.\\\"f\\\",x.\\\"g\\\",x.\\\"h\\\",x.\\\"i\\\",x.\\\"j\\\",x.\\\"l\\\",x.\\\"m\\\",x.\\\"n\\\",x.\\\"o\\\",x.\\\"p\\\",x.\\\"q\\\",x.\\\"r\\\",x.\\\"s\\\",x.\\\"t\\\",x.\\\"u\\\",x.\\\"v\\\",x.\\\"w\\\",x.\\\"x\\\",x.\\\"y\\\",x.\\\"z\\\",x.\\\"ba\\\",x.\\\"bb\\\",x.\\\"bc\\\",x.\\\"bd\\\",x.\\\"be\\\",x.\\\"bf\\\",x.\\\"bg\\\",x.\\\"bh\\\",x.\\\"bi\\\",x.\\\"bj\\\",x.\\\"bl\\\",x.\\\"bm\\\",x.\\\"pending\\\",x.\\\"_pc\\\",x.\\\"_rp\\\",x.\\\"_rf\\\"\"\n + \",x.\\\"relationsFK\\\",x.\\\"bn\\\",x.\\\"_rc\\\",x.\\\"_ds\\\",x.\\\"cvpOperation_length\\\",x.\\\"cvpOperationLobs_length\\\" FROM \\\"mvideo5_1_0_orders\\\" x WHERE (((x.\\\"pending\\\" = 1 or not exists (select x_os.\\\"bn\\\" from \\\"mvideo5_1_0_orders_os\\\" x_os where x_os.\\\"bn\\\" = x.\\\"bn\\\")))) and ( x.\\\"bl\\\" = ?)\";\n _selectSQL = \"select \" + _selectSQL;\n String[] ids = new String[0];\n com.sybase.reflection.DataType[] dts = new com.sybase.reflection.DataType[]{ \n com.sybase.reflection.DataType.forName(\"string\"),\n };\n Object[] values = new Object[] { \n IV_FO_TOR_ID,\n };\n com.sybase.collections.GenericList<Object> res = DELEGATE.findWithSQL(_selectSQL, dts, values, ids, skip, take, ru.terralink.mvideo.sap.Orders.class);\n return (com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Orders>)(Object)res;\n }\n finally\n {\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().stopInterval(intervalName);\n }\n }\n }",
"public Page<Account> getAccPage(Pageable page);",
"@Override\n @Transactional(readOnly = true)\n public Page<CostoDTO> findAll(Pageable pageable) {\n log.debug(\"Request to get all Costos\");\n return costoRepository.findAll(pageable)\n .map(costoMapper::toDto);\n }",
"@GetMapping(\"/between-dates\")\n\tpublic Page<Transaction> getTransactionsBetweenDatesByTypeAndPageable(\n\t\t@RequestParam String type,\n\t\t@RequestParam @DateTimeFormat(pattern = \"dd.MM.yyyy\") Date startDate,\n\t\t@RequestParam @DateTimeFormat(pattern = \"dd.MM.yyyy\") Date endDate,\n\t\tPageable pageable) \n\t{\n\t\tPage<Transaction> pageOfTransactions = null;\n\t\t\n\t\ttry {\n\t\t\tpageOfTransactions = transactionService.getTransactionsBetweenDatesByTypeAndPageable(type, startDate, endDate, pageable);\n\t\t}\n\t\tcatch (InvalidDataException e) {\n\t\t\tString exceptionMessage = e.getMessage();\n\t\t\tthrow new InvalidDataException(exceptionMessage);\n\t\t}\n\t\t\n\t\treturn pageOfTransactions;\n\t}",
"public Page page(Page page, String hql,Object[] objWhere){\r\n if(hql==null || \"\".equals(hql))\r\n {\r\n hql = \" from SearchMessageDTO Z\";\r\n }\r\n return searchMessageDAO.findPage(page, hql, objWhere);\r\n}",
"List<MasterZipcode> getByPage(int pageNo);",
"public Map searchToPage(String sql, Integer pageIndex, Integer pageSize,\n\t\t\tObject[] param) {\n\t\treturn this.rsDAO.searchToPage(sql, pageIndex, pageSize, param);\n\t}",
"Page<Contact> getContacts(int index, int size);"
] |
[
"0.5985545",
"0.56559575",
"0.55581415",
"0.53280264",
"0.5224148",
"0.5207313",
"0.5127363",
"0.5103201",
"0.509056",
"0.5077135",
"0.50234216",
"0.4999423",
"0.49940604",
"0.4977278",
"0.49765405",
"0.49558452",
"0.49242884",
"0.49195638",
"0.4910839",
"0.48938003",
"0.4855481",
"0.48507038",
"0.4849934",
"0.48447946",
"0.4841673",
"0.48382255",
"0.482789",
"0.48176357",
"0.47977656",
"0.47941563",
"0.47936088",
"0.47908473",
"0.47871727",
"0.47847852",
"0.47793224",
"0.47581184",
"0.47572824",
"0.4757122",
"0.47257015",
"0.4721937",
"0.47066352",
"0.46961904",
"0.4688441",
"0.46844488",
"0.46818617",
"0.46712333",
"0.46660087",
"0.46628937",
"0.46623468",
"0.46611777",
"0.4659586",
"0.4657168",
"0.46551496",
"0.4652893",
"0.46463242",
"0.46344084",
"0.4633692",
"0.46261153",
"0.46212968",
"0.46182498",
"0.46135682",
"0.4613023",
"0.46106505",
"0.4609386",
"0.4608029",
"0.46062094",
"0.46056932",
"0.46039146",
"0.4599266",
"0.45981795",
"0.45912394",
"0.45909303",
"0.4584233",
"0.4578528",
"0.45781392",
"0.45709544",
"0.45679346",
"0.45641845",
"0.45616627",
"0.45570734",
"0.45454073",
"0.45448947",
"0.45445976",
"0.45372483",
"0.4534347",
"0.453295",
"0.45318016",
"0.45297492",
"0.45261556",
"0.45242628",
"0.45235682",
"0.45206034",
"0.45204455",
"0.45170093",
"0.4515691",
"0.4515126",
"0.4514061",
"0.45091704",
"0.45017254",
"0.4501148"
] |
0.78900266
|
0
|
Returns a specific transaction's data as a JSON object
|
@GetMapping("/{id}")
public Transaction getTransactionById(@PathVariable Long id) {
Transaction transaction = null;
try {
transaction = transactionService.getTransactionById(id);
}
catch (TransactionNotFoundException e) {
throw new TransactionNotFoundException(id);
}
catch (UserDoesNotOwnResourceException e) {
throw new UserDoesNotOwnResourceException();
}
return transaction;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String getTransaction() {\n return transaction;\n }",
"@JsonProperty(\"transaction\")\n public TransactionReference getTransaction() {\n return transaction;\n }",
"@Override\n public JSONObject dataBody() {\n\n JSONObject transactionAmount = new JSONObject();\n transactionAmount.put(\"value\", this.transactionAmount);\n transactionAmount.put(\"currency\", this.currency);\n\n JSONObject userInfo = new JSONObject();\n userInfo.put(\"custId\", this.customerId);\n\n JSONObject body = new JSONObject();\n body.put(\"requestType\", \"NATIVE_SUBSCRIPTION\");\n body.put(\"mid\", this.getMerchantId());\n body.put(\"websiteName\", \"WEBSTAGING\");\n body.put(\"orderId\", this.getOrderId());\n body.put(\"subscriptionPaymentMode\", this.subscriptionPaymentMode);\n body.put(\"subscriptionAmountType\", this.subscriptionAmountType);\n body.put(\"subscriptionMaxAmount\", this.subscriptionMaxAmount);\n body.put(\"subscriptionFrequency\", this.subscriptionFrequency);\n body.put(\"subscriptionFrequencyUnit\", this.subscriptionFrequencyUnit);\n body.put(\"subscriptionStartDate\", this.subscriptionStartDate);\n body.put(\"subscriptionExpiryDate\", this.subscriptionExpiryDate);\n body.put(\"subscriptionGraceDays\", this.subscriptionGraceDays);\n body.put(\"subscriptionEnableRetry\", this.subscriptionEnableRetry);\n body.put(\"subscriptionRetryCount\", this.subscriptionRetryCount);\n body.put(\"paytmSsoToken\", \"\");\n body.put(\"callbackUrl\", this.subscriptionCallbackURL);\n body.put(\"userInfo\", userInfo);\n body.put(\"txnAmount\", transactionAmount);\n\n return body;\n }",
"public Object getTransactionId() throws StandardException;",
"String getTransactionId();",
"String getTransactionId();",
"public Transaction getTransaction()\n {\n return transaction;\n }",
"public String getTransdata() {\n\t\treturn transdata;\n\t}",
"public Transaction getTransaction() {\n return this.transaction;\n }",
"public TransactionDetailResp transaction_show(String txId) throws Exception {\n String s = main(\"transaction_show\", \"[{\\\"txid\\\":\\\"\" + txId +\"\\\"}]\");\n return JsonHelper.jsonStr2Obj(s, TransactionDetailResp.class);\n }",
"public Transaction getTransaction() {\n return transaction;\n }",
"public JsonObject covertToJson() {\n JsonObject transObj = new JsonObject(); //kasutaja portf. positsiooni tehing\n transObj.addProperty(\"symbol\", symbol);\n transObj.addProperty(\"type\", type);\n transObj.addProperty(\"price\", price);\n transObj.addProperty(\"volume\", volume);\n transObj.addProperty(\"date\", date);\n transObj.addProperty(\"time\", time);\n transObj.addProperty(\"profitFromSell\", profitFromSell);\n transObj.addProperty(\"averagePurchasePrice\", averagePurchasePrice);\n return transObj;\n }",
"@RequestMapping(value = \"/transactionservice/transaction/{transaction_id}\", method=RequestMethod.GET, produces = \"application/json\")\n\t@ResponseBody\n\tpublic Transaction getTransaction(@PathVariable long transaction_id) {\n\t\tif(transactions.size() > transaction_id) {\n\t\t\treturn transactions.get((int) transaction_id);\n\t\t} else {\n\t\t\tthrow new TransactionNotFoundException(transaction_id);\n\t\t}\n\t}",
"public static String getRandomTransactionJSON(int i) {\n\t\treturn \"{\" + \"id: \" + i + \", \" + \"ts: {\\\"$date\\\": \\\"\" + getRandomTimeStamp() + \"\\\"}, \" + \"balance: \" + ((int) (Math.random() * 5000)) + \", \"\n\t\t\t\t+ \"desc: \\\"\" + \"DescriptionXXX\" + \"\\\", \" + \"date: {\\\"$date\\\": \\\"\" + getRandomTimeStamp() + \"\\\"}, \" + \"amount: \" + ((int) (Math.random() * 1000))\n\t\t\t\t+ \"}\";\n\t}",
"public TransactionObj getTransaction(String sID){\n\t\treturn hmTransaction.get(sID);\n\t}",
"Transaction getTransaction() { \r\n return tx;\r\n }",
"Transaction getTransctionByTxId(String txId);",
"public String getTransactionId() {\n return this.transactionId;\n }",
"protected String getTransactionId() {\n return transactionId;\n }",
"public String getTransactionId() {\n return transactionId;\n }",
"public String getTransactionId() {\n return transactionId;\n }",
"public int getTransactionId() {\n return transactionId;\n }",
"@Override\n\tpublic JSONObject getObjectInfo() {\n\t\tJSONObject jsonObject = new JSONObject();\n\t\ttry {\n\t jsonObject.put(\"bigpaytypename\", this.bigPayTypeName); \n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n return jsonObject;\n\t}",
"protected abstract Object getTransactionObject() throws TransactionInfrastructureException;",
"@JsonProperty(\"transaction\")\n public List<Transaction> getTransactionList() {\n return this.transactionList;\n }",
"public TransactionResp transaction_list() throws Exception {\n String s = main(\"transaction_list\",\"[]\");\n return JsonHelper.jsonStr2Obj(s, TransactionResp.class);\n }",
"com.google.protobuf.ByteString getTransactions(int index);",
"public Double getTransaction() {\r\n return transaction;\r\n }",
"com.google.protobuf.ByteString getMerchantData();",
"com.google.protobuf.ByteString getMerchantData();",
"@Override\n public String toJsonString() {\n GsonBuilder gsonBuilder = new GsonBuilder();\n gsonBuilder.registerTypeAdapter(TransferOperation.class, new TransferSerializer());\n return gsonBuilder.create().toJson(this);\n }",
"String getTransactionID();",
"@Override\r\n\tpublic String toStringFormat() {\n\t\treturn transactionId + \" \" + merhcantId\r\n\t\t\t\t+ \" \" + transactionVolume + \" \" + transactionAmount\r\n\t\t\t\t+ \" \" + transactionDate+\"\\n\";\r\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\tString chaine = \"\\t * Transaction * \\t\\n\";\r\n\t\tchaine = chaine + \"[somme : \"+ this.somme + \"] \";\r\n\t\tchaine = chaine + \"[payeur : \"+ this.payeur + \"] \";\r\n\t\tchaine = chaine + \"[receveur :\"+ this.receveur + \"] \";\r\n\t\treturn chaine;\r\n\t}",
"public java.lang.String getTransactionId() {\n return transactionId;\n }",
"public java.lang.String getTransactionId() {\n return transactionId;\n }",
"public Long getTransactionId() {\n return this.transactionId;\n }",
"public java.lang.String getTransactionId() {\r\n return transactionId;\r\n }",
"public long getTransactionId();",
"public com.cybersource.stub.PaypalTransaction[] getTransaction() {\r\n return transaction;\r\n }",
"public String getTransactionId()\n\t{\n\t\treturn transactionId;\n\t}",
"public String getTransactionID() {\n\t return this.transactionID;\n\t}",
"public Transaction(JsonObject transObj) {\n this.symbol = transObj.get(\"symbol\").getAsString();\n this.price = transObj.get(\"price\").getAsDouble();\n this.volume = transObj.get(\"volume\").getAsInt();\n this.type = transObj.get(\"type\").getAsString(); //buy or sell\n this.date = transObj.get(\"date\").getAsString();\n this.time = transObj.get(\"time\").getAsString();\n this.profitFromSell = transObj.get(\"profitFromSell\").getAsDouble();\n this.averagePurchasePrice = transObj.get(\"averagePurchasePrice\").getAsDouble();\n }",
"public int getTransactionID() {\r\n return transactionID;\r\n }",
"UUID getTransactionId();",
"@java.lang.Override\n public com.google.protobuf.ByteString getTransactions(int index) {\n return instance.getTransactions(index);\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString getTransactions(int index) {\n return transactions_.get(index);\n }",
"public Transaction getById(String id) throws Exception;",
"public long getTransactionID() {\r\n return transactionID;\r\n }",
"public String toJsonData() {\n\t\treturn new Gson().toJson(this);\n\t}",
"@java.lang.Override\n public java.lang.String getTransactionId() {\n java.lang.Object ref = transactionId_;\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 transactionId_ = s;\n return s;\n }\n }",
"java.lang.String getTxId();",
"public Transaction getTransaction() {\n\t\treturn null;\n\t}",
"Transaction get(String id) throws Exception;",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public String get(final Request request, final Response response) {\n final Bank bank = BankController.getBank(request);\n if (bank == null) {\n // invalid bank\n response.status(404);\n return \"\";\n }\n return this.gson.toJson(bank.getTransactions());\n }",
"public java.lang.String getTransactionId() {\n return transactionId;\n }",
"public java.lang.String getTransactionId() {\n return transactionId;\n }",
"BusinessTransaction get(String tenantId, String id);",
"public String getTransactionId() {\n\t\treturn transactionId;\n\t}",
"public String getTransactionId() {\n\t\treturn transactionId;\n\t}",
"public TransactionInfo getTransactionInfo(String transactionId){\n\t\tTransactionInfo trInfo = new TransactionInfo();\n\t\tfor (ExtendedBlock block: node.blockchain.getBlockchain()) {\n\t\t\tfor(StateTransaction tr: block.internBlock.transactions){\n\t\t\t\ttrInfo.transactionId = tr.getTransctionId();\n\t\t\t\ttrInfo.nonce = tr.getNonce();\n\t\t\t\ttrInfo.signature = tr.getSignature();\n\t\t\t\t\n\t\t\t\tif (tr instanceof StateDataTransaction) {\n\t\t\t\t\ttrInfo.fromAddress = ((StateDataTransaction)tr).GetAddressString();\n\t\t\t\t\ttrInfo.newValue = ((StateDataTransaction)tr).newValue;\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if (tr instanceof StateTransferTransaction){\n\t\t\t\t\ttrInfo.fromAddress = CryptoUtil.getStringFromKey(((StateTransferTransaction)tr).fromAddress);\n\t\t\t\t\ttrInfo.toAddress = CryptoUtil.getStringFromKey(((StateTransferTransaction)tr).toAddress);\n\t\t\t\t\ttrInfo.amount = ((StateTransferTransaction)tr).amount;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// error unknown transaction in the chain\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\treturn trInfo;\n\t}",
"public String getAsJson() {\n StringBuffer sb = new StringBuffer();\n sb.append(\"{\\\"code\\\": \\\"\").append(this.code).append(\"\\\", \");\n sb.append(\"\\\"color\\\": \\\"\").append(this.color).append(\"\\\", \");\n\n /* Append a size only if the product has a Size */\n if (this.size.getClass() != NoSize.class) {\n sb.append(\"\\\"size\\\": \\\"\").append(this.size).append(\"\\\", \");\n }\n\n sb.append(\"\\\"price\\\": \").append(this.price).append(\", \");\n sb.append(\"\\\"currency\\\": \\\"\").append(this.currency).append(\"\\\"}, \");\n\n return sb.toString();\n }",
"Transaction findTransactionById(Long id);",
"public String toString()\n {\n /**\n * Set the format as [timestamp] account number : command\n */\n String transaction = \"[\" + timestamp + \"] \" + accountInfo.getAccountNumber() + \" : \" + command.name(); \n \n /**\n * Return the string.\n */\n return transaction;\n }",
"public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getTransactionIdBytes() {\n java.lang.Object ref = transactionId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n transactionId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public long getTransactionid() {\n return transactionid;\n }",
"void sendTransactionToServer()\n \t{\n \t\t//json + sql magic\n \t}",
"private String getTxAsString()\n {\n if (tx == null)\n return null;\n\n return tx.getClass().getName() + \"@\" + System.identityHashCode(tx);\n }",
"@Override\n\t\tprotected String doInBackground(String... params) {\n\t\t\tString jsonString = WebserviceImport_more.Gettransd_1_0(params[0]);\n\t\t\treturn jsonString;\n\t\t}",
"public static Transactions getTransactions() {\n return Transactions;\n }",
"private void transactionList(CallbackContext callbackContext) {\n TransactionDAO transactionDAO = new TransactionDAO(StoneSDK.this.cordova.getActivity());\n\n // cria uma lista com todas as transacoes\n List<TransactionObject> transactionObjects = transactionDAO.getAllTransactionsOrderByIdDesc();\n\n // exibe todas as transacoes (neste caso valor e status) para o usuario\n JSONArray arrayList = new JSONArray();\n\n for (TransactionObject list : transactionObjects) {\n JSONObject obj = new JSONObject();\n\n try{\n obj.put(\"idFromBase\", String.valueOf(list.getIdFromBase()));\n obj.put(\"amount\", list.getAmount());\n obj.put(\"requestId\", String.valueOf(list.getRequestId()));\n obj.put(\"emailSent\", String.valueOf(list.getEmailSent()));\n obj.put(\"timeToPassTransaction\", String.valueOf(list.getTimeToPassTransaction()));\n obj.put(\"initiatorTransactionKey\", String.valueOf(list.getInitiatorTransactionKey()));\n obj.put(\"recipientTransactionIdentification\", String.valueOf(list.getRecipientTransactionIdentification()));\n obj.put(\"cardHolderNumber\", String.valueOf(list.getCardHolderNumber()));\n obj.put(\"cardHolderName\", String.valueOf(list.getCardHolderName()).trim());\n obj.put(\"date\", String.valueOf(list.getDate()));\n obj.put(\"time\", String.valueOf(list.getTime()));\n obj.put(\"aid\", String.valueOf(list.getAid()));\n obj.put(\"arcq\", String.valueOf(list.getArcq()));\n obj.put(\"authorizationCode\", String.valueOf(list.getAuthorizationCode()));\n obj.put(\"iccRelatedData\", String.valueOf(list.getIccRelatedData()));\n obj.put(\"transactionReference\", String.valueOf(list.getTransactionReference()));\n obj.put(\"actionCode\", String.valueOf(list.getActionCode()));\n obj.put(\"commandActionCode\", String.valueOf(list.getCommandActionCode()));\n obj.put(\"pinpadUsed\", String.valueOf(list.getPinpadUsed()));\n obj.put(\"cne\", String.valueOf(list.getCne()));\n obj.put(\"cvm\", String.valueOf(list.getCvm()));\n obj.put(\"serviceCode\", String.valueOf(list.getServiceCode()));\n obj.put(\"entryMode\", String.valueOf(list.getEntryMode()));\n obj.put(\"cardBrand\", String.valueOf(list.getCardBrand()));\n obj.put(\"instalmentTransaction\", String.valueOf(list.getInstalmentTransaction()));\n obj.put(\"transactionStatus\", String.valueOf(list.getTransactionStatus()));\n obj.put(\"instalmentType\", String.valueOf(list.getInstalmentType()));\n obj.put(\"typeOfTransactionEnum\", String.valueOf(list.getTypeOfTransactionEnum()));\n obj.put(\"cancellationDate\", String.valueOf(list.getCancellationDate()));\n\n arrayList.put(obj);\n\n }catch (JSONException e){\n e.printStackTrace();\n }\n }\n callbackContext.success(arrayList);\n }",
"public TransactionType getTransactionType()\n {\n return transactionType;\n }",
"public String getTransSnapshot() {\n return transSnapshot;\n }",
"public JSONObject getJSONObject() {\n\t\tJSONObject jsonOrder = new JSONObject();\n\t\t\n\t\tjsonOrder.put(\"meal\", mealId);\n\t\tjsonOrder.put(\"booking\", bookingId);\n\t\t\n\t\treturn jsonOrder;\n\t}",
"public List<TransactionInfo> getAll() {\n return transactions;\n }",
"public String getmMyworkTransaction() {\n return mMyworkTransaction;\n }",
"public String toString() {\r\n\t\tString s = \"\";\r\n\t\tfor(String t : transactions) {\r\n\t\t\ts += t + \"\\n\";\r\n\t\t}\r\n\t\treturn s;\r\n\t}",
"Transaction getCurrentTransaction();",
"public Optional<TransactionHistory> readTransaction()\n {\n return null;\n }",
"public Transaction[] getTransactionsList() throws Exception;",
"@JsonIgnore\n\tpublic String getAsJSON() {\n\t\ttry {\n\t\t\treturn TransportService.mapper.writeValueAsString(this); // thread-safe\n\t\t} catch (JsonGenerationException e) {\n\t\t\tlog.error(e, \"JSON Generation failed\");\n\t\t} catch (JsonMappingException e) {\n\t\t\tlog.error(e, \"Mapping from Object to JSON String failed\");\n\t\t} catch (IOException e) {\n\t\t\tlog.error(e, \"IO failed\");\n\t\t}\n\t\treturn null;\n\t}",
"String transactionChangeString() {\n return transaction_mod_list.toString();\n }",
"OBasicTransaction getMicroOrRegularTransaction();",
"public Transaction getTransactionById(Integer id) throws MiddlewareQueryException;",
"String toJSONString(Object data);",
"public Long getTransactionId() {\n\t\treturn transactionId;\n\t}",
"String getJson();",
"String getJson();",
"String getJson();",
"List<String> getTransactionInfos() {\n\t\tList<String> result = new ArrayList<String>();\n\t\tfor (Transaction transaction : transactionLog.getTransactions()) {\n\t\t\tresult.add(transaction.toString());\n\t\t}\n\t\treturn result;\n\t}",
"private static String export(Repository repository, boolean withTransactionListing) {\n extractKnownCategories(repository);\n\n StringBuilder json = new StringBuilder();\n\n json.append(\"{\");\n\n // Institutions\n appendName(json, \"institutions\").append(\":{\");\n repository.getInstitutions().stream().forEach(i -> appendInstitutionOrPayee(json, i));\n removeLastComma(json);\n json.append(\"},\");\n\n // Payees\n appendName(json, \"payees\").append(\":{\");\n repository.getPayees().stream().forEach(p -> appendInstitutionOrPayee(json, p));\n removeLastComma(json);\n json.append(\"},\");\n\n // Bank Accounts\n appendName(json, \"bankAccounts\").append(\":{\");\n repository.getBankAccounts().stream().forEach(a -> appendAccount(json, a, true, withTransactionListing));\n removeLastComma(json);\n json.append(\"},\");\n\n // Categories\n appendName(json, \"categories\").append(\":{\");\n repository.getCategories().stream().forEach(a -> appendAccount(json, a, false, withTransactionListing));\n removeLastComma(json);\n json.append(\"},\");\n\n // Remains transactions\n appendName(json, \"transactions\").append(\":{\");\n repository.getBankAccounts().stream()\n .flatMap(a -> a.listTransactions().stream())\n .distinct()\n .forEach(t -> appendTransaction(json, t));\n removeLastComma(json);\n json.append(\"}\");\n\n // end\n json.append(\"}\");\n\n return json.toString();\n }",
"public String getJson();",
"public int getTransactionId() {\n\t\treturn transactionId;\n\t}",
"public Transaction(String transactionID){\n\t\tString sql = \"SELECT * FROM mak213_bank1017.transaction \"; \n\t\tsql += \"WHERE transactionID = '\" + transactionID + \"'\"; \n\t\tSystem.out.println(sql);\n\t\tDbUtilities db = new MySqlUtilities();\n\t\ttry {\n\t\t\tResultSet rs = db.getResultSet(sql); \n\t\t\twhile(rs.next()){\n\t\t\t\tthis.transactionID = rs.getString(\"transactionID\");\n\t\t\t\tthis.accountID = rs.getString(\"accountID\");\n\t\t\t\tthis.type = rs.getString(\"type\");\n\t\t\t\tthis.amount = rs.getDouble(\"amount\");\n\t\t\t\tthis.balance = rs.getDouble(\"balance\");\n\t\t\t\tthis.transactionDate = new Date();\n\t\t\t}\n\t\t} catch (SQLException ex) {\n\t\t\tex.printStackTrace();\n\t\t\tErrorLogger.log(\"Could not retrieve transaction data\");\n\t\t\tErrorLogger.log(ex.getMessage());\n\t\t\t\n\t\t}\n\t\ttry {\n\t\t\tdb.closeDbConnection();\n\t\t} catch (SQLException e) {\n\t\t\tErrorLogger.log(\"Could not close connection\");\n\t\t\te.printStackTrace();\n\t\t} \n\n\t}",
"public JSONObject toJSON() throws JSONException {\n\t\tJSONObject json = new JSONObject();\n\t\tjson.put(ID_ACCOUNT_ADDRESS, getAccountAddress()); // Add account address.\n\t\tjson.put(ID_BALANCE, getBalance()); // Add account balance.\n\t\t\n\t\tArrayList<RippleWallet> foundWallets = getWallets();\n\t\tArrayList<JSONObject> jsonWallets = new ArrayList<JSONObject>();\n\t\tIterator<RippleWallet> walletIterator = foundWallets.iterator();\n\t\twhile (walletIterator.hasNext()) {\n\t\t\tjsonWallets.add(walletIterator.next().toJSON());\n\t\t}\n\t\tjson.put(\"wallets\", jsonWallets); // Add wallets.\n\t\t\n\t\treturn json;\n\t}",
"public java.lang.String getTransactionId() {\n java.lang.Object ref = transactionId_;\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 transactionId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"com.google.protobuf.ByteString getSerializedPaymentDetails();",
"public int getAmount()\n {\n return this.transactionValue;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return instance.getMerchantData();\n }"
] |
[
"0.6534589",
"0.6371599",
"0.6321012",
"0.6181734",
"0.6115501",
"0.6115501",
"0.61118734",
"0.6072663",
"0.6041695",
"0.6004585",
"0.5991566",
"0.5954065",
"0.5944942",
"0.5919454",
"0.5909448",
"0.5882255",
"0.58598495",
"0.5836986",
"0.5830261",
"0.58039314",
"0.58039314",
"0.5778608",
"0.57678664",
"0.57596993",
"0.5756628",
"0.5738688",
"0.5734667",
"0.57249194",
"0.57110065",
"0.57110065",
"0.57066816",
"0.56689036",
"0.56669503",
"0.564656",
"0.56419724",
"0.56419724",
"0.5629089",
"0.5627465",
"0.5619055",
"0.56112915",
"0.56092995",
"0.560305",
"0.55986965",
"0.5590021",
"0.55868834",
"0.5569987",
"0.55598104",
"0.55324274",
"0.5531577",
"0.55302405",
"0.55288017",
"0.55187464",
"0.551428",
"0.55107254",
"0.55089843",
"0.5496915",
"0.5496131",
"0.5496131",
"0.54804254",
"0.54779005",
"0.54779005",
"0.54778445",
"0.5476489",
"0.5463784",
"0.54590034",
"0.5455658",
"0.54540455",
"0.5453452",
"0.5446045",
"0.54130995",
"0.5412766",
"0.54105157",
"0.5407703",
"0.5404696",
"0.54014444",
"0.5400696",
"0.5393603",
"0.53898287",
"0.5387348",
"0.5381868",
"0.5380127",
"0.5372816",
"0.5363206",
"0.53421235",
"0.53375345",
"0.53323996",
"0.53247404",
"0.5319123",
"0.5315778",
"0.5315778",
"0.5315778",
"0.5308534",
"0.5304709",
"0.53000164",
"0.5296958",
"0.5293459",
"0.5287615",
"0.52812785",
"0.5268086",
"0.5267843",
"0.52650344"
] |
0.0
|
-1
|
This method creates a transaction by passing the transaction's data in a POST request's body and returns the newly created transaction's data as a JSON object. The data is validated before the transaction is stored in the database.
|
@PostMapping
@ResponseStatus(HttpStatus.CREATED)
public Transaction createTransaction(
@RequestBody @Valid TransactionRequest transaction,
BindingResult bindingResult)
{
if (bindingResult.hasErrors()) {
String errorMessageFromBindingResult = ControllerUtils.getErrorMessageFromBindingResult(bindingResult);
throw new InvalidDataException(errorMessageFromBindingResult);
}
Transaction createdTransaction = null;
try {
createdTransaction = transactionService.createNewTransaction(transaction);
}
catch (InvalidDataException e) {
String exceptionMessage = e.getMessage();
throw new InvalidDataException(exceptionMessage);
}
return createdTransaction;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void createTransaction(Transaction trans);",
"Transaction createTransaction();",
"public Transaction createTransaction(Credentials user, TransactionType tt) throws RelationException;",
"Transaction createTransaction(Settings settings);",
"protected abstract Transaction createAndAdd();",
"@Override\n\tpublic int createTransaction(BankTransaction transaction) throws BusinessException {\n\t\tint tran = 0;\n\t\t\n\t\ttry {\n\t\t\tConnection connection = PostgresqlConnection.getConnection();\n\t\t\tString sql = \"insert into dutybank.transactions (account_id, transaction_type, amount, transaction_date) values(?,?,?,?)\";\n\t\t\t\n\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(sql);\n\t\t\t\n\t\t\tpreparedStatement.setInt(1, transaction.getAccountid());\n\t\t\tpreparedStatement.setString(2, transaction.getTransactiontype());\n\t\t\tpreparedStatement.setDouble(3, transaction.getTransactionamount());\n\t\t\tpreparedStatement.setDate(4, new java.sql.Date(transaction.getTransactiondate().getTime()));\n\n\t\t\t\n\t\t\ttran = preparedStatement.executeUpdate();\n\t\t\t\n\t\t} catch (ClassNotFoundException | SQLException e) {\n\t\t\tthrow new BusinessException(\"Some internal error has occurred while inserting data\");\n\t\t}\n\t\t\n\n\t\treturn tran;\n\t}",
"public void createCustomerTransaction(String customerId, TransactionData transData) {\n \t\n \tTransaction transEntity = new Transaction();\n \t\n \tBeanUtils.copyProperties(transData, transEntity);\n \ttransEntity.setCustomerId(customerId.trim().toUpperCase());\n \t//Save and flush\n \ttransactionRepository.saveAndFlush(transEntity);\n }",
"@Override\n public TransactionModel createTransaction(String custId, LocalDateTime transactionTime, String accountNumber, TransactionType type, BigDecimal amount,String description)\n {\n return transactionDao.createTransaction(custId,accountNumber,transactionTime,type,amount,description);\n }",
"public CleaningTransaction create(CleaningTransaction cleaningTransaction);",
"Purchase create(Purchase purchase) throws SQLException, DAOException;",
"Transaction save(Transaction transaction);",
"@Override\n\tpublic void createTransaction(Transaction t) { \n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction(); \n\n\t\t/* save */ \n\t\tsession.save(t);\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\t}",
"public long createTransaction(Credentials c, TransactionType tt) throws RelationException;",
"public Transaction createTransaction(double amount, long timestamp) {\n Transaction transaction = new Transaction();\n transaction.setAmount(amount);\n transaction.setTimestamp(timestamp);\n return transaction;\n }",
"ResponseDTO createPurchase(PurchaseOrderDTO purchaseOrderDTO) throws ApiException, IOException;",
"@Transactional\n public void createTransaction(long transactionId, Transaction t) {\n log.trace(\"createTransaction {} {}\", transactionId, t);\n Preconditions.checkNotNull(t, \"TransactionEntity must not be null\");\n\n TransactionEntity entity = new TransactionEntity();\n entity.setId(transactionId);\n entity.setAmount(t.getAmount());\n entity.setType(t.getType());\n if (t.getParentId() != null) {\n // if a parent was added, verify it exists and add it to the entity\n TransactionEntity parent = transactionRepository.findOne(t.getParentId());\n if (parent == null) {\n throw new BadRequestException(\"parent not found\");\n }\n entity.setParent(parent);\n }\n\n log.debug(\"Saving a transaction {}\", entity);\n transactionRepository.save(entity);\n\n Set<Long> visited = new HashSet<>();\n TransactionEntity parent = entity.getParent();\n while (parent != null) {\n // cycles are not possible via the API, but if someone will mess with the underlying DB\n // it might happen. In such case, this would never end - causing thread leakage.\n // Therefore, cycle detection is a good practice.\n if (visited.contains(parent.getId())) {\n log.error(\"Cyclic transaction detected when adding transaction id {}: {}\", transactionId, visited);\n throw new ServerErrorException(\"cyclic transaction\");\n }\n visited.add(parent.getId());\n\n TransactionDescendant descendant = new TransactionDescendant();\n descendant.setParent(parent);\n descendant.setDescendant(entity);\n log.debug(\"Saving a descendant {}\", descendant);\n transactionDescendantRepository.save(descendant);\n parent = parent.getParent();\n }\n }",
"public void transaction() throws DBException {\n\t\tUsersTransaction transaction = new UsersTransaction();\n\t\tScanner scan = new Scanner(System.in);\n\t\tLogger.info(\"================TRANSACTION DETAILS TO DONATE======================\");\n\t\tLogger.info(\"Enter the transaction ID\");\n\t\ttransactionId = scan.nextInt();\n\t\tLogger.info(\"Enter the donor ID\");\n\t\tdonorId = scan.nextInt();\n\t\tLogger.info(\"Enter the fund Id\");\n\t\tfundRequestId = scan.nextInt();\n\t\tLogger.info(\"Enter the amount to be funded\");\n\t\ttargetAmount = scan.nextInt();\n\t\ttransaction.setTransactionId(transactionId);\n\t\ttransaction.setDonorId(donorId);\n\t\ttransaction.setFundRequestId(fundRequestId);\n\t\ttransaction.setTargetAmount(targetAmount);\n\t\tinsert(transaction);\n\t\tdonorFundRequest(reqType);\n\t}",
"@PostMapping(\"/invoices/{invoice_number}/paytransactions\")\r\n public PayTransaction createPayTransaction(@PathVariable long invoice_number, @Valid @RequestBody PayTransaction payTransaction) {\r\n return invoiceRepository.findById(invoice_number).map(invoice -> {\r\n payTransaction.setInvoice(invoice);\r\n // Manually invoice number needs to be set. Otherwise it will be empty.\r\n payTransaction.setInvoice_number(invoice.getInvoice_number());\r\n return payTransactionRepository.save(payTransaction);\r\n }).orElseThrow(() -> new ResourceNotFoundException(\"Invoice ID \" + invoice_number + \" not found\"));\r\n }",
"@RequestMapping(value = \"/Reservation/{reservation_reservationId}/transactionses\", method = RequestMethod.POST)\n\t@ResponseBody\n\tpublic Transactions newReservationTransactionses(@PathVariable Integer reservation_reservationId, @RequestBody Transactions transactions) {\n\t\treservationService.saveReservationTransactionses(reservation_reservationId, transactions);\n\t\treturn transactionsDAO.findTransactionsByPrimaryKey(transactions.getTransactionId());\n\t}",
"public Transaction() {\n }",
"protected final Transaction createTransaction(TransactionTypeKeys type) {\n\t\tTransaction trans = null;\n\t\tString payee = getForm().getPayFrom();\n\t\tdouble amount = parseAmount();\n\n\t\t// Put amount in proper form.\n\t\tif ((type == INCOME && amount < 0.0)\n\t\t\t\t|| (type == EXPENSE && amount >= 0.0)) {\n\t\t\tamount = -amount;\n\t\t}\n\n\t\t// Put payee in proper form.\n\t\tpayee = purgeIdentifier(payee);\n\n\t\ttrans = new Transaction(getForm().getField(CHECK_NUMBER).getText(),\n\t\t\t\tparseDate(), payee, Money.of(amount,\n\t\t\t\t\t\tUI_CURRENCY_SYMBOL.getCurrency()), getCategory(),\n\t\t\t\tgetForm().getField(NOTES).getText());\n\n\t\t// Set attributes not applicable in the constructor.\n\t\ttrans.setIsReconciled(getForm().getButton(PENDING).isSelected() == false);\n\n\t\tif (isInEditMode() == true) {\n\t\t\ttrans.setLabel(getEditModeTransaction().getLabel());\n\t\t}\n\n\t\treturn trans;\n\t}",
"@RequestMapping(path=\"/createOrder\", method = RequestMethod.POST, produces = \"application/json\", consumes = \"application/json\")\n\tpublic ResponseEntity<PaymentResponseDTO> createOrder(@RequestBody PaymentRequestDTO btcDTO) { \n\t\tlogger.info(\"Init payment\");\n\t\t\n\t\tSellerBitcoinInfo sbi = bitcoinRepo.findByidMagazine(btcDTO.getSellerId());\n\t\t\n\t\tSystem.out.println(\"ADDRESS \" + sbi.getBitcoinAddress());\n\t\t\n\t\tString token = sbi.getBitcoinAddress();\n\t\t\n\t\tString authToken = \"Bearer \" + token;\n\t\t//trebali bismo da kreiramo transakciju koja ce biti u stanju \"pending\" sve dok korisnik ne plati ili mu ne istekne odredjeno vreme\n\t\t\n\t\t//txRepo.save(tx);\n\t\t//RestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\t//restTemplate.getForEntity(\"https://google.rs\", String.class);\n\t\t//restTemplate.getForEntity(\"https://api.coingate.com/v2/ping\", String.class);\n\t\t\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.add(\"Authorization\", authToken);\t \n\t\t\n\t\tSystem.out.println(\"Amount: \" + btcDTO.getAmount());\n\t\t\n\t\tCreateOrderRequestDTO order = new CreateOrderRequestDTO(\"1111\", btcDTO.getAmount(), \"BTC\", \"DO_NOT_CONVERT\", \"Title\", \"Description\", \"https://localhost:4200/success\", \"https://localhost:4200/failed\", \"https://localhost:4200/success\", \"token\");\n\t\t\n\t\tResponseEntity<Object> responseEntity = new RestTemplate().exchange(\"https://api-sandbox.coingate.com/v2/orders\", HttpMethod.POST,\n\t\t\t\tnew HttpEntity<Object>(order, headers), Object.class);\n\t\t\n\t\tlogger.info(responseEntity.getBody().toString());\n\t\t\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tmapper.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);\n\t\tBitCoinResponseDTO btcResponse = new BitCoinResponseDTO();\n\n\t\tbtcResponse = mapper.convertValue(responseEntity.getBody(), BitCoinResponseDTO.class);\n\t\t\n\t\tString paymentUrl = btcResponse.getPayment_url();\n\t\t\n\t\tlogger.info(paymentUrl);\n\t\t\n\t\tTx tx = createTransaction(btcResponse,sbi);\n\t\ttxRepo.save(tx);\n\t\t\n\t\tTxInfoDto txInfo = new TxInfoDto();\n\t\ttxInfo.setOrderId(btcDTO.getOrderId());\n\t\ttxInfo.setServiceWhoHandlePayment(\"https://localhost:8764/bitCoin\");\n\t\ttxInfo.setPaymentId(tx.getorder_id()); //ovde se nalazi orderId koji je i na coingate-u\n\t\t\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\tResponseEntity<TxInfoDto> r = restTemplate.postForEntity(\"https://localhost:8111/request/updateTxAfterPaymentInit\", txInfo, TxInfoDto.class);\n\t\t\n\t\t//BitCoinResponseDTO response = parser.parseList(responseEntity.getBody().toString());\n\t\t\n\t\t//BitCoinResponseDTO responseDTO = responseEntity.;\n\t\t\n\t\t//String pageToRedirec = responseDTO.getPayment_url();\n\t\t\n\t\t//restTemplate.exchange\n\t\t//ResponseEntity<String> response = restTemplate.postForEntity(\"https://api-sandbox.coingate.com/v2/orders\", btcDTO, String.class);\n\t\t\n\t\tPaymentResponseDTO responseDTO = new PaymentResponseDTO();\n\t\tresponseDTO.setPaymentUrl(paymentUrl);\n\t\tresponseDTO.setPaymentId(1l);\n\n\t\tSTATIC_ID = btcResponse.getId();\n\t\tSTATIC_TOKEN = authToken;\n\t\tIS_CREATE = true;\n\t\t\n\t\t//scheduleFixedDelayTask();\n\t\t//scheduleFixedDelayTask(btcResponse.getId(), authToken);\n\t\t\n\t\treturn new ResponseEntity<PaymentResponseDTO>(responseDTO,HttpStatus.OK);\n\t}",
"@Test(groups = \"Transactions Tests\", description = \"Create new transaction\")\n\tpublic void createNewTransaction() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickAddTransactionBtn();\n\t\tTransactionsScreen.typeTransactionDescription(\"Extra income\");\n\t\tTransactionsScreen.typeTransactionAmount(\"300\");\n\t\tTransactionsScreen.clickTransactionType();\n\t\tTransactionsScreen.typeTransactionNote(\"Extra income from this month\");\n\t\tTransactionsScreen.clickSaveBtn();\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$300\"));\n\t\ttest.log(Status.PASS, \"Sub-account created successfully and the value is correct\");\n\n\t\t//Testing if the transaction was created in the 'Double Entry' account, if the value is correct and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$300\"));\n\t\ttest.log(Status.PASS, \"'Double Entry' account also have the transaction and the value is correct\");\n\n\t}",
"@RequestMapping(method = RequestMethod.POST)\r\n\t@ResponseBody\r\n\t@Transactional\r\n\tpublic Object create(@RequestBody Model model) {\r\n\t\ttry {\r\n\t\t\tgetService().create(model);\r\n\t\t\treturn true;\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"Create exception for \" + model, e);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"private Tx createTransaction(BitCoinResponseDTO btcDTO, SellerBitcoinInfo sbi) {\n\t\t\n\t\tTx tx = new Tx();\n\t\t\n\t\t\n\t\ttx.setDate(new Date());\n\t\ttx.setAmountOfMoney(btcDTO.getPrice_amount());\n\t\ttx.setStatus(TxStatus.PENDING);\n\t\ttx.setRecieverAddress(btcDTO.getPayment_url());\n\t\ttx.setorder_id(btcDTO.getId()); //ovaj id je na coin gate-u i moram ga cuvati u transakciji\n\t\ttx.setTxDescription(\"Porudzbina je kreirana od strane korisnika\");\n\t\ttx.setSbi(sbi);\n\t\t\n\t\t//trebace ovde jos da se setuje id korisnika koji je kreirao porudzbinu kako bi kasnije mogao da getuje sve\n\t\t//njegove transakcije\n\t\t\n\t\t\n\t\treturn tx;\n\t\t\n\t}",
"@Override\n\tpublic Trunk create(final Map<String, String> params) throws TwilioRestException {\n\t\tfinal TwilioRestResponse response = getClient().safeRequest(getResourceLocation(), \"POST\", params);\n\t\treturn makeNew(getClient(), response.toMap());\n\t}",
"@CompileStatic\n public <T> T doTransaction(String transactionName, BiFunction<NyQLInstance, Map<String, Object>, T> body,\n Map<String, Object> data, boolean autoCommit) throws NyException {\n QExecutor executor = null;\n try (QSession qSession = QSession.create(configurations, transactionName)) {\n executor = qSession.getExecutor();\n executor.startTransaction();\n T result = body.apply(this, data);\n if (autoCommit) {\n executor.commit();\n }\n return result;\n\n } catch (Exception ex) {\n if (executor != null) {\n executor.rollback(null);\n }\n throw new NyException(\"An exception occurred inside transaction '$transactionName'!\", ex);\n } finally {\n if (executor != null) {\n executor.done();\n }\n }\n }",
"private Transaction setUpTransaction(double amount, Transaction.Operation operation, String username){\n Transaction transaction = new Transaction();\n transaction.setDate(Date.valueOf(LocalDate.now()));\n transaction.setAmount(amount);\n transaction.setOperation(operation);\n transaction.setUserId(userRepository.getByUsername(username).getId());\n return transaction;\n }",
"public boolean createTransaction() {\n\t\t\treturn false;\n\t\t}",
"TransactionType createTransactionType();",
"@BodyParser.Of(play.mvc.BodyParser.Json.class)\n public static Result create() throws JsonParseException, JsonMappingException, IOException {\n JsonNode json = request().body().asJson();\n Thing thing = mapper.treeToValue(json, Thing.class);\n thing.save();\n return ok(mapper.valueToTree(thing));\n }",
"@Override\n\tpublic Trunk create(final List<NameValuePair> params) throws TwilioRestException {\n\t\tfinal TwilioRestResponse response = getClient().safeRequest(getResourceLocation(), \"POST\", params);\n\t\treturn makeNew(getClient(), response.toMap());\n\t}",
"@Override\n\tpublic int newTransaction(String username, long amount, String type, String message) {\n\t\ttry {\n\t\t\tdb.getTransaction().begin();\n\t\t\tTransaction trans = new Transaction(username, amount, type, message);\n\t\t\tdb.persist(trans);\n\t\t\tdb.getTransaction().commit();\n\t\t\treturn trans.getId();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Upps, Something happened in the database\");\n\t\t\treturn -1;\n\t\t}\n\t}",
"public Transaction(JsonObject transObj) {\n this.symbol = transObj.get(\"symbol\").getAsString();\n this.price = transObj.get(\"price\").getAsDouble();\n this.volume = transObj.get(\"volume\").getAsInt();\n this.type = transObj.get(\"type\").getAsString(); //buy or sell\n this.date = transObj.get(\"date\").getAsString();\n this.time = transObj.get(\"time\").getAsString();\n this.profitFromSell = transObj.get(\"profitFromSell\").getAsDouble();\n this.averagePurchasePrice = transObj.get(\"averagePurchasePrice\").getAsDouble();\n }",
"protected abstract Txn createTxn(Txn parent, IsolationLevel level) throws Exception;",
"public com.vodafone.global.er.decoupling.binding.request.TransactionType createTransactionType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.TransactionTypeImpl();\n }",
"public int createPurchaseOrder(PurchaseOrder purchaseOrder){\n try {\n session.save(purchaseOrder);\n tx.commit();\n } catch (Exception e) {\n e.printStackTrace();\n tx.rollback();\n return 0 ;\n }\n return 0;\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@RequestMapping(method = RequestMethod.POST, path = \"/transactions\", produces = \"application/json\")\n public final void saveTransaction(@RequestBody Transaction transaction, HttpServletResponse response) {\n// having the registerTransaction method helps keeping our controller more clean\n boolean registered = transactionService.registerTransaction(transaction);\n\n if (registered) {\n response.setStatus(HttpStatus.CREATED.value());\n\n } else {\n response.setStatus(HttpStatus.NO_CONTENT.value());\n }\n }",
"@PostMapping(value = \"/customers\", consumes = MediaType.APPLICATION_JSON_VALUE)\n\tpublic void createCustomer(@RequestBody CustomerDTO custDTO) {\n\t\tlogger.info(\"Creation request for customer {}\", custDTO);\n\t\tcustService.createCustomer(custDTO);\n\t}",
"CreateResponse create(@NonNull CreateRequest request);",
"public static Transaction createEntity(EntityManager em) {\n Transaction transaction = new Transaction()\n .date(DEFAULT_DATE);\n return transaction;\n }",
"private TransactionRequest initTransactionRequest() {\n TransactionRequest transactionRequestNew = new\n TransactionRequest(System.currentTimeMillis() + \"\", 20000);\n\n //set customer details\n transactionRequestNew.setCustomerDetails(initCustomerDetails());\n\n\n // set item details\n ItemDetails itemDetails = new ItemDetails(\"1\", 20000, 1, \"Trekking Shoes\");\n\n // Add item details into item detail list.\n ArrayList<ItemDetails> itemDetailsArrayList = new ArrayList<>();\n itemDetailsArrayList.add(itemDetails);\n transactionRequestNew.setItemDetails(itemDetailsArrayList);\n\n\n // Create creditcard options for payment\n CreditCard creditCard = new CreditCard();\n\n creditCard.setSaveCard(false); // when using one/two click set to true and if normal set to false\n\n// this methode deprecated use setAuthentication instead\n// creditCard.setSecure(true); // when using one click must be true, for normal and two click (optional)\n\n creditCard.setAuthentication(CreditCard.AUTHENTICATION_TYPE_3DS);\n\n // noted !! : channel migs is needed if bank type is BCA, BRI or MyBank\n// creditCard.setChannel(CreditCard.MIGS); //set channel migs\n creditCard.setBank(BankType.BCA); //set spesific acquiring bank\n\n transactionRequestNew.setCreditCard(creditCard);\n\n return transactionRequestNew;\n }",
"protected abstract Object newTransaction(int isolationLevel) throws TransactionInfrastructureException;",
"@PostMapping\n public ResponseEntity<Wallet> createWallet(@Valid @RequestBody Wallet wallet) {\n return ResponseEntity\n .status(CREATED)\n .body(walletService.createWallet(wallet));\n }",
"private void createTx() throws Exception {\n PublicKey recipient = Seed.getRandomAddress();\n Transaction tx = new Transaction(wallet.pb, recipient, wallet.pr);\n//\t\tSystem.out.println(\"Created a tx\");\n txPool.add(tx);\n//\t\tcache.put(tx.txId, null);\n sendTx(tx);\n }",
"@PostMapping()\n public ResponseEntity<JsonResponse<OrderDTO>> getBasketById(@RequestBody OrderDTO orderDTO) throws Exception {\n //TODO need order Validator here\n log.info(\"REST request to create order: {}\", orderDTO);\n OrderDTO result = this.orderService.createOrder(orderDTO);\n return ResponseEntity.created(new URI(\"/order/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(new JsonResponse<>(result));\n }",
"@PostMapping(value = \"/create\",consumes = MediaType.APPLICATION_JSON_VALUE)\n public InternationalTournaments create(@RequestBody InternationalTournaments create){\n return service.create(create);\n }",
"public Transaction addTransaction(User user, TransactionForm transactionForm) {\n return addTransactions(user, ImmutableList.of(transactionForm)).get(0);\n }",
"@PostMapping(consumes=MediaType.APPLICATION_JSON_VALUE)\n @ResponseStatus(HttpStatus.CREATED)\n public Taco postTaco(@RequestBody Taco taco) {\n return tacoRepo.save(taco);\n }",
"private Transaction creatTransaction(Bill bill, boolean b) {\n Transaction transaction = new Transaction();\n transaction.setDateOfTransaction(new Date());\n transaction.setCostOfTransaction(String.valueOf(bill.getCostOfBill()));\n transaction.setSerialOfTransaction(new TransactionSerialProducer().serialProducer());\n transaction.setFinished(b);\n transaction.setTypeOfTransaction(\"پرداخت قبض\");\n transaction.setBillingId(bill.getBillingId());\n transaction.setPaymentCode(bill.getPaymentCode());\n dbHelper = new DBHelper();\n dbHelper.insertTransaction(transaction);\n return transaction;\n }",
"@PostMapping(value = Endpoints.SUBMIT_TRANSACTION)\n public APIResponse<?> submitTransactionForMonitoring(@RequestBody ComplianceTransactionRequest request) {\n LogUtil.setLogPrefix(Endpoints.SUBMIT_TRANSACTION + \"/\"\n + request.getData().getAttributes().getTransaction_data().getTx_id());\n LogUtil.log(logger, \"ComplianceTransactionRequest : \" + request);\n return complianceSerivceImpl.submitTransactionForMonitoring(request);\n }",
"@FormUrlEncoded\n @POST(\"UserData/create_order\")\n public Observable<UserDataResponse> CreateOrder(@Field(\"ord_slm_id\") String ord_slm_id,\n @Field(\"ord_dl_id\") String dealer_id,\n @Field(\"sord_prd_id\") String sord_prd_id,\n @Field(\"sord_qty\") String sord_qty,\n @Field(\"sord_price\") String sord_price,\n @Field(\"ord_total\") String ord_total,\n @Field(\"ord_point\") String ord_point,\n @Field(\"sord_point\") String sord_point,\n @Field(\"sord_total\") String sord_total,\n @Field(\"ord_type\") String ord_type,\n @Field(\"ord_dstr_id\") String ord_dstr_id,\n @Field(\"ord_dl_id\") String ord_dl_id);",
"public void createTransaction(Transaction transaction,String token) {\n Account senderAccount = accountRepository.getAccountByIBAN(transaction.getSender());\n Account receiverAccount = accountRepository.getAccountByIBAN(transaction.getReceiver());\n User userPerformingAction = jwtUtil.getUserFromToken(token);\n Role userRole = jwtUtil.getRoleFromToken(token);\n // check if accounts exist\n if (senderAccount == null || receiverAccount == null) {\n throw new IllegalArgumentException(\"Accounts sender and receiver cannot be found\");\n }\n if ((userRole == Role.EMPLOYEE) && checkIfTransactionIsPossible(senderAccount,receiverAccount) ){\n makeTransaction(senderAccount, receiverAccount, transaction);\n }\n else if(userRole == Role.CUSTOMER){\n if (utils.authorizeAccount(senderAccount,userPerformingAction) && checkIfTransactionIsPossible(senderAccount,receiverAccount)){\n makeTransaction(senderAccount, receiverAccount, transaction);\n }\n else {\n throw new SecurityException(\"Unauthorized to perform transaction\");\n }\n }\n }",
"@Override\n\tpublic Single<TransactionData> createTransactionWithSig(Wallet from, BigInteger gasPrice, BigInteger gasLimit, String data, int chainId) {\n\t\tfinal Web3j web3j = getWeb3jService(chainId);\n\t\tfinal BigInteger useGasPrice = gasPriceForNode(chainId, gasPrice);\n\n\t\tTransactionData txData = new TransactionData();\n\n\t\treturn networkRepository.getLastTransactionNonce(web3j, from.address)\n\t\t\t\t.flatMap(nonce -> getRawTransaction(nonce, useGasPrice, gasLimit, BigInteger.ZERO, data))\n\t\t\t\t.flatMap(rawTx -> signEncodeRawTransaction(rawTx, from, chainId))\n\t\t\t\t.flatMap(signedMessage -> Single.fromCallable( () -> {\n\t\t\t\t\ttxData.signature = Numeric.toHexString(signedMessage);\n\t\t\t\t\tEthSendTransaction raw = web3j\n\t\t\t\t\t\t\t.ethSendRawTransaction(Numeric.toHexString(signedMessage))\n\t\t\t\t\t\t\t.send();\n\t\t\t\t\tif (raw.hasError()) {\n\t\t\t\t\t\tthrow new Exception(raw.getError().getMessage());\n\t\t\t\t\t}\n\t\t\t\t\ttxData.txHash = raw.getTransactionHash();\n\t\t\t\t\treturn txData;\n\t\t\t\t}))\n\t\t\t\t.flatMap(tx -> storeUnconfirmedTransaction(from, tx, \"\", BigInteger.ZERO, useGasPrice, chainId, data, C.BURN_ADDRESS))\n\t\t\t\t.subscribeOn(Schedulers.io());\n\t}",
"@POST\n\t@Path(\"/newUser\")\n\t@Consumes({ MediaType.APPLICATION_JSON })\n\t@Produces({ MediaType.APPLICATION_JSON })\n\t@Transactional\n\tpublic Response createUser(User user) {\n\t\tuserDao.createUser(user);\n\n\t\treturn Response.status(201)\n\t\t\t\t.entity(\"A new user has been created\").build();\n\t}",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic SDKResult transaction(TransactionConfig config) {\n\t\tSDKResult result = new SDKResult();\n\t\ttry {\n\t\t\tconfig.setMerchant_id(merchant_id);\n\t\t\tGson gson = new Gson();\n\t\t\tString requestJosnStr = gson.toJson(config);\n\t\t\tRequestConfig requestConfig = RequestConfig.custom()\n\t\t\t\t\t.setConnectionRequestTimeout(1000).setConnectTimeout(1000)\n\t\t\t\t\t.setSocketTimeout(60 * 1000).build();\n\t\t\tString responseJsonStr = client.postJsonStr(serverUrl,\n\t\t\t\t\trequestConfig, requestJosnStr);\n\t\t\tSystem.out.println(responseJsonStr);\n\t\t\tMap<String, Object> map = gson.fromJson(responseJsonStr,\n\t\t\t\t\tnew TypeToken<Map<String, Object>>() {\n\t\t\t\t\t}.getType());\n\t\t\tif (\"200\".equals(map.get(\"code\"))) {\n\t\t\t\tresult.setStatus(true);\n\t\t\t\tresult.setCode((String) map.get(\"code\"));\n\t\t\t\tresult.setMessage((String) map.get(\"message\"));\n\t\t\t\tresult.setResult((Map<String, String>) map.get(\"result\"));\n\t\t\t} else {\n\t\t\t\tresult.setStatus(false);\n\t\t\t\tresult.setCode((String) map.get(\"code\"));\n\t\t\t\tresult.setMessage((String) map.get(\"message\"));\n\t\t\t\tresult.setResult((Map<String, String>) map.get(\"result\"));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tresult.setStatus(false);\n\t\t\tresult.setMessage(e.getMessage());\n\t\t}\n\t\treturn result;\n\t}",
"@RequestMapping(method = RequestMethod.POST, produces = \"application/json\", headers = \"Accept=application/json\" )\n public ResponseEntity<?> createInventory(@Valid @RequestBody InventoryRequest inventoryRequest){\n Product product = productService.getProductById(inventoryRequest.getProductId());\n\n //Criando produto no estoque\n Inventory inventory = inventoryService.createInventoryItem(new Inventory(inventoryRequest.getAmount()));\n product.setInventory(inventory);\n inventory.setProduct(product);\n\n //Atualizando associações entre estoque e produto\n inventoryService.updateInventoryItem(inventory);\n\n return ResponseEntity.status(HttpStatus.CREATED).build();\n }",
"OrderDTO create(OrderDTO orderDTO);",
"public Transaction() {\n this(0, 0, null);\n }",
"@PostMapping(\"/payment-infos\")\n @Timed\n public ResponseEntity<PaymentInfoDTO> createPaymentInfo(@RequestBody PaymentInfoDTO paymentInfoDTO) throws URISyntaxException {\n log.debug(\"REST request to save PaymentInfo : {}\", paymentInfoDTO);\n if (paymentInfoDTO.getId() != null) {\n throw new BadRequestAlertException(\"A new paymentInfo cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n PaymentInfoDTO result = paymentInfoService.save(paymentInfoDTO);\n return ResponseEntity.created(new URI(\"/api/payment-infos/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"TransactionResponseType createTransactionResponseType();",
"void beginTransaction();",
"private void createTransaction() {\n\n String inputtedAmount = etAmount.getText().toString().trim().replaceAll(\",\", \"\");\n\n if (inputtedAmount.equals(\"\") || Double.parseDouble(inputtedAmount) == 0) {\n etAmount.setError(getResources().getString(R.string.Input_Error_Amount_Empty));\n return;\n }\n\n if (mAccount == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Account_Empty));\n return;\n }\n\n if(mCategory == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Category_Income_Empty));\n return;\n }\n\n Double amount = Double.parseDouble(etAmount.getText().toString().replaceAll(\",\", \"\"));\n if(amount < 0) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Amount_Invalid));\n return;\n }\n\n int CategoryId = mCategory != null ? mCategory.getId() : 0;\n String Description = tvDescription.getText().toString();\n int accountId = mAccount.getId();\n String strEvent = tvEvent.getText().toString();\n Event event = null;\n\n if (!strEvent.equals(\"\")) {\n event = mDbHelper.getEventByName(strEvent);\n if (event == null) {\n long eventId = mDbHelper.createEvent(new Event(0, strEvent, mCal, null));\n if (eventId != -1) {\n event = mDbHelper.getEvent(eventId);\n }\n }\n }\n\n boolean isDebtValid = true;\n // Less: DebtCollect, More: Borrow\n if(mCategory.getDebtType() == Category.EnumDebt.LESS) { // Income -> Debt Collecting\n List<Debt> debts = mDbHelper.getAllDebtByPeople(tvPeople.getText().toString());\n\n Double lend = 0.0, debtCollect = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) {\n lend += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) {\n debtCollect += debt.getAmount();\n }\n }\n\n if(debtCollect + amount > lend) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_collect_invalid));\n }\n }\n\n if(isDebtValid) {\n Transaction transaction = new Transaction(0,\n TransactionEnum.Income.getValue(),\n amount,\n CategoryId,\n Description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n long newTransactionId = mDbHelper.createTransaction(transaction);\n\n if (newTransactionId != -1) {\n\n if(mCategory.getDebtType() == Category.EnumDebt.LESS || mCategory.getDebtType() == Category.EnumDebt.MORE) {\n Debt newDebt = new Debt();\n newDebt.setCategoryId(mCategory.getId());\n newDebt.setTransactionId((int) newTransactionId);\n newDebt.setAmount(amount);\n newDebt.setPeople(tvPeople.getText().toString());\n\n long debtId = mDbHelper.createDebt(newDebt);\n if(debtId != -1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n\n if(getFragmentManager().getBackStackEntryCount() > 0) {\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n } else {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_transaction_create_fail));\n mDbHelper.deleteTransaction(newTransactionId);\n }\n } else {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n\n if(getFragmentManager().getBackStackEntryCount() > 0) {\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n }\n\n } else {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_transaction_create_fail));\n }\n }\n\n }",
"@RequestMapping(method = RequestMethod.POST)\n\tpublic ResponseEntity<PaymentInformation> createPaymentInformation(\n\t\t\t@RequestBody PaymentInformation paymentInformation) {\n\n\t\tif (paymentInformationService\n\t\t\t\t.isPaymentInformationExist(paymentInformation.getId())) {\n\t\t\treturn new ResponseEntity<PaymentInformation>(HttpStatus.CONFLICT);\n\t\t}\n\n\t\tPaymentInformation createdPaymentInformation = paymentInformationService\n\t\t\t\t.createPaymentInformation(paymentInformation);\n\n\t\treturn new ResponseEntity<PaymentInformation>(\n\t\t\t\tcreatedPaymentInformation, HttpStatus.CREATED);\n\t}",
"public void createTransaction(TransactionType type, double value, int id, int customerVat) throws ApplicationException {\n\t\ttry{\n\t\t\tTransaction t = new Transaction(type, value, id, customerVat);\n\t\t\tem.persist(t);\n\t\t}\n\t\tcatch (Exception e){\n\t\t\tthrow new ApplicationException(\"Something Shady happened: Error creating Transaction\", e);\n\t\t}\n\t\t\n\t}",
"@ApiOperation(value = \"Create a customer\", notes = \"\")\n @PostMapping(produces = MediaType.APPLICATION_JSON_VALUE)\n @ResponseStatus(HttpStatus.CREATED)\n public CustomerDTO createCustomer(@Validated @RequestBody CustomerDTO customerDTO) {\n\n return customerService.createCustomer(customerDTO);\n }",
"@RequestMapping(path = \"/create\", method = RequestMethod.POST)\n\tpublic ResponseEntity<RestResponse<CompanyDTO>> create(@RequestBody CompanyDTO request) {\n\n\t\tCompanyDTO result = companyService.create(request);\n\t\t\n\t\tRestResponse<CompanyDTO> restResponse = \n\t\t\t\tnew RestResponse<CompanyDTO>(RestResponseCodes.OK.getCode(), RestResponseCodes.OK.getDescription(), result);\n\t\t\n\t\treturn new ResponseEntity<RestResponse<CompanyDTO>>(restResponse, HttpStatus.OK);\n\t\t\t\n\t}",
"@POST\n Call<Post> createPost(@Body Post post);",
"public static final Transaction createTransaction(Transaction transaction, BasicXmlDocument response) {\r\n\r\n\t\ttransaction.currentResponse = response;\r\n\r\n\t\treturn transaction;\r\n\t}",
"@RequestMapping(value = \"/\", method = RequestMethod.POST)\n public ResponseEntity create(@RequestBody Order order)\n {\n throw new NotImplementedException();\n }",
"@RequestMapping(value = \"/api/todo-items\", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n\tpublic TodoItem createTodoItem(@RequestBody TodoItem todoItem) {\n\n\t\tSystem.out.println(\"Creating new task :\" + todoItem.getDescription());\n\n\t\treturn todoItemService.create(todoItem);\n\t}",
"public boolean createCustomer(String customerJSON);",
"@POST(\"orders/new_order/\")\n Call<ApiStatus> createNewOrderByUser(@Body Order myOrder);",
"@RequestMapping(method = RequestMethod.POST)\n public Bin create() {\n throw new NotImplementedException(\"To be implemented\");\n }",
"@Override\n public JSONObject dataBody() {\n\n JSONObject transactionAmount = new JSONObject();\n transactionAmount.put(\"value\", this.transactionAmount);\n transactionAmount.put(\"currency\", this.currency);\n\n JSONObject userInfo = new JSONObject();\n userInfo.put(\"custId\", this.customerId);\n\n JSONObject body = new JSONObject();\n body.put(\"requestType\", \"NATIVE_SUBSCRIPTION\");\n body.put(\"mid\", this.getMerchantId());\n body.put(\"websiteName\", \"WEBSTAGING\");\n body.put(\"orderId\", this.getOrderId());\n body.put(\"subscriptionPaymentMode\", this.subscriptionPaymentMode);\n body.put(\"subscriptionAmountType\", this.subscriptionAmountType);\n body.put(\"subscriptionMaxAmount\", this.subscriptionMaxAmount);\n body.put(\"subscriptionFrequency\", this.subscriptionFrequency);\n body.put(\"subscriptionFrequencyUnit\", this.subscriptionFrequencyUnit);\n body.put(\"subscriptionStartDate\", this.subscriptionStartDate);\n body.put(\"subscriptionExpiryDate\", this.subscriptionExpiryDate);\n body.put(\"subscriptionGraceDays\", this.subscriptionGraceDays);\n body.put(\"subscriptionEnableRetry\", this.subscriptionEnableRetry);\n body.put(\"subscriptionRetryCount\", this.subscriptionRetryCount);\n body.put(\"paytmSsoToken\", \"\");\n body.put(\"callbackUrl\", this.subscriptionCallbackURL);\n body.put(\"userInfo\", userInfo);\n body.put(\"txnAmount\", transactionAmount);\n\n return body;\n }",
"public Object create() {\n executeCallbacks(CallbackType.BEFORE_CREATE);\n\n executeCallbacks(CallbackType.BEFORE_VALIDATION);\n executeValidations();\n executeValidationsOnCreate();\n executeCallbacks(CallbackType.AFTER_VALIDATION);\n\n if (errors.size() > 0) return this;\n\n Adapter adapter = getAdapter();\n if (getId() == null && adapter.shouldPrefetchPrimaryKey(getTableName())) {\n this.id = adapter.getNextSequenceValue(getSequenceName());\n }\n\n StringBuilder sql = new StringBuilder();\n sql.append(\"INSERT INTO \").append(getTableName()).append(\" (\");\n sql.append(quotedColumnNames(includePrimaryKey));\n sql.append(\") VALUES (\").append(quotedAttributeValues(includePrimaryKey)).append(\")\");\n\n id = adapter.insert(sql.toString(), getClass().getName() + \" Create\");\n\n readAssociations();\n readAggregations();\n\n newRecord = false;\n\n executeCallbacks(CallbackType.AFTER_CREATE);\n\n return id;\n }",
"TransactionResponseDTO authorizeTransaction(TransactionRequestDTO transactionRequestDTO);",
"public T create(T entity) {\n\t \tgetEntityManager().getTransaction().begin();\n\t getEntityManager().persist(entity);\n\t getEntityManager().getTransaction().commit();\n\t getEntityManager().close();\n\t return entity;\n\t }",
"@CrossOrigin\n\t@RequestMapping(value=\"/create\", method=RequestMethod.POST)\n\tpublic ResponseEntity<?> createCartItem(@RequestBody CartItem CartItem){\n\t\t//test if the item is already created or not\n\t\tboolean created = CartItemService.addCartItem(CartItem);\n\t\tif(created == false){\n\t\t\tlogger.info(\"item is not created\");\n\t\t\treturn new ResponseEntity<Object>(HttpStatus.CONFLICT);\n\t\t}\n\t\tlogger.info(\"item created\");\n\t\treturn new ResponseEntity<CartItem>(CartItem, HttpStatus.CREATED);\n\t}",
"public void makeTransaction(Transaction transaction)\n throws BalanceNotAvailableException, TransactionIdNotUniqueException, TransactionTypeInCorrectException {\n\n if (checkTransactionId(transaction.getTransactionId())) {\n throw new TransactionIdNotUniqueException(\"Transaction Id should be unique\");\n } else if (transaction.getTransactionType().equalsIgnoreCase(\"debit\")) {\n if (checkAvailableBalance(transaction.getAccountId(), transaction.getAmount())) {\n throw new BalanceNotAvailableException(\"Balance Not Available\");\n }\n updateAccountBalance(transaction.getAccountId(),\n getAccountBalance(transaction.getAccountId()) - transaction.getAmount());\n transactionRepository.save(transaction);\n } else if (transaction.getTransactionType().equalsIgnoreCase(\"credit\")) {\n updateAccountBalance(transaction.getAccountId(),\n getAccountBalance(transaction.getAccountId()) + transaction.getAmount());\n transactionRepository.save(transaction);\n } else {\n throw new TransactionTypeInCorrectException(\"Transaction type should be debit or credit\");\n }\n }",
"void sendTransactionToServer()\n \t{\n \t\t//json + sql magic\n \t}",
"@Override\n public String post(final Request request, final Response response) {\n final String phases = request.queryParams(\"phases\");\n Type type = Type.SIMPLE;\n switch (phases) {\n case \"1-phase\":\n type = Type.SIMPLE;\n break;\n case \"2-phase\":\n type = Type.CHECKED;\n break;\n default:\n response.status(400);\n return \"\";\n }\n final Bank bank = BankController.getBank(request);\n if (bank == null) {\n // invalid bank\n response.status(404);\n return \"\";\n }\n final TransactionId transactionId = bank.createTransaction(type);\n // send id of the created transaction to client\n return transactionId.getUri();\n }",
"@RequestMapping(value = \"/accounts/transaction\", method = RequestMethod.POST)\n\tpublic ResponseEntity<String> transaction(\n\t\t\t@RequestBody Transaction transaction) {\n\t\tlogger.debug(\"AccountController.transaction: \" + transaction.toString());\n\t\tif (transaction.getType().equals(TransactionType.DEBIT)) {\n\t\t\tlogger.debug(\"debit transaction\");\n\t\t\tAccount accountResponse = this.service.findAccount(transaction\n\t\t\t\t\t.getAccountId());\n\n\t\t\tBigDecimal currentBalance = accountResponse.getBalance();\n\n\t\t\tBigDecimal newBalance = currentBalance.subtract(transaction\n\t\t\t\t\t.getAmount());\n\n\t\t\tif (newBalance.compareTo(BigDecimal.ZERO) >= 0) {\n\t\t\t\taccountResponse.setBalance(newBalance);\n\t\t\t\tthis.service.saveAccount(accountResponse);\n\t\t\t\t// TODO save transaction?\n\t\t\t\tlogger.debug(\"transaction processed.\");\n\t\t\t\treturn new ResponseEntity<String>(\"SUCCESS\",\n\t\t\t\t\t\tgetNoCacheHeaders(), HttpStatus.OK);\n\n\t\t\t} else {\n\t\t\t\t// no sufficient founds available\n\t\t\t\treturn new ResponseEntity<String>(\"FAILED\",\n\t\t\t\t\t\tgetNoCacheHeaders(), HttpStatus.EXPECTATION_FAILED);\n\t\t\t}\n\n\t\t} else if (transaction.getType().equals(TransactionType.CREDIT)) {\n\t\t\tlogger.debug(\"credit transaction\");\n\t\t\tAccount accountResponse = this.service.findAccount(transaction.getAccountId());\n\n\t\t\tBigDecimal currentBalance = accountResponse.getBalance();\n\n\t\t\tlogger.debug(\"AccountController.transaction: current balance='\"\n\t\t\t\t\t+ currentBalance + \"'.\");\n\n\t\t\tif (transaction.getAmount().compareTo(BigDecimal.ZERO) > 0) {\n\n\t\t\t\tBigDecimal newBalance = currentBalance.add(transaction.getAmount());\n\t\t\t\tlogger.debug(\"AccountController.increaseBalance: new balance='\"\n\t\t\t\t\t\t+ newBalance + \"'.\");\n\n\t\t\t\taccountResponse.setBalance(newBalance);\n\t\t\t\tthis.service.saveAccount(accountResponse);\n\t\t\t\t// TODO save transaction?\n\t\t\t\treturn new ResponseEntity<String>(\"SUCCESS\", getNoCacheHeaders(), HttpStatus.OK);\n\n\t\t\t} else {\n\t\t\t\t// amount can not be negative for increaseBalance, please use\n\t\t\t\t// decreaseBalance\n\t\t\t\treturn new ResponseEntity<String>(\"FAILED\", getNoCacheHeaders(),\n\t\t\t\t\t\tHttpStatus.EXPECTATION_FAILED);\n\t\t\t}\n\n\t\t}\n\t\treturn null;\n\t}",
"@POST\r\n @Path(\"/create\")\r\n @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public NewAccount createNewCustomerAccount(@FormParam(\"accountNumber\") int accountNumber,\r\n @FormParam(\"accountType\") String accountType,\r\n @FormParam(\"accountBalance\") double accountBalance\r\n ){\r\n return newaccountservice.createNewAccount(accountNumber, accountType, accountBalance);\r\n }",
"int insert(Transaction record);",
"@PostMapping\n public Task create(@RequestBody Task task){\n task.setCreateDate(LocalDateTime.now());\n return taskRepository.save(task);\n }",
"@POST\n @Produces(MediaType.APPLICATION_JSON)\n @Consumes(MediaType.APPLICATION_JSON)\n public Response handlePostCreate(String body) {\n Gson gson = GSONFactory.getInstance();\n\n Employee createdEmployee = createEmployee(body);\n\n String serializedEmployee = gson.toJson(createdEmployee);\n\n Response response = Response.status(201).entity(serializedEmployee).build();\n return response;\n }",
"public PaymentTransaction() {\n\t\tsuper(\"PAYMENT_TRANSACTION\", edu.uga.csci4050.group3.jooq.team3.Team3.TEAM3);\n\t}",
"public Transaction startTransaction(){\n\t\ttr = new Transaction(db);\n\t\treturn tr;\n\t}",
"void addTransaction(Transaction transaction) throws SQLException, BusinessException;",
"@Test\n\tpublic void testAddTransaction(){\n setDoubleEntryEnabled(true);\n\t\tsetDefaultTransactionType(TransactionType.DEBIT);\n validateTransactionListDisplayed();\n\n\t\tonView(withId(R.id.fab_create_transaction)).perform(click());\n\n\t\tonView(withId(R.id.input_transaction_name)).perform(typeText(\"Lunch\"));\n\t\tonView(withId(R.id.input_transaction_amount)).perform(typeText(\"899\"));\n\t\tonView(withId(R.id.input_transaction_type))\n\t\t\t\t.check(matches(allOf(isDisplayed(), withText(R.string.label_receive))))\n\t\t\t\t.perform(click())\n\t\t\t\t.check(matches(withText(R.string.label_spend)));\n\n\t\tString expectedValue = NumberFormat.getInstance().format(-899);\n\t\tonView(withId(R.id.input_transaction_amount)).check(matches(withText(expectedValue)));\n\n int transactionsCount = getTransactionCount();\n\t\tonView(withId(R.id.menu_save)).perform(click());\n\n validateTransactionListDisplayed();\n\n List<Transaction> transactions = mTransactionsDbAdapter.getAllTransactionsForAccount(DUMMY_ACCOUNT_UID);\n assertThat(transactions).hasSize(2);\n Transaction transaction = transactions.get(0);\n\t\tassertThat(transaction.getSplits()).hasSize(2);\n\n assertThat(getTransactionCount()).isEqualTo(transactionsCount + 1);\n }",
"private void createPost() {\n PostModel model = new PostModel(23, \"New Title\", \"New Text\");\n Call<PostModel> call = jsonPlaceHolderAPI.createPost(model);\n call.enqueue(new Callback<PostModel>() {\n @Override\n @EverythingIsNonNull\n public void onResponse(Call<PostModel> call, Response<PostModel> response) {\n if (!response.isSuccessful()) {\n textResult.setText(response.code());\n return;\n }\n PostModel postResponse = response.body();\n String content = \"\";\n assert postResponse != null;\n content += \"Code: \" + response.code() + \"\\n\";\n content += \"ID: \" + postResponse.getId() + \"\\n\";\n content += \"User ID: \" + postResponse.getUserId() + \"\\n\";\n content += \"Title: \" + postResponse.getUserId() + \"\\n\";\n content += \"Body: \" + postResponse.getText();\n textResult.append(content);\n }\n\n @Override\n @EverythingIsNonNull\n public void onFailure(Call<PostModel> call, Throwable t) {\n textResult.setText(t.getMessage());\n }\n });\n }",
"SerialResponse createCustomer(PinCustomerPost pinCustomerPost);",
"void startTransaction();",
"public Transaction(String transactionLine){\r\n\t\t\t//String delims = \"[\\\\s+]\";\r\n\t\t\tString[] tokens = transactionLine.split(\" +\");\r\n\t\t\tif (tokens[0].equals(\"\")){\r\n\t\t\t\tid = 00;\r\n\t\t\t}else{\r\n\t\t\t\tid = Integer.parseInt(tokens[0]);\r\n\t\t\t}\r\n\t\t\tif (id == 0){\r\n\t\t\t\tdate = 0;\r\n\t\t\t\tticket = 0;\r\n\t\t\t\tname = \"\";\r\n\t\t\t}else{\r\n\t\t\t\tdate = Integer.parseInt(tokens[2]);\r\n\t\t\t\tticket = Integer.parseInt(tokens[3]);\r\n\t\t\t\tname = tokens[1];\r\n\t\t\t\t\t\t\r\n\t\t\t}\r\n\r\n\t }",
"@Override\r\n\tpublic int addTran(Transaction transaction) throws Exception {\n\t\t\t\t\r\n\t\treturn tranDao.insertTran(transaction);\r\n\t}",
"protected Object create(Object object) {\n EntityManager em = getEntityManager();\n em.getTransaction().begin();\n try {\n em.persist(object);\n em.getTransaction().commit();\n LOG.debug(\"Persisted \" + object);\n } catch (Exception e) {\n LOG.error(\"Could not persist Object\", e);\n em.getTransaction().rollback();\n } finally {\n em.close();\n }\n return object;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;"
] |
[
"0.6777012",
"0.6439321",
"0.62170744",
"0.61467344",
"0.608021",
"0.60461",
"0.60361797",
"0.60203284",
"0.5909369",
"0.57639045",
"0.575789",
"0.5715204",
"0.56233305",
"0.5620446",
"0.560429",
"0.56032133",
"0.5563792",
"0.5562626",
"0.55624825",
"0.55282146",
"0.5502882",
"0.54383427",
"0.5434969",
"0.5434548",
"0.541439",
"0.5410606",
"0.5379204",
"0.53588617",
"0.5350875",
"0.534961",
"0.53390086",
"0.53372705",
"0.53160363",
"0.53151464",
"0.5314787",
"0.5309409",
"0.52948207",
"0.527418",
"0.5272413",
"0.5238555",
"0.52034014",
"0.5196742",
"0.51950455",
"0.5188734",
"0.518792",
"0.51848805",
"0.5168468",
"0.514605",
"0.5145839",
"0.5140329",
"0.513526",
"0.51262426",
"0.51201284",
"0.51117074",
"0.50995344",
"0.5079569",
"0.5074674",
"0.50705993",
"0.5038147",
"0.5032461",
"0.50310844",
"0.50236595",
"0.50230575",
"0.50219953",
"0.5021847",
"0.50117546",
"0.50095755",
"0.5006214",
"0.50039566",
"0.500297",
"0.49944806",
"0.49929142",
"0.49831942",
"0.49777025",
"0.49729097",
"0.4964082",
"0.4952657",
"0.49494416",
"0.4948651",
"0.49476358",
"0.49396488",
"0.4936911",
"0.49344406",
"0.49340913",
"0.49325097",
"0.49152863",
"0.49141583",
"0.49111354",
"0.490517",
"0.49006614",
"0.49006367",
"0.48958704",
"0.48882723",
"0.48776975",
"0.4869476",
"0.48653984",
"0.48604026",
"0.48575255",
"0.48565117",
"0.4854924"
] |
0.6434518
|
2
|
This method updates an existing transaction in the database by passing the updated transaction's data in a POST request's body and returns the updated transaction's data as a JSON object. The data is validated before the transaction is updated in the database.
|
@PutMapping("/{id}")
public Transaction updateTransactionById(
@PathVariable Long id,
@RequestBody @Valid TransactionRequest transaction,
BindingResult bindingResult)
{
if (bindingResult.hasErrors()) {
String errorMessageFromBindingResult = ControllerUtils.getErrorMessageFromBindingResult(bindingResult);
throw new InvalidDataException(errorMessageFromBindingResult);
}
Transaction updatedTransaction = null;
try {
updatedTransaction = transactionService.updateTransactionById(id, transaction);
}
catch (TransactionNotFoundException e) {
throw new TransactionNotFoundException(id);
}
catch (UserDoesNotOwnResourceException e) {
throw new UserDoesNotOwnResourceException();
}
catch (InvalidDataException e) {
String exceptionMessage = e.getMessage();
throw new InvalidDataException(exceptionMessage);
}
return updatedTransaction;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void updateTransaction(Transaction trans);",
"@Override\n\tpublic Transaction update(Integer transactionId, Transaction transaction) {\n\t\treturn null;\n\t}",
"public CleaningTransaction update(CleaningTransaction cleaningTransaction);",
"public void update(TransactionUpdateRequest transactionUpdateRequest) {\n\n if (transactionUpdateRequest.getAmount() != null) {\n update(\"id\", transactionUpdateRequest.getId(), \"amount\", String.valueOf(transactionUpdateRequest.getAmount()));\n }\n if (transactionUpdateRequest.getProduct() != null) {\n update(\"id\", transactionUpdateRequest.getId(), \"product\", String.valueOf(transactionUpdateRequest.getProduct()));\n }\n if (transactionUpdateRequest.getUser() != null) {\n update(\"id\", transactionUpdateRequest.getId(), \"user\", String.valueOf(transactionUpdateRequest.getUser()));\n }\n }",
"@PUT\n\t@Path(\"/\")\n\t@Consumes(MediaType.APPLICATION_JSON)\n\t@Produces(MediaType.TEXT_PLAIN)\n\tpublic String updateItem(String postData)\n\t{\n\t\tJsonObject paymentObj = new JsonParser().parse(postData).getAsJsonObject();\n\t\t\n\t\tString ID = paymentObj.get(\"itemID\").getAsString();\n\t\tString name = paymentObj.get(\"name\").getAsString();\n\t\tint cardno = paymentObj.get(\"cardno\").getAsInt();\n\t\tint zipcode = paymentObj.get(\"zipcode\").getAsInt();\n\t\tint bid = paymentObj.get(\"bid\").getAsInt();\n\t\tint cid = paymentObj.get(\"cid\").getAsInt();\n\n\t\t\n\t\t\n\t\tString output=payment_obj.updatepayment(ID, name, cardno, zipcode, bid, cid);\n\t\t\n\t\treturn output;\n\t}",
"@Override\n\tpublic void updateTransaction(Transaction transaction) {\n\n\t}",
"@Override\n\tpublic void updateTransaction(Transaction transaction) {\n\t\t\n\t}",
"public Customer updateCustomer(@RequestBody Customer theCustomer)\n {\n customerService.save(theCustomer);\n return theCustomer;\n }",
"public void UpdateTransaction() {\n\t\tgetUsername();\n\t\tcol_transactionID.setCellValueFactory(new PropertyValueFactory<Account, Integer>(\"transactionID\"));\n\t\tcol_date.setCellValueFactory(new PropertyValueFactory<Account, Date>(\"date\"));\n\t\tcol_description.setCellValueFactory(new PropertyValueFactory<Account, String>(\"description\"));\n\t\tcol_category.setCellValueFactory(new PropertyValueFactory<Account, String>(\"category\"));\n\t\tcol_amount.setCellValueFactory(new PropertyValueFactory<Account, Double>(\"amount\"));\n\t\tmySqlCon.setUsername(username);\n\t\tlists = mySqlCon.getAccountData();\n\t\ttableTransactions.setItems(lists);\n\t}",
"@Override\n\tpublic Transaction update(Transaction transaction) {\n\t\treturn null;\n\t}",
"int updateByPrimaryKey(Transaction record);",
"@Transactional\n @PutMapping(value = \"/updatepigininvoicepig/\")\n public ResponseEntity<Object> updatePigInInvoicePig(@RequestBody PigsInvoicePigDetailDTORequest pigsInvoicePigDetailDTORequest){\n\n PigsInvoicePigDetailDTOResponse temp = invoicePigDetailService.updatePigInInvoicePig(pigsInvoicePigDetailDTORequest);\n if(temp == null){\n return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();\n }\n return ResponseEntity.ok(temp);\n }",
"Transaction save(Transaction transaction);",
"@Override\n\tpublic Integer update(Map<String, Object> params) throws Exception {\n\t\treturn bankService.update(params);\n\t}",
"int update(Purchase purchase) throws SQLException, DAOException;",
"@RequestMapping(value = \"/Reservation/{reservation_reservationId}/transactionses\", method = RequestMethod.PUT)\n\t@ResponseBody\n\tpublic Transactions saveReservationTransactionses(@PathVariable Integer reservation_reservationId, @RequestBody Transactions transactionses) {\n\t\treservationService.saveReservationTransactionses(reservation_reservationId, transactionses);\n\t\treturn transactionsDAO.findTransactionsByPrimaryKey(transactionses.getTransactionId());\n\t}",
"CustomerOrder update(CustomerOrder customerOrder);",
"CustomerDto updateCustomer(CustomerDto customerDto);",
"public Optional<TransactionHistory> updateTransaction()\n {\n return null;\n }",
"public void saveOrUpdate(Transaction transaction) throws Exception;",
"public Response<CustomerUpdateResponseDto> updateCustomer(CustomerUpdateReqDto requestDto) {\n\t\tResponse<CustomerUpdateResponseDto> responseDto = new Response<>();\n\t\tCustomerUpdateResponseDto response = null;\n\t\tOptional<Customer> customer = customerRepo.findByCustomerId(requestDto.getCustomerId());\n\t\tif (customer.isPresent()) {\n\t\t\tCustomer customerDetail = customer.get();\n\t\t\tcustomerDetail.setAddress(requestDto.getAddress());\n\t\t\tcustomerDetail.setBillingType(requestDto.getBillingType());\n\t\t\tcustomerDetail.setBusinessType(requestDto.getBusinessType());\n\t\t\tcustomerDetail.setCustomerColourConfig(requestDto.getCustomerColourConfig());\n\t\t\tcustomerDetail.setCustomerDescription(requestDto.getCustomerDescription());\n\t\t\tcustomerDetail.setCustomerEmailId(requestDto.getCustomerEmailId());\n\t\t\tcustomerDetail.setCustomerGroupEmailId(requestDto.getCustomerGroupEmailId());\n\t\t\tcustomerDetail.setCustomerLogo(requestDto.getCustomerLogo());\n\t\t\tcustomerDetail.setCustomerMobileNumber(requestDto.getCustomerMobileNumber());\n\t\t\tcustomerDetail.setCustomerName(requestDto.getCustomerName());\n\t\t\tcustomerDetail.setCustomerPhoneNumber(requestDto.getCustomerPhoneNumber());\n\t\t\tcustomerDetail.setCustomerStatus(requestDto.getCustomerStatus());\n\t\t\tcustomerDetail.setUtilityId(requestDto.getCustomerUtilityId());\n\t\t\tcustomerDetail.setModifiedBy(requestDto.getCustomerId());\n\t\t\tcustomerDetail.setModifiedDate(new Date());\n\t\t\tcustomerRepo.save(customerDetail);\n\t\t\tOptional<User> user = userRepo.findByCustomer(customer.get());\n\t\t\tif (!user.isPresent())\n\t\t\t\tthrow new NoDataFoundException(CustomerConstants.CUSTOMER_NOT_FOUND);\n\t\t\tUser userStatus = user.get();\n\t\t\tuserStatus.setUserStatus(requestDto.getCustomerStatus());\n\t\t\tuserStatus.setModifiedBy(requestDto.getCustomerId());\n\t\t\tuserStatus.setModifiedDate(new Date());\n\t\t\tuserRepo.save(userStatus);\n\t\t\tresponse = new CustomerUpdateResponseDto();\n\t\t\tresponse.setCustomerId(customerDetail.getCustomerId());\n\t\t\tresponseDto.setData(response);\n\t\t\tresponseDto.setMessage(CustomerConstants.CUSTOMER_UPDATED_SUCCESSFULLY);\n\t\t\tresponseDto.setStatus(HttpServletResponse.SC_OK);\n\t\t\tresponseDto.setError(false);\n\n\t\t} else {\n\t\t\tresponseDto.setStatus(HttpServletResponse.SC_NO_CONTENT);\n\t\t\tresponseDto.setError(true);\n\t\t\tresponseDto.setMessage(CustomerConstants.CUSTOMER_NOT_FOUND);\n\t\t}\n\t\treturn responseDto;\n\n\t}",
"VendorNotificationResponseDTO update(String id, VendorNotificationRequestDTO VendorDataNotificationRequestDTO)throws Exception;",
"@RequestMapping(method = RequestMethod.PUT, value = \"/{id}\",\n produces = \"application/json\", headers = \"Accept=application/json\" )\n public ResponseEntity<?> updateInventoryByProductId(@PathVariable(\"id\") Integer id,\n @Valid @RequestBody InventoryUpdateRequest inventoryUpdateRequest){\n Inventory inventory = inventoryService.getInventoryItemByProductId(id);\n inventory.setAmount(inventoryUpdateRequest.getAmount());\n inventoryService.updateInventoryItem(inventory);\n\n return ResponseEntity.noContent().build();\n }",
"public @ResponseBody Contract updateContract(@RequestBody Contract Contract);",
"int updateByPrimaryKey(PurchasePayment record);",
"public Post update(Post t) {\n\t\tSession session;\n\t\ttry {\n\t\t\tsession = sessfact.getCurrentSession();\n\t\t} catch (HibernateException e) {\n\t\t\tsession = sessfact.openSession();\n\t\t}\n\t\tTransaction trans = session.beginTransaction();\n\t\tsession.update(t);\n\t\ttrans.commit();\n\t\treturn t;\n\t}",
"E update(IApplicationUser user, ID id, U updateDto);",
"@Override\r\n\tpublic void updateTranCode(Transaction transaction) throws Exception {\n\t\ttranDao.updateTranCode(transaction);\r\n\t}",
"@Override\n\tpublic Transaction update(Transaction item) {\n\t\treturn null;\n\t}",
"ResponseEntity<Cart> updateCartItemQuantity(CartFormData formData);",
"@Transactional\n\t@Override\n\tpublic Paradero update(Paradero t) throws Exception {\n\t\treturn paraderoRespository.save(t);\n\t}",
"@Transactional\n\tpublic T update(T transientObject) {\n\t\treturn this.em.merge(transientObject);\n\t}",
"UpdateResponse upsert(UpdateRequest updateRequest) throws IOException;",
"public void doUpdate(T objectToUpdate) throws SQLException;",
"Transfer updateTransactionNumber(Long id, String transactionNumber);",
"@RequestMapping(value = \"/accounts/transaction\", method = RequestMethod.POST)\n\tpublic ResponseEntity<String> transaction(\n\t\t\t@RequestBody Transaction transaction) {\n\t\tlogger.debug(\"AccountController.transaction: \" + transaction.toString());\n\t\tif (transaction.getType().equals(TransactionType.DEBIT)) {\n\t\t\tlogger.debug(\"debit transaction\");\n\t\t\tAccount accountResponse = this.service.findAccount(transaction\n\t\t\t\t\t.getAccountId());\n\n\t\t\tBigDecimal currentBalance = accountResponse.getBalance();\n\n\t\t\tBigDecimal newBalance = currentBalance.subtract(transaction\n\t\t\t\t\t.getAmount());\n\n\t\t\tif (newBalance.compareTo(BigDecimal.ZERO) >= 0) {\n\t\t\t\taccountResponse.setBalance(newBalance);\n\t\t\t\tthis.service.saveAccount(accountResponse);\n\t\t\t\t// TODO save transaction?\n\t\t\t\tlogger.debug(\"transaction processed.\");\n\t\t\t\treturn new ResponseEntity<String>(\"SUCCESS\",\n\t\t\t\t\t\tgetNoCacheHeaders(), HttpStatus.OK);\n\n\t\t\t} else {\n\t\t\t\t// no sufficient founds available\n\t\t\t\treturn new ResponseEntity<String>(\"FAILED\",\n\t\t\t\t\t\tgetNoCacheHeaders(), HttpStatus.EXPECTATION_FAILED);\n\t\t\t}\n\n\t\t} else if (transaction.getType().equals(TransactionType.CREDIT)) {\n\t\t\tlogger.debug(\"credit transaction\");\n\t\t\tAccount accountResponse = this.service.findAccount(transaction.getAccountId());\n\n\t\t\tBigDecimal currentBalance = accountResponse.getBalance();\n\n\t\t\tlogger.debug(\"AccountController.transaction: current balance='\"\n\t\t\t\t\t+ currentBalance + \"'.\");\n\n\t\t\tif (transaction.getAmount().compareTo(BigDecimal.ZERO) > 0) {\n\n\t\t\t\tBigDecimal newBalance = currentBalance.add(transaction.getAmount());\n\t\t\t\tlogger.debug(\"AccountController.increaseBalance: new balance='\"\n\t\t\t\t\t\t+ newBalance + \"'.\");\n\n\t\t\t\taccountResponse.setBalance(newBalance);\n\t\t\t\tthis.service.saveAccount(accountResponse);\n\t\t\t\t// TODO save transaction?\n\t\t\t\treturn new ResponseEntity<String>(\"SUCCESS\", getNoCacheHeaders(), HttpStatus.OK);\n\n\t\t\t} else {\n\t\t\t\t// amount can not be negative for increaseBalance, please use\n\t\t\t\t// decreaseBalance\n\t\t\t\treturn new ResponseEntity<String>(\"FAILED\", getNoCacheHeaders(),\n\t\t\t\t\t\tHttpStatus.EXPECTATION_FAILED);\n\t\t\t}\n\n\t\t}\n\t\treturn null;\n\t}",
"@PUT \r\n @Path(\"/update\") \r\n @Consumes(MediaType.APPLICATION_JSON) \r\n @Produces(MediaType.TEXT_PLAIN) \r\n public String updateItem(String itemData) {\n \tJsonObject itemObject = new JsonParser().parse(itemData).getAsJsonObject(); \r\n \r\n \t//Read the values from the JSON object \r\n \tint appointmentID = itemObject.get(\"appointmentID\").getAsInt(); \r\n \tString patientID = itemObject.get(\"patientID\").getAsString(); \r\n \tString Date = itemObject.get(\"Date\").getAsString(); \r\n \tString docName = itemObject.get(\"docName\").getAsString(); \r\n \tString hosName = itemObject.get(\"hosName\").getAsString(); \r\n \tString appType = itemObject.get(\"appType\").getAsString(); \r\n \r\n String output = appObj.updateAppointment(appointmentID,patientID, Date, docName, hosName, appType); \r\n \r\n \treturn output; \r\n }",
"int updateByPrimaryKey(PaymentTrade record);",
"public boolean updateCustomer(String customerJSON);",
"CustDataNotesResponseDTO updateCustDataNotes(String id,CustDataNotesRequestDTO custDataNotesRequestDTO) throws Exception;",
"@PutMapping(\"/api/rents/{id}\")\r\n public ResponseEntity<?> updateRent(@PathVariable(name = \"id\") Long id, @RequestBody Rent rentUpdate) {\r\n return rentService.find(id).map(rent -> {\r\n rent.setClient(rentUpdate.getClient());\r\n rent.setCar(rentUpdate.getCar());\r\n rent.setRate(rentUpdate.getRate());\r\n rent.setStartDate(rentUpdate.getStartDate());\r\n rent.setEndDate(rentUpdate.getEndDate());\r\n rent.setFinalPrice(rentUpdate.getFinalPrice());\r\n rentService.update(rent);\r\n return new ResponseEntity<>(rent, HttpStatus.OK);\r\n }).orElseThrow(() -> new IllegalArgumentException());\r\n\r\n }",
"@Override\r\n\tpublic Unit unitUpdate(JsonObject requestBody) {\n\t\tUnit u = new Unit();\r\n\t\tif (requestBody.containsKey(\"unit_no\")) {\r\n\t\t\tu.setUnit_no(requestBody.getJsonString(\"unit_no\").getString());\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"unit_remark\")) {\r\n\t\t\tu.setUnit_remark(unitTypeRepo.getUnitType(requestBody.getString(\"unit_remark\")));\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"UOM\")) {\r\n\t\t\tu.setUOM(requestBody.getJsonString(\"UOM\").getString());\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"Description\")) {\r\n\t\t\tu.setDescription(requestBody.getJsonString(\"Description\").getString());\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"unit_type\")) {\r\n\t\t\tu.setUnit_type(requestBody.getJsonString(\"unit_type\").getString());\r\n\t\t}\r\n\t\t\r\n\t\tif (requestBody.containsKey(\"sanctionedLoadGrid\")) {\r\n\t\t\tu.setSanctionedLoadGrid(requestBody.getJsonNumber(\"sanctionedLoadGrid\").intValue());\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"sanctionedLoadBackUp\")) {\r\n\t\t\tu.setSanctionedLoadBackUp(requestBody.getJsonNumber(\"sanctionedLoadBackUp\").intValue());\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"soldStatus\")) {\r\n\t\t\tu.setSoldStatus(requestBody.getJsonString(\"soldStatus\").getString());\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"parentId\")) {\r\n\r\n\t\t\tu.setParentAccount(towerRepo.gettower(requestBody.getJsonString(\"parentId\").getString()));\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"uuId\")) {\r\n\r\n\t\t\tu.setUuid((requestBody.getJsonString(\"uuId\").getString()));\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"id\")) {\r\n\t\t\tu.setId(Long.parseLong(requestBody.getJsonNumber(\"id\").toString()));\r\n\t\t}\r\n\t\tDate d = new Date();\r\n\t\tu.setCreateDate(d);\r\n\t\tu.setUpdateDate(d);\r\n\t\tunitRepo.save(u);\r\n\t\treturn u;\r\n\t}",
"@Update({\n \"update PURCHASE\",\n \"set SDATE = #{sdate,jdbcType=TIMESTAMP},\",\n \"STYPE = #{stype,jdbcType=VARCHAR},\",\n \"SMONEY = #{smoney,jdbcType=DECIMAL},\",\n \"TOUCHING = #{touching,jdbcType=VARCHAR},\",\n \"ACCOUNT = #{account,jdbcType=VARCHAR},\",\n \"CHECKSTATUS = #{checkstatus,jdbcType=DECIMAL},\",\n \"DEMO1 = #{demo1,jdbcType=DECIMAL},\",\n \"DEMO2 = #{demo2,jdbcType=VARCHAR},\",\n \"DEMO3 = #{demo3,jdbcType=DECIMAL}\",\n \"where ID = #{id,jdbcType=DECIMAL}\"\n })\n int updateByPrimaryKey(Purchase record);",
"@RequestMapping(value = \"/tshirt\", method = RequestMethod.PUT)\n @ResponseStatus(value = HttpStatus.OK)\n public void updateTShirt(@RequestBody @Valid TShirt tShirt) {\n // Get the TShirt from the database\n TShirt tShirtFromDB = serviceLayer.getTShirt(tShirt.getId());\n\n // Update the TShirt if it is found in the database\n if (tShirtFromDB != null) {\n serviceLayer.updateTShirt(tShirt);\n } else {\n throw new IllegalArgumentException(\"There is no T-Shirt with id: \" + tShirt.getId());\n }\n }",
"int updateByPrimaryKey(Salaries record);",
"public abstract boolean update(T entity) throws ServiceException;",
"private void updateTransaction() {\n LogUtils.logEnterFunction(Tag);\n\n String inputtedAmount = etAmount.getText().toString().trim().replaceAll(\",\", \"\");\n if (inputtedAmount.equals(\"\") || Double.parseDouble(inputtedAmount) == 0) {\n etAmount.setError(getResources().getString(R.string.Input_Error_Amount_Empty));\n return;\n }\n\n if (mAccount == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Account_Empty));\n return;\n }\n\n Double amount = Double.parseDouble(inputtedAmount);\n int categoryId = mCategory != null ? mCategory.getId() : 0;\n String description = tvDescription.getText().toString();\n int accountId = mAccount.getId();\n String strEvent = tvEvent.getText().toString();\n Event event = null;\n\n if (!strEvent.equals(\"\")) {\n event = mDbHelper.getEventByName(strEvent);\n if (event == null) {\n long eventId = mDbHelper.createEvent(new Event(0, strEvent, mCal, null));\n if (eventId != -1) {\n event = mDbHelper.getEvent(eventId);\n }\n }\n }\n\n // Less: Repayment, More: Lend\n if(mCategory.getDebtType() == Category.EnumDebt.LESS || mCategory.getDebtType() == Category.EnumDebt.MORE) {\n\n boolean isDebtValid = true;\n if(mCategory.getDebtType() == Category.EnumDebt.LESS) { // Income -> Debt Collecting\n List<Debt> debts = mDbHelper.getAllDebtByPeople(tvPeople.getText().toString());\n\n Double lend = 0.0, debtCollect = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) {\n lend += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) {\n debtCollect += debt.getAmount();\n }\n }\n\n if(debtCollect + amount > lend) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_collect_invalid));\n }\n\n } // End DebtType() == Category.EnumDebt.LESS\n if(isDebtValid) {\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n Debt debt = mDbHelper.getDebtByTransactionId(mTransaction.getId());\n debt.setCategoryId(mCategory.getId());\n debt.setAmount(amount);\n debt.setPeople(tvPeople.getText().toString());\n\n int debtRow = mDbHelper.updateDebt(debt);\n if(debtRow == 1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } else {\n Debt newDebt = new Debt();\n newDebt.setCategoryId(mCategory.getId());\n newDebt.setTransactionId((int) mTransaction.getId());\n newDebt.setAmount(amount);\n newDebt.setPeople(tvPeople.getText().toString());\n\n long debtId = mDbHelper.createDebt(newDebt);\n if(debtId != -1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } // End create new Debt\n\n } // End Update transaction OK\n } // End isDebtValid\n\n } else { // CATEGORY NORMAL\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n mDbHelper.deleteDebt(mDbHelper.getDebtByTransactionId(mTransaction.getId()).getId());\n }\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n }\n\n LogUtils.logLeaveFunction(Tag);\n }",
"@PUT\r\n\t@Path(\"/\")\r\n\t@Consumes(MediaType.APPLICATION_JSON)\r\n\t@Produces(MediaType.TEXT_PLAIN)\r\n\tpublic String updateItem(String itemData)\r\n\t{\n\t JsonObject FunderObject = new JsonParser().parse(itemData).getAsJsonObject();\r\n\t//Read the values from the JSON object\r\n\t String funderID = FunderObject.get(\"funderID\").getAsString();\r\n\t String funderName = FunderObject.get(\"funderName\").getAsString();\r\n\t String funderNIC = FunderObject.get(\"funderNIC\").getAsString();\r\n\t String funderAddress = FunderObject.get(\"funderAddress\").getAsString();\r\n\t String funderEmail = FunderObject.get(\"funderEmail\").getAsString();\r\n\t String funderPhone = FunderObject.get(\"funderPhone\").getAsString();\r\n\t\r\n\t \r\n\t String output = FunderObj.updateItem(funderID,funderName,funderNIC,funderAddress,funderEmail,funderPhone);\r\n\t return output;\r\n\t}",
"int updateByPrimaryKey(BusinessRepayment record);",
"public int updateOrderRequest(OrderEntity orderEntity);",
"@CrossOrigin\n\t@RequestMapping(value=\"/update\", method=RequestMethod.PUT)\n\tpublic ResponseEntity<?> updateCartItem(@RequestBody CartItem CartItem){\n\t\t//test if the item is updated\n\t\tboolean updated = CartItemService.updateCartItem(CartItem);\n\t\tif(updated == false){\n\t\t\tlogger.info(\"item not found to update\");\n\t\t\treturn new ResponseEntity<Object>(HttpStatus.CONFLICT);\n\t\t}\n\t\tlogger.info(\"item updated\");\n\t\treturn new ResponseEntity<CartItem>(CartItem, HttpStatus.OK);\n\t}",
"@PostMapping(value=\"/update\",consumes={MediaType.APPLICATION_JSON_VALUE},produces={MediaType.APPLICATION_JSON_VALUE})\n\t public StatusDTO updateTask(@RequestBody TaskDTO task){\n\t\t taskService.updateTask(task);\n\t\t StatusDTO status = new StatusDTO();\n\t status.setMessage(\"Task details updated successfully\");\n\t status.setStatus(200);\n\t return status;\n\t }",
"JsonNode updateData(String data);",
"@RequestMapping(value = \"/Reservation/{reservation_reservationId}/transactionses\", method = RequestMethod.POST)\n\t@ResponseBody\n\tpublic Transactions newReservationTransactionses(@PathVariable Integer reservation_reservationId, @RequestBody Transactions transactions) {\n\t\treservationService.saveReservationTransactionses(reservation_reservationId, transactions);\n\t\treturn transactionsDAO.findTransactionsByPrimaryKey(transactions.getTransactionId());\n\t}",
"@Transactional\n @Override\n public BaseResponse updateUserInfo(UpdateUserInfoRequest updateUserInfoRequest) throws Exception {\n\n\n UserEntity userEntity = userService.findByUserName(updateUserInfoRequest.getUsername());\n\n if(Objects.isNull(userEntity)){\n BaseResponse baseResponse = BaseResponse.builder().responseCode(Constants.FAILURE_RESPONSE_CODE)\n .responseMessage(configurationUtil.getMessage(Constants.FAILURE_RESPONSE_CODE)).build();\n return baseResponse;\n }\n\n if(Objects.nonNull(updateUserInfoRequest.getName())){\n userEntity.setName(updateUserInfoRequest.getName());\n }\n\n //check to update user details information\n Boolean updateCheckUserDetails = userService.updateUserDetailsInformation(\n updateUserInfoRequest.getUsername(), updateUserInfoRequest.getEmail(),\n updateUserInfoRequest.getNicNumber());\n\n if(Objects.nonNull(updateCheckUserDetails) && updateCheckUserDetails){\n BaseResponse baseResponse = BaseResponse.builder().responseCode(Constants.FAILURE_RESPONSE_CODE)\n .responseMessage(configurationUtil.getMessage(Constants.FAILURE_RESPONSE_CODE)).build();\n return baseResponse;\n }\n\n UserDetailsEntity userDetailsEntity = userEntity.getUserDetailsEntity();\n\n if(Objects.nonNull(updateUserInfoRequest.getNicNumber())){\n\n userDetailsEntity.setNicNumber(updateUserInfoRequest.getNicNumber());\n }\n\n if(Objects.nonNull(updateUserInfoRequest.getNicExpiryDate())){\n userDetailsEntity.setNicExpiryDate(updateUserInfoRequest.getNicExpiryDate());\n }\n\n if(Objects.nonNull(updateUserInfoRequest.getDateOfBirth())){\n userDetailsEntity.setDateOfBirth(updateUserInfoRequest.getDateOfBirth());\n }\n if(Objects.nonNull(updateUserInfoRequest.getCity())){\n\n userDetailsEntity.setCity(updateUserInfoRequest.getCity());\n }\n\n if(Objects.nonNull(updateUserInfoRequest.getCountry())){\n\n userDetailsEntity.setCountry(updateUserInfoRequest.getCountry());\n }\n\n if(Objects.nonNull(updateUserInfoRequest.getEmail())){\n\n userDetailsEntity.setEmail(updateUserInfoRequest.getEmail());\n }\n\n userService.saveUser(userEntity);\n userService.saveUserDetail(userDetailsEntity);\n\n BaseResponse baseResponse = BaseResponse.builder().responseCode(Constants.SUCCESS_RESPONSE_CODE)\n .responseMessage(configurationUtil.getMessage(Constants.SUCCESS_RESPONSE_CODE)).build();\n\n return baseResponse;\n }",
"@Override\n public boolean update(Transaksi transaksi) {\n try {\n String query = \"UPDATE transaksi SET tgl_transaksi=? WHERE id=?\";\n\n PreparedStatement ps = Koneksi().prepareStatement(query);\n ps.setString(1, transaksi.getTglTransaksi());\n ps.setString(2, transaksi.getId());\n\n if (ps.executeUpdate() > 0) {\n return true;\n }\n } catch (SQLException se) {\n se.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return false;\n }",
"@RequestMapping(path = \"/update\", method = RequestMethod.POST)\n\tpublic ResponseEntity<RestResponse<CompanyDTO>> update(@RequestBody CompanyDTO request) {\n\n\t\tCompanyDTO result = companyService.update(request);\n\t\t\n\t\tRestResponse<CompanyDTO> restResponse = \n\t\t\t\tnew RestResponse<CompanyDTO>(RestResponseCodes.OK.getCode(), RestResponseCodes.OK.getDescription(), result);\n\t\t\n\t\treturn new ResponseEntity<RestResponse<CompanyDTO>>(restResponse, HttpStatus.OK);\n\t\t\t\n\t}",
"int updateByPrimaryKey(MVoucherDTO record);",
"public void testUpdate() {\n Basket_up.setPath(BasketPath);\n TUpdate_Return[] Baskets_update_out = basketService.update(new TUpdate_Input[] { Basket_up });\n assertNoError(Baskets_update_out[0].getError());\n assertNull(\"No FormErrors\", Baskets_update_out[0].getFormErrors());\n assertTrue(\"updated?\", Baskets_update_out[0].getUpdated());\n }",
"@RequestMapping(value = \"/updateTransaction\", method = RequestMethod.POST)\r\n\tpublic ModelAndView update(HttpServletRequest request, ModelMap model) {\n\t\treturn new ModelAndView(\"redirect:list\");\r\n\r\n\t}",
"@BodyParser.Of(BodyParser.Json.class)\n @Transactional\n public static Result update(Integer id, String accessToken) {\n AccessToken access = AccessTokens.access(accessToken);\n Result error = Access.checkAuthentication(access, Access.AuthenticationType.CONNECTED_USER);\n if (error != null) {\n \treturn error;\n }\n \n JsonNode root = request().body().asJson();\n if (root == null) {\n \treturn new errors.Error(errors.Error.Type.JSON_REQUIRED).toResponse();\n }\n \n errors.Error parametersErrors = new errors.Error(Type.PARAMETERS_ERROR);\n String email = root.path(\"email\").textValue();\n String password = root.path(\"password\").textValue();\n String oldPassword = root.path(\"old_password\").textValue();\n String firstname = root.path(\"first_name\").textValue();\n String lastname = root.path(\"last_name\").textValue();\n checkParams(false, email, password, firstname, lastname, parametersErrors);\n \n if (parametersErrors.isParameterError())\n \treturn parametersErrors.toResponse();\n \n User user = User.find.byId(id);\n if (user == null) {\n \treturn new errors.Error(errors.Error.Type.USER_NOT_FOUND).toResponse();\n }\n\n error = Access.hasPermissionOnUser(access, user, Access.UserAccessType.WRITE);\n if (error != null) {\n \treturn error;\n }\n\n if (password != null) {\n \tif (oldPassword == null) {\n \t\treturn new errors.Error(Type.PARAMETERS_ERROR).addParameter(\"old_password\", ParameterType.REQUIRED).toResponse();\n \t} else if (!user.password.equals(Utils.Hasher.hash(oldPassword))) {\n \t\treturn new errors.Error(errors.Error.Type.WRONG_PASSWORD).toResponse();\n \t}\n }\n\n updateOneUser(user, root);\n user.save();\n\n return ok(getUserObjectNode(user));\n }",
"public boolean update(@NotNull T object) {\n boolean rowUpdated = false;\n Logger logger = getLogger();\n try (Connection connection = getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(getUpdate())) {\n\n setStatement(preparedStatement, object);\n setUpdateStatementId(preparedStatement, object);\n\n logger.info(\"Executing statement: \" + preparedStatement);\n rowUpdated = preparedStatement.executeUpdate() > 0;\n } catch (SQLException | NotEnoughDataException e) {\n logger.error(e.getMessage());\n }\n logger.info(\"Update: success\");\n return rowUpdated;\n }",
"E update(E entity) throws ValidationException;",
"@RequestMapping(value = \"/customerOrders\",\n method = RequestMethod.PUT,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<CustomerOrder> updateCustomerOrder(@Valid @RequestBody CustomerOrder customerOrder) throws URISyntaxException {\n log.debug(\"REST request to update CustomerOrder : {}\", customerOrder);\n if (customerOrder.getId() == null) {\n return createCustomerOrder(customerOrder);\n }\n CustomerOrder result = customerOrderRepository.save(customerOrder);\n customerOrderSearchRepository.save(result);\n return ResponseEntity.ok()\n .headers(HeaderUtil.createEntityUpdateAlert(\"customerOrder\", customerOrder.getId().toString()))\n .body(result);\n }",
"int updateByPrimaryKey(DangerMerchant record);",
"@Override\r\n\tpublic ResponseEntity<String> update(@Valid @RequestBody Pais updateMODEL, Integer id) {\n\t\treturn null;\r\n\t}",
"@Override\n\t\tpublic boolean update(AccountTransaction t) {\n\t\t\treturn false;\n\t\t}",
"@Override\n\tpublic int update(OrderItem objectToUpdate) throws SQLException {\n\t\treturn 0;\n\t}",
"@RequestMapping(method = RequestMethod.POST, path = \"/transactions\", produces = \"application/json\")\n public final void saveTransaction(@RequestBody Transaction transaction, HttpServletResponse response) {\n// having the registerTransaction method helps keeping our controller more clean\n boolean registered = transactionService.registerTransaction(transaction);\n\n if (registered) {\n response.setStatus(HttpStatus.CREATED.value());\n\n } else {\n response.setStatus(HttpStatus.NO_CONTENT.value());\n }\n }",
"@Override\n\tpublic int updateState(TransactionalInformationDTO transactionalInformationDTO) {\n\t\treturn session.update(\"ProductMapper.updateState\", transactionalInformationDTO);\n\t}",
"java.util.concurrent.Future<UpdateDataIntegrationResult> updateDataIntegrationAsync(UpdateDataIntegrationRequest updateDataIntegrationRequest);",
"@Test\n public void shouldUpdatePayment() throws Exception {\n ResponseEntity<String> response = postTestPaymentAndGetResponse();\n String location = getLocationHeader(response);\n\n //and: a modified version of that payment:\n String newOrganisationId = \"newOrganisationId\";\n testPaymentAsObject.setOrganisationId(newOrganisationId);\n String newJson = gson.toJson(testPaymentAsObject);\n\n //when: the payment is updated:\n HttpEntity<String> putEntity = getHttpEntityForTestRequest(newJson);\n ResponseEntity putResponse = restTemplate.exchange(location, HttpMethod.PUT, putEntity, String.class);\n //then: the response status code should be 'no content'\n assertEquals(HttpStatus.OK, putResponse.getStatusCode());\n\n //when: the payment is fetched following the update:\n Payment updatedPayment = restTemplate.getForEntity(location, Payment.class).getBody();\n\n //then: the data should have been modified:\n assertEquals(\"newOrganisationId\", updatedPayment.getOrganisationId());\n }",
"public abstract Response update(Request request, Response response);",
"@Override\r\n\tpublic void updatePurchase(Purchase Purchase) throws Exception {\n\t\t\r\n\t}",
"@PUT\n\t\t@Path(\"/\")\n\t\t@Consumes(MediaType.APPLICATION_JSON)\n\t\t@Produces(MediaType.TEXT_PLAIN)\n\t\tpublic String updateFund(String FundData)\n\t\t{\n\t\t JsonObject Object = new JsonParser().parse(FundData).getAsJsonObject();\n\t\t//Read the values from the JSON object\n\t\t String fund_id = Object.get(\"fund_id\").getAsString();\n\t\t String name = Object.get(\"name\").getAsString();\n\t\t String address = Object.get(\"address\").getAsString();\n\t\t String phone = Object.get(\"phone\").getAsString();\n\t\t String e_mail = Object.get(\"e_mail\").getAsString();\n\t\t String description = Object.get(\"description\").getAsString();\n\t\t String output = Obj.updateFund(fund_id, name, address, phone, e_mail, description);\n\t\t\n\t\t return output;\n\t\t}",
"T update(T entity);",
"T update(T entity);",
"public boolean update() {\n executeCallbacks(CallbackType.BEFORE_UPDATE);\n\n executeCallbacks(CallbackType.BEFORE_VALIDATION);\n executeValidations();\n executeValidationsOnUpdate();\n if (errors.size() > 0) return false;\n executeCallbacks(CallbackType.AFTER_VALIDATION);\n\n Adapter adapter = getAdapter();\n StringBuilder sql = new StringBuilder();\n sql.append(\"UPDATE \").append(getTableName());\n sql.append(\" SET \").append(quotedCommaPairList(attributesWithQuotes(includePrimaryKey)));\n sql.append(\" WHERE \").append(getPrimaryKey()).append(\" = \").append(adapter.quote(getId()));\n\n boolean result = adapter.update(sql.toString(), getClass().getName() + \" Update\") == 1;\n if (result) {\n reloadAssociations();\n reloadAggregations();\n }\n\n executeCallbacks(CallbackType.AFTER_UPDATE);\n return result;\n }",
"@RequestMapping(value = \"/customer_refund/update\", method = RequestMethod.PUT,\n produces = \"application/json;charset=UTF-8\")\n public ResponseEntity<String> updateCustomerRefund(\n @RequestBody(required = true) COrderRefundTable customerRefund) {\n try {\n int affectedRow = refundRepositoryImpl.updateCustomerRefund(customerRefund);\n\n if (affectedRow == 0) {\n return new ResponseEntity<>(\"{\\\"message\\\" : \\\"Organizer refund not updated\\\"}\",\n HttpStatus.OK);\n } else {\n return new ResponseEntity<>(\n \"{\\\"message\\\" : \\\"Organizer refund successfully updated\\\"}\", HttpStatus.OK);\n }\n } catch (DataIntegrityViolationException di) {\n return new ResponseEntity<>(\"{\\\"message\\\" : \\\"Invalid input, lack of data\\\"}\",\n HttpStatus.BAD_REQUEST);\n } catch (Exception e) {\n return new ResponseEntity<>(\"{\\\"message\\\" : \\\"Unknown error\\\"}\",\n HttpStatus.INTERNAL_SERVER_ERROR);\n }\n }",
"@PutMapping(\"/customerupdate\")\n\tpublic void update(@RequestBody Customer theCustomer) {\n\t\t// checking whether the customer exists or not\n\t\tCustomer customerExists = customerServices.findByID(theCustomer.getMobile_number());\n\n\t\tif (customerExists != null) {\n\t\t\tcustomerServices.save(theCustomer);\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"Customer with customer id - \" + theCustomer + \" not exists\");\n\t\t}\n\t}",
"public static void updateCategoryItemRequest(final Context context, final String businessId, final String category, final String oldCategoryItem, final String newCategoryItem, final Double price, final int quantity, final String externalities) {\n final RequestQueue httpRequestQueue = Volley.newRequestQueue(context);\n final StringRequest httpRequest = new StringRequest(Request.Method.POST, (MainActivity.serverURL + \"update/update_category_item.php\"),\n //success, the request responded successfully!\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n httpRequestQueue.stop();\n }\n },\n //error, the request responded with a failure...\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(context, \"An error occurred with your internet...\", Toast.LENGTH_LONG).show();\n error.printStackTrace();\n httpRequestQueue.stop();\n }\n }\n ) {\n //POST variables to send to the request\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"businessId\", businessId);\n params.put(\"category\", category);\n params.put(\"oldCategoryItem\", oldCategoryItem);\n params.put(\"newCategoryItem\", newCategoryItem);\n params.put(\"price\", String.valueOf(price));\n params.put(\"quantity\", String.valueOf(quantity));\n params.put(\"externalities\", externalities);\n return params;\n }\n //header values to send to the request\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }\n };\n httpRequestQueue.add(httpRequest);\n }",
"public CartOrder updateOrder(CartOrder order) throws Exception;",
"boolean update(T entity) throws Exception;",
"private void update(SfJdDocAudit inData, RequestMeta requestMeta) {\n jdDocAuditMapper.updateByPrimaryKey(inData);\r\n \r\n jdDocAuditDetailMapper.deleteByPrimaryKey(inData.getJdDocAuditId());\r\n if(inData.getDetailLst()!=null){\r\n for(int i=0;i<inData.getDetailLst().size();i++){\r\n SfJdDocAuditDetail m=(SfJdDocAuditDetail) inData.getDetailLst().get(i);\r\n m.setJdDocAuditId(inData.getJdDocAuditId());\r\n jdDocAuditDetailMapper.insert(m);\r\n }\r\n }\r\n materialsTransferDetailMapper.deleteByPrimaryKey(inData.getJdDocAuditId());\r\n if(inData.getMaterialLst()!=null){\r\n for(int i=0;i<inData.getMaterialLst().size();i++){\r\n SfMaterialsTransferDetail md=(SfMaterialsTransferDetail) inData.getMaterialLst().get(i);\r\n md.setTransferId(inData.getJdDocAuditId());\r\n materialsTransferDetailMapper.insert(md);\r\n }\r\n }\r\n }",
"public void updatePaymentDetails(String equipment_id, equipment updatedEquipment) {\n\n\n updatedEquipment.setEquipment_id(equipment_id);\n\n equipment equipment= equipmentValidator.getValidEquipment(equipment_id);\n modelMapper.map(updatedEquipment, equipment);\n this.equiomentResprositery.save(equipment);\n }",
"@Override\n public void saveTransactionDetails(TransactionInfo transactionInfo) {\n repositoryService.saveTransactionDetails(transactionInfo);\n update(\"transactions\", String.class, TransactionInfo.class, LocalDateTime.now().toString(), transactionInfo);\n }",
"@PutMapping(\"/update\")\n @ResponseStatus(HttpStatus.CREATED)//status 201\n public AsociadosProyecto update(@RequestBody AsociadosProyecto asociadosProyecto){\n return asociadosProyectoService.update(asociadosProyecto);\n }",
"@RequestMapping(method = RequestMethod.PUT)\n public ReservationDTO updateReservation(@Valid @RequestBody UpdateReservation reservation)\n throws ReservationNotFoundException, InvalidReservationDateException {\n\n Long bookingId = reservation.getBookingId();\n LocalDate newArrival = reservation.getArrivalDate();\n LocalDate newDeparture = reservation.getDepartureDate();\n\n Reservation updatedReservation = this.service\n .updateReservationDates(bookingId, newArrival, newDeparture);\n\n return this.parseReservation(updatedReservation);\n }",
"@Override\n @Transactional\n public HotelResponseDTO updateRoom(String hotelId, String roomId, UpdateRoomRequestDTO updateRoomRequest) {\n Optional<Hotel> optionalHotel = hotelRepository.findByHotelId(hotelId);\n Hotel hotel = optionalHotel.orElseThrow(() -> {\n logger.error(\"Hotel information not found | hotelId:{}\", hotelId);\n return new BookingServiceException(\"Hotel information not found | hotelId:\" + hotelId);\n });\n if (hotel.isDeleted()) {\n logger.info(\"Hotel is inactive | hotelId:{}\", hotelId);\n throw new BookingServiceException(\"Hotel is inactive | hotelId:\" + hotelId);\n }\n\n Optional<Room> optionalRoom = roomRepository.findByRoomIdAndHotel(roomId, hotel);\n Room room = optionalRoom.orElseThrow(() -> {\n logger.error(\"Hotel room information not found | hotelId:{},roomId:{}\", hotelId, roomId);\n return new BookingServiceException(\"Hotel room information not found | hotelId:\" + hotelId + \",roomId:\" + roomId);\n });\n if (room.isDeleted()) {\n logger.info(\"Hotel room is inactive | hotelId:{}\", hotelId);\n throw new BookingServiceException(\"Hotel room is inactive | hotelId:\" + hotelId);\n }\n RoomType roomType = RoomType.fromCode(updateRoomRequest.getRoomType());\n room.setRoomType(roomType);\n BedType bedType = BedType.fromCode(updateRoomRequest.getBedType());\n room.setBedType(bedType);\n room.setNumberOfAdults(updateRoomRequest.getNumberOfAdults());\n room.setNumberOfChildren(updateRoomRequest.getNumberOfChildren());\n room.setBasicFare(updateRoomRequest.getBasicFare());\n room.setTaxPercentage(updateRoomRequest.getTaxPercentage());\n if (updateRoomRequest.getFacilities() != null && updateRoomRequest.getFacilities().size() > 0) {\n room.setFacilities(String.join(\",\", updateRoomRequest.getFacilities()));\n }\n Date lastModifiedDate = new Date();\n room.setLastModifiedDate(lastModifiedDate);\n roomRepository.save(room);\n logger.info(\"Updated hotel room information successfully | hotelId:{},roomId:{}\", hotelId, roomId);\n return makeHotelResponseDTO(hotel);\n }",
"@Transactional\n @Override\n public Prenotazione update(Prenotazione prenotazione) {\n return this.prenotazioneRepository.update(prenotazione);\n }",
"@PutMapping(\"/customers\")\n\tpublic Customer updatecustomer(@RequestBody Customer thecustomer) {\n\t\t\n\t\tthecustomerService.saveCustomer(thecustomer); //as received JSON object already has id,the saveorupdate() DAO method will update details of existing customer who has this id\n\t\treturn thecustomer;\n\t}",
"public HrJBorrowcontract update(HrJBorrowcontract entity);",
"void updateUser(int id, UpdateUserDto updateUserDto);",
"public String updateSalerQuantity() throws Exception {\n\t\tactionStartTime = new Date();\n\t\tresetToken(result);\n\t\tresult.put(ERROR, true);\n\t\tif (promotionId == null || promotionId < 1 || id == null || id < 1) {\n\t\t\tresult.put(\"errMsg\", ValidateUtil.getErrorMsg(ConstantManager.ERR_NOT_DATA_CORRECT));\n\t\t\treturn JSON;\n\t\t}\n\t\ttry {\n\t\t\tstaff = getStaffByCurrentUser();\n\t\t\tif (staff == null || staff.getShop() == null || staff.getStaffType() == null) {\n\t\t\t\tresult.put(\"errMsg\", ValidateUtil.getErrorMsg(ConstantManager.ERR_NOT_PERMISSION, \"\"));\n\t\t\t\treturn JSON;\n\t\t\t}\n\n\t\t\tPromotionProgram pro = promotionProgramMgr.getPromotionProgramById(promotionId);\n\t\t\tif (pro == null) {\n\t\t\t\tresult.put(\"errMsg\", ValidateUtil.getErrorMsg(ConstantManager.ERR_NOT_EXIST_DB, \"CTKM\"));\n\t\t\t\treturn JSON;\n\t\t\t}\n\t\t\tif (!ActiveType.WAITING.equals(pro.getStatus()) && !ActiveType.RUNNING.equals(pro.getStatus())) {\n\t\t\t\tresult.put(\"errMsg\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"promotion.program.incorrect\"));\n\t\t\t\treturn JSON;\n\t\t\t}\n\n\t\t\tPromotionStaffMap psm = promotionProgramMgr.getPromotionStaffMapById(id);\n\t\t\tif (psm == null || !ActiveType.RUNNING.equals(psm.getStatus())) {\n\t\t\t\tresult.put(\"errMsg\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.staff.map.not.exists\"));\n\t\t\t\treturn JSON;\n\t\t\t}\n\t\t\tif (quantity != null && psm.getQuantityReceivedTotal() != null && quantity.compareTo(psm.getQuantityReceivedTotal()) < 0) {\n\t\t\t\tresult.put(\"errMsg\", \"Số suất phân bổ không được bé hơn số suất đã nhận.\");\n\t\t\t\treturn JSON;\n\t\t\t} else if (amount != null && psm.getAmountReceivedTotal() != null && amount.compareTo(psm.getAmountReceivedTotal()) < 0) {\n\t\t\t\tresult.put(\"errMsg\", \"Số tiền phân bổ không được bé hơn số tiền đã nhận.\");\n\t\t\t\treturn JSON;\n\t\t\t} else if (number != null && psm.getNumReceivedTotal() != null && number.compareTo(psm.getNumReceivedTotal()) < 0) {\n\t\t\t\tresult.put(\"errMsg\", \"Số lượng phân bổ không được bé hơn số lượng đã nhận.\");\n\t\t\t\treturn JSON;\n\t\t\t} else {\n\t\t\t\tpsm.setQuantityMax(quantity);\n\t\t\t\tpsm.setAmountMax(amount);\n\t\t\t\tpsm.setNumMax(number);\n\t\t\t\tpromotionProgramMgr.updatePromotionStaffMap(psm, getLogInfoVO());\n\t\t\t\tresult.put(ERROR, false);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tLogUtility.logErrorStandard(ex, R.getResource(\"web.log.message.error\", \"vnm.web.action.program.PromotionCatalogAction.updateSalerQuantity\"), createLogErrorStandard(actionStartTime));\n\t\t\tresult.put(\"errMsg\", ValidateUtil.getErrorMsg(ConstantManager.ERR_SYSTEM));\n\t\t\tresult.put(ERROR, true);\n\t\t}\n\t\treturn JSON;\n\t}",
"public int delegateUpdateTx(LdPublisher entity) {\r\n assertEntityNotNullAndHasPrimaryKeyValue(entity);\r\n filterEntityOfUpdate(entity);\r\n assertEntityOfUpdate(entity);\r\n return getMyDao().update(entity);\r\n }",
"int updateByPrimaryKey(Body record);",
"<T extends BaseDto> void executeUpdate(String reqQuery, T req, Connection conn);",
"public T update(T entity) throws DataAccessException;",
"public Boolean updateCustomer(String customerId, Customer updatedValuedCustomer){\n Boolean success = false;\n try{\n // try and connect\n conn = DriverManager.getConnection(URL);\n\n // make sql query\n PreparedStatement preparedStatement =\n conn.prepareStatement(\"UPDATE Customer SET FirstName=?, LastName=?, Country=?, PostalCode=?, Phone=?, Email=? WHERE CustomerId = ?\");\n preparedStatement.setString(1, updatedValuedCustomer.getFirstName());\n preparedStatement.setString(2, updatedValuedCustomer.getLastName());\n preparedStatement.setString(3, updatedValuedCustomer.getCountry());\n preparedStatement.setString(4, updatedValuedCustomer.getPostalCode());\n preparedStatement.setString(5, updatedValuedCustomer.getPhoneNumber());\n preparedStatement.setString(6, updatedValuedCustomer.getEmail());\n preparedStatement.setString(7, customerId);\n\n int result = preparedStatement.executeUpdate();\n success = (result != 0);\n System.out.println(\"Added customer\");\n }\n catch(Exception exception){\n System.out.println(exception.toString());\n }\n finally{\n try{\n conn.close();\n }\n catch (Exception exception){\n System.out.println(exception.toString());\n }\n }\n return success;\n }",
"@Override\n protected Response doUpdate(Long id, JSONObject data) {\n return null;\n }"
] |
[
"0.6317664",
"0.618459",
"0.6150585",
"0.6018397",
"0.58696336",
"0.58434033",
"0.5798128",
"0.556333",
"0.5556791",
"0.54974496",
"0.54714924",
"0.5438281",
"0.54277164",
"0.54242533",
"0.5305876",
"0.5292039",
"0.5277749",
"0.51936394",
"0.5183868",
"0.51360214",
"0.512267",
"0.507963",
"0.5028071",
"0.5005913",
"0.50032157",
"0.49958673",
"0.4984876",
"0.49593785",
"0.49523592",
"0.49487463",
"0.49466375",
"0.49455586",
"0.49428988",
"0.49401078",
"0.49397558",
"0.49288955",
"0.49279112",
"0.49267495",
"0.49239856",
"0.49222896",
"0.48899627",
"0.48714826",
"0.48544645",
"0.48381752",
"0.48349452",
"0.4834839",
"0.48336786",
"0.48188296",
"0.4814698",
"0.48113233",
"0.48036748",
"0.48017725",
"0.47901273",
"0.4787983",
"0.4787468",
"0.47822058",
"0.47799134",
"0.47753748",
"0.47736356",
"0.47697124",
"0.47657174",
"0.4765675",
"0.47606602",
"0.47556087",
"0.47410694",
"0.47357294",
"0.47336861",
"0.47316223",
"0.47264856",
"0.47256315",
"0.47188762",
"0.4713256",
"0.470364",
"0.47034925",
"0.46919692",
"0.4686797",
"0.4686797",
"0.4686541",
"0.46791437",
"0.4678433",
"0.4678375",
"0.46757618",
"0.467174",
"0.46653157",
"0.46652916",
"0.4662245",
"0.4654945",
"0.4653739",
"0.46509308",
"0.46507815",
"0.46416843",
"0.46414143",
"0.46397823",
"0.4638186",
"0.46381858",
"0.4633414",
"0.46308523",
"0.46293935",
"0.46241617",
"0.46237946"
] |
0.51984537
|
17
|
This method deletes an existing transaction in the database by passing an ID and returns the deleted transaction's data as a JSON object. If the transaction does not exist, an exception is thrown.
|
@DeleteMapping("/{id}")
public Transaction deleteTransactionById(@PathVariable Long id) {
Transaction deletedTransaction = null;
try {
deletedTransaction = transactionService.deleteTransactionById(id);
}
catch (TransactionNotFoundException e) {
throw new TransactionNotFoundException(id);
}
catch (UserDoesNotOwnResourceException e) {
throw new UserDoesNotOwnResourceException();
}
return deletedTransaction;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void deleteTransactionById(int id);",
"@Override\n\tpublic void delete(Integer transactionId) {\n\n\t}",
"public void deleteTransaction(int id) throws SQLException {\n String sql = \"DELETE FROM LabStore.Transaction_Detail WHERE id = ?\";\n\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n preStmt.setInt(1, id);\n preStmt.executeUpdate();\n }\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete ProjectTransactionRecord : {}\", id);\n projectTransactionRecordRepository.delete(id);\n }",
"@Override\n\tpublic ResponseEntity<?> delete(Long id) {\n\t\treturn ResponseEntity.ok(service.deposit.delete(id));\n\t}",
"public boolean delete(Transaction transaction) throws Exception;",
"public JSONObject deleteTransaction(JSONObject message, Session session, Connection conn) {\n\t\ttry {\n\t\t\tStatement st = conn.createStatement();\n\t\t\tint transID = message.getInt(\"transactionID\");\n\t\t\tint userID = message.getInt(\"userID\");\n\t\t\tint budgetID = 0;\n\t\t\tdouble amount = 0;\n\t\t\tResultSet rs = st.executeQuery(\"SELECT * FROM Transactions WHERE transactionID=\" + transID + \";\");\n\t\t\tint bigBudgetID = 0;\n\t\t\tif (rs.next()) {\n\t\t\t\tamount = rs.getFloat(\"Amount\");\n\t\t\t\tbudgetID = rs.getInt(\"budgetID\");\n\t\t\t}\n\t\t\tResultSet rs1 = st.executeQuery(\"SELECT * FROM Budgets WHERE budgetID=\" + budgetID + \";\");\n\t\t\tdouble budgetAmountSpent = 0;\n\t\t\t\n\t\t\tif (rs1.next()) {\n\t\t\t\tbudgetAmountSpent = rs1.getFloat(\"TotalAmountSpent\");\n\t\t\t\tbigBudgetID = rs1.getInt(\"bigBudgetID\");\n\t\t\t}\n\t\t\tResultSet rs2 = st.executeQuery(\"SELECT * FROM BigBudgets WHERE bigBudgetID=\" + bigBudgetID + \";\");\n\t\t\tdouble bigBudgetAmountSpent = 0;\n\t\t\tif (rs2.next()) {\n\t\t\t\tbigBudgetAmountSpent = rs2.getFloat(\"TotalAmountSpent\");\n\t\t\t}\n\t\t\tStatement st4 = conn.createStatement();\n\t\t\tst4.execute(\"UPDATE Budgets SET TotalAmountSpent=\" + (budgetAmountSpent-amount) + \" WHERE budgetID=\" + budgetID + \";\");\n\t\t\tStatement st5 = conn.createStatement();\n\t\t\tst5.execute(\"UPDATE BigBudgets SET TotalAmountSpent=\" + (bigBudgetAmountSpent-amount) + \"WHERE bigBudgetID=\" + bigBudgetID + \";\");\n\t\t\t\n\t\t\tString deleteTrans = \"DELETE FROM Transactions WHERE transactionID=\" + transID + \";\";\n\t\t\tst.execute(deleteTrans);\n\t\t\tresponse = getData(conn, userID);\n\t\t\tresponse.put(\"message\", \"deleteTransactionSuccess\");\n\t\t} catch (SQLException | JSONException e) {\n\t\t\te.printStackTrace();\n\t\t\ttry {\n\t\t\t\tresponse.put(\"message\", \"deleteTransactionFail\");\n\t\t\t} catch (JSONException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn response;\n\t}",
"@Override\n\tpublic JSONObject delete(long id) {\n\t\treturn null;\n\t}",
"public void deleteTransaction() {\n\t\tconn = MySqlConnection.ConnectDb();\n\t\tString sqlDelete = \"delete from Account where transactionID = ?\";\n\t\ttry {\n\t\t\t\n\t\t\tps = conn.prepareStatement(sqlDelete);\n\t\t\tps.setString(1, txt_transactionID.getText());\n\t\t\tps.execute();\n\n\t\t\tUpdateTransaction();\n\t\t} catch (Exception e) {\n\t\t}\n\t}",
"public void delete(Long id) {\n log.debug(\"Request to delete OrderTransaction : {}\", id);\n orderTransactionRepository.deleteById(id);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"public long delete(long id) throws Exception\n\t{\n\t\tthis.updateStatus(id, SETTConstant.TransactionStatus.DELETED);\n\t\treturn id;\n\t}",
"@Transactional\n\t@Override\n\tpublic void deleteById(Integer id) throws Exception {\n\t\tparaderoRespository.deleteById(id);\n\t}",
"@Override\n\t\tpublic boolean delete(AccountTransaction t, int id) {\n\t\t\treturn false;\n\t\t}",
"@Override\n public boolean delete(String idTransaksi) {\n try {\n String query = \"DELETE FROM transaksi WHERE id = ?\";\n\n PreparedStatement ps = Koneksi().prepareStatement(query);\n ps.setString(1, idTransaksi);\n\n if (ps.executeUpdate() > 0) {\n return true;\n }\n } catch (SQLException se) {\n se.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return false;\n }",
"@Override\r\n\tpublic Result delete(int id) {\n\t\treturn null;\r\n\t}",
"public boolean deleteTransaction(User user, long transactionId) {\n Optional<Transaction> optional = transactionDAO.findById(user, transactionId);\n if(optional.isPresent()) {\n Transaction transaction = optional.get();\n Budget budget = transaction.getBudget();\n budget.setActual(budget.getActual() - transaction.getAmount());\n transactionDAO.delete(transaction);\n return true;\n }\n return false;\n }",
"@Override\n\tpublic void deleteTransaction(Transaction transaction) {\n\n\t}",
"int deleteById(ID id) throws SQLException, DaoException;",
"@Override\n @Transactional\n public int deleteById(final int id) {\n return jdbcTemplate.update(\"delete from MyBook where id = ?\",\n new Object[] {id});\n }",
"@Delete({\n \"delete from payment_t_weixin_callback_records\",\n \"where ID = #{id,jdbcType=BIGINT}\"\n })\n int deleteByPrimaryKey(Long id);",
"public Transaction getById(String id) throws Exception;",
"@Override\n public Nary<Void> applyWithTransactionOn(TransactionContext transactionContext) {\n String deleteHql = \"DELETE FROM \" + persistentType.getName() + \" WHERE id = :deletedId\";\n Session session = transactionContext.getSession();\n Query deleteQuery = session.createQuery(deleteHql);\n deleteQuery.setParameter(\"deletedId\", deletedId);\n int affectedRows = deleteQuery.executeUpdate();\n if(affectedRows != 1){\n LOG.debug(\"Deletion of {}[{}] did not affect just 1 row: {}\", persistentType, deletedId, affectedRows);\n }\n // No result expected from this operation\n return Nary.empty();\n }",
"@Override\r\n\tpublic int delete(int id) throws Exception {\n\t\treturn this.dao.delete(id);\r\n\t}",
"@Transactional\n public void deleteEvent(int id) {\n LOGGER.info(\"deleting event wit id {}\", id);\n Optional<Event> optionalEvent = eventRepository.findById(id);\n if (optionalEvent.isPresent()) {\n EventTO eventTO = mapperService.convertToEventTO(optionalEvent.get());\n eventRepository.deleteById(id);\n eventProducer.sendDeletedEvent(eventTO);\n }\n else {\n LOGGER.error(\"event with id {} has not been found\", id);\n throw new ResourceNotFoundException(\"Event has not been found\");\n }\n\n }",
"public TransactionObj removeTransaction(String sID){\n\t\tif(hmTransaction.containsKey(sID)){\n\t\t\tTransactionObj Transaction = hmTransaction.remove(sID);\n\t\t\talTransaction.remove(Transaction);\n\t\t\treturn Transaction;\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\r\n\tpublic CustomResult delete(String id) throws Exception{\n\t\tint i = materialConsumeMapper.deleteByPrimaryKey(id);\r\n\t\tif(i>0){\r\n\t\t\treturn CustomResult.ok();\r\n\t\t}else{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"@Override\n\tpublic Transaction findTransactionById(int id) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic int deleteById(Integer id) throws Exception {\n\t\treturn 0;\n\t}",
"Integer delete(int id);",
"@Override\r\n\tpublic Trainee deleteById(int id) {\n\t\treturn dao.deleteById(id);\r\n\t}",
"@Test\n @WithMockUser(username = \"employee\", roles = {\"EMPLOYEE\"})\n public void deleteTransactionById() throws Exception {\n\n when(transactionService.getTransactionById(99)).thenReturn(transaction);\n this.mvc.perform(delete(\"/transactions/99\").contentType(MediaType.APPLICATION_JSON)\n .accept(MediaType.APPLICATION_JSON))\n .andExpect(status().is(200));\n }",
"int deleteByExample(TransactionExample example);",
"Transaction get(String id) throws Exception;",
"@Override\n\tpublic void deleteById(String id) throws Exception {\n\t\t\n\t}",
"@Override\n\t@Transactional\n\tpublic void deleteById(Integer id) throws Exception {\n\t\tdetalleCarritoRepository.deleteById(id);\n\t}",
"@Override\r\n\t@Transactional\r\n\tpublic void delete(Integer id) {\n\t\tdao.deleteById(id);\r\n\t\t\r\n\t}",
"@Override\n\tpublic BaseMessage deleteByPrimaryKey(Integer id) throws Exception {\n\t\tBaseMessage msg=new BaseMessage();\n\t\tint result=uscAdvertIncomeMapper.deleteByPrimaryKey(id);\n\t\tif(result==1){\n\t\t\tmsg.setStatus(1);\n\t\t\tmsg.setMessage(\"删除成功\");\n\t\t}else{\n\t\t\tmsg.setStatus(0);\n\t\t\tmsg.setMessage(\"删除失败\");\n\t\t}\n\t\treturn msg;\n\t}",
"@Override\n public void delete(Long id) throws Exception {\n\n }",
"@Override\n\tpublic ResponseEntity<?> delete(Long id) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic void deleteById(String id) {\n\t\tcontractDao.delete(id);\n\t}",
"@Override\n\tpublic int delete(long id) {\n\t\t\n\t\t// =============================================================================\n\t\t// NOTE: to delete an order an order items for the order must be deleted first\n\t\t// to avoid failing a foreign key constraint\n\t\t// =============================================================================\n\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();) {\n\t\t\tstatement.executeUpdate(\"DELETE FROM order_items WHERE order_id = \" + id); \n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();) {\n\t\t\treturn statement.executeUpdate(\"DELETE FROM orders WHERE id = \" + id);\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn 0;\n\t}",
"@Override\r\n\tpublic ResponseEntity<String> delete(Integer id) {\n\t\treturn null;\r\n\t}",
"ResponseEntity deleteById(UUID id);",
"@Delete({\n \"delete from PURCHASE\",\n \"where ID = #{id,jdbcType=DECIMAL}\"\n })\n int deleteByPrimaryKey(BigDecimal id);",
"void deleteCustomerDDPayById(int id);",
"@RequestMapping(value = \"/temperaturas/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deleteTemperatura(@PathVariable Long id) {\n log.debug(\"REST request to delete Temperatura : {}\", id);\n temperaturaRepository.delete(id);\n temperaturaSearchRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"temperatura\", id.toString())).build();\n }",
"int delete(Long id) throws SQLException, DAOException;",
"@RequestMapping(value = \"/translations/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deleteTranslation(@PathVariable Long id) {\n log.debug(\"REST request to delete Translation : {}\", id);\n translationRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"translation\", id.toString())).build();\n }",
"void delete(Long id) throws Throwable;",
"@DeleteMapping(\"{id}\")\n public ResponseEntity<Long> delete(@PathVariable(\"id\") Long id) {\n logger.debug(\"Request to delete Contractor with id \" + id);\n if(id == null || id == 0) throw new IllegalArgumentException(\"Expects a valid id value > 0\");\n Optional<Contractor> contractor = contractorService.getByID(id);\n if(contractor == null || !contractor.isPresent()) throw new ResourceNotFoundException(\"In order to delete Contractor \" + id + \", existing Contractor must be available with same ID\");\n contractorService.deleteByID(id);\n return new ResponseEntity<Long>(id,new HttpHeaders(), HttpStatus.ACCEPTED);\n }",
"@Override\n\tpublic String delete(Integer id) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic long deleteById(String id) {\n\t\tlong deleteById = orderDetailDao.deleteById(id);\n\t\treturn deleteById;\n\t}",
"@Delete({\n \"delete from order\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n int deleteByPrimaryKey(Long id);",
"@Override\n\tpublic Item delete() {\n\t\treadAll();\n\t\tLOGGER.info(\"\\n\");\n\t\t//user can select either to delete a customer from system with either their id or name\n\t\tLOGGER.info(\"Do you want to delete record by Item ID\");\n\t\tlong id = util.getLong();\n\t\titemDAO.deleteById(id);\n\t\t\t\t\n\t\t\t\t\n\t\treturn null;\n\t}",
"public ResponseEntity<Object> deleteUser(Long id) {\n if (userRepository.findById(id).isPresent()) {\n userRepository.deleteById(id);\n if (userRepository.findById(id).isPresent()) {\n return ResponseEntity.unprocessableEntity().body(\"Failed to delete the specified record\");\n } else return ResponseEntity.ok().body(\"Successfully deleted specified record\");\n } else\n return ResponseEntity.unprocessableEntity().body(\"No Records Found\");\n }",
"@Override\n\tpublic void delete(String id) throws Exception {\n\n\t}",
"CustDataNotesResponseDTO deleteCustDataNotes(String id) throws Exception;",
"@Override\n\tpublic int deleteObjectById(Integer id) {\n\t\treturn evaluateMapper.deleteObjectById(id);\n\t}",
"@Override\n\tpublic void deleteById(int id) throws SQLException {\n\n\t}",
"Transaction findTransactionById(Long id);",
"@Override\n\t@Transactional\n\tpublic void deleteById(Integer id) throws Exception {\n\t\tclienteRepository.deleteById(id);\n\t}",
"public Transaction getTransactionById(Integer id) throws MiddlewareQueryException;",
"@Override\n\t@RequestMapping(value=ZuelControllerValue.Manage+\"deleteItem\")\n\tpublic ZuelResult deleteItem(Long id) throws Exception {\n\t\treturn service.deleteItem(id);\n\t}",
"@DELETE\n public void delete() {\n try {\n dao.delete(dao.retrieveById(id));\n } catch (EntityInUse eiu) {\n throw new WebApplicationException(WSUtils.buildError(400, EntityInUse.ERROR_MESSAGE));\n }\n }",
"@Transactional\n\tpublic String delete_test1(long id, TeUser user) throws Exception {\n\n\t \t log.setLevel(Level.INFO);\n\t log.info(\"delete_test1 Dao started operation!\");//dhina updateverb\n\n\t\ttry{\n\t\t\tQuery query = entityManager\n\t\t\t\t\t.createNativeQuery(delete_Test1)\n\t\t\t.setParameter(\"id\", id);\n\n\t\t\tquery.executeUpdate();\n\n\t\t\tlog.info(\"Object returned from delete_test1 Dao method !\");\n\n\t\t\treturn \"{\\\"status\\\":\\\"success\\\"}\";\n\n\t\t}catch(Exception e){\n\n\t\t\t//System.out.println(\"DAOException: \" + e.toString());\n\t\t\tlog.error(\" Dao method (delete_test1) throws Exception : \"+e.toString());\n\n\t\t}\n\t\treturn null;\n\n\n\n\t}",
"@Override\n\tpublic void delete(Integer id) throws SQLException {\n\t\t\n\t}",
"@RequestMapping(value = \"/customerOrders/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deleteCustomerOrder(@PathVariable Long id) {\n log.debug(\"REST request to delete CustomerOrder : {}\", id);\n customerOrderRepository.delete(id);\n customerOrderSearchRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"customerOrder\", id.toString())).build();\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Fund : {}\", id);\n fundRepository.delete(id);\n }",
"@Override\n public int delete(int ID)\n {\n int rtn = 0;\n try\n {\n String sql = \"delete from data_dict \";\n sql += \" where dict_id = \" + ID;\n DBUtil db = new DBUtil();\n db.openConnection();\n rtn = db.execCommand(sql);\n db.close();\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n return rtn;\n }",
"@Transactional\n public boolean deleteTour(Long id) {\n return tourRepository.deleteById(id)\n .orElseThrow(() -> new TourNotFoundException(id));\n\n }",
"@Override\n\t@Transactional\n\tpublic void deleteById(int id) throws Exception {\n\t\tclienteRepository.deleteById(id);\n\t}",
"@Override\n\tpublic int delete(int id) throws SQLException {\n\t\treturn 0;\n\t}",
"public void delete(Integer id);",
"public void delete(Integer id);",
"public void delete(Integer id);",
"public abstract void delete(String ID);",
"@RequestMapping(value = \"/api/todo-items/{id}\", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n\tpublic ResponseEntity<TodoItem> deleteItem(@PathVariable(\"id\") long id) {\n\t\tSystem.out.println(\"Fetching & Deleting task with id \" + id);\n\n\t\tTodoItem item = todoItemService.findById(id);\n\t\tif (item == null) {\n\t\t\tSystem.out.println(\"Unable to delete. Item with id \" + id + \" not found\");\n\t\t\treturn new ResponseEntity<TodoItem>(HttpStatus.NOT_FOUND);\n\t\t}\n\n\t\ttodoItemService.delete(id);\n\t\treturn new ResponseEntity<TodoItem>(HttpStatus.NO_CONTENT);\n\t}",
"@Transactional\n\t@Override\n\tpublic void deleteById(Integer id) throws Exception {\n\t\tpersonaRepository.deleteById(id);\n\t}",
"@Override\n\tpublic int deleCartById(int id) {\n\t\treturn sqlSessionTemplate.delete(sqlId(\"deleteById\"),id);\n\t}",
"int delete(T data) throws SQLException, DaoException;",
"@Override\n\tpublic void deleteById(Serializable id) {\n\t\tmapper.deleteById(id);\n\t\t\n\t}",
"@DELETE\n @Transactional\n @Path(\"/{id}\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response delete(\n @PathParam(\"id\") @NotNull(message = ValidationMessages.EMPLOYEE_ID_MUST_NOT_BE_NULL)\n UUID employeeId) {\n\n deleteEmployeeById.handle(employeeId);\n return Response.ok().build();\n }",
"public boolean deleteById(Object id);",
"public boolean deleteById(Object id);",
"void delete(int id) throws Exception;",
"public int deleteData(int id){\n SQLiteDatabase db = this.getWritableDatabase();\n return db.delete(TABLE_CART,\"cart_ID=?\",new String[]{String.valueOf(id)});\n\n\n }",
"@Transactional\n public String deleteUser(Long id) {\n UserDto userDto = getUser(id);\n\n if (userDto.getId() != 0) {\n userRepository.deleteById(id);\n return \"User deleted successfully!\";\n } else {\n return \"User not found\";\n }\n }",
"int delete(Long id);",
"@Override\n\tpublic int doDelete(int id) throws Exception {\n\t\tif(id<0||id>this.getSize()){\n\t\t\treturn 200;\n\t\t}\n\t\ttry {\n\t\t\tdao.doDelete(id);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\treturn 300;\n\t\t}\n\t\treturn 100;\n\t}",
"public void delete(int id) throws DAOException;",
"void deleteById(int id);",
"@DELETE\n @Path(\"/{id}\")\n @Produces(MediaType.APPLICATION_JSON)\n public String deleteJson(@PathParam(\"id\") int id) {\n\n Resposta lResposta = new Resposta();\n GsonBuilder gBuilder = new GsonBuilder();\n Gson jObject = gBuilder.create();\n\n try {\n dao.remover(id);\n\n lResposta.setMensagem(\"Sucesso\");\n lResposta.setSucesso(true);\n } catch (Exception e) {\n lResposta.setMensagem(e.getMessage());\n lResposta.setSucesso(false);\n }\n\n return jObject.toJson(lResposta);\n }",
"@Override\n\tpublic String delete(Long id) {\n\t\tOptional<FoodTruckEntity> result=repo.findById(id);\n\t\tif(result.isPresent()) { \n\t\t\t repo.deleteById(id);\n\t\t\t return \"Id \" +id +\"data deleted Succesfully\";\n\t\t } \n\t\t else {\n\t\t \n\t\t\t return \"id \"+id+\"is not pressent\"; \n\t\t }\n\t\t\n\t}",
"@Override\n\tpublic int delete(long id) throws DAOException {\n\t\treturn 0;\n\t}",
"@Override\n\t@Transactional\n\tpublic void delete(Long id) {\n\t\tcustomerDAO.deleteById(id);\n\t}",
"public boolean delete(String id);",
"public boolean delete(String id);",
"public void delete(int id);",
"@Override\r\n\tpublic int delete(int id) {\n\t\treturn jdbcTemplate.update(\"call PKG_ESTADO_CIVIL.PR_DEL_ESTADO_CIVIL(?)\", id);\r\n\t}"
] |
[
"0.753673",
"0.6809074",
"0.6488862",
"0.6386934",
"0.6386035",
"0.63694596",
"0.62858444",
"0.6281927",
"0.6278688",
"0.62536734",
"0.6245001",
"0.6237728",
"0.62231517",
"0.6130976",
"0.60943145",
"0.60876477",
"0.6067783",
"0.598507",
"0.59845376",
"0.5982056",
"0.59771633",
"0.5971012",
"0.59493357",
"0.59010875",
"0.5877862",
"0.587389",
"0.5861844",
"0.58601695",
"0.5840236",
"0.5840013",
"0.58382887",
"0.58378863",
"0.5824943",
"0.58171916",
"0.58062243",
"0.5802901",
"0.5792867",
"0.577808",
"0.5770614",
"0.57584876",
"0.5746324",
"0.57432586",
"0.5741818",
"0.5741117",
"0.5740304",
"0.57356983",
"0.5734429",
"0.5730445",
"0.5707255",
"0.57066864",
"0.56992465",
"0.56979126",
"0.569654",
"0.5695191",
"0.5693796",
"0.56897485",
"0.56890815",
"0.5687861",
"0.5682025",
"0.5681617",
"0.56810796",
"0.5671137",
"0.567104",
"0.56549007",
"0.5645039",
"0.56399906",
"0.5638708",
"0.56371987",
"0.5636856",
"0.56339025",
"0.56286174",
"0.5625093",
"0.5624911",
"0.5621281",
"0.5621281",
"0.5621281",
"0.56174564",
"0.56169516",
"0.5615761",
"0.56123096",
"0.56106025",
"0.56103504",
"0.5607586",
"0.5607423",
"0.5607423",
"0.5607275",
"0.56056154",
"0.56021404",
"0.56016934",
"0.5593975",
"0.55933154",
"0.55913347",
"0.55906886",
"0.55895996",
"0.5589126",
"0.55883324",
"0.55864865",
"0.55864865",
"0.55783933",
"0.557822"
] |
0.7412095
|
1
|
Used to create an order from a checkout object once payment has been successful.
|
public Order createOrder(final Checkout checkout) {
Map<String, Object> logMap = LoggingUtils.createLogMap();
LoggingUtils.logIfNotNull(logMap, LoggingUtils.CHECKOUT_ID, checkout.getId());
LoggingUtils.logIfNotNull(logMap, LoggingUtils.USER_ID, checkout.getUserId());
LOGGER.info("Creating order", logMap);
final Order mappedOrder = mapper.checkoutToOrder(checkout);
setCreationDateTimes(mappedOrder);
mappedOrder.getData().setLinks(linksGeneratorService.generateOrderLinks(mappedOrder.getId()));
LoggingUtils.logIfNotNull(logMap, LoggingUtils.ORDER_ID, mappedOrder.getId());
final Optional<Order> order = orderRepository.findById(mappedOrder.getId());
order.ifPresent(
o -> {
final String message = "Order ID " + o.getId() + " already exists. Will not update.";
LOGGER.error(message, logMap);
throw new ForbiddenException(message);
}
);
Order savedOrder;
try {
savedOrder = orderRepository.save(mappedOrder);
} catch (MongoException ex) {
String errorMessage = String.format("Failed to save order with id %s", mappedOrder.getId());
LOGGER.error(errorMessage, ex, logMap);
throw new MongoOperationException(errorMessage, ex);
}
LOGGER.info("Publishing notification to Kafka 'order-received' topic for order - " + mappedOrder.getId(), logMap);
sendOrderReceivedMessage(mappedOrder.getId());
return savedOrder;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void create(Order order);",
"OrderDTO create(OrderDTO orderDTO);",
"public void startOrder() {\r\n this.o= new Order();\r\n }",
"public Invoice createInvoice(Order order);",
"Order placeNewOrder(Order order, Project project, User user);",
"ResponseDTO createPurchase(PurchaseOrderDTO purchaseOrderDTO) throws ApiException, IOException;",
"NewOrderResponse newOrder(NewOrder order);",
"@Override\n\tpublic OrderResponseDto createOrder(OrderRequestDto orderRequestDto) {\n\t\tLOGGER.info(\"Enter into order service impl\");\n\n\t\tOptional<Stocks> stock = stockRepository.findById(orderRequestDto.getStockId());\n\t\tOptional<User> user = userRepository.findById(orderRequestDto.getUserId());\n\n\t\tif (!stock.isPresent())\n\t\t\tthrow new CommonException(TradingConstants.ERROR_STOCK_NOT_FOUND);\n\t\tif (!user.isPresent())\n\t\t\tthrow new CommonException(TradingConstants.ERROR_USER_NOT_FOUND);\n\t\tif (orderRequestDto.getStockQuantity() >= 100)\n\t\t\tthrow new CommonException(TradingConstants.ERROR_QUANTITY);\n\t\tDouble brokeragePercent = Double.valueOf(stock.get().getBrokerageAmount() / 100d);\n\t\tDouble brokerageAmount = stock.get().getStockPrice() * orderRequestDto.getStockQuantity() + brokeragePercent;\n\t\tDouble totalPrice = stock.get().getStockPrice() * orderRequestDto.getStockQuantity() + brokerageAmount;\n\n\t\tOrders orders = Orders.builder().stockId(stock.get().getStockId())\n\t\t\t\t.stockQuantity(orderRequestDto.getStockQuantity()).totalPrice(totalPrice)\n\t\t\t\t.stockStatus(StockStatus.P.toString()).userId(orderRequestDto.getUserId()).build();\n\t\torderRepository.save(orders);\n\t\tResponseEntity<GlobalQuoteDto> latest = latestStockPrice(stock.get().getStockName());\n\t\treturn new OrderResponseDto(orders.getOrderId(), stock.get().getStockPrice(),\n\t\t\t\tlatest.getBody().getGlobalQuote().getPrice());\n\t}",
"public Order() {\n orderID = \"\";\n customerID = \"\";\n status = \"\";\n }",
"@Override\n public Order create(Order order) {\n this.orders.add(order);\n save();\n return order;\n }",
"@Override\n\tpublic void checkout(MetodoPagamento object) {\n\t\t\n\t}",
"public void createNewOrder()\n\t{\n\t\tnew DataBaseOperationAsyn().execute();\n\t}",
"protected abstract Order createOrder(Cuisine cuisine);",
"public void placeOrder(String custID) {\r\n //creates Order object based on current cart\r\n Order order = new Order(custID, getItems());\r\n //inserts new order into DB\r\n order.insertDB();\r\n }",
"public void create(Order order) {\n order_dao.create(order);\n }",
"@Override\n\tpublic Order create(Order order) {\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();) {\n\t\t\tstatement.executeUpdate(\"INSERT INTO orders(customer_id) VALUES ('\" + order.getCustomer_id() + \"')\");\n\t\t\treturn readLatest();\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn null;\n\t}",
"@RequestMapping(path=\"/createOrder\", method = RequestMethod.POST, produces = \"application/json\", consumes = \"application/json\")\n\tpublic ResponseEntity<PaymentResponseDTO> createOrder(@RequestBody PaymentRequestDTO btcDTO) { \n\t\tlogger.info(\"Init payment\");\n\t\t\n\t\tSellerBitcoinInfo sbi = bitcoinRepo.findByidMagazine(btcDTO.getSellerId());\n\t\t\n\t\tSystem.out.println(\"ADDRESS \" + sbi.getBitcoinAddress());\n\t\t\n\t\tString token = sbi.getBitcoinAddress();\n\t\t\n\t\tString authToken = \"Bearer \" + token;\n\t\t//trebali bismo da kreiramo transakciju koja ce biti u stanju \"pending\" sve dok korisnik ne plati ili mu ne istekne odredjeno vreme\n\t\t\n\t\t//txRepo.save(tx);\n\t\t//RestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\t//restTemplate.getForEntity(\"https://google.rs\", String.class);\n\t\t//restTemplate.getForEntity(\"https://api.coingate.com/v2/ping\", String.class);\n\t\t\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.add(\"Authorization\", authToken);\t \n\t\t\n\t\tSystem.out.println(\"Amount: \" + btcDTO.getAmount());\n\t\t\n\t\tCreateOrderRequestDTO order = new CreateOrderRequestDTO(\"1111\", btcDTO.getAmount(), \"BTC\", \"DO_NOT_CONVERT\", \"Title\", \"Description\", \"https://localhost:4200/success\", \"https://localhost:4200/failed\", \"https://localhost:4200/success\", \"token\");\n\t\t\n\t\tResponseEntity<Object> responseEntity = new RestTemplate().exchange(\"https://api-sandbox.coingate.com/v2/orders\", HttpMethod.POST,\n\t\t\t\tnew HttpEntity<Object>(order, headers), Object.class);\n\t\t\n\t\tlogger.info(responseEntity.getBody().toString());\n\t\t\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tmapper.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);\n\t\tBitCoinResponseDTO btcResponse = new BitCoinResponseDTO();\n\n\t\tbtcResponse = mapper.convertValue(responseEntity.getBody(), BitCoinResponseDTO.class);\n\t\t\n\t\tString paymentUrl = btcResponse.getPayment_url();\n\t\t\n\t\tlogger.info(paymentUrl);\n\t\t\n\t\tTx tx = createTransaction(btcResponse,sbi);\n\t\ttxRepo.save(tx);\n\t\t\n\t\tTxInfoDto txInfo = new TxInfoDto();\n\t\ttxInfo.setOrderId(btcDTO.getOrderId());\n\t\ttxInfo.setServiceWhoHandlePayment(\"https://localhost:8764/bitCoin\");\n\t\ttxInfo.setPaymentId(tx.getorder_id()); //ovde se nalazi orderId koji je i na coingate-u\n\t\t\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\tResponseEntity<TxInfoDto> r = restTemplate.postForEntity(\"https://localhost:8111/request/updateTxAfterPaymentInit\", txInfo, TxInfoDto.class);\n\t\t\n\t\t//BitCoinResponseDTO response = parser.parseList(responseEntity.getBody().toString());\n\t\t\n\t\t//BitCoinResponseDTO responseDTO = responseEntity.;\n\t\t\n\t\t//String pageToRedirec = responseDTO.getPayment_url();\n\t\t\n\t\t//restTemplate.exchange\n\t\t//ResponseEntity<String> response = restTemplate.postForEntity(\"https://api-sandbox.coingate.com/v2/orders\", btcDTO, String.class);\n\t\t\n\t\tPaymentResponseDTO responseDTO = new PaymentResponseDTO();\n\t\tresponseDTO.setPaymentUrl(paymentUrl);\n\t\tresponseDTO.setPaymentId(1l);\n\n\t\tSTATIC_ID = btcResponse.getId();\n\t\tSTATIC_TOKEN = authToken;\n\t\tIS_CREATE = true;\n\t\t\n\t\t//scheduleFixedDelayTask();\n\t\t//scheduleFixedDelayTask(btcResponse.getId(), authToken);\n\t\t\n\t\treturn new ResponseEntity<PaymentResponseDTO>(responseDTO,HttpStatus.OK);\n\t}",
"@Override\n\tpublic void execute(final CheckoutActionContext context) throws EpSystemException {\n\t\tcheckoutEventHandler.preCheckoutOrderPersist(context.getShoppingCart(),\n\t\t\t\tcontext.getOrderPaymentList(), context.getOrder());\n\n\t\t//process and update order - should limit our updates to once\n\t\tfinal Order updatedOrder = orderService.processOrderOnCheckout(context.getOrder(),\n\t\t\t\tcontext.getShoppingCart().isExchangeOrderShoppingCart());\n\t\tcontext.setOrder(updatedOrder);\n\t\tcontext.setOrderPaymentList(updatedOrder.getOrderPayments());\n\t}",
"public Order(String deliveryAddress, String customerName, double orderTotalPrice, String id,\n String description, String customerTelephone, String comment, String pharmacyId, Date date, String userToken) {\n this.deliveryAddress = deliveryAddress;\n this.customerName = customerName;\n this.orderStatus = OrderStatus.WAITING_ORDER;\n this.orderTotalPrice = orderTotalPrice;\n this.description = description;\n this.id = id;\n this.customerTelephone = customerTelephone;\n this.pharmacyId = pharmacyId;\n this.comment = comment;\n this.date = new Date(date.getTime());\n this.userToken = userToken;\n }",
"@Override\n @Transactional\n public PurchaseResponse placeOrder(Purchase purchase) {\n Order order = purchase.getOrder();\n\n //genrate traking number\n String orderTrakingNumber = genrateOrderTrakingnumber();\n order.setOrderTrackingNumber(orderTrakingNumber);\n\n //populate order with order item\n Set<OrderItem> orderItems = purchase.getOrderItems();\n orderItems.forEach(item-> order.add(item));\n\n //populate order with billingAddress and shipplingAddress\n order.setBillingAddress(purchase.getBillingAddress());\n order.setShippingAddress(purchase.getShippingAddress());\n\n //populate customer with order\n Customer customer = purchase.getCustomer();\n\n // checck if the existing customer\n String theEmail = customer.getEmail();\n Customer customerFromDB = customerRepository.findByEmail(theEmail);\n\n if(customerFromDB != null){\n // we found it let assign them\n customer = customerFromDB;\n }\n\n customer.add(order);\n\n //sqve to the db\n customerRepository.save(customer);\n\n\n\n // return the response\n return new PurchaseResponse(orderTrakingNumber);\n }",
"public void startPayment() {\r\n final Activity activity = this;\r\n\r\n final Checkout co = new Checkout();\r\n\r\n try {\r\n JSONObject options = new JSONObject();\r\n options.put(\"name\", \"Farm2Home\");\r\n options.put(\"description\", \"Consumption charges\");\r\n //You can omit the image option to fetch the image from dashboard\r\n // options.put(\"image\", \"https://rzp-mobile.s3.amazonaws.com/images/rzp.png\");\r\n options.put(\"currency\", \"INR\");\r\n options.put(\"amount\", \"500\");\r\n\r\n // JSONObject preFill = new JSONObject();\r\n // preFill.put(\"email\", \"[email protected]\");\r\n // preFill.put(\"contact\", \"9876543210\");\r\n\r\n // options.put(\"prefill\", preFill);\r\n\r\n co.open(activity, options);\r\n } catch (Exception e) {\r\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\r\n .show();\r\n e.printStackTrace();\r\n }\r\n }",
"public CreateOrderRequest(CreateOrderRequest source) {\n if (source.ChannelCode != null) {\n this.ChannelCode = new String(source.ChannelCode);\n }\n if (source.MerchantAppId != null) {\n this.MerchantAppId = new String(source.MerchantAppId);\n }\n if (source.Amount != null) {\n this.Amount = new String(source.Amount);\n }\n if (source.TraceNo != null) {\n this.TraceNo = new String(source.TraceNo);\n }\n if (source.NotifyUrl != null) {\n this.NotifyUrl = new String(source.NotifyUrl);\n }\n if (source.ReturnUrl != null) {\n this.ReturnUrl = new String(source.ReturnUrl);\n }\n }",
"public APIResponse placeOrder(@NotNull Order order){\n try {\n validateOrder(order);\n \n order.getItems().addAll(\n orderItemRepository.saveAll(order.getItems())\n );\n orderRepository.save( order );\n return APIResponse.builder()\n .success( true)\n .data( true )\n .error( null )\n .build();\n }catch (Exception exception){\n\n log.error(exception.getMessage());\n return APIResponse.builder()\n .success( true)\n .data( false )\n .error( exception.getMessage() )\n .build();\n }\n }",
"private boolean checkout() {\n if (OrderMenuUI.incompleteOrders == null || OrderMenuUI.incompleteOrders.size() == 0) {\n System.out.println(\"No orders ready for checkout. Cancelling Operation\");\n return false;\n }\n HashMap<Integer, Order> tOrders = new HashMap<>();\n OrderMenuUI.incompleteOrders.forEach((s) -> {\n Table c = s.getTable();\n if (c == null) return;\n tOrders.put(c.getTableNum(), s);\n });\n tOrders.put(-1, null);\n OrderMenuUI.printOrderList(OrderMenuUI.incompleteOrders, \"Ready for Checkout\", true);\n int tableNo = ScannerHelper.getIntegerInput(\"Select Table to checkout (-1 to cancel): \", new ArrayList<>(tOrders.keySet()), \"Invalid Table Number. Please select a valid table number or enter -1 to cancel\");\n if (tableNo == -1) {\n System.out.println(\"Checkout Operation Cancelled\");\n return false;\n }\n Order o = tOrders.get(tableNo);\n double total = printOrderDetails(o);\n System.out.println();\n System.out.println(\"Payment Mode\");\n System.out.println(\"1) Cash\");\n System.out.println(\"2) NETS\");\n System.out.println(\"3) Debit/Credit Card\");\n System.out.println(\"4) EZ-Link\");\n System.out.println(\"0) Cancel\");\n int choice = ScannerHelper.getIntegerInput(\"Select Payment Mode (0 to cancel): \", -1, 5);\n double paid;\n Invoice.PaymentType paymentType;\n switch (choice) {\n case 1:\n paid = requestCashPayment(total);\n paymentType = Invoice.PaymentType.PAYMENT_CASH;\n break;\n case 2:\n paymentType = Invoice.PaymentType.PAYMENT_NETS;\n paid = total; // All card payments are presumed paid fully\n break;\n case 3:\n paymentType = Invoice.PaymentType.PAYMENT_CARD;\n paid = total; // All card payments are presumed paid fully\n break;\n case 4:\n paymentType = Invoice.PaymentType.PAYMENT_EZLINK;\n paid = total; // All card payments are presumed paid fully\n break;\n case 0:\n System.out.println(\"Operation Cancelled\");\n return false;\n default:\n throw new MenuChoiceInvalidException(\"Checkout Payment\");\n }\n System.out.println(\"Payment Complete! Payment Mode: \" + paymentType.toString());\n if (paymentType == Invoice.PaymentType.PAYMENT_CASH) {\n System.out.println(\"Change: $\" + String.format(\"%.2f\", (paid - total)));\n }\n\n System.out.println(\"Generating Receipt...\");\n o.markPaid();\n OrderMenuUI.incompleteOrders.remove(o);\n ArrayList<String> receipt = generateReceipt(o, total, paid, paymentType);\n System.out.println();\n receipt.forEach(System.out::println);\n String receiptName = \"-\";\n if (writeReceipt(receipt, o.getOrderID())) {\n receiptName = o.getOrderID() + \".txt\";\n }\n Invoice i = new Invoice(o, receiptName, paymentType, total, paid);\n MainApp.invoices.add(i);\n System.out.println(\"\\n\");\n System.out.println(\"Returning to Main Menu...\");\n return true;\n }",
"public void saveOrder(Order order) {\n Client client = clientService.findBySecurityNumber(order.getClient().getSecurityNumber());\n Product product = productService.findByBarcode(order.getProduct().getBarcode());\n order.setClient(client);\n order.setProduct(product);\n if (isClientPresent(order) && isProductPresent(order)) {\n do {\n currencies = parseCurrencies();\n } while (currencies.isEmpty());\n\n generateTransactionDate(order);\n\n// Client client = ClientServiceImpl.getClientRepresentationMap().get(order.getClient());\n// Product product = ProductServiceImpl.getProductRepresentationMap().get(order.getProduct());\n convertPrice(order);\n orders.add(order);\n orderedClients.add(client);\n orderedProducts.add(product);\n }\n }",
"public void payForOrder(){\n\t\tcurrentOrder.setDate(new Date()); // setting date to current\n\t\t\n\t\t//Checking if tendered money is enough to pay for the order.\n\t\tfor(;;){\n\t\t\tJOptionPane.showMessageDialog(this.getParent(), new CheckoutPanel(currentOrder), \"\", JOptionPane.PLAIN_MESSAGE);\n\t\t\tif(currentOrder.getTendered().compareTo(currentOrder.getSubtotal())==-1){\n\t\t\t\tJOptionPane.showMessageDialog(this.getParent(), \"Not enough money tendered\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t//Setting order number.\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyyMMdd\");\n\t\tString str = df.format(currentOrder.getDate());\n\t\tString number = Integer.toString(till.getOrders().size()+1) +\"/\"+str;\n\t\tcurrentOrder.setNumber(number);\n\t\t\n\t\t//Setting customer name.\n\t\tcurrentOrder.setCustomerName(custNameField.getText());\n\t\t\n\t\t//Adding current order to orders list.\n\t\ttill.getOrders().add(currentOrder); \n\t\t\n\t\t//Displays the receipt.\n\t\tJOptionPane.showMessageDialog(this.getParent(), new ReceiptPanel(currentOrder), \"Receipt\", \n\t\t\t\tJOptionPane.PLAIN_MESSAGE);\n\t\t\n\t\t//Resets OrderPanel.\n\t\tthis.resetOrder();\n\t}",
"void paymentOrder(long orderId);",
"public void createOrder() throws FlooringDaoException {\n boolean validData = true;\n do {\n try {\n Order newOrder = view.getNewOrderInfo();\n service.createOrder(newOrder);\n validData = true;\n } catch (InvalidDataException ex) {\n view.displayError(ex.getMessage());\n validData = false;\n } catch (NumberFormatException ex) {\n view.displayError(\"Area must consist of digits 0-9 with or without a decimal point.\");\n validData = false;\n }\n } while (!validData);\n }",
"public void create(Order order) {\n\t\torderDao.create(order);\n\t}",
"@Test (priority = 3)\n\t@Then(\"^Create Order$\")\n\tpublic void create_Order() throws Throwable {\n\t\tCommonFunctions.clickButton(\"wlnk_Home\", \"Sheet1\", \"Home\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WLNK_OrderNewServices\", \"Sheet1\", \"Oreder New Service\", \"CLICK\");\n\t\t//Thread.sleep(3000);\n\t\tCommonFunctions.clickButton(\"WRD_complete\", \"Sheet1\", \"Complete\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WLK_continue\", \"Sheet1\", \"Contine\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WCB_Additional\", \"Sheet1\", \"Additional\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WLK_continue\", \"Sheet1\", \"Complete\", \"CLICK\");\n\t\tCommonFunctions.clickButton(\"WBT_checkout\", \"Sheet1\", \"Checkout\", \"CLICK\");\n\t\tCommonFunctions.clickButton(\"WBT_completeOrder\", \"Sheet1\", \"complete order\", \"CLICK\");\n\t\tCommonFunctions.clickButton(\"WBT_PayNow\", \"Sheet1\", \"Pay Now\", \"CLICK\");\n\t\tCommonFunctions.checkObjectExist(\"WBT_PayPal\", \"Sheet1\", \"Pay pal\", \"NO\");\n\t\tCommonFunctions.clickButton(\"WBT_PayPal\", \"Sheet1\", \"Pay pal\", \"CLICK\");\n\t}",
"@Override\r\n\tpublic Order create(Order order) {\r\n\t\ttry (Connection connection = JDBCUtils.getInstance().getConnection();\r\n\t\t\t\tStatement statement = connection.createStatement();) {\r\n\t\t\tstatement.executeUpdate(String.format(\"INSERT INTO orders(customer_id) values(%d)\",\r\n\t\t\t\t\torder.getCustomer().getId()));\r\n\t\t\t\tHashMap<Item, Long> items = order.getItems();\r\n\t\t\t\tfor (Entry<Item, Long> entry : items.entrySet()) {\r\n\t\t\t\t\tstatement.executeUpdate(String.format(\"INSERT INTO orders_items(order_id, item_id, quantity) \"\r\n\t\t\t\t\t\t\t+ \"values(last_insert_id(), %d, %d)\", entry.getKey().getId(), entry.getValue()));\r\n\t\t\t\t}\r\n\t\t\treturn readLatest();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLOGGER.debug(e);\r\n\t\t\tLOGGER.error(e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public void createOrderInSession(HttpServletRequest request, HttpServletResponse response) {\n\t\tOrder order = new Order();\n\t\tSet<CartItem> orderLines = new HashSet<>();\n\t\tShoppingCart cart = new ShoppingCart();\n\t\tcart.setOrder(order);\n\t\tcart.setOrderLines(orderLines);\n\t\trequest.getSession().setAttribute(\"shoppingCart\", cart);\n\t}",
"@RequestMapping(value =\"/customer/buy_now\", method = RequestMethod.POST)\n public String initiateOrder(@RequestParam(\"pcode\") String code,Order order, ModelMap model) {\n logger.info(\"*** OrderController - initiateOrder ***\");\n String username = \"BookMan\";\n Product product = productService.getProduct(code);\n order.setProduct(product);\n order.setStatus(\"initiated\");\n order.setCustomerName(username);\n order.setOrderDate(new Date());\n order.setBill(order.getQuantity()*product.getPrice());\n Order orderInserted = orderService.newOrder(order);\n model.addAttribute(\"order\",orderInserted);\n return \"customer_shipping_details\";\n }",
"void prepareOrder(int orderId);",
"public Order(String orderID, String tireID, String status) {\n this.orderID = orderID;\n this.customerID = tireID;\n this.status = status;\n }",
"public static simpleordermodule.proxies.Order initialize(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixObject mendixObject)\r\n\t{\r\n\t\treturn new simpleordermodule.proxies.Order(context, mendixObject);\r\n\t}",
"public Order(int custID)\r\n\t{\r\n\t\tcustomerID = custID;\r\n\t\torderItemList = new ArrayList();\r\n\t\torderID = 0;\r\n\t\torderTotal = 0;\r\n\t}",
"@Test(dependsOnMethods = \"checkSiteVersion\")\n public void createNewOrder() {\n actions.openRandomProduct();\n\n // save product parameters\n actions.saveProductParameters();\n\n // add product to Cart and validate product information in the Cart\n actions.addToCart();\n actions.goToCart();\n actions.validateProductInfo();\n\n // proceed to order creation, fill required information\n actions.proceedToOrderCreation();\n\n // place new order and validate order summary\n\n // check updated In Stock value\n }",
"private void createIPOOrder(final OrderBO completedOrder)\n\t{\n\t\t// YTODO Auto-generated method stub\n\t\tfinal FMIPOOrderModel order = getmodelService().create(FMIPOOrderModel.class);\n\t\torder.setCode(completedOrder.getMstrOrdNbr().trim());\n\t\torder.setBilltoparty(getAccountByNabs(completedOrder.getBillToAcct().getAccountCode()));\n\t\torder.setShiptoparty(getAccountByNabs(completedOrder.getShipToAcct().getAccountCode()));\n\t\torder.setPONumber(completedOrder.getCustPoNbr());\n\t\torder.setOrdercomments(completedOrder.getComment1() + completedOrder.getComment2() + completedOrder.getComment3());\n\t\torder.setUserFirstName(\"IPO USER\");\n\t\tgetmodelService().save(order);\n\t\tcreateIPOOrderEntry(order, completedOrder.getItemList());\n\t}",
"public Order() {\n\t\tthis.orderID = DataHolder.getInstance().getLastOrderId() + 1;\n\t\tthis.dateOrdered = new Date();\n\t\tthis.dateFilled = null;\n\t\tthis.projectedDate = addDays(dateOrdered,1);\n\t}",
"public Map<String, String> createOrder(boolean debug) throws IOException {\n Map<String, String> map = new HashMap<>();\n OrdersCreateRequest request = new OrdersCreateRequest();\n request.prefer(\"return=representation\");\n request.requestBody(buildRequestBody());\n //3. Call PayPal to set up a transaction\n HttpResponse<Order> response = client().execute(request);\n System.out.println(\"Response: \" + response.toString());\n // if (true) {\n if (response.statusCode() == 201) {\n System.out.println(\"Status Code: \" + response.statusCode());\n System.out.println(\"Status: \" + response.result().status());\n System.out.println(\"Order ID: \" + response.result().id());\n System.out.println(\"Intent: \" + response.result().intent());\n System.out.println(\"Links: \");\n for (LinkDescription link : response.result().links()) {\n System.out.println(\"\\t\" + link.rel() + \": \" + link.href() + \"\\tCall Type: \" + link.method());\n }\n System.out.println(\"Total Amount: \" + response.result().purchaseUnits().get(0).amount().currencyCode()\n + \" \" + response.result().purchaseUnits().get(0).amount().value());\n\n\n map.put(\"statusCode\" , response.statusCode()+\"\");\n map.put(\"status\" , response.result().status());\n map.put(\"orderID\" , response.result().id());\n\n //return response.result().id();\n } else {\n System.out.println(\"Response: \" + response.toString());\n map.put(\"Reponse\",response.toString());\n //return response.toString();\n }\n\n return map;\n //}\n }",
"public Order(int _orderId){\n this.orderId = _orderId;\n }",
"public Order(OrderState status, String observations, Costumer owner, Employee employeeInCharge, List<Meal> meals, ObjectState enabled) {\n\t\tthis.status = status;\n\t\tthis.observations = observations;\n\t\tthis.owner = owner;\n\t\tthis.employeeInCharge = employeeInCharge;\n\t\tthis.meals = meals;\n\t\tcode = generateCode();\n\t\tdate = takeDate();\n\t\tthis.enabled = enabled;\n\t\tstatusNum = 1;\n\t\t//addMealsToEmp();\t\t\n\t}",
"void pay(Order order);",
"public Order(Long order_id, boolean generateNumber) {\n this.order_id = order_id;\n if (generateNumber) {\n this.order_no = this.generateOrderNumber();\n }\n }",
"public Order() {\n\t\tsuper();\n\t\tcurrentOrder += 1;\n\t\torderNumber = currentOrder;\n\t\tthis.orderPrice.setScale(2, BigDecimal.ROUND_HALF_EVEN);\n\t}",
"@Override\n @Transactional\n public OrderDTO createOrder(OrderDTO orderDTO) {\n\n String orderId = KeyUtil.genUniqueKey();\n BigDecimal orderAmount = new BigDecimal(BigInteger.ZERO);\n// List<CartDTO> cartDTOList = new ArrayList<>();\n //1.\n for (OrderDetail orderDetail : orderDTO.getOrderDetailList()) {\n ProductInfo productInfo = productInfoService.findOne(orderDetail.getProductId());\n if (productInfo == null) {\n throw new ProjectException(ResultEnum.PRODUCT_NOT_EXIST);\n }\n\n //2.\n orderAmount = productInfo.getProductPrice()\n .multiply(new BigDecimal(orderDetail.getProductQuantity()))\n .add(orderAmount);\n //3. orderDetail db insertion\n orderDetail.setDetailId(KeyUtil.genUniqueKey());\n orderDetail.setOrderId(orderId);\n BeanUtils.copyProperties(productInfo, orderDetail);\n orderDetailRepository.save(orderDetail);\n// CartDTO cartDTO = new CartDTO(orderDetail.getProductId(), orderDetail.getProductQuantity());\n// cartDTOList.add(cartDTO);\n }\n\n //3. orderMaster\n OrderMaster orderMaster = new OrderMaster();\n orderDTO.setOrderId(orderId);\n BeanUtils.copyProperties(orderDTO, orderMaster);\n orderMaster.setOrderAmount(orderAmount);\n orderMaster.setOrderStatus(OrderStatusEnum.NEW.getCode());\n orderMaster.setPayStatus(PayStatusEnum.WAIT.getCode());\n orderMasterRepository.save(orderMaster);\n\n //4.\n List<CartDTO> cartDTOList = orderDTO.getOrderDetailList().stream().map(e ->\n new CartDTO(e.getProductId(), e.getProductQuantity())\n ).collect(Collectors.toList());\n\n productInfoService.decreaseInventory(cartDTOList);\n\n return orderDTO;\n }",
"public Order create(Order order) {\n\t\tthis.orderRepository.save(order);\n\t\tfor (Product product : order.getProducts()) {\n\t\t\tproduct.setOrder(order);\n\t\t\tthis.productService.create(product);\n\t\t}\n\t\treturn order;\n\t}",
"public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}",
"public Checkout() {}",
"@PostMapping(\"/add-order\")\n\tpublic ResponseEntity<Object> insertOrder(@RequestBody Order order) {\n\t\tLOGGER.info(\"add-Order URL is opened\");\n\t\tLOGGER.info(\"addOrder() is initiated\");\n\t\tOrderDTO orderDTO = null;\n\t\tResponseEntity<Object> orderResponse = null;\n\t\torderDTO = orderService.addOrder(order);\n\t\torderResponse = new ResponseEntity<>(orderDTO, HttpStatus.ACCEPTED);\n\t\tLOGGER.info(\"addOrder() has executed\");\n\t\treturn orderResponse;\n\t}",
"Receipt chargeOrder(PizzaOrder order, CreditCard creditCard);",
"public FlightOrder(Flight flight, Order order) {\n\t\tsuper();\n\t\tthis.flight = flight;\n\t\tthis.order = order;\n\t\tthis.tickets = new HashSet<FlightTicket>();\n\t}",
"@RequestMapping(path=\"/checkout/{order_id}/{idMagazine}\", method = RequestMethod.POST, produces = \"application/json\", consumes = \"application/json\")\n\tpublic ResponseEntity<Object> checkout(@PathVariable Integer order_id, @PathVariable Long idMagazine) { \n\t\tlogger.info(\"Init checkout\");\n\t\t\n\t\tCheckoutResponseDTO checkoutDTO = new CheckoutResponseDTO();\n\t\t\n\t\tSellerBitcoinInfo sbi = bitcoinRepo.findByidMagazine(idMagazine);\n\t\t\n\t\tSystem.out.println(\"ADDRESS \" + sbi.getBitcoinAddress());\n\t\t\n\t\tString token = sbi.getBitcoinAddress();\n\t\t\n\t\tString authToken = \"Bearer \" + token;\n\t\t//trebali bismo da kreiramo transakciju koja ce biti u stanju \"pending\" sve dok korisnik ne plati ili mu ne istekne odredjeno vreme\n\t\t\n\t\t//txRepo.save(tx);\n\t\t//RestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\t//restTemplate.getForEntity(\"https://google.rs\", String.class);\n\t\t//restTemplate.getForEntity(\"https://api.coingate.com/v2/ping\", String.class);\n\t\t\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.add(\"Authorization\", authToken);\t \n\t\t\n\t\tResponseEntity<Object> responseEntity = new RestTemplate().exchange(\"https://api-sandbox.coingate.com/v2/orders\" + Integer.toString(order_id), HttpMethod.POST,\n\t\t\t\tnew HttpEntity<Object>(checkoutDTO, headers), Object.class);\n\t\t\n\t\tlogger.info(responseEntity.getBody().toString());\n\t\t\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tmapper.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);\n\t\tCheckoutResponseDTO btcResponse = new CheckoutResponseDTO();\n\n\t\tbtcResponse = mapper.convertValue(responseEntity.getBody(), CheckoutResponseDTO.class);\n\t\t\n\t\tString paymentUrl = btcResponse.getPayment_url();\n\t\t\n\t\tlogger.info(paymentUrl);\n\t\t\n\t\t\n\t\t//BitCoinResponseDTO response = parser.parseList(responseEntity.getBody().toString());\n\t\t\n\t\t//BitCoinResponseDTO responseDTO = responseEntity.;\n\t\t\n\t\t//String pageToRedirec = responseDTO.getPayment_url();\n\t\t\n\t\t//restTemplate.exchange\n\t\t//ResponseEntity<String> response = restTemplate.postForEntity(\"https://api-sandbox.coingate.com/v2/orders\", btcDTO, String.class);\n\t\t\n\t\treturn new ResponseEntity<Object>(responseEntity,HttpStatus.OK);\n\t}",
"public void startPayment() {\n double ruppes = Double.parseDouble(price);\n final Activity activity = this;\n final Checkout co = new Checkout();\n try {\n JSONObject options = new JSONObject();\n options.put(\"name\", getResources().getString(R.string.application_name));\n options.put(\"description\", \"\");\n //You can omit the image option to fetch the image from dashboard\n options.put(\"image\", getResources().getDrawable(R.mipmap.ic_app_logo));\n options.put(\"currency\", \"INR\");\n options.put(\"amount\", ruppes * 100);\n JSONObject preFill = new JSONObject();\n preFill.put(\"email\", \"[email protected]\");\n preFill.put(\"contact\", \"8758689113\");\n options.put(\"prefill\", preFill);\n co.open(activity, options);\n } catch (Exception e) {\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\n .show();\n e.printStackTrace();\n }\n }",
"@Test\n public void testValidateNewOrderState() throws Exception {\n\n Order order3 = new Order(\"003\");\n order3.setCustomerName(\"Paul\");\n order3.setState(\"Ky\");\n order3.setTaxRate(new BigDecimal(\"6.75\"));\n order3.setArea(new BigDecimal(\"5.00\"));\n order3.setOrderDate(\"Date_Folder_Orders/Orders_06232017.txt\");\n order3.setProductName(\"tile\");\n order3.setMatCostSqFt(new BigDecimal(\"5.50\"));\n order3.setLaborCostSqFt(new BigDecimal(\"6.00\"));\n order3.setMatCost(new BigDecimal(\"50.00\"));\n order3.setLaborCost(new BigDecimal(\"500.00\"));\n order3.setOrderTax(new BigDecimal(\"50.00\"));\n order3.setTotalOrderCost(new BigDecimal(\"30000.00\"));\n\n assertEquals(true, service.validateNewOrderState(order3));\n }",
"@Override\n public boolean createPurchaseOrder(PurchaseOrderBean purchaseorder) {\n purchaseorder.setGendate(C_Util_Date.generateDate());\n return in_purchaseorderdao.createPurchaseOrder(purchaseorder);\n }",
"@Test\n public void testCreatePurchaseOrder() throws Exception {\n System.out.println(\"createPurchaseOrder\");\n Long factoryId = 1L;\n Long contractId = 2L;\n Double purchaseAmount = 4D;\n Long storeId = 2L;\n String destination = \"store\";\n Calendar deliveryDate = Calendar.getInstance();\n deliveryDate.set(2015, 0, 13);\n Boolean isManual = false;\n Boolean isToStore = true;\n PurchaseOrderEntity result = PurchaseOrderManagementModule.createPurchaseOrder(factoryId, contractId, purchaseAmount, storeId, destination, deliveryDate, isManual, isToStore);\n assertNotNull(result);\n }",
"public Order(JSONObject jsonObject) {\n\t\tmealId = jsonObject.getInt(\"meal\");\n\t\tbookingId = jsonObject.getInt(\"booking\");\n\t}",
"public Order() {\n }",
"@RequestMapping(value =\"/customer/place_order\", method = RequestMethod.POST)\n public String placeOrder(ModelMap model, Order order, @RequestParam(\"code\") String code) {\n logger.info(\"*** OrderController - placeOrder ***\");\n Product product = productService.getProduct(code);\n order.setProduct(product);\n order.setStatus(\"completed\");\n order.setOrderDate(new Date());\n Order completedOrder = orderService.placeOrder(order);\n if(!completedOrder.equals(null)){\n productService.updateInventory(product,order.getQuantity());\n }\n model.addAttribute(\"completedOrder\", completedOrder);\n return \"success\";\n }",
"public Order(int orderID, int customerID, Date orderDate) {\n this(orderID, customerID, orderDate, null);\n }",
"protected Order(String custFName, String custLName, String custEmail, int orderID,\n Timestamp creationDate, double totalDue, String status, String salesFName,\n String salesLName,\n String salesEmail) {\n this.custFName = custFName;\n this.custLName = custLName;\n this.custEmail = custEmail;\n this.orderID = orderID;\n this.creationDate = creationDate;\n this.totalDue = totalDue;\n this.status = status;\n this.salesFName = salesFName;\n this.salesLName = salesLName;\n this.salesEmail = salesEmail;\n products = new ArrayList<>();\n }",
"@Override\n\tpublic void createOrder(OrderDto orderDto) {\n\t\tModelMapper modelMapper = new ModelMapper();\n\t\t\n\t\tmodelMapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT);\n\t\t\n\t\tOrderEntity orderEntity = new OrderEntity();\n\t\t//\t\t= modelMapper.map(orderDto, OrderEntity.class);\n\t\t\n\t\t\n\t\torderEntity.setCustomerName(orderDto.getCustomer().getName());\n\t\torderEntity.setEmail(orderDto.getCustomer().getEmail());\n\t\torderEntity.setProductName(orderDto.getProduct().getName());\n\t\torderEntity.setDescription(orderDto.getProduct().getDescription());\n\t\torderEntity.setAmount(orderDto.getAmount());\n\t\torderEntity.setoId(orderDto.getoId());\n\t\torderRepository.save(orderEntity);\n\t\t\t\t\n\t}",
"public static Order createOrder() {\n OrderFactory orderFactory;\n Cuisine cuisine = ORDERING_FACADE.askForCuisine(); // choosing cuisine\n Meal mealType = ORDERING_FACADE.askForMealType(); // choosing meal type\n if (mealType.equals(Meal.LUNCH)) { // setting factory for meal choosen\n orderFactory = LUNCH_FACTORY;\n \n } else {\n orderFactory = DRINK_FACTORY;\n \n }\n return orderFactory.createOrder(cuisine); // creating and returning concrete meal order\n }",
"public Long placeOrderInCart(Business business, CheckIn checkIn, OrderDTO orderData) {\n\t\tcheckNotNull(business, \"business was null\");\n\t\tcheckNotNull(checkIn, \"checkIn was null\");\n\t\t\n\t\tif(business.isBasic()) {\n\t\t\tlogger.error(\"Unable to place order at business with basic subscription.\");\n\t\t\tthrow new IllegalAccessException(\"Unable to place Orders at Business with basic subscription\");\n\t\t}\n\t\t\n\t\tif(checkIn.getStatus() != CheckInStatus.CHECKEDIN && checkIn.getStatus() != CheckInStatus.ORDER_PLACED) {\n\t\t\tthrow new OrderFailureException(\"Order cannot be placed, payment already requested or not checked in\");\n\t\t}\n\t\t\n\t\tif( orderData.getStatus() != OrderStatus.CART ) {\n\t\t\tthrow new OrderFailureException(\"Order cannot be placed, unexpected order status: \"+orderData.getStatus());\n\t\t}\n\n\t\t// Check that the order will be placed at the correct business.\n\t\tif(business.getId() != checkIn.getBusiness().getId()) {\n\t\t\tthrow new ValidationException(\"Order cannot be placed, checkin is not at the same business to which the order was sent: id=\"+checkIn.getBusiness().getId());\n\t\t}\n\t\t\n\t\tArea area = areaRepo.getByKey(checkIn.getArea());\n\t\tif(area.isWelcome()) {\n\t\t\tlogger.error(\"Unable to place order at welcome area.\");\n\t\t\tthrow new IllegalAccessException(\"Unable to place Orders at welcome area.\");\n\t\t}\n\t\t\n\t\t// Check if the product to be ordered exists\t\n\t\tProduct product;\n\t\ttry {\n\t\t\tproduct = productRepo.getById(checkIn.getBusiness(), orderData.getProductId());\n\t\t} catch (com.googlecode.objectify.NotFoundException e) {\n\t\t\tlogger.error(\"Unable to place order: Unknown productId={}\", orderData.getProductId());\n\t\t\tthrow new ValidationException(\"Order cannot be placed, productId unknown\",e);\n\t\t}\n\t\t\n\t\tif(product.isNoOrder()) {\n\t\t\tlogger.error(\"Unable to place order for Product, noOrder=true. id={}\", product.getId());\n\t\t\tthrow new ValidationException(\"Order cannot be placed, product can't be ordered.\");\n\t\t}\n\t\t\n\t\tboolean isProductAssignedToArea = false;\n\t\t\n\t\t// Check if the Menu of the ordered Product is assigned to this Area.\n\t\tfor (Key<Menu> menuKey : area.getMenus()) {\n\t\t\tif(menuKey.equals(product.getMenu())) {\n\t\t\t\tisProductAssignedToArea = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!isProductAssignedToArea) {\n\t\t\tlogger.error(ERROR_PRODUCT_NOT_FROM_AREA);\n\t\t\tthrow new ValidationException(ERROR_PRODUCT_NOT_FROM_AREA);\n\t\t}\n\t\t\n\t\tLong orderId = null;\n\t\tList<OrderChoice> choices = null;\n\t\tif(orderData.getChoices() != null\n\t\t\t\t&& !orderData.getChoices().isEmpty()) {\n\t\t\t\n\t\t\tif(product.getChoices() == null || product.getChoices().isEmpty()) {\n\t\t\t\t// The product did not contain any choices any more, but the client sent some.\n\t\t\t\t// That can only mean the choice was removed from the product by the business and a checkin was added.\n\t\t\t\tthrow new DataConflictException(\"Conflict while placing order, refresh resource.\");\n\t\t\t}\n\t\t\t\n\t\t\tchoices = new ArrayList<OrderChoice>();\n\t\t\tMap<Key<Choice>, Choice> originalChoiceMap = choiceRepo.getByKeysAsMap(product.getChoices());\n\t\t\t\n\t\t\tfor (ChoiceDTO choiceDto : orderData.getChoices()) {\n\t\t\t\tint selected = 0;\n\t\t\t\t\n\t\t\t\tOrderChoice choice = new OrderChoice();\n\t\t\t\t\n\t\t\t\tChoice originalChoice = originalChoiceMap.get(Choice.getKey(business.getKey(), choiceDto.getOriginalChoiceId()));\n\t\t\t\tif(originalChoice == null)\n\t\t\t\t\tthrow new DataConflictException(\"Conflict while placing order, unknown originalChoiceId \" + choiceDto.getOriginalChoiceId() + \". Reload product resource.\");\n\t\t\t\t\n\t\t\t\tif(choiceDto.getOptions() != null ) {\n\t\t\t\t\tselected = checkOptions(choiceDto, originalChoice);\n\t\t\t\t\t\n\t\t\t\t\toriginalChoice.setOptions(new ArrayList<ProductOption>(choiceDto.getOptions()));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tchoice.setChoice(originalChoice);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tchoices.add(choice);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\n\t\tKey<Order> orderKey = createAndSaveOrder(business.getKey(), checkIn.getKey(), product, orderData.getAmount(), choices, orderData.getComment());\n\t\tif(orderKey != null) {\n\t\t\t// order successfully saved\n\t\t\torderId = orderKey.getId();\n\t\t}\n\t\t\n\t\teventBus.post(new CheckInActivityEvent(checkIn, true));\n\t\t\n\t\treturn orderId;\n\t}",
"@Test\n\tpublic void createOrderTest() {\n\t\ttry {\n\t\t\tassertNull(salesOrderCtrl.getOrder());\n\t\t\tsalesOrderCtrl.createSalesOrder();\n\t\t\tassertNotNull(salesOrderCtrl.getOrder());\n\t\t} catch (Exception e) {\n\t\t\te.getMessage();\n\t\t}\n\t}",
"public Order() {\n\t}",
"public CreateOrderRequest() {\n\t\t_pcs = new PropertyChangeSupport(this);\n\t}",
"public Order(Builder builder) {\r\n this.id = builder.id;\r\n this.orderDate = builder.orderDate;\r\n //this.orderLine = builder.orderLine;\r\n }",
"private Order convertOrderElemeToOrderObj04(ISqlAdapter adapter, String orderId) throws HitspException {\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\");\r\n DataTable dtOrderEleme = getOrderElemeInfo(adapter, orderId);\r\n if (dtOrderEleme == null || dtOrderEleme.size() == 0) {\r\n return null;\r\n }\r\n\r\n Order order = new Order();\r\n if (!Converter.toBoolean(dtOrderEleme.get(0, \"book\"))) {\r\n //若该订单非预订单\r\n order.setDeliverTime(null);\r\n } else {\r\n //若该订单为预订单\r\n formatter.setTimeZone(TimeZone.getTimeZone(\"GMT+8\"));\r\n// Date b = formatter.parse(a);\r\n// order.setDeliverTime(Converter.toDate(dtOrderEleme.get(0, \"deliverTime\")));\r\n try {\r\n order.setDeliverTime(formatter.parse(dtOrderEleme.get(0, \"deliverTime\")));\r\n } catch (ParseException e) {\r\n logger.error(\"预计送达时间处理错误\");\r\n }\r\n }\r\n order.setOrderId(dtOrderEleme.get(0, \"orderId\"));\r\n order.setId(Converter.toLong(orderId));\r\n\r\n String udate = dtOrderEleme.get(0, \"activeAt\");\r\n String cdate = dtOrderEleme.get(0, \"createdAt\");\r\n try {\r\n Date uDate = df.parse(udate);\r\n Date cDate = df.parse(cdate);\r\n order.setGmtCreate(cDate);\r\n order.setGmtModify(uDate);\r\n } catch (ParseException e) {\r\n logger.error(\"下单时间处理错误\");\r\n }\r\n\r\n order.setOrderFrom(\"15\");\r\n order.setTotalPrice(Converter.toBigDecimal(dtOrderEleme.get(0, \"totalPrice\")));\r\n order.setOriginalPrice(Converter.toBigDecimal(dtOrderEleme.get(0, \"originalPrice\")));\r\n order.setStatus(\"0\");\r\n String elemeShopId = dtOrderEleme.get(0, \"shopId\");\r\n DataTable dtShop = getShopInfoByElemeShopId(adapter, elemeShopId);\r\n if (dtShop == null || dtShop.size() == 0) {\r\n logger.error(\"饿了么({})门店不存在\", elemeShopId);\r\n return null;\r\n }\r\n\r\n order.setShopId(dtShop.get(0, \"id\"));\r\n order.setShopName(dtShop.get(0, \"name\"));\r\n// order.setShopAddress(dtOrderEleme.get(0, \"address\"));\r\n order.setShopAddress(\"\");//饿了么推送订单中无门店地址,暂置为空\r\n order.setShopPhone(null);\r\n order.setRecipientName(dtOrderEleme.get(0, \"consignee\"));\r\n order.setRecipientAddress(dtOrderEleme.get(0, \"deliveryPoiAddress\"));\r\n\r\n StringBuilder phones = new StringBuilder();\r\n JSONArray phoneList = JSON.parseArray(dtOrderEleme.get(0, \"phoneList\"));\r\n if (phoneList != null) {\r\n for (int i = 0; i < phoneList.size(); i++) {\r\n String phone = phoneList.getString(i);\r\n if (i != 0) {\r\n phones.append(\";\");\r\n }\r\n phones.append(phone);\r\n }\r\n }\r\n order.setRecipientPhone(phones.toString());\r\n\r\n order.setRecipientLongitude(Converter.toBigDecimal(dtOrderEleme.get(0, \"deliveryGeo\").split(\",\")[0]));\r\n order.setRecipientLatitude(Converter.toBigDecimal(dtOrderEleme.get(0, \"deliveryGeo\").split(\",\")[1]));\r\n order.setShippingType(\"10\");\r\n order.setShippingFee(dtOrderEleme.get(0, \"deliverFee\") == null ? BigDecimal.valueOf(0) : Converter.toBigDecimal(dtOrderEleme.get(0, \"deliverFee\")));\r\n order.setShipperName(null);\r\n order.setShipperPhone(null);\r\n order.setHasInvoiced(Converter.toBoolean(dtOrderEleme.get(0, \"invoiced\")));\r\n order.setInvoiceTitle(dtOrderEleme.get(0, \"invoice\"));\r\n order.setPackageFee(Converter.toBigDecimal(dtOrderEleme.get(0, \"packageFee\")));\r\n order.setPayType(Converter.toBoolean(dtOrderEleme.get(0, \"onlinePaid\")) == false ? \"1\" : \"2\");\r\n order.setCaution(dtOrderEleme.get(0, \"description\"));\r\n order.setRemark(\"\");\r\n BigDecimal shopPart = Converter.toBigDecimal(dtOrderEleme.get(0, \"shopPart\"));\r\n if (shopPart.signum() == -1) {\r\n shopPart = shopPart.abs();\r\n }\r\n order.setShopPart(shopPart);\r\n order.setShopIncome(Converter.toBigDecimal(dtOrderEleme.get(0, \"income\")));\r\n BigDecimal serviceFee = Converter.toBigDecimal(dtOrderEleme.get(0, \"serviceFee\"));\r\n if (serviceFee.signum() == -1) {\r\n serviceFee = serviceFee.abs();\r\n }\r\n order.setServiceFee(serviceFee);\r\n// List<OrderDetail> detailList = convertOrderElemeToOrderDetailList(adapter, dtOrderEleme);\r\n List<OrderDetail> detailList = convertOrderElemeToOrderDetailList04(adapter, dtOrderEleme, dtShop.get(0, \"id\"));\r\n order.setDetail(detailList);\r\n return order;\r\n }",
"@PostMapping(value = \"/{customerRefId}\"\n\t\t\t+ AppConstants.ORDER_API, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)\n\t/*\n\t * @ApiOperation(value = \"Order created according to the sent specification\",\n\t * notes =\n\t * \"Send POST request to create the order according to the specification.\" ,\n\t * httpMethod = \"GET\", code = 200, response = OrderResponse.class, produces =\n\t * MediaType.APPLICATION_JSON_VALUE)\n\t * \n\t * @ApiResponses(value = {\n\t * \n\t * @ApiResponse(code = 200, response = OrderResponse.class, message =\n\t * \"Created order\"),\n\t * \n\t * @ApiResponse(code = 401, response = ErrorResponse.class, message =\n\t * \"Invalid or expired token provided. Error code: CREDENTIALS_REJECTED\"),\n\t * \n\t * @ApiResponse(code = 500, response = ErrorResponse.class, message =\n\t * \"Runtime server error occurred. Error code: SERVER_ERROR\")})\n\t */\n\tpublic OrderResponse createOrder(\n\t\t\t@NotBlank @PathVariable(name = \"customerRefId\", required = true) String customerRefId,\n\t\t\t@Valid @RequestBody OrderRequest orderRequest, BindingResult result, Model m)\n\t\t\tthrows BadRequestException, InsufficientPermissionsException {\n\t\tlog.info(\"hit the controller\");\n\t\tif (result.hasErrors()) {\n\t\t\tlog.info(\"not able to handle error\");\n\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\tresult.getAllErrors().forEach(error -> builder.append(error.toString()));\n\t\t\tthrow new BadRequestException(\"BAD_REQUEST\", builder.toString());\n\t\t}\n\t\tlog.info(\"orderService doesn't create order\");\n\t\treturn orderService.createOrder(orderRequest, customerRefId);\n\t}",
"public TaskOrder(TaskOrderDetails details){\n\t\tthis.details = details;\n\t}",
"void createOrder(List<Product> products, Customer customer);",
"@POST(\"orders/new_order/\")\n Call<ApiStatus> createNewOrderByUser(@Body Order myOrder);",
"ShipmentItemBilling createShipmentItemBilling();",
"Order addOrder(String orderId, Order order) throws OrderBookOrderException;",
"public Order(int ordID, int custID)\r\n\t{\r\n\t\tcustomerID = custID;\r\n\t\torderItemList = new ArrayList();\r\n\t\torderID = ordID;\r\n\t\torderTotal = 0;\r\n\t}",
"@Override\n\tpublic boolean createOrderBill(OrderBill orderBill) {\n\t\treturn false;\n\t}",
"@RequestMapping(value = \"/\", method = RequestMethod.POST)\n public ResponseEntity create(@RequestBody Order order)\n {\n throw new NotImplementedException();\n }",
"public static Order buildCartWithOrder(Cart cart, Order order) throws ParseException {\n\n cart.getAddress().save();\n\n order.setProductGroup(cart.getProducts());\n order.addTransactionIdToOrder(cart.getTransactionId(), order);\n order.save();\n for (ProductPriceRow productPriceRow : cart.productPrice) {\n\n addVendorPayment(productPriceRow.getProduct().getGyftyProduct(), order.getObjectId(), productPriceRow);\n addVendorNotes(productPriceRow.getProduct(), order);\n\n }\n\n cart.delete();\n return order;\n\n }",
"@RequestMapping(\"/order/{cartId}\")\r\n public String createOrder(@PathVariable(\"cartId\") int cartId) {\r\n \tSystem.out.println(\"in order\");\r\n \tUserOrder userOrder = new UserOrder();\r\n Cart cart=cartService.getCartById(cartId);\r\n userOrder.setCart(cart);\r\n\r\n UsersDetail usersDetail = cart.getUsersDetail();\r\n userOrder.setUsersDetail(usersDetail);\r\n userOrder.setBillingAddress(usersDetail.getBillingAddress());\r\n //userOrder.setShippingAddress(usersDetail.getShippingAddress());\r\n\r\n orderService.addOrder(userOrder);\r\n\r\n return \"redirect:/checkout?cartId=\"+cartId;\r\n }",
"public int createPurchaseOrder(PurchaseOrder purchaseOrder){\n try {\n session.save(purchaseOrder);\n tx.commit();\n } catch (Exception e) {\n e.printStackTrace();\n tx.rollback();\n return 0 ;\n }\n return 0;\n }",
"public static Order buildCart(Cart cart) {\n\n cart.getAddress().saveInBackground();\n\n final Order order = new Order();\n order.setSchedule(cart.getSchedule());\n order.setAddress(cart.getAddress());\n order.setPickUp(cart.getPickup());\n order.setEvent(cart.getEvent());\n order.setProductGroup(cart.getProducts());\n try {\n order.save();\n System.out.println(order.getObjectId());\n } catch (ParseException e) {\n Log.e(Order.DEFAULT_PIN, \"CartHelper unable to save Order \", e);\n }\n for (Promotion promotion : cart.promotions) {\n promotion.promotionUtilized();\n if (promotion instanceof InvitationPromotion) {\n cart.getUser().setNewUserPromotionUsed();\n }\n }\n\n\n for (ProductPriceRow productPriceRow : cart.productPrice) {\n\n addVendorPayment(productPriceRow.getProduct().getGyftyProduct(), order.getObjectId(), productPriceRow);\n addVendorNotes(productPriceRow.getProduct(), order);\n\n }\n\n/* try {\n cart.delete();\n } catch (ParseException e) {\n Log.e(\"CartHelper\", \"CartHelper unable to delete cart\", e);\n }*/\n return order;\n\n }",
"public MOrder createTransferOrder(Integer newDocTypeID) throws Exception{\n\t\t// Crear el pedido idéntico\n\t\tMOrder newOrder = new MOrder(getCtx(), 0, get_TrxName());\n\t\tMOrder.copyValues(this, newOrder);\n\t\tnewOrder.setC_DocTypeTarget_ID(newDocTypeID);\n\t\tnewOrder.setC_DocType_ID(newDocTypeID);\n\t\t// Intercambiar el depósito y organización origen por destino \n\t\tnewOrder.setAD_Org_ID(getAD_Org_Transfer_ID());\n\t\tnewOrder.setAD_Org_Transfer_ID(getAD_Org_ID());\n\t\tnewOrder.setM_Warehouse_ID(getM_Warehouse_Transfer_ID());\n\t\tnewOrder.setM_Warehouse_Transfer_ID(getM_Warehouse_ID());\n\t\tnewOrder.setRef_Order_ID(getID());\n\t\tnewOrder.setDocStatus(DOCSTATUS_Drafted);\n\t\tnewOrder.setDocAction(DOCACTION_Complete);\n\t\tnewOrder.setProcessed(false);\n\t\t// Guardar\n\t\tif(!newOrder.save()){\n\t\t\tthrow new Exception(CLogger.retrieveErrorAsString());\n\t\t}\n\t\t// Copiar las líneas\n\t\tMOrderLine newOrderLine;\n\t\tBigDecimal pendingQty;\n\t\tfor (MOrderLine orderLine : getLines(true)) {\n\t\t\tnewOrderLine = new MOrderLine(getCtx(), 0, get_TrxName());\n\t\t\tMOrderLine.copyValues(orderLine, newOrderLine);\n\t\t\tpendingQty = orderLine.getQtyOrdered().subtract(orderLine.getQtyDelivered());\n\t\t\t\n\t\t\tnewOrderLine.setC_Order_ID(newOrder.getID());\n\t\t\tnewOrderLine.setQty(pendingQty);\n\t\t\tnewOrderLine.setQtyReserved(BigDecimal.ZERO);\n\t\t\tnewOrderLine.setQtyInvoiced(pendingQty);\n\t\t\tnewOrderLine.setQtyDelivered(BigDecimal.ZERO);\n\t\t\tnewOrderLine.setQtyTransferred(BigDecimal.ZERO);\n\t\t\tnewOrderLine.setPrice(orderLine.getPriceEntered());\n\t\t\tnewOrderLine.setRef_OrderLine_ID(orderLine.getID());\n\t\t\tnewOrderLine.setProcessed(false);\n\t\t\tnewOrderLine.setM_Warehouse_ID(newOrder.getM_Warehouse_ID());\n\t\t\tnewOrderLine.setAD_Org_ID(newOrder.getAD_Org_ID());\n\t\t\tif(!newOrderLine.save()){\n\t\t\t\tthrow new Exception(CLogger.retrieveErrorAsString());\n\t\t\t}\n\t\t}\n\t\treturn newOrder;\n\t}",
"public Order()\r\n\t{\r\n\t\tnew BigDecimal(\"0.0\");\r\n\t\tsubtotal = new BigDecimal(\"0.0\");\r\n\t\tarraySize = 5;\r\n\t\torderSize = 0;\r\n\t\torder = new Drink[arraySize];\r\n\t\tSystem.out.println(\"New Order started!\");\r\n\t}",
"public void orderPo(int pid) throws Exception {\n PoBean po = this.getPoById(pid);\n if (po == null) throw new Exception(\"Purchase Order doesn't exist!\");\n if (po.getStatus() != PoBean.Status.PROCESSED) throw new Exception(\"Invalid Purchase Order Status.\");\n this.setPoStatus(PoBean.Status.ORDERED, pid);\n }",
"@PostMapping(\"/checkout\")\n ResponseEntity<OrderCompletionReport> checkout(@RequestParam int amount,\n @RequestParam(\"crate_size\") CrateSize crateSize) {\n verify(cart);\n\n Order order = new Order();\n transferItems(cart, order, Long.valueOf(crateSize.times(amount)).intValue());\n order.complete();\n repository.save(order);\n cart.clear();\n\n return ResponseEntity.ok(OrderCompletionReport.success(order));\n }",
"public CreateOrderResponse execute(JCoDestination destination) throws JCoException {\n\t\tJCoFunction function = destination.getRepository().getFunction(\"TR40_ORDER_CREATE\"); //$NON-NLS-1$\n\t\tfunction.getImportParameterList().setValue(\"IV_CATEGORY\", category); //$NON-NLS-1$\n\t\tfunction.getImportParameterList().setValue(\"IV_KURZTEXT\", text); //$NON-NLS-1$\n\t\tfunction.getImportParameterList().setValue(\"IV_LAYER\", transportLayer); //$NON-NLS-1$\n\t\tfunction.getImportParameterList().setValue(\"IV_OWNER\", owner); //$NON-NLS-1$\n\t\tfunction.getImportParameterList().setValue(\"IV_CORRECTION\", correctionRequested ? \"X\" : \" \"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n\t\tfunction.getImportParameterList().setValue(\"IV_REPAIR\", repairRequested ? \"X\" : \" \"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n\t\tTaskUserListEntry.toTable(users, function.getTableParameterList().getTable(\"TT_USERLIST\")); //$NON-NLS-1$\n\t\tfunction.execute(destination);\n\t\tCreateOrderResponse response = new CreateOrderResponse();\n\t\tresponse.setOrderID(function.getExportParameterList().getString(\"EV_TRKORR_ORDER\")); //$NON-NLS-1$\n\t\tresponse.setUsers(TaskUserListEntry.fromTable(function.getTableParameterList().getTable(\"TT_USERLIST\"))); //$NON-NLS-1$\n\t\tresponse.setException(function.getExportParameterList().getString(\"EV_EXCEPTION\")); //$NON-NLS-1$\n\t\tresponse.setMessages(TransportMessage.fromTable(function.getTableParameterList().getTable(\"TT_MSG\"))); //$NON-NLS-1$\n\t\treturn response;\n\t}",
"private CustomerOrder addOrder(Customer customer, ShoppingCart cart) {\n CustomerOrder order = new CustomerOrder();\r\n order.setCustomerID(customer);\r\n order.setCustomerOrderAmount(BigDecimal.valueOf(cart.getTotal()));\r\n\r\n // Get current timestamp\r\n Calendar calendar = Calendar.getInstance();\r\n Timestamp currentTimestamp = new java.sql.Timestamp(calendar.getTime().getTime());\r\n order.setCustomerOrderCreated(currentTimestamp);\r\n\r\n // Create confirmation number\r\n Random random = new Random();\r\n int i = random.nextInt(999999999);\r\n order.setCustomerOrderConfirmationNumber(i);\r\n out.print(i);\r\n\r\n // Save order\r\n em.persist(order);\r\n\r\n return order;\r\n }",
"@Then(\"^: proceed to checkout$\")\r\n\tpublic void proceed_to_checkout() throws Throwable {\n\t\tobj.update();\r\n\t}",
"void newOrder();",
"@RequestMapping(value = \"/order\", method = RequestMethod.POST)\n @ResponseStatus(value = HttpStatus.CREATED)\n public OrderViewModel addOrder(@RequestBody @Valid OrderViewModel orderViewModel) {\n return serviceLayer.addOrder(orderViewModel);\n }",
"public void makeComplete(Order order) {}",
"@Test\n public void testPopulateNewOrderInfo() throws Exception {\n\n Order order3 = new Order(\"003\");\n order3.setCustomerName(\"Paul\");\n order3.setState(\"Ky\");\n order3.setTaxRate(new BigDecimal(\"6.75\"));\n order3.setArea(new BigDecimal(\"5.00\"));\n order3.setOrderDate(\"Date_Folder_Orders/Orders_06232017.txt\");\n order3.setProductName(\"tile\");\n order3.setMatCostSqFt(new BigDecimal(\"5.50\"));\n order3.setLaborCostSqFt(new BigDecimal(\"6.00\"));\n order3.setMatCost(new BigDecimal(\"50.00\"));\n order3.setLaborCost(new BigDecimal(\"500.00\"));\n order3.setOrderTax(new BigDecimal(\"50.00\"));\n order3.setTotalOrderCost(new BigDecimal(\"30000.00\"));\n\n Order order4 = service.populateNewOrderInfo(order3);\n\n assertEquals(\"Paul\", order4.getCustomerName());\n }",
"@Test\r\n @Rollback(true)\r\n public void testCreateOrder_ValidOrderRequest() {\r\n System.out.println(\"createOrder\");\r\n String referer = \"\";\r\n OrderRequest orderRequest = new OrderRequest();\r\n BindingResult result_2 = null;\r\n HttpSession session = new MockHttpSession();\r\n ShoppingCart cart = new ShoppingCart();\r\n session.setAttribute(LoginController.ACCOUNT_ATTRIBUTE, new Integer(1));\r\n session.setAttribute(ShoppingCartController.SHOPPING_CART_ATTRIBUTE_NAME, cart);\r\n String expResult = \"redirect:/myAccountView.htm\";\r\n String result = controller.createOrder(referer, orderRequest, result_2, session, redirect);\r\n assertEquals(expResult, result);\r\n assertNull(session.getAttribute(ShoppingCartController.SHOPPING_CART_ATTRIBUTE_NAME));\r\n }",
"public Order getOrderById(int id) {\n\t\tOrder o = new Order();\r\n\t\to.setId(id);\r\n\t\to.setDescription(\"Test class\");\r\n\t\treturn o;\r\n\t}",
"@FormUrlEncoded\n @POST(\"UserData/create_order\")\n public Observable<UserDataResponse> CreateOrder(@Field(\"ord_slm_id\") String ord_slm_id,\n @Field(\"ord_dl_id\") String dealer_id,\n @Field(\"sord_prd_id\") String sord_prd_id,\n @Field(\"sord_qty\") String sord_qty,\n @Field(\"sord_price\") String sord_price,\n @Field(\"ord_total\") String ord_total,\n @Field(\"ord_point\") String ord_point,\n @Field(\"sord_point\") String sord_point,\n @Field(\"sord_total\") String sord_total,\n @Field(\"ord_type\") String ord_type,\n @Field(\"ord_dstr_id\") String ord_dstr_id,\n @Field(\"ord_dl_id\") String ord_dl_id);",
"public Order(int orderID, int customerID, Date orderDate, Date expectedDeliveryDate) {\n this.orderID = orderID;\n this.customerID = customerID;\n this.orderDate = orderDate;\n this.expectedDeliveryDate = expectedDeliveryDate;\n }",
"public static Order of(String description, OrderStatus orderStatus){\n\n Order order = new Order();\n order.description = description;\n order.status = orderStatus;\n return order;\n }"
] |
[
"0.6177483",
"0.60883343",
"0.6077429",
"0.59993476",
"0.5940168",
"0.5925199",
"0.5872652",
"0.5838313",
"0.57553816",
"0.5730214",
"0.572309",
"0.572014",
"0.57014555",
"0.566924",
"0.56452566",
"0.56360394",
"0.5626455",
"0.56045824",
"0.559872",
"0.5592355",
"0.5566444",
"0.5550586",
"0.55397856",
"0.55371934",
"0.55267143",
"0.55126834",
"0.5498128",
"0.5495896",
"0.5490511",
"0.546941",
"0.5466479",
"0.54439473",
"0.54299283",
"0.54225826",
"0.541256",
"0.5396516",
"0.5395507",
"0.5395494",
"0.5394431",
"0.538373",
"0.53797907",
"0.5367907",
"0.53389484",
"0.5334007",
"0.5332342",
"0.53287524",
"0.53273684",
"0.5326971",
"0.5322744",
"0.53205526",
"0.53106374",
"0.5305194",
"0.5272171",
"0.5261228",
"0.5257724",
"0.5253168",
"0.52355015",
"0.52329403",
"0.52280414",
"0.5223546",
"0.52220297",
"0.52219343",
"0.52218807",
"0.52150744",
"0.52140677",
"0.52132046",
"0.52117974",
"0.52081573",
"0.5203554",
"0.51985455",
"0.51964206",
"0.5195447",
"0.517436",
"0.5167978",
"0.51643",
"0.51579505",
"0.5156686",
"0.51557994",
"0.5148308",
"0.5145885",
"0.5144517",
"0.51304084",
"0.5119999",
"0.5115492",
"0.511455",
"0.5106767",
"0.5104097",
"0.5099596",
"0.50991726",
"0.5096841",
"0.5094631",
"0.5094009",
"0.50865227",
"0.50852776",
"0.5083851",
"0.50786126",
"0.5075518",
"0.5069866",
"0.506741",
"0.50606537"
] |
0.7404722
|
0
|
Resends a message to the Kafka 'orderreceived' topic for an existing order.
|
public void reprocessOrder(final Order order) {
final String orderId = order.getId();
final Map<String, Object> logMap = LoggingUtils.createLogMap();
LoggingUtils.logIfNotNull(logMap, LoggingUtils.ORDER_ID, orderId);
LOGGER.info("REPUBLISHING notification to Kafka 'order-received' topic for order - " + orderId + ".", logMap);
sendOrderReceivedMessage(order.getId());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void sendOrderReceivedMessage(String orderId) {\n String orderURI = orderEndpoint + \"/\" + orderId;\n OrderReceived orderReceived = new OrderReceived();\n orderReceived.setOrderUri(orderURI);\n ordersMessageProducer.sendMessage(orderId, orderReceived);\n }",
"public void receiveOrder(MissMintOrder order) {\n\t\tAssert.notNull(order, \"order should not be null\");\n\n\t\tMissMintService service = serviceManager.getService(order);\n\t\tAssert.isTrue(orderService.isOrderAcceptable(service), \"service must be acceptable\");\n\t\titemCatalog.save(order.getItem());\n\n\t\torder.getOrderLines().forEach(orderLine ->\n\t\t\tfinanceService.add(\n\t\t\t\tmessages.get(\"orders.service.\" + orderLine.getProductName()) + \" \" + order.getId(),\n\t\t\t\torderLine.getPrice())\n\t\t);\n\n\t\tTimeTableEntry entry = timeTableService.createEntry(order);\n\t\torder.setExpectedFinished(entry.getDate());\n\t\torderManager.save(order);\n\t\tentryRepository.save(entry);\n\n\t\tServiceCategory serviceCategory = ServiceManager.getCategory(service);\n\t\tServiceConsumptionManager.serviceMatRelation.get(serviceCategory).forEach(x ->\n\t\t\t{\n\t\t\t\tString materialName = x.getFirst();\n\t\t\t\tQuantity quantity = x.getSecond();\n\t\t\t\tMaterial material = materialManager.fromName(materialName);\n\t\t\t\tUniqueInventoryItem item = materialInventory.findByProduct(material).orElseThrow(() -> new RuntimeException(\"could not find inventory item\"));\n\t\t\t\tmaterialManager.checkAndConsume(item.getId(), quantity.getAmount().intValue());\n\t\t\t}\n\t\t);\n\n\t}",
"public void receiveNotification(Order order) {\n System.out.println(this.getDescription() + \" has received a notification about \" + order.getDescription());\n }",
"public void receiveOrder(Order order) {\n // Let's pretend putting orders on the shelves and scheduling drivers is slow, do the work\n // concurrently in separate threads, and return immediately so the order placer can move on.\n executorService.submit(() -> putOrder(order));\n executorService.submit(() -> scheduleDriver(order));\n }",
"Order sendNotificationNewOrder(Order order);",
"@RabbitListener(queues = \"fulfillment.order\")\n public void processOrderMessage(Object message) {\n\t\tLOG.info(\"Message is of type: \" + message.getClass().getName());\n\t\tif(!(message instanceof byte[])) message = ((Message) message).getBody();\n\t\tString content = new String((byte[])message, StandardCharsets.UTF_8);\n\t\t\n\t\tLOG.info(\"Received on order: \" + content);\n\n\t\ttry {\n\t mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n\t Orderr orderr = mapper.readValue(content, Orderr.class);\n\t\t\tthis.orderRepository.save(orderr);\n\t\t\tString paymentStatus = Shipment.TO_BE_PAID;\n\t\t\tif(orderr.isPaymentReceived()) paymentStatus = Shipment.SHIPPABLE;\n\t\t\tShipment shipment = new Shipment(UUID.randomUUID(), paymentStatus, orderr.getShippingAddress(), orderr);\n\t\t\tthis.shipmentRepository.save(shipment);\n\t\t\tLOG.info(\"Order \" +orderr.getUuid().toString()+ \" received and created a shipment:\\n\" + shipment.toString());\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\tLOG.error(\"Error: \" + e.getMessage());\n\t\t}\n\t\tlatch.countDown();\n }",
"public void rollInReceivedOrder(long storeID, long orderId)\r\n\t\t\tthrows InvalidRollInRequestException, NotInDatabaseException, UpdateException;",
"public void setReceived(Order order) {\n\t\tProduct product = order.getProductId();\n\n\t\tproduct.setCurrentStock(product.getCurrentStock() + order.getQuantityMultiplier());\n\t\tproductService.update(product);\n\t\torder.setReceived(true);\n\t\tthis.update(order);\n\t}",
"public void send(Order brokerMsg) {\n// System.out.println(\"Sending a transaction from. price\" + brokerMsg.getPrice() + \" buy : \" + brokerMsg.isBuy());\n\n\n MessageCreator messageCreator = new MessageCreator() {\n @Override\n public Message createMessage(Session session) throws JMSException {\n\n\n Message msg = session.createTextMessage(brokerMsg.toString());\n msg.setJMSCorrelationID(brokerMsg.getStratId().toString());\n// System.out.println(msg);\n return msg;\n }\n };\n orderService.writeOrder(brokerMsg);\n jmsTemplate.send(\"OrderBroker\", messageCreator);\n }",
"@Override\n public void orderReceivedByServer(Order currentOrder, OrderConsumer server) {\n currentOrder.setTimestamp(new Date());\n LOGGER.log(server.getName() + \": received order=\" + currentOrder.toString());\n\n serverFrame.updateView(server, currentOrder);\n callback.orderReceivedByServer(currentOrder, server);\n }",
"private void sendOrderMessage(OrderEntity orderEntity) {\n\t\tOrderEntity cur = getCurrentOrder(orderEntity.getOrderId());\n\t\tif(!\"Y\".equals(cur.getSendStatus())) {\n\t\t\t\n\t\t\t//TODO send order by e-mail or other channels\n\t\t\t\n\t\t\tcur.setSendStatus(\"Y\");\n\t\t\tsaveOrder(cur);\n\t\t}\n\t\t\n\t}",
"void finishOrder(int orderId);",
"private void pickupOrder(long orderId) {\n shelf.pull(orderId);\n }",
"@Override\n\tprotected void doReceiveMessage(Message msg) {\n\t\tdeliverMessage(msg);\n\t}",
"public void messageReceived() {\n\tTrackedMessage.accumulateMap(TrackedMessage.unmapType(\n\t\tTrackedMessage.messagesRecieved, this.getClass()), this\n\t\t.getMessageType(), 1);\n\tTrackedMessage.accumulateMap(TrackedMessage.unmapType(\n\t\tTrackedMessage.bytesRecieved, this.getClass()), this\n\t\t.getMessageType(), TrackedMessage.objectSize(this));\n }",
"@Override\n public void onMessage(final Message message) {\n final var objectMessage = (ObjectMessage) message;\n try {\n var orderMessage = (OrderMessage) objectMessage.getObject();\n var orders = createOrder.create(orderMessage);\n jmsContext.createProducer().send(orderCreatedBean, orders);\n } catch (JMSException e) {\n throw new RuntimeException(e);\n }\n }",
"private void sendAcknoledmentOfReceipt() {\n\t\ttry {\n\t\t\tthis.receiver.sendLetter(new AcknowledgmentOfReceipt(this.receiver, this.sender, this.getDescription()));\n\t\t} catch (NoSuchMoneyException e) {}\n\t}",
"public void SendPartialNotificatin(Order ModifiedOrder) {\r\n if (ModifiedOrder!=null) WriteMessages(ModifiedOrder);\r\n }",
"@Override\n public ReceiveMessageResult receiveMessage(ReceiveMessageRequest request) {\n request = beforeClientExecution(request);\n return executeReceiveMessage(request);\n }",
"void acknowledge(String topicName, int partition, long offset) throws IOException;",
"public void sendOrder(OrderInfo order) {\n KafkaJsontemplate.send(TOPIC_NAME,order);\n //send to control panel topic for making changes\n KafkaJsontemplate.send(TOPIC_NAME_CHANGE,order);\n\n\n String uri = \"http://localhost:8080/order/send/\";\n\n HttpHeaders headers = new HttpHeaders();\n headers.setContentType(MediaType.APPLICATION_JSON);\n headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON));\n\n HttpEntity<OrderInfo> request = new HttpEntity<>(order, headers);\n ResponseEntity<OrderInfo> response = restTemplate.postForEntity(uri, request, OrderInfo.class);\n\n if (response.getStatusCode() == HttpStatus.CREATED) {\n log.debug(\"Запрос создан:{}\", response.getBody());\n } else {\n log.debug(\"Request Failed: {}\", response.getStatusCode());\n }\n }",
"@Override\n public void channelRead(final ChannelHandlerContext ctx,final Object msg) {\n deliveryService.delivery(ctx,msg);\n }",
"@Incoming(\"orders_broadcast\")\n @Counted(\"inventorydemo.orders.count\")\n void ordersToSocket(Order order) {\n }",
"public void addPendingOrder(Order order) {\n\t\tmOrders.add(order);\n\t}",
"public void receiveResponse(Priority priorityQueue)\n \t\t\tthrows MessagingException {\n \t\t\n \t}",
"public Receipt getReceiptByOrder(Long orderid) {\n\t\tReceipt exreceipt = new Receipt();\n\t\tOrder order = new Order();\n\t\torder.setId(orderid);\n\t\texreceipt.setOrder(order);\n\t\tExample<Receipt> ex = Example.of(exreceipt);\n\t\treturn receiptRepository.findOne(ex);\n\t}",
"public final void broadcast()\n\t{\n\t\ttopic.broadcast(originalMessage);\n\t}",
"public void placeOrder(TradeOrder order)\r\n {\r\n brokerage.placeOrder(order);\r\n }",
"private void requestOrderDetail() {\n\n ModelHandler.OrderRequestor.requestOrderDetail(client, mViewData.getOrder().getId(), (order) -> {\n mViewData.setOrder(order);\n onViewDataChanged();\n }, this::showErrorMessage);\n }",
"public void receive(@Observes @JmsIncoming StockQuote quote) {\n System.out.println(\"##### received \" + quote);\n }",
"private void sendMessage(ICommunicationAddress receiver, IFact payload) {\n\t\tAction sendAction = retrieveAction(ICommunicationBean.ACTION_SEND);\n\t\tJiacMessage message = new JiacMessage(payload);\n\t\tinvoke(sendAction, new Serializable[] {message, receiver});\n\t\tSystem.out.println(\"BROKER SENDING \" + payload);\n\t}",
"public void clearOrder()\r\n\t{\r\n\t\tsubtotal = new BigDecimal(\"0.0\");\r\n\t\torderSize = 0;\r\n\t\tSystem.out.println(\"Starting a new order\");\r\n\t\tModelEvent me = new ModelEvent(this,0,\"New Order\",0);\r\n\t\tnotifyChanged(me);\r\n\t}",
"public void sendMessage(Integer bouquetOrderId) {\n try {\n Connection connection = connectionFactory.createConnection();\n Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);\n MessageProducer producer = session.createProducer(destination);\n producer.setDeliveryMode(DeliveryMode.PERSISTENT);\n TextMessage message = session.createTextMessage();\n message.setText(\"\" + bouquetOrderId);\n producer.send(message);\n logger.warn(\"Sending message: \" + message.getText());\n session.close();\n connection.close();\n } catch (JMSException ex) {\n logger.error(\"Sending message failed : \" + ex);\n }\n }",
"public synchronized void onReceipt(DatagramPacket packet) {\r\n\t\ttry {\r\n\t\t\tthis.notify();\r\n\t\t\t/*\r\n\t\t\t * if we arent receiving change our state to receiving and only take packets\r\n\t\t\t * from this port number\r\n\t\t\t */\r\n\t\t\tint packetPort = packet.getPort();\r\n\t\t\tif (currentPacketPort == null) {\r\n\t\t\t\tcurrentPacketPort = packetPort;\r\n\t\t\t}\r\n\t\t\tif (/*currentPacketPort == packetPort*/true) {\r\n\t\t\t\tbyte[] data = packet.getData();\r\n\t\t\t\tSystem.out.println(printPacketContent(packet) + \" Broker received\");\r\n\t\t\t\t/*\r\n\t\t\t\t * if its a creation check to see if the topic exists and send an ack\r\n\t\t\t\t */\r\n\t\t\t\tif (data[0] == Constants.CREATION) {\r\n\t\t\t\t\t//terminal.println(\"Creation Received From The Publisher\");\r\n\t\t\t\t\tString topic = processMessageFromPacket(packet);\r\n\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\tcheckTopic(topic, packet);\r\n\t\t\t\t\tcurrentPacketPort = null;\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if its a publication store the packets in the sorted treemap, change state to\r\n\t\t\t\t\t * receiving pub\r\n\t\t\t\t\t */\r\n\t\t\t\t} else if (data[0] == Constants.PUBLICATION) {\r\n\t\t\t\t\t//terminal.println(\"Publication Received From The Publisher\");\r\n\t\t\t\t\tstate = Constants.BKR_RECEIVING_PUB;\r\n\t\t\t\t\t//add check to see if it is for the currentTransmission\r\n\t\t\t\t\taddToReceivedPackets(packet);\r\n\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * its a subscription add the subscriber to the topic if it exists and send an\r\n\t\t\t\t\t * ack\r\n\t\t\t\t\t */\r\n\t\t\t\t} else if (data[0] == Constants.SUBSCRIPTION) {\r\n\t\t\t\t\t//terminal.println(\"Subscription recieved from Subscriber.\");\r\n\t\t\t\t\tString topic = processMessageFromPacket(packet);\r\n\t\t\t\t\tif (subscriberMap.containsKey(topic)) {\r\n\t\t\t\t\t\tArrayList<Integer> subscriberPorts = subscriberMap.get(topic);\r\n\t\t\t\t\t\tif(!subscriberPorts.contains(packet.getPort())) {\r\n\t\t\t\t\t\t\tsubscriberMap.get(topic).add(packet.getPort());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if its an unsubscription remove that sub from the topics list of port numbers\r\n\t\t\t\t\t */\r\n\t\t\t\t} else if (data[0] == Constants.UNSUBSCRIPTION) {\r\n\t\t\t\t\t//terminal.println(\"Unsubscription recieved from Subscriber.\");\r\n\t\t\t\t\tString topic = processMessageFromPacket(packet);\r\n\t\t\t\t\tif (subscriberMap.containsKey(topic)) {\r\n\t\t\t\t\t\tArrayList<Integer> topicSubscriptions = subscriberMap.get(topic);\r\n\t\t\t\t\t\tfor (int index = 0; index < topicSubscriptions.size(); index++) {\r\n\t\t\t\t\t\t\tif (topicSubscriptions.get(index) == packet.getPort()) {\r\n\t\t\t\t\t\t\t\ttopicSubscriptions.remove(index);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if its an ack remove the acked packet from the queue\r\n\t\t\t\t\t */\r\n\t\t\t\t} else if (data[0] == Constants.ACK) {\r\n\t\t\t\t\t// remove the acked packet from packetsAwaitingAck\r\n\t\t\t\t\t//TODO if the ack has something in the message part that\r\n\t\t\t\t\t//its for a endoftransmission then\r\n\t\t\t\t\tremoveAckedPacketFromPacketsToSend(packet);\t\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if its the end of a transmission change state back to receiving and publish\r\n\t\t\t\t\t * the packets received\r\n\t\t\t\t\t */\r\n\t\t\t\t} else if (data[0] == Constants.ENDOFTRANSMISSION) {\r\n\t\t\t\t\t//if the end of transmission is for the current publication\r\n\t\t\t\t\t//then invoke publishMessage and change our state to idle\r\n\t\t\t\t\tif (state == Constants.BKR_RECEIVING_PUB && checkIsEndOfCurrentPub(packet)) {\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t\tpublishMessage();\r\n\t\t\t\t\t\tstate = Constants.BKR_DEFAULT_STATE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void reQueueMessage(AndesMessageMetadata metadata) throws AndesException {\n QueueDeliveryWorker.QueueDeliveryInfo queueDeliveryInfo = QueueDeliveryWorker.getInstance().\n getQueueDeliveryInfo(metadata.getDestination());\n if (log.isDebugEnabled()) {\n log.debug(\"Re-Queueing message \" + metadata.getMessageID() + \" to readButUndeliveredMessages map\");\n }\n queueDeliveryInfo.readButUndeliveredMessages.add(metadata);\n }",
"@FXML\n\tpublic void removeOrder() {\n\t\tString orderNumber = Integer.toString(order.getOrderNum());\n\t\tboolean isSeen = order.isSeen();\n\t\tboolean isPreparable = order.isPreparable();\n\t\tboolean isPrepared = order.isPrepared();\n\t\tboolean isDelivered = order.isDelivered();\n\t\tif ((isSeen == false) && (isPreparable == true) && (isPrepared == false) && (isDelivered == false)) {\n\t\t\tString[] parameters = new String[1];\n\t\t\tparameters[0] = orderNumber;\n\t\t\tmainController.getPost().notifyMainController(\"RemoveOrderStrategy\", parameters);\n\t\t\tmainController.modifyOrderStatus(order.getOrderNum(), OrderStatus.DELIVERED);\n\t\t\tmainController.removeOrderFromTableView(order);\n\t\t} else if ((isSeen == true) && (isPreparable == false) && (isPrepared == false) && (isDelivered == false)) {\n\t\t\tmainController.removeOrderFromTableView(order);\n\t\t} else {\n\t\t\tremoveErrorLabel.setText(\"The order can't be removed!\");\n\t\t}\n\t}",
"@FXML\n\tpublic void setOrderToDelivered() {\n\t\tString orderNumber = Integer.toString(order.getOrderNum());\n\t\tboolean isSeen = order.isSeen();\n\t\tboolean isPreparable = order.isPreparable();\n\t\tboolean isPrepared = order.isPrepared();\n\t\tboolean isDelivered = order.isDelivered();\n\t\tif ((isSeen == true) && (isPreparable == true) && (isPrepared == true) && (isDelivered == false)) {\n\t\t\tString[] parameters = new String[1];\n\t\t\tparameters[0] = orderNumber;\n\t\t\tmainController.getPost().notifyMainController(\"SetOrderToDeliveredStrategy\", parameters);\n\t\t\tmainController.modifyOrderStatus(order.getOrderNum(), OrderStatus.DELIVERED);\n\t\t\tmainController.removeOrderFromTableView(order);\n\t\t} else {\n\t\t\tdeliveredCheckBox.setSelected(false);\n\t\t}\n\t}",
"public void ack(Object msgId) {\n Message msg = this.pendingMessages.remove(msgId);\n JmsMessageId oldest = this.toCommit.first();\n if (msgId.equals(oldest)) {\n if (msg != null) {\n try {\n log.debug(\"Committing...\");\n msg.acknowledge();\n log.debug(\"JMS Message acked: \" + msgId);\n this.toCommit.remove(msgId);\n } catch (JMSException e) {\n log.warn(\"Error acknowldging JMS message: \" + msgId, e);\n }\n } else {\n log.warn(\"Couldn't acknowledge unknown JMS message ID: \" + msgId);\n }\n } else {\n this.toCommit.remove(msgId);\n }\n\n }",
"public void receiveResponse(String queueName) throws MessagingException {\n \t\t\n \t}",
"public void processOrder(int orderID);",
"@RabbitListener(queues = {\"customer.created\"})\n public void receive(@Payload Customer customer) {\n LOGGER.info(\"Message received: {} ...\", customer);\n }",
"@Override\n\t\t\tpublic void messageArrived(String topic, MqttMessage message) throws Exception {\n\t\t\t\tSystem.out.println(\"接收消息主题 : \" + topic);\n\t\t\t\tSystem.out.println(\"接收消息Qos : \" + message.getQos());\n\t\t\t\tSystem.out.println(\"接收消息内容 : \" + message.toString());\n\t\t\t\tjas.decry(message.toString());\n\t\t\t}",
"@RabbitListener(queues = MessagingConfig.QUEUE)\n public void consumeMessageFromQueue(Traveller journey) {\n\t\t\n\t\ttravellerService.save(journey);\n System.out.println(\"Message recieved from queue : \" + journey);\n }",
"SourceMessage onNewMessageReceived(PubsubMessage pubsubMessage, AckReplyConsumer ackReplyConsumer);",
"Order removeOrder(String orderId) throws OrderBookOrderException;",
"void cancelOrder(String orderKey);",
"NewOrderResponse newOrder(NewOrder order);",
"public void messageReceived(OscMessage aMessage);",
"public String receive() {\n logger.info(\"Recieve and convert JMS MSG\");\n return jmsTemplate.receiveAndConvert(destinationQueue).toString();\n }",
"public void onOrderAdded(OrderEntry orderEntry);",
"public void SendOrder(Order order){\r\n\r\n try {\r\n String orderString=Order.packageOrder(order);\r\n out.writeChars(orderString);\r\n out.flush();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }",
"public void ack(Object msgId) {\n\t\tthis.pendingMessages.remove(msgId);\n\t}",
"void received() throws ImsException;",
"@Override\n public void receiveMessage(Message m) {\n commReceiver.receiveMessage(m);\n }",
"private void receive(EncryptedMessage msg) {\n for (MessageReceiver msgReceiver : subscribedMessageReceivers) {\n msgReceiver.receive(msg);\n }\n }",
"private static String getDataToNotify(FoodOrder foodOrder) {\n EntityManager entityManager = DatabaseManager.getInstance().getEntityManager();\n OrderStatus orderStatus = foodOrder.getStatus();\n // some default message.\n String message = \"{\\\"hello\\\":\\\"world\\\"}\";\n // The order has just been confirmed we send all the orders to update the page.\n if (orderStatus == OrderStatus.COOKING) {\n List<FoodOrder> foodOrders = entityManager.createQuery(\"from FoodOrder foodOrder \"\n + \"where foodOrder.status = :orderStatus\",\n FoodOrder.class).setParameter(\"orderStatus\", OrderStatus.COOKING)\n .getResultList();\n // We have to add the order in question because the change hasn't been committed yet.\n foodOrders.add(foodOrder);\n\n foodOrders.sort(Comparator.comparing(FoodOrder::getTimeConfirmed));\n\n OrderData[] orderData = new OrderData[foodOrders.size()];\n for (int i = 0; i < orderData.length; i++) {\n orderData[i] = new OrderData(foodOrders.get(i));\n }\n message = JsonUtil.getInstance().toJson(orderData);\n } else if (orderStatus == OrderStatus.READY_TO_DELIVER) {\n message = \"An Order is Ready to Deliver!\";\n } else if (orderStatus == OrderStatus.READY_TO_CONFIRM) {\n message = \"A table is ready to confirm their order!\";\n }\n entityManager.close();\n\n return message;\n }",
"default void onMessageReceived(Group group, Message message, Ordering ordering) {}",
"protected JSONObject successMessage(JSONObject jsonOrder) throws Exception {\n processedOrders.get().put(processedOrders.get().length(), jsonOrder);\n return super.successMessage(jsonOrder);\n }",
"void receiveAcknowledgement() {\n byte[] receiveBuffer = new byte[2048];\n DatagramPacket receivePacket = new DatagramPacket(receiveBuffer, receiveBuffer.length);\n try {\n recSocket.receive(receivePacket);\n String dataReceived = new String(receivePacket.getData()).trim();\n System.out.println(\"\\n\" + dataReceived);\n\n } catch (IOException e) {\n System.out.println(\"\\nAcknowledgement not received!\");\n }\n }",
"@Override\n\tpublic void openOrderEnd() {\n\t}",
"@PostMapping(\"/tickDownOrder\")\n\tpublic ResponseEntity<?> tickDownOrder(@RequestParam int orderId) {\n\t\torderService.tickDownOrder(orderId);\n\t\treturn new ResponseEntity<>(HttpStatus.NO_CONTENT);\n\t}",
"public synchronized void setReceived() {\n\t\t_received = true;\n\t\tthis.notifyAll();\n\t}",
"@Override\n public Message getNextMessage() {\n return commReceiver.getNextMessage();\n }",
"@Override\n\t\t\t\tpublic void messageArrived(MqttTopic topicName,\n\t\t\t\t\t\tMqttMessage message) throws Exception {\n\t\t\t\t\tSystem.out.println(\"messageArrived----------\");\n\t\t\t\t\tMessage msg = new Message();\n\t\t\t\t\tmsg.what = 1;\n\t\t\t\t\tmsg.obj = message.toString();\n\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t}",
"public void receiveMessage(String message) {\n\t\tthis.observable.notifyObservers(message);\r\n\t}",
"private static Boolean receiveOrder(String orderNo , String kitchenName){\n\t\tBoolean received = false;\n\t\tSystem.out.println(\"- - - Updating table order tracking for kitchen \"+kitchenName +\"- - - \");\n\t\ttry {\n\t\t\tConnection connection = DBConnection.createConnection();\n\t\t\tSQL:{\n\n\t\t\t\tPreparedStatement preparedStatement = null;\n\t\t\t\tString sql = \"UPDATE fapp_order_tracking SET received = 'Y',received_time=current_timestamp \"\n\t\t\t\t\t\t+ \" WHERE order_id = (SELECT order_id from fapp_orders where order_no = ?) \"\n\t\t\t\t\t\t+ \" AND kitchen_id = (SELECT kitchen_id from fapp_kitchen where kitchen_name = ?)\";\n\n\t\t\t\t/*String sqlSubs = \"UPDATE fapp_order_tracking SET received = 'Y',received_time=current_timestamp \"\n\t\t\t\t\t\t + \" WHERE subscription_id = (SELECT subscription_id from fapp_subscription where subscription_no = ?) \"\n\t\t\t\t\t\t + \" AND kitchen_id = (SELECT kitchen_id from fapp_kitchen where kitchen_name = ?)\";*/\n\n\t\t\t\ttry {\n\t\t\t\t\t/*if(orderNo.startsWith(\"REG\")){\n\t\t\t\t\t\tpreparedStatement = connection.prepareStatement(sql);\n\t\t\t\t\t\tpreparedStatement.setString(1, orderNo);\n\t\t\t\t\t\tpreparedStatement.setString(2, kitchenName);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tpreparedStatement = connection.prepareStatement(sqlSubs);\n\t\t\t\t\t\tpreparedStatement.setString(1, orderNo);\n\t\t\t\t\t\tpreparedStatement.setString(2, kitchenName);\n\t\t\t\t\t}*/\n\t\t\t\t\tpreparedStatement = connection.prepareStatement(sql);\n\t\t\t\t\tpreparedStatement.setString(1, orderNo);\n\t\t\t\t\tpreparedStatement.setString(2, kitchenName);\n\t\t\t\t\t//System.out.println(preparedStatement);\n\t\t\t\t\tint updatedRow = preparedStatement.executeUpdate();\n\t\t\t\t\tif(updatedRow>0){\n\t\t\t\t\t\treceived = true;\n\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t\tconnection.rollback();\n\t\t\t\t\t//connection.close();\n\t\t\t\t}finally{\n\t\t\t\t\tif(preparedStatement!=null){\n\t\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSQL:{\n\t\t\t\tPreparedStatement preparedStatement = null;\n\t\t\t\tString sql = \"UPDATE fapp_orders SET order_status_id = 8\"\n\t\t\t\t\t\t+ \" WHERE order_id = (SELECT order_id from fapp_orders where order_no = ?) \";\n\t\t\t\ttry {\n\t\t\t\t\tpreparedStatement = connection.prepareStatement(sql);\n\t\t\t\t\tpreparedStatement.setString(1, orderNo);\n\t\t\t\t\tint updatedRow = preparedStatement.executeUpdate();\n\t\t\t\t\tif(updatedRow>0){\n\t\t\t\t\t\treceived = true;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t\tconnection.rollback();\n\t\t\t\t\tconnection.close();\n\t\t\t\t}finally{\n\t\t\t\t\tif(preparedStatement!=null){\n\t\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t\t}\n\t\t\t\t\tif(connection!=null){\n\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\tSystem.out.println(\"- - - Updation table order tracking for kitchen \"+kitchenName +\" is - - - \"+received);\n\t\treturn received;\n\t}",
"private void processAndPublishMessage(byte[] body) {\n Map<String, Object> props = Maps.newHashMap();\n props.put(CORRELATION_ID, correlationId);\n MessageContext mc = new MessageContext(body, props);\n try {\n msgOutQueue.put(mc);\n String message = new String(body, \"UTF-8\");\n log.debug(\" [x] Sent '{}'\", message);\n } catch (InterruptedException | UnsupportedEncodingException e) {\n log.error(ExceptionUtils.getFullStackTrace(e));\n }\n manageSender.publish();\n }",
"@Override\n\tpublic void msgReadyToOrder(Customer customerAgent) {\n\t\t\n\t}",
"public void cancelOrder() {\n order.clear();\n }",
"@Override\n public void deliveryComplete(IMqttDeliveryToken arg0) {\n try {\n if(arg0.getMessage()==null){\n //messageDelivered = true;\n }\n } catch (MqttException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"public void seeOrder(Order order) {\n if (getCurrentOrder() == null) {\n order.setSeen(true);\n takeOrder(order);\n getRestaurant().getOrderSystem().seenOrder(order);\n EventLogger.log(\"Order #\" + order.getOrderNum() + \" has been seen by chef \" + this.getName());\n }\n }",
"@Override\n\tpublic void msgIWantStuff(MarketCustomer c, ArrayList<String> needs) {\n\t\tprint(\"Recieved order from Customer: \" + c.getCustomerName());\n\t\tmyCustomers.add(new MyCustomer(c, needs));\n\t\tprint(\"Size of myCustomer list: \" + myCustomers.size());\n\t\tstateChanged();\n\t}",
"int markMessageAsRead(String msgId, long timestampDisplayed);",
"public void receiveResultorderQuery(\n com.xteam.tourismpay.PFTMXStub.OrderQueryResponse result) {\n }",
"private void printResourcesMessageAction(Message receivedMessage, DataOutputStream os) throws IOException {\r\n\r\n\t\tSystem.out.println(LOG_TAG + \"Handler for RESOURCES MESSAGE\");\r\n\r\n\t\tSystem.out.println(LOG_TAG + \"Send Ack\");\r\n\r\n\t\tCacheResourceMessage cacheMessage = new CacheResourceMessage(receivedMessage);\r\n\r\n\t\tPeerCluster.printCache(cacheMessage.getTime());\r\n\r\n\t\tos.write((new AckMessage(this.listenerId, this.listenerAddr, this.listenerPort, 0, \"\")).generateXmlMessageString().getBytes());\r\n\t}",
"public void file(OrderReceipt r) {\r\n\t\tthis.receiptissued.add(r);\r\n\t}",
"public void received()\n\t{\n\t\tdriver.findElementByName(OR.getProperty(\"Received\")).click();\n\t}",
"public CartOrder updateOrder(CartOrder order) throws Exception;",
"@Override\n public boolean messagePending() {\n return commReceiver.messagePending();\n }",
"@Override\n\tpublic void readCanceledOrders(UUID canceledOrdersID) {\n\t}",
"private static void checkArrivedOrderRemainder(Stock stock,\n Order arrivedOrder,\n Transaction transaction,\n AtomicLong serialTime) {\n long arrivedRemainderQuantity =\n arrivedOrder.getQuantity() - transaction.getQuantity();\n if (arrivedRemainderQuantity > 0) {\n\n /*\n * there is a remainder in the 'arrivedOrder',\n * set the Quantity of the 'arrivedOrder'\n * to the updated 'arrivedRemainderQuantity':\n */\n arrivedOrder.setQuantity(arrivedRemainderQuantity);\n\n /*\n * if the 'arrivedOrder' Type is 'MKT', set the remainder of\n * this arrivedOrder's 'desiredLimitPrice' to be calculated again:\n */\n if (arrivedOrder.getOrderType() == OrderType.MKT) {\n arrivedOrder.setDesiredLimitPrice(\n calcDesiredLimitPriceOfMKTOrder(stock,\n arrivedOrder.getOrderDirection()));\n }\n\n // Create remained order with a correct 'serialTime':\n Order remainedOrder = new Order(arrivedOrder);\n remainedOrder.setSerialTimeOfRemainedOrder(serialTime.get());\n serialTime.set(serialTime.get() + 1);\n\n MessagePrint.println(MessagePrint.Stream.OUT,\n \"The Order has a remainder:\\n\\t\" + remainedOrder);\n\n // Add 'remainedOrder' to 'afterExecuteOrderAndTransactionContainer':\n afterExecuteOrderAndTransactionContainer.getRemainderOrders()\n .addFirst(remainedOrder);\n } else {\n\n /*\n * if the 'arrived' Order's quantity remainder is no more than 0,\n * remove the 'arrived' Order from data-base:\n */\n checkArrivedOrderRemainder_RemoveArrivedOrder(stock.getDataBase(),\n arrivedOrder);\n }\n }",
"private void receive() {\n\t\tMQGetMessageOptions gmo = new MQGetMessageOptions();\n\t\tif (keepMessages) {\n\t\t\tgmo.options = gmo.options | MQConstants.MQGMO_CONVERT | MQConstants.MQGMO_PROPERTIES_FORCE_MQRFH2\n\t\t\t\t\t| MQConstants.MQGMO_BROWSE_FIRST;\n\t\t} else {\n\t\t\tgmo.options = gmo.options | MQConstants.MQGMO_CONVERT | MQConstants.MQGMO_PROPERTIES_FORCE_MQRFH2;\n\t\t\tif (syncPoint) {\n\t\t\t\tgmo.options = gmo.options | MQConstants.MQGMO_SYNCPOINT;\n\t\t\t}\n\t\t}\n\t\tgmo.matchOptions = MQConstants.MQMO_NONE;\n\t\tgmo.waitInterval = this.waitInterval;\n\n\t\ttry {\n\t\t\tint lastSeqNo = 0;\n\t\t\tlong lastTs = 0;\n\t\t\tint messagecounter = 0;\n\t\t\twhile (true) {\n\t\t\t\tif (!(qmgr.isConnected())) {\n\t\t\t\t\treconnectMq();\n\t\t\t\t}\n\t\t\t\tif (!(queue.isOpen())) {\n\t\t\t\t\treconnectMq();\n\t\t\t\t}\n\t\t\t\thaltFileExists();\n\t\t\t\tif (haltStatus) {\n\t\t\t\t\treadQueue = false;\n\t\t\t\t} else {\n\t\t\t\t\treadQueue = true;\n\t\t\t\t}\n\t\t\t\tint queueNotInhibited = queue.getInhibitGet();\n\t\t\t\tif (queueNotInhibited == MQConstants.MQQA_GET_INHIBITED) {\n\t\t\t\t\treadQueue = false;\n\t\t\t\t}\n\t\t\t\tproduceCounts();\n\t\t\t\tif (readQueue) {\n\t\t\t\t\tqueueDepth = queue.getCurrentDepth();\n\t\t\t\t\tif (queueDepth != 0) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\trcvMessage = new MQMessage();\n\t\t\t\t\t\t\tif (mqccsid != 0) {\n\t\t\t\t\t\t\t\trcvMessage.characterSet = mqccsid;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tqueue.get(rcvMessage, gmo);\n\t\t\t\t\t\t\trecordCountsRcvd++;\n\t\t\t\t\t\t\tstrLen = rcvMessage.getMessageLength();\n\t\t\t\t\t\t\tstrData = new byte[strLen];\n\t\t\t\t\t\t\trcvMessage.readFully(strData);\n\t\t\t\t\t\t\tmessagePutMs = rcvMessage.putDateTime.getTimeInMillis();\n\t\t\t\t\t\t\tseqNo = rcvMessage.messageSequenceNumber;\n\t\t\t\t\t\t\tif (lastTs == messagePutMs && seqNo == 1) {\n\t\t\t\t\t\t\t\tseqNo = lastSeqNo + seqNo;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmsgText = new String(strData);\n\t\t\t\t\t\t\tjsonOut = new JSONArray();\n\t\t\t\t\t\t\tjsonKey = new JSONObject();\n\t\t\t\t\t\t\tjsonValue = new JSONObject();\n\t\t\t\t\t\t\tjsonKey.put(\"key\", Long.toString(messagePutMs) + \"_\" + seqNo);\n\t\t\t\t\t\t\tjsonValue.put(\"value\", msgText);\n\t\t\t\t\t\t\tLOG.debug(\"MQ MsgKey: \" + Long.toString(messagePutMs) + \"_\" + seqNo);\n\t\t\t\t\t\t\tLOG.debug(\"MQ MsgValue: \" + msgText);\n\t\t\t\t\t\t\tjsonOut.put(jsonKey);\n\t\t\t\t\t\t\tjsonOut.put(jsonValue);\n\t\t\t\t\t\t\tmsgList.add(jsonOut.toString());\n\t\t\t\t\t\t\tlastTs = messagePutMs;\n\t\t\t\t\t\t\tlastSeqNo = seqNo;\n\t\t\t\t\t\t\tmessagecounter++;\n\t\t\t\t\t\t\t// move cursor to next message\n\t\t\t\t\t\t\tif (msgList.size() > maxUMsg / 2) {\n\t\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (msgList.size() > queueDepth) {\n\t\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (keepMessages) {\n\t\t\t\t\t\t\t\tgmo.options = MQConstants.MQGMO_CONVERT | MQConstants.MQGMO_PROPERTIES_FORCE_MQRFH2\n\t\t\t\t\t\t\t\t\t\t| MQConstants.MQGMO_WAIT | MQConstants.MQGMO_BROWSE_NEXT;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tgmo.options = MQConstants.MQGMO_CONVERT | MQConstants.MQGMO_PROPERTIES_FORCE_MQRFH2\n\t\t\t\t\t\t\t\t\t\t| MQConstants.MQGMO_WAIT;\n\t\t\t\t\t\t\t\tif (syncPoint) {\n\t\t\t\t\t\t\t\t\tgmo.options = gmo.options | MQConstants.MQGMO_SYNCPOINT;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (MQException e) {\n\t\t\t\t\t\t\tif (e.reasonCode == MQConstants.MQRC_NO_MSG_AVAILABLE) {\n\t\t\t\t\t\t\t\tif (msgList.size() > 0) {\n\t\t\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnoMessagesCounter++;\n\t\t\t\t\t\t\t\tthreadWait();\n\t\t\t\t\t\t\t} else if (e.reasonCode == MQConstants.MQRC_SYNCPOINT_LIMIT_REACHED) {\n\t\t\t\t\t\t\t\tif (msgList.size() > 0) {\n\t\t\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnoMessagesCounter++;\n\t\t\t\t\t\t\t\tthreadWait();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\tCalendar.getInstance().getTime() + \" - MQ Reason Code: \" + e.reasonCode);\n\t\t\t\t\t\t\t\treconnectMq();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (IOException ioe) {\n\t\t\t\t\t\t\tSystem.out.println(Calendar.getInstance().getTime() + \" - Error: \" + ioe.getMessage());\n\t\t\t\t\t\t\treconnectMq();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (msgList.size() > 0) {\n\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthreadWait();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (msgList.size() > 0) {\n\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t}\n\t\t\t\t\tthreadWait();\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Throwable t) {\n\t\t\t// restart if there is any other error\n\t\t\trestart(Calendar.getInstance().getTime() + \" - Error receiving data from Queue or QMGR\", t);\n\t\t}\n\n\t}",
"@Override\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t\taController.acquireWakeLock(getApplicationContext());\n\n\t\t\t// Display message on the screen\n\t\t\t// lblMessage.append(newMessage + \"\\n\");\n\n\t\t\t// Toast.makeText(getApplicationContext(),\n\t\t\t// \"Got Message: \" + newMessage, Toast.LENGTH_LONG).show();\n\n\t\t\t// Releasing wake lock\n\t\t\taController.releaseWakeLock();\n\t\t}",
"public void receive(@NotNull WebSocketSession session, @NotNull String msg) {\n InputQueue.getInstance().add(new Action(Replicator.toMessage(msg),\n ConnectionPool.getInstance().getPlayer(session)));\n }",
"@Test\n\tpublic void send_Receive_Log() throws Exception {\n\t\trmqBroker.drainLoggingQueue();\n\n\t\tEnvelope published = publisher.publish( brian );\t\t\t\n\t\tSystem.out.println( \">>> published: \" + published );\n\t\t\n\t\t@SuppressWarnings(\"unused\")\n\t\tEnvelope received = subscriber.receive();\n\n\t\tRunnable messageLogListener = rmqBroker.getMessageArchiver();\n\t\tThread messageLogThread = new Thread( messageLogListener );\n\t\tmessageLogThread.start();\n\t\tmessageLogThread.join();\n\t\t// Give some time to the background thread to catch up\n\t\tMessageBroker.sleep( 1000L );\n\t\t\n\t\tIterable<PersistedEnvelope> foundEnvelopes = envelopeRepository.findAll();\n\t\tList<PersistedEnvelope> persistedEnvelopes = new ArrayList<>();\n\t\tfor (PersistedEnvelope pe : foundEnvelopes) {\n\t\t\tpersistedEnvelopes.add( pe );\n\t\t}\n\t\t\n\t\tassertEquals( 1, persistedEnvelopes.size() );\n\t\tPersistedEnvelope persistedEnvelope = persistedEnvelopes.get(0);\n\t\tEnvelope foundEnvelope = persistedEnvelope.asSimpleEnvelope();\n\t\tassertEquals( published.getId(), foundEnvelope.getId() );\n\t\tassertEquals( published.getMessage(), foundEnvelope.getMessage() );\n\t\tassertEquals( State.Received, foundEnvelope.getState() );\n\t}",
"public void receive(Message message) {\n\t\t\tappReceiver.getBufferReceive().add(message);\r\n\t\t\t\t\r\n\t\t}",
"@Override\n public void cancel(Order order) {\n logger.info(\"Cancelling Order: \" + order.toString());\n boolean exists = registeredOrders.contains(order);\n if(exists){\n registeredOrders.remove(order);\n logger.info(\"Order successfully cancelled\");\n }\n else{\n logger.info(\"Invalid Order input\");\n }\n }",
"@Override\n\tpublic int completeOrder(int orderId) {\n\t\tOrder order = orderDao.getOrder(orderId);\n\t\tfor (ProductOrder productOrder : order.getProductOrders()) {\n\t\t\tProduct product = productOrder.getProduct();\n\t\t\tint newQuantity = product.getAvailableQuantity() - productOrder.getOrderAmount();\n\t\t\tproduct.setAvailableQuantity(newQuantity);\n\t\t\tcatalogService.editProduct(product);\n\t\t}\n\t\treturn orderDao.completeOrder(orderId);\n\t}",
"public void createNewOrder()\n\t{\n\t\tnew DataBaseOperationAsyn().execute();\n\t}",
"public Message receive() {\n\t\t\n\t\tsynchronized(recvQueue) {\n\t\t\tif(!recvQueue.isEmpty()) {\n\t\t\t\tMessage popMsg = recvQueue.remove();\n\t\t\t\t/* add ClockService */\n\t\t\t\tTimeStampedMessage msg = (TimeStampedMessage)popMsg;\n//System.out.println(\"new Debug sentence\");\n//msg.dumpMsg();\n\t\t\t\tthis.clockSer.updateTS(msg.getMsgTS());\n\t\t\t\tthis.clockSer.addTS(this.localName);\n\t\t\t\t/* */\n\n\t\t\t\treturn popMsg;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"@PostMapping\r\n\tpublic ResponseEntity<Object> addOrder(@RequestBody Order Order) \r\n\t{logger.info(\"Inside addOrder method\");\r\n\t\t//System.out.println(\"Enterd in post method\");\r\n\t\tOrder orderList = orderservice.addOrder(Order);\r\n\t\tlogger.info(\"New Order\" + Order);\r\n\t\tif (orderList == null)\r\n\r\n\t\t\treturn ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(\"Inernal server error\");\r\n\t\t// response is set to inserted message id in response header section.\r\n\t\r\n\t\tURI location = ServletUriComponentsBuilder.fromCurrentRequest().path(\"/{id}\")\r\n\t\t\t\t.buildAndExpand((orderList).getBookingOrderId()).toUri();\r\n\t\treturn ResponseEntity.created(location).build();\r\n\t}",
"void passMessageToReceiver(String ccid, byte[] serializedMessage);",
"public void addOrder(Long id, Long orderId) {\n\t\tReceipt receipt = receiptRepository.findOne(id);\n\t\tOrder order = orderRepository.findOne(orderId);\n\n\t\treceipt.setOrder(order);\n\n\t\treceiptRepository.save(receipt);\n\t}",
"@Override\n public void deliveryComplete(IMqttDeliveryToken imdt) {\n System.out.println(\"在完成消息传递并收到所有确认后调用。\");\n }",
"@KafkaListener(topics = \"${spring.kafka.consumer.topic.product}\")\n @LoadBalanced\n public void receiveProduct(ConsumerRecord<String, String> consumerRecord) {\n LOGGER.info(\"Received topic={}, key={}, Products={}\", consumerRecord.topic(), consumerRecord.key(), consumerRecord.value());\n if (consumerRecord.key().equals(KeySet.UPDATE_QNT_PRODUCT.toString())) {\n updateProductQnt(jsonMapperWrapper.readProductValue(consumerRecord.value()));\n }\n// latch.countDown();\n }",
"@Override\n\tpublic void enqueue(String msgid, EmailAddress recipient) throws MessageEngineException {\n\t\t\n\t}",
"private void receiveClientMessage() throws IOException {\n mRemoteClientMessage = lengthValueRead(in, ClientMessage.class);\n \n if (mRemoteClientMessage == null) {\n setExchangeStatus(Status.ERROR);\n setErrorMessage(\"Remote client message was not received.\");\n throw new IOException(\"Remote client message not received.\");\n }\n\n if (mRemoteClientMessage.messages == null) {\n setExchangeStatus(Status.ERROR);\n setErrorMessage(\"Remote client messages field was null\");\n throw new IOException(\"Remote client messages field was null\");\n }\n\n mMessagesReceived = mRemoteClientMessage.messages;\n }",
"public String processOrder() {\n notifyAllObservers();\n\n return getOrderReport();\n }",
"public synchronized void sendOrder(BlockingBuffer buffer,AmazonOrder order){\n try\n {\n buffer.blockingPut(order); // set value in buffer\n } catch (InterruptedException exception) {\n Thread.currentThread().interrupt();\n }\n\n }",
"@Override\n\tpublic void receive(String message) {\n\t\tgetReceiveArea().append(message + \"\\n\");\n\t}"
] |
[
"0.6584561",
"0.6312004",
"0.6262885",
"0.604059",
"0.5977281",
"0.58717227",
"0.5770618",
"0.569623",
"0.5573367",
"0.5327472",
"0.5306379",
"0.52738833",
"0.5250023",
"0.51896906",
"0.51843107",
"0.51465017",
"0.5086658",
"0.50776064",
"0.50699943",
"0.50551176",
"0.50487053",
"0.50439894",
"0.5005145",
"0.50012803",
"0.50003356",
"0.4985762",
"0.49720284",
"0.49245828",
"0.49096027",
"0.49056584",
"0.488398",
"0.48801294",
"0.48774326",
"0.48691574",
"0.48595247",
"0.48517272",
"0.4836624",
"0.4828058",
"0.48224187",
"0.4816556",
"0.47965765",
"0.47883853",
"0.47855446",
"0.47818184",
"0.47792804",
"0.47710684",
"0.47639808",
"0.47629514",
"0.4760364",
"0.4756484",
"0.47529837",
"0.475172",
"0.47456455",
"0.47320598",
"0.4715794",
"0.47108534",
"0.47042295",
"0.46993327",
"0.469866",
"0.46928415",
"0.46902826",
"0.46874475",
"0.46836188",
"0.4677292",
"0.46720597",
"0.46692315",
"0.46691707",
"0.4668424",
"0.46676442",
"0.46608618",
"0.4657665",
"0.46420032",
"0.46287403",
"0.4627756",
"0.46182996",
"0.46016696",
"0.45753166",
"0.45684922",
"0.4547189",
"0.4541242",
"0.45374715",
"0.4537081",
"0.45302325",
"0.4529689",
"0.45260552",
"0.45246857",
"0.45180452",
"0.45128068",
"0.4510295",
"0.45093974",
"0.45075184",
"0.45030802",
"0.45028943",
"0.44971365",
"0.44953114",
"0.449288",
"0.44924828",
"0.44851968",
"0.44835627",
"0.44821706"
] |
0.7257221
|
0
|
Sends a message to Kafka topic 'orderreceived'
|
private void sendOrderReceivedMessage(String orderId) {
String orderURI = orderEndpoint + "/" + orderId;
OrderReceived orderReceived = new OrderReceived();
orderReceived.setOrderUri(orderURI);
ordersMessageProducer.sendMessage(orderId, orderReceived);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void send(Order brokerMsg) {\n// System.out.println(\"Sending a transaction from. price\" + brokerMsg.getPrice() + \" buy : \" + brokerMsg.isBuy());\n\n\n MessageCreator messageCreator = new MessageCreator() {\n @Override\n public Message createMessage(Session session) throws JMSException {\n\n\n Message msg = session.createTextMessage(brokerMsg.toString());\n msg.setJMSCorrelationID(brokerMsg.getStratId().toString());\n// System.out.println(msg);\n return msg;\n }\n };\n orderService.writeOrder(brokerMsg);\n jmsTemplate.send(\"OrderBroker\", messageCreator);\n }",
"public void sendOrder(OrderInfo order) {\n KafkaJsontemplate.send(TOPIC_NAME,order);\n //send to control panel topic for making changes\n KafkaJsontemplate.send(TOPIC_NAME_CHANGE,order);\n\n\n String uri = \"http://localhost:8080/order/send/\";\n\n HttpHeaders headers = new HttpHeaders();\n headers.setContentType(MediaType.APPLICATION_JSON);\n headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON));\n\n HttpEntity<OrderInfo> request = new HttpEntity<>(order, headers);\n ResponseEntity<OrderInfo> response = restTemplate.postForEntity(uri, request, OrderInfo.class);\n\n if (response.getStatusCode() == HttpStatus.CREATED) {\n log.debug(\"Запрос создан:{}\", response.getBody());\n } else {\n log.debug(\"Request Failed: {}\", response.getStatusCode());\n }\n }",
"public void reprocessOrder(final Order order) {\n final String orderId = order.getId();\n final Map<String, Object> logMap = LoggingUtils.createLogMap();\n LoggingUtils.logIfNotNull(logMap, LoggingUtils.ORDER_ID, orderId);\n LOGGER.info(\"REPUBLISHING notification to Kafka 'order-received' topic for order - \" + orderId + \".\", logMap);\n sendOrderReceivedMessage(order.getId());\n }",
"Order sendNotificationNewOrder(Order order);",
"public void send(String providedTopic,V msg,K providedKey);",
"public void send(String providedTopic,V msg);",
"public void receiveNotification(Order order) {\n System.out.println(this.getDescription() + \" has received a notification about \" + order.getDescription());\n }",
"private void sendOrderMessage(OrderEntity orderEntity) {\n\t\tOrderEntity cur = getCurrentOrder(orderEntity.getOrderId());\n\t\tif(!\"Y\".equals(cur.getSendStatus())) {\n\t\t\t\n\t\t\t//TODO send order by e-mail or other channels\n\t\t\t\n\t\t\tcur.setSendStatus(\"Y\");\n\t\t\tsaveOrder(cur);\n\t\t}\n\t\t\n\t}",
"public void sendMessage(Integer bouquetOrderId) {\n try {\n Connection connection = connectionFactory.createConnection();\n Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);\n MessageProducer producer = session.createProducer(destination);\n producer.setDeliveryMode(DeliveryMode.PERSISTENT);\n TextMessage message = session.createTextMessage();\n message.setText(\"\" + bouquetOrderId);\n producer.send(message);\n logger.warn(\"Sending message: \" + message.getText());\n session.close();\n connection.close();\n } catch (JMSException ex) {\n logger.error(\"Sending message failed : \" + ex);\n }\n }",
"public void receiveOrder(MissMintOrder order) {\n\t\tAssert.notNull(order, \"order should not be null\");\n\n\t\tMissMintService service = serviceManager.getService(order);\n\t\tAssert.isTrue(orderService.isOrderAcceptable(service), \"service must be acceptable\");\n\t\titemCatalog.save(order.getItem());\n\n\t\torder.getOrderLines().forEach(orderLine ->\n\t\t\tfinanceService.add(\n\t\t\t\tmessages.get(\"orders.service.\" + orderLine.getProductName()) + \" \" + order.getId(),\n\t\t\t\torderLine.getPrice())\n\t\t);\n\n\t\tTimeTableEntry entry = timeTableService.createEntry(order);\n\t\torder.setExpectedFinished(entry.getDate());\n\t\torderManager.save(order);\n\t\tentryRepository.save(entry);\n\n\t\tServiceCategory serviceCategory = ServiceManager.getCategory(service);\n\t\tServiceConsumptionManager.serviceMatRelation.get(serviceCategory).forEach(x ->\n\t\t\t{\n\t\t\t\tString materialName = x.getFirst();\n\t\t\t\tQuantity quantity = x.getSecond();\n\t\t\t\tMaterial material = materialManager.fromName(materialName);\n\t\t\t\tUniqueInventoryItem item = materialInventory.findByProduct(material).orElseThrow(() -> new RuntimeException(\"could not find inventory item\"));\n\t\t\t\tmaterialManager.checkAndConsume(item.getId(), quantity.getAmount().intValue());\n\t\t\t}\n\t\t);\n\n\t}",
"public void receiveOrder(Order order) {\n // Let's pretend putting orders on the shelves and scheduling drivers is slow, do the work\n // concurrently in separate threads, and return immediately so the order placer can move on.\n executorService.submit(() -> putOrder(order));\n executorService.submit(() -> scheduleDriver(order));\n }",
"@Override\n public void onMessage(final Message message) {\n final var objectMessage = (ObjectMessage) message;\n try {\n var orderMessage = (OrderMessage) objectMessage.getObject();\n var orders = createOrder.create(orderMessage);\n jmsContext.createProducer().send(orderCreatedBean, orders);\n } catch (JMSException e) {\n throw new RuntimeException(e);\n }\n }",
"@Incoming(\"orders_broadcast\")\n @Counted(\"inventorydemo.orders.count\")\n void ordersToSocket(Order order) {\n }",
"void acknowledge(String topicName, int partition, long offset) throws IOException;",
"@RabbitListener(queues = \"fulfillment.order\")\n public void processOrderMessage(Object message) {\n\t\tLOG.info(\"Message is of type: \" + message.getClass().getName());\n\t\tif(!(message instanceof byte[])) message = ((Message) message).getBody();\n\t\tString content = new String((byte[])message, StandardCharsets.UTF_8);\n\t\t\n\t\tLOG.info(\"Received on order: \" + content);\n\n\t\ttry {\n\t mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n\t Orderr orderr = mapper.readValue(content, Orderr.class);\n\t\t\tthis.orderRepository.save(orderr);\n\t\t\tString paymentStatus = Shipment.TO_BE_PAID;\n\t\t\tif(orderr.isPaymentReceived()) paymentStatus = Shipment.SHIPPABLE;\n\t\t\tShipment shipment = new Shipment(UUID.randomUUID(), paymentStatus, orderr.getShippingAddress(), orderr);\n\t\t\tthis.shipmentRepository.save(shipment);\n\t\t\tLOG.info(\"Order \" +orderr.getUuid().toString()+ \" received and created a shipment:\\n\" + shipment.toString());\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\tLOG.error(\"Error: \" + e.getMessage());\n\t\t}\n\t\tlatch.countDown();\n }",
"public void send(String topic, Object consumerRecord) {\r\n log.info(\"topic name is : \" + topic + \" producerecord is: \" + consumerRecord);\r\n kafkaTemplate.send(topic, consumerRecord);\r\n }",
"public void SendOrder(Order order){\r\n\r\n try {\r\n String orderString=Order.packageOrder(order);\r\n out.writeChars(orderString);\r\n out.flush();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }",
"@Override\n public void deliveryComplete(IMqttDeliveryToken token) {\n System.out.println(\"MQTT Publish Complete\");\n }",
"public void messageArrived(String s, MqttMessage mqttMessage) {\n LoCommand command = new Gson().fromJson(new String(mqttMessage.getPayload()), LoCommand.class);\n System.out.println(\"Device command received: \" + new Gson().toJson(command));\n\n LoCommand.LoCommandResponse response = new LoCommand.LoCommandResponse(new HashMap<>(), command.cid);\n response.res.put(\"my-ack\", \"this is my command acknowledge to \" + command.req);\n\n new Thread(() -> {\n try {\n\n String responseJson = new Gson().toJson(response);\n System.out.println(\"Publishing command acknowledge message: \" + responseJson);\n\n MqttMessage message = new MqttMessage(responseJson.getBytes());\n message.setQos(QOS);\n\n mqttClient.publish(MqttTopics.MQTT_TOPIC_RESPONSE_COMMAND, message);\n System.out.println(\"Command ack published\");\n\n } catch (MqttException me) {\n System.out.println(\"reason \" + me.getReasonCode());\n System.out.println(\"msg \" + me.getMessage());\n System.out.println(\"loc \" + me.getLocalizedMessage());\n System.out.println(\"cause \" + me.getCause());\n System.out.println(\"excep \" + me);\n me.printStackTrace();\n }\n }).start();\n }",
"@Override\n\tpublic void run() {\n\t\tkafkaProducer.send(record);\n\t\tkafkaProducer.close();\n\t}",
"boolean deliver(String busType, String topic, Object event);",
"@Override\n\t\t\tpublic void messageArrived(String topic, MqttMessage message) throws Exception {\n\t\t\t\tSystem.out.println(\"接收消息主题 : \" + topic);\n\t\t\t\tSystem.out.println(\"接收消息Qos : \" + message.getQos());\n\t\t\t\tSystem.out.println(\"接收消息内容 : \" + message.toString());\n\t\t\t\tjas.decry(message.toString());\n\t\t\t}",
"@Override\n\t\t\t\tpublic void messageArrived(MqttTopic topicName,\n\t\t\t\t\t\tMqttMessage message) throws Exception {\n\t\t\t\t\tSystem.out.println(\"messageArrived----------\");\n\t\t\t\t\tMessage msg = new Message();\n\t\t\t\t\tmsg.what = 1;\n\t\t\t\t\tmsg.obj = message.toString();\n\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t}",
"boolean deliver(CommInfrastructure busType, String topic, Object event);",
"@Override\n\t\t\t\tpublic void onPublish(UTF8Buffer topicmsg, Buffer msg, Runnable ack) {\n\t\t\t\t\tString topic = topicmsg.utf8().toString();\n\t\t\t\t\tString payload = msg.utf8().toString();\n\t\t\t\t\tSystem.out.println(topic);\n\t\t\t\t\tSystem.out.println(payload);\n\t\t\t\t\t// 表示监听成功\n\t\t\t\t\tack.run();\n\t\t\t\t}",
"public void messageReceived(OscMessage aMessage);",
"public void publishMessage(String message) throws IOException {\n try {\n producer.send(new ProducerRecord<String, String>(topic, 0, \"HELIDON\", message));\n logger.warning(\"Sent new oKafka message: \"+message);\n //producer.commitTransaction();\n //producer.flush();\n } catch (Exception ex) {\n ex.printStackTrace();\n throw new IOException(ex.toString());\n }\n }",
"@Override\r\n\tpublic void messageArrived(String topic, MqttMessage message) throws Exception {\n\t\tSystem.out.println(\"-------------------------------------------------\");\r\n\t\tSystem.out.println(\"| Topic:\" + topic);\r\n\t\tSystem.out.println(\"| Message: \" + new String(message.getPayload()));\r\n\t\tSystem.out.println(\"-------------------------------------------------\");\r\n\t}",
"private void send(byte[] message)\n\t\t\tthrows IOException\n\t{\n\t\tchannel.basicPublish(BUNGEECORD_QUEUE, \"\", null, message);\n\t}",
"public static void sendToKafka(FlightState fs) {\n\t\ttry {\n\t\t\tproducer.send(FlightState.kafkaAvroRecord(fs, 4));\n\t\t\tproducer.send(FlightState.kafkaAvroRecord(fs, 5));\n\t\t\tproducer.send(FlightState.kafkaAvroRecord(fs, 6));\n\t\t\tproducer.send(FlightState.kafkaAvroRecord(fs, 7));\n\t\t} catch(SerializationException e) {\n\t\t\tSystem.out.println(\"Serialization Exception: \"+e);\n\t\t} catch(IllegalArgumentException e) {\n\t\t\t// Incomplete flight state is skipped without notification\n\t\t}\n\t}",
"public void postMessage(String msg){\n System.out.println(\"Message Posted to Topic:\"+msg);\n this.message=msg;\n this.changed=true;\n notifyObservers();\n }",
"@Test\n\tpublic void test01_sendStringMessageToKafkaTopic() throws Exception {\n\t\tsender.send(UUID.randomUUID().toString(), \"Hello World!\"); // without callback\n\t\tsender.sendWithCallback(UUID.randomUUID().toString(), \"Hello World, plz callback!\"); // with callback\n\t}",
"public void onPublish(UTF8Buffer topic, Buffer payload, Runnable ack) {\n\t\t ack.run();\r\n\t\t System.out.println(\"topic\"+topic.toString()+\"=\"+new String(payload.getData()));\r\n\t\t }",
"public synchronized void sendMessage(KafkaMessage msg, String[] topic) {\r\n if (producer != null) {\r\n // Encode message\r\n JsonEncoder json = new JsonEncoder();\r\n\r\n\r\n //producer.beginTransaction(); //begin transactions\r\n try {\r\n for (int index = 0; index < topic.length; index++) {\r\n String encodedMsg = json.encode(msg);\r\n ProducerRecord<Long, String> record = new ProducerRecord<>(topic[index],\r\n encodedMsg);\r\n\r\n producer.send(record).get(); // (A??)-Synchronouse send.\r\n this.requests.mark();\r\n }\r\n //producer.commitTransaction();\r\n } catch (KafkaException e) {\r\n e.printStackTrace();\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n } catch (ExecutionException e) {\r\n e.printStackTrace();\r\n }\r\n } else {\r\n System.out.println(\"ProducerContainer is not initialized for producer \" + this.ID);\r\n }\r\n }",
"@Override\n public void messageArrived(String topic, MqttMessage message)\n throws Exception {\n\n String time = new Timestamp(System.currentTimeMillis()).toString();\n\n Log.d(TAG,\"MQTT messageArrived\");\n Log.d(TAG,\"MQTT Time:\\t\" +time +\n \" Topic:\\t\" + topic +\n \" Message:\\t\" + new String(message.getPayload()) +\n \" QoS:\\t\" + message.getQos());\n }",
"boolean deliver(String topic, Object event);",
"private void sendMessage(ICommunicationAddress receiver, IFact payload) {\n\t\tAction sendAction = retrieveAction(ICommunicationBean.ACTION_SEND);\n\t\tJiacMessage message = new JiacMessage(payload);\n\t\tinvoke(sendAction, new Serializable[] {message, receiver});\n\t\tSystem.out.println(\"BROKER SENDING \" + payload);\n\t}",
"boolean deliver(CommInfrastructure busType, String topic, String event);",
"public final void broadcast()\n\t{\n\t\ttopic.broadcast(originalMessage);\n\t}",
"@Override\n public void orderReceivedByServer(Order currentOrder, OrderConsumer server) {\n currentOrder.setTimestamp(new Date());\n LOGGER.log(server.getName() + \": received order=\" + currentOrder.toString());\n\n serverFrame.updateView(server, currentOrder);\n callback.orderReceivedByServer(currentOrder, server);\n }",
"@MessageMapping(\"/send/msg\")\n @SendTo(\"/sometopic\")\n public String sendToTopic(String content) {\n return content;\n }",
"void sendMessage(String msg) {\n\t\ttry {\n\t\t\tout.writeObject(msg);\n\t\t\tout.flush();\n\t\t\tSystem.out.println(\"Sending to client => \" + msg);\n\t\t} catch (IOException ioException) {\n\t\t\tioException.printStackTrace();\n\t\t}\n\t}",
"public void publish(MessageBroker broker, Message message) {\r\n\t\tbroker.sendMessage(message);\r\n\t}",
"public void setReceived(Order order) {\n\t\tProduct product = order.getProductId();\n\n\t\tproduct.setCurrentStock(product.getCurrentStock() + order.getQuantityMultiplier());\n\t\tproductService.update(product);\n\t\torder.setReceived(true);\n\t\tthis.update(order);\n\t}",
"public void sendMessage(String msg) {\n try {\n out.write(msg);\n out.newLine();\n out.flush();\n \n } catch (IOException e) {\n \tshutdown();\n e.printStackTrace();\n }\n }",
"private void sendMsg()\n {\n try {\n spauldingApp.println(\"AckRequest.sendMsg() - sending request to nodeID= \" + node.getNodeID() + \" ...\");\n this.nbrTransmits++;\n //spauldingApp.eventLogger.writeMsgSentPing(fetchReqMsg);\n spauldingApp.getMoteIF().send(node.getNodeID(), requestMsg);\n } catch (Exception e) {\n spauldingApp.println(\"ERROR: Can't send message: \" + e);\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic void messageArrived(String topic, MqttMessage message)\n\t throws Exception {\n\t\t\n\t}",
"@KafkaListener(topics = \"product-info\", groupId = \"test\")\n public void listen(String message) {\n Gson gson = new Gson();\n Product product = productRepository.save(gson.fromJson(message,Product.class));\n logger.info(\"*=*=*>Saving product =+=+=+==>\" +product.toString());\n categorySync(product);\n\n\n }",
"@Override\n\tpublic void msgReadyToOrder(Customer customerAgent) {\n\t\t\n\t}",
"void sendMessage(ZMQ.Socket socket);",
"public int publishToTopic(String topicId, Message message);",
"void publish(String topicName, Message message) throws IOException;",
"private void processAndPublishMessage(byte[] body) {\n Map<String, Object> props = Maps.newHashMap();\n props.put(CORRELATION_ID, correlationId);\n MessageContext mc = new MessageContext(body, props);\n try {\n msgOutQueue.put(mc);\n String message = new String(body, \"UTF-8\");\n log.debug(\" [x] Sent '{}'\", message);\n } catch (InterruptedException | UnsupportedEncodingException e) {\n log.error(ExceptionUtils.getFullStackTrace(e));\n }\n manageSender.publish();\n }",
"private void sendMsgToClient(String msg) {\n controlOutWriter.println(msg);\n }",
"public void produceMessage(String message) {\n KeyedMessage<String, String> keyedMessage = new KeyedMessage<String, String>(topic, null, message);\n producer.send(keyedMessage);\n }",
"public void receive(@Observes @JmsIncoming StockQuote quote) {\n System.out.println(\"##### received \" + quote);\n }",
"public void messageArrived(String str, MqttMessage mqttMessage) {\n\t\tString msg = new String(mqttMessage.getPayload());\n\t\tSystem.out.println(\"MQTT_SUB,\"+ System.currentTimeMillis() +\",bolt-\"+boltID+\",\"+msg);\n\t\t//System.out.println(\"------------------------------------------------------------------------------------ mqtt message is:\"+msg+\"__\"+this.controlTopic);\n\t\t\n\t\tswitch(msg) {\n\t\tcase \"SET_FORWARD\":\n\t\t\t//System.out.println(\"******************************************************************************************************************************* got:\" + msg);\n\t\t\tthis.setForward(true);\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"UNSET_FORWARD\":\n\t\t\t//System.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ got:\" + msg);\n\t\t\tthis.setForward(false);\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"SET_PAUSE\":\n\t\t\t//System.out.println(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PAUSE IS TRUE ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\n\t\t\tthis.setPause(true);\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"UNSET_PAUSE\":\n\t\t\tthis.setPause(false);\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tSystem.out.println(\"Error msg: \" + msg);\n\t\t}\n\t\t\n\t\tif(pf != isPause()) {\n\t\t\tSystem.out.println(\"OPMW_SS,\" + System.currentTimeMillis() + \",BT,bolt-\" + boltID + \",\" + pause + \",\" + forward);\n\t\t\tpf = isPause();\n\t\t}\n\t\t\n\t\tif(ff != isForward()) {\n\t\t\tSystem.out.println(\"OPMW_SS,\" + System.currentTimeMillis() + \",BT,bolt-\" + boltID + \",\" + pause + \",\" + forward);\n\t\t\tff = isForward();\n\t\t}\n\t}",
"public void rollInReceivedOrder(long storeID, long orderId)\r\n\t\t\tthrows InvalidRollInRequestException, NotInDatabaseException, UpdateException;",
"public void notifyCustomer(String message) {}",
"public void sendMessage(common.messages.KVMessage msg) throws IOException {\r\n\t\tbyte[] msgBytes = msg.getMsgBytes();\r\n\t\toutput.write(msgBytes, 0, msgBytes.length);\r\n\t\toutput.flush();\r\n\t\tlogger.debug(\"SEND \\t<\" \r\n\t\t\t\t+ clientSocket.getInetAddress().getHostAddress() + \":\" \r\n\t\t\t\t+ clientSocket.getPort() + \">: '\" \r\n\t\t\t\t+ msg.getMsg() +\"'\");\r\n }",
"public void sendMessage2Client(String msg){\n\t\t\t\n\t\t\toutPrintStream.println(msg);\n\t\t\t\n\t\t}",
"@RabbitListener(queues = {\"customer.created\"})\n public void receive(@Payload Customer customer) {\n LOGGER.info(\"Message received: {} ...\", customer);\n }",
"public void messageSent(int messageId) {\n\r\n\t}",
"@FXML\n\tpublic void setOrderToDelivered() {\n\t\tString orderNumber = Integer.toString(order.getOrderNum());\n\t\tboolean isSeen = order.isSeen();\n\t\tboolean isPreparable = order.isPreparable();\n\t\tboolean isPrepared = order.isPrepared();\n\t\tboolean isDelivered = order.isDelivered();\n\t\tif ((isSeen == true) && (isPreparable == true) && (isPrepared == true) && (isDelivered == false)) {\n\t\t\tString[] parameters = new String[1];\n\t\t\tparameters[0] = orderNumber;\n\t\t\tmainController.getPost().notifyMainController(\"SetOrderToDeliveredStrategy\", parameters);\n\t\t\tmainController.modifyOrderStatus(order.getOrderNum(), OrderStatus.DELIVERED);\n\t\t\tmainController.removeOrderFromTableView(order);\n\t\t} else {\n\t\t\tdeliveredCheckBox.setSelected(false);\n\t\t}\n\t}",
"private void sendAcknoledmentOfReceipt() {\n\t\ttry {\n\t\t\tthis.receiver.sendLetter(new AcknowledgmentOfReceipt(this.receiver, this.sender, this.getDescription()));\n\t\t} catch (NoSuchMoneyException e) {}\n\t}",
"public void sendMessage(String msg){\n \n try{\n out.writeObject(msg.toString()); \n \n }catch(Exception e){\n e.printStackTrace();\n }\n }",
"public void notifyAd(Topic topic) throws RemoteException {\r\n System.out.println(\"Topic Advertisement Received\");\r\n System.out.println(\"These are the Details: \");\r\n System.out.println(topic);\r\n receivedTopics.add(topic);\r\n }",
"void sendMessage(String msg) {\n\t\ttry {\n\t\t\tout.writeObject(msg);\n\t\t\tout.flush();\n\t\t\tSystem.out.println(\"Sending to server => \" + msg);\n\t\t} catch (IOException ioException) {\n\t\t\tioException.printStackTrace();\n\t\t}\n\t}",
"@Override\n public void channelRead(final ChannelHandlerContext ctx,final Object msg) {\n deliveryService.delivery(ctx,msg);\n }",
"private void sendMessage(Collection<? extends ClusterNode> nodes, GridTopic topic,\n GridEventStorageMessage msg, byte plc) throws IgniteCheckedException {\n ClusterNode locNode = F.find(nodes, null, F.localNode(ctx.localNodeId()));\n\n Collection<? extends ClusterNode> rmtNodes = F.view(nodes, F.remoteNodes(ctx.localNodeId()));\n\n if (locNode != null)\n ctx.io().sendToGridTopic(locNode, topic, msg, plc);\n\n if (!rmtNodes.isEmpty()) {\n msg.responseTopicBytes(U.marshal(marsh, msg.responseTopic()));\n\n ctx.io().sendToGridTopic(rmtNodes, topic, msg, plc);\n }\n }",
"@Override\n public void messageArrived(String string, MqttMessage mm) throws Exception {\n System.out.println(\"Topic==\" + string);\n System.out.println(\"message==\" + mm.toString());\n }",
"public synchronized void sendOrder(BlockingBuffer buffer,AmazonOrder order){\n try\n {\n buffer.blockingPut(order); // set value in buffer\n } catch (InterruptedException exception) {\n Thread.currentThread().interrupt();\n }\n\n }",
"private void sendTopicNumber(int topicNumber, DatagramPacket receivedPacket) throws InterruptedException {\r\n\t\tDatagramPacket[] packets = new DatagramPacket[1];\r\n\t\tbyte[] newPacketData = createPacketData(Constants.CREATION, 0, topicNumber,\r\n\t\t\t\tprocessMessageFromPacket(receivedPacket).getBytes());\r\n\t\tDatagramPacket newPacket = new DatagramPacket(newPacketData, newPacketData.length);\r\n\t\tnewPacket.setSocketAddress(receivedPacket.getSocketAddress());\r\n\t\tpackets[0] = newPacket;\r\n\t\taddItemsToQueue(packets);\r\n\t}",
"public void received()\n\t{\n\t\tdriver.findElementByName(OR.getProperty(\"Received\")).click();\n\t}",
"@Override\n\tprotected void doReceiveMessage(Message msg) {\n\t\tdeliverMessage(msg);\n\t}",
"@Test\n\tpublic void send_Receive_Log() throws Exception {\n\t\trmqBroker.drainLoggingQueue();\n\n\t\tEnvelope published = publisher.publish( brian );\t\t\t\n\t\tSystem.out.println( \">>> published: \" + published );\n\t\t\n\t\t@SuppressWarnings(\"unused\")\n\t\tEnvelope received = subscriber.receive();\n\n\t\tRunnable messageLogListener = rmqBroker.getMessageArchiver();\n\t\tThread messageLogThread = new Thread( messageLogListener );\n\t\tmessageLogThread.start();\n\t\tmessageLogThread.join();\n\t\t// Give some time to the background thread to catch up\n\t\tMessageBroker.sleep( 1000L );\n\t\t\n\t\tIterable<PersistedEnvelope> foundEnvelopes = envelopeRepository.findAll();\n\t\tList<PersistedEnvelope> persistedEnvelopes = new ArrayList<>();\n\t\tfor (PersistedEnvelope pe : foundEnvelopes) {\n\t\t\tpersistedEnvelopes.add( pe );\n\t\t}\n\t\t\n\t\tassertEquals( 1, persistedEnvelopes.size() );\n\t\tPersistedEnvelope persistedEnvelope = persistedEnvelopes.get(0);\n\t\tEnvelope foundEnvelope = persistedEnvelope.asSimpleEnvelope();\n\t\tassertEquals( published.getId(), foundEnvelope.getId() );\n\t\tassertEquals( published.getMessage(), foundEnvelope.getMessage() );\n\t\tassertEquals( State.Received, foundEnvelope.getState() );\n\t}",
"@KafkaListener(topics = \"${spring.kafka.consumer.topic.product}\")\n @LoadBalanced\n public void receiveProduct(ConsumerRecord<String, String> consumerRecord) {\n LOGGER.info(\"Received topic={}, key={}, Products={}\", consumerRecord.topic(), consumerRecord.key(), consumerRecord.value());\n if (consumerRecord.key().equals(KeySet.UPDATE_QNT_PRODUCT.toString())) {\n updateProductQnt(jsonMapperWrapper.readProductValue(consumerRecord.value()));\n }\n// latch.countDown();\n }",
"@RequestMapping(\"/send/{topic}\")\r\n\tpublic String sender(@PathVariable String topic, @RequestParam String message){\r\n\t\tproducer.sendMessageTo(topic, message);\r\n\t\treturn \"Message successfully sent.\";\r\n\t}",
"@Override\n public void messageArrived(String topic, MqttMessage message) {\n if(topic.equals(UserData.topicIn)) {\n String msg = message.toString();\n GuiUpdater.updateConsoleWithResponse(msg);\n }\n }",
"void messageSent();",
"void sendMessageToClient(long clientId, byte[] content, int prio) throws IOException, MlmqException;",
"public boolean delivery(Message msg, String topicName)\r\n\t { \r\n\t Topic thread = topics.get(topicName); //retrieves topic object\r\n\t if (!(thread.getMessage().toString()).equals(msg.toString()))//compares if the messages are equal\r\n\t \t return false;\r\n\t return true;\r\n\t }",
"public void send(Message msg);",
"private void send() {\n vertx.eventBus().publish(GeneratorConfigVerticle.ADDRESS, toJson());\n }",
"@Test\n @SuppressWarnings({\"SleepWhileInLoop\", \"empty-statement\"})\n public void testKafkaOutputOperator() throws Exception\n {\n // Setup a message listener to receive the message\n KafkaConsumer listener = new KafkaConsumer(\"topic1\");\n new Thread(listener).start();\n\n // Malhar module to send message\n // Create DAG for testing.\n LocalMode lma = LocalMode.newInstance();\n DAG dag = lma.getDAG();\n\n // Create ActiveMQStringSinglePortOutputOperator\n StringGeneratorInputOperator generator = dag.addOperator(\"TestStringGenerator\", StringGeneratorInputOperator.class);\n KafkaStringSinglePortOutputOperator node = dag.addOperator(\"Kafka message producer\", KafkaStringSinglePortOutputOperator.class);\n // Set configuration parameters for Kafka\n node.setTopic(\"topic1\");\n\n // Connect ports\n dag.addStream(\"Kafka message\", generator.outputPort, node.inputPort).setLocality(Locality.CONTAINER_LOCAL);\n\n // Create local cluster\n final LocalMode.Controller lc = lma.getController();\n lc.runAsync();\n\n Thread.sleep(2000);\n lc.shutdown();\n\n // Check values send vs received\n Assert.assertEquals(\"Number of emitted tuples\", tupleCount, listener.holdingBuffer.size());\n logger.debug(String.format(\"Number of emitted tuples: %d\", listener.holdingBuffer.size()));\n Assert.assertEquals(\"First tuple\", \"testString 1\", listener.getMessage(listener.holdingBuffer.peek()));\n\n listener.close();\n }",
"private void sendKafkaData(String kafkaConnect, String inputTopic){\n Properties props = new Properties();\n props.put(\"metadata.broker.list\", kafkaConnect);\n props.put(\"serializer.class\", \"kafka.serializer.StringEncoder\");\n props.put(\"partitioner.class\", \"kafka.producer.DefaultPartitioner\");\n props.put(\"request.required.acks\", \"1\");\n props.put(\"retry.backoff.ms\", \"1000\");\n ProducerConfig config = new ProducerConfig(props);\n \n Producer<String, String> producer = new Producer<String, String>(config);\n for(int i = 0; i < numMessages; i++) {\n String messageKey = \"key-\" + i;\n String message = Integer.toString(i);\n producer.send(new KeyedMessage<String, String>(inputTopic, messageKey, message));\n if((i + 1) % 500 == 0) {\n System.out.println(\"Send \" + (i + 1) + \" messages\");\n }\n }\n producer.close();\n }",
"private static String getDataToNotify(FoodOrder foodOrder) {\n EntityManager entityManager = DatabaseManager.getInstance().getEntityManager();\n OrderStatus orderStatus = foodOrder.getStatus();\n // some default message.\n String message = \"{\\\"hello\\\":\\\"world\\\"}\";\n // The order has just been confirmed we send all the orders to update the page.\n if (orderStatus == OrderStatus.COOKING) {\n List<FoodOrder> foodOrders = entityManager.createQuery(\"from FoodOrder foodOrder \"\n + \"where foodOrder.status = :orderStatus\",\n FoodOrder.class).setParameter(\"orderStatus\", OrderStatus.COOKING)\n .getResultList();\n // We have to add the order in question because the change hasn't been committed yet.\n foodOrders.add(foodOrder);\n\n foodOrders.sort(Comparator.comparing(FoodOrder::getTimeConfirmed));\n\n OrderData[] orderData = new OrderData[foodOrders.size()];\n for (int i = 0; i < orderData.length; i++) {\n orderData[i] = new OrderData(foodOrders.get(i));\n }\n message = JsonUtil.getInstance().toJson(orderData);\n } else if (orderStatus == OrderStatus.READY_TO_DELIVER) {\n message = \"An Order is Ready to Deliver!\";\n } else if (orderStatus == OrderStatus.READY_TO_CONFIRM) {\n message = \"A table is ready to confirm their order!\";\n }\n entityManager.close();\n\n return message;\n }",
"public synchronized void onReceipt(DatagramPacket packet) {\r\n\t\ttry {\r\n\t\t\tthis.notify();\r\n\t\t\t/*\r\n\t\t\t * if we arent receiving change our state to receiving and only take packets\r\n\t\t\t * from this port number\r\n\t\t\t */\r\n\t\t\tint packetPort = packet.getPort();\r\n\t\t\tif (currentPacketPort == null) {\r\n\t\t\t\tcurrentPacketPort = packetPort;\r\n\t\t\t}\r\n\t\t\tif (/*currentPacketPort == packetPort*/true) {\r\n\t\t\t\tbyte[] data = packet.getData();\r\n\t\t\t\tSystem.out.println(printPacketContent(packet) + \" Broker received\");\r\n\t\t\t\t/*\r\n\t\t\t\t * if its a creation check to see if the topic exists and send an ack\r\n\t\t\t\t */\r\n\t\t\t\tif (data[0] == Constants.CREATION) {\r\n\t\t\t\t\t//terminal.println(\"Creation Received From The Publisher\");\r\n\t\t\t\t\tString topic = processMessageFromPacket(packet);\r\n\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\tcheckTopic(topic, packet);\r\n\t\t\t\t\tcurrentPacketPort = null;\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if its a publication store the packets in the sorted treemap, change state to\r\n\t\t\t\t\t * receiving pub\r\n\t\t\t\t\t */\r\n\t\t\t\t} else if (data[0] == Constants.PUBLICATION) {\r\n\t\t\t\t\t//terminal.println(\"Publication Received From The Publisher\");\r\n\t\t\t\t\tstate = Constants.BKR_RECEIVING_PUB;\r\n\t\t\t\t\t//add check to see if it is for the currentTransmission\r\n\t\t\t\t\taddToReceivedPackets(packet);\r\n\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * its a subscription add the subscriber to the topic if it exists and send an\r\n\t\t\t\t\t * ack\r\n\t\t\t\t\t */\r\n\t\t\t\t} else if (data[0] == Constants.SUBSCRIPTION) {\r\n\t\t\t\t\t//terminal.println(\"Subscription recieved from Subscriber.\");\r\n\t\t\t\t\tString topic = processMessageFromPacket(packet);\r\n\t\t\t\t\tif (subscriberMap.containsKey(topic)) {\r\n\t\t\t\t\t\tArrayList<Integer> subscriberPorts = subscriberMap.get(topic);\r\n\t\t\t\t\t\tif(!subscriberPorts.contains(packet.getPort())) {\r\n\t\t\t\t\t\t\tsubscriberMap.get(topic).add(packet.getPort());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if its an unsubscription remove that sub from the topics list of port numbers\r\n\t\t\t\t\t */\r\n\t\t\t\t} else if (data[0] == Constants.UNSUBSCRIPTION) {\r\n\t\t\t\t\t//terminal.println(\"Unsubscription recieved from Subscriber.\");\r\n\t\t\t\t\tString topic = processMessageFromPacket(packet);\r\n\t\t\t\t\tif (subscriberMap.containsKey(topic)) {\r\n\t\t\t\t\t\tArrayList<Integer> topicSubscriptions = subscriberMap.get(topic);\r\n\t\t\t\t\t\tfor (int index = 0; index < topicSubscriptions.size(); index++) {\r\n\t\t\t\t\t\t\tif (topicSubscriptions.get(index) == packet.getPort()) {\r\n\t\t\t\t\t\t\t\ttopicSubscriptions.remove(index);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if its an ack remove the acked packet from the queue\r\n\t\t\t\t\t */\r\n\t\t\t\t} else if (data[0] == Constants.ACK) {\r\n\t\t\t\t\t// remove the acked packet from packetsAwaitingAck\r\n\t\t\t\t\t//TODO if the ack has something in the message part that\r\n\t\t\t\t\t//its for a endoftransmission then\r\n\t\t\t\t\tremoveAckedPacketFromPacketsToSend(packet);\t\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if its the end of a transmission change state back to receiving and publish\r\n\t\t\t\t\t * the packets received\r\n\t\t\t\t\t */\r\n\t\t\t\t} else if (data[0] == Constants.ENDOFTRANSMISSION) {\r\n\t\t\t\t\t//if the end of transmission is for the current publication\r\n\t\t\t\t\t//then invoke publishMessage and change our state to idle\r\n\t\t\t\t\tif (state == Constants.BKR_RECEIVING_PUB && checkIsEndOfCurrentPub(packet)) {\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t\tpublishMessage();\r\n\t\t\t\t\t\tstate = Constants.BKR_DEFAULT_STATE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\n public void deliveryComplete(IMqttDeliveryToken arg0) {\n try {\n if(arg0.getMessage()==null){\n //messageDelivered = true;\n }\n } catch (MqttException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"public void sendMsgToClient() {\n\n try {\n\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())), true);\n\n Log.d(TAG, \"The transmitted data:\" + msg);\n\n writer.println(msg);\n\n } catch (Exception e) {\n\n e.printStackTrace();\n\n }\n\n }",
"public void onMessage(ClientSubscription subscription,\n HazelcastMQMessage msg);",
"@CrossOrigin(origins=\"http://localhost:8080\")\n @KafkaListener(topics = \"sensor_data\")\n public void listen(ConsumerRecord<?, ?> cr){\n log.info(\"Message received from {}: {} .\", cr.key(), cr.value());\n \n JSONParser parser = new JSONParser();\n try {\n JSONObject jsonMessage = (JSONObject) parser.parse(cr.value().toString());\n\n // create response with sensor id, timestamp and readed value\n JSONObject jsonResponse = new JSONObject();\n jsonResponse.put(\"id\", cr.key());\n jsonResponse.put(\"timestamp\", (String) jsonMessage.get(\"timestamp\"));\n jsonResponse.put(\"value\", (String) jsonMessage.get(\"value\")); \n \n this.simpTemplate.convertAndSend(\"/topic/sensors\", jsonResponse.toString());\n log.info(\"Message sent to the websockets.\");\n } catch (ParseException ex) {\n log.error(\"Could not parse the message received from the sensor \" + cr.key()+\": \"+cr.value());\n }\n }",
"@Override\n\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\"topic 消息类型开始产生消息 \" + \"生产者: \" + Thread.currentThread().getName());\n\t\t\t\ttry {\n\t\t\t\t\t\t/**第一步 创建连接工厂*/\n\t\t\t\t\t\tfactory = new ActiveMQConnectionFactory(MqConfigConstants.USERNAME, MqConfigConstants.PASSWORD, MqConfigConstants.BROKEURL_ALI);\n\t\t\t\t\t\t/**第二步 创建JMS 连接*/\n\t\t\t\t\t\tConnection connection = factory.createConnection();\n\t\t\t\t\t\tconnection.start();\n\t\t\t\t\t\t/** 第三步 创建Session,开启事务 */\n\t\t\t\t\t\tSession session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);\n\t\t\t\t\t\t/** 第四步: 创建topic,Topic是 Destination接口的子接口*/\n\t\t\t\t\t\tTopic topic = session.createTopic(MqConfigConstants.TopicName);\n\t\t\t\t\t\t/** 第五步 创建生产者producer */\n\t\t\t\t\t\tMessageProducer producer = session.createProducer(topic);\n\n\t\t\t\t\t\t/** 设置消息不需要持久化 */\n\t\t\t\t\t\tproducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);\n\t\t\t\t\t\t//发送文本消息\n\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\t\t/** 第六步 发送消息 */\n\t\t\t\t\t\t\t\tMessage message = createMessage(session,\"vincent\",27,\"江西省赣州市\");\n\t\t\t\t\t\t\t\tproducer.send(message);\n\t\t\t\t\t\t\t\tsession.commit();//开启事务必须需要提交,消费者才能获取到\n\t\t\t\t\t\t\t\tSystem.out.println(\"发送消息: \" +message.toString() );\n\t\t\t\t\t\t\t\tThread.sleep(200);\n\t\t\t\t\t\t}\n\t\t\t\t} catch (JMSException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}",
"public void broadcast(String message){\n Iterator it = subscribedClientsOutputStreams.iterator(); \n while(it.hasNext()){\n try{\n PrintWriter writer = (PrintWriter) it.next();\n writer.println(message);\n writer.flush();\n }catch(Exception ex){\n ex.printStackTrace();\n }\n }\n }",
"@Scheduled(fixedRate = 1000)\n private void send(){\n jmsTemplate.send(\"test.messages\", session -> {\n TextMessage message = session.createTextMessage(Instant.now().toString());\n return message;\n });\n }",
"public void sendmsg(Message msg){\n try {\n oos.writeObject(new Datapacket(1, null, msg,null, null));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void publish( String msg )\n {\n lastMessage = msg;\n System.out.println( msg );\n }",
"@Override\n\t\t\t\t\tpublic void sendMessage(String message) {\n\t\t\t\t\t\tString toSend = \"<append><topic>\" + xmlData.get(\"topic\") +\"</topic><user>\" + username + \"</user><msg>\" + message + \"</msg></append>\";\n\t\t\t\t\t\tsendData(toSend);\n\t\t\t\t\t}",
"default void onMessageReceived(Group group, Message message, Ordering ordering) {}",
"int markMessageAsRead(String msgId, long timestampDisplayed);"
] |
[
"0.6709554",
"0.63692266",
"0.6306248",
"0.61487687",
"0.6038939",
"0.6038598",
"0.5971001",
"0.58872175",
"0.58596146",
"0.5818123",
"0.5788833",
"0.57573074",
"0.5754925",
"0.5694619",
"0.5639414",
"0.5616895",
"0.5590712",
"0.55445635",
"0.55196357",
"0.5518391",
"0.55180746",
"0.5494598",
"0.5494142",
"0.5492866",
"0.5469033",
"0.54518217",
"0.54440963",
"0.5443008",
"0.5442949",
"0.5437613",
"0.5433849",
"0.54250574",
"0.5419286",
"0.5411546",
"0.53684205",
"0.53567266",
"0.5356212",
"0.53561664",
"0.52633005",
"0.5250976",
"0.5250785",
"0.5234334",
"0.5229978",
"0.52134126",
"0.5195238",
"0.5168909",
"0.5141242",
"0.514026",
"0.5136864",
"0.51272357",
"0.51238114",
"0.512118",
"0.5118969",
"0.5107057",
"0.51019806",
"0.5097043",
"0.50926524",
"0.5082067",
"0.5075782",
"0.5070744",
"0.5066428",
"0.50593567",
"0.5059032",
"0.50552195",
"0.5054994",
"0.50421166",
"0.5033677",
"0.50292003",
"0.50275445",
"0.5019463",
"0.501707",
"0.50170666",
"0.5015692",
"0.50156",
"0.5009099",
"0.50084704",
"0.49992552",
"0.49937928",
"0.4981248",
"0.4974383",
"0.49657086",
"0.49639815",
"0.49636784",
"0.49483362",
"0.49472845",
"0.49455166",
"0.49443197",
"0.49257445",
"0.49230582",
"0.49126932",
"0.49045798",
"0.49036458",
"0.49018142",
"0.48951638",
"0.4887486",
"0.48808098",
"0.4880043",
"0.4869617",
"0.48690933",
"0.48689693"
] |
0.66317993
|
1
|
Sets the created at and updated at date time 'timestamps' to now.
|
void setCreationDateTimes(final Order order) {
final LocalDateTime now = LocalDateTime.now();
order.setCreatedAt(now);
order.setUpdatedAt(now);
order.getData().setOrderedAt(now);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setCreatedAt(Timestamp value) {\n setAttributeInternal(CREATEDAT, value);\n }",
"public void setCreated(Timestamp created) {\n this.created = created;\n }",
"public void setCreatedOn(DateTime createdOn);",
"@Override\r\n\tpublic void setCreated(LocalDateTime created) {\n\t\tthis.created = created;\t\t\r\n\t}",
"public void setCreatedAt( Date createdAt ) {\n this.createdAt = createdAt;\n }",
"public void setCreatedAt(final ZonedDateTime createdAt);",
"@PrePersist\r\n void createdAt() {\r\n setDateRecordAdded();\r\n setDateRecordUpdated();\r\n }",
"public void setCreatedAt(long createdAt) {\n this.createdAt = createdAt;\n }",
"public void setCreatedAt(Long createdAt) {\n this.createdAt = createdAt;\n }",
"public void setCreatedAt(Date createdAt) {\r\n this.createdAt = createdAt;\r\n }",
"public void setCreatedAt(Date createdAt) {\r\n this.createdAt = createdAt;\r\n }",
"public void setCreatedDate(Timestamp value) {\n setAttributeInternal(CREATEDDATE, value);\n }",
"void setLastUpdatedTime();",
"public void setCreatedAt(Date createdAt) {\r\n\t\tthis.createdAt = createdAt;\r\n\t}",
"public void setCreatedAt(Date createdAt) {\n this.createdAt = createdAt;\n }",
"public void setCreatedAt(Date createdAt) {\n this.createdAt = createdAt;\n }",
"public void setCreatedAt(Date createdAt) {\n this.createdAt = createdAt;\n }",
"public void setCreatedAt(Date createdAt) {\n this.createdAt = createdAt;\n }",
"public void setCreatedAt(Date createdAt) {\n this.createdAt = createdAt;\n }",
"public void setCreatedAt(Date createdAt) {\n this.createdAt = createdAt;\n }",
"public void setCreatedAt(Date createdAt) {\n this.createdAt = createdAt;\n }",
"public void setCreatedDateTime(DateTime createdDateTime) {\n this.createdDateTime = createdDateTime;\n }",
"public void setCreatedAt(Date createdAt) {\n\t\tthis.createdAt = createdAt;\n\t}",
"public void setCreatedAt(String createdAt) {\n this.createdAt = createdAt;\n }",
"public void setCreatedAt(String createdAt) {\n this.createdAt = createdAt;\n }",
"@NoProxy\n public void setDtstamps(final Timestamp val) {\n DateTime dt = new DateTime(val);\n setDtstamp(new DtStamp(dt).getValue());\n setLastmod(new LastModified(dt).getValue());\n setCtoken(getLastmod() + \"-\" + hex4FromNanos(val.getNanos()));\n\n if (getCreated() == null) {\n setCreated(new Created(dt).getValue());\n }\n }",
"public void now() {\n localDate = LocalDate.now();\n localDateTime = LocalDateTime.now();\n javaUtilDate = new Date();\n auditEntry = \"NOW\";\n instant = Instant.now();\n }",
"public void setLastUpdatedAt(Timestamp value) {\n setAttributeInternal(LASTUPDATEDAT, value);\n }",
"void setCreatedDate(Date createdDate);",
"public void setCreatedDate(Timestamp aCreatedDate) {\n createdDate = aCreatedDate;\n }",
"public void setCreatedOn(Timestamp createdOn) {\r\n\t\tthis.createdOn = createdOn;\r\n\t}",
"public void setCreateTime(LocalDateTime timestamp) \n {\n createTime = timestamp;\n }",
"public void setCreatedAt(java.util.Date createdAt) {\n this.createdAt = createdAt;\n }",
"public void setCreatedAt(java.util.Date createdAt) {\n this.createdAt = createdAt;\n }",
"public void setCreatedAt(java.util.Date createdAt) {\n this.createdAt = createdAt;\n }",
"@SuppressWarnings(\"JdkObsolete\")\n public void setCreated(Instant date) {\n this.created = Timestamp.from(date);\n }",
"public void setCreated(java.sql.Timestamp newValue) {\n\tthis.created = newValue;\n}",
"public void setCreated(Date created) {\r\n this.created = created;\r\n }",
"public void setCreated(Date created) {\r\n this.created = created;\r\n }",
"public void setCreatedAt(Date value) {\n setAttributeInternal(CREATEDAT, value);\n }",
"public void setCreatedAt(Date value) {\n setAttributeInternal(CREATEDAT, value);\n }",
"protected synchronized void updateTimestamp() {\n\t\ttimestamp = System.currentTimeMillis();\n\t}",
"public void setCreatedDateTime(ZonedDateTime createdDateTime) {\n this.createdDateTime = createdDateTime;\n }",
"public void setCreated(Date created) {\n this.created = created;\n }",
"public void setCreated(Date created) {\n this.created = created;\n }",
"public void setCreated(Date created) {\n this.created = created;\n }",
"public void setCreated(Date created) {\n this.created = created;\n }",
"public void setCreateModifiedDate(Timestamp aCreateModifiedDate) {\n createModifiedDate = aCreateModifiedDate;\n }",
"public void setCreateModifiedDate(Timestamp aCreateModifiedDate) {\n createModifiedDate = aCreateModifiedDate;\n }",
"public void setCreateModifiedDate(Timestamp aCreateModifiedDate) {\n createModifiedDate = aCreateModifiedDate;\n }",
"private void updateTimeStamp() {\n\t\tthis.timeStamp = new Timestamp(System.currentTimeMillis());\n\t}",
"public void setCreatedTs(Date createdTs) {\n\t\tthis.createdTs = createdTs;\n\t}",
"@JsonProperty(\"created_at\")\n public void setCreatedAt(Date createdAt) {\n this.createdAt = createdAt;\n }",
"public void setCreatedDate(Date createdDate);",
"public void setCreatedTime(LocalDateTime value) {\n set(5, value);\n }",
"public void setCreated(Date created) {\r\n\t\tthis.created = created;\r\n\t}",
"public void setCreated(Date created) {\r\n\t\tthis.created = created;\r\n\t}",
"public void setCreateTimestamp(Date createTimestamp) {\r\n this.createTimestamp = createTimestamp;\r\n }",
"public void setCreated(Date v) \n {\n \n if (!ObjectUtils.equals(this.created, v))\n {\n this.created = v;\n setModified(true);\n }\n \n \n }",
"public void setCreated( java.sql.Timestamp newValue ) {\n __setCache(\"created\", newValue);\n }",
"public void setCreationTime(DateTime creationTime) {\n this.created = creationTime;\n }",
"public void setCreateTimestamp(Date createTimestamp) {\n this.createTimestamp = createTimestamp;\n }",
"public void setCreatedAt(Date date) {\n\t\t\n\t}",
"@NoProxy\n public void updateDtstamp() {\n setDtstamp(new DtStamp(new DateTime(true)).getValue());\n }",
"public TimeStamp(){\n\t\tdateTime = LocalDateTime.now();\n\t}",
"public Date getCreatedAt() {\r\n return createdAt;\r\n }",
"public Date getCreatedAt() {\r\n return createdAt;\r\n }",
"public Date getCreatedAt() {\n return createdAt;\n }",
"public Date getCreatedAt() {\n return createdAt;\n }",
"public Date getCreatedAt() {\n return createdAt;\n }",
"public Date getCreatedAt() {\n return createdAt;\n }",
"public Date getCreatedAt() {\n return createdAt;\n }",
"public Date getCreatedAt() {\n return createdAt;\n }",
"public Date getCreatedAt() {\n return createdAt;\n }",
"public Date getCreatedAt() {\n return createdAt;\n }",
"public Timestamp() {\n makeNow();\n }",
"public void setCreatedAt(final Date value)\n\t{\n\t\tsetCreatedAt( getSession().getSessionContext(), value );\n\t}",
"public void setTimestamp() {\n timestamp = System.nanoTime();\n }",
"public void setCreationTimestamp(java.util.Date creationTimestamp) {\n this.creationTimestamp = creationTimestamp;\n }",
"public Date getCreatedAt() {\r\n\t\treturn createdAt;\r\n\t}",
"public void setUpdatedAt( Date updatedAt ) {\n this.updatedAt = updatedAt;\n }",
"@Override\n\tpublic void setLastUpdatedTime(Date lastUpdated) {\n\n\t}",
"public void setUpdatedOn(Date updatedOn);",
"public void setCreatedDate(LocalDateTime createdDate) {\n this.createdDate = createdDate;\n }",
"public void setCreatedAt(final SessionContext ctx, final Date value)\n\t{\n\t\tsetProperty(ctx, CREATEDAT,value);\n\t}",
"public void setCreatedate(Date createdate) {\r\n this.createdate = createdate;\r\n }",
"public void setCreatedate(Date createdate) {\r\n this.createdate = createdate;\r\n }",
"public void setDateCreated(Date dateCreated);",
"public DateTime getCreatedAt() {\n return this.createdAt;\n }",
"@java.lang.Override\n public com.google.protobuf.Timestamp getCreatedAt() {\n return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;\n }",
"@java.lang.Override\n public com.google.protobuf.Timestamp getCreatedAt() {\n return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;\n }",
"public Date getCreatedAt() {\n\t\treturn createdAt;\n\t}",
"public void setUpdateDatetime(Date updateDatetime);",
"public void setUpdatedAt(Date updatedAt) {\r\n this.updatedAt = updatedAt;\r\n }",
"public void setUpdatedAt(Date updatedAt) {\r\n this.updatedAt = updatedAt;\r\n }",
"public void setUpdatedAt(Date updatedAt) {\r\n this.updatedAt = updatedAt;\r\n }",
"public void setCreatedate(Date createdate) {\n this.createdate = createdate;\n }",
"public void setCreatedate(Date createdate) {\n this.createdate = createdate;\n }",
"public void setCreatedate(Date createdate) {\n this.createdate = createdate;\n }",
"public void setCreatedate(Date createdate) {\n this.createdate = createdate;\n }"
] |
[
"0.6785111",
"0.66643435",
"0.6616319",
"0.649848",
"0.63866776",
"0.6372061",
"0.6369535",
"0.6367599",
"0.63468665",
"0.633895",
"0.633895",
"0.6325532",
"0.6325094",
"0.63050926",
"0.6303485",
"0.6303485",
"0.6303485",
"0.6303485",
"0.6303485",
"0.6303485",
"0.6303485",
"0.63025784",
"0.6289273",
"0.62064046",
"0.62064046",
"0.6206303",
"0.61741805",
"0.61683184",
"0.61476946",
"0.614139",
"0.6127414",
"0.6080753",
"0.6077149",
"0.6077149",
"0.6077149",
"0.6051835",
"0.60510045",
"0.60458744",
"0.60458744",
"0.6041821",
"0.6041821",
"0.60310596",
"0.6013938",
"0.60136896",
"0.60136896",
"0.60136896",
"0.60136896",
"0.60037714",
"0.60037714",
"0.60037714",
"0.5999069",
"0.598698",
"0.597328",
"0.5967963",
"0.59664625",
"0.59467775",
"0.59467775",
"0.5945588",
"0.59187406",
"0.5913679",
"0.5891061",
"0.5870948",
"0.58659333",
"0.58647406",
"0.58578485",
"0.58513945",
"0.58513945",
"0.5794693",
"0.5794693",
"0.5794693",
"0.5794693",
"0.5794693",
"0.5794693",
"0.5794693",
"0.5794693",
"0.57936317",
"0.57897687",
"0.5776206",
"0.57731336",
"0.57592386",
"0.57445127",
"0.57421887",
"0.57304007",
"0.5722039",
"0.5713303",
"0.5712455",
"0.5712455",
"0.57027155",
"0.5689738",
"0.56894827",
"0.56894827",
"0.5685977",
"0.5685157",
"0.5680439",
"0.5680439",
"0.5680439",
"0.566187",
"0.566187",
"0.566187",
"0.566187"
] |
0.6450516
|
4
|
now create constructor and getter setter method using shortcut like command+n for mac & Alt+Insert for window.
|
public Aliments(boolean isSelected, String userName) {
this.isSelected = isSelected;
this.userName = userName;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void addConstructors() {\n\t\tthis.rootBindingClass.getConstructor().body.line(\"super({}.class);\\n\", this.name.getTypeWithoutGenerics());\n\t\tGMethod constructor = this.rootBindingClass.getConstructor(this.name.get() + \" value\");\n\t\tconstructor.body.line(\"super({}.class);\", this.name.getTypeWithoutGenerics());\n\t\tconstructor.body.line(\"this.set(value);\");\n\t}",
"ActionNew()\n {\n super(\"New\");\n this.setShortcut(UtilGUI.createKeyStroke('N', true));\n }",
"public NewAction() {\n\t\tsuper(\"New...\", null);\n\t\tputValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_N, MAIN_MENU_MASK));\n\t}",
"public MonkeysWithUI() {\n\t\tsuper(new Monkeys(System.currentTimeMillis()));\n\t\t// give deers and predators the field to set them in and the deer the berries\n\t\t// also\n\t}",
"private void __sep__Constructors__() {}",
"public Command getStartC () {\nif (startC == null) {//GEN-END:|42-getter|0|42-preInit\n // write pre-init user code here\nstartC = new Command (\"Start\", Command.OK, 0);//GEN-LINE:|42-getter|1|42-postInit\n // write post-init user code here\n}//GEN-BEGIN:|42-getter|2|\nreturn startC;\n}",
"private void createCommands()\n{\n exitCommand = new Command(\"Exit\", Command.EXIT, 0);\n helpCommand=new Command(\"Help\",Command.HELP, 1);\n backCommand = new Command(\"Back\",Command.BACK, 1);\n}",
"Command createCommand();",
"private void createActions() {\r\n\t\tcreateBlankDocument.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control N\"));\r\n\t\tcreateBlankDocument.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_N);\r\n\t\t\r\n\t\topenDocumentAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control O\"));\r\n\t\topenDocumentAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_O);\r\n\t\t\r\n\t\tsaveDocumentAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control S\"));\r\n\t\tsaveDocumentAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_S);\r\n\t\t\r\n\t\tsaveDocumentAsAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"alt S\"));\r\n\t\tsaveDocumentAsAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_S);\r\n\t\t\r\n\t\tcloseCurrentTabAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control W\"));\r\n\t\tcloseCurrentTabAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_W);\r\n\r\n\t\tcopyAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control C\"));\r\n\t\tcopyAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_C);\r\n\r\n\t\tcutAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control X\"));\r\n\t\tcutAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_X);\r\n\t\r\n\t\tpasteAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control V\"));\r\n\t\tpasteAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_V);\r\n\r\n\t\tgetStatsAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"alt I\"));\r\n\t\tgetStatsAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_I);\r\n\t\t\r\n\t\ttoUpperCaseAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control U\"));\r\n\t\ttoUpperCaseAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_U);\r\n\t\t\r\n\t\ttoLowerCaseAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control L\"));\r\n\t\ttoLowerCaseAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_L);\r\n\t\t\r\n\t\tinvertSelected.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control I\"));\r\n\t\tinvertSelected.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_I);\r\n\t\t\r\n\t\tuniqueLinesAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control Q\"));\r\n\t\tuniqueLinesAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_Q);\r\n\t\t\r\n\t\tsortAscAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"alt A\"));\r\n\t\tsortAscAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_A);\r\n\t\t\r\n\t\tsortDescAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"alt D\"));\r\n\t\tsortDescAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_D);\r\n\r\n\t\texitAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"alt F4\"));\r\n\t\texitAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_X);\r\n\t}",
"Property createProperty();",
"private NKE_BrowserWindow() {}",
"private Shell() { }",
"private TerminalProperties() {\n this(new TerminalPropertiesBuilder());\n }",
"private void addStandardBindings() {\n inmap = new InputMap();\n acmap = new ActionMap();\n\n Action copy = ActionTable.getAction(Actions.COPY_ACTION);\n inmap.put((KeyStroke) copy.getValue(Action.ACCELERATOR_KEY), copy.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(copy.getValue(Action.ACTION_COMMAND_KEY), copy);\n\n Action cut = ActionTable.getAction(Actions.CUT_ACTION);\n inmap.put((KeyStroke) cut.getValue(Action.ACCELERATOR_KEY), cut.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(cut.getValue(Action.ACTION_COMMAND_KEY), cut);\n\n Action paste = ActionTable.getAction(Actions.PASTE_ACTION);\n inmap.put((KeyStroke) paste.getValue(Action.ACCELERATOR_KEY), paste.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(paste.getValue(Action.ACTION_COMMAND_KEY), paste);\n\n Action help = ActionTable.getAction(Actions.HELP_ACTION);\n inmap.put((KeyStroke) help.getValue(Action.ACCELERATOR_KEY), help.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(help.getValue(Action.ACTION_COMMAND_KEY), help);\n\n Action open = ActionTable.getAction(OPEN_ACTION);\n inmap.put((KeyStroke) open.getValue(Action.ACCELERATOR_KEY), open.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(open.getValue(Action.ACTION_COMMAND_KEY), open);\n\n Action save = ActionTable.getAction(SAVE_ACTION);\n inmap.put((KeyStroke) save.getValue(Action.ACCELERATOR_KEY), save.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(save.getValue(Action.ACTION_COMMAND_KEY), save);\n\n Action newA = ActionTable.getAction(NEW_ACTION);\n inmap.put((KeyStroke) newA.getValue(Action.ACCELERATOR_KEY), newA.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(newA.getValue(Action.ACTION_COMMAND_KEY), newA);\n\n Action close = ActionTable.getAction(CLOSE_ACTION);\n inmap.put((KeyStroke) close.getValue(Action.ACCELERATOR_KEY), close.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(close.getValue(Action.ACTION_COMMAND_KEY), close);\n\n Action select = ActionTable.getAction(SELECT_ALL_ACTION);\n inmap.put((KeyStroke) select.getValue(Action.ACCELERATOR_KEY), select.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(select.getValue(Action.ACTION_COMMAND_KEY), select);\n\n Action find = ActionTable.getAction(FIND_ACTION);\n inmap.put((KeyStroke) find.getValue(Action.ACCELERATOR_KEY), find.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(find.getValue(Action.ACTION_COMMAND_KEY), find);\n\n Action group = ActionTable.getAction(GROUP_ACTION);\n inmap.put((KeyStroke) group.getValue(Action.ACCELERATOR_KEY), group.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(group.getValue(Action.ACTION_COMMAND_KEY), group);\n\n Action ungroup = ActionTable.getAction(UNGROUP_ACTION);\n inmap.put((KeyStroke) ungroup.getValue(Action.ACCELERATOR_KEY), ungroup.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(ungroup.getValue(Action.ACTION_COMMAND_KEY), ungroup);\n\n Action zoomout = ActionTable.getAction(ZOOMOUT_ACTION);\n inmap.put((KeyStroke) zoomout.getValue(Action.ACCELERATOR_KEY), zoomout.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(zoomout.getValue(Action.ACTION_COMMAND_KEY), zoomout);\n\n Action zoomin = ActionTable.getAction(ZOOMIN_ACTION);\n inmap.put((KeyStroke) zoomin.getValue(Action.ACCELERATOR_KEY), zoomin.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(zoomin.getValue(Action.ACTION_COMMAND_KEY), zoomin);\n\n Action incIn = ActionTable.getAction(INC_INPUT_NODES_ACTION);\n inmap.put((KeyStroke) incIn.getValue(Action.ACCELERATOR_KEY), incIn.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(incIn.getValue(Action.ACTION_COMMAND_KEY), incIn);\n\n Action incOut = ActionTable.getAction(INC_OUTPUT_NODES_ACTION);\n inmap.put((KeyStroke) incOut.getValue(Action.ACCELERATOR_KEY), incOut.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(incOut.getValue(Action.ACTION_COMMAND_KEY), incOut);\n\n Action decIn = ActionTable.getAction(DEC_INPUT_NODES_ACTION);\n inmap.put((KeyStroke) decIn.getValue(Action.ACCELERATOR_KEY), decIn.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(decIn.getValue(Action.ACTION_COMMAND_KEY), decIn);\n\n Action decOut = ActionTable.getAction(DEC_OUTPUT_NODES_ACTION);\n inmap.put((KeyStroke) decOut.getValue(Action.ACCELERATOR_KEY), decOut.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(decOut.getValue(Action.ACTION_COMMAND_KEY), decOut);\n }",
"public void setNew();",
"private static org.netbeans.beaninfo.editors.HtmlBrowser.FactoryEditor createHtmlBrowserFactoryEditor() {\n return new org.netbeans.beaninfo.editors.HtmlBrowser.FactoryEditor(){\n public void setValue(Object value) {\n setWWWBrowser((HtmlBrowser.Factory)value);\n }\n\n public Object getValue() {\n return getWWWBrowser();\n }\n };\n }",
"public Command createInstance() {\n\t\t\n\t\tif(name == \"Direction\")\n\t\t\treturn new Direction();\n\t\t\n\t\tif(name == \"Gear\")\n\t\t\treturn new Gear();\n\t\t\n\t\tif(name == \"Pause\")\n\t\t\treturn new Pause();\n\t\t\n\t\treturn null;\n\t\t\n\t}",
"private Command() {\n initFields();\n }",
"public CommandMAN() {\n super();\n }",
"private PropertyAccess() {\n\t\tsuper();\n\t}",
"Commands createCommands();",
"public TextBox getTextTB () {\nif (textTB == null) {//GEN-END:|38-getter|0|38-preInit\n // write pre-init user code here\ntextTB = new TextBox (\"Lyric\", \"None\", 500, TextField.ANY | TextField.UNEDITABLE);//GEN-BEGIN:|38-getter|1|38-postInit\ntextTB.addCommand (getBackCommand1 ());\ntextTB.addCommand (getStartC ());\ntextTB.setCommandListener (this);\ntextTB.setInitialInputMode (\"UTF8\");//GEN-END:|38-getter|1|38-postInit\n // write post-init user code here\n}//GEN-BEGIN:|38-getter|2|\nreturn textTB;\n}",
"public Methods() { // ini adalah sebuah construktor kosong tidak ada parameternya\n System.out.println(\"Ini adalah Sebuah construktor \");\n }",
"public ConsoleController() {\n\t\tcommandDispatch = new CommandDispatch();\n\t}",
"private AbstractTerminal()\n\t{\n\t\tio = new SwingTextTerminal();\n\t}",
"protected abstract Object makeNew(final String prefix, final int seqno);",
"private Help() {\n // hidden constructor\n }",
"public String getSetter() {\n return \"set\" + getCapName();\n }",
"public IfController()\n\t{\n\t\t// String title111 = JOptionPane.showInputDialog(\"What is the title of your\n\t\t// movie?\");\n\t\t// String YearReleased111 = JOptionPane.showInputDialog(\"What year was it\n\t\t// released?\");\n\t\t// String RunTime111 = JOptionPane.showInputDialog(\"What is the run time of your\n\t\t// movie?\");\n\t\t// String Comedy111 = JOptionPane.showInputDialog(\"Is your movie a comedy?\");\n\n\t\tmyProperties = new Properties(\"The Man Who Knew Too Little\", 1997, 94.0, true);\n\t\t// myProperties = new Properties(\"The Man Who Knew Too Little\", 1997, 94.0, true\n\t\t// );\n\t}",
"public CommandDirector() {\n\t\t//factory = ApplicationContextFactory.getInstance();\n\t\t//context = factory.getClassPathXmlApplicationContext();\n\t\t\n\t\t//commands.put(\"createEntry\", context.getBean(\"creationEntryCommand\", CreationEntryCommand.class));\n\t\t//commands.put(\"searchEntry\", context.getBean(\"searchingEntryCommand\", SearchingEntryCommand.class));\n\t\t\n\t\tcommands.put(\"createEntry\", new CreationEntryCommand());\n\t\tcommands.put(\"searchEntry\", new SearchingEntryCommand());\n\t\t\n\t}",
"private PropertySetFactory() {}",
"public static void __init() {\r\n\t\t__name__ = new str(\"code\");\r\n\r\n\t\t/**\r\n\t\t copyright Sean McCarthy, license GPL v2 or later\r\n\t\t*/\r\n\t\tdefault_0 = null;\r\n\t\tcl_Code = new class_(\"Code\");\r\n\t}",
"private VirtualKeyboard()\r\n\t{}",
"@SuppressWarnings (\"unchecked\")\r\n\t@Override\r\n\tpublic <T> T create ()\r\n\t{\r\n\t\tFxCharmView fxView = new FxCharmView ();\r\n\t\tfxView.registerSpecialType (IntValueView.class, new FxIntDisplayFactory ());\r\n\t\tfxView.registerSpecialType (BooleanView.class, new FxBooleanDisplayFactory ());\r\n\t\tnew Stylesheet (\"skin/platform/tooltip.css\").applyToParent (fxView.getNode ());\r\n\t\treturn (T) fxView;\r\n\t}",
"public abstract void setCommand(String cmd);",
"private SystemValue(final String nm, final Object obj, final Field field, final Consumer<V> method) {\n\t super(nm, Type.SYSTEM, false);\n\n\t object = obj;\n\t getField = field;\n\t setMethod = method;\n\t}",
"public MakeCPMLEditableTool(){\n\t}",
"public Terminal() {\n initComponents();\n }",
"public CalcWindow (){\n\t\tsuper();\n\t\tsetProperties(\"Calculator\");\n\t}",
"private ChainingMethods() {\n // private constructor\n\n }",
"SourceControl create();",
"public MovieManager(GenesisGetters genesisGetters)\r\n/* 151: */ {\r\n/* 152:150 */ setName(\"Video manager\");\r\n/* 153:151 */ this.gauntlet = genesisGetters;\r\n/* 154: */ }",
"public Command() {\r\n\t\t// If default, use a local one.\r\n\t\tmYCommandRegistry = LocalCommandRegistry.getGlobalRegistryStatic();\r\n\t}",
"public void setupConvenienceObjects();",
"public MethodBuilder() {\n\t\tvisibility = \"public\";\n\t\treturnType = \"void\";\n\t\tname = \"foo\";\n\t\trule = \"\";\n\t\ttype = \"\";\n\t\tparameters = new ArrayList<String>();\n\t\tcommands = new ArrayList<String>();\n\t}",
"public void instantiateCommand() throws SystemException {\r\n\t\t// Check the definitation.\r\n\t\tdefinitionCheck();\r\n\t\t\r\n\t\t// Create the fresh instance.\r\n\t\tcommandInstance = new ReadWriteableAttributes();\r\n\t}",
"private Get() {}",
"private Get() {}",
"public AbstractWorkspacebaseproperty()\n {\n }",
"OBJECT createOBJECT();",
"public abstract S createWindowState();",
"private CommandLine() {\n\t}",
"protected Caret createCaret() {\n return new BasicCaret();\n }",
"Set method_1560(Object var1) {\n return new class_475(this, var1);\n }",
"public EditorFactoryImpl() {\n\t\tsuper();\n\t}",
"private ConsoleUtils(String name) {\n instance = this;\n fConsole = new IOConsole(\"Mobius\" + name + \" Console\", EImages.TOOL.getDescriptor());\n fConsole.activate();\n ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[]{fConsole});\n final Display display = PlatformUI.getWorkbench().getDisplay();\n fRed = new Color(display, RED);\n fBlue = new Color(display, BLUE);\n fPurple = new Color(display, PURPLE);\n fBlack = new Color(display, BLACK);\n }",
"public void SetAsSingleton () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"public CianetoClass() {\r\n this.cianetoMethods = new Hashtable<String, Object>();\r\n this.cianetoAttributes = new Hashtable<String, Object>();\r\n }",
"public Mouse() {}",
"Notentyp createNotentyp();",
"public String setter() {\n\t\treturn prefix(\"set\");\n\t}",
"private UI()\n {\n this(null, null);\n }",
"public OOP_207(){\n\n }",
"Mouse(){\n System.out.println(\"This is Mouse class.\");\n }",
"Editor mo117962b();",
"public Methods() {\n // what is this doing? -PMC\n }",
"void createWindow();",
"public Method(String name, String desc) {\n/* 82 */ this.name = name;\n/* 83 */ this.desc = desc;\n/* */ }",
"ActionCompile()\n {\n super(\"Compile\");\n this.setShortcut(UtilGUI.createKeyStroke('C', true, false, true));\n }",
"public BaciWindow() {\r\n}",
"private Controller() {\n\t\tthis.gui = GUI.getInstance();\n\t\tthis.gui.setController(this);\n\t}",
"private void setup()\n {\n putValue(NAME, \"Copy\");\n putValue(SMALL_ICON, new ImageIcon(getClass().getResource(\"/res/copy16.gif\")));\n putValue(SHORT_DESCRIPTION, \"Copy the selected data record\");\n putValue(LONG_DESCRIPTION, \"Copy the selected data record\");\n putValue(MNEMONIC_KEY, new Integer(KeyEvent.VK_C));\n putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.SHIFT_MASK));\n putValue(ACTION_COMMAND_KEY, \"copy-command\");\n }",
"public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }",
"public GuiController()\n {\n\n DefaultTerminalFactory terminalFactory = new DefaultTerminalFactory();\n PageStack = new ArrayDeque<>(); // Gives us a screen stack\n window = new BasicWindow(\"Just put anything, I don't even care\");\n try\n {\n screen = terminalFactory.createScreen(); //Populates screen\n screen.startScreen(); //Runs screen\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n textGUI = new MultiWindowTextGUI(screen);\n\n }",
"public static Construtor construtor() {\n return new Construtor();\n }",
"@DISPID(-2147417603)\n @PropGet\n com4j.Com4jObject constructor();",
"public NewMasterKey(java.awt.Frame parent, boolean modal) {\n super(parent, modal);\n initComponents();\n DEFAULT_PSWDCHAR = passwordField.getEchoChar();\n System.out.println(DEFAULT_PSWDCHAR);\n keyfile = new Keyfile();\n }",
"private NotePad() {\n }",
"@SuppressWarnings(\"synthetic-access\")\n public TerminalProperties build() {\n return new TerminalProperties(this);\n }",
"CommandsFactory getCommandsFactory();",
"public WindowControler(String sname,vector pos) {\n super(sname,pos);\n WindowControler_init();\n }",
"private PropertiesUtilis() {\n throw new UnsupportedOperationException(\"PropertiesUtilis instantiation\" + \n \"not allowed !\");\n }",
"PropertyCallExp createPropertyCallExp();",
"StrCommand getFeatureNew();",
"JDefinedClass objectFactory();",
"public Calculator() {\r\n\t\t/*\r\n\t\t * Constructor - Method name which has the same class name is called a Consatructor\r\n\t\t */\r\n\t\tSystem.out.println(\"Calling constructor\");\r\n\t}",
"MethodStart createMethodStart();",
"static public ConnectionCodeKeyDialog newInstance() {\n ConnectionCodeKeyDialog dialog = new ConnectionCodeKeyDialog();\n return dialog;\n }",
"Help createHelp();",
"public CommandsFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"private void createContextMenu(){\r\n\t\tmenu = new JMenuBar();\r\n\t\tint ctrl;\r\n\t\tif(MAC)\r\n\t\t\tctrl = ActionEvent.META_MASK;\r\n\t\telse\r\n\t\t\tctrl = ActionEvent.CTRL_MASK;\r\n\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tnewMenu = new JMenuItem(\"New\");\r\n\t\tnewMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ctrl));\r\n\t\tnewMenu.addActionListener(this);\r\n\t\topenMenu = new JMenuItem(\"Open\");\r\n\t\topenMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, ctrl));\r\n\t\topenMenu.addActionListener(this);\r\n\t\trecentMenu = new JMenu(\"Open Recent\");\r\n\t\tpopulateRecentMenu();\r\n\t\tsaveMenu = new JMenuItem(\"Save\");\r\n\t\tsaveMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, ctrl));\r\n\t\tsaveMenu.addActionListener(this);\r\n\t\tsaveAsMenu = new JMenuItem(\"Save As...\");\r\n\t\tsaveAsMenu.addActionListener(this);\r\n\t\tfileMenu.add(newMenu);\r\n\t\tfileMenu.add(openMenu);\r\n\t\tfileMenu.add(recentMenu);\r\n\t\tfileMenu.add(saveMenu);\r\n\t\tfileMenu.add(saveAsMenu);\r\n\r\n\t\tmenu.add(fileMenu);\r\n\r\n\t\tJMenu editMenu = new JMenu(\"Edit\");\r\n\t\tpreferencesMenu = new JMenuItem(\"Preferences\");\r\n\t\tpreferencesMenu.addActionListener(this);\r\n\t\teditMenu.add(preferencesMenu);\r\n\r\n\t\tmenu.add(editMenu);\r\n\r\n\t\tif(!MAC){\r\n\t\t\tJMenu helpMenu = new JMenu(\"Help\");\r\n\t\t\tJMenuItem aboutMenuI = new JMenuItem(\"About\");\r\n\r\n\t\t\taboutMenuI.addActionListener(new ActionListener(){\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\tshowAboutMenu();\r\n\t\t\t\t}\t\t\r\n\t\t\t});\r\n\t\t\thelpMenu.add(aboutMenuI);\r\n\t\t\tmenu.add(helpMenu);\r\n\t\t}\r\n\t}",
"public native void constructor();",
"@Test\r\n\tpublic void testGettersSetters()\r\n\t{\r\n\t\tPerson p = new Person(42);\r\n\t\tp.setDisplayName(\"Fred\");\r\n\t\tassertEquals(\"Fred\", p.getFullname());\r\n\t\tp.setPassword(\"hunter2\");\r\n\t\tassertEquals(\"hunter2\", p.getPassword());\r\n\t\tassertEquals(42, p.getID());\r\n\t}",
"public static void main(String[] args) {\n\t\tString title =\"Hover car racer\";\nbook Newnovel =new Mybook();\nNewnovel.settitle(title);\nSystem.out.println(\"The title of book:\" +Newnovel.gettitle());\n\t}",
"public NewTunnelAction() {\r\n putValue(Action.NAME, \"New Tunnel\");\r\n putValue(Action.SMALL_ICON,\r\n new ResourceIcon(ActiveTunnelsSessionPanel.class,\r\n \"add.png\"));\r\n putValue(Action.SHORT_DESCRIPTION, \"New Tunnel\");\r\n putValue(Action.LONG_DESCRIPTION,\r\n \"Create a new secure tunnel\");\r\n putValue(Action.MNEMONIC_KEY, new Integer('n'));\r\n //Cerlane (ALT to CTRL)\r\n putValue(Action.ACCELERATOR_KEY,\r\n KeyStroke.getKeyStroke(KeyEvent.VK_T, Keyboard_Modifier));\r\n putValue(Action.ACTION_COMMAND_KEY, \"new-tunnel-command\");\r\n putValue(StandardAction.ON_MENUBAR, new Boolean(true));\r\n putValue(StandardAction.MENU_NAME, \"Tunnel\");\r\n putValue(StandardAction.MENU_ITEM_GROUP, new Integer(50));\r\n putValue(StandardAction.MENU_ITEM_WEIGHT, new Integer(10));\r\n putValue(StandardAction.ON_TOOLBAR, new Boolean(true));\r\n putValue(StandardAction.TOOLBAR_GROUP, new Integer(5));\r\n putValue(StandardAction.TOOLBAR_WEIGHT, new Integer(5));\r\n putValue(StandardAction.HIDE_TOOLBAR_TEXT, new Boolean(false));\r\n putValue(StandardAction.ON_CONTEXT_MENU, new Boolean(true));\r\n putValue(StandardAction.CONTEXT_MENU_GROUP, new Integer(5));\r\n putValue(StandardAction.CONTEXT_MENU_WEIGHT, new Integer(5));\r\n //Cerlane (ALT to CTRL)\r\n putValue(Action.ACCELERATOR_KEY,\r\n KeyStroke.getKeyStroke(KeyEvent.VK_N, Keyboard_Modifier));\r\n }",
"SetCommand getSetl();",
"public StringEditor() {\n\t\tsuper();\n\t\tmEditor = new JTextField();\n\t\t\n\t}",
"public Idea create() {\n \t\t\tIdea idea = new Idea();\n \n \t\t\treturn idea;\n \t\t}",
"public ModifyVirtualMachine(){\r\n\t\t super(COMMAND);\r\n\t}",
"public ControlCommand() {\r\n\t\tthis(CommandType.NotSet);\r\n\t}",
"private CommandBrocker() {}"
] |
[
"0.5839078",
"0.5739004",
"0.5454901",
"0.544741",
"0.54460675",
"0.54093856",
"0.537973",
"0.535405",
"0.53186935",
"0.5318297",
"0.53046334",
"0.52554506",
"0.5216066",
"0.52150124",
"0.52073795",
"0.5178625",
"0.5146281",
"0.51397955",
"0.51134837",
"0.5105941",
"0.51002026",
"0.50415164",
"0.5040478",
"0.50361085",
"0.50324017",
"0.5027303",
"0.50225943",
"0.5010879",
"0.49989134",
"0.4990951",
"0.49902672",
"0.49834105",
"0.49833816",
"0.49811697",
"0.49703714",
"0.4962024",
"0.49574918",
"0.49556395",
"0.49511373",
"0.4940997",
"0.4933825",
"0.4932343",
"0.4926961",
"0.49124002",
"0.49102837",
"0.49066186",
"0.4906186",
"0.4906186",
"0.4892119",
"0.48917547",
"0.48910737",
"0.48906273",
"0.48903355",
"0.48900786",
"0.48836663",
"0.48817918",
"0.48689854",
"0.4868787",
"0.48686904",
"0.4868414",
"0.48669708",
"0.4856022",
"0.4855058",
"0.48539305",
"0.48362195",
"0.48341244",
"0.48331025",
"0.48242956",
"0.48202166",
"0.48197937",
"0.4817021",
"0.48102853",
"0.48079786",
"0.48010597",
"0.47986436",
"0.47975713",
"0.47953564",
"0.4794496",
"0.47930413",
"0.47880638",
"0.47878397",
"0.47849974",
"0.47823104",
"0.4781408",
"0.4781228",
"0.4778777",
"0.4770319",
"0.4769001",
"0.4768407",
"0.4765179",
"0.47634307",
"0.47558683",
"0.47543365",
"0.47480592",
"0.4745178",
"0.47451243",
"0.47419682",
"0.47388402",
"0.47381485",
"0.47370586",
"0.47347954"
] |
0.0
|
-1
|
Selects a random genome from the species chosen, where genomes with a higher adjusted fitness have a higher chance of being selected
|
private int intGetRandomGenomeBiasedAdjustedFitness(Species selectFrom, Random random) {
double completeWeight = 0.0;
for (integerFitnessGenome fg : selectFrom.fitnessInt) {
completeWeight += fg.fitness;
}
double r = Math.random() * completeWeight;
double countWeight = 0.0;
for (integerFitnessGenome fg : selectFrom.fitnessInt) {
countWeight += fg.fitness;
if (countWeight >= r) {
return fg.id;
}
}
throw new RuntimeException("Couldn't find a genome... Number is genomes in selected species is ");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void testSelect_4()\n throws Exception {\n BestChromosomesSelector selector = new BestChromosomesSelector(conf);\n selector.setDoubletteChromosomesAllowed(true);\n // the following original rate controls that only 30% of the chromosomes\n // will be considered for selection as given with BestChromosomesSelector.\n // The last 70% will be added as doublettes in this case.\n selector.setOriginalRate(0.3d);\n // add first chromosome\n // --------------------\n Gene gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(true));\n Chromosome thirdBestChrom = new Chromosome(conf, gene, 7);\n thirdBestChrom.setFitnessValue(10);\n selector.add(thirdBestChrom);\n // add second chromosome\n // ---------------------\n gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(false));\n Chromosome bestChrom = new Chromosome(conf, gene, 3);\n bestChrom.setFitnessValue(12);\n selector.add(bestChrom);\n // add third chromosome\n // ---------------------\n gene = new IntegerGene(conf);\n gene.setAllele(new Integer(444));\n Chromosome secondBestChrom = new Chromosome(conf, gene, 3);\n secondBestChrom.setFitnessValue(11);\n selector.add(secondBestChrom);\n // receive top 1 (= best) chromosome\n // ---------------------------------\n Population pop = new Population(conf);\n selector.select(1, null, pop);\n IChromosome[] bestChroms = pop.toChromosomes();\n assertEquals(1, bestChroms.length);\n assertEquals(bestChrom, bestChroms[0]);\n // receive top 4 chromosomes with original rate = 0.3\n // --------------------------------------------------\n pop.getChromosomes().clear();\n selector.select(4, null, pop);\n bestChroms = pop.toChromosomes();\n assertEquals(4, bestChroms.length);\n assertEquals(bestChrom, bestChroms[0]);\n assertEquals(bestChrom, bestChroms[1]); //because of originalRate = 0.3\n assertEquals(secondBestChrom, bestChroms[2]);\n assertEquals(thirdBestChrom, bestChroms[3]);\n // Non-unique chromosomes should have been returned, although not the same\n // but a cloned instance!\n assertEquals(bestChroms[0], bestChroms[1]);\n // receive top 4 chromosomes with original rate = 1\n // ------------------------------------------------\n pop.getChromosomes().clear();\n selector.setOriginalRate(1.0d);\n selector.select(4, null, pop);\n bestChroms = pop.toChromosomes();\n assertEquals(4, bestChroms.length);\n assertEquals(bestChrom, bestChroms[0]);\n assertEquals(secondBestChrom, bestChroms[1]);\n assertEquals(thirdBestChrom, bestChroms[2]);\n assertEquals(bestChrom, bestChroms[3]);\n }",
"public int randomGene();",
"private Species getRandomSpeciesBaisedAdjustedFitness(Random random) {\r\n\t\tdouble completeWeight = 0.0;\r\n\t\tfor (Species s : species) {\r\n\t\t\tcompleteWeight += s.totalAdjustedFitness;\r\n\t\t}\r\n\t\tdouble r = Math.random() * completeWeight;\r\n\t\tdouble countWeight = 0.0;\r\n\t\tfor (Species s : species) {\r\n\t\t\tcountWeight += s.totalAdjustedFitness;\r\n\t\t\tif (countWeight >= r) {\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new RuntimeException(\"Couldn't find a species... Number is species in total is \" + species.size()\r\n\t\t\t\t+ \", and the toatl adjusted fitness is \" + completeWeight);\r\n\t}",
"Chromosome getRandomAmongFittest(int limit);",
"public void testSelect_0()\n throws Exception {\n BestChromosomesSelector selector = new BestChromosomesSelector(conf);\n Gene gene = new IntegerGene(conf);\n gene.setAllele(new Integer(444));\n Chromosome secondBestChrom = new Chromosome(conf, gene, 3);\n secondBestChrom.setFitnessValue(11);\n selector.add(secondBestChrom);\n gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(false));\n Chromosome bestChrom = new Chromosome(conf, gene, 3);\n bestChrom.setFitnessValue(12);\n selector.add(bestChrom);\n selector.select(1, null, new Population(conf));\n }",
"Chromosome getRandom();",
"public Genotype rouletteSelection() {\n // get a number between 0 and 1 to compare against\n double slice = rnd.nextDouble();\n // keep track of the cumulative fitness\n double cumulativeFitness = 0;\n\n // loop through the population to pick a mate\n for (Genotype g : population) {\n // increment the cumulative fitness with the member's normalized fitness\n cumulativeFitness += g.getNormalizedFitness();\n // if the cumulative fitness is greater than the random number,\n if (cumulativeFitness > slice) {\n // select the member for mating\n return g;\n }\n }\n\n // if no members are chosen, pick the one with the highest fitness score\n return population.get(0);\n }",
"protected Gene getRandomGene() {\n\t\tArrayList<Gene> genearr = new ArrayList<Gene>();\n\t\tgenearr.addAll(genes.values());\n\t\treturn genearr.get(Braincraft.randomInteger(genearr.size()));\n\t}",
"private void tournament_selection() {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < this.pop_size; i++) {\r\n\r\n // pick 2 random ints to for indices of parents\r\n int parent1 = new Random().nextInt(this.pop_size);\r\n int parent2 = new Random().nextInt(this.pop_size);\r\n\r\n individual p1 = new individual(main_population.getPopulation()[parent1].getGenes(), solutions, output);\r\n individual p2 = new individual(main_population.getPopulation()[parent2].getGenes(), solutions, output);\r\n\r\n if (p1.getFitness() >= p2.getFitness()) {\r\n temp_pop[i] = p1;\r\n } else {\r\n temp_pop[i] = p2;\r\n }\r\n }\r\n this.main_population.setPopulation(temp_pop);\r\n this.main_population.update_population();\r\n }",
"public void testSelect_3()\n throws Exception {\n BestChromosomesSelector selector = new BestChromosomesSelector(conf);\n selector.setDoubletteChromosomesAllowed(false);\n // add first chromosome\n // --------------------\n Gene gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(true));\n Chromosome thirdBestChrom = new Chromosome(conf, gene, 7);\n thirdBestChrom.setFitnessValue(10);\n selector.add(thirdBestChrom);\n // add second chromosome\n // ---------------------\n gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(false));\n Chromosome bestChrom = new Chromosome(conf, gene, 3);\n bestChrom.setFitnessValue(12);\n selector.add(bestChrom);\n selector.setOriginalRate(1.0d);\n // receive top 30 chromosomes (select-method should take into account only\n // 2 chroms!)\n // -----------------------------------------------------------------------\n Population pop = new Population(conf);\n selector.select(30, null, pop);\n Population bestChroms = pop;\n Population chromosomes = (Population) privateAccessor.getField(selector,\n \"m_chromosomes\");\n assertTrue(bestChroms.equals(chromosomes));\n }",
"public Individual selectIndividual(Population population) {\n // Get individuals\n List<Individual> individuals = population.getPopulation();\n\n // Spin roulette wheel\n double populationFitness = population.getPopulationFitness();\n double rouletteWheelPosition = Math.random() * populationFitness;\n\n // Find parent\n double spinWheel = 0;\n for (Individual individual : individuals) {\n spinWheel += individual.getFitness();\n if (spinWheel >= rouletteWheelPosition) {\n return individual;\n }\n }\n return individuals.get(population.size() - 1);\n }",
"public static List<Double> selection(PolyPopulation pop, double cutoff) {\n\t\tint lastGenerationNum = pop.getGroupCapacity();\n\t\tList<PolyIndividual> nextGeneration = new ArrayList<>();\n\t\tList<Double> fitList = new ArrayList<>();\n\t\tList<Double> valueList = new ArrayList<>();\n\t\tList<Double> actValueList = new ArrayList<>();\n\t\tdouble max = 0.0;\n\t\tdouble totalFit = 0.0;\n\t\t//calculate the value of each individual in the population\n\t\tfor(int i = 0; i < pop.getGroupCapacity(); i++) {\n\t\t\tdouble val = f(pop.getIndis().get(i).getGenotype());\n\t\t\tvalueList.add(val);\n\t\t\t//get the Max value, use it\n\t\t\tif(i == 0) max = val;\n\t\t\telse if(val > max) max = val;\n\t\t}\n\t\t//based on the value insists now, calculate the fitness of each individual and their total fitness\n\t\tfor(int i = 0; i < pop.getGroupCapacity(); i++) {\n\t\t\tdouble fit = 1/(max - valueList.get(i) + 10);\n\t\t\tfitList.add(fit);\n\t\t\ttotalFit+=fit;\n\t\t}\n\t\t\n\t\twhile(nextGeneration.size() < lastGenerationNum*cutoff) {\t\t\t\n\t\t\tdouble selectionVal = Math.random();\n\t\t\tdouble accumulateVal = 0.0;\n\t\t\tfor(int i = 0; i < pop.getGroupCapacity(); i++) {\n\t\t\t\tif(selectionVal >= accumulateVal && selectionVal < (accumulateVal+fitList.get(i)/totalFit)) {\n\t\t\t\t\tnextGeneration.add(pop.getIndis().get(i));\n\t\t\t\t\tactValueList.add(valueList.get(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\taccumulateVal+=(fitList.get(i)/totalFit);\n\t\t\t}\n\t\t}\n\t\tpop.setIndis(nextGeneration);\n\t\tpop.setGroupCapacity(nextGeneration.size());\n\t\treturn actValueList;\n\t}",
"public static void genocide() {\n //Assigns fitness levels\n evaluateFitnesses();\n\n //Sorts by fitness\n sortByFitlvl();\n\n //Simple genocide, kills off all until population size.\n for (int i = Population.size() - 1; i >= populationSize; i--) {\n Population.remove(i);\n }\n\n /*\n //Different kind of Genocide, selects organisms based on gaussian distribution\n\n while(Population.size() > populationSize){\n int randomOrganism = (int)(Population.size() - (Population.size()*Utilities.sharpGauss(2)));\n Population.remove(randomOrganism);\n }\n */\n }",
"@Override\r\n\tpublic final Genome chooseParent() {\r\n\t\tGenome baby;\r\n\r\n\t\t// If there is a single member, then choose that one.\r\n\t\tif (this.members.size() == 1) {\r\n\t\t\tbaby = this.members.get(0);\r\n\t\t} else {\r\n\t\t\t// If there are many, then choose the population based on survival\r\n\t\t\t// rate\r\n\t\t\t// and select a random genome.\r\n\t\t\tfinal int maxIndexSize \r\n\t\t\t= (int) (this.population.getSurvivalRate() * this.members\r\n\t\t\t\t\t.size()) + 1;\r\n\t\t\tfinal int theOne = (int) RangeRandomizer.randomize(0, maxIndexSize);\r\n\t\t\tbaby = this.members.get(theOne);\r\n\t\t}\r\n\r\n\t\treturn baby;\r\n\t}",
"public void setNextGeneration() {\n // create a temporary population\n ArrayList<Genotype> tempPopulation = new ArrayList<Genotype>();\n\n // select mates\n while (tempPopulation.size() < populationSize) {\n tempPopulation.add(Genotype.Mate(rouletteSelection(),\n rouletteSelection(), crossoverProbability));\n }\n }",
"<T> GeneticResult<T> train(List<Chromosome<T>> chromosomes){\n\t\tGeneticResult<T> bestFit = maxFitness(chromosomes, 0);\n\t\tfor(int i = 0; i < totalBreedings; i++){\n\t\t\tif(bestFit.getFitness() > sufficientFitness){ break ;}\n\t\t\tchromosomes = breedNewGeneration(chromosomes);\n\t\t\tbestFit = maxFitness(chromosomes, i);\n\t\t}\n\t\treturn bestFit;\n\t}",
"private Chromosome getRouletteChromosome(ArrayList<Chromosome> chroms, double totalFitness){\n double slice = (Math.random()*totalFitness);\n double fitnessSum = 0;\n for(Chromosome c:chroms){\n fitnessSum += c.getFitness();\n if(fitnessSum >= slice){\n return c;\n }\n }\n \n //The total fitness supplied must have been incorrect\n return null;\n }",
"public ArrayList<Tour> doSelection(Population population) {\n double totalFitness = 0;\n for(Tour tour : population.getTourList()){\n totalFitness = totalFitness + tour.getFitness();\n }\n\n //sort tours by relative fitness\n SortedMap<Double, Tour> totalFitnessRelativity = new TreeMap<>();\n for(Tour tour: population.getTourList()){\n double key = tour.getFitness()/totalFitness;\n totalFitnessRelativity.put(key, tour);\n }\n\n //put tours on a number bar\n SortedMap<Double, Tour> numberBar = new TreeMap<>();\n double previousProbability = 0;\n for(Map.Entry<Double, Tour> entry : totalFitnessRelativity.entrySet()){\n double currentProbability = previousProbability + entry.getKey();\n numberBar.put(currentProbability, entry.getValue());\n previousProbability = currentProbability;\n }\n\n //choose a tour randomly according to how near it is to\n ArrayList<Tour> rouletteWheelOrder = new ArrayList<>();\n do{\n double randomNumber = new random.MersenneTwisterFast().nextDouble(0, numberBar.lastKey());\n for(Map.Entry<Double, Tour> numberBarSection : numberBar.entrySet()){\n if(randomNumber <= numberBarSection.getKey() && !rouletteWheelOrder.contains(numberBarSection.getValue())){\n rouletteWheelOrder.add(numberBarSection.getValue());\n break;\n }\n }\n } while(rouletteWheelOrder.size() != population.getTourList().size());\n return rouletteWheelOrder;\n }",
"private void rouletteSelection() {\n parentChromosomes = new Chromosome[2];\n parentIndices = new int[2];\n Arrays.fill(parentChromosomes, null);\n parentIndices[0] = getFittestChromosomeIndex();\n parentChromosomes[0] = chromosomes[parentIndices[0]];\n parentIndices[1] = getFittestChromosomeIndex();\n parentChromosomes[1] = chromosomes[parentIndices[1]];\n System.out.println(\"Individuals selected from Roulette Wheel for crossover: \\n\" +\n Arrays.toString(parentChromosomes[0].getGenes()) + \"\\n\" +\n Arrays.toString(parentChromosomes[1].getGenes()));\n }",
"private static Set<Chromosome> rankBasedRouletteWheelSelection(ArrayList<Chromosome> population, int populationSize) {\n Set<Chromosome> selectedChromosomes = new HashSet<>();\n\n // calculate the sum of all ranks, which will be used as a denominator for all probabilities\n int sumOfRanks = (populationSize + 1) * populationSize / 2;\n\n // declare an array of cumulative probabilities for all the chromosomes in the population\n double[] cumulativeProbability = new double[populationSize];\n // calculate the cumulative probability of the first chromosome as its probability\n cumulativeProbability[0] = (double) populationSize / sumOfRanks;\n // calculate the cumulative probabilities of all successive chromosomes:\n for (int i = 1; i < populationSize; i++) {\n // as the probability of this chromosomes based on its rank\n double probability = (double) (populationSize-i) / sumOfRanks;\n // plus the cumulative proability of the preceeding chromosome\n cumulativeProbability[i] = cumulativeProbability[i-1] + probability;\n }\n\n while (selectedChromosomes.size() < 2) {\n // choose a chromosome randomly based on its cumulative probability (the lower the better)\n double random = ThreadLocalRandom.current().nextDouble();\n int choice = 0;\n while (random > cumulativeProbability[choice]) {\n choice++;\n }\n\n // add the chosen chromosome to the set of selectedChromosomes\n selectedChromosomes.add(population.get(choice));\n }\n\n return selectedChromosomes;\n }",
"private ArrayList<int[]> selectionRoulette(int[][] chromosomes, float percentToSelect) {\n\n\t\tArrayList<int[]> selectedChromosomes = new ArrayList<int[]>();\n\n\t\t//sum up fitnesses for population\n\t\tint fitnessSum = 0;\n\t\tfor (int[] chromosome : chromosomes) {\n\t\t\tfitnessSum += getFitness(chromosome);\n\t\t}\n\n\t\t//minimization problem - invert fitness\n\t\tint invertFitnessSum = 0;\n\t\tfor (int[] chromosome : chromosomes) {\n\t\t\tinvertFitnessSum += Math.round((fitnessSum * 1.0) / getFitness(chromosome)); //small fitness values (few bins) are favored\n\t\t}\n\n\t\t//get fitnesses of chromosomes, save in array to avoid recalculating\n\t\tint[] fitnesses = new int[chromosomes.length];\n\t\tfor (int i = 0; i < chromosomes.length; i++) {\n\t\t\tfitnesses[i] = (int) Math.round((fitnessSum * 1.0) / getFitness(chromosomes[i]));\n\t\t}\n\n\t\t//spin the roulette wheel\n\t\tfor (int i = 0; i < chromosomes.length * percentToSelect; i++) {\n\t\t\tint currentFitnessTotal = 0;\n\t\t\tint fitnessCutoff = rand.nextInt(invertFitnessSum); //where the wheel stops\n\n\t\t\tfor (int j = 0; j < chromosomes.length; j++) { //go through all chromosomes to see who is selected this spin\n\t\t\t\tif (currentFitnessTotal < fitnessCutoff)\n\t\t\t\t\tcurrentFitnessTotal += fitnesses[j];\n\n\t\t\t\tif (currentFitnessTotal >= fitnessCutoff) { //if this chromosome pushed us over the edge, save it\n\t\t\t\t\tselectedChromosomes.add(chromosomes[j]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}//end roulette spinning\n\t\treturn selectedChromosomes;\n\t}",
"private PMCGenotype[] advanceGeneration()\n\t{\n\t\tPMCGenotype[] newPop = new PMCGenotype[population.length];\n\t\tPMCGenotype[] parents = selectParents();\n\t\tArrayList<PMCGenotype> candidates = new ArrayList<PMCGenotype>();\n\n\t\t// Add the current population to the list of candidates.\n\t\tfor (PMCGenotype pmcg : population)\n\t\t{\n\t\t\tcandidates.add(pmcg);\n\t\t}\n\n\t\t// For each parent, generate a number of mutations (children), calculate their fitness\n\t\t// and add them to the list of candidates.\n\t\tint childrenPerParent = this.childrenPerGeneration / this.parentsToSelect;\n\t\tfor (PMCGenotype p : parents)\n\t\t{\n\t\t\tfor (int i = 0; i < childrenPerParent; i++)\n\t\t\t{\n\t\t\t\tPMCGenotype pmcg = PMCGenotype.mutate(p, r);\n\t\t\t\tpmcg.setFitness(fitness(pmcg, this.trials));\n\t\t\t\tcandidates.add(pmcg);\n\t\t\t}\n\t\t}\n\n\t\t// Find candidate with the best fitness and add it to the new population.\n\t\t// Repeat this until the new population size matches the previous population size.\n\t\tint candidatesChosen = 0;\n\t\twhile (candidatesChosen < this.population.length)\n\t\t{\n\t\t\tint numberOfRemainingCandidates = candidates.size();\n\t\t\tdouble currentBestFitnessScore = 0;\n\t\t\tint currentBestFitnessScoreIndex = 0;\n\n\t\t\tfor (int i = 0; i < numberOfRemainingCandidates; i++)\n\t\t\t{\n\t\t\t\tPMCGenotype pmcg = candidates.get(i);\n\t\t\t\tif (pmcg.getFitness() > currentBestFitnessScore)\n\t\t\t\t{\n\t\t\t\t\tcurrentBestFitnessScore = pmcg.getFitness();\n\t\t\t\t\tcurrentBestFitnessScoreIndex = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnewPop[candidatesChosen] = candidates.get(currentBestFitnessScoreIndex);\n\t\t\tcandidatesChosen++;\n\n\t\t\tcandidates.remove(currentBestFitnessScoreIndex);\n\t\t}\n\n\t\treturn newPop;\n\t}",
"@Override\n public Individual selectIndividual(Population population, Individual individual, MersenneTwister rnd, ExperimentalData expData, Statistics stats) {\n List<Integer> indexIndividuals = new ArrayList<>();\n Integer bigger = -1;\n double[] outputs = expData.getDataset(Utils.DatasetType.TRAINING).getOutputs();\n int index = identifyCloserIndividual(population, individual, outputs, indexIndividuals, bigger, rnd);\n getStatisticsDim(individual, population.get(index), stats, outputs);\n return population.get(index);\n }",
"private <T> GeneticResult<T> maxFitness(List<Chromosome<T>> chromosomes, int totalBreedings){\n\t\tChromosome<T> bestFit = fittestChromosome(chromosomes);\n\t\treturn new GeneticResult<T>(bestFit, bestFit.getFitness(), totalBreedings);\n\t}",
"public void modifyFitness(Population population) {\n // prepare the calculation\n double[][] data = new double[population.size()][];\n for (int i = 0; i < data.length; i++) {\n data[i] = ((AbstractEAIndividual)population.get(i)).getFitness();\n }\n double min = Double.POSITIVE_INFINITY, fitnessSharing;\n double[] result = new double[data.length];\n AbstractEAIndividual tmpIndy;\n\n for (int x = 0; x < data[0].length; x++) {\n for (int i = 0; i < data.length; i++) data[i][x] = -data[i][x];\n for (int i = 0; i < data.length; i++) {\n if (data[i][x] < min) min = data[i][x];\n }\n\n for (int i = 0; i < data.length; i++) {\n // This will cause the worst individual to have no chance of being selected\n // also note that if all individual achieve equal fitness the sum will be zero\n result[i] = data[i][x] -min + 0.1;\n }\n\n for (int i = 0; i < population.size(); i++) {\n tmpIndy = (AbstractEAIndividual)population.get(i);\n fitnessSharing = 0;\n for (int j = 0; j < population.size(); j++) {\n if (this.m_SharingDistance < this.m_Metric.distance(tmpIndy, (AbstractEAIndividual)population.get(j))) {\n fitnessSharing += 1 - (this.m_Metric.distance(tmpIndy, (AbstractEAIndividual)population.get(j))/this.m_SharingDistance);\n }\n }\n result[i] = result[i]/fitnessSharing;\n }\n\n for (int i = 0; i < population.size(); i++) {\n ((AbstractEAIndividual)population.get(i)).SetFitness(x, result[i]);\n }\n }\n }",
"private PMCGenotype[] selectParents()\n\t{\n\t\tPMCGenotype[] bestGenes = new PMCGenotype[parentsToSelect];\n\n\t\tint lowestFitnessOfSelectedIndex = 0;\n\t\tdouble lowestFitnessOfSelected = -1;\n\n\t\t// Select initial set of parents.\n\t\tbestGenes[0] = population[0];\n\t\tlowestFitnessOfSelectedIndex = 0;\n\t\tlowestFitnessOfSelected = bestGenes[0].getFitness();\n\t\tfor (int i = 1; i < this.parentsToSelect; i++)\n\t\t{\n\t\t\tbestGenes[i] = population[i];\n\n\t\t\tif (bestGenes[i].getFitness() < lowestFitnessOfSelected)\n\t\t\t{\n\t\t\t\tlowestFitnessOfSelectedIndex = i;\n\t\t\t\tlowestFitnessOfSelected = bestGenes[i].getFitness();\n\t\t\t}\n\t\t}\n\n\t\t// Select candidates with the highest fitness, replacing those with lowest fitness.\n\t\tfor (int i = parentsToSelect; i < population.length; i++)\n\t\t{\n\t\t\tPMCGenotype pmcg = population[i];\n\t\t\tif (pmcg.getFitness() > lowestFitnessOfSelected)\n\t\t\t{\n\t\t\t\tbestGenes[lowestFitnessOfSelectedIndex] = pmcg;\n\n\t\t\t\tlowestFitnessOfSelectedIndex = 0;\n\t\t\t\tlowestFitnessOfSelected = bestGenes[0].getFitness();\n\n\t\t\t\tfor (int j = 1; j < parentsToSelect; j++)\n\t\t\t\t{\n\t\t\t\t\tif (bestGenes[j].getFitness() < lowestFitnessOfSelected)\n\t\t\t\t\t{\n\t\t\t\t\t\tlowestFitnessOfSelectedIndex = j;\n\t\t\t\t\t\tlowestFitnessOfSelected = bestGenes[j].getFitness();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn bestGenes;\n\t}",
"private <T> List<Chromosome<T>> breedNewGeneration(List<Chromosome<T>> chromosomes){\n\t\tList<Chromosome<T>> selected = selection.apply(chromosomes);\n\t\tCollections.shuffle(selected);\n\n\t\tList<Chromosome<T>> crossedOver = Lists.newArrayList();\n\t\tfor(int i = 0; i < selected.size(); i+=2){\n\t\t\tChromosome<T>[] bred = crossover.apply(selected.get(i), selected.get(i+1));\n\t\t\tcrossedOver.add(bred[0]);\n\t\t\tcrossedOver.add(bred[1]);\n\t\t}\n\n\t\treturn crossedOver.stream().map(mutation::apply).collect(Collectors.toList());\n\t}",
"private ArrayList<int[]> selectionRank(int[][] chromosomes, float percentToSelect) {\n\n\t\tArrayList<int[]> selectedChromosomes = new ArrayList<int[]>();\n\n\t\t//get fitnesses and ranks of chromosomes, save in array to avoid recalculating\n\t\tint[] fitnesses = new int[chromosomes.length];\n\t\tArrayList<Integer> ranks = new ArrayList<Integer>(); //holds indices of chromosomes, position in arraylist indicates rank\n\n\t\tfor (int i = 0; i < chromosomes.length; i++) { //set up list of fitnesses and ranks\n\t\t\tfitnesses[i] = getFitness(chromosomes[i]);\n\n\n\t\t\tboolean added = false;\n\t\t\tfor (int keyIndex = 0; keyIndex < ranks.size(); keyIndex++) { //only search the second half\n\t\t\t\tif (fitnesses[ranks.get(keyIndex)] > fitnesses[i]) { //if this one is worse\n\t\t\t\t\tranks.add(keyIndex, i); //inverted rank\n\t\t\t\t\tadded = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!added) {\n\t\t\t\tranks.add(i);\n\t\t\t}\n\n\t\t}// end fitness ranking (low fitness is best, last index is worst)\n\n\n\t\t//spin the roulette wheel\n\t\tfor (int i = 0; i < chromosomes.length * percentToSelect; i++) {\n\t\t\tint currentFitnessTotal = 0;\n\t\t\tint fitSelector = rand.nextInt(chromosomes.length); //where the wheel stops\n\t\t\tint fitnessCutoff = (fitSelector * (fitSelector + 1)) / 2;\n\n\t\t\tfor (int j = 0; j < ranks.size(); j++) { //go through all ranks to see who is selected this spin\n\t\t\t\tif (currentFitnessTotal < fitnessCutoff)\n\t\t\t\t\tcurrentFitnessTotal += chromosomes.length - ranks.get(j); //reorder fitness properly\n\n\t\t\t\tif (currentFitnessTotal >= fitnessCutoff) { //if this rank pushed us over the edge, save it\n\t\t\t\t\tselectedChromosomes.add(chromosomes[ranks.get(j)]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}//end roulette spinning\n\n\t\treturn selectedChromosomes;\n\t}",
"public Hazard selectRandom() {\r\n\t\tRandom gen = new Random();\r\n\t\treturn hazards.get(gen.nextInt(hazards.size()));\r\n\t}",
"@Override\n\t// Select individuals for crossover\n\tprotected Individual tournamentSelection(Population pop) {\n\t\tSortingIndividual baseIndiv = (SortingIndividual) pop.individuals[0];\n\t\tPopulation tournament = new SortingPopulation(tournamentSize, baseIndiv.getBase(), false);\n\t\t// For each place in the tournament get a random individual\n\t\tfor (int i = 0; i < tournamentSize; i++) {\n\t\t\tint randomId = (int) (Math.random() * pop.size());\n\t\t\ttournament.saveIndividual(i, pop.getIndividual(randomId));\n\t\t}\n\t\t// Get the fittest\n\t\tIndividual fittest = tournament.getFittest();\n\t\treturn fittest;\n\t}",
"public void reproduce(int generation, IPopulation pop, List<ISpecies> sorted_species) {\n\t\tfor(ISpecies specie : sorted_species){\r\n\r\n\t\t\tList<IOrganism> organisms = specie.getOrganisms();\r\n\r\n\t\t\t// outside the species\r\n\t\t\tint orgnum = 0;\r\n\r\n\t\t\tIOrganism mom = null;\r\n\t\t\tIOrganism baby = null;\r\n\t\t\tIGenome new_genome = null;\r\n\t\t\tIOrganism _organism = null;\r\n\t\t\tIOrganism _dad = null;\r\n\r\n\t\t\tif (specie.getExpectedOffspring() > 0 && organisms.size() == 0)\r\n\t\t\t\treturn;\r\n\r\n\t\t\t// elements for this species\r\n\t\t\tint poolsize = organisms.size() - 1;\r\n\r\n\t\t\t// the champion of the 'this' species is the first element of the species;\r\n\t\t\tIOrganism thechamp = organisms.get(0);\r\n\t\t\tboolean champ_done = false; // Flag the preservation of the champion\r\n\r\n\t\t\t// Create the designated number of offspring for the Species one at a time.\r\n\t\t\tfor (int count = 0; count < specie.getExpectedOffspring(); count++) {\r\n\r\n\t\t\t\t// If we have a super_champ (Population champion), finish off some special clones.\r\n\t\t\t\tif (thechamp.getSuperChampOffspring() > 0) {\r\n\r\n\t\t\t\t\t// save in mom current champ;\r\n\t\t\t\t\tmom = thechamp;\r\n\t\t\t\t\t// create a new genome from this copy\r\n\t\t\t\t\tnew_genome = mom.getGenome().duplicate(count);\r\n\t\t\t\t\tif ((thechamp.getSuperChampOffspring()) > 1) {\r\n\t\t\t\t\t\tif (RandomUtils.randomDouble() < .8 || evolutionParameters.getDoubleParameter(MUTATE_ADD_LINK_PROB) == 0.0)\r\n\t\t\t\t\t\t\tevolutionStrategy.getMutationStrategy().mutateLinkWeight(new_genome, evolutionParameters.getDoubleParameter(WEIGHT_MUT_POWER), 1.0, MutationType.GAUSSIAN);\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t// Sometimes we add a link to a superchamp\r\n\t\t\t\t\t\t\tnew_genome.generatePhenotype(generation);\r\n\t\t\t\t\t\t\tevolutionStrategy.getMutationStrategy().mutateAddLink(new_genome,pop);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation);\r\n\t\t\t\t\tthechamp.incrementSuperChampOffspring();\r\n\t\t\t\t} // end population champ\r\n\r\n\t\t\t\t// If we have a Species champion, just clone it\r\n\t\t\t\telse if ((!champ_done) && (specie.getExpectedOffspring() > 5)) {\r\n\t\t\t\t\tmom = thechamp; // Mom is the champ\r\n\t\t\t\t\tnew_genome = mom.getGenome().duplicate(count);\r\n\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation); // Baby is\r\n\t\t\t\t\t// just like mommy\r\n\t\t\t\t\tchamp_done = true;\r\n\r\n\t\t\t\t} else if (RandomUtils.randomDouble() < evolutionParameters.getDoubleParameter(MUTATE_ONLY_PROB) || poolsize == 1) {\r\n\r\n\t\t\t\t\t// Choose the random parent\r\n\t\t\t\t\torgnum = RandomUtils.randomInt(0, poolsize);\r\n\t\t\t\t\t_organism = organisms.get(orgnum);\r\n\t\t\t\t\tmom = _organism;\r\n\t\t\t\t\tnew_genome = mom.getGenome().duplicate(count);\r\n\r\n\t\t\t\t\t// Do the mutation depending on probabilities of various mutations\r\n\t\t\t\t\tevolutionStrategy.getMutationStrategy().mutate(new_genome,pop,generation);\r\n\r\n\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation);\r\n\t\t\t\t}\r\n\t\t\t\t// Otherwise we should mate\r\n\t\t\t\telse {\r\n\t\t\t\t\t// Choose the random mom\r\n\t\t\t\t\torgnum = RandomUtils.randomInt(0, poolsize);\r\n\t\t\t\t\t_organism = organisms.get(orgnum);\r\n\r\n\t\t\t\t\t// save in mom\r\n\t\t\t\t\tmom = _organism;\r\n\t\t\t\t\t// Choose random dad...\r\n\t\t\t\t\t// Mate within Species\r\n\t\t\t\t\tif (RandomUtils.randomDouble() > evolutionParameters.getDoubleParameter(INTERSPECIES_MATE_RATE)) {\r\n\t\t\t\t\t\torgnum = RandomUtils.randomInt(0, poolsize);\r\n\t\t\t\t\t\t_organism = organisms.get(orgnum);\r\n\t\t\t\t\t\t_dad = _organism;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Mate outside Species\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t// save current species\r\n\t\t\t\t\t\tISpecies randspecies = specie;\r\n\t\t\t\t\t\t// Select a random species\r\n\t\t\t\t\t\tint giveup = 0;\r\n\t\t\t\t\t\t// Give up if you can't find a different Species\r\n\t\t\t\t\t\twhile ((randspecies == specie) && (giveup < 5)) {\r\n\r\n\t\t\t\t\t\t\t// Choose a random species tending towards better species\r\n\t\t\t\t\t\t\tdouble randmult = Math.min(1.0, RandomUtils.randomGaussian() / 4);\r\n\r\n\t\t\t\t\t\t\t// This tends to select better species\r\n\t\t\t\t\t\t\tint sp_ext = Math.max(0, (int) Math.floor((randmult * (sorted_species.size() - 1.0)) + 0.5));\r\n\t\t\t\t\t\t\trandspecies = sorted_species.get(sp_ext);\r\n\t\t\t\t\t\t\t++giveup;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t_dad = randspecies.getOrganisms().get(0);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tnew_genome = evolutionStrategy.getCrossoverStrategy().performCrossover(mom,_dad,count);\r\n\r\n\t\t\t\t\t// Determine whether to mutate the baby's Genome\r\n\t\t\t\t\t// This is done randomly or if the mom and dad are the same organism\r\n\t\t\t\t\tif (RandomUtils.randomDouble() > evolutionParameters.getDoubleParameter(MATE_ONLY_PROB) || \r\n\t\t\t\t\t\t\t_dad.getGenome().getId() == mom.getGenome().getId() || \r\n\t\t\t\t\t\t\t_dad.getGenome().compatibility(mom.getGenome()) == 0.0) {\r\n\r\n\t\t\t\t\t\tevolutionStrategy.getMutationStrategy().mutate(new_genome,pop,generation);\r\n\t\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation);\r\n\t\t\t\t\t} \r\n\t\t\t\t\t// end block of prob\r\n\t\t\t\t\t// Determine whether to mutate the baby's Genome\r\n\t\t\t\t\t// This is done randomly or if the mom and dad are the same organism\r\n\r\n\t\t\t\t\t// Create the baby without mutating first\r\n\t\t\t\t\telse \r\n\t\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation);\r\n\t\t\t\t}\r\n\t\t\t\tevolutionStrategy.getSpeciationStrategy().addOrganismToSpecies(pop, baby);\r\n\t\t\t} // end offspring cycle\r\n\t\t}\r\n\t}",
"Chromosome fittestChromosome();",
"private static Option pickRandom() {\n\t\treturn Option.values()[rand.nextInt(3)];\n\t}",
"RandomizedRarestFirstSelector(Random random) {\n this.random = random;\n }",
"private Car generateRandomCar(int generationTime) {\n\t\tBoolean error = true;\n\t\tint errorCount=0;\n\t\twhile (error) {\n\n\t\t\tString destination;\t\t\t\n\t\t\t\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\t\t \n\t\t // Compute the total weight of all items together\n\t\t int totalWeight = 0;\n\t\t int selection = -1;\n\t\t for (int element : stuff)\n\t\t {\n\t\t totalWeight += element;\n\t\t \n\t\t }\n\n\t\t int position = new Random().nextInt(totalWeight);\n//\t\t System.out.println(\"totalweight:\" + totalWeight);\n//\t\t System.out.println(\"position:\" + position);\n\t\t int f = 0;\n\t\t for (int element : stuff)\n\t\t {\n//\t\t \tSystem.out.println(\"element:\" + element);\n\t\t \tf++;\n\t\t \tif (position < element)\n\t\t \t{\n\t\t \t \n\t\t selection = f;\n\t\t break;\n\t\t \t}\n\t\t \tposition -= element;\n\t\t }\n//\t\t System.out.println(\"selection:\" + selection);\n\t\t \n\t\t \n\t\t FeatureReader<SimpleFeatureType,SimpleFeature> features1 = dataStore.getFeatureReader();\n\t\t SimpleFeature selectedFeature= features1.next();\n\t\t for (int j=1 ; j<selection ; j++) {\n\t\t \tselectedFeature = features1.next(); \t\n\t\t } \n\t\t \t\n//\t\t\t\tSystem.out.println(\"id:\" + selectedFeature.getAttribute(1));\n//\t\t \tSystem.out.println(\"name:\" + selectedFeature.getAttribute(2));\n//\t\t \tSystem.out.println(\"population:\" + selectedFeature.getAttribute(3));\n\t\t features1.close();\n//\t\t System.out.println(firstFeature.getAttribute(0));\n\t\t GeometryFactory geometryFactory = (GeometryFactory) JTSFactoryFinder.getGeometryFactory( null );\n//\t\t Coordinate coord = new Coordinate( geo1.getLongitude(), geo1.getLatitude() );\n//\t\t com.vividsolutions.jts.geom.Point point = geometryFactory.createPoint(coord);\n\t\t Geometry g = (Geometry) selectedFeature.getAttribute( \"the_geom\" );\n\n\t\t\t Envelope env = new Envelope(selectedFeature.getBounds().getMinX(), selectedFeature.getBounds().getMaxX(), selectedFeature.getBounds().getMinY(), selectedFeature.getBounds().getMaxY());\n\t\t\t double x = env.getMinX() + env.getWidth() * Math.random();\n\t\t\t\tdouble y = env.getMinY() + env.getHeight() * Math.random();\n\t\t\t\tCoordinate pt = new Coordinate(x, y);\n//\t\t\t\tgeometryFactory.getPrecisionModel().makePrecise(pt);\n//\t\t\t\tCoordinate p = pt;\n\t\t\t\tcom.vividsolutions.jts.geom.Point point1 = geometryFactory.createPoint(pt);\n\t\t\t\tPoint source = Simulator.geoToCor(y,x);\n//\t\t\t\tSystem.out.println(x);\n//\t\t\t\tSystem.out.println(y);\n\t\t\t\tint tries = 0;\n\t\t\t\tdestination=strategy.chooseDestination(source);\n\t\t\t\t\n\t\t while(tries<5){\n\t\t \tif (point1.isWithinDistance(g, 0)){\n\n\t\t\t\t\t\tif(destination!=null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\terror=false;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//sDs.chooseDestination(source);\n\t\t\t\t\t\t\tint x1 = (int) source.getX();\n\t\t\t\t\t\t\tint y1 = (int) source.getY();\n\t\t\t\t\t\t\tGeoPosition geo1 = Simulator.corToGeo(x1, y1);\n\t\t\t\t\t\t\tPoint des = Simulator.getStations().get(destination).getPoint();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint chargingTime=strategy.setChargingTime(source);\n\t\t\t\t\t\t\tint y2 = (int) des.getY();\n\t\t\t\t\t\t\tint x2 = (int) des.getX();\n\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tGeoPosition geo2 = Simulator.corToGeo(x2, y2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tGHResponse res = Simulator.getRoute(geo1, geo2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (res != null){\n\t\t\t\t\t\t\t\tCar c = new Car(geo1.getLatitude(), geo1.getLongitude(), destination, generationTime, chargingTime);\n\t\t\t\t\t\t\t\tc.saveRoute(res);\n\t//\t\t\t\t\t\t\tSystem.out.println(\"success\");\n\t\t\t\t\t\t\t\treturn c;\n\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}\n\t\t \ttries++;\n\t\t \tx = env.getMinX() + env.getWidth() * Math.random();\n\t\t\t\t\ty = env.getMinY() + env.getHeight() * Math.random();\n\t\t\t\t\tpt = new Coordinate(x, y);\n\t\t\t\t\tpoint1 = geometryFactory.createPoint(pt);\n\t\t\t\t\tsource = Simulator.geoToCor(y,x);\n\t\t } \n\t\t \n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\terrorCount++;\n\t\t\t//can not successfully get the station destination\n\t\t\tif(errorCount==10)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"System Error From Car Production Line: Can not get the destination with current strategy\");\n\t\t\t}\n\t\t\t\t\t\n\n\n\t\t}\n\t\treturn null;\n\t}",
"@Test\n\tpublic void testGA() {\n\t\tGenetic ga = new Genetic(100, 500, 10, SelectionType.TOURNAMENT , 0.6, 0.1);\n\t\tOptimumSolution os = ga.run();\n\t\tSystem.out.println(os.getSolution());\n\t}",
"public interface Species {\r\n\r\n\r\n\t/**\r\n\t * Calculate the amount that a species will spawn.\r\n\t */\r\n\tvoid calculateSpawnAmount();\r\n\r\n\t/**\r\n\t * Choose a worthy parent for mating.\r\n\t * \r\n\t * @return The parent genome.\r\n\t */\r\n\tGenome chooseParent();\r\n\r\n\t/**\r\n\t * @return The age of this species.\r\n\t */\r\n\tint getAge();\r\n\r\n\t/**\r\n\t * @return The best score for this species.\r\n\t */\r\n\tdouble getBestScore();\r\n\r\n\t/**\r\n\t * @return How many generations with no improvement.\r\n\t */\r\n\tint getGensNoImprovement();\r\n\r\n\t/**\r\n\t * @return Get the leader for this species. The leader is the genome with\r\n\t * the best score.\r\n\t */\r\n\tGenome getLeader();\r\n\r\n\t/**\r\n\t * @return The numbers of this species.\r\n\t */\r\n\tList<Genome> getMembers();\r\n\r\n\t/**\r\n\t * @return The number of genomes this species will try to spawn into the\r\n\t * next generation.\r\n\t */\r\n\tdouble getNumToSpawn();\r\n\r\n\t/**\r\n\t * @return The number of spawns this species requires.\r\n\t */\r\n\tdouble getSpawnsRequired();\r\n\r\n\t/**\r\n\t * @return The species ID.\r\n\t */\r\n\tlong getSpeciesID();\r\n\r\n\t/**\r\n\t * Purge old unsuccessful genomes.\r\n\t */\r\n\tvoid purge();\r\n\r\n\t/**\r\n\t * Set the age of this species.\r\n\t * @param age The age.\r\n\t */\r\n\tvoid setAge(int age);\r\n\r\n\t/**\r\n\t * Set the best score.\r\n\t * @param bestScore The best score.\r\n\t */\r\n\tvoid setBestScore(double bestScore);\r\n\r\n\t/**\r\n\t * Set the number of generations with no improvement.\r\n\t * @param gensNoImprovement The number of generations with\r\n\t * no improvement.\r\n\t */\r\n\tvoid setGensNoImprovement(int gensNoImprovement);\r\n\r\n\t/**\r\n\t * Set the leader of this species.\r\n\t * @param leader The leader of this species.\r\n\t */\r\n\tvoid setLeader(Genome leader);\r\n\r\n\t/**\r\n\t * Set the number of spawns required.\r\n\t * @param spawnsRequired The number of spawns required.\r\n\t */\r\n\tvoid setSpawnsRequired(double spawnsRequired);\r\n}",
"public static void GA(ArrayList<City> cities){\n int pathLength = cities.size();\n // the number of chromosomes which will be generated\n int populationSize = 100;\n // the number of chromosomes that will be generated from crossover as a percentage of the population\n double crossoverRate = 0.8;\n // the number of chromosomes that will be generated from crossover\n int crossoverSize = (int) (populationSize * crossoverRate);\n // the probability that a chromosome can have a random mutation\n double mutationRate = 0.05;\n // the number of generations\n int generations = 5000;\n\n // Initialising the distance matrix using the initialiseDistanceMatrix method\n initialiseDistanceMatrix(cities);\n\n // Generating the Initial Population\n ArrayList<Chromosome> population = generatePopulation(cities, pathLength, populationSize);\n\n // The following is done for each generation of the population\n for (int i = 0; i < generations; i++) {\n // calculating the fitness of every chromosome in the current generation\n calculateFitnessOfPopulation(population);\n // sort the population so that the chromosomes with the highest fitness are at the start of the list\n Collections.sort(population);\n // call the method which performs crossover on the population\n Set<Chromosome> children = crossoverPopulation(population, populationSize, crossoverSize);\n // carry out mutation on the children of the current population\n children.addAll( mutatePopulation(children, mutationRate) );\n\n // evolve the population\n population.addAll(children);\n ArrayList<Chromosome> currentGeneration = new ArrayList<>(population);\n ArrayList<Chromosome> nextGeneration = evolvePopulation(currentGeneration, populationSize, cities, pathLength);\n population = new ArrayList<>(nextGeneration);\n }\n\n // find the fittest chromosome\n Chromosome fittestChromosome = population.get(0);\n double maxFitness = population.get(0).fitness;\n for (Chromosome c : population) {\n if (c.fitness > maxFitness) {\n maxFitness = c.fitness;\n fittestChromosome = c;\n }\n }\n // display the path and distance of the fittest chromosome\n System.out.println(fittestChromosome.getPath());\n System.out.println(\"Total Route Distance: \" + routeDistance(fittestChromosome));\n\n //printPopulation(population);\n }",
"Genome chooseParent();",
"private void findResourcesFake() {\r\n\t\t\r\n\t\tRandom random = new Random();\t\r\n\t\t\r\n\t\t\t\t\t\t\r\n\t\tif (random.nextInt() % 10 == 0) {PoCOnline.setSelected(true); loadContainerOnline.setSelected(true);}\t\r\n\t\tif (random.nextInt() % 10 == 0) {fillRedOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {fillYellowOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {fillBlueOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {testOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {lidOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {dispatchOnline.setSelected(true);}\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"private void mutate(float probability) {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < this.pop_size; i++) {\r\n\r\n float temp_genes[] = this.offspring_population.getPopulation()[i].getGenes();\r\n\r\n // mutation can now mutate wild cards\r\n for (int j = 0; j < temp_genes.length; j++) {\r\n float k = new Random().nextFloat();\r\n\r\n if (k <= probability) {\r\n float temp = new Random().nextFloat();\r\n temp_genes[j] = temp; // add a float between 0-1 // just mutate a new float\r\n }\r\n }\r\n individual child = new individual(temp_genes, solutions, output);\r\n temp_pop[i] = child;\r\n }\r\n this.main_population.setPopulation(temp_pop);\r\n this.main_population.update_population();\r\n }",
"public void runTournament() {\n\t\t//ArrayList<Gene> tournament = new ArrayList<Gene>();\n\t\tPriorityQueue<Gene> tournament = new PriorityQueue<Gene>(Collections.reverseOrder());\n\t\tint numContenders = (int)(FRAC_IN_TOURNAMENT * geneNumber);\n\t\tSet<Integer> chosenOnes = new HashSet<Integer>();\n\t\t\n\t\twhile(chosenOnes.size() < numContenders) {\n\t\t\tint randIndex = (int) (Math.random() * geneNumber);\n\t\t\tchosenOnes.add(randIndex);\n\t\t}\n\t\tfor(int i : chosenOnes){\n\t\t\ttournament.add(genepool.get(i));\n\t\t}\n\t\t//int firstIndex = getMax(tournament, -1);\n\t\t//int secondIndex = getMax(tournament, firstIndex);\n\t\t//Gene parent1 = tournament.get(firstIndex);\n\t\t//Gene parent2 = tournament.get(secondIndex);\n\t\tGene parent1 = tournament.poll();\n\t\tGene parent2 = tournament.poll();\n\t\t// Create a new gene from the 2 fittest genes\n\t\tGene newGene = parent1.waCrossover(parent2);\n\t\t\n\t\t// Calculate fitness for the new gene\n\t\tPlayerSkeleton.runGames(numGames, newGene);\n\t\toffspringPool.add(newGene);\n\t}",
"public void generateGenes() {\n\t\tfor(int i = 0; i < geneNumber; i++){\n\t\t\tdouble[] vector = new double[NUM_HEURISTICS];\n\t\t\tfor(int j = 0; j < NUM_HEURISTICS; j++){\n\t\t\t\t// To get a number in [-0.5, 0.5)\n\t\t\t\tvector[j] = Math.random() - 0.5;\n\t\t\t}\n\t\t\tGene newGene = new Gene(vector, true);\n\t\t\tgenepool.add(newGene);\n\t\t}\n\t}",
"public void testChangeOfSpecies() {\n GUIManager oManager = null;\n String sFileName = null;\n try {\n oManager = new GUIManager(null);\n sFileName = writeValidXMLFile();\n oManager.inputXMLParameterFile(sFileName);\n \n //Now change the species\n String[] sNewSpecies = new String[] {\n \"Species 3\",\n \"Species 2\",\n \"Species 1\",\n \"Species 4\",\n \"Species 5\",\n \"Species 6\"};\n \n oManager.getTreePopulation().setSpeciesNames(sNewSpecies);\n ManagementBehaviors oManagementBeh = oManager.getManagementBehaviors();\n ArrayList<Behavior> p_oBehs = oManagementBeh.getBehaviorByParameterFileTag(\"QualityVigorClassifier\");\n assertEquals(1, p_oBehs.size());\n QualityVigorClassifier oQual = (QualityVigorClassifier) p_oBehs.get(0);\n \n assertEquals(3, oQual.mp_oQualityVigorSizeClasses.size());\n \n QualityVigorSizeClass oClass = oQual.mp_oQualityVigorSizeClasses.get(0);\n assertEquals(10, oClass.m_fMinDbh, 0.0001);\n assertEquals(20, oClass.m_fMaxDbh, 0.0001);\n \n assertEquals(0.78, ((Float)oClass.mp_fProbVigorous.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.88, ((Float)oClass.mp_fProbVigorous.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oClass.mp_fProbVigorous.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.61, ((Float)oClass.mp_fProbVigorous.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.33, ((Float)oClass.mp_fProbSawlog.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.64, ((Float)oClass.mp_fProbSawlog.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(1, ((Float)oClass.mp_fProbSawlog.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.55, ((Float)oClass.mp_fProbSawlog.getValue().get(4)).floatValue(), 0.0001);\n \n \n oClass = oQual.mp_oQualityVigorSizeClasses.get(1);\n assertEquals(20, oClass.m_fMinDbh, 0.0001);\n assertEquals(30, oClass.m_fMaxDbh, 0.0001);\n \n assertEquals(0.33, ((Float)oClass.mp_fProbVigorous.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.81, ((Float)oClass.mp_fProbVigorous.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.64, ((Float)oClass.mp_fProbVigorous.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.32, ((Float)oClass.mp_fProbVigorous.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.32, ((Float)oClass.mp_fProbSawlog.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.69, ((Float)oClass.mp_fProbSawlog.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.33, ((Float)oClass.mp_fProbSawlog.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.58, ((Float)oClass.mp_fProbSawlog.getValue().get(4)).floatValue(), 0.0001);\n \n \n oClass = oQual.mp_oQualityVigorSizeClasses.get(2);\n assertEquals(30, oClass.m_fMinDbh, 0.0001);\n assertEquals(40, oClass.m_fMaxDbh, 0.0001);\n \n assertEquals(0.34, ((Float)oClass.mp_fProbVigorous.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.57, ((Float)oClass.mp_fProbVigorous.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.26, ((Float)oClass.mp_fProbVigorous.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.46, ((Float)oClass.mp_fProbVigorous.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.13, ((Float)oClass.mp_fProbSawlog.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.36, ((Float)oClass.mp_fProbSawlog.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.66, ((Float)oClass.mp_fProbSawlog.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.45, ((Float)oClass.mp_fProbSawlog.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.1, ((Float)oQual.mp_fQualVigorBeta0Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta0Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.3, ((Float)oQual.mp_fQualVigorBeta0Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.4, ((Float)oQual.mp_fQualVigorBeta0Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.2, ((Float)oQual.mp_fQualVigorBeta11Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(2.35, ((Float)oQual.mp_fQualVigorBeta11Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.1, ((Float)oQual.mp_fQualVigorBeta11Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(2.43, ((Float)oQual.mp_fQualVigorBeta11Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(-2.3, ((Float)oQual.mp_fQualVigorBeta12Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(1.12, ((Float)oQual.mp_fQualVigorBeta12Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.32, ((Float)oQual.mp_fQualVigorBeta12Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(1.3, ((Float)oQual.mp_fQualVigorBeta12Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.13, ((Float)oQual.mp_fQualVigorBeta13Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta13Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(-0.2, ((Float)oQual.mp_fQualVigorBeta13Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta13Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.9, ((Float)oQual.mp_fQualVigorBeta14Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta14Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(-1, ((Float)oQual.mp_fQualVigorBeta14Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta14Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta15Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.25, ((Float)oQual.mp_fQualVigorBeta15Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta15Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(-0.45, ((Float)oQual.mp_fQualVigorBeta15Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta16Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.36, ((Float)oQual.mp_fQualVigorBeta16Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta16Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.46, ((Float)oQual.mp_fQualVigorBeta16Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.01, ((Float)oQual.mp_fQualVigorBeta2Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.02, ((Float)oQual.mp_fQualVigorBeta2Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.04, ((Float)oQual.mp_fQualVigorBeta2Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.1, ((Float)oQual.mp_fQualVigorBeta2Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.001, ((Float)oQual.mp_fQualVigorBeta3Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.2, ((Float)oQual.mp_fQualVigorBeta3Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.3, ((Float)oQual.mp_fQualVigorBeta3Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.4, ((Float)oQual.mp_fQualVigorBeta3Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.25, ((Float)oQual.mp_fQualVigorBeta0Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(1.13, ((Float)oQual.mp_fQualVigorBeta0Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta0Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(1.15, ((Float)oQual.mp_fQualVigorBeta0Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.36, ((Float)oQual.mp_fQualVigorBeta11Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta11Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.4, ((Float)oQual.mp_fQualVigorBeta11Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta11Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.02, ((Float)oQual.mp_fQualVigorBeta12Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(10, ((Float)oQual.mp_fQualVigorBeta12Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.3, ((Float)oQual.mp_fQualVigorBeta12Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(30, ((Float)oQual.mp_fQualVigorBeta12Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.2, ((Float)oQual.mp_fQualVigorBeta13Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(10, ((Float)oQual.mp_fQualVigorBeta13Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(-0.3, ((Float)oQual.mp_fQualVigorBeta13Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(30, ((Float)oQual.mp_fQualVigorBeta13Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(-0.2, ((Float)oQual.mp_fQualVigorBeta14Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(10, ((Float)oQual.mp_fQualVigorBeta14Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(-0.4, ((Float)oQual.mp_fQualVigorBeta14Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(30, ((Float)oQual.mp_fQualVigorBeta14Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(-0.2, ((Float)oQual.mp_fQualVigorBeta2Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(10, ((Float)oQual.mp_fQualVigorBeta2Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta2Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(30, ((Float)oQual.mp_fQualVigorBeta2Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta3Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(10, ((Float)oQual.mp_fQualVigorBeta3Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.1, ((Float)oQual.mp_fQualVigorBeta3Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(30, ((Float)oQual.mp_fQualVigorBeta3Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.1, ((Float)oQual.mp_fQualVigorProbNewAdultsVig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.25, ((Float)oQual.mp_fQualVigorProbNewAdultsVig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.5, ((Float)oQual.mp_fQualVigorProbNewAdultsVig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.74, ((Float)oQual.mp_fQualVigorProbNewAdultsVig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.9, ((Float)oQual.mp_fQualVigorProbNewAdultsQual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.25, ((Float)oQual.mp_fQualVigorProbNewAdultsQual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.3, ((Float)oQual.mp_fQualVigorProbNewAdultsQual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.74, ((Float)oQual.mp_fQualVigorProbNewAdultsQual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(6, oQual.mp_iQualVigorDeciduous.getValue().size());\n for (int i = 0; i < oQual.mp_iQualVigorDeciduous.getValue().size(); i++)\n assertNotNull(oQual.mp_iQualVigorDeciduous.getValue().get(i));\n assertEquals(1, ((ModelEnum)oQual.mp_iQualVigorDeciduous.getValue().get(1)).getValue());\n assertEquals(0, ((ModelEnum)oQual.mp_iQualVigorDeciduous.getValue().get(0)).getValue());\n assertEquals(1, ((ModelEnum)oQual.mp_iQualVigorDeciduous.getValue().get(3)).getValue());\n assertEquals(0, ((ModelEnum)oQual.mp_iQualVigorDeciduous.getValue().get(4)).getValue());\n\n System.out.println(\"Change of species test succeeded.\");\n }\n catch (ModelException oErr) {\n fail(\"Change of species test failed with message \" + oErr.getMessage());\n }\n catch (java.io.IOException oE) {\n fail(\"Caught IOException. Message: \" + oE.getMessage());\n }\n finally {\n new File(sFileName).delete();\n }\n }",
"public void reproduce(){\n\t\t// sort the population from strongest to weakest\n\t\tCollections.sort(population);\n\t\tCollections.reverse(population);\n\t\t\n\t\tfor(int i = 0; i < (int)(POPULATION_SIZE*POPULATION_ACTION_PERCENT); i+=2){\n\t\t\t\n\t\t\t// get two random indexes for reproduction based on the exponential function\n\t\t\t// (1/1000) * (randInt)^2 = index\n\t\t\t// this function favors sequences with higher fitness scores\n\t\t\tint randIndex1 = randomGenerator.nextInt((int)Math.sqrt(1000*POPULATION_SIZE*(1-POPULATION_ACTION_PERCENT)));\n\t\t\tint randIndex2 = randomGenerator.nextInt((int)Math.sqrt(1000*POPULATION_SIZE*(1-POPULATION_ACTION_PERCENT)));\n\t\t\t\n\t\t\trandIndex1 = (int) (Math.pow(randIndex1, 2) / 1000);\n\t\t\trandIndex2 = (int) (Math.pow(randIndex2, 2) / 1000);\n\t\t\t\n\t\t\t// get two pieces\n\t\t\tBuildingPiece[] array1 = population.get(randIndex1).getList();\n\t\t\tBuildingPiece[] array2 = population.get(randIndex2).getList();\n\t\t\t\n\t\t\t// find a splicing point\n\t\t\tint splicePoint = findSplicingPoint(array1, array2);\n\t\t\t\n\t\t\t// generate two new arrays based on the splicing point\n\t\t\tBuildingPiece[] newArray1 = generateNewArray(array1, array2, splicePoint);\n\t\t\tBuildingPiece[] newArray2 = generateNewArray(array2, array1, splicePoint);\n\t\t\t\n\t\t\t// make new buildings with the new arrays\n\t\t\tBuilding bp1 = new Building(newArray1, generation, possiblePieces);\n\t\t\tBuilding bp2 = new Building(newArray2, generation, possiblePieces);\n\t\t\t\n\t\t\t// mutate the new building sequences\n\t\t\tmutateArray(bp1);\n\t\t\tmutateArray(bp2);\n\t\t\t\n\t\t\t// add them into the population\n\t\t\tpopulation.add(randIndex1, bp1);\n\t\t\tpopulation.add(randIndex2, bp2);\n\t\t}\n\t}",
"private static void mating() {\n\t\tint getRand = 0;\n\t\tint parentA = 0;\n\t\tint parentB = 0;\n\t\tint newIndex1 = 0;\n\t\tint newIndex2 = 0;\n\t\tChromosome newChromo1 = null;\n\t\tChromosome newChromo2 = null;\n\n\t\tfor (int i = 0; i < OFFSPRING_PER_GENERATION; i++) {\n\t\t\tparentA = chooseParent();\n\t\t\t// Test probability of mating.\n\t\t\tgetRand = getRandomNumber(0, 100);\n\t\t\tif (getRand <= MATING_PROBABILITY * 100) {\n\t\t\t\tparentB = chooseParent(parentA);\n\t\t\t\tnewChromo1 = new Chromosome();\n\t\t\t\tnewChromo2 = new Chromosome();\n\t\t\t\tpopulation.add(newChromo1);\n\t\t\t\tnewIndex1 = population.indexOf(newChromo1);\n\t\t\t\tpopulation.add(newChromo2);\n\t\t\t\tnewIndex2 = population.indexOf(newChromo2);\n\n\t\t\t\t// Choose either, or both of these:\n\t\t\t\tpartiallyMappedCrossover(parentA, parentB, newIndex1, newIndex2);\n\t\t\t\t// positionBasedCrossover(parentA, parentB, newIndex1, newIndex2);\n\n\t\t\t\tif (childCount - 1 == nextMutation) {\n\t\t\t\t\texchangeMutation(newIndex1, 1);\n\t\t\t\t} else if (childCount == nextMutation) {\n\t\t\t\t\texchangeMutation(newIndex2, 1);\n\t\t\t\t}\n\n\t\t\t\tpopulation.get(newIndex1).computeConflicts();\n\t\t\t\tpopulation.get(newIndex2).computeConflicts();\n\n\t\t\t\tchildCount += 2;\n\n\t\t\t\t// Schedule next mutation.\n\t\t\t\tif (childCount % (int) Math.round(1.0 / MUTATION_RATE) == 0) {\n\t\t\t\t\tnextMutation = childCount + getRandomNumber(0, (int) Math.round(1.0 / MUTATION_RATE));\n\t\t\t\t}\n\t\t\t}\n\t\t} // i\n\t\treturn;\n\t}",
"public float randomQual() {\n\t\treturn((float) getRandomInteger(30,250));\n\t}",
"public static void main(String[] args) throws IOException {\n\t\tint p = 8;\n\t\t// r is the fraction of the population to be replaced by Crossover at\n\t\t// each step\n//\t\tdouble r = Double.valueOf(8).doubleValue();\n\t\tdouble r = 8;\n\t\t// m is the rate of mutation\n//\t\tdouble m = Double.valueOf(8).doubleValue();\n\t\tdouble m = 8;\n\n\t\t// Write into files...\n\t\tFile outputFile = new File(\"testGA.txt\");\n\t\tFileWriter out = new FileWriter(outputFile);\n\n\t\t////////////////////////\n\t\tp = 33;\n\t\tr = 0.6;\n\t\tm = 0.1;\n\n\t\t// Report the population size, crossover rate and mutation rate\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Learning the 8-queens problem with a Genetic Algorithm\");\n\t\tSystem.out.println(\"Population Size: \" + p);\n\t\tSystem.out.println(\"Crossover Rate: \" + r);\n\t\tSystem.out.println(\"Mutation Rate: \" + m);\n\t\tSystem.out.println();\n\t\tout.write(\"Parameters are p=\" + p + \", \" + \"r=\" + r + \" and m=\" + m + \"\\r\");\n\n\t\t// The genetic algorithm\n\t\tint iterationNum = 0;\n\t\tHypothesis bestIndividual;\n\t\tint bestFitness;\n\t\tdouble aveFitness;\n\t\t// Randomly generate initial population\n\t\tGA algorithm = new GA(p, r, m);\n\t\t// For each individual compute fitness\n\t\talgorithm.computeFitness();\n\t\t// Get the best individual\n\t\tbestIndividual = (algorithm.getPopulation())[0];\n\t\tbestFitness = bestIndividual.getFitness();\n\t\taveFitness = algorithm.computeAveFitness();\n\t\t// Iterate till we get the very best individual\n\t\twhile (bestFitness != 0) {\n\t\t\t// Select the very best members of the population to survive\n\t\t\talgorithm.select();\n\t\t\t// Make the best members reproduce themselves\n\t\t\talgorithm.crossover();\n\t\t\t// Add some mutations to new population\n\t\t\talgorithm.mutate();\n\t\t\t// The successor population becomes the current population\n\t\t\talgorithm.setNextGeneration();\n\t\t\t// For each individual compute fitness\n\t\t\talgorithm.computeFitness();\n\t\t\t// Get the best individual\n\t\t\tbestIndividual = (algorithm.getPopulation())[0];\n\t\t\tbestFitness = bestIndividual.getFitness();\n\t\t\taveFitness = algorithm.computeAveFitness();\n\t\t\t// Report best results to the user at every five iterations\n\t\t\tif (iterationNum % 5 == 0) {\n\t\t\t\tSystem.out.println(\"Iteration: \" + iterationNum + \" Best Fitness: \" + bestFitness\n\t\t\t\t\t\t+ \" Average Fitness \" + aveFitness);\n\t\t\t\tSystem.out.println(\"Best solution: \" + bestIndividual.toString());\n\t\t\t\tSystem.out.println();\n\t\t\t\tout.write(\"\\n\" + iterationNum + \",\" + bestFitness + \",\" + aveFitness + \"\\r\");\n\t\t\t}\n\t\t\titerationNum++;\n\t\t}\n\t\tSystem.out.println(\n\t\t\t\t\"Iteration: \" + iterationNum + \" Best Fitness: \" + bestFitness + \" Average Fitness \" + aveFitness);\n\t\tSystem.out.println(\"Solution is \" + bestIndividual.toString());\n\t\tout.write(\"\\n\" + iterationNum + \",\" + bestFitness + \",\" + aveFitness + \"\\r\");\n\t\tout.close();\n\t}",
"@Test\n \tpublic void testTargetRandomSelection() {\n \tComputerPlayer player = new ComputerPlayer();\n \t// Pick a location with no rooms in target, just three targets\n \tboard.calcTargets(23, 7, 2);\n \tint loc_24_8Tot = 0;\n \tint loc_22_8Tot = 0;\n \tint loc_21_7Tot = 0;\n \t// Run the test 100 times\n \tfor (int i=0; i<100; i++) {\n \t\tBoardCell selected = player.pickLocation(board.getTargets());\n \t\tif (selected == board.getRoomCellAt(24, 8))\n \t\t\tloc_24_8Tot++;\n \t\telse if (selected == board.getRoomCellAt(22, 8))\n \t\t\tloc_22_8Tot++;\n \t\telse if (selected == board.getRoomCellAt(21, 7))\n \t\t\tloc_21_7Tot++;\n \t\telse\n \t\t\tfail(\"Invalid target selected\");\n \t}\n \t// Ensure we have 100 total selections (fail should also ensure)\n \tassertEquals(100, loc_24_8Tot + loc_22_8Tot + loc_21_7Tot);\n \t// Ensure each target was selected more than once\n \tassertTrue(loc_24_8Tot > 10);\n \tassertTrue(loc_22_8Tot > 10);\n \tassertTrue(loc_21_7Tot > 10);\t\t\t\t\t\t\t\n }",
"private void setBestSample(Sample s) {\n//\t\t System.out.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\");\n//\t\t System.out.println(\"!!! New best sample with fitness \" +\n//\t\t s.getFitness() + \"!!!\");\n\t\tbestSample = s;\n\t}",
"public int randomGQ() {\n\t\treturn(getRandomInteger(10,100));\n\t}",
"public Chromosome bestChromosome()\r\n {\r\n\treturn bestChromo.clone();\r\n }",
"public Genome() {\n this.code = new int[GENOME_SIZE];\n for (int i = 0; i < 8; ++i) {\n this.code[i] = i;\n }\n for (int i = 8; i < Genome.GENOME_SIZE; ++i) {\n this.code[i] = r.nextInt(8);\n }\n this.repairGenome();\n Arrays.sort(this.code);\n this.calculatePopularity();\n }",
"public void perdEnergieRandom() {\r\n Random rd = new Random();\r\n robots.get(rd.nextInt(robots.size() - 1)).perdEnergie(5);\r\n }",
"private void selectRandomUnexploredProfile(GameObserver gameObs) {\n if (eGame.getTotalNumSamples() >= eGame.getNumProfiles() ||\n gameObs.numObsLeft() <= 0) return;\n\n eGame.getRandomProfile(currentOutcome);\n while (eGame.getNumSamples(currentOutcome) > 0) {\n eGame.getRandomProfile(currentOutcome);\n }\n\n sampleAndUpdate(currentOutcome, gameObs);\n }",
"public static void breedAll() {\n int a, b; //Pointers to select parents\n\n //While loop to ensure full carrying capacity of population\n while (Population.size() <= maxPop) {\n //Sorts by Fitness level first\n sortByFitlvl();\n\n //Selects Two Random Parents\n a = (int) (Math.abs(Utilities.sharpGauss(4)) * Population.size());\n b = (int) (Math.abs(Utilities.sharpGauss(4)) * Population.size());\n //System.out.println(a+\"\\t\"+b+\"\\t\"+Population.size());\n\n // Between 1-2 children\n int children = rand.nextInt(2)+1;\n for (int i = 0; i < children; i++) {\n Population.add(Breeder.breed(Population.get(a), Population.get(b), 0.1));\n }\n\n //sortByFitlvl();\n }\n\n if (debug)\n printPopulation(true);\n }",
"private ArrayList<Chromosome> selectParentsRandom() {\n ArrayList<Chromosome> parents = new ArrayList<Chromosome>(Defines.crossoverParentCt);\n\n for (int i = 0; i < Defines.crossoverParentCt; i++) {\n // Generate random index into chromosomes in range [0..size-1]\n int randomParent = Defines.randNum(0, chromosomes.size() - 1);\n // Remember the new parent\n parents.add(chromosomes.get(randomParent));\n }\n return parents;\n }",
"public Chromosome doDisplacementMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n\n int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n\n int leftAllele = Math.min(allele1, allele2);\n int rightAllele = Math.max(allele1, allele2);\n\n var selectionSublist = new ArrayList<Boolean>(newSelection.subList(leftAllele, rightAllele));\n for(int j = leftAllele; j < rightAllele + 1; j++){\n newSelection.remove(leftAllele);\n }\n\n int index = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size()+1);\n newSelection.addAll(index, selectionSublist);\n\n Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated();\n if(mutatedKnapsack.isValid())\n return mutatedKnapsack;\n }\n return this;\n }",
"public void setFitness(float fitness)\r\n\t{\r\n\t\tthis.fitness = fitness;\r\n\t}",
"private Action selectRandomAction() {\n int fuel;\n String car, driver;\n Tire tire;\n TirePressure pressure;\n\n // Possible tire pressures\n List<TirePressure> tirePressures = Arrays.asList(\n TirePressure.FIFTY_PERCENT,\n TirePressure.SEVENTY_FIVE_PERCENT,\n TirePressure.ONE_HUNDRED_PERCENT\n );\n\n // Possible fuel levels (note that this is an arbitrary discretization)\n List<Integer> fuelLevels = new ArrayList<>();\n int fuelInterval = ProblemSpec.FUEL_MAX / FUEL_DISCRETE_INTERVALS;\n\n for (int i = 0; i < FUEL_DISCRETE_INTERVALS; i++) {\n fuelLevels.add(fuelInterval * i);\n }\n\n List<ActionType> validActionTypes = problemSpec.getLevel().getAvailableActions();\n ActionType actionType = getRandomElement(validActionTypes);\n Action action;\n\n // Pick a random action from A1-A8 and then randomize the parameters\n switch (actionType.getActionNo()) {\n case 1:\n action = new Action(actionType);\n break;\n case 2:\n car = getRandomElement(problemSpec.getCarOrder());\n action = new Action(actionType, car);\n break;\n case 3:\n driver = getRandomElement(problemSpec.getDriverOrder());\n action = new Action(actionType, driver);\n break;\n case 4:\n tire = getRandomElement(problemSpec.getTireOrder());\n action = new Action(actionType, tire);\n break;\n case 5:\n fuel = getRandomElement(fuelLevels);\n action = new Action(actionType, fuel);\n break;\n case 6:\n pressure = getRandomElement(tirePressures);\n action = new Action(actionType, pressure);\n break;\n case 7:\n car = getRandomElement(problemSpec.getCarOrder());\n driver = getRandomElement(problemSpec.getDriverOrder());\n action = new Action(actionType, car, driver);\n break;\n default:\n // A8\n tire = getRandomElement(problemSpec.getTireOrder());\n fuel = getRandomElement(fuelLevels);\n pressure = getRandomElement(tirePressures);\n action = new Action(actionType, tire, fuel, pressure);\n }\n\n return action;\n\n }",
"public static void Random() {\n\t\tRandom ran =new Random();\r\n\t\trandom=ran.nextInt(6)+1;\r\n\t\t//random=1;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tif((ch[who].status)>0) {\r\n\t\t\tch[who].location=(ch[who].location)+random;\r\n\t\t\tch[who].status=(ch[who].status)-1;\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\t\treturn;\r\n\t\t\t}\t\t\r\n\t}",
"private static void getFitness() {\n\t\tint popSize = population.size();\n\t\tChromosome thisChromo = null;\n\t\tdouble bestScore = 0;\n\t\tdouble worstScore = 0;\n\n\t\t// The worst score would be the one with the highest energy, best would be\n\t\t// lowest.\n\t\tworstScore = population.get(maximum()).conflicts();\n\n\t\t// Convert to a weighted percentage.\n\t\tbestScore = worstScore - population.get(minimum()).conflicts();\n\n\t\tfor (int i = 0; i < popSize; i++) {\n\t\t\tthisChromo = population.get(i);\n\t\t\tthisChromo.fitness((worstScore - thisChromo.conflicts()) * 100.0 / bestScore);\n\t\t}\n\n\t\treturn;\n\t}",
"public Individu selection() {\n\t\t// Pioche au hasard deux individus differents\n\t\tRandom rand = new Random();\n\t\tint index1 = 0, index2 = 0;\n\t\tindex1 = rand.nextInt(this.individus.size());\n\t\twhile(index1 == index2) {\n\t\t\tindex2 = rand.nextInt(this.individus.size());\n\t\t}\n\n\t\t//double fitness1 =\n\t\tdouble fitness1 = this.individus.get(index1).fitness();\n\t\tdouble fitness2 = this.individus.get(index2).fitness();\n\n\t\t// Determine le meilleur du moins bon\n\t\tIndividu better, worse;\n\t\tif(fitness1 > fitness2) {\n\t\t\tbetter = this.individus.get(index1);\n\t\t\tworse = this.individus.get(index2);\n\t\t} else {\n\t\t\tworse = this.individus.get(index1);\n\t\t\tbetter = this.individus.get(index2);\n\t\t}\n\n\t\t// Dans 75% des cas, onp rend le meilleur des deux\n\t\tif(rand.nextDouble() <= 0.75) {\n\t\t\treturn better;\n\t\t} else {\n\t\t\treturn worse;\n\t\t}\n\t}",
"public void rgs() {\n\t\tArrayList<int[]> front = this.unknown;\n\t\tRandom rand = new Random();\n\t\tint index = rand.nextInt(front.size());\n\t\tint loc[] = front.get(index);\n\t\tprobe(loc[0], loc[1]);\n\t\trgsCount++;\n\t\tSystem.out.println(\"RGS: probe[\" +loc[0] + \",\" + loc[1] + \"]\");\n\t\tshowMap();\n\t}",
"public static String randomSelection() {\n int min = 1;\n int max = 3;\n String randomSelection;\n Random random = new Random(System.currentTimeMillis());\n int randomNumber = random.nextInt((max - min) +1) +min;\n if(randomNumber == 1) {\n randomSelection = \"rock\";\n } else if (randomNumber == 2) {\n randomSelection = \"paper\";\n } else {\n randomSelection = \"scissors\";\n }\n return randomSelection;\n }",
"void update(String selectedGene);",
"public void setRandomGenes(int i){\n if (i > populationSize){\n throw new IllegalArgumentException(\"The number of random genes per generation must not be greater than the population size\");\n }\n randGenes = i;\n }",
"@Override\n public String getName() {\n return \"Genetic\";\n }",
"private static double fitness(PMCGenotype gene, int trials)\n\t{\n\t\tController<MOVE> btc = new PacManBTController(decode(gene));\n\t\treturn runExperiment(btc, ghostController, trials);\n\t}",
"void setFitness(double fitness) throws UnsupportedOperationException;",
"private static Tour tournamentSelection(Population pop) {\n // Create a tournament population\n Population tournament = new Population(tournamentSize, false);\n // For each place in the tournament get a random candidate tour and\n // add it\n for (int i = 0; i < tournamentSize; i++) {\n int randomId = (int) (Math.random() * pop.populationSize());\n tournament.saveTour(i, pop.getTour(randomId));\n }\n // Get the fittest tour\n Tour fittest = tournament.getFittest();\n return fittest;\n }",
"void pickGarb() {\n if (model.hasObject(GARB, getAgPos(0))) {\n // sometimes the \"picking\" action doesn't work\n // but never more than MErr times\n if (random.nextBoolean() || nerr == MErr) {\n remove(GARB, getAgPos(0));\n nerr = 0;\n r1HasGarb = true;\n } else {\n nerr++;\n }\n }\n }",
"private Vector step(){\n// System.out.println();\n// System.out.println(generationCount);\n// System.out.println(\"The Population is:\");\n// System.out.println(population);\n \n //DETERMINE WHO SURVIVES INTO NEXT GENERATION\n Vector nextGeneration = surviveType.run(population, fitnessArray);\n\n //DO THE CROSSOVER PROCESS\n //WHILE THE NEXT GENERATION ISN'T FULL\n while (nextGeneration.size() < (populationSize - randGenes)){\n //FIND PARENTS\n Gene parentOne, parentTwo;\n do {\n Gene[] parents = selectType.run(population, fitnessArray);\n parentOne = parents[0];\n parentTwo = parents[1];\n } while (selectPairs && (! closeEnough(parentOne, parentTwo)));\n //ADD CHILDREN\n Gene[] kids = crossType.children(parentOne, parentTwo);\n\n nextGeneration.add(kids[0]);\n if (nextGeneration.size() < (populationSize - randGenes)){\n nextGeneration.add(kids[1]);\n }\n }\n //ADD RANDOM GENES TO THE POPULATION\n while (nextGeneration.size() < populationSize){\n nextGeneration.add(initializer.createRandomGene(fitnessFunction, minRadius, maxRadius));\n }\n //MUTATE THE NEXT GENERATION\n for (int j = 0; j < populationSize; j++){\n if (Math.random() < mutationProb){\n nextGeneration.set(j, mutationType.run((Gene) nextGeneration.get(j)));\n }\n }\n\n //COMPUTE FITNESSES AND RELOCATE IF NECESSARY\n Gene bestGene = (Gene) nextGeneration.get(0);\n int bestX = 0;\n for (int x = 0; x < populationSize; x++){\n Gene next = (Gene) nextGeneration.get(x);\n while (relocationType.move(bannedList, next)){\n Gene newGene = initializer.createRandomGene(fitnessFunction, minRadius, maxRadius);\n next = newGene;\n nextGeneration.set(x, next);\n }\n fitnessArray[x] = next.getFitness();\n\n //FOR THE PURPOSES OF UPDATING THE BANNED LIST\n if (next.getFitness() > bestGene.getFitness()){\n bestGene = next;\n bestX = x;\n }\n } //End for (int x = 0;...\n\n Arrays.sort(fitnessArray);\n\n //UPDATE THE BANNED LIST BY ADDING THE BEST GENE IN THE NEXT GENERATION IF IT'S ABOVE minAccepted AND CONTAINS MORE THAN minPoints POINTS\n if (useList){\n if ((generationCount >= firstAdd) &&\n (solutionCounter >= countNum) &&\n (bestGene.getFitness() >= minAccepted) &&\n (bestGene.getCount() >= minPoints)){\n solutionCounter = 0;\n// System.out.println(bestGene);\n Gene bestClone = new Gene (bestGene.getMajorAxisRadius(), //THIS KLUDGE IS DONE B/C .clone() IS\n bestGene.getMinorAxisRadius(), //PROTECTED, AND I CAN'T UNPROTECT IT.\n bestGene.getX(), //I USE A CLONED GENE TO PREVENT A MUTATION\n bestGene.getY(), //IN THE NEXT GENERATION FROM ALTERING bannedList\n bestGene.getOrientation(),\n bestGene.getFunction());\n bannedList = relocationType.updateBannedList(bannedList, bestClone);\n\n\n //IF NECESSARY, UPDATE THE SOLUTION LIST BY ADDING ALL CLUSTERS WITH MORE THAN minPoints POINTS AND A FITNESS OF AT LEAST minAccepted\n if (returnAllSolutions){\n for (int i = 0; i < populationSize; i++){\n Gene next = (Gene) nextGeneration.get(i);\n if ((next.getFitness() >= minAccepted) && (next.getCount() >= minPoints)){\n solutionList.add(next);\n }\n }//End for (int i = 0...\n } else {\n solutionList = bannedList;\n } //End if (returnAllSolutions){...}else{\n } //End if (generationCount > 4...\n } //End if (useList){\n\n generationCount = generationCount + 1;\n solutionCounter = solutionCounter + 1;\n\n //IF AVOIDING CONVERGENCE, AND IT HAS CONVERGED, START OVER WITH RANDOM GENES\n\n double bestFitness = bestGene.getFitness();\n double medianFitness = roundToHundredths((double) fitnessArray[(int) Math.floor(populationSize / 2)]);\n\n// System.out.println(bestFitness);\n// System.out.println(medianFitness);\n\n if ((antiConvergence) &&\n ((bestFitness - medianFitness) < (0.01 * bestFitness)) &&\n (generationCount > firstAdd)){\n nextGeneration = initializer.getGenes(populationSize, fitnessFunction, minRadius, maxRadius);\n// System.out.println(\"EXPLODED CONVERGENCE!\");\n for (int x = 0; x < populationSize; x++){\n Gene next = (Gene) nextGeneration.get(x);\n fitnessArray[x] = next.getFitness();\n }\n Arrays.sort(fitnessArray);\n }\n\n return nextGeneration;\n }",
"private ExtractedItemsCollection selectItemByChance(Collection<ExtractedItemsCollection> itemsCollections) {\n float sumOfChances = calcSumOfChances(itemsCollections);\n float currentSum = 0f;\n float rnd = (float) Rnd.get(0, (int) (sumOfChances - 1) * 1000) / 1000;\n ExtractedItemsCollection selectedCollection = null;\n for (ExtractedItemsCollection collection : itemsCollections) {\n currentSum += collection.getChance();\n if (rnd < currentSum) {\n selectedCollection = collection;\n break;\n }\n }\n return selectedCollection;\n }",
"private ExtractedItemsCollection selectItemByChance(Collection<ExtractedItemsCollection> itemsCollections) {\n float sumOfChances = calcSumOfChances(itemsCollections);\n float currentSum = 0f;\n float rnd = (float) Rnd.get(0, (int) (sumOfChances - 1) * 1000) / 1000;\n ExtractedItemsCollection selectedCollection = null;\n for (ExtractedItemsCollection collection : itemsCollections) {\n currentSum += collection.getChance();\n if (rnd < currentSum) {\n selectedCollection = collection;\n break;\n }\n }\n return selectedCollection;\n }",
"public Sample SelectSample() {\n\t\t\n\t\tif(sample_map.size() == 0) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tfloat sum = 0;\n\t\tfloat min = Float.MAX_VALUE;\n\t\tLinkSample ptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tmin = Math.min(min, ptr.s.weight);\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tmin = Math.abs(min) + 1;\n\t\tptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tsum += ptr.s.weight + min;\n\t\t\tif(ptr.s.weight + min < 0) {\n\t\t\t\tSystem.out.println(\"neg val\");System.exit(0);\n\t\t\t}\n\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tfloat val = (float) (Math.random() * sum);\n\n\t\tsum = 0;\n\t\tptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tsum += ptr.s.weight + min;\n\n\t\t\tif(sum >= val) {\n\t\t\t\treturn ptr.s;\n\t\t\t}\n\t\t\t\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\tSystem.out.println(\"error\");System.exit(0);\n\t\treturn null;\n\t}",
"public NCRPNode select() {\n\t\t\t\n\t\t\t//dim number of children + 1 (unallocated mass) \n\t\t\tdouble[] weights = new double[children.size() + 1];\n\t \n\t\t\t//weight of unallocated probability mass\n\t\t\tweights[0] = gamma / (gamma + customers);\n\t\t\t\n\t\t\t//calc weight for each child based on the number of customers on them\n\t\t\tint i = 1;\n\t\t\tfor (NCRPNode child: children) {\n\t\t\t\tweights[i] = (double) child.customers / (gamma + customers);\n\t\t\t\ti++;\n\t\t\t}\n\n\t\t\t//sample a child with higher weight\n\t\t\tint choice = random.nextDiscrete(weights);\n\t\t\t//if unallocated mass is sampled, create a new child\n\t\t\tif (choice == 0) {\n\t\t\t\treturn(addChild());\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn children.get(choice - 1);\n\t\t\t}\n\t\t}",
"public abstract Genome getGenome();",
"private void setGBest(Particle p) {\n\t\tadjustGBest(p);\n\t\tgBest = p.copy();\n\t}",
"public boolean randomCreate() {\n\t\t// Generates a random genetic code\n\t\t_geneticCode = new GeneticCode();\n\t\t// it has no parent\n\t\t_parentID = -1;\n\t\t_generation = 1;\n\t\t_growthRatio = 16;\n\t\t// initial energy\n\t\t_energy = Math.min(Utils.INITIAL_ENERGY,_world.getCO2());\n\t\t_world.decreaseCO2(_energy);\n\t\t_world.addO2(_energy);\n\t\t// initialize\n\t\tcreate();\n\t\tsymmetric();\n\t\t// put it in the world\n\t\treturn placeRandom();\n\t}",
"private List<Individual<T>> selectIndividuals(Deme<T> deme) {\n return IntStream.range(0, tournamentSize).mapToObj(i -> selRandomOp.select(deme.getIndividuals()))\n .collect(Collectors.toList());\n }",
"public Position sampleRandomGaussianPosition();",
"public Population evolve()\r\n {\r\n\tArrayList<Chromosome> tempPop = \r\n\t new ArrayList<Chromosome>(chromos.size());\r\n\tChromosome u;\r\n\tChromosome v;\r\n\r\n\tfor(int i = 0; i < chromos.size()/2; i++)\r\n\t {\r\n\t\tu = selectParent();\r\n\t\tv = selectParent();\r\n\t\t\r\n\t\t//System.out.println(\"*****Parent 1 : \\n\" + v);\r\n\t\t\r\n Chromosome c1 = u.child(v);\r\n Chromosome c2 = v.child(u);\r\n\t\ttempPop.add(c1);\r\n\t\ttempPop.add(c2);\r\n\t\t\r\n //System.out.println(\"****Generated new child: \\n\" + c1);\r\n\t }\t \r\n\t\r\n\t// if needed, add in the code for keeping the best chromosome\r\n\tPopulation pop = new Population(tempPop, selMethod, selPara, \r\n\t\t\t\t\tcrossMethod, crossPara, mutMethod, mutPara, \r\n\t\t\t\t\treplaceMethod, replacePara, powerStep, tourStep, ff);\r\n\r\n\tif(replaceMethod == ELITISM)\r\n\t {\r\n\t\tpop.remove(worstChromoIndex);\r\n\t\tpop.add(bestChromo.clone());\r\n\t\tpop.initialize();\r\n\t }\r\n\r\n\tgeneration++;\r\n\treturn pop;\r\n }",
"private static Set<Chromosome> generateRandomPopulation(int pathLength, int randomPopulationSize) {\n Set<Chromosome> population = new HashSet<>();\n\n // create an arraylist of CityIDs, and initialise it with the cities in order of their ID\n ArrayList<Integer> basePath = new ArrayList<>();\n for (int i = 0; i < pathLength; i++) {\n basePath.add(i);\n }\n\n // repeat the following for as many chromosomes as are required (populationSize)\n while (population.size() < randomPopulationSize) {\n Chromosome chromosome = new Chromosome(pathLength);\n // randomise the order of the arraylist of cities\n Collections.shuffle(basePath);\n for (int j = 0; j < pathLength; j++) {\n chromosome.path[j] = basePath.get(j);\n }\n population.add(chromosome);\n }\n\n return population;\n }",
"private void chooseBreedToBeIdentified() {\n Random r = new Random();\n int questionBreedIndex = r.nextInt(3);\n\n questionCarMake = displayingCarMakes.get(questionBreedIndex);\n carMakeNameTitle.setText(questionCarMake);\n }",
"public DoubleChromosome(int size) {\t\n\t\tfor(int g=0; g<size; g++){\n\t\t\tgenes.add(random.nextDouble()-0.5);\n\t\t}\n\t\tinit();\n\t}",
"public abstract double getFitness(Genotype genotype);",
"public static void reproduce (Species [][] map, int sheepHealth, int wolfHealth, int plantHealth) {\n \n // Place the baby\n int babyY, babyX;\n \n // Check if the baby has been placed\n int spawned = 0;\n \n for (int y = 0; y < map[0].length; y++){\n for (int x = 0; x < map.length; x++){\n \n boolean [][] breeding = breedChoice (map, x, y, plantHealth);\n \n // Sheep upwards to breed with\n if (breeding[0][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y-1][x]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep downwards to breed with\n } else if (breeding[1][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y+1][x]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep to the left to breed with\n } else if (breeding[2][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y][x-1]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep to the right to breed with\n } else if (breeding[3][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y][x+1]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Wolf upwards to breed with\n } else if (breeding[0][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y-1][x]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf downwards to breed with\n } else if (breeding[1][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y+1][x]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf to the left to breed with\n } else if (breeding[2][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y][x-1]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf to the right to breed with\n } else if (breeding[3][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y][x+1]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n }\n \n }\n }\n \n }",
"public Chromosone() {\n Random rand = new Random();\n for(int i=0;i<=75;i++)\n {\n int rnd = rand.nextInt(2);// [1,0...]\n\n Val.add(rnd);\n }\n }",
"public void genPopulation(int howMany)\r\n/* 30: */ {\r\n/* 31:54 */ this.pop.removeAllElements();\r\n/* 32:55 */ for (int i = 0; i < howMany; i++)\r\n/* 33: */ {\r\n/* 34:61 */ int[] clusterV = g.genRandomClusterSize();\r\n/* 35:62 */ Cluster c = new Cluster(g, clusterV);\r\n/* 36:63 */ this.pop.addElement(c);\r\n/* 37: */ }\r\n/* 38: */ }",
"public static Tree chooseRandTree(double[] distribution, Tree[] trees){\n double r = new Random().nextDouble();\n //System.out.println(r);\n //System.out.println(Arrays.toString(distribution));\n for (int i = 0; i < distribution.length; i++){\n if (r <= distribution[i]){\n return trees[i];\n }\n \n }\n return null;\n \n \n }",
"private void findBest()\r\n\t{\r\n\t\tint i;\r\n\t\tint size_mature_pool;\r\n\t\tint idx_current;//index of a currently checked genotype\r\n\t\tint num_errors;//number of errors of the current chromosome\r\n\t\tdouble min_error;//smallest error among the oldest genotypes\r\n\t\tVector<Integer> idx_oldest;\r\n\t\t\r\n\t\tsize_mature_pool = _pool_of_bests.size();\r\n\t\t\r\n\t\tidx_oldest = new Vector<Integer>(0, 1);\r\n\t\t\r\n\t\t//find all oldest genotypes\r\n\t\tfor(i=0; i<size_mature_pool; i++)\r\n\t\t{\r\n\t\t\tnum_errors = _pool_of_bests.get(i)._error.all_single_squares.size();\r\n\t\t\tif(num_errors>=_min_life_span)\r\n\t\t\t{\r\n\t\t\t\tidx_oldest.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//find the best oldest gentypes with a span above a threshold\r\n\t\t_best_idx = -1;\r\n\t\tif(idx_oldest.size() > 0)\r\n\t\t{\r\n\t\t\t_best_idx = idx_oldest.get(0);\r\n\t\t\tmin_error = _pool_of_bests.get(_best_idx)._error.getAverageError();\r\n\t\t\tfor(i=1; i<idx_oldest.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tidx_current = idx_oldest.get(i);\r\n\t\t\t\tif(min_error > _pool_of_bests.get(idx_current)._error.getAverageError())\r\n\t\t\t\t{\r\n\t\t\t\t\t_best_idx = idx_current;\r\n\t\t\t\t\tmin_error = _pool_of_bests.get(_best_idx)._error.getAverageError();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"float genChance();",
"public static Double[] generateGenome() {\n\t\tDouble[] genome = new Double[variableNum];\n\t\tfor(int i = 0; i < variableNum; i++) {\n\t\t\tgenome[i] = (Math.random() - 0.5)*(maxValue - minValue);\n\t\t}\n\t\treturn genome;\n\t}",
"private static List<Gene> getGenePool() {\n List<Gene> list = new ArrayList<>();\n\n Item item1 = new Item();\n item1.setName(\"Swiss Army Knife\");\n item1.setWeight(0.08125);\n item1.setVal(15);\n Gene gene1 = new Gene(item1);\n\n Item item2 = new Item();\n item2.setName(\"Duct Tape\");\n item2.setWeight(1.3);\n item2.setVal(3);\n Gene gene2 = new Gene(item2);\n\n Item item3 = new Item();\n item3.setName(\"Rope (50 feet)\");\n item3.setWeight(7);\n item3.setVal(10);\n Gene gene3 = new Gene(item3);\n\n Item item4 = new Item();\n item4.setName(\"Satellite phone\");\n item4.setWeight(2);\n item4.setVal(8);\n Gene gene4 = new Gene(item4);\n\n Item item5 = new Item();\n item5.setName(\"Elmer's Glue\");\n item5.setWeight(0.25);\n item5.setVal(2);\n Gene gene5 = new Gene(item5);\n\n Item item6 = new Item();\n item6.setName(\"Toilet Paper Roll\");\n item6.setWeight(.5);\n item6.setVal(4);\n Gene gene6 = new Gene(item6);\n\n Item item7 = new Item();\n item7.setName(\"Binoculars\");\n item7.setWeight(3);\n item7.setVal(5);\n Gene gene7 = new Gene(item7);\n\n Item item8 = new Item();\n item8.setName(\"Compass\");\n item8.setWeight(0.0573202);\n item8.setVal(15);\n Gene gene8 = new Gene(item8);\n\n Item item9 = new Item();\n item9.setName(\"Jug (pre-filled with water)\");\n item9.setWeight(4);\n item9.setVal(6);\n Gene gene9 = new Gene(item9);\n\n Item item10 = new Item();\n item10.setName(\"Flashlight\");\n item10.setWeight(2);\n item10.setVal(4);\n Gene gene10 = new Gene(item10);\n\n Item item11 = new Item();\n item11.setName(\"Box of paper clips\");\n item11.setWeight(.9);\n item11.setVal(2);\n Gene gene11 = new Gene(item11);\n\n Item item12 = new Item();\n item12.setName(\"Gloves (1 pair)\");\n item12.setWeight(.8125);\n item12.setVal(3);\n Gene gene12 = new Gene(item12);\n\n Item item13 = new Item();\n item13.setName(\"Scissors\");\n item13.setWeight(0.2);\n item13.setVal(2);\n Gene gene13 = new Gene(item13);\n\n Item item14 = new Item();\n item14.setName(\"Signal Flair (4pk)\");\n item14.setWeight(4);\n item14.setVal(5);\n Gene gene14 = new Gene(item14);\n\n Item item15 = new Item();\n item15.setName(\"Water Purifying System\");\n item15.setWeight(0.5125);\n item15.setVal(4);\n Gene gene15 = new Gene(item15);\n\n Item item16 = new Item();\n item16.setName(\"Whistle\");\n item16.setWeight(0.075);\n item16.setVal(2);\n Gene gene16 = new Gene(item16);\n\n Item item17 = new Item();\n item17.setName(\"Sleeping Bag\");\n item17.setWeight(0.38125);\n item17.setVal(4);\n Gene gene17 = new Gene(item17);\n\n Item item18 = new Item();\n item18.setName(\"Insect Repellent\");\n item18.setWeight(1.15);\n item18.setVal(3);\n Gene gene18 = new Gene(item18);\n\n Item item19 = new Item();\n item19.setName(\"Trowel\");\n item19.setWeight(0.31875);\n item19.setVal(3);\n Gene gene19 = new Gene(item19);\n\n Item item20 = new Item();\n item20.setName(\"Lighter\");\n item20.setWeight(.2);\n item20.setVal(4);\n Gene gene20 = new Gene(item20);\n\n Item item21 = new Item();\n item21.setName(\"Safety Horn\");\n item21.setWeight(.21);\n item21.setVal(3);\n Gene gene21 = new Gene(item21);\n\n Item item22 = new Item();\n item22.setName(\"Headlamp\");\n item22.setWeight(.8);\n item22.setVal(4);\n Gene gene22 = new Gene(item22);\n\n Item item23 = new Item();\n item23.setName(\"Freeze Dried Food Kit\");\n item23.setWeight(2);\n item23.setVal(6);\n Gene gene23 = new Gene(item23);\n\n Item item24 = new Item();\n item24.setName(\"Sunscreen\");\n item24.setWeight(.5);\n item24.setVal(4);\n Gene gene24 = new Gene(item24);\n\n Item item25 = new Item();\n item25.setName(\"Trekking Pole (Adjustable)\");\n item25.setWeight(1.3);\n item25.setVal(4);\n Gene gene25 = new Gene(item25);\n\n Item item26 = new Item();\n item26.setName(\"Counter Assault Bear Spray\");\n item26.setWeight(.5);\n item26.setVal(4);\n Gene gene26 = new Gene(item26);\n\n Item item27 = new Item();\n item27.setName(\"Insect Spray\");\n item27.setWeight(.5);\n item27.setVal(3);\n Gene gene27 = new Gene(item27);\n\n Item item28 = new Item();\n item28.setName(\"Hand sanitizer\");\n item28.setWeight(.625);\n item28.setVal(3);\n Gene gene28 = new Gene(item28);\n\n Item item29 = new Item();\n item29.setName(\"Mirror\");\n item29.setWeight(.5);\n item29.setVal(3);\n Gene gene29 = new Gene(item29);\n\n Item item30 = new Item();\n item30.setName(\"First Aid Kit\");\n item30.setWeight(3);\n item30.setVal(6);\n Gene gene30 = new Gene(item30);\n\n list.add(gene1);\n list.add(gene2);\n list.add(gene3);\n list.add(gene4);\n list.add(gene5);\n list.add(gene6);\n list.add(gene7);\n list.add(gene8);\n list.add(gene9);\n list.add(gene10);\n list.add(gene11);\n list.add(gene12);\n list.add(gene13);\n list.add(gene14);\n list.add(gene15);\n list.add(gene16);\n list.add(gene17);\n list.add(gene18);\n list.add(gene19);\n list.add(gene20);\n list.add(gene21);\n list.add(gene22);\n list.add(gene23);\n list.add(gene24);\n list.add(gene25);\n list.add(gene26);\n list.add(gene27);\n list.add(gene28);\n list.add(gene29);\n list.add(gene30);\n\n return list;\n }",
"public abstract int getRandomDamage();",
"private void uniformMutation(){\n Random random = new Random();\n double newValue = random.nextGaussian()*16.6 + 50.0;\n if(newValue < 0) newValue = 0;\n if(newValue > 100) newValue = 100;\n int gene = random.nextInt(6);\n switch (gene){\n case 0 : this.x1 = newValue; break;\n case 1 : this.x2 = newValue; break;\n case 2 : this.x3 = newValue; break;\n case 3 : this.y1 = newValue; break;\n case 4 : this.y2 = newValue; break;\n case 5 : this.y3 = newValue; break;\n }\n }",
"private ArrayList<Chromosome> selectParentsRoulette() {\n ArrayList<Chromosome> parents = new ArrayList<Chromosome>(Defines.crossoverParentCt);\n double sumGH = 0.0; // sums GH for all chromosomes in this pop\n Random randgen = new Random(); // random number generator\n for (Chromosome chromo : this.chromosomes) {\n sumGH += chromo.getTotalGH();\n }\n for (int i = 0; i < Defines.crossoverParentCt; i++) {\n double parentRandomizer = randgen.nextDouble() * sumGH; // get random #\n double aggGH = 0.0; // aggregate the GH until we reach our random #\n int chromoIdx = 0; // identifies the chromosome in the pop\n Chromosome parentCandidate;\n do {\n parentCandidate = this.chromosomes.get(chromoIdx++);\n aggGH += parentCandidate.getTotalGH();\n } while (aggGH < parentRandomizer);\n parents.add(parentCandidate);\n }\n return parents;\n }",
"public void runGenerational() {\n\n\t\tSystem.out.println(\"Runing pure generational demo.\");\n\t\tFunction<BitSet, Double> knapsackFitnessFunction = new KnapsackFitness(capacity, parseElements());\n\t\tSpace<BitSet> space = new BitSetSpace(weights.length);\n\n\t\tGeneticSelector<BitSet, Double> rouletteSelector = new RouletteGeneticSelector<>(POP_SIZE);\n\t\tGeneticCrossover<BitSet, Double> crossover = new BinaryCrossover<>(0.9);\n\t\tGeneticOperator<BitSet, Double> geneticOperator = new CustomGeneticOperator<>(crossover);\n\t\tGeneticReplacement<BitSet, Double> replacement = new GenerationalReplacement<>();\n\t\tTracer.add(Population.class);\n\t\tTracer.start();\n\n\t\tSearch<BitSet, Double> search = new GeneticAlgorithm<>(POP_SIZE, NUM_ITER, rouletteSelector, geneticOperator,\n\t\t\t\treplacement);\n\t\tOptimizationProblem<BitSet, Double> problem = new OptimizationProblem<>(space, knapsackFitnessFunction,\n\t\t\t\tComparator.reverseOrder());\n\t\tSolution<BitSet, Double> foundSolution = search.solve(problem);\n\n\t\tSystem.out.println(String.format(\"Best found solution: %f, bitset: %s\",\n\t\t\t\tknapsackFitnessFunction.calculate(foundSolution.getSolution()), foundSolution.getSolution()));\n\n\t\tBitSet optimalBitSet = parseOptimalBitSet();\n\t\tSystem.out.println(String.format(\"Optimal solution: %f, bitset: %s\",\n\t\t\t\tknapsackFitnessFunction.calculate(optimalBitSet), optimalBitSet));\n\t\tKnapsackMetric metric = new KnapsackMetric();\n\t\tmetric.putDataOfBestInFile(1);\n\t}",
"private void getRandomNumber() {\n\t\tRandom generator = new Random();\n\t\trandomNumber = generator.nextInt(POSSIBLE_CHOICE.length);\n\t}"
] |
[
"0.70849746",
"0.67207676",
"0.66603166",
"0.6616979",
"0.6592662",
"0.6511219",
"0.6497152",
"0.63983804",
"0.6278317",
"0.62573147",
"0.6200497",
"0.60701215",
"0.6044686",
"0.5986516",
"0.58632153",
"0.5747644",
"0.57337946",
"0.5726141",
"0.57244766",
"0.57184184",
"0.57157445",
"0.5705515",
"0.56995964",
"0.56903267",
"0.5644137",
"0.56356204",
"0.5623287",
"0.5593319",
"0.5582607",
"0.55797994",
"0.55619645",
"0.55383945",
"0.55324906",
"0.55301535",
"0.54744804",
"0.54736274",
"0.5471383",
"0.5454261",
"0.54427946",
"0.5440154",
"0.5431641",
"0.54146427",
"0.5385164",
"0.5376418",
"0.5360095",
"0.53475773",
"0.53429633",
"0.5341058",
"0.532658",
"0.5325846",
"0.5325798",
"0.53220963",
"0.5321716",
"0.5307052",
"0.52972054",
"0.5284677",
"0.52844346",
"0.52823055",
"0.5275502",
"0.52703553",
"0.5266969",
"0.52575076",
"0.52414984",
"0.5222158",
"0.5216766",
"0.52141404",
"0.52131975",
"0.5206162",
"0.51993114",
"0.51962876",
"0.51952803",
"0.51867366",
"0.51779264",
"0.5177643",
"0.5177643",
"0.517715",
"0.51729625",
"0.51650184",
"0.51582223",
"0.51577413",
"0.5157068",
"0.5149443",
"0.5145625",
"0.51439583",
"0.5143091",
"0.5137438",
"0.5136819",
"0.5128414",
"0.51268595",
"0.5125095",
"0.5117021",
"0.51066875",
"0.51049405",
"0.51005477",
"0.50986665",
"0.50922763",
"0.50913596",
"0.5085122",
"0.50796956",
"0.50760883"
] |
0.7082302
|
1
|
Selects a random species, species with higher total fitness have a better chance
|
private Species getRandomSpeciesBaisedAdjustedFitness(Random random) {
double completeWeight = 0.0;
for (Species s : species) {
completeWeight += s.totalAdjustedFitness;
}
double r = Math.random() * completeWeight;
double countWeight = 0.0;
for (Species s : species) {
countWeight += s.totalAdjustedFitness;
if (countWeight >= r) {
return s;
}
}
throw new RuntimeException("Couldn't find a species... Number is species in total is " + species.size()
+ ", and the toatl adjusted fitness is " + completeWeight);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private int intGetRandomGenomeBiasedAdjustedFitness(Species selectFrom, Random random) {\r\n\t\tdouble completeWeight = 0.0;\r\n\t\tfor (integerFitnessGenome fg : selectFrom.fitnessInt) {\r\n\t\t\tcompleteWeight += fg.fitness;\r\n\t\t}\r\n\t\tdouble r = Math.random() * completeWeight;\r\n\t\tdouble countWeight = 0.0;\r\n\t\tfor (integerFitnessGenome fg : selectFrom.fitnessInt) {\r\n\t\t\tcountWeight += fg.fitness;\r\n\t\t\tif (countWeight >= r) {\r\n\t\t\t\treturn fg.id;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new RuntimeException(\"Couldn't find a genome... Number is genomes in selected species is \");\r\n\t}",
"public int randomGene();",
"public Genotype rouletteSelection() {\n // get a number between 0 and 1 to compare against\n double slice = rnd.nextDouble();\n // keep track of the cumulative fitness\n double cumulativeFitness = 0;\n\n // loop through the population to pick a mate\n for (Genotype g : population) {\n // increment the cumulative fitness with the member's normalized fitness\n cumulativeFitness += g.getNormalizedFitness();\n // if the cumulative fitness is greater than the random number,\n if (cumulativeFitness > slice) {\n // select the member for mating\n return g;\n }\n }\n\n // if no members are chosen, pick the one with the highest fitness score\n return population.get(0);\n }",
"public void testSelect_4()\n throws Exception {\n BestChromosomesSelector selector = new BestChromosomesSelector(conf);\n selector.setDoubletteChromosomesAllowed(true);\n // the following original rate controls that only 30% of the chromosomes\n // will be considered for selection as given with BestChromosomesSelector.\n // The last 70% will be added as doublettes in this case.\n selector.setOriginalRate(0.3d);\n // add first chromosome\n // --------------------\n Gene gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(true));\n Chromosome thirdBestChrom = new Chromosome(conf, gene, 7);\n thirdBestChrom.setFitnessValue(10);\n selector.add(thirdBestChrom);\n // add second chromosome\n // ---------------------\n gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(false));\n Chromosome bestChrom = new Chromosome(conf, gene, 3);\n bestChrom.setFitnessValue(12);\n selector.add(bestChrom);\n // add third chromosome\n // ---------------------\n gene = new IntegerGene(conf);\n gene.setAllele(new Integer(444));\n Chromosome secondBestChrom = new Chromosome(conf, gene, 3);\n secondBestChrom.setFitnessValue(11);\n selector.add(secondBestChrom);\n // receive top 1 (= best) chromosome\n // ---------------------------------\n Population pop = new Population(conf);\n selector.select(1, null, pop);\n IChromosome[] bestChroms = pop.toChromosomes();\n assertEquals(1, bestChroms.length);\n assertEquals(bestChrom, bestChroms[0]);\n // receive top 4 chromosomes with original rate = 0.3\n // --------------------------------------------------\n pop.getChromosomes().clear();\n selector.select(4, null, pop);\n bestChroms = pop.toChromosomes();\n assertEquals(4, bestChroms.length);\n assertEquals(bestChrom, bestChroms[0]);\n assertEquals(bestChrom, bestChroms[1]); //because of originalRate = 0.3\n assertEquals(secondBestChrom, bestChroms[2]);\n assertEquals(thirdBestChrom, bestChroms[3]);\n // Non-unique chromosomes should have been returned, although not the same\n // but a cloned instance!\n assertEquals(bestChroms[0], bestChroms[1]);\n // receive top 4 chromosomes with original rate = 1\n // ------------------------------------------------\n pop.getChromosomes().clear();\n selector.setOriginalRate(1.0d);\n selector.select(4, null, pop);\n bestChroms = pop.toChromosomes();\n assertEquals(4, bestChroms.length);\n assertEquals(bestChrom, bestChroms[0]);\n assertEquals(secondBestChrom, bestChroms[1]);\n assertEquals(thirdBestChrom, bestChroms[2]);\n assertEquals(bestChrom, bestChroms[3]);\n }",
"Chromosome getRandomAmongFittest(int limit);",
"private void tournament_selection() {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < this.pop_size; i++) {\r\n\r\n // pick 2 random ints to for indices of parents\r\n int parent1 = new Random().nextInt(this.pop_size);\r\n int parent2 = new Random().nextInt(this.pop_size);\r\n\r\n individual p1 = new individual(main_population.getPopulation()[parent1].getGenes(), solutions, output);\r\n individual p2 = new individual(main_population.getPopulation()[parent2].getGenes(), solutions, output);\r\n\r\n if (p1.getFitness() >= p2.getFitness()) {\r\n temp_pop[i] = p1;\r\n } else {\r\n temp_pop[i] = p2;\r\n }\r\n }\r\n this.main_population.setPopulation(temp_pop);\r\n this.main_population.update_population();\r\n }",
"Chromosome getRandom();",
"RandomizedRarestFirstSelector(Random random) {\n this.random = random;\n }",
"public float randomQual() {\n\t\treturn((float) getRandomInteger(30,250));\n\t}",
"public Hazard selectRandom() {\r\n\t\tRandom gen = new Random();\r\n\t\treturn hazards.get(gen.nextInt(hazards.size()));\r\n\t}",
"public Individual selectIndividual(Population population) {\n // Get individuals\n List<Individual> individuals = population.getPopulation();\n\n // Spin roulette wheel\n double populationFitness = population.getPopulationFitness();\n double rouletteWheelPosition = Math.random() * populationFitness;\n\n // Find parent\n double spinWheel = 0;\n for (Individual individual : individuals) {\n spinWheel += individual.getFitness();\n if (spinWheel >= rouletteWheelPosition) {\n return individual;\n }\n }\n return individuals.get(population.size() - 1);\n }",
"private Chromosome getRouletteChromosome(ArrayList<Chromosome> chroms, double totalFitness){\n double slice = (Math.random()*totalFitness);\n double fitnessSum = 0;\n for(Chromosome c:chroms){\n fitnessSum += c.getFitness();\n if(fitnessSum >= slice){\n return c;\n }\n }\n \n //The total fitness supplied must have been incorrect\n return null;\n }",
"protected Gene getRandomGene() {\n\t\tArrayList<Gene> genearr = new ArrayList<Gene>();\n\t\tgenearr.addAll(genes.values());\n\t\treturn genearr.get(Braincraft.randomInteger(genearr.size()));\n\t}",
"public void testSelect_0()\n throws Exception {\n BestChromosomesSelector selector = new BestChromosomesSelector(conf);\n Gene gene = new IntegerGene(conf);\n gene.setAllele(new Integer(444));\n Chromosome secondBestChrom = new Chromosome(conf, gene, 3);\n secondBestChrom.setFitnessValue(11);\n selector.add(secondBestChrom);\n gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(false));\n Chromosome bestChrom = new Chromosome(conf, gene, 3);\n bestChrom.setFitnessValue(12);\n selector.add(bestChrom);\n selector.select(1, null, new Population(conf));\n }",
"public static List<Double> selection(PolyPopulation pop, double cutoff) {\n\t\tint lastGenerationNum = pop.getGroupCapacity();\n\t\tList<PolyIndividual> nextGeneration = new ArrayList<>();\n\t\tList<Double> fitList = new ArrayList<>();\n\t\tList<Double> valueList = new ArrayList<>();\n\t\tList<Double> actValueList = new ArrayList<>();\n\t\tdouble max = 0.0;\n\t\tdouble totalFit = 0.0;\n\t\t//calculate the value of each individual in the population\n\t\tfor(int i = 0; i < pop.getGroupCapacity(); i++) {\n\t\t\tdouble val = f(pop.getIndis().get(i).getGenotype());\n\t\t\tvalueList.add(val);\n\t\t\t//get the Max value, use it\n\t\t\tif(i == 0) max = val;\n\t\t\telse if(val > max) max = val;\n\t\t}\n\t\t//based on the value insists now, calculate the fitness of each individual and their total fitness\n\t\tfor(int i = 0; i < pop.getGroupCapacity(); i++) {\n\t\t\tdouble fit = 1/(max - valueList.get(i) + 10);\n\t\t\tfitList.add(fit);\n\t\t\ttotalFit+=fit;\n\t\t}\n\t\t\n\t\twhile(nextGeneration.size() < lastGenerationNum*cutoff) {\t\t\t\n\t\t\tdouble selectionVal = Math.random();\n\t\t\tdouble accumulateVal = 0.0;\n\t\t\tfor(int i = 0; i < pop.getGroupCapacity(); i++) {\n\t\t\t\tif(selectionVal >= accumulateVal && selectionVal < (accumulateVal+fitList.get(i)/totalFit)) {\n\t\t\t\t\tnextGeneration.add(pop.getIndis().get(i));\n\t\t\t\t\tactValueList.add(valueList.get(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\taccumulateVal+=(fitList.get(i)/totalFit);\n\t\t\t}\n\t\t}\n\t\tpop.setIndis(nextGeneration);\n\t\tpop.setGroupCapacity(nextGeneration.size());\n\t\treturn actValueList;\n\t}",
"public static void Random() {\n\t\tRandom ran =new Random();\r\n\t\trandom=ran.nextInt(6)+1;\r\n\t\t//random=1;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tif((ch[who].status)>0) {\r\n\t\t\tch[who].location=(ch[who].location)+random;\r\n\t\t\tch[who].status=(ch[who].status)-1;\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\t\treturn;\r\n\t\t\t}\t\t\r\n\t}",
"float genChance();",
"public Critter1() {\r\n\t\tnumberSpawned = 0;\r\n\t\twhile (fearfullness < 50) {//at minimum fearfullness is 50%\r\n\t\t\tfearfullness = getRandomInt(100);\r\n\t\t}\r\n\t}",
"public void randomize() {\r\n\t\tif(randomizzatoreVariazione > 0.5)\r\n\t\t\tandamentoCurva.setVariazione(\r\n\t\t\t\t\tandamentoCurva.getVariazione() * randomizzatoreVariazione\r\n\t\t\t\t\t+ andamentoCurva.getMIN_VARIAZIONE()\r\n\t\t\t\t\t+ Math.random() * (andamentoCurva.getMAX_VARIAZIONE() - andamentoCurva.getMIN_VARIAZIONE())\r\n\t\t\t);\r\n\t\telse if(randomizzatoreVariazione < 0.5)\r\n\t\t\tandamentoCurva.setVariazione(\r\n\t\t\t\t\tandamentoCurva.getVariazione()\r\n\t\t\t\t\t- andamentoCurva.getMIN_VARIAZIONE()\r\n\t\t\t\t\t+ Math.random() * (andamentoCurva.getMAX_VARIAZIONE() - andamentoCurva.getMIN_VARIAZIONE() * randomizzatoreVariazione)\r\n\t\t\t);\r\n\t}",
"public abstract int getRandomDamage();",
"private int getRandomPiece() {\r\n return new Random().nextInt(Constants.NUM_PIECES);\r\n }",
"@Override\n public Individual selectIndividual(Population population, Individual individual, MersenneTwister rnd, ExperimentalData expData, Statistics stats) {\n List<Integer> indexIndividuals = new ArrayList<>();\n Integer bigger = -1;\n double[] outputs = expData.getDataset(Utils.DatasetType.TRAINING).getOutputs();\n int index = identifyCloserIndividual(population, individual, outputs, indexIndividuals, bigger, rnd);\n getStatisticsDim(individual, population.get(index), stats, outputs);\n return population.get(index);\n }",
"private int choose(){\n\t\tdouble temp = 10 * Math.random();\n\t\tint i = (int)temp;\n\t\treturn i;\n\t}",
"private void findResourcesFake() {\r\n\t\t\r\n\t\tRandom random = new Random();\t\r\n\t\t\r\n\t\t\t\t\t\t\r\n\t\tif (random.nextInt() % 10 == 0) {PoCOnline.setSelected(true); loadContainerOnline.setSelected(true);}\t\r\n\t\tif (random.nextInt() % 10 == 0) {fillRedOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {fillYellowOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {fillBlueOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {testOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {lidOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {dispatchOnline.setSelected(true);}\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"public void perdEnergieRandom() {\r\n Random rd = new Random();\r\n robots.get(rd.nextInt(robots.size() - 1)).perdEnergie(5);\r\n }",
"private <T> GeneticResult<T> maxFitness(List<Chromosome<T>> chromosomes, int totalBreedings){\n\t\tChromosome<T> bestFit = fittestChromosome(chromosomes);\n\t\treturn new GeneticResult<T>(bestFit, bestFit.getFitness(), totalBreedings);\n\t}",
"private static Set<Chromosome> rankBasedRouletteWheelSelection(ArrayList<Chromosome> population, int populationSize) {\n Set<Chromosome> selectedChromosomes = new HashSet<>();\n\n // calculate the sum of all ranks, which will be used as a denominator for all probabilities\n int sumOfRanks = (populationSize + 1) * populationSize / 2;\n\n // declare an array of cumulative probabilities for all the chromosomes in the population\n double[] cumulativeProbability = new double[populationSize];\n // calculate the cumulative probability of the first chromosome as its probability\n cumulativeProbability[0] = (double) populationSize / sumOfRanks;\n // calculate the cumulative probabilities of all successive chromosomes:\n for (int i = 1; i < populationSize; i++) {\n // as the probability of this chromosomes based on its rank\n double probability = (double) (populationSize-i) / sumOfRanks;\n // plus the cumulative proability of the preceeding chromosome\n cumulativeProbability[i] = cumulativeProbability[i-1] + probability;\n }\n\n while (selectedChromosomes.size() < 2) {\n // choose a chromosome randomly based on its cumulative probability (the lower the better)\n double random = ThreadLocalRandom.current().nextDouble();\n int choice = 0;\n while (random > cumulativeProbability[choice]) {\n choice++;\n }\n\n // add the chosen chromosome to the set of selectedChromosomes\n selectedChromosomes.add(population.get(choice));\n }\n\n return selectedChromosomes;\n }",
"private ExtractedItemsCollection selectItemByChance(Collection<ExtractedItemsCollection> itemsCollections) {\n float sumOfChances = calcSumOfChances(itemsCollections);\n float currentSum = 0f;\n float rnd = (float) Rnd.get(0, (int) (sumOfChances - 1) * 1000) / 1000;\n ExtractedItemsCollection selectedCollection = null;\n for (ExtractedItemsCollection collection : itemsCollections) {\n currentSum += collection.getChance();\n if (rnd < currentSum) {\n selectedCollection = collection;\n break;\n }\n }\n return selectedCollection;\n }",
"private ExtractedItemsCollection selectItemByChance(Collection<ExtractedItemsCollection> itemsCollections) {\n float sumOfChances = calcSumOfChances(itemsCollections);\n float currentSum = 0f;\n float rnd = (float) Rnd.get(0, (int) (sumOfChances - 1) * 1000) / 1000;\n ExtractedItemsCollection selectedCollection = null;\n for (ExtractedItemsCollection collection : itemsCollections) {\n currentSum += collection.getChance();\n if (rnd < currentSum) {\n selectedCollection = collection;\n break;\n }\n }\n return selectedCollection;\n }",
"public ArrayList<Tour> doSelection(Population population) {\n double totalFitness = 0;\n for(Tour tour : population.getTourList()){\n totalFitness = totalFitness + tour.getFitness();\n }\n\n //sort tours by relative fitness\n SortedMap<Double, Tour> totalFitnessRelativity = new TreeMap<>();\n for(Tour tour: population.getTourList()){\n double key = tour.getFitness()/totalFitness;\n totalFitnessRelativity.put(key, tour);\n }\n\n //put tours on a number bar\n SortedMap<Double, Tour> numberBar = new TreeMap<>();\n double previousProbability = 0;\n for(Map.Entry<Double, Tour> entry : totalFitnessRelativity.entrySet()){\n double currentProbability = previousProbability + entry.getKey();\n numberBar.put(currentProbability, entry.getValue());\n previousProbability = currentProbability;\n }\n\n //choose a tour randomly according to how near it is to\n ArrayList<Tour> rouletteWheelOrder = new ArrayList<>();\n do{\n double randomNumber = new random.MersenneTwisterFast().nextDouble(0, numberBar.lastKey());\n for(Map.Entry<Double, Tour> numberBarSection : numberBar.entrySet()){\n if(randomNumber <= numberBarSection.getKey() && !rouletteWheelOrder.contains(numberBarSection.getValue())){\n rouletteWheelOrder.add(numberBarSection.getValue());\n break;\n }\n }\n } while(rouletteWheelOrder.size() != population.getTourList().size());\n return rouletteWheelOrder;\n }",
"private void mutate(float probability) {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < this.pop_size; i++) {\r\n\r\n float temp_genes[] = this.offspring_population.getPopulation()[i].getGenes();\r\n\r\n // mutation can now mutate wild cards\r\n for (int j = 0; j < temp_genes.length; j++) {\r\n float k = new Random().nextFloat();\r\n\r\n if (k <= probability) {\r\n float temp = new Random().nextFloat();\r\n temp_genes[j] = temp; // add a float between 0-1 // just mutate a new float\r\n }\r\n }\r\n individual child = new individual(temp_genes, solutions, output);\r\n temp_pop[i] = child;\r\n }\r\n this.main_population.setPopulation(temp_pop);\r\n this.main_population.update_population();\r\n }",
"<T> GeneticResult<T> train(List<Chromosome<T>> chromosomes){\n\t\tGeneticResult<T> bestFit = maxFitness(chromosomes, 0);\n\t\tfor(int i = 0; i < totalBreedings; i++){\n\t\t\tif(bestFit.getFitness() > sufficientFitness){ break ;}\n\t\t\tchromosomes = breedNewGeneration(chromosomes);\n\t\t\tbestFit = maxFitness(chromosomes, i);\n\t\t}\n\t\treturn bestFit;\n\t}",
"int tournament() {\r\n \tint ch1,ch2;\r\n\t\tch1 = (int)Math.floor(Math.random()*SIZE);\r\n\t\tdo {\r\n\t\t\tch2 = (int)Math.floor(Math.random()*SIZE);\r\n\t\t} while (ch1==ch2);\r\n\t\tif (fit[ch1]<fit[ch2]) return ch1;\r\n\t\telse return ch2;\r\n }",
"private Action selectRandomAction() {\n int fuel;\n String car, driver;\n Tire tire;\n TirePressure pressure;\n\n // Possible tire pressures\n List<TirePressure> tirePressures = Arrays.asList(\n TirePressure.FIFTY_PERCENT,\n TirePressure.SEVENTY_FIVE_PERCENT,\n TirePressure.ONE_HUNDRED_PERCENT\n );\n\n // Possible fuel levels (note that this is an arbitrary discretization)\n List<Integer> fuelLevels = new ArrayList<>();\n int fuelInterval = ProblemSpec.FUEL_MAX / FUEL_DISCRETE_INTERVALS;\n\n for (int i = 0; i < FUEL_DISCRETE_INTERVALS; i++) {\n fuelLevels.add(fuelInterval * i);\n }\n\n List<ActionType> validActionTypes = problemSpec.getLevel().getAvailableActions();\n ActionType actionType = getRandomElement(validActionTypes);\n Action action;\n\n // Pick a random action from A1-A8 and then randomize the parameters\n switch (actionType.getActionNo()) {\n case 1:\n action = new Action(actionType);\n break;\n case 2:\n car = getRandomElement(problemSpec.getCarOrder());\n action = new Action(actionType, car);\n break;\n case 3:\n driver = getRandomElement(problemSpec.getDriverOrder());\n action = new Action(actionType, driver);\n break;\n case 4:\n tire = getRandomElement(problemSpec.getTireOrder());\n action = new Action(actionType, tire);\n break;\n case 5:\n fuel = getRandomElement(fuelLevels);\n action = new Action(actionType, fuel);\n break;\n case 6:\n pressure = getRandomElement(tirePressures);\n action = new Action(actionType, pressure);\n break;\n case 7:\n car = getRandomElement(problemSpec.getCarOrder());\n driver = getRandomElement(problemSpec.getDriverOrder());\n action = new Action(actionType, car, driver);\n break;\n default:\n // A8\n tire = getRandomElement(problemSpec.getTireOrder());\n fuel = getRandomElement(fuelLevels);\n pressure = getRandomElement(tirePressures);\n action = new Action(actionType, tire, fuel, pressure);\n }\n\n return action;\n\n }",
"public void randomize() {\r\n\t\tRandom random = new Random();// random generator used to get random int\r\n\t\tint r;// will hold the random int\r\n\t\tint num;// will hold the filtered random int that determines with entity to use for a tile\r\n\t\tfor (int i = 0; i < WIDTH_TILES; i++) {// loops x-coords\r\n\t\t\tfor (int j = 0; j < HEIGHT_TILES; j++) {// loops y-coords\r\n\t\t\t\tr = random.nextInt(32);// gets random int from 0 to 32\r\n\t\t\t\tif (r < 4) num = 0; else if (r < 8) num = 1; else if (r < 31) num = 2; else num = 3;// distributes different objects\r\n\t\t\t\tif (nodes[i * WIDTH_TILES + j].isOccupied() == false) {// if tile empty or random chosen\r\n\t\t\t\t\tnodes[i * WIDTH_TILES + j] = new Node(new Point(i * BOARD_WIDTH / WIDTH_TILES, j * BOARD_WIDTH / HEIGHT_TILES), new ImageIcon(icons[num]).getImage(), true, occupants[num]);// creates random tile\r\n\t\t\t\t}// if (random)\r\n\t\t\t}// for (j)\r\n\t\t}// for (i)\r\n\t}",
"public NCRPNode select() {\n\t\t\t\n\t\t\t//dim number of children + 1 (unallocated mass) \n\t\t\tdouble[] weights = new double[children.size() + 1];\n\t \n\t\t\t//weight of unallocated probability mass\n\t\t\tweights[0] = gamma / (gamma + customers);\n\t\t\t\n\t\t\t//calc weight for each child based on the number of customers on them\n\t\t\tint i = 1;\n\t\t\tfor (NCRPNode child: children) {\n\t\t\t\tweights[i] = (double) child.customers / (gamma + customers);\n\t\t\t\ti++;\n\t\t\t}\n\n\t\t\t//sample a child with higher weight\n\t\t\tint choice = random.nextDiscrete(weights);\n\t\t\t//if unallocated mass is sampled, create a new child\n\t\t\tif (choice == 0) {\n\t\t\t\treturn(addChild());\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn children.get(choice - 1);\n\t\t\t}\n\t\t}",
"public void testChangeOfSpecies() {\n GUIManager oManager = null;\n String sFileName = null;\n try {\n oManager = new GUIManager(null);\n sFileName = writeValidXMLFile();\n oManager.inputXMLParameterFile(sFileName);\n \n //Now change the species\n String[] sNewSpecies = new String[] {\n \"Species 3\",\n \"Species 2\",\n \"Species 1\",\n \"Species 4\",\n \"Species 5\",\n \"Species 6\"};\n \n oManager.getTreePopulation().setSpeciesNames(sNewSpecies);\n ManagementBehaviors oManagementBeh = oManager.getManagementBehaviors();\n ArrayList<Behavior> p_oBehs = oManagementBeh.getBehaviorByParameterFileTag(\"QualityVigorClassifier\");\n assertEquals(1, p_oBehs.size());\n QualityVigorClassifier oQual = (QualityVigorClassifier) p_oBehs.get(0);\n \n assertEquals(3, oQual.mp_oQualityVigorSizeClasses.size());\n \n QualityVigorSizeClass oClass = oQual.mp_oQualityVigorSizeClasses.get(0);\n assertEquals(10, oClass.m_fMinDbh, 0.0001);\n assertEquals(20, oClass.m_fMaxDbh, 0.0001);\n \n assertEquals(0.78, ((Float)oClass.mp_fProbVigorous.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.88, ((Float)oClass.mp_fProbVigorous.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oClass.mp_fProbVigorous.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.61, ((Float)oClass.mp_fProbVigorous.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.33, ((Float)oClass.mp_fProbSawlog.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.64, ((Float)oClass.mp_fProbSawlog.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(1, ((Float)oClass.mp_fProbSawlog.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.55, ((Float)oClass.mp_fProbSawlog.getValue().get(4)).floatValue(), 0.0001);\n \n \n oClass = oQual.mp_oQualityVigorSizeClasses.get(1);\n assertEquals(20, oClass.m_fMinDbh, 0.0001);\n assertEquals(30, oClass.m_fMaxDbh, 0.0001);\n \n assertEquals(0.33, ((Float)oClass.mp_fProbVigorous.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.81, ((Float)oClass.mp_fProbVigorous.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.64, ((Float)oClass.mp_fProbVigorous.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.32, ((Float)oClass.mp_fProbVigorous.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.32, ((Float)oClass.mp_fProbSawlog.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.69, ((Float)oClass.mp_fProbSawlog.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.33, ((Float)oClass.mp_fProbSawlog.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.58, ((Float)oClass.mp_fProbSawlog.getValue().get(4)).floatValue(), 0.0001);\n \n \n oClass = oQual.mp_oQualityVigorSizeClasses.get(2);\n assertEquals(30, oClass.m_fMinDbh, 0.0001);\n assertEquals(40, oClass.m_fMaxDbh, 0.0001);\n \n assertEquals(0.34, ((Float)oClass.mp_fProbVigorous.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.57, ((Float)oClass.mp_fProbVigorous.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.26, ((Float)oClass.mp_fProbVigorous.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.46, ((Float)oClass.mp_fProbVigorous.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.13, ((Float)oClass.mp_fProbSawlog.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.36, ((Float)oClass.mp_fProbSawlog.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.66, ((Float)oClass.mp_fProbSawlog.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.45, ((Float)oClass.mp_fProbSawlog.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.1, ((Float)oQual.mp_fQualVigorBeta0Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta0Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.3, ((Float)oQual.mp_fQualVigorBeta0Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.4, ((Float)oQual.mp_fQualVigorBeta0Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.2, ((Float)oQual.mp_fQualVigorBeta11Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(2.35, ((Float)oQual.mp_fQualVigorBeta11Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.1, ((Float)oQual.mp_fQualVigorBeta11Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(2.43, ((Float)oQual.mp_fQualVigorBeta11Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(-2.3, ((Float)oQual.mp_fQualVigorBeta12Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(1.12, ((Float)oQual.mp_fQualVigorBeta12Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.32, ((Float)oQual.mp_fQualVigorBeta12Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(1.3, ((Float)oQual.mp_fQualVigorBeta12Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.13, ((Float)oQual.mp_fQualVigorBeta13Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta13Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(-0.2, ((Float)oQual.mp_fQualVigorBeta13Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta13Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.9, ((Float)oQual.mp_fQualVigorBeta14Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta14Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(-1, ((Float)oQual.mp_fQualVigorBeta14Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta14Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta15Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.25, ((Float)oQual.mp_fQualVigorBeta15Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta15Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(-0.45, ((Float)oQual.mp_fQualVigorBeta15Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta16Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.36, ((Float)oQual.mp_fQualVigorBeta16Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta16Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.46, ((Float)oQual.mp_fQualVigorBeta16Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.01, ((Float)oQual.mp_fQualVigorBeta2Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.02, ((Float)oQual.mp_fQualVigorBeta2Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.04, ((Float)oQual.mp_fQualVigorBeta2Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.1, ((Float)oQual.mp_fQualVigorBeta2Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.001, ((Float)oQual.mp_fQualVigorBeta3Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.2, ((Float)oQual.mp_fQualVigorBeta3Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.3, ((Float)oQual.mp_fQualVigorBeta3Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.4, ((Float)oQual.mp_fQualVigorBeta3Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.25, ((Float)oQual.mp_fQualVigorBeta0Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(1.13, ((Float)oQual.mp_fQualVigorBeta0Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta0Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(1.15, ((Float)oQual.mp_fQualVigorBeta0Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.36, ((Float)oQual.mp_fQualVigorBeta11Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta11Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.4, ((Float)oQual.mp_fQualVigorBeta11Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta11Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.02, ((Float)oQual.mp_fQualVigorBeta12Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(10, ((Float)oQual.mp_fQualVigorBeta12Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.3, ((Float)oQual.mp_fQualVigorBeta12Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(30, ((Float)oQual.mp_fQualVigorBeta12Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.2, ((Float)oQual.mp_fQualVigorBeta13Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(10, ((Float)oQual.mp_fQualVigorBeta13Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(-0.3, ((Float)oQual.mp_fQualVigorBeta13Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(30, ((Float)oQual.mp_fQualVigorBeta13Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(-0.2, ((Float)oQual.mp_fQualVigorBeta14Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(10, ((Float)oQual.mp_fQualVigorBeta14Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(-0.4, ((Float)oQual.mp_fQualVigorBeta14Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(30, ((Float)oQual.mp_fQualVigorBeta14Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(-0.2, ((Float)oQual.mp_fQualVigorBeta2Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(10, ((Float)oQual.mp_fQualVigorBeta2Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta2Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(30, ((Float)oQual.mp_fQualVigorBeta2Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta3Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(10, ((Float)oQual.mp_fQualVigorBeta3Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.1, ((Float)oQual.mp_fQualVigorBeta3Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(30, ((Float)oQual.mp_fQualVigorBeta3Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.1, ((Float)oQual.mp_fQualVigorProbNewAdultsVig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.25, ((Float)oQual.mp_fQualVigorProbNewAdultsVig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.5, ((Float)oQual.mp_fQualVigorProbNewAdultsVig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.74, ((Float)oQual.mp_fQualVigorProbNewAdultsVig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.9, ((Float)oQual.mp_fQualVigorProbNewAdultsQual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.25, ((Float)oQual.mp_fQualVigorProbNewAdultsQual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.3, ((Float)oQual.mp_fQualVigorProbNewAdultsQual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.74, ((Float)oQual.mp_fQualVigorProbNewAdultsQual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(6, oQual.mp_iQualVigorDeciduous.getValue().size());\n for (int i = 0; i < oQual.mp_iQualVigorDeciduous.getValue().size(); i++)\n assertNotNull(oQual.mp_iQualVigorDeciduous.getValue().get(i));\n assertEquals(1, ((ModelEnum)oQual.mp_iQualVigorDeciduous.getValue().get(1)).getValue());\n assertEquals(0, ((ModelEnum)oQual.mp_iQualVigorDeciduous.getValue().get(0)).getValue());\n assertEquals(1, ((ModelEnum)oQual.mp_iQualVigorDeciduous.getValue().get(3)).getValue());\n assertEquals(0, ((ModelEnum)oQual.mp_iQualVigorDeciduous.getValue().get(4)).getValue());\n\n System.out.println(\"Change of species test succeeded.\");\n }\n catch (ModelException oErr) {\n fail(\"Change of species test failed with message \" + oErr.getMessage());\n }\n catch (java.io.IOException oE) {\n fail(\"Caught IOException. Message: \" + oE.getMessage());\n }\n finally {\n new File(sFileName).delete();\n }\n }",
"public static void genocide() {\n //Assigns fitness levels\n evaluateFitnesses();\n\n //Sorts by fitness\n sortByFitlvl();\n\n //Simple genocide, kills off all until population size.\n for (int i = Population.size() - 1; i >= populationSize; i--) {\n Population.remove(i);\n }\n\n /*\n //Different kind of Genocide, selects organisms based on gaussian distribution\n\n while(Population.size() > populationSize){\n int randomOrganism = (int)(Population.size() - (Population.size()*Utilities.sharpGauss(2)));\n Population.remove(randomOrganism);\n }\n */\n }",
"public interface Species {\r\n\r\n\r\n\t/**\r\n\t * Calculate the amount that a species will spawn.\r\n\t */\r\n\tvoid calculateSpawnAmount();\r\n\r\n\t/**\r\n\t * Choose a worthy parent for mating.\r\n\t * \r\n\t * @return The parent genome.\r\n\t */\r\n\tGenome chooseParent();\r\n\r\n\t/**\r\n\t * @return The age of this species.\r\n\t */\r\n\tint getAge();\r\n\r\n\t/**\r\n\t * @return The best score for this species.\r\n\t */\r\n\tdouble getBestScore();\r\n\r\n\t/**\r\n\t * @return How many generations with no improvement.\r\n\t */\r\n\tint getGensNoImprovement();\r\n\r\n\t/**\r\n\t * @return Get the leader for this species. The leader is the genome with\r\n\t * the best score.\r\n\t */\r\n\tGenome getLeader();\r\n\r\n\t/**\r\n\t * @return The numbers of this species.\r\n\t */\r\n\tList<Genome> getMembers();\r\n\r\n\t/**\r\n\t * @return The number of genomes this species will try to spawn into the\r\n\t * next generation.\r\n\t */\r\n\tdouble getNumToSpawn();\r\n\r\n\t/**\r\n\t * @return The number of spawns this species requires.\r\n\t */\r\n\tdouble getSpawnsRequired();\r\n\r\n\t/**\r\n\t * @return The species ID.\r\n\t */\r\n\tlong getSpeciesID();\r\n\r\n\t/**\r\n\t * Purge old unsuccessful genomes.\r\n\t */\r\n\tvoid purge();\r\n\r\n\t/**\r\n\t * Set the age of this species.\r\n\t * @param age The age.\r\n\t */\r\n\tvoid setAge(int age);\r\n\r\n\t/**\r\n\t * Set the best score.\r\n\t * @param bestScore The best score.\r\n\t */\r\n\tvoid setBestScore(double bestScore);\r\n\r\n\t/**\r\n\t * Set the number of generations with no improvement.\r\n\t * @param gensNoImprovement The number of generations with\r\n\t * no improvement.\r\n\t */\r\n\tvoid setGensNoImprovement(int gensNoImprovement);\r\n\r\n\t/**\r\n\t * Set the leader of this species.\r\n\t * @param leader The leader of this species.\r\n\t */\r\n\tvoid setLeader(Genome leader);\r\n\r\n\t/**\r\n\t * Set the number of spawns required.\r\n\t * @param spawnsRequired The number of spawns required.\r\n\t */\r\n\tvoid setSpawnsRequired(double spawnsRequired);\r\n}",
"public static Suit randomSuit() {\n int pick = new Random().nextInt(Suit.values().length-1); // w/o Excuse\n return Suit.values()[pick];\n }",
"public static void reproduce (Species [][] map, int sheepHealth, int wolfHealth, int plantHealth) {\n \n // Place the baby\n int babyY, babyX;\n \n // Check if the baby has been placed\n int spawned = 0;\n \n for (int y = 0; y < map[0].length; y++){\n for (int x = 0; x < map.length; x++){\n \n boolean [][] breeding = breedChoice (map, x, y, plantHealth);\n \n // Sheep upwards to breed with\n if (breeding[0][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y-1][x]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep downwards to breed with\n } else if (breeding[1][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y+1][x]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep to the left to breed with\n } else if (breeding[2][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y][x-1]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep to the right to breed with\n } else if (breeding[3][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y][x+1]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Wolf upwards to breed with\n } else if (breeding[0][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y-1][x]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf downwards to breed with\n } else if (breeding[1][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y+1][x]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf to the left to breed with\n } else if (breeding[2][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y][x-1]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf to the right to breed with\n } else if (breeding[3][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y][x+1]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n }\n \n }\n }\n \n }",
"private static Option pickRandom() {\n\t\treturn Option.values()[rand.nextInt(3)];\n\t}",
"public Chromosone() {\n Random rand = new Random();\n for(int i=0;i<=75;i++)\n {\n int rnd = rand.nextInt(2);// [1,0...]\n\n Val.add(rnd);\n }\n }",
"public int tournament(int size) {\n\t\t\n\t\tint best = 0;\n\t\tfloat bestFitness = Float.NEGATIVE_INFINITY;\n\t\t\n\t\t//selects the best individual from randomly sampled tournament participants\n\t\tfor(int i = 0; i < size; i++){\n\t\t\tint index = R.nextInt(populationSize);\n\t\t\tif(fitness[index] > bestFitness){\n\t\t\t\tbestFitness = fitness[index];\n\t\t\t\tbest = index;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn best;\n\t}",
"public void randomMove(){\n ArrayList<Hole> availableHoles = availableMoves(nextToPlay);\n int holeIndex = (int)(Math.random() * (((availableHoles.size()-1) - 0) + 1)) + 0;\n ArrayList<Korgool> korgools = availableHoles.get(holeIndex).getKoorgools();\n while(korgools.size() == 0){\n holeIndex = (int)(Math.random() * (((availableHoles.size()-1) - 0) + 1)) + 0;\n korgools = availableHoles.get(holeIndex).getKoorgools();\n }\n redistribute(availableHoles.get(holeIndex).getHoleIndex());\n }",
"int randomPoint() { return 1 + (int)Math.round((Math.random()*20) % (size - 2)); }",
"public void modifyFitness(Population population) {\n // prepare the calculation\n double[][] data = new double[population.size()][];\n for (int i = 0; i < data.length; i++) {\n data[i] = ((AbstractEAIndividual)population.get(i)).getFitness();\n }\n double min = Double.POSITIVE_INFINITY, fitnessSharing;\n double[] result = new double[data.length];\n AbstractEAIndividual tmpIndy;\n\n for (int x = 0; x < data[0].length; x++) {\n for (int i = 0; i < data.length; i++) data[i][x] = -data[i][x];\n for (int i = 0; i < data.length; i++) {\n if (data[i][x] < min) min = data[i][x];\n }\n\n for (int i = 0; i < data.length; i++) {\n // This will cause the worst individual to have no chance of being selected\n // also note that if all individual achieve equal fitness the sum will be zero\n result[i] = data[i][x] -min + 0.1;\n }\n\n for (int i = 0; i < population.size(); i++) {\n tmpIndy = (AbstractEAIndividual)population.get(i);\n fitnessSharing = 0;\n for (int j = 0; j < population.size(); j++) {\n if (this.m_SharingDistance < this.m_Metric.distance(tmpIndy, (AbstractEAIndividual)population.get(j))) {\n fitnessSharing += 1 - (this.m_Metric.distance(tmpIndy, (AbstractEAIndividual)population.get(j))/this.m_SharingDistance);\n }\n }\n result[i] = result[i]/fitnessSharing;\n }\n\n for (int i = 0; i < population.size(); i++) {\n ((AbstractEAIndividual)population.get(i)).SetFitness(x, result[i]);\n }\n }\n }",
"public int randomGQ() {\n\t\treturn(getRandomInteger(10,100));\n\t}",
"public void addRandoms() {\n //Add random boulders on tiles that aren't Lava\n int tileNumber;\n int selector;\n Tile t;\n String tileTexture;\n Random random = new Random();\n SquareVector playerPos = getPlayerEntity().getPosition();\n int tileCount = GameManager.get().getWorld().getTiles().size();\n AbstractWorld world = GameManager.get().getWorld();\n int randIndex;\n\n for (int i = 0; i < 20; i++) {\n //Get respective volcano tile (5 <= Lava tiles Index <= 8\n do {\n randIndex = random.nextInt(tileCount);\n t = world.getTile(randIndex);\n } while (t.getCoordinates().isCloseEnoughToBeTheSame(playerPos));\n\n tileTexture = t.getTextureName();\n tileNumber = Integer.parseInt(tileTexture.split(\"_\")[1]);\n\n selector = random.nextInt(2);\n if (tileNumber < 5 && tileNumber > 1 && selector == 1 && !t.hasParent()) {\n entities.add(new Rock(t, true));\n } else if (t != null && (tileNumber == 3 || tileNumber == 4) &&\n selector == 0 && !t.hasParent()) {\n entities.add(new VolcanoBurningTree(t, true));\n } else {\n i--;\n }\n }\n }",
"Randomizer getRandomizer();",
"public void testSelect_3()\n throws Exception {\n BestChromosomesSelector selector = new BestChromosomesSelector(conf);\n selector.setDoubletteChromosomesAllowed(false);\n // add first chromosome\n // --------------------\n Gene gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(true));\n Chromosome thirdBestChrom = new Chromosome(conf, gene, 7);\n thirdBestChrom.setFitnessValue(10);\n selector.add(thirdBestChrom);\n // add second chromosome\n // ---------------------\n gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(false));\n Chromosome bestChrom = new Chromosome(conf, gene, 3);\n bestChrom.setFitnessValue(12);\n selector.add(bestChrom);\n selector.setOriginalRate(1.0d);\n // receive top 30 chromosomes (select-method should take into account only\n // 2 chroms!)\n // -----------------------------------------------------------------------\n Population pop = new Population(conf);\n selector.select(30, null, pop);\n Population bestChroms = pop;\n Population chromosomes = (Population) privateAccessor.getField(selector,\n \"m_chromosomes\");\n assertTrue(bestChroms.equals(chromosomes));\n }",
"private int randomWeight()\n {\n return dice.nextInt(1000000);\n }",
"private double getRandom() {\n return 2*Math.random() - 1;\n }",
"@Override\n\t// Select individuals for crossover\n\tprotected Individual tournamentSelection(Population pop) {\n\t\tSortingIndividual baseIndiv = (SortingIndividual) pop.individuals[0];\n\t\tPopulation tournament = new SortingPopulation(tournamentSize, baseIndiv.getBase(), false);\n\t\t// For each place in the tournament get a random individual\n\t\tfor (int i = 0; i < tournamentSize; i++) {\n\t\t\tint randomId = (int) (Math.random() * pop.size());\n\t\t\ttournament.saveIndividual(i, pop.getIndividual(randomId));\n\t\t}\n\t\t// Get the fittest\n\t\tIndividual fittest = tournament.getFittest();\n\t\treturn fittest;\n\t}",
"public static Tree chooseRandTree(double[] distribution, Tree[] trees){\n double r = new Random().nextDouble();\n //System.out.println(r);\n //System.out.println(Arrays.toString(distribution));\n for (int i = 0; i < distribution.length; i++){\n if (r <= distribution[i]){\n return trees[i];\n }\n \n }\n return null;\n \n \n }",
"private Car generateRandomCar(int generationTime) {\n\t\tBoolean error = true;\n\t\tint errorCount=0;\n\t\twhile (error) {\n\n\t\t\tString destination;\t\t\t\n\t\t\t\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\t\t \n\t\t // Compute the total weight of all items together\n\t\t int totalWeight = 0;\n\t\t int selection = -1;\n\t\t for (int element : stuff)\n\t\t {\n\t\t totalWeight += element;\n\t\t \n\t\t }\n\n\t\t int position = new Random().nextInt(totalWeight);\n//\t\t System.out.println(\"totalweight:\" + totalWeight);\n//\t\t System.out.println(\"position:\" + position);\n\t\t int f = 0;\n\t\t for (int element : stuff)\n\t\t {\n//\t\t \tSystem.out.println(\"element:\" + element);\n\t\t \tf++;\n\t\t \tif (position < element)\n\t\t \t{\n\t\t \t \n\t\t selection = f;\n\t\t break;\n\t\t \t}\n\t\t \tposition -= element;\n\t\t }\n//\t\t System.out.println(\"selection:\" + selection);\n\t\t \n\t\t \n\t\t FeatureReader<SimpleFeatureType,SimpleFeature> features1 = dataStore.getFeatureReader();\n\t\t SimpleFeature selectedFeature= features1.next();\n\t\t for (int j=1 ; j<selection ; j++) {\n\t\t \tselectedFeature = features1.next(); \t\n\t\t } \n\t\t \t\n//\t\t\t\tSystem.out.println(\"id:\" + selectedFeature.getAttribute(1));\n//\t\t \tSystem.out.println(\"name:\" + selectedFeature.getAttribute(2));\n//\t\t \tSystem.out.println(\"population:\" + selectedFeature.getAttribute(3));\n\t\t features1.close();\n//\t\t System.out.println(firstFeature.getAttribute(0));\n\t\t GeometryFactory geometryFactory = (GeometryFactory) JTSFactoryFinder.getGeometryFactory( null );\n//\t\t Coordinate coord = new Coordinate( geo1.getLongitude(), geo1.getLatitude() );\n//\t\t com.vividsolutions.jts.geom.Point point = geometryFactory.createPoint(coord);\n\t\t Geometry g = (Geometry) selectedFeature.getAttribute( \"the_geom\" );\n\n\t\t\t Envelope env = new Envelope(selectedFeature.getBounds().getMinX(), selectedFeature.getBounds().getMaxX(), selectedFeature.getBounds().getMinY(), selectedFeature.getBounds().getMaxY());\n\t\t\t double x = env.getMinX() + env.getWidth() * Math.random();\n\t\t\t\tdouble y = env.getMinY() + env.getHeight() * Math.random();\n\t\t\t\tCoordinate pt = new Coordinate(x, y);\n//\t\t\t\tgeometryFactory.getPrecisionModel().makePrecise(pt);\n//\t\t\t\tCoordinate p = pt;\n\t\t\t\tcom.vividsolutions.jts.geom.Point point1 = geometryFactory.createPoint(pt);\n\t\t\t\tPoint source = Simulator.geoToCor(y,x);\n//\t\t\t\tSystem.out.println(x);\n//\t\t\t\tSystem.out.println(y);\n\t\t\t\tint tries = 0;\n\t\t\t\tdestination=strategy.chooseDestination(source);\n\t\t\t\t\n\t\t while(tries<5){\n\t\t \tif (point1.isWithinDistance(g, 0)){\n\n\t\t\t\t\t\tif(destination!=null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\terror=false;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//sDs.chooseDestination(source);\n\t\t\t\t\t\t\tint x1 = (int) source.getX();\n\t\t\t\t\t\t\tint y1 = (int) source.getY();\n\t\t\t\t\t\t\tGeoPosition geo1 = Simulator.corToGeo(x1, y1);\n\t\t\t\t\t\t\tPoint des = Simulator.getStations().get(destination).getPoint();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint chargingTime=strategy.setChargingTime(source);\n\t\t\t\t\t\t\tint y2 = (int) des.getY();\n\t\t\t\t\t\t\tint x2 = (int) des.getX();\n\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tGeoPosition geo2 = Simulator.corToGeo(x2, y2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tGHResponse res = Simulator.getRoute(geo1, geo2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (res != null){\n\t\t\t\t\t\t\t\tCar c = new Car(geo1.getLatitude(), geo1.getLongitude(), destination, generationTime, chargingTime);\n\t\t\t\t\t\t\t\tc.saveRoute(res);\n\t//\t\t\t\t\t\t\tSystem.out.println(\"success\");\n\t\t\t\t\t\t\t\treturn c;\n\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}\n\t\t \ttries++;\n\t\t \tx = env.getMinX() + env.getWidth() * Math.random();\n\t\t\t\t\ty = env.getMinY() + env.getHeight() * Math.random();\n\t\t\t\t\tpt = new Coordinate(x, y);\n\t\t\t\t\tpoint1 = geometryFactory.createPoint(pt);\n\t\t\t\t\tsource = Simulator.geoToCor(y,x);\n\t\t } \n\t\t \n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\terrorCount++;\n\t\t\t//can not successfully get the station destination\n\t\t\tif(errorCount==10)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"System Error From Car Production Line: Can not get the destination with current strategy\");\n\t\t\t}\n\t\t\t\t\t\n\n\n\t\t}\n\t\treturn null;\n\t}",
"public static String randomSelection() {\n int min = 1;\n int max = 3;\n String randomSelection;\n Random random = new Random(System.currentTimeMillis());\n int randomNumber = random.nextInt((max - min) +1) +min;\n if(randomNumber == 1) {\n randomSelection = \"rock\";\n } else if (randomNumber == 2) {\n randomSelection = \"paper\";\n } else {\n randomSelection = \"scissors\";\n }\n return randomSelection;\n }",
"public static TradeGood getRandom() {\n TradeGood[] options = new TradeGood[] {WATER, FURS, ORE, FOOD, GAMES, FIREARMS,\n MEDICINE, NARCOTICS, ROBOTS, MACHINES};\n int index = GameState.getState().rng.nextInt(10);\n return options[index];\n }",
"public abstract void randomize();",
"private void random() {\n\n\t}",
"@Override\n\tpublic double compete() {\n\t\tdouble result=MyTools.getRandomNum(10, 20); \t\n\t\tsetThisResult(result);\n\t\treturn result;\n\t}",
"private int randomPiece() {\n return (int)(Math.random()*N_PIECES);\n }",
"private void rouletteSelection() {\n parentChromosomes = new Chromosome[2];\n parentIndices = new int[2];\n Arrays.fill(parentChromosomes, null);\n parentIndices[0] = getFittestChromosomeIndex();\n parentChromosomes[0] = chromosomes[parentIndices[0]];\n parentIndices[1] = getFittestChromosomeIndex();\n parentChromosomes[1] = chromosomes[parentIndices[1]];\n System.out.println(\"Individuals selected from Roulette Wheel for crossover: \\n\" +\n Arrays.toString(parentChromosomes[0].getGenes()) + \"\\n\" +\n Arrays.toString(parentChromosomes[1].getGenes()));\n }",
"Boolean getRandomize();",
"private void selectRandomUnexploredProfile(GameObserver gameObs) {\n if (eGame.getTotalNumSamples() >= eGame.getNumProfiles() ||\n gameObs.numObsLeft() <= 0) return;\n\n eGame.getRandomProfile(currentOutcome);\n while (eGame.getNumSamples(currentOutcome) > 0) {\n eGame.getRandomProfile(currentOutcome);\n }\n\n sampleAndUpdate(currentOutcome, gameObs);\n }",
"public boolean randomCreate() {\n\t\t// Generates a random genetic code\n\t\t_geneticCode = new GeneticCode();\n\t\t// it has no parent\n\t\t_parentID = -1;\n\t\t_generation = 1;\n\t\t_growthRatio = 16;\n\t\t// initial energy\n\t\t_energy = Math.min(Utils.INITIAL_ENERGY,_world.getCO2());\n\t\t_world.decreaseCO2(_energy);\n\t\t_world.addO2(_energy);\n\t\t// initialize\n\t\tcreate();\n\t\tsymmetric();\n\t\t// put it in the world\n\t\treturn placeRandom();\n\t}",
"private void setBestSample(Sample s) {\n//\t\t System.out.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\");\n//\t\t System.out.println(\"!!! New best sample with fitness \" +\n//\t\t s.getFitness() + \"!!!\");\n\t\tbestSample = s;\n\t}",
"public void setNextGeneration() {\n // create a temporary population\n ArrayList<Genotype> tempPopulation = new ArrayList<Genotype>();\n\n // select mates\n while (tempPopulation.size() < populationSize) {\n tempPopulation.add(Genotype.Mate(rouletteSelection(),\n rouletteSelection(), crossoverProbability));\n }\n }",
"public int getRandomBreed() {\n Random r = new Random();\n// displayToast(Integer.toString(getRandomBreed())); // not needed. generates another random number\n return r.nextInt(6);\n }",
"@Override\n\tpublic double compete() {\n\t\tdouble result=MyTools.getRandomNum(500, 800);\n\t\tsetThisResult(result);\n\t\treturn result;\n\t}",
"public Individual getFittest(){\n Individual fittest = individuals.get(0);\n for (Individual individual: individuals){\n if(fittest.equals(individual)){\n continue;\n }\n else if(fittest.getFitness() < individual.getFitness()){\n fittest = individual;\n }\n }\n return fittest;\n }",
"private void chooseSprite()\r\n\t{\r\n\t\t//Ensure pedestrian sprites exist\r\n\t\tif (sprites.isEmpty()) {\r\n\t\t\tSystem.err.println(\"ERROR: No pedestrian sprites have been loaded\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//Select a random sprite\r\n\t\tint index = (int) Math.floor( Math.random()*sprites.size() );\r\n\t\tspriteName = sprites.get(index);\r\n\t\tsetSprite(\"pedestrians/\"+spriteName);\r\n\t}",
"@Test\n \tpublic void testTargetRandomSelection() {\n \tComputerPlayer player = new ComputerPlayer();\n \t// Pick a location with no rooms in target, just three targets\n \tboard.calcTargets(23, 7, 2);\n \tint loc_24_8Tot = 0;\n \tint loc_22_8Tot = 0;\n \tint loc_21_7Tot = 0;\n \t// Run the test 100 times\n \tfor (int i=0; i<100; i++) {\n \t\tBoardCell selected = player.pickLocation(board.getTargets());\n \t\tif (selected == board.getRoomCellAt(24, 8))\n \t\t\tloc_24_8Tot++;\n \t\telse if (selected == board.getRoomCellAt(22, 8))\n \t\t\tloc_22_8Tot++;\n \t\telse if (selected == board.getRoomCellAt(21, 7))\n \t\t\tloc_21_7Tot++;\n \t\telse\n \t\t\tfail(\"Invalid target selected\");\n \t}\n \t// Ensure we have 100 total selections (fail should also ensure)\n \tassertEquals(100, loc_24_8Tot + loc_22_8Tot + loc_21_7Tot);\n \t// Ensure each target was selected more than once\n \tassertTrue(loc_24_8Tot > 10);\n \tassertTrue(loc_22_8Tot > 10);\n \tassertTrue(loc_21_7Tot > 10);\t\t\t\t\t\t\t\n }",
"public void reproduce(int generation, IPopulation pop, List<ISpecies> sorted_species) {\n\t\tfor(ISpecies specie : sorted_species){\r\n\r\n\t\t\tList<IOrganism> organisms = specie.getOrganisms();\r\n\r\n\t\t\t// outside the species\r\n\t\t\tint orgnum = 0;\r\n\r\n\t\t\tIOrganism mom = null;\r\n\t\t\tIOrganism baby = null;\r\n\t\t\tIGenome new_genome = null;\r\n\t\t\tIOrganism _organism = null;\r\n\t\t\tIOrganism _dad = null;\r\n\r\n\t\t\tif (specie.getExpectedOffspring() > 0 && organisms.size() == 0)\r\n\t\t\t\treturn;\r\n\r\n\t\t\t// elements for this species\r\n\t\t\tint poolsize = organisms.size() - 1;\r\n\r\n\t\t\t// the champion of the 'this' species is the first element of the species;\r\n\t\t\tIOrganism thechamp = organisms.get(0);\r\n\t\t\tboolean champ_done = false; // Flag the preservation of the champion\r\n\r\n\t\t\t// Create the designated number of offspring for the Species one at a time.\r\n\t\t\tfor (int count = 0; count < specie.getExpectedOffspring(); count++) {\r\n\r\n\t\t\t\t// If we have a super_champ (Population champion), finish off some special clones.\r\n\t\t\t\tif (thechamp.getSuperChampOffspring() > 0) {\r\n\r\n\t\t\t\t\t// save in mom current champ;\r\n\t\t\t\t\tmom = thechamp;\r\n\t\t\t\t\t// create a new genome from this copy\r\n\t\t\t\t\tnew_genome = mom.getGenome().duplicate(count);\r\n\t\t\t\t\tif ((thechamp.getSuperChampOffspring()) > 1) {\r\n\t\t\t\t\t\tif (RandomUtils.randomDouble() < .8 || evolutionParameters.getDoubleParameter(MUTATE_ADD_LINK_PROB) == 0.0)\r\n\t\t\t\t\t\t\tevolutionStrategy.getMutationStrategy().mutateLinkWeight(new_genome, evolutionParameters.getDoubleParameter(WEIGHT_MUT_POWER), 1.0, MutationType.GAUSSIAN);\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t// Sometimes we add a link to a superchamp\r\n\t\t\t\t\t\t\tnew_genome.generatePhenotype(generation);\r\n\t\t\t\t\t\t\tevolutionStrategy.getMutationStrategy().mutateAddLink(new_genome,pop);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation);\r\n\t\t\t\t\tthechamp.incrementSuperChampOffspring();\r\n\t\t\t\t} // end population champ\r\n\r\n\t\t\t\t// If we have a Species champion, just clone it\r\n\t\t\t\telse if ((!champ_done) && (specie.getExpectedOffspring() > 5)) {\r\n\t\t\t\t\tmom = thechamp; // Mom is the champ\r\n\t\t\t\t\tnew_genome = mom.getGenome().duplicate(count);\r\n\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation); // Baby is\r\n\t\t\t\t\t// just like mommy\r\n\t\t\t\t\tchamp_done = true;\r\n\r\n\t\t\t\t} else if (RandomUtils.randomDouble() < evolutionParameters.getDoubleParameter(MUTATE_ONLY_PROB) || poolsize == 1) {\r\n\r\n\t\t\t\t\t// Choose the random parent\r\n\t\t\t\t\torgnum = RandomUtils.randomInt(0, poolsize);\r\n\t\t\t\t\t_organism = organisms.get(orgnum);\r\n\t\t\t\t\tmom = _organism;\r\n\t\t\t\t\tnew_genome = mom.getGenome().duplicate(count);\r\n\r\n\t\t\t\t\t// Do the mutation depending on probabilities of various mutations\r\n\t\t\t\t\tevolutionStrategy.getMutationStrategy().mutate(new_genome,pop,generation);\r\n\r\n\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation);\r\n\t\t\t\t}\r\n\t\t\t\t// Otherwise we should mate\r\n\t\t\t\telse {\r\n\t\t\t\t\t// Choose the random mom\r\n\t\t\t\t\torgnum = RandomUtils.randomInt(0, poolsize);\r\n\t\t\t\t\t_organism = organisms.get(orgnum);\r\n\r\n\t\t\t\t\t// save in mom\r\n\t\t\t\t\tmom = _organism;\r\n\t\t\t\t\t// Choose random dad...\r\n\t\t\t\t\t// Mate within Species\r\n\t\t\t\t\tif (RandomUtils.randomDouble() > evolutionParameters.getDoubleParameter(INTERSPECIES_MATE_RATE)) {\r\n\t\t\t\t\t\torgnum = RandomUtils.randomInt(0, poolsize);\r\n\t\t\t\t\t\t_organism = organisms.get(orgnum);\r\n\t\t\t\t\t\t_dad = _organism;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Mate outside Species\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t// save current species\r\n\t\t\t\t\t\tISpecies randspecies = specie;\r\n\t\t\t\t\t\t// Select a random species\r\n\t\t\t\t\t\tint giveup = 0;\r\n\t\t\t\t\t\t// Give up if you can't find a different Species\r\n\t\t\t\t\t\twhile ((randspecies == specie) && (giveup < 5)) {\r\n\r\n\t\t\t\t\t\t\t// Choose a random species tending towards better species\r\n\t\t\t\t\t\t\tdouble randmult = Math.min(1.0, RandomUtils.randomGaussian() / 4);\r\n\r\n\t\t\t\t\t\t\t// This tends to select better species\r\n\t\t\t\t\t\t\tint sp_ext = Math.max(0, (int) Math.floor((randmult * (sorted_species.size() - 1.0)) + 0.5));\r\n\t\t\t\t\t\t\trandspecies = sorted_species.get(sp_ext);\r\n\t\t\t\t\t\t\t++giveup;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t_dad = randspecies.getOrganisms().get(0);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tnew_genome = evolutionStrategy.getCrossoverStrategy().performCrossover(mom,_dad,count);\r\n\r\n\t\t\t\t\t// Determine whether to mutate the baby's Genome\r\n\t\t\t\t\t// This is done randomly or if the mom and dad are the same organism\r\n\t\t\t\t\tif (RandomUtils.randomDouble() > evolutionParameters.getDoubleParameter(MATE_ONLY_PROB) || \r\n\t\t\t\t\t\t\t_dad.getGenome().getId() == mom.getGenome().getId() || \r\n\t\t\t\t\t\t\t_dad.getGenome().compatibility(mom.getGenome()) == 0.0) {\r\n\r\n\t\t\t\t\t\tevolutionStrategy.getMutationStrategy().mutate(new_genome,pop,generation);\r\n\t\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation);\r\n\t\t\t\t\t} \r\n\t\t\t\t\t// end block of prob\r\n\t\t\t\t\t// Determine whether to mutate the baby's Genome\r\n\t\t\t\t\t// This is done randomly or if the mom and dad are the same organism\r\n\r\n\t\t\t\t\t// Create the baby without mutating first\r\n\t\t\t\t\telse \r\n\t\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation);\r\n\t\t\t\t}\r\n\t\t\t\tevolutionStrategy.getSpeciationStrategy().addOrganismToSpecies(pop, baby);\r\n\t\t\t} // end offspring cycle\r\n\t\t}\r\n\t}",
"public Individu selection() {\n\t\t// Pioche au hasard deux individus differents\n\t\tRandom rand = new Random();\n\t\tint index1 = 0, index2 = 0;\n\t\tindex1 = rand.nextInt(this.individus.size());\n\t\twhile(index1 == index2) {\n\t\t\tindex2 = rand.nextInt(this.individus.size());\n\t\t}\n\n\t\t//double fitness1 =\n\t\tdouble fitness1 = this.individus.get(index1).fitness();\n\t\tdouble fitness2 = this.individus.get(index2).fitness();\n\n\t\t// Determine le meilleur du moins bon\n\t\tIndividu better, worse;\n\t\tif(fitness1 > fitness2) {\n\t\t\tbetter = this.individus.get(index1);\n\t\t\tworse = this.individus.get(index2);\n\t\t} else {\n\t\t\tworse = this.individus.get(index1);\n\t\t\tbetter = this.individus.get(index2);\n\t\t}\n\n\t\t// Dans 75% des cas, onp rend le meilleur des deux\n\t\tif(rand.nextDouble() <= 0.75) {\n\t\t\treturn better;\n\t\t} else {\n\t\t\treturn worse;\n\t\t}\n\t}",
"public double fitness()\n/* */ {\n/* 40 */ return 1.0D / (1.0D + this.distance);\n/* */ }",
"public void runTournament() {\n\t\t//ArrayList<Gene> tournament = new ArrayList<Gene>();\n\t\tPriorityQueue<Gene> tournament = new PriorityQueue<Gene>(Collections.reverseOrder());\n\t\tint numContenders = (int)(FRAC_IN_TOURNAMENT * geneNumber);\n\t\tSet<Integer> chosenOnes = new HashSet<Integer>();\n\t\t\n\t\twhile(chosenOnes.size() < numContenders) {\n\t\t\tint randIndex = (int) (Math.random() * geneNumber);\n\t\t\tchosenOnes.add(randIndex);\n\t\t}\n\t\tfor(int i : chosenOnes){\n\t\t\ttournament.add(genepool.get(i));\n\t\t}\n\t\t//int firstIndex = getMax(tournament, -1);\n\t\t//int secondIndex = getMax(tournament, firstIndex);\n\t\t//Gene parent1 = tournament.get(firstIndex);\n\t\t//Gene parent2 = tournament.get(secondIndex);\n\t\tGene parent1 = tournament.poll();\n\t\tGene parent2 = tournament.poll();\n\t\t// Create a new gene from the 2 fittest genes\n\t\tGene newGene = parent1.waCrossover(parent2);\n\t\t\n\t\t// Calculate fitness for the new gene\n\t\tPlayerSkeleton.runGames(numGames, newGene);\n\t\toffspringPool.add(newGene);\n\t}",
"private ArrayList<int[]> selectionRoulette(int[][] chromosomes, float percentToSelect) {\n\n\t\tArrayList<int[]> selectedChromosomes = new ArrayList<int[]>();\n\n\t\t//sum up fitnesses for population\n\t\tint fitnessSum = 0;\n\t\tfor (int[] chromosome : chromosomes) {\n\t\t\tfitnessSum += getFitness(chromosome);\n\t\t}\n\n\t\t//minimization problem - invert fitness\n\t\tint invertFitnessSum = 0;\n\t\tfor (int[] chromosome : chromosomes) {\n\t\t\tinvertFitnessSum += Math.round((fitnessSum * 1.0) / getFitness(chromosome)); //small fitness values (few bins) are favored\n\t\t}\n\n\t\t//get fitnesses of chromosomes, save in array to avoid recalculating\n\t\tint[] fitnesses = new int[chromosomes.length];\n\t\tfor (int i = 0; i < chromosomes.length; i++) {\n\t\t\tfitnesses[i] = (int) Math.round((fitnessSum * 1.0) / getFitness(chromosomes[i]));\n\t\t}\n\n\t\t//spin the roulette wheel\n\t\tfor (int i = 0; i < chromosomes.length * percentToSelect; i++) {\n\t\t\tint currentFitnessTotal = 0;\n\t\t\tint fitnessCutoff = rand.nextInt(invertFitnessSum); //where the wheel stops\n\n\t\t\tfor (int j = 0; j < chromosomes.length; j++) { //go through all chromosomes to see who is selected this spin\n\t\t\t\tif (currentFitnessTotal < fitnessCutoff)\n\t\t\t\t\tcurrentFitnessTotal += fitnesses[j];\n\n\t\t\t\tif (currentFitnessTotal >= fitnessCutoff) { //if this chromosome pushed us over the edge, save it\n\t\t\t\t\tselectedChromosomes.add(chromosomes[j]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}//end roulette spinning\n\t\treturn selectedChromosomes;\n\t}",
"public int getRandom() {\n return sub.get(rand.nextInt(sub.size()));\n }",
"public void magic(){\n //no joke, this is literally what I named the method last year\n Student previous = this.students.get(0);\n for (Species s2:this.species) s2.getStudents().clear();\n for (Student s:this.students) {\n boolean notFoundSpecies = true;\n for (Species species:this.species) {\n if(species.sameSpecies(s.getBrain())){\n species.addStudent(s);\n notFoundSpecies = false;\n break;\n }\n }\n if(notFoundSpecies) this.species.add(new Species(s));\n }\n this.students.sort(Comparator.comparingDouble(Student::getScore).reversed());\n this.species.forEach(Species::sort);\n this.species.sort(Comparator.comparingDouble(Species::getBestScore).reversed());\n ArrayList<Species> speciesArrayList = this.species;\n for (int i = 0; i < speciesArrayList.size(); i++) {\n System.out.print(\"Species \" + i + \" Score: \" + speciesArrayList.get(i).getBestScore() + \" \");\n }\n System.out.println();\n\n if(Config.printGenerationScores) {\n System.out.print(\"bar [\");\n for (Species species : this.species)\n for (Student s2 : species.getStudents()) System.out.print(s2.getScore() + \", \");\n System.out.println(\"]\");\n System.out.print(\"foobar [\");\n for (Student student : this.students) System.out.print(student.getScore() + \", \");\n System.out.println(\"]\");\n System.out.print(\"foo [\");\n this.species.forEach(s -> System.out.print(s.getBestScore() + \", \"));\n System.out.print(\"]\");\n }\n\n if(this.killThemAll){\n while(5 < this.species.size()){\n this.species.remove(5);\n }\n this.killThemAll = false;\n System.out.println(\"Extinction Complete\");\n }\n for (Species s:this.species) {\n s.eliminate();\n s.shareScore();\n s.setAverage();\n }\n\n Student temp = this.species.get(0).getStudents().get(0);\n temp.setGen(this.gen);\n if(temp.getScore() >= this.bestScore){\n //Here it is! The beholden, the stupid, the idiotic, player #0\n //its alive!\n //temp.getPlayer().getComponent(PlayerComponent.class).setDead(false);\n //temp = temp.duplicate(temp.getPlayer());\n System.out.printf(\"Old Best: %f New Best: %f\", this.bestScore, temp.getScore());\n this.bestScore = temp.getScore();\n temp.getBrain().saveNetwork();\n }\n System.out.println();\n int i = 2;\n while(i < this.species.size()){\n if(this.species.get(i).getNoChange() >= 15){\n this.species.remove(i);\n i -= 1;\n }\n i += 1;\n }\n System.out.printf(\"Generation: %d Number of Changes: %d Number of Species: %d\\n\",\n this.gen, this.innovationHistory.size(), this.species.size());\n //very convenient and hopefully not slower\n double avgSum = this.species.stream().mapToDouble(Species::getBestScore).sum();\n ArrayList<Student> kids = new ArrayList<>();\n for (Species s:this.species) {\n kids.add(s.getChamp().duplicate(s.getChamp().getPlayer()));\n int studentNumber = (int)(Math.floor(s.getAverage() / avgSum * this.students.size()) - 1);\n for (int j = 0; j < studentNumber; j++) {\n kids.add(s.newStudent(this.innovationHistory));\n }\n }\n if(kids.size() < this.students.size()) kids.add(previous.duplicate(previous.getPlayer()));\n while(kids.size() < this.students.size()) kids.add(this.species.get(0).newStudent(this.innovationHistory));\n this.students = new ArrayList<>(kids);\n this.gen++;\n for (Student s:this.students) {\n s.getBrain().generateNetwork();\n }\n }",
"private void getRandomNumber() {\n\t\tRandom generator = new Random();\n\t\trandomNumber = generator.nextInt(POSSIBLE_CHOICE.length);\n\t}",
"public void setFitness(float fitness)\r\n\t{\r\n\t\tthis.fitness = fitness;\r\n\t}",
"public Sample SelectSample() {\n\t\t\n\t\tif(sample_map.size() == 0) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tfloat sum = 0;\n\t\tfloat min = Float.MAX_VALUE;\n\t\tLinkSample ptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tmin = Math.min(min, ptr.s.weight);\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tmin = Math.abs(min) + 1;\n\t\tptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tsum += ptr.s.weight + min;\n\t\t\tif(ptr.s.weight + min < 0) {\n\t\t\t\tSystem.out.println(\"neg val\");System.exit(0);\n\t\t\t}\n\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tfloat val = (float) (Math.random() * sum);\n\n\t\tsum = 0;\n\t\tptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tsum += ptr.s.weight + min;\n\n\t\t\tif(sum >= val) {\n\t\t\t\treturn ptr.s;\n\t\t\t}\n\t\t\t\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\tSystem.out.println(\"error\");System.exit(0);\n\t\treturn null;\n\t}",
"public static void breedAll() {\n int a, b; //Pointers to select parents\n\n //While loop to ensure full carrying capacity of population\n while (Population.size() <= maxPop) {\n //Sorts by Fitness level first\n sortByFitlvl();\n\n //Selects Two Random Parents\n a = (int) (Math.abs(Utilities.sharpGauss(4)) * Population.size());\n b = (int) (Math.abs(Utilities.sharpGauss(4)) * Population.size());\n //System.out.println(a+\"\\t\"+b+\"\\t\"+Population.size());\n\n // Between 1-2 children\n int children = rand.nextInt(2)+1;\n for (int i = 0; i < children; i++) {\n Population.add(Breeder.breed(Population.get(a), Population.get(b), 0.1));\n }\n\n //sortByFitlvl();\n }\n\n if (debug)\n printPopulation(true);\n }",
"public static Collection<Foodies> Random(String[] args, double rar){\n\t\tgetListy(args);\n\t\tdone = searchByRating(rar);\n\t\tCollections.shuffle((List<?>) done); \n\t\treturn done; \n\t}",
"private static ResourceLocation getRandomMonster(Random rand)\n\t{\n\t\tRandomCollection<ResourceLocation> monsters = new RandomCollection<ResourceLocation>();\n\t\t\n\t\tmonsters.add(10, EntityList.getKey(EntityZombie.class));\n\t\tmonsters.add(10, EntityList.getKey(EntitySkeleton.class));\n\t\tmonsters.add(10, EntityList.getKey(EntitySpider.class));\n\t\tmonsters.add(7, EntityList.getKey(EntityGhost.class));\n\t\tmonsters.add(7, EntityList.getKey(EntityBarbarian.class));\n\t\t//monsters.add(4, EntityList.getKey(EntityBandit.class));\n\t\tmonsters.add(3, EntityList.getKey(EntityBanshee.class));\n\t\tmonsters.add(1, EntityList.getKey(EntityGolem.class));\n\t\t\n\t\treturn monsters.next(rand);\n\t}",
"public void setWhoGoesFirstRandom() {\n Random ran = new Random();\n int i = ran.nextInt(2) + 1;\n if(i == 1) {\n setWhoGoesFirst(humanPlayer);\n } else {\n setWhoGoesFirst(aiPlayer);\n }\n }",
"private static void getFitness() {\n\t\tint popSize = population.size();\n\t\tChromosome thisChromo = null;\n\t\tdouble bestScore = 0;\n\t\tdouble worstScore = 0;\n\n\t\t// The worst score would be the one with the highest energy, best would be\n\t\t// lowest.\n\t\tworstScore = population.get(maximum()).conflicts();\n\n\t\t// Convert to a weighted percentage.\n\t\tbestScore = worstScore - population.get(minimum()).conflicts();\n\n\t\tfor (int i = 0; i < popSize; i++) {\n\t\t\tthisChromo = population.get(i);\n\t\t\tthisChromo.fitness((worstScore - thisChromo.conflicts()) * 100.0 / bestScore);\n\t\t}\n\n\t\treturn;\n\t}",
"public int dmg(){\r\n dmg = rand.nextInt(att);\r\n if(att == 1)\r\n dmg = 1;\r\n return dmg;\r\n }",
"@Nullable\n public T choose(Predicate<T> predicate, Random random) {\n List<Entry<T>> filteredEntries = entries.stream()\n .filter(t -> predicate.apply(t.getValue()))\n .collect(Collectors.toList());\n if (Iterables.isEmpty(filteredEntries)) {\n return null;\n }\n\n int maximumPriority = Ordering.natural().max(Iterables.transform(filteredEntries, Entry::getPriority));\n filteredEntries = filteredEntries.stream()\n .filter(t -> t.getPriority() == maximumPriority)\n .collect(Collectors.toList());\n\n if(Iterables.isEmpty(filteredEntries)) {\n return null;\n }\n\n double sum = 0;\n for(Entry<T> entry : filteredEntries)\n sum += entry.getWeight();\n\n double selection = random.nextDouble() * sum;\n for(Entry<T> entry : filteredEntries) {\n selection -= entry.getWeight();\n if(selection <= 0)\n return entry.getValue();\n }\n // should not get here.\n throw new IllegalStateException();\n }",
"private int tournament()\r\n {\r\n\tint out = spinTheWheel();\r\n\tdouble max = ff.evaluate(chromos.get(out),generation());\r\n\tdouble temp_fitness = 0;\r\n\tint temp_index = 0;\r\n\r\n\tfor(int i = 0; i < selPara - 1 + tourStep*generation(); i++)\r\n\t {\r\n\t\ttemp_index = spinTheWheel();\r\n\t\ttemp_fitness = ff.evaluate(chromos.get(temp_index),generation());\r\n\t\tif(temp_fitness > max)\r\n\t\t {\r\n\t\t\tmax = temp_fitness;\r\n\t\t\tout = temp_index;\r\n\t\t }\r\n\t }\r\n\treturn out;\r\n }",
"private static Tour tournamentSelection(Population pop) {\n // Create a tournament population\n Population tournament = new Population(tournamentSize, false);\n // For each place in the tournament get a random candidate tour and\n // add it\n for (int i = 0; i < tournamentSize; i++) {\n int randomId = (int) (Math.random() * pop.populationSize());\n tournament.saveTour(i, pop.getTour(randomId));\n }\n // Get the fittest tour\n Tour fittest = tournament.getFittest();\n return fittest;\n }",
"private static double randomSearch(int numTermites, int iterations,\n\t\t\tdouble pStrength, int moves, double pImportance, Grid g, double decay) {\n\t\t\n\t\tRandom r = new Random();\n\t\t\n//\t\tSystem.out.println(\"-------Beginning random search-------\");\n\t\twhile (iterations>0) {\n\t\t\tArrayList<Termite> termites = new ArrayList<Termite>();\n\t\t\n\t\t\t//Generate the termites for this iteration\n\t\t\tfor (int i=0; i<numTermites; i++) {\n\t\t\t\tint x = r.nextInt(10);\n\t\t\t\tint y = r.nextInt(10);\n\t\t\t\ttermites.add(new Termite(x,y,pStrength,moves,pImportance));\n\t\t\t}\n\t\t\n\t\t\t//Let each termite move once, if it has at least one remaining move\n\t\t\twhile(termites.get(0).getMovesLeft() > 0) {\n\t\t\t\tfor (Termite t: termites) {\n\t\t\t\t\tt.move(g);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Lay pheromone after each termite has moved\n\t\t\tfor (Termite t: termites) {\n\t\t\t\tt.layPheromones(g);\n\t\t\t}\n\t\t\t//Print the results of this iteration and prepare for the next\n\t\t\titerations--;\n//\t\t\tSystem.out.println(\"Pheromones after iteration \" + iterations);\n//\t\t\tg.printPheromones();\n\t\t\tg.decayPheromones(decay);\n//\t\t\tSystem.out.println(\"-----------------------------\");\n\t\t}\n\t\treturn g.getAccuracy();\n\t}",
"public void randomizeSearchDifficulty(int minimum){\n\t\tint roll=minimum+dice.nextInt(floorTag+20);\r\n\t\tsetSearchDifficulty(roll);\r\n\t}",
"@Override\r\n public Food createFood(List<Coordinate> obstacles) {\r\n Random random = new Random();\r\n double num = random.nextDouble();\r\n\r\n if (num <= MushroomPowerUp.rarity) {\r\n return new MushroomPowerUp(randomCoordinates(obstacles));\r\n }\r\n if (num <= DoubleScorePowerUp.rarity + MushroomPowerUp.rarity) {\r\n return new DoubleScorePowerUp(randomCoordinates(obstacles));\r\n }\r\n return new AppleFactory().createFood();\r\n }",
"public double simulate(){\n\t\tdouble r = Math.sqrt(-2 * Math.log(Math.random()));\n\t\tdouble theta = 2 * Math.PI * Math.random();\n\t\treturn Math.exp(location + scale * r * Math.cos(theta));\n\t}",
"private void chooseBreedToBeIdentified() {\n Random r = new Random();\n int questionBreedIndex = r.nextInt(3);\n\n questionCarMake = displayingCarMakes.get(questionBreedIndex);\n carMakeNameTitle.setText(questionCarMake);\n }",
"public void addRandomKids(OperatorFactory o, TerminalFactory t,\r\n int maxDepth, Random rand) {}",
"public static int getFoodValueRandomLimit() {\r\n\t\treturn 50;\r\n\t}",
"public Sim.Sex chooseSex() {\n if(RND.nextInt() > 0.5) {\n return Sim.Sex.M;\n } else {\n return Sim.Sex.F;\n }\n }"
] |
[
"0.67735416",
"0.668827",
"0.6636664",
"0.6442247",
"0.6338223",
"0.62818784",
"0.6263116",
"0.62417674",
"0.609552",
"0.60946715",
"0.605212",
"0.6047439",
"0.59446347",
"0.59425735",
"0.59074855",
"0.590543",
"0.5900689",
"0.58974457",
"0.58897424",
"0.5885863",
"0.58802223",
"0.58701015",
"0.5841073",
"0.58158827",
"0.5815679",
"0.58102727",
"0.5797155",
"0.5780266",
"0.5780266",
"0.576816",
"0.57588035",
"0.5745734",
"0.57344747",
"0.5729867",
"0.57233775",
"0.5713043",
"0.57014793",
"0.56975746",
"0.5692795",
"0.5672291",
"0.56639105",
"0.5662412",
"0.5657908",
"0.5644687",
"0.5638395",
"0.5637947",
"0.56338036",
"0.5628833",
"0.5622707",
"0.5609857",
"0.56045836",
"0.558977",
"0.5589391",
"0.5589333",
"0.5582359",
"0.55685693",
"0.5564436",
"0.55484086",
"0.5547174",
"0.55439895",
"0.5522759",
"0.5518258",
"0.55177075",
"0.5516361",
"0.55117106",
"0.5510514",
"0.5509794",
"0.55076504",
"0.5505425",
"0.5495356",
"0.5478349",
"0.54728806",
"0.54506624",
"0.54423434",
"0.54397655",
"0.5439196",
"0.54337454",
"0.5427525",
"0.54266286",
"0.542492",
"0.54150367",
"0.5413255",
"0.5409782",
"0.54077345",
"0.54023194",
"0.5396727",
"0.53939974",
"0.5391053",
"0.53884727",
"0.53874505",
"0.538539",
"0.53739315",
"0.53681076",
"0.53665984",
"0.53656095",
"0.536074",
"0.5359264",
"0.5356488",
"0.53476274",
"0.5342722"
] |
0.7312582
|
0
|
gets the number of species in the generation
|
public int getSpeciesAmount() {
return species.size();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"protected int numGenes() {\n\t\treturn genes.size();\n\t}",
"public int getNumberOfAnimalSpecies() {\n\t\treturn numberOfAnimalSpecies;\n\t}",
"public int countOfGenerations ();",
"public int getGenCount(){\n return generationCount;\n }",
"int getSnInfoCount();",
"int getSnInfoCount();",
"int getSnInfoCount();",
"public int countAllSpecies() {\n if(overallRoot == null)\n return 0;\n return (overallRoot.getNumLeafs());\n }",
"private int countGrasses()//issues...see comment below in countTrees()\n {\n int grasses = 0;\n Field field = getField();\n Iterator<Location> it;\n List<Object> plantList = new List<>();\n while(it.hasNext()) {\n plantList.add(field.getObjectAt(currant));\n if(plant instanceof Grass) {\n grasses++;\n }\n }\n return grasses;\n }",
"int getPartsCount();",
"int getPartsCount();",
"public int getNumChromosomes();",
"public int getNumGruppoPacchetti();",
"public int getStoneCount()\n {\n return stoneCount;\n }",
"public static int getNos() {\n\t\treturn numberOfStudents;\n\t}",
"public abstract int numOfFoodCellToReproduce();",
"public int getNum() {\n System.out.println(\"There are altogether \" + num + \" registers created\");\n return num;\n }",
"int getMonstersCount();",
"int getMonstersCount();",
"private int getReferences() {\n int quantity = 0;\n for (Option o : criteriaList.get(currentCriteria).getOptionList()) {\n boolean wasFound = false;\n for (String s : speciesLeft)\n if (o.getEntities().contains(s))\n wasFound = true;\n if (wasFound)\n ++quantity;\n }\n return quantity;\n }",
"public int size( )\r\n {\r\n int size = (int) manyNodes;// Student will replace this return statement with their own code:\r\n return size;\r\n }",
"public int size()\n\t{\n\t\treturn creatures.size();\n\t}",
"int getBlockNumsCount();",
"int getBlockNumsCount();",
"public int size(){\n\t\treturn howMany; \n\t}",
"int getGenerations();",
"@Override\r\n\tpublic int getPegCount() {\r\n\t\tint shipSize = 3;\r\n\t\treturn shipSize;\r\n\t}",
"int getNumHar();",
"public int getNumGenerations() {\n return numGenerations;\n }",
"int getNoOfParties();",
"public int numHouses() {\n\t\treturn buildings;\n\t}",
"public int getNumberOfComponents();",
"int getBlockNumbersCount();",
"public int numberOfOccorrence();",
"protected short getCount() \r\n {\r\n // We could move this to the individual implementing classes\r\n // so they have their own count\r\n synchronized(AbstractUUIDGenerator.class) \r\n {\r\n if (counter < 0)\r\n {\r\n counter = 0;\r\n }\r\n return counter++;\r\n }\r\n }",
"public int getSize() {\n return this.n;\n }",
"public int size()\r\n {\r\n return n;\r\n }",
"public int size() {\r\n\t\treturn n;\r\n\t\t\r\n\t}",
"private int size() {\n return n;\n }",
"public int getNumPens(){\n return this.mFarm.getNumPens();\n }",
"public int getNumCars() {\r\n\t\treturn (numCars + numSmallCars);\r\n\t}",
"public int size() {\n return n;\n }",
"public int size() {\n return n;\n }",
"public int size() {\n return n;\n }",
"public int size() {\n return n;\n }",
"public int size() {\n return n;\n }",
"public int size() {\n return n;\n }",
"public int size() {\n return n;\n }",
"public int size() {\n return n;\n }",
"public int size() {\n return n;\n }",
"public int size() {\n return n;\n }",
"public int getNumberOfSimulations(){\n return this.nMonteCarlo;\n }",
"public int size(){\n\t\tListUtilities start = this.returnToStart();\n\t\tint count = 1;\n\t\twhile(start.nextNum != null){\n\t\t\tcount++;\n\t\t\tstart = start.nextNum;\n\t\t}\n\t\treturn count;\n\t}",
"int getInstrumentCount();",
"public int getNumPeople(){\r\n int num = 0;\r\n return num;\r\n }",
"int getChunksLocationCount();",
"public int size() { \r\n \treturn n; \r\n }",
"public int size (){\n return N;\n }",
"int getEducationsCount();",
"public int size()\n {\n return N;\n }",
"public int getMySpeciesIdentifier() {\n return mySpeciesIdentifier;\n }",
"public int getGlyphCount() {\n\t\tSet<Key<?>> keys = properties.keys(ObservableProperties.DEFAULT);\n\t\tint ctr = 0;\n\t\tfor (Key<?> key : keys) {\n\t\t\tObject t = properties.get(key);\n\t\t\tif (t instanceof WritingShape && key.toString().length() == 1)\n\t\t\t\tctr++;\n\t\t}\n\t\treturn ctr;\n\t}",
"public int size() {\n return this.n;\n }",
"public int generation()\r\n {\r\n\treturn generation;\r\n }",
"public int size() {\n return n;\n\n }",
"public int size() {\r\n return N;\r\n }",
"public int getSize() {\r\n return dice.size();\r\n }",
"public int size() {\n return _N;\n\n }",
"public int size() {\n return N;\n }",
"public int size() {\n return N;\n }",
"public int size() {\n return N;\n }",
"public int size() {\n return N;\n }",
"public int size() {\n return N;\n }",
"public int size() {\n return N;\n }",
"public int size() {\n return N;\n }",
"public abstract int getScenarioCount();",
"public int size(){\n\t\treturn n;\n\t}",
"public int size(){\n\t\treturn n;\n\t}",
"public int size() {\n return N;\n\n }",
"public int getN() {\n\t\treturn N;\n\t}",
"@Override\n\tpublic int countIndex() {\n\t\treturn logoMapper.selectCountLogo()+headbannerMapper.selecCountHB()+succefulMapper.selecCountSucc()+solutionMapper.selecCountSolu();\n\t}",
"public int getNumOfSp(){\r\n // return statement\r\n return numOfSp;\r\n }",
"int getBlockLocationsCount();",
"public int getN() {\r\n\t\treturn n;\r\n\t}",
"public int size()\n\t\t{\n\t\treturn N;\n\t\t}",
"public int size(){\n\t\t\r\n\t\treturn N;\r\n\t}",
"public int getPopulationSize()\n\t{\n\t\treturn individuals.length;\n\t}",
"int NoOfNodes() {\r\n return noOfNodes;\r\n }",
"int getNumberOfInfantry();",
"public int size()\r\n { return N; }",
"public int shapeCount()\n {\n // return the number of children in the list\n return children.size();\n }",
"public int getSize(){\n /**\n * TODO: INSERT YOUR CODE HERE\n * FIND THE NUMBER OF NODES IN THE TREE AND STORE THE VALUE IN CLASS VARIABLE \"size\"\n * RETURN THE \"size\" VALUE\n *\n * HINT: THE NMBER OF NODES CAN BE UPDATED IN THE \"size\" VARIABLE EVERY TIME A NODE IS INSERTED OR DELETED FROM THE TREE.\n */\n\n return size;\n }",
"@Override\r\n\tpublic Long getPlantNameCount(String name) {\n\t\tIterator<Object> iterator = null;\r\n\t\tLong i = 0l;\r\n\t\ttry {\r\n\t\t\tsql = \"select count(*) from Plant p where p.plantName='\" + name\r\n\t\t\t\t\t+ \"'\";\r\n\t\t\tList<Object> list = getHibernateTemplate().find(sql);\r\n\t\t\titerator = list.iterator();\r\n\r\n\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\tObject object = (Object) iterator.next();\r\n\t\t\t\ti = (Long) object;\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn i;\r\n\t}",
"int getNumberOfArtillery();",
"public int getN() {\n\t\treturn n;\n\t}",
"public int size() {\n\t\treturn N;\n\t}",
"public int size() {\n\t\treturn N;\n\t}",
"public int size() {\n\t\treturn N;\n\t}",
"public int size() {\n\t\treturn N;\n\t}",
"public int size() {\n\t\treturn N;\n\t}"
] |
[
"0.7139024",
"0.70569736",
"0.6915409",
"0.670612",
"0.653085",
"0.653085",
"0.653085",
"0.651371",
"0.6511091",
"0.646953",
"0.646953",
"0.64571303",
"0.6441098",
"0.64406437",
"0.64279217",
"0.6391149",
"0.6384125",
"0.6372432",
"0.6372432",
"0.63639873",
"0.63598406",
"0.63444614",
"0.63349104",
"0.63349104",
"0.6332862",
"0.6330198",
"0.63283116",
"0.6323699",
"0.63110954",
"0.6290075",
"0.6283306",
"0.62747663",
"0.62650824",
"0.62592435",
"0.6248244",
"0.62214315",
"0.6220696",
"0.62088007",
"0.62078905",
"0.62029123",
"0.6174311",
"0.61677337",
"0.61677337",
"0.61677337",
"0.61677337",
"0.61677337",
"0.61677337",
"0.61677337",
"0.61677337",
"0.61677337",
"0.61677337",
"0.6165162",
"0.6155628",
"0.6155314",
"0.61535144",
"0.6152488",
"0.61506695",
"0.61471266",
"0.61463237",
"0.6146254",
"0.61458164",
"0.6142554",
"0.61299753",
"0.6123996",
"0.6119663",
"0.6115208",
"0.6108557",
"0.6108524",
"0.6104891",
"0.6104891",
"0.6104891",
"0.6104891",
"0.6104891",
"0.6104891",
"0.6104891",
"0.6103589",
"0.6097641",
"0.6097641",
"0.60959023",
"0.60910887",
"0.60903406",
"0.6084671",
"0.60770094",
"0.6073326",
"0.6065116",
"0.60622805",
"0.606",
"0.6056063",
"0.60532105",
"0.60521865",
"0.6046328",
"0.6044545",
"0.60439295",
"0.6041126",
"0.604023",
"0.60400164",
"0.60400164",
"0.60400164",
"0.60400164",
"0.60400164"
] |
0.768738
|
0
|
Returns the highest fitness score
|
public float getHighestFitness() {
return highestScore;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public double getMaximumScore() {\n return 0.9; // TODO: parameter\n }",
"public int getWorstScore()\n {\n return -1;\n }",
"public double getBestScore();",
"public Fitness bestScore() {\r\n Map.Entry<Fitness, List<Element>> bestEntry\r\n = elementsByFitness.lastEntry();\r\n if (bestEntry == null) {\r\n return null;\r\n }\r\n Fitness result = bestEntry.getKey();\r\n\r\n return result;\r\n }",
"public Fitness worstScore() {\r\n Map.Entry<Fitness, List<Element>> worstEntry\r\n = elementsByFitness.firstEntry();\r\n if (worstEntry == null) {\r\n return null;\r\n }\r\n Fitness result = worstEntry.getKey();\r\n\r\n return result;\r\n }",
"public double worstFitness()\r\n {\r\n\treturn worstFitness;\r\n }",
"public Double getHighestMainScore() {\n return highestMainScore;\n }",
"public int getMaxScore() {\r\n return maxScore;\r\n\t}",
"public int getBestScore() {\n\t\tInteger score = this.hand.countValue().lower(22);\n\t\tif(score!=null) {\n\t\t\treturn score;\n\t\t}\n\t\telse {\n\t\t\treturn this.hand.countValue().higher(21);\n\t\t}\n\t}",
"public double bestFitness()\r\n {\r\n\treturn bestFitness;\r\n }",
"public int fitness() {\n\t\t//System.out.println(\"/!\\\\ WARNING: Full fitness() called!\");\n\t\tint fitness = 0;\n\t\tint fitnessCases = (int) Math.pow(2, circuit.order);\n\t\tfor (int i=0; i<fitnessCases; i++) {\n\t\t\tValuation v = new Valuation(i, circuit.order);\n\t\t\tboolean actualOutput = tree.evaluate(v);\n\t\t\tboolean correctOutput = v.correctOutput();\n\t\t\t\n\t\t\tif (actualOutput == correctOutput) fitness++;\n\t\t}\n\t\t\n\t\tthis.fitness = fitness;\n\t\tthis.fitnessCases = null;\n\t\t\n\t\treturn fitness;\n\t}",
"public OptionalDouble getBestScore()\n {\n if (scores.size() > 0)\n {\n return OptionalDouble.of(scores.lastKey());\n }\n else\n {\n return OptionalDouble.empty();\n }\n }",
"public int theHighest() {\r\n\t\tint highest = 0;\r\n\t\tfor(int i = 0; i < rows_size; i++) {\r\n\t\t\tfor(int j = 0; j < columns_size; j++) {\r\n\t\t\t\tif(game[i][j].getValue() > highest)\r\n\t\t\t\t\thighest = game[i][j].getValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn highest;\r\n\t}",
"private static void getFitness() {\n\t\tint popSize = population.size();\n\t\tChromosome thisChromo = null;\n\t\tdouble bestScore = 0;\n\t\tdouble worstScore = 0;\n\n\t\t// The worst score would be the one with the highest energy, best would be\n\t\t// lowest.\n\t\tworstScore = population.get(maximum()).conflicts();\n\n\t\t// Convert to a weighted percentage.\n\t\tbestScore = worstScore - population.get(minimum()).conflicts();\n\n\t\tfor (int i = 0; i < popSize; i++) {\n\t\t\tthisChromo = population.get(i);\n\t\t\tthisChromo.fitness((worstScore - thisChromo.conflicts()) * 100.0 / bestScore);\n\t\t}\n\n\t\treturn;\n\t}",
"public int findHighestScore() {\n int highest = 0;\n for (int i = 0; i < allQuizTakers.size(); i++) {\n\n if (allQuizTakers.get(i).getScore(0).compareTo(highest) > 0) {\n highest = (int) allQuizTakers.get(i).getScore(0);\n }\n\n }\n return highest;\n }",
"public double getHighestGrade(){\n double highestGrade = 0;\n for (int i = 0; i<students.size(); i++){\n if (students.get(i).getGrades()> highestGrade)\n highestGrade = students.get(i).getGrades();\n }// end for\n return highestGrade;\n }",
"public float getFitness()\r\n\t{\r\n\t\treturn fitness;\r\n\t}",
"public int getFitness()\n {\n return this.fitness;\n }",
"public int getMax(){ //find the max Score\n\t\tint max = Integer.MIN_VALUE;\n\t for(int i=0; i<scoreList.size(); i++){\n\t if(scoreList.get(i) > max){\n\t max = scoreList.get(i);\n\t }\n\t }\n\t return max;\n\t}",
"public int best(){\n List<Integer> points = count();\n Integer max = 0;\n for (Integer p: points){\n if (p <= 21 && max < p){\n max = p;\n }\n }\n return max;\n }",
"double getFitnessScore(){\n return fitnessScore;\n }",
"public int getFitness(){\n return fitness;\n }",
"public double getHighestConfidence() {\n\t\tdouble best = Double.MIN_VALUE;\n\n\t\tfor (ResultConfidencePairing rcp : m_results) {\n\t\t\tif (rcp.getConfidence() > best)\n\t\t\t\tbest = rcp.getConfidence();\n\t\t}\n\t\treturn best;\n\t}",
"protected float getFitness()\t\t\t{\treturn fitness;\t\t}",
"@Override\n public int higherScore() {\n if (!scoresUpToDate) {\n updateScores();\n }\n return higherScore;\n }",
"public double getFitness() {\n if (fitness == 0) {\n fitness = 1/(double)getDistance();\n }\n return fitness;\n }",
"public void countHighest (int score){\r\n\t\tif (score > highest){\r\n\t\t\thighest = score;\r\n\t\t}\r\n\t}",
"int getHighScore() {\n return getStat(highScore);\n }",
"public int getFitness(Graph_GA obj)\r\n\t{\r\n\t\tint fitness_score = 0;\r\n\t\tSet<DefaultEdge> edges= obj.graph_inp.edgeSet();\r\n Iterator<DefaultEdge> edges_list = edges.iterator();\r\n \r\n while(edges_list.hasNext())\r\n {\r\n \tDefaultEdge new_edge = edges_list.next();\r\n \tGA_Graph_Node source = obj.graph_inp.getEdgeSource(new_edge);\r\n \tGA_Graph_Node target = obj.graph_inp.getEdgeTarget(new_edge);\r\n \tif(chromosome[source.numID-1] == chromosome[target.numID-1])\r\n \t{\r\n \t\tfitness_score = fitness_score-1;\r\n \t}\r\n }\r\n\t\treturn fitness_score;\r\n\t}",
"public int getMax() {\r\n // get root\r\n RedBlackTree.Node<Grade> max = rbt.root;\r\n // loop to right of tree\r\n while (max.rightChild != null) {\r\n max = max.rightChild;\r\n }\r\n\r\n return max.data.getGrade();\r\n }",
"@Override\n public Score getBest() {\n Session session = FACTORY.openSession();\n\n try {\n List<Score> bestScores = session.createQuery(\"FROM Score s WHERE s.value = (SELECT max(s.value) FROM Score s)\", Score.class)\n .list();\n\n session.close();\n\n return bestScores.isEmpty() ? new Score(0L) : bestScores.get(0);\n } catch (ClassCastException e) {\n LOG.error(\"Error happened during casting query results.\");\n return null;\n }\n }",
"public int getBestGuy () {\r\n return poblac.getBestGuy();\r\n }",
"public int getFitness() {\n\t\treturn getEnergy() * -1;\n\t}",
"public HighScore getMaxScore(){\n HighScore hs;\n db = helper.getReadableDatabase();\n Cursor scoreCursor = db.query(SQLHelper.DB_TABLE_SCORES, SCORES_COLUMNS, null, null, null, null, SQLHelper.KEY_SCORE + \" DESC\", null);\n scoreCursor.moveToFirst();\n if(scoreCursor.getCount() == 0){\n hs = null;\n }\n else{\n hs = new HighScore(scoreCursor.getString(0), scoreCursor.getLong(1),\n scoreCursor.getLong(2), scoreCursor.getString(3), scoreCursor.getString(4));\n scoreCursor.moveToNext();\n if (scoreCursor != null && !scoreCursor.isClosed()) { // Close cursor\n scoreCursor.close();\n }\n }\n db.close();\n return hs; // Return max high score\n }",
"private static double getHighestScore (List<Double> inputScores) {\n\n\t\tCollections.sort(inputScores, Collections.reverseOrder());\n\n\t\treturn inputScores.get(0);\n\n\t}",
"public int getHighScore() {\n return highScore;\n }",
"public int getFitness(){\n\t\treturn getEnergy()*-1; \n\t}",
"protected int getHighestInnovation() {\n\t\treturn highest;\n\t}",
"public double fitness()\n/* */ {\n/* 40 */ return 1.0D / (1.0D + this.distance);\n/* */ }",
"float getFitnessScore(MapLocation l) {\n\t\ttry{\n\t\t\tif(rc.canSenseLocation(l) && !rc.onTheMap(l)) {\n\t\t\t\t//System.out.println(\"dead square\");\n\t\t\t\treturn -999999.0f;\n\t\t\t}\n\t\t} catch(Exception e){e.printStackTrace();}\n\t\t\n\t\tfloat fitness = 0.0f;\n\t\t\n\t\tfor(RobotInfo ri : allRobots) {\n\t\t\tfitness -= 1f/l.distanceSquaredTo(ri.location);\n\t\t}\n\t\tif(type.equals(RobotType.GARDENER)) {\n\t\t\tfor(TreeInfo ti : allTrees) {\n\t\t\t\tif(ti.team.equals(Team.NEUTRAL)) {\n\t\t\t\t\tfitness -= 1f/l.distanceSquaredTo(ti.location);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tfitness -= 10f/l.distanceSquaredTo(lastLocation);\n\t\t\n\t\treturn fitness;\n\t}",
"public int getMaximun(){\n int highGrade = grades[0]; //assumi que grades[0] é a maior nota\n //faz o loop pelo array de notas\n for(int grade: grades){\n //se a nota for maior que highGrade. atribui essa nota a highGrade\n if(grade > highGrade){\n highGrade = grade; //nota mais alta\n }\n }\n \n return highGrade;\n }",
"public Individual getWorst() {\n\t\treturn individuals[individuals.length-1];\n\t}",
"Float getScore();",
"double getMax();",
"double getMax();",
"@Override\n\tpublic double valuta_figli() {\n\t\treturn simple_fitness();\n\t}",
"public Building mostFitInPopulation(){\n\t\tCollections.sort(population);\n\t\treturn population.get(population.size() - 1);\n\t}",
"public int getBestValue() {\n return bestValue;\n }",
"float getScore();",
"float getScore();",
"public static Optional<Student> getStudentWithHighestGpa() {\n\t\treturn StudentDb.getAllStudents().stream()\n\t\t\t\t.collect(maxBy(Comparator.comparing(Student::getGpa)));\n\t}",
"Integer getMaximumResults();",
"public int getHighScore() {\n\t\treturn highscore;\n\t}",
"public void evaluate()\r\n {\r\n\tdouble max = ff.evaluate(chromos.get(0),generation());\r\n\tdouble min = max;\r\n\tdouble sum = 0;\r\n\tint max_i = 0;\r\n\tint min_i = 0;\r\n\r\n\tdouble temp = 0;\r\n\r\n\tfor(int i = 0; i < chromos.size(); i++)\r\n\t {\r\n\t\ttemp = ff.evaluate(chromos.get(i),generation());\r\n\t\tif(temp > max)\r\n\t\t {\r\n\t\t\tmax = temp;\r\n\t\t\tmax_i = i;\r\n\t\t }\r\n\r\n\t\tif(temp < min)\r\n\t\t {\r\n\t\t\tmin = temp;\r\n\t\t\tmin_i = i;\r\n\t\t }\r\n\t\tsum += temp;\r\n\t }\r\n\r\n\tbestFitness = max;\r\n\taverageFitness = sum/chromos.size();\r\n\tworstFitness = min;\r\n\tbestChromoIndex = max_i;;\r\n\tworstChromoIndex = min_i;\r\n\tbestChromo = chromos.get(max_i);\r\n\tworstChromo = chromos.get(min_i);\r\n\t\r\n\tevaluated = true;\r\n }",
"private <T> GeneticResult<T> maxFitness(List<Chromosome<T>> chromosomes, int totalBreedings){\n\t\tChromosome<T> bestFit = fittestChromosome(chromosomes);\n\t\treturn new GeneticResult<T>(bestFit, bestFit.getFitness(), totalBreedings);\n\t}",
"public int getHighestVariable() {\n\t\treturn HighestVariable;\n\t}",
"public int score() {\n ArrayList<Integer> scores = possibleScores();\n int maxUnder = Integer.MIN_VALUE;\n int minOver = Integer.MAX_VALUE;\n for (int score : scores) {\n if (score > 21 && score < minOver) {\n minOver = score;\n } else if (score <= 21 && score > maxUnder) {\n maxUnder = score;\n }\n }\n return maxUnder == Integer.MIN_VALUE ? minOver : maxUnder;\n }",
"int getScoreValue();",
"int max();",
"public double getBestSolutionEvaluation();",
"public int getHighscore()\n {\n return this.highscore;\n }",
"public String getHighscore() {\n String str = \"\";\n\t int max = 10;\n \n ArrayList<Score> scores;\n scores = getScores();\n \n int i = 0;\n int x = scores.size();\n if (x > max) {\n x = max;\n } \n while (i < x) {\n \t str += (i + 1) + \".\\t \" + scores.get(i).getNaam() + \"\\t\\t \" + scores.get(i).getScore() + \"\\n\";\n i++;\n }\n if(x == 0) str = \"No scores for \"+SlidePuzzleGUI.getRows()+\"x\"+SlidePuzzleGUI.getCols()+ \" puzzle!\";\n return str;\n }",
"int getScore();",
"public double getTopScore() {\n return topScore;\n }",
"long getScore();",
"long getScore();",
"long getScore();",
"long getScore();",
"private Double calculateTotalFitness() {\n double totalFitnessScore = 0;\n\n IgniteCache<Long, Chromosome> cache = ignite.cache(GAGridConstants.POPULATION_CACHE);\n\n SqlFieldsQuery sql = new SqlFieldsQuery(\"select SUM(FITNESSSCORE) from Chromosome\");\n\n // Iterate over the result set.\n try (QueryCursor<List<?>> cursor = cache.query(sql)) {\n for (List<?> row : cursor)\n totalFitnessScore = (Double)row.get(0);\n }\n\n return totalFitnessScore;\n }",
"public int saveMaxScore_PlantesFerryGame(int score) {\n\t\treturn saveMaxScore(score, PlantesFerryID);\n\t}",
"public int determineHighestVal() {\n if (playerCards[0].value > playerCards[1].value) {\n return playerCards[0].value;\n }\n return playerCards[1].value;\n\n }",
"private void getBest()\n\t{\n\t\tSystem.out.println();\n\t\tSystem.out.println();\n\t\tSystem.out.println(bestTour + \" \" + bestScore);\n\t}",
"E maxVal();",
"private double getUnadjustedFitness(Computer computer){\n double score = 0;\n score += 6 * getMatchPercent(computer);\n if(computer.compatible() && sizeCompatability(computer))\n score += 9.5;\n int ramAmount =computer.ramAmount();\n if(ramAmount < 8)\n score -= (8 - ramAmount) * 2;\n else if(ramAmount > 8 && ramAmount < 17)\n score += .06 * (ramAmount - 8);\n else if(ramAmount > 17)\n score += .03 * (ramAmount - 8);\n\n if(computer.cpu.name.contains(\"Intel\") && computer.cpu.name.endsWith(\"K\")){\n if (!computer.motherboard.overclock()){\n score -= 6;\n }\n }\n\n if(computer.cpu.name.contains(\"Intel\") && !(computer.cpu.shortname.contains(\"-5\") || computer.cpu.shortname.contains(\"-6\"))){\n score -= 2;\n }\n if(computer.cpu.name.contains(\"GeForce\") && !(computer.gpu.name.contains(\"GTX 9\") || computer.gpu.name.contains(\"GTX 1\"))){\n score -= 2;\n }\n if(computer.bootDrive.size < 240)\n score -= settings.diskSize * 0.33;\n if(computer.bootDrive.size > 700)\n score += settings.diskSize * 5;\n else\n score += settings.diskSize * computer.bootDrive.size / 140;\n if(computer.secondaryDrive != null)\n score += settings.diskSize * computer.secondaryDrive.size / 1000;\n\n //Now ensure there's enough power, and give a bonus for there being ~300 watts more than needed;\n //there are 4.5 points to gain in powersupply, 10 points to lose\n int basePower = computer.powerConsumption();\n int ideal = basePower + 65;\n if(computer.power.watts < basePower)\n score -= 10;\n else if(computer.power.watts < ideal)\n score += (basePower - computer.power.watts) / 100;\n else\n score += 2.5 - (computer.power.watts - basePower) / 250;\n score += (3 - computer.power.tier) * .6;\n\n // Now motherboard, one point to gain, one to lose\n score += 2 - computer.motherboard.getQuality();\n\n double driveScore = ((computer.bootDrive.reads + computer.bootDrive.writes) / 2) / 88;\n driveScore -= 2;\n if(driveScore > 7.5){\n driveScore = 7.5;\n }\n score += driveScore;\n double rawCpu = ((1 - settings.multicore) / 3) * computer.cpu.singlecore + ((settings.multicore / 3) * (computer.cpu.multicore));\n double adjustedCpu = 26 + 40* ((settings.cpuIntensity / (settings.cpuIntensity + settings.gpuIntensity))* rawCpu - lowCpuScore()) / (maxCpuScore() - lowCpuScore());\n double rawGpu = computer.gpu.fps + (computer.gpu.threedmark / 100);\n double adjustedGpu = 17 + 40 * ((settings.gpuIntensity / (settings.cpuIntensity + settings.gpuIntensity)) * rawGpu - lowGpuScore()) / (maxGpuScore() - lowGpuScore());\n //Inflate the GPU score slightly\n // adjustedGpu * ((35 - adjustedGpu) / 35);\n score += adjustedGpu;\n score += adjustedCpu;\n\n return score;\n }",
"public double getHighestReward() {\n if (this.highestReward == -1.0) {\n double tempHighestReward = -1.0;\n for (B bidder : this.bidders) {\n if (bidder.getReward() > tempHighestReward) {\n tempHighestReward = bidder.getReward();\n }\n }\n this.highestReward = tempHighestReward;\n }\n return this.highestReward;\n }",
"private static int max_value(State curr_state) {\n\t\tcounterMinimax++; \r\n\r\n\r\n\t\t//Check if the current state is a terminal state, if it is, return\r\n\t\t//its terminal value\r\n\t\tif(curr_state.isTerminal()){\r\n\t\t\treturn curr_state.getScore();\r\n\t\t}\r\n\r\n\t\tint max_value = Integer.MIN_VALUE;\r\n\t\tState[] successors = curr_state.getSuccessors('1');\r\n\r\n\t\tif(successors.length == 0 && curr_state.isTerminal() == false){\r\n\t\t\tmax_value = Math.max(max_value, min_value(curr_state));\r\n\t\t}\r\n\t\t//\t\telse if(successors.length != 0 && curr_state.isTerminal() == false){\r\n\r\n\t\t//Get the successors of the current state, as dark always runs first\r\n\t\t//it will call maxValue;\r\n\r\n\r\n\t\t//Select the successor that returns the biggest value\r\n\t\tfor(State state : successors){\r\n\t\t\tmax_value = Math.max(max_value, min_value(state));\r\n\t\t}\t\r\n\t\t//\t\t}\r\n\t\treturn max_value;\r\n\t}",
"void setFitnessScore(double score){\n fitnessScore = score;\n }",
"public T findHighest(){\n T highest = array[0];\n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()>highest.doubleValue())\n {\n highest = array[i];\n } \n }\n return highest;\n }",
"int getMaximum();",
"int score();",
"int score();",
"public int getMaxTotalCost();",
"public Individual getBest() {\n\t\treturn individuals[0];\n\t}",
"public float getBestScore(GameModel startingState) {\n\n float bestScore = 0;\n for (int i = 0; i < NUM_SIMULATIONS; i++) {\n bestScore = max(bestScore, simulateAndGetScore(GameModel.copyOf(startingState)));\n }\n\n return bestScore;\n }",
"public int getScore() {\n return getStat(score);\n }",
"public int bestRank() {\n\t\treturn this.decade(this.indexOfBestDecade());\n\t}",
"public int robBest(TreeNode root) {\n\t\treturn maxMoney(root)[1];\n\t}",
"Object getWorst();",
"public double getMaxRating() {\n return max;\n }",
"public int bestSubmissionScore(String name) {\n // checks if student exists - stores index in student list if exists\n int exists = this.studentExists(name);\n\n // return -1 if student does not exist\n if (this.studentExists(name) == -1) {\n return -1;\n } else {\n // student exists, so return highest score\n return (studentList.get(exists)).getBestScore();\n }\n }",
"public int saveMaxScore_GreenacresGame(int score) {\n\t\treturn saveMaxScore(score, GreenacresID);\n\t}",
"public static rk getBestSolutionMax(ArrayList<rk> Sched) {\n\n rk best = Sched.get(0).copyOf();\n for (int i = 1; i < Sched.size(); i++) {\n rk S = Sched.get(i).copyOf();\n if (S.getFitness() > best.getFitness()) {\n\n best = S;\n }\n }\n return best;\n }",
"public int findMax(){\n return nilaiMaks(this.root);\n }",
"Float getAutoScore();",
"public int getScore()\n {\n int score;\n if (this.isFinal())\n score = 1;\n else\n score = 0;\n return score;\n }",
"int getMax();",
"public double getScore() {\n return score - penalty;\n }",
"public E findMax() {\r\n\t\treturn heap.get(0);\r\n\t}",
"@Override\n public int finalScore() {\n if (isBust()) {\n return 0;\n }\n if (isBlackjack()) {\n return 22;\n }\n return higherScore();\n }",
"private static int maximum() {\n\t\tint popSize = 0;\n\t\tChromosome thisChromo = null;\n\t\tChromosome thatChromo = null;\n\t\tint winner = 0;\n\t\tboolean foundNewWinner = false;\n\t\tboolean done = false;\n\n\t\twhile (!done) {\n\t\t\tfoundNewWinner = false;\n\t\t\tpopSize = population.size();\n\t\t\tfor (int i = 0; i < popSize; i++) {\n\t\t\t\tif (i != winner) { // Avoid self-comparison.\n\t\t\t\t\tthisChromo = population.get(i);\n\t\t\t\t\tthatChromo = population.get(winner);\n\t\t\t\t\tif (thisChromo.conflicts() > thatChromo.conflicts()) {\n\t\t\t\t\t\twinner = i;\n\t\t\t\t\t\tfoundNewWinner = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (foundNewWinner == false) {\n\t\t\t\tdone = true;\n\t\t\t}\n\t\t}\n\t\treturn winner;\n\t}"
] |
[
"0.7745151",
"0.772958",
"0.77217704",
"0.74953836",
"0.7490183",
"0.74297506",
"0.73877704",
"0.73828405",
"0.7371105",
"0.73243135",
"0.7312658",
"0.7269876",
"0.72273207",
"0.72211313",
"0.71054846",
"0.7063551",
"0.70618725",
"0.70194584",
"0.7016894",
"0.68865085",
"0.68802166",
"0.68546116",
"0.68380654",
"0.68344426",
"0.68339205",
"0.68188787",
"0.6817657",
"0.68165",
"0.6771388",
"0.6756785",
"0.6723966",
"0.67221284",
"0.6713932",
"0.66942894",
"0.66921735",
"0.6680879",
"0.6649177",
"0.66460603",
"0.6632867",
"0.6622133",
"0.66138095",
"0.6577935",
"0.6576795",
"0.65763146",
"0.65763146",
"0.65747315",
"0.65668",
"0.65654236",
"0.654657",
"0.654657",
"0.65389913",
"0.65386075",
"0.65216",
"0.65214133",
"0.6503077",
"0.6499235",
"0.649592",
"0.6493965",
"0.6470829",
"0.64694136",
"0.6457745",
"0.645598",
"0.6445693",
"0.64250207",
"0.64244884",
"0.64244884",
"0.64244884",
"0.64244884",
"0.6421377",
"0.64118063",
"0.6399626",
"0.63955903",
"0.6376584",
"0.6373568",
"0.6369931",
"0.6361633",
"0.6360414",
"0.63602275",
"0.63533705",
"0.63463306",
"0.63463306",
"0.63370305",
"0.6332908",
"0.63190067",
"0.6312784",
"0.6309691",
"0.6309357",
"0.63088566",
"0.6288396",
"0.62808096",
"0.6278923",
"0.6278563",
"0.62647766",
"0.6263269",
"0.62586236",
"0.6253589",
"0.62497175",
"0.6245947",
"0.6245547",
"0.6240929"
] |
0.8445418
|
0
|
Called when "CANCEL" TextView is clicked
|
public void onCancelClicked(View v) {
goBackToStart();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void onCancelClicked();",
"public void marksCancel(View view) {\n }",
"public void clickedCancel(View view) {\n \treturnResult(Activity.RESULT_CANCELED);\n }",
"public void onCancelClick()\r\n {\r\n\r\n }",
"@Override\n public void onClick(View v) {\n buttonCancelClicked();\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmListener.onCancelPressed();\r\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}",
"@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t}",
"@Override\n public void onClick(View v) {\n cancel(v);\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tClickCancel();\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tcancelar();\n\t\t\t}",
"public void onClick(View v) {\n cancel();\n }",
"public void onCancelClicked() {\n close();\n }",
"void onCancelButtonPressed();",
"public void onCancelClicked(View view) {\n //ends activity\n finish();\n }",
"public void onClickCancel(View view) {\n this.finish();\n }",
"public void cancelButtonPressed(View view) {\r\n\t\tthis.finish();\r\n\t}",
"public void cancelButtonClicked(View view){\n setResult(RESULT_CANCELED, null);\n finish();\n }",
"public void onCancelPressed(View view) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n dialog.cancel();\n }",
"@Override\n public void onClick(View v) {\n\n dialog.cancel();\n }",
"@Override\n public void onClick(View v) {\n\n dialog.cancel();\n }",
"public void Cancel(View v)\n\t{\n\t\tfinish();\n\t}",
"@Override\n public void onClick(View v)\n {\n begindialog.cancel();\n }",
"@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(\r\n\t\t\t\t\t\t\t\t\t\t\t\tDialogInterface dialog,\r\n\t\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\t\t\tdialog.cancel();\r\n\t\t\t\t\t\t\t\t\t\t}",
"public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), \"Pressed Cancel\",\n Toast.LENGTH_SHORT).show();\n }",
"public void onClick(View v) {\n\t\t\t\tdialog.cancel();\r\n\t\t\t}",
"public void onCancelPressed(View v) {\n finish();\n }",
"public void cancel (View view) {\n this.onBackPressed();\n }",
"public void onBtnCancelClick(final View view) {\n\t\tsetResult(RESULT_CANCELED, new Intent());\n\t\tfinish();\n\t}",
"@Override\n public void onClick(DialogInterface dialog,\n int which)\n {\n dialog.cancel();\n }",
"@Override\r\n\t \t\t\tpublic void onClick(View v) {\n\t \t\t\t\tdialogDetailConfirm.cancel();\r\n\t \t\t\t}",
"@Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.cancel();\n }",
"void onCancel(int key);",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which)\n\t\t\t{\n\t\t\t\tdialog.cancel();\n\t\t\t}",
"@Override\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t}",
"public void onCancelClicked(View view) {\n\n if(mEditMode){\n //remove the item from database\n getContentResolver().delete(SavingsContentProvider.CONTENT_URI, SavingsItemEntry._ID + \"=\" + mSavingsBean.getId(), null);\n Log.d(Constants.LOG_TAG, \"Edit Mode, delete existing savings item:\");\n Log.d(Constants.LOG_TAG, mSavingsBean.toString());\n //Go back to Dashboard\n Utils.gotoDashBoard(this);\n finish();\n }else{\n finish();\n }\n }",
"public void onCancel(View view) {\n finish();\n }",
"@Override\n public void onClick(DialogInterface dialog,\n int which)\n {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"public void cancel(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n cancel(name, vehicle, Uname, points);\n }",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t}",
"@Override\n public void onClick(DialogInterface dialog, int which)\n {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}",
"@Override\n public void OnCancelButtonPressed() {\n }",
"@Override\n public void OnCancelButtonPressed() {\n }",
"@Override\n\tpublic void onCancel(DialogInterface arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onClick(View v) {\n\t\tif (v == cancel) {\n\t\t\tdialogListner.cancel(position);\n\t\t}\n\t\tif (v == confirm) {\n\t\t\tdialogListner.confirm(position);\n\t\t}\n\n\t}",
"public void onCancelButtonClick() {\n close();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\r\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\r\n\r\n }",
"@Override\n public void onCancel(DialogInterface arg0) {\n\n }",
"@Override\n public void onClick(View v) {\n aManager.cancel(pIntent);\n Toast.makeText(getApplicationContext(), \"Cancel\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onClick(DialogInterface dialog, int arg1) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n }",
"void btnCancel();",
"public void onClick(DialogInterface dialog, int which) {\n\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int which) {\n\n dialog.cancel();\n }",
"@Override\n public void onCancel(DialogInterface dialog) {\n cancel(true);\n }",
"public void onClick(DialogInterface dialog,\n int which) {\n dialog.cancel();\n }",
"public void cancel(Button.ClickEvent event) {\n Notification.show(\"Cancelled\", Notification.Type.TRAY_NOTIFICATION);\n view.getContactList().select(null);\n }",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t\ttoastMessage(\"Confirmation cancelled\");\n\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.cancel();\r\n\t\t\t\t\t}",
"public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"void cancelButton_actionPerformed(ActionEvent e) {\n setUserAction(CANCELLED);\n setVisible(false);\n }",
"public void cancel(View view) {\n\t\tfinish();\n\t}",
"public void onClick(DialogInterface dialog, int which) {\n\n dialog.cancel();\n }",
"@Override\n \t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n \t\t\t\t\t\t\t\t\tint which) {\n \t\t\t\t\t\t\t\tNoteEditView.this.deleteClock();\n \t\t\t\t\t\t\t}",
"public void onCancel(DialogInterface arg0) {\n mRemovePosition = -1;\n mRemoveConfirmDialog = null;\n }",
"@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\ttalkDialog.cancel();\r\n\t\t\t\t}",
"@Override\n public void onClick(View v)\n {\n int which = v.getId();\n \n if (which == R.id.burn)\n {\n \n }\n else if (which == R.id.cancel)\n {\n cancel();\n }\n }",
"public void onCancel() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttext.setText(cancel.getText());\n\t\t\t}",
"public void onClick(DialogInterface dialog, int which) {\n\t\t\t dialog.cancel();\n\t\t\t }",
"@Override\n public void onClick(View v) {\n if (null != mCallBack) {\n mCallBack.onCancelClicked();\n }\n }",
"public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\n\t\t}",
"@Override\n\t\t\tpublic void onCancel(DialogInterface arg0) {\n\t\t\t\tdialog.findViewById(R.id.ast_back_icon).callOnClick();\n\t\t\t}",
"@Override\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onCancel();",
"public void onCancel() {\r\n parentController.switchView();\r\n }",
"@Override\r\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\r\n\t\t\t\t\t}",
"public void onClick(DialogInterface dialog,\r\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tdialog.cancel();\r\n\t\t\t\t\t\t\t\t}",
"public void onClick( View arg0 )\n\t{\n\t\tfinal int iTag = (Integer)arg0.getTag();\n\t\tswitch( iTag )\n\t\t{\n\t\tcase BUTTONTAG_CANCEL:\n\t\t\t// End activity\n\t\t\tfinish();\n\t\t\tbreak;\n\t\t}\n\t}",
"@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\n\t\t\t\tButton cancelbutton = (Button) findViewById(R.id.calc_clear_txt_Prise);\n\t\t\t\tcancelbutton.setVisibility(0);\n\t\t\t\treturn false;\n\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t}",
"public void cancelEntry(View view)\n {\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }",
"@Override\n\tpublic void onClick(View v) {\n\t\ttextView.setText(\"\");\n\t\tiatDialog.show();\n\t\t\n\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}"
] |
[
"0.77257025",
"0.74787694",
"0.7464892",
"0.7442671",
"0.73714185",
"0.7369516",
"0.7347374",
"0.7340034",
"0.7292851",
"0.7245623",
"0.7178994",
"0.7134079",
"0.71260166",
"0.7125511",
"0.7099085",
"0.708023",
"0.7047394",
"0.7042151",
"0.703564",
"0.70090526",
"0.70090526",
"0.6976352",
"0.6972823",
"0.6949676",
"0.6947266",
"0.6895766",
"0.6880772",
"0.6847315",
"0.6842975",
"0.684075",
"0.6823594",
"0.6819644",
"0.6818473",
"0.67972636",
"0.67941755",
"0.6773218",
"0.6768506",
"0.6764074",
"0.6762761",
"0.67604655",
"0.6758035",
"0.67522633",
"0.67522633",
"0.6742644",
"0.6741267",
"0.6740212",
"0.6739069",
"0.6739069",
"0.6739069",
"0.6726804",
"0.6713721",
"0.67136204",
"0.6711733",
"0.6709442",
"0.67072713",
"0.67072713",
"0.67072713",
"0.67072713",
"0.67072713",
"0.6706461",
"0.6702355",
"0.6691159",
"0.6691152",
"0.6684595",
"0.66828454",
"0.66828454",
"0.6672618",
"0.6671864",
"0.66707885",
"0.66705287",
"0.6658228",
"0.66534305",
"0.66329324",
"0.6620628",
"0.6620453",
"0.661877",
"0.6616911",
"0.6614533",
"0.6607045",
"0.6593755",
"0.65932864",
"0.6587275",
"0.65837425",
"0.6559748",
"0.6559748",
"0.6547514",
"0.65461963",
"0.6537399",
"0.65266275",
"0.652292",
"0.65127873",
"0.65107226",
"0.6508636",
"0.6495888",
"0.64936584",
"0.6491693",
"0.64892143",
"0.6486647",
"0.6486647"
] |
0.71870613
|
10
|
Called when "NEXT" TextView is clicked
|
public void onNextClicked(View v) {
// TODO: format phone number
final String email = etEmail.getText().toString();
final String mobile = etMobile.getText().toString();
final String password = etPassword.getText().toString();
if (email.isEmpty() || mobile.isEmpty() || password.isEmpty()) {
Toast.makeText(this, "Please complete the form", Toast.LENGTH_SHORT).show();
return;
}
if (password.length() < 5) {
Toast.makeText(this, "Password must have at least 5 characters", Toast.LENGTH_SHORT).show();
return;
}
if (!DeviceUtil.hasConnection(this)) {
Toast.makeText(this, "No Internet connection", Toast.LENGTH_SHORT).show();
return;
}
final IdentityVerifier identityVerifier = new IdentityVerifier(this, new IdentityVerifier.ResultCallback() {
@Override
public void handleResult(int result) {
if (result == IdentityVerifier.RESULT_PASS) {
clearError();
goToCreateProfile(email, mobile, password);
} else {
showError(result);
}
}
@Override
public void handleFault(ParseException fault) {
if (fault != null) {
Logger.e(TAG, fault.getMessage());
Toast.makeText(RegisterActivity.this, fault.getMessage(), Toast.LENGTH_SHORT).show();
}
}
});
identityVerifier.verify(email, mobile);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tgoNext();\r\n\t\t\t\t}",
"@Override\n public void onNextPressed() {\n }",
"public void nextBtnClicked(View v) {\r\n//\t\tshowMsg(\"Next Button clicked: \"+ v);\r\n\t\tresetSelection();\r\n\t\tnextQuestion(1);\r\n\t\tshowQuesAndAnswers();\r\n\t}",
"public void Next(View view)\n {\n increaseNum();\n }",
"public void nextButtonClicked()\r\n {\n manager = sond.getManager();\r\n String insertSearchDelete = sond.getInsertSearchDelete();\r\n AnimatorThread animThread = model.getThread();\r\n\r\n // falls der Thread pausiert ist, wird er beim betätigen des\r\n // next-Buttons aufgeweckt\r\n if (button.getPlay() && animThread != null && animThread.isAlive())\r\n {\r\n if (!animThread.getWait())\r\n {\r\n animThread.interrupt();\r\n }\r\n else\r\n {\r\n animThread.wake();\r\n }\r\n }\r\n // Redo muss vor den weiteren if Anweisungen stehen, damit erst alle\r\n // Redo ausgeführt werden, bevor neue Aktionen dem manager hinzugefuegt\r\n // werden\r\n else if (manager.canRedo())\r\n {\r\n manager.redo();\r\n }\r\n else if (!sond.getArrayPosition() && insertSearchDelete.equals(\"insert\"))\r\n {\r\n sond.nextInsertPosition();\r\n UndoRedoSetAnimation command = new UndoRedoSetAnimation(sond);\r\n manager.addEdit(command);\r\n }\r\n else if (!sond.getArrayPosition() && insertSearchDelete.equals(\"search\"))\r\n {\r\n sond.nextSearchPosition();\r\n UndoRedoSetAnimation command = new UndoRedoSetAnimation(sond);\r\n manager.addEdit(command);\r\n }\r\n else if (!sond.getArrayPosition() && insertSearchDelete.equals(\"delete\"))\r\n {\r\n sond.nextSearchPosition();\r\n UndoRedoSetAnimation command = new UndoRedoSetAnimation(sond);\r\n manager.addEdit(command);\r\n }\r\n }",
"private void nextQuestion() {\n mCurrentIndex = (mCurrentIndex + 1) % questions.length;\n int question = questions[mCurrentIndex].getTextResId();\n mText.setText(question);\n }",
"public void goToNextPage() {\n nextPageButton.click();\n }",
"public void nextQuestion(View view) {\n Button button = (Button) findViewById(R.id.question_button_previous);\n if (!button.isEnabled()){\n button.setEnabled(true);\n }\n saveProgress();\n sequence++;\n updateView();\n }",
"@OnClick\n public void onNext() {\n KeyboardUtils.dismissSoftKeyboard(getView());\n this.nextButton.setState(AirButton.State.Loading);\n RegistrationAnalytics.trackClickEvent(RegistrationAnalytics.NEXT_BUTTON, \"phone\", getNavigationTrackingTag());\n AccountCreationRequest.forValidatingPhone(this.airPhone.formattedPhone()).withListener((Observer) this.phoneNumberExistValidationRequestListener).execute(this.requestManager);\n }",
"public void ClickNext() {\r\n\t\tnext.click();\r\n\t\t\tLog(\"Clicked the \\\"Next\\\" button on the Birthdays page\");\r\n\t}",
"void onNextIconClick();",
"@Override\r\n\tpublic void showNext(){\r\n\t\tint currentNotification = this.getDisplayedChild();\r\n\t\tif(currentNotification < this.getChildCount() - 1){\r\n\t\t\tsetInAnimation(inFromRightAnimation());\r\n\t\t\tsetOutAnimation(outToLeftAnimation());\r\n\t\t\t//Update the navigation information on the next view before we switch to it.\r\n\t\t\tfinal View nextView = this.getChildAt(currentNotification + 1);\r\n\t\t\tupdateView(nextView, currentNotification + 1, 0);\r\n\t\t\t//Flip to next View.\r\n\t\t\tsuper.showNext();\r\n\t\t}\r\n\t}",
"@OnClick\n public void onClickNext() {\n alipayPhoneLogging();\n String phoneNumber = this.airPhone.phoneInputText();\n String countryCode = this.phoneNumberInput.getCountryCode();\n getAlipayActivity().setPhoneNumber(phoneNumber);\n CreatePaymentInstrumentRequest.forAlipay(new Builder().alipayLoginId(getAlipayActivity().getAlipayId()).mobilePhoneNumber(phoneNumber).mobilePhoneCountry(countryCode).build()).withListener((Observer) this.requestListener).execute(this.requestManager);\n this.nextButton.setState(AirButton.State.Loading);\n }",
"private void buttonNext (){\n Intent nextActivity = new Intent(Question_One.this, Question_two.class);\n nextActivity.putExtra(EXTRA_TEXT,scoreCounter);\n startActivity(nextActivity);\n }",
"private void goToNextActivity() {\n startActivity(new Intent(this,NextActivity.class));\n }",
"public void toNext(View view) {\n Intent intent = new Intent(this, BonusSpinner.class);\n intent.putExtra(\"player\", player);\n startActivity(intent);\n finish();\n }",
"@OnClick(R.id.nextButton)\n public void onNext(View view){\n Intent intent = new Intent(getApplicationContext(), SettingActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n finish();\n database.close();\n }",
"public void goOnToNextQuestion(){\n\t\tbtnConfirmOrNext.setText(\"Next Question\");\n\t\tenableAllButtons();// need to be able to click to proceed\n\t\tquizAccuracy.setText(\": \"+spellList.getLvlAccuracy()+\"%\");\n\t\t// if user got answer correct move on immediately, else let user look at the correct answer first\n\t\tif(correctFlag){\n\t\t\t// set it to false initially for the next question\n\t\t\tcorrectFlag = false;\n\t\t\tbtnConfirmOrNext.doClick();\n\t\t}\n\n\t}",
"public void clickNextButton() {\n if (editSummaryFragment.isActive()) {\n //we're showing the custom edit summary window, so close it and\n //apply the provided summary.\n editSummaryFragment.hide();\n editPreviewFragment.setCustomSummary(editSummaryFragment.getSummary());\n } else if (editPreviewFragment.isActive()) {\n //we're showing the Preview window, which means that the next step is to save it!\n if (abusefilterEditResult != null) {\n //if the user was already shown an AbuseFilter warning, and they're ignoring it:\n funnel.logAbuseFilterWarningIgnore(abusefilterEditResult.getCode());\n }\n getEditTokenThenSave(false);\n funnel.logSaveAttempt();\n } else {\n //we must be showing the editing window, so show the Preview.\n hideSoftKeyboard(this);\n editPreviewFragment.showPreview(title, sectionText.getText().toString());\n funnel.logPreview();\n }\n }",
"public void clickNext(View view) {\n Intent viewResultsActivityIntent = new Intent(this, ViewResultsActivity.class);\n Spinner select_transport = findViewById(R.id.select_transport);\n ElectricTransport selectedElectricTransport = (ElectricTransport) select_transport.getSelectedItem();\n // Send time, distance, and selected transport to next intent\n viewResultsActivityIntent.putExtra(DISTANCE, this.distance);\n viewResultsActivityIntent.putExtra(TIME, this.time);\n viewResultsActivityIntent.putExtra(SELECTED_TRANSPORT, selectedElectricTransport);\n viewResultsActivityIntent.putExtra(RESULTS_DESCRIPTION, this.results_description);\n\n startActivity(viewResultsActivityIntent); // Go to next screen\n }",
"public void onNextPress() {\n try {\n timer(ctx,true,ConstantTestIDs.EAR_PHONE_ID,null);\n MainActivity activity = (MainActivity) getActivity();\n if (Constants.isSkipButton) {\n try{\n testController.unRegisterEarJack();\n\n }\n catch (Exception e){\n e.printStackTrace();\n }\n isTestPerformed=true;\n mImgViewEarPhone.setImageDrawable(getResources().getDrawable(R.drawable.ic_earphone_green_svg_168),false,getActivity());\n utils.showToast(ctx, getResources().getString(R.string.txtManualFail));\n\n }\n boolean semi=true;\n nextPress(activity,semi);\n\n } catch (Exception e) {\n logException(e, \"EarJackManualFragment_onNextPress()\");\n }\n\n }",
"@Override\r\n\t\tpublic void onClick(View v) {\n\t\t\tif(v==Bn_Pre){\r\n\t\t\t\tIntent intent = new Intent(NextActivity.this, MainActivity.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t}else if(v==Bn_Next){\r\n\t\t\t\tIntent intent = new Intent(NextActivity.this, Next2Activity.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t}\r\n\t\t}",
"public void showNext()\n {\n String nexts = beanitems.get(position+1).getAddtime();\n\n String time = nexts.substring(0,10);\n\n switcher.setText(time);\n\n\n }",
"public void onClick(View view) {\n\t\t\t\tmButton1.setBackgroundDrawable(mButtonDrawable1);\n\t\t\t\tmButton2.setBackgroundDrawable(mButtonDrawable2);\n\t\t\t\tmButton3.setBackgroundDrawable(mButtonDrawable3);\n\n\t\t\t\tString rightResult = getString(mRightResult.get(mRandomIndex));\n\t\t\t\tLog.d(TAG, \"next button onClick start, mRandomIndex =\" + mRandomIndex + \"; rightResult is \" + rightResult + \",mFinalResult is \" + mFinalResult + \"; mRightResultCount =\" + mRightResultCount);\n\t\t\t\tif (mFinalResult == null) {\n\t\t\t\t\tmTimer.stop();\n\t\t\t\t\tshowErrorDialog();\n\t\t\t\t\treturn;\n\t\t\t\t} else if (mFinalResult != null && mFinalResult.equals(rightResult)) {\n\t\t\t\t\tmFinalResult = null;\n\t\t\t\t\tmRightResultCount++;\n\t\t\t\t} else {\n\t\t\t\t\tmFinalResult = null;\n\t\t\t\t}\n\t\t\t\trefreshScreen();\n\t\t\t\tLog.d(TAG, \"next button onClick end, mRandomIndex =\" + mRandomIndex + \"; rightResult is \" + rightResult + \",mFinalResult is \" + mFinalResult + \"; mRightResultCount =\" + mRightResultCount);\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = PROPER;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}",
"public void nextClick(View view) {\n i=i+1;\n if(i<questions.size()){\n tvQuestion.setText(questions.get(i));\n trash.setText(emptyString);\n chest.setText(emptyString);\n tvQuestion.setVisibility(View.VISIBLE);\n nxtButton.setClickable(false);\n nxtButton.setBackground(getResources().getDrawable(R.drawable.info_hub_button_grayed));\n chest.setBackground(getResources().getDrawable(R.drawable.chest));\n trash.setBackground(getResources().getDrawable(R.drawable.trash));\n }\n else{\n final Dialog alertDialog = new Dialog(MythFactGame.this,android.R.style.Theme_DeviceDefault_Dialog_NoActionBar);\n alertDialog.setContentView(R.layout.game_over_dialog);\n alertDialog.setCancelable(false);\n\n // Setting Dialog Title\n alertDialog.setTitle(\"Game Over!!\");\n Button ok=(Button)alertDialog.findViewById(R.id.gameOverDialogButtonOK);\n ok.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n MythFactGame.this.finish();\n }\n });\n\n addGameScoreToMainScore();\n // Showing Alert Message\n alertDialog.show();\n }\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\r\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = USER;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}",
"public void onClick(View v) {\n if (iNext == count) {\n iNext = count-1;\n }\n if (pCheck) {\n iNext--;\n }\n if (iNext > 0) {\n iNext--;\n dataSource = data.get(iNext);\n ExammodeAdapter adapter = new ExammodeAdapter(context, dataSource,iNext,device,frag,resData);\n list.setAdapter(adapter);\n next.setEnabled(true);\n next.setText(\"Next\");\n nCheck =true;\n pCheck = false;\n\n }\n if (iNext == 0){\n priv.setEnabled(false);\n iNext = 0;\n nCheck =false;\n\n }\n\n\n }",
"public void onNextButtonPressed(View v) {\n ParticipantDetailsDataAdapter.ViewHolder partViewHolder;\n CrtPollForm3Data form3Data = new CrtPollForm3Data();\n if (mListener != null) {\n for (int i = 0 ; i < mRecyclerView.getAdapter().getItemCount();i++)\n {\n RecyclerView.ViewHolder viewHolder = mRecyclerView.findViewHolderForAdapterPosition(i);\n if (viewHolder != null && viewHolder instanceof ParticipantDetailsDataAdapter.ViewHolder){\n partViewHolder = (ParticipantDetailsDataAdapter.ViewHolder) viewHolder;\n }\n }\n mListener.onFragmentInteractionForm3(form3Data);\n }\n }",
"public void nextQuestion() {\n if (currentq<questionbank.size()-1)\n {\n currentq++;\n }\n else\n {\n currentq=0;\n finished=true;\n\n Intent i = new Intent(MainActivity.this, ScorecardActivity.class);\n //Intent(coming from, where to go)\n i.putExtra(EXTRAMESSAGE1, Integer.toString(score));\n startActivity(i);\n\n }\n question.setText(questionbank.get(currentq).getQuestionText());\n\n\n }",
"private void next() {\n Timeline currentTimeline = simpleExoPlayerView.getPlayer().getCurrentTimeline();\n if (currentTimeline.isEmpty()) {\n return;\n }\n int currentWindowIndex = simpleExoPlayerView.getPlayer().getCurrentWindowIndex();\n if (currentWindowIndex < currentTimeline.getWindowCount() - 1) {\n player.seekTo(currentWindowIndex + 1, C.TIME_UNSET);\n } else if (currentTimeline.getWindow(currentWindowIndex, new Timeline.Window(), false).isDynamic) {\n player.seekTo(currentWindowIndex, C.TIME_UNSET);\n }\n }",
"@Override\n public void onClick(View view) {\n mOnCurrentStepViewListener.nextButtonClickListener();\n\n // Set current node as completed node\n StepperRecycleView.StepperViewHolder currentNodeViewHolder =\n mStepperRecycleView.getView(mCurrentActivePosition);\n Step currentNodeData = mStepperRecycleView.getData(mCurrentActivePosition);\n\n setAsCompletedNode(currentNodeViewHolder, currentNodeData.getShortDescription());\n\n // Set new node.\n mCurrentActivePosition++;\n\n StepperRecycleView.StepperViewHolder stepperViewHolder =\n mStepperRecycleView.getView(mCurrentActivePosition);\n // bindView method is called by this listener and original adapter\n // so\n if (stepperViewHolder != null) {\n Step nodeData = mStepperRecycleView.getData(mCurrentActivePosition);\n\n bindView(stepperViewHolder, nodeData, mCurrentActivePosition);\n }\n }",
"private void callNextQuestion() {\n questionProgress++;\n\n if (questionProgress <= 10) {\n\n if (Utils.isKitkat()) {\n ContinuousSlide slide = new ContinuousSlide(Gravity.RIGHT);\n TransitionManager.beginDelayedTransition(llBody, slide);\n }\n\n btNext.setVisibility(View.GONE);\n currentQuestion = getQuestionById(questionProgress);\n ivScene.setVisibility(View.GONE);\n tvQuestion.setVisibility(View.GONE);\n\n if (tvResult != null) {\n flSceneFrame.removeView(tvResult);\n }\n ivScene.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {\n @Override\n public void onGlobalLayout() {\n ivScene.getViewTreeObserver().removeOnGlobalLayoutListener(this);\n resizeSceneArea();\n for (int i = 0; i < 4; i++) {\n positionAnswer(answerButtonList.get(i), currentQuestion.getAnswers().get(i));\n waitAnimations();\n }\n }\n });\n } else {\n questionProgress = 10;\n Intent intent = new Intent(this, ResultActivity_.class);\n startActivity(intent);\n }\n }",
"@Override\n public void onClick(View v) {\n tabChangeInterface.switchToTheNextTab();\n }",
"private void btnNext_click(ActionEvent e) {\n\t\tString stuAnswer = \"\";\r\n\t\tif (rdoItemA.isSelected()) {\r\n\t\t\tstuAnswer = \"A\";\r\n\t\t}\r\n\t\tif (rdoItemB.isSelected()) {\r\n\t\t\tstuAnswer = \"B\";\r\n\t\t}\r\n\t\tif (rdoItemC != null) {\r\n\t\t\tif (rdoItemC.isSelected()) {\r\n\t\t\t\tstuAnswer = \"C\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (rdoItemD != null) {\r\n\t\t\tif (rdoItemD.isSelected()) {\r\n\t\t\t\tstuAnswer = \"D\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!stuAnswer.isEmpty()) {\r\n\t\t\tExamItem bean = eiList.get(questionNO - 1);\r\n\r\n\t\t\tif (bean.getStuAnswer() == null || !bean.getStuAnswer().equalsIgnoreCase(stuAnswer)) {\r\n\t\t\t\tbean.setStuAnswer(stuAnswer);\r\n\t\t\t\tif (bean.getStdAnswer().equalsIgnoreCase(stuAnswer)) {\r\n\t\t\t\t\tbean.setMarkResult(1l);\r\n\t\t\t\t\tbean.setGainScore(bean.getStdScore());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbean.setMarkResult(0l);\r\n\t\t\t\t\tbean.setGainScore(0l);\r\n\t\t\t\t}\r\n\t\t\t\texamItemService.update(bean);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (questionNO == questionNum) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"这是最后一题。\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tquestionNO++;\r\n\t\tinitData();\r\n\t}",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n Button nextPage = (Button) findViewById(R.id.button_id);\n System.out.println(\"THE RESULT CODE IS = \" + resultCode);\n if (resultCode==7 | resultCode==0) {\n nextPage.setVisibility(View.VISIBLE);\n }\n else {\n nextPage.setVisibility(View.GONE);\n callbackManager.onActivityResult(requestCode, resultCode, data);\n }\n }",
"void OnNextButtonClicked(String buttonClicked,StoriesClass currentStor);",
"public void nextRecord( View v)\n {\n \t//\tClear out the display first\n \tclearBtn( v );\n \t//\tGo get the sheep id of this record\n \tLog.i(\"in next record\", \"this sheep ID is \" + String.valueOf(thissheep_id));\n \tcursor.moveToNext();\n \tLog.i(\"in next record\", \"after moving the cursor \");\n \tthissheep_id = cursor.getInt(0);\n \tthissheep_name = cursor.getString(1);\n \tLog.i(\"in next record\", \"this sheep ID is \" + String.valueOf(thissheep_id));\n \tLog.i(\"in next record\", \"this sheep name is \" + thissheep_name);\n \trecNo += 1;\n \tfindTagsShowAlert(v, thissheep_id);\n//\t\t// I've moved forward so I need to enable the previous record button\n\t\tButton btn3 = (Button) findViewById( R.id.prev_rec_btn );\n\t\tbtn3.setEnabled(true);\t \t\n \tif (recNo == (nRecs)) {\n \t\t// at end so disable next record button\n \t\tButton btn2 = (Button) findViewById( R.id.next_rec_btn );\n \tbtn2.setEnabled(false); \t\t\n \t}\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = OK;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}",
"public void buttonHintNext(View view) {\n //using finish to activity\n finish();\n\n //create a new object to start new activity\n Intent intent = new Intent(this, Hint.class);\n //pass object to startActivity\n startActivity(intent);\n }",
"public void toNextPage(View v) {\n Intent i = new Intent(MainActivity.this, SecondActivity.class);\n i.putExtra(\"is_played\", is_played);\n startActivity(i);\n }",
"public interface OnItemClickListener {\n void doNext(int positon, String text);\n}",
"@Override\n\tpublic void onNextRoadClick() {\n\t\t\n\t}",
"@Override\n public void onClick(View view) {\n int current = getItem(+1);\n if (current < layouts.length) {\n // move to next screen\n binding.activityWelcomeViewPager.setCurrentItem(current);\n } else {\n //Go to sign up\n startActivity(new Intent(WelcomeActivity.this , SignupActivity.class));\n finish();\n }\n }",
"@Override\n public void onClick(View v) {\n if (v == next){\n Log.d(\"\",\"- - - - - - - Triggered Next Button - - - - - - - - -\");\n if (otpInp.getText().toString().length() < 5){\n otpInp.setError(\"Invalid\");\n }else{\n Toast.makeText(getApplication().getBaseContext(),\"Getting OTP\",Toast.LENGTH_LONG);\n Log.d(\"Loader Message \",\"Getting otp for the validation\");\n startActivity(new Intent(getBaseContext(), ShowItems.class));\n }\n }\n if (v == resend){\n Toast.makeText(getApplicationContext(),\"Resend Otp\", Toast.LENGTH_LONG);\n }\n }",
"public void onPlayerNext() {\n\t\trunOnUiThread(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tsetCurrentTrack();\n\t\t\t}\n\t\t});\n\t}",
"void showNext(){\n Log.d(\"Nexting\");\n right.post(new Runnable() {\n @Override\n public void run() {\n ViewAnimator.popInZero(right, 0, 200);\n }\n });\n }",
"@Override\n protected void onNextPageRequested(int page) {\n\n }",
"@Override\n\tpublic View getNextView(View convertView) {\n\t\t\n\t\tif(next_content!=null){\n\t\t\tconvertView=getPageView(convertView,next_content);\n\t\t}\n\t\treturn convertView;\n\t}",
"@Override\n public void onNext(String s) {\n Toast.makeText(MainActivity.this, \"OBSERVER ->\" + s, Toast.LENGTH_SHORT).show();\n textView.setText(s);\n }",
"public void nextSlide() {\n\t\tif (currentSlideNumber < (showList.size()-1)) {\n\t\t\tsetSlideNumber(currentSlideNumber + 1);\n\t\t}\n\t}",
"@Override\n\tpublic void navigateToNext(String phoneNum) {\n\t\t\n\t}",
"public void nextQuestion(View view){\n\n\n Question = findViewById(R.id.question1);\n // If the current question has been answered, validate & move on to the next question\n if (checkAnswered()){\n // Check for right or wrong answer\n validateQuestion();\n\n // Move on to the new question\n Intent intent = new Intent(getApplicationContext(),Questions2of5Activity.class);\n if (intent.resolveActivity(getPackageManager()) != null) {\n intent.putExtra(\"passedScore\",score);\n intent.putExtra(\"firstName\",firstName);\n intent.putExtra(\"lastName\",lastName);\n startActivity(intent);\n\n // Destroy activity to prevent user from going back\n finish();\n }\n }\n\n // If the question has not been answered, provide a toast message\n else {\n displayToast(\"You need to answer the question before moving on to the next\");\n }\n }",
"private void navigateQuestion(boolean previous) {\n currentQuestionIndex = previous ? currentQuestionIndex - 1 : currentQuestionIndex + 1;\n if (currentQuestionIndex == 10 || currentQuestionIndex < 0) {\n currentQuestionIndex = 0;\n }\n question = questions[currentQuestionIndex];\n textView.setText(question.getStringResourceId());\n\n Log.d(TAG, \"Displaying question \" + String.valueOf(currentQuestionIndex));\n }",
"protected void handleNext(ActionEvent event) {\n\t}",
"public void nextQuestion(View view) {\n\n Integer num1, num2;\n num1=generateRandomNumber(100);\n num2=generateRandomNumber(100);\n\n //set random number in textview\n TextView tv;\n tv=findViewById(R.id.question);\n tv.setText(Integer.toString(num1)+ \"X\" + Integer.toString(num2));\n\n }",
"private void displayNextQuestion() {\n\n if (quizIterator.hasNext()){\n question = quizIterator.next();\n qTextView.setText(question.getQuestion());\n setBtnUsability(true);\n }\n else\n {\n setBtnUsability(false);\n qTextView.setText(\"Great job! You're a stack star!\");\n }\n\n }",
"public void nextQuestion(View view) {\n\n int points = calculatePoints();\n //Retrieve the variable \"total_points\" from the previous activity\n Bundle extras = getIntent().getExtras();\n if (extras != null) {\n points = points + extras.getInt(\"total_points\");\n }\n\n boolean validatedAnswer = validateAnswer();\n\n if (validatedAnswer == true) {\n\n Intent startNextQuestion = new Intent(this, ScoreActivity.class);\n startNextQuestion.putExtra(\"total_points\", points);\n startActivity(startNextQuestion);\n }\n }",
"private void next() {\n if (position < tracks.size()) {\n Player.getInstance().stop();\n\n // Set a new position:\n ++position;\n\n ibSkipPreviousTrack.setImageDrawable(getResources()\n .getDrawable(R.drawable.ic_skip_previous_track_on));\n\n try {\n Player.getInstance().play(tracks.get(position));\n } catch (IOException playerException) {\n playerException.printStackTrace();\n }\n\n setImageDrawable(ibPlayOrPauseTrack, R.drawable.ic_pause_track);\n setCover(Player.getInstance().getCover(tracks.get(position), this));\n\n tvTrack.setText(tracks.get(position).getName());\n tvTrackEndTime.setText(playerUtils.toMinutes(Player.getInstance().getTrackEndTime()));\n }\n\n if (position == tracks.size() - 1) {\n ibSkipNextTrack.setImageDrawable(getResources()\n .getDrawable(R.drawable.ic_skip_next_track_off));\n }\n }",
"public static void checkAndClickNextButton() {\r\n\t\tcheckNoSuchElementExceptionByID(\"nextquest\", \"\\\"Next\\\" button\");\r\n\t\tcheckElementNotInteractableExceptionByID(\"nextquest\", \"\\\"Next\\\" button\");\r\n\t}",
"public static void clickNextBtn() {\t\n\t\ttry {\n\t\t\tdriver.findElement(By.id(\"nextquest\")).click();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Next button in Q&A submit doesnt work\");\n\t\t}\n\t}",
"public TeacherPage clickNextPageButton() {\n nextPage.click();\n return this;\n }",
"public abstract boolean nextOrFinishPressed();",
"public static void clickNextBtnGame() {\t\n\t\tdriver.findElement(By.id(\"btnnext\")).click();\n\t}",
"private void nextPage()\n {\n if(currentPage + 1 <= maxPage)\n {\n prevPageButton.setEnabled(true);\n if(currentPage + 2 > maxPage)\n nextPageButton.setEnabled(false);\n \n paginate(++currentPage, getResultsPerPage());\n updatePageLabel(currentPage, maxPage);\n }\n }",
"@Override\n\tpublic void onClick(View v) {\n\t\tif(v==btnnext)\n\t\t{\n\t\t\tstitle =edittitle.getText().toString().trim();\n\t\t\tsdesc =editdesc.getText().toString().trim();\n\t\t\tsrent =editrent.getText().toString().trim();\n\t\t\tscontact =editcontact.getText().toString().trim();\n\t\t\t\n\t\t\tselectedarea = spinArea.getSelectedItemPosition();\n\t\t\t\n\t\t\tif(stitle.equals(\"\"))\n\t\t\t{\n\t\t\t\tedittitle.setError(\"Enter Title\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if(sdesc.equals(\"\"))\n\t\t\t{\n\t\t\t\teditdesc.setError(\"Enter Description\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if(selectedarea==0)\n\t\t\t{\n\t\t\t\tToast.makeText(AddFoodAdvActivity.this,\"Select Area\",Toast.LENGTH_SHORT).show();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if(srent.equals(\"\"))\n\t\t\t{\n\t\t\t\teditrent.setError(\"Enter Rent\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if(scontact.equals(\"\"))\n\t\t\t{\n\t\t\t\teditcontact.setError(\"Enter Contact No\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsarea = AreaList.get(selectedarea-1).getArea_ID().toString().trim();\n\t\t\t\t\n\t\t\t\tif(!sarea.trim().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tnew PostWaterAdv().execute();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t}\n\t}",
"public void nextButton(View view) {\n Button submit = (Button) findViewById(R.id.start_and_submit_button);\n RadioGroup radioButtons = (RadioGroup) findViewById(R.id.radio_group);\n LinearLayout checkGroup = (LinearLayout) findViewById(R.id.check_group);\n EditText inputText = (EditText) findViewById(R.id.input_text);\n getUserAnswer();\n\n if (currentQueNum < maxNumOfQues) {\n currentQueNum += 1;\n optionsSelect();\n\n //this set question no 4 to checkbox view UI reply as required\n if (currentQueNum == 4) {\n radioButtons.setVisibility(View.GONE);\n checkGroup.setVisibility(View.VISIBLE);\n inputText.setVisibility(View.GONE);\n String que[] = getResources().getStringArray(R.array.questions);\n TextView questionsPane = (TextView) findViewById(R.id.questions_pane);\n questionsPane.setText(que[currentQueNum - 1]);\n }\n\n //this below block of code will set question number 7 and 10 to textView UI reply\n else if (currentQueNum == 7 || currentQueNum == 10) {\n radioButtons.setVisibility(View.GONE);\n inputText.setVisibility(View.VISIBLE);\n checkGroup.setVisibility(View.GONE);\n String que[] = getResources().getStringArray(R.array.questions);\n TextView quesDisp = (TextView) findViewById(R.id.questions_pane);\n quesDisp.setText(que[currentQueNum - 1]);\n }\n\n // this below block of code will set the view with appropriate UI for answers\n else {\n radioButtons.setVisibility(View.VISIBLE);\n inputText.setVisibility(View.GONE);\n checkGroup.setVisibility(View.GONE);\n String que[] = getResources().getStringArray(R.array.questions);\n TextView questionsPane = (TextView) findViewById(R.id.questions_pane);\n questionsPane.setText(que[currentQueNum - 1]);\n }\n }\n\n //notify the user that he/she have reach the end of test he should submit?\n else {\n Toast endOfQuiz = makeText(getApplicationContext(), \"YOU HAVE REACH THE END OF TEST, SUBMIT?\", Toast.LENGTH_SHORT);\n endOfQuiz.show();\n submit.setEnabled(true);\n }\n if (currentQueNum != maxNumOfQues) {\n inputText.setText(\"\");//clear the text field for subsequent use\n radioButtons.clearCheck();//this clear the check state of radioButtons since same object will be re used in next question\n }\n }",
"public void actionPerformed(ActionEvent e)\n\t\t{\n\t\t\tnextButton.setText(\"NEXT >> \");\n\t\t\tint index = tabbedPane.getSelectedIndex();\n\t\t\tif (index != 0)\n\t\t\t{\n\t\t\t\ttabbedPane.setSelectedIndex(index - 1);\n\t\t\t}\n\t\t\tif (index - 1 == 0)\n\t\t\t{\n\t\t\t\tbackButton.setEnabled(false);\n\t\t\t}\n\t\t}",
"@Override\r\n\tpublic void onNextRoadClick() {\n\r\n\t}",
"void onClickNextTurn();",
"public void onClick(DialogInterface dialog, int which) {\n mCallBack.onChangeText(utils.BUTTON_NEXT, true);\n utils.showToast(ctx, getResources().getString(R.string.txtManualPass));\n TestController testController = TestController.getInstance(getActivity());\n testController.onServiceResponse(true,\"TouchScreen\", ConstantTestIDs.MIC_ID);\n testController.onServiceResponse(true,\"Speaker\", ConstantTestIDs.SPEAKER_ID);\n mStartRecording = true;\n mImgViewMicPlay.setImageDrawable(getResources().getDrawable(R.drawable.ic_speaker_blue_svg_128));\n nextButtonHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n nextButtonHandler.removeCallbacksAndMessages(null);\n onNextPress();\n }\n }, 2000);\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = OTHERBEACH;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}",
"private void nextButtonActionPerformed(ActionEvent e) {\n // TODO add your code here\n int remainItem = this.list.size() - 6 * (this.page + 1);\n\n if(remainItem <= 0){\n Warning.run(\"No more page here.\");\n }\n else{\n this.page++;\n this.update();\n }\n }",
"void scrollToFinishActivity();",
"public void setNextQuestion(Question question) {\n curQuestion = question;\n p.setVisibility(View.GONE);\n questionText.setText(question.getText());\n questionText.scrollTo(0, 0);\n\n readableCheck.setEnabled(true);\n readableCheck.setChecked(true);\n skipBtn.setEnabled(true);\n }",
"@FXML\n private void handlePreviousCommandTextNext() {\n commandBox.selectPreviousCommandTextNext();\n }",
"public void onNextPress() {\n try {\n MainActivity activity = (MainActivity) getActivity();\n// activity.onChangeText(R.string.textSkip,false);\n if (Constants.isSkipButton) {\n mImgViewMicPlay.setImageDrawable(getResources().getDrawable(R.drawable.ic_mic_blue_svg_128),false,getActivity());\n mImgViewMicRecord.setImageDrawable(getResources().getDrawable(R.drawable.ic_speaker_red_svg_128),false,getActivity());\n testController.onServiceResponse(false,\"Mic\", ConstantTestIDs.MIC_ID);\n testController.onServiceResponse(false,\"Speaker\", ConstantTestIDs.SPEAKER_ID);\n utils.showToast(ctx, getResources().getString(R.string.txtManualFail));\n // utils.compare_UpdatePreferenceInt(ctx, JsonTags.MMR_33.name(), AsyncConstant.TEST_FAILED);\n\n // updateResultToServer();\n }\n boolean semi=false;\n nextPress(activity,semi);\n// MainActivity mainActivity = (MainActivity)getActivity();\n//// if (Constants.isDoAllClicked && mainActivity.index != mainActivity.automatedTestListModels.size()) {\n//\n// replaceFragment(R.id.container, ManualTestsOperation.launchScreens(mainActivity.automatedTestListModels.get(mainActivity.index).getTest_id(), mainActivity.automatedTestListModels.get(mainActivity.automatedTestListModels.size() - 1).getTest_id()),null, false);\n// mainActivity.index++;\n//\n// }\n// if (Constants.isDoAllClicked && activity.manualIndex != Manual2SemiAutomaticTestsFragment.testListModelList.size()){\n// replaceFragment(R.id.container, ManualTestsOperation.launchScreens(Manual2SemiAutomaticTestsFragment.testListModelList.get(activity.manualIndex).getTest_id(), Manual2SemiAutomaticTestsFragment.testListModelList.get(Manual2SemiAutomaticTestsFragment.testListModelList.size() - 1).getTest_id()),null, false);\n// activity.manualIndex++;\n//\n// }\n// else {\n//// clearAllStack();\n//// replaceFragment(R.id.container, ManualTestsOperation.launchScreens(-1,mainActivity.automatedTestListModels.get(mainActivity.automatedTestListModels.size()-1).getTest_id()), FragmentTag.GPS_FRAGMENT.name(), true);\n// popFragment(R.id.container);\n// }\n } catch (Exception e) {\n logException(e, \"MicManualFragment_onNextPress()\");\n }\n\n\n }",
"public void nextSlide() {\r\n\t\tpresentation.nextSlide();\r\n\t}",
"void onMainMapFragmentNextBtn();",
"public void goToNext() {\r\n\t\tif (curr == null)\r\n\t\t\treturn;\r\n\t\tprev = curr;\r\n\t\tcurr = curr.link;\r\n\t}",
"@Override\n public void onClick(View view) {\n IdEvento = obtenerEmegencia().get(recyclerViewEmergencia.getChildAdapterPosition(view)).getId();\n\n //Se muestra un mensaje en pantalla de lo que seleciono\n Next();\n }",
"@Override\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\n\t\tcase R.id.text_keyone:\n\t\t\tsendChar(pageoffset + 0);\n\t\t\tbreak;\n\t\tcase R.id.text_keytwo:\n\t\t\tsendChar(pageoffset + 1);\n\t\t\tbreak;\n\t\tcase R.id.text_keythree:\n\t\t\tsendChar(pageoffset + 2);\n\t\t\tbreak;\n\t\tcase R.id.text_keyfour:\n\t\t\tsendChar(pageoffset + 3);\n\t\t\tbreak;\n\t\tcase R.id.text_keyfive:\n\t\t\tsendChar(pageoffset + 4);\n\t\t\tbreak;\n\t\tcase R.id.text_keysix:\n\t\t\tsendChar(pageoffset + 5);\n\t\t\tbreak;\n\t\tcase R.id.text_keyseven:\n\t\t\tsendChar(pageoffset + 6);\n\t\t\tbreak;\n\t\tcase R.id.text_keyeight:\n\t\t\tsendChar(pageoffset + 7);\n\t\t\tbreak;\n\t\tcase R.id.text_keynine:\n\t\t\tsendChar(pageoffset + 8);\n\t\t\tbreak;\n\t\tcase R.id.text_keyzero:\n\t\t\tsendChar(pageoffset + 9);\n\t\t\tbreak;\n\n\t\tcase R.id.text_keypound:\n\t\t\tpageChange(1);\n\t\t\tbreak;\n\t\tcase R.id.text_keystar:\n\t\t\tpageChange(-1);\n\t\t\tbreak;\n\t\t}\n\t}",
"@Override\n\tpublic void nextPage() {\n\t\tif ( yesBox.isChecked() ) {\n\t\t\tcore.modelCore.events.remove(core.modelCore.selectedEvent);\n\t\t\t\n\t\t\tcore.currentScreen.thisRemoveScreen();\n\t\t\tcore.currentScreen = null;\n\t\t\tPage_Event12Yes newPage = new Page_Event12Yes(core);\n\t\t} else {\n\t\t\tcore.currentScreen.thisRemoveScreen();\n\t\t\tcore.currentScreen = null;\n\t\t\tPage_Event12No newPage = new Page_Event12No(core);\n\t\t}\n\t\t\n\t\t//core.currentScreen.thisRemoveScreen();\n\t\t//core.currentScreen = null;\n\t\t//Page_Event03 newPage = new Page_Event03(core);\n\t}",
"@Override\n public boolean onTouch(View v, MotionEvent event) {\n switch(event.getAction()){\n case MotionEvent.ACTION_DOWN:\n System.out.println(\"---action down-----\");\n dx=event.getX();\n dy=event.getY();\n // show.setText(\"起始位置为:\"+\"(\"+event.getX()+\" , \"+event.getY()+\")\");\n break;\n case MotionEvent.ACTION_MOVE:\n //System.out.println(\"---action move-----\");\n //show.setText(\"移动中坐标为:\"+\"(\"+event.getX()+\" , \"+event.getY()+\")\");\n break;\n case MotionEvent.ACTION_UP:\n System.out.println(\"---action up-----\");\n ux=event.getX();\n uy=event.getY();\n\n if(dx>readingText.getWidth()/2){//页面三等分,中间跳出设置 设置字体大小时应重新加载页面\n // Toast.makeText(MainActivity.this, \"next\", Toast.LENGTH_SHORT).show();\n readingText.setText(getNext());\n }\n else {\n readingText.setText(getPre());\n\n //加载上一页\n //Toast.makeText(MainActivity.this, \"pre\", Toast.LENGTH_SHORT).show();\n //show.setText(\"pre:\"+\"(\"+event.getX()+\" , \"+event.getY()+\")\");\n }\n break;\n // show.setText(\"最后位置为:\"+\"(\"+event.getX()+\" , \"+event.getY()+\")\");\n }\n return true;\n }",
"@Override\n public void onSkipPressed() {\n setCurrentSlide(4);\n }",
"public void addNextActionListener(ActionListener actionListener){\n\t\tbtnNext.addActionListener(actionListener);\n\t}",
"public static void next() {\n\t\tsendMessage(NEXT_COMMAND);\n\t}",
"public interface OnNextButtonClicked {\n // TODO: Update argument type and name\n void OnNextButtonClicked(String buttonClicked,StoriesClass currentStor);\n }",
"public IWizardPage getNextPage();",
"public void addNextActionListener(ActionListener listener) {\n\t next.addActionListener(listener);\n\t }",
"protected void loadNextPage(){\n\n if(!isShowingSearchedVotes) {\n setLoadingMoreItems(true);\n RikdagskollenApp.getInstance().getRiksdagenAPIManager().getVotes(new VoteCallback() {\n\n @Override\n public void onVotesFetched(List<Vote> votes) {\n setShowLoadingView(false);\n voteList.addAll(votes);\n getAdapter().notifyDataSetChanged();\n setLoadingMoreItems(false);\n }\n\n @Override\n public void onFail(VolleyError error) {\n setLoadingMoreItems(false);\n decrementPage();\n }\n }, getPageToLoad());\n\n incrementPage();\n }\n }",
"public void addNext()\r\n\t{\r\n\t\tnext = new JButton(\"Next\");\r\n\t\tnext.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tif (state.getTurn() == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tstate.setPlayerTwoTurn();\r\n\t\t\t\t}\r\n\t\t\t\telse if (state.getTurn() == 2)\r\n\t\t\t\t{\r\n\t\t\t\t\tstate.setPlayerOneTurn();\r\n\t\t\t\t}\r\n\t\t\t\tremoveNext();\r\n\t\t\t\t\r\n\t\t\t\tstate.setWaiting(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\tadd(next);\r\n\t\t\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}",
"public void Next(){\n Bundle extras = new Bundle();\n extras.putString(\"IdEvento\", IdEvento); // se obtiene el valor mediante getString(...)\n\n Intent intent = new Intent(this, AtendiendoEmergencia.class);\n //Agrega el objeto bundle a el Intne\n intent.putExtras(extras);\n //Inicia Activity\n startActivity(intent);\n }",
"void clickNextStation();",
"private LoginPage clickOnNext() {\n if (waitForElementDisplayed(By.id(ID_NEXT), 10, 20)) {\n clickOnElementUsingJquery(driver.findElement(By.id(ID_NEXT)));\n return this;\n }\n return null;\n }",
"@FXML\r\n private void handleNextButtonAction(ActionEvent event) throws IOException {\n p.switcher(event, \"MusicList.fxml\");\r\n \r\n }",
"@Override\n public void onClick(View v) {\n editor4.putInt(\"page\", ++page);\n editor4.apply();\n startActivity(new Intent(FileUpload.this, UploadActivity.class));\n }",
"@Override\n public void onCheckedChanged(RadioGroup radioGroup, int i) {\n if (i == R.id.radio1 || i == R.id.radio2 || i == R.id.radio3 || i == R.id.radio4)\n // then the \"Next button\" activated to direct us, to the next question\n nextButtonQuest1.setEnabled(true);\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tcalendar.moveNextMonth();\n\t\t\t\tdisplayCalendar();\n\t\t\t}",
"protected void loadNextActivity() {\n\t\tIntent intent = new Intent(this, nextActivityClass);\n\t\tstartActivity(intent);\n\t}",
"@Override\n public void onClick(View v) {\n\n int current = getItem(+1);\n if (current < layouts.length) {\n // move to next screen\n viewPager.setCurrentItem(current);\n } else {\n launchHomeScreen();\n }\n }"
] |
[
"0.7814236",
"0.7793505",
"0.7659741",
"0.7554862",
"0.73219514",
"0.71528786",
"0.70896095",
"0.7038609",
"0.70270705",
"0.6904517",
"0.68905324",
"0.68402904",
"0.6839023",
"0.6837556",
"0.6768104",
"0.675036",
"0.6743863",
"0.6666009",
"0.66589075",
"0.6652525",
"0.6643012",
"0.6622381",
"0.65985274",
"0.65817773",
"0.656395",
"0.6488051",
"0.64758384",
"0.6472208",
"0.64433736",
"0.6440107",
"0.64290965",
"0.6419851",
"0.6417922",
"0.6416559",
"0.63665664",
"0.6360022",
"0.63475674",
"0.6340492",
"0.63354594",
"0.6331936",
"0.6328226",
"0.6320364",
"0.6284501",
"0.6268428",
"0.6261802",
"0.62600374",
"0.6257218",
"0.6254544",
"0.6249255",
"0.62479204",
"0.62390405",
"0.6236749",
"0.62289447",
"0.6220502",
"0.6219509",
"0.62103826",
"0.6197488",
"0.6196469",
"0.61856484",
"0.6183849",
"0.61738646",
"0.61718535",
"0.616218",
"0.6161685",
"0.6158732",
"0.61526364",
"0.61521083",
"0.6110492",
"0.6102407",
"0.60807455",
"0.6073854",
"0.60569453",
"0.6056759",
"0.6054856",
"0.60489213",
"0.6042993",
"0.60427636",
"0.60373753",
"0.602927",
"0.60127366",
"0.6004906",
"0.600199",
"0.5998686",
"0.5989009",
"0.59767795",
"0.5963783",
"0.59592456",
"0.59571785",
"0.59472084",
"0.5940492",
"0.59179455",
"0.59046924",
"0.59026235",
"0.58999544",
"0.589561",
"0.58774084",
"0.5861452",
"0.58597535",
"0.5854054",
"0.5845717",
"0.58402157"
] |
0.0
|
-1
|
column where the game piece will be positioned methods
|
public GamePiece() //constructor
{
type="?"; //initializes type to ?
symbol='?'; //initializes symbol to ?
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public int getPositionColumn(){return this.positionColumn;}",
"public void setPositionColumn(int value){this.positionColumn = value;}",
"private int colPos(int pos) {\r\n return pos % squareDimension;\r\n }",
"public int getCurrentPawnColumn(){\r\n GamePosition curPos = currentGame.getCurrentPosition();\n\t\tPlayer white = currentGame.getWhitePlayer();\n\t\tif(curPos.getPlayerToMove().equals(white)) {\n\t\t\treturn curPos.getWhitePosition().getTile().getColumn();\n\t\t\n\t\t} else {\n\t\t\treturn curPos.getBlackPosition().getTile().getColumn();\n\t\t}\r\n }",
"int atColumn();",
"Tile getPosition();",
"int getColumn();",
"public int getColumn() {\n // YOUR CODE HERE\n return this.column;\n }",
"public int getColumn();",
"void positionToStart () {\n currentRow = 0 - currentPiece.getOffset();\n currentColumn = board.columns / 2 - currentPiece.width / 2;\n }",
"private int getPosition(int row, int col) {\n\t\treturn (side * (row - 1)) + (col - 1);\n\t}",
"public int getColumn() { return cc; }",
"protected abstract void position(int[][] gameboard, int col, int row);",
"public abstract int getColumn();",
"public abstract Piece setLocation(int row, int column);",
"public int columnMove() {\r\n return cSign;\r\n }",
"public int getColumn()\t \t\t{ return column; \t}",
"int getCol();",
"public int getColumn()\n {\n return col;\n }",
"private int insertOnColumn(int column, char playerChar){\n int lineOfLastColumnFree = 0;\n for(int i = 0; i < this.lines; i++){\n if(i + 1 < this.lines && this.tiles[i + 1][column - 1] == 'O' ){\n lineOfLastColumnFree++;\n }\n else{\n break;\n }\n }\n\n this.tiles[lineOfLastColumnFree][column - 1] = playerChar;\n return lineOfLastColumnFree;\n }",
"@Override\n\tpublic void placementcell() {\n\t\t\n\t}",
"int getColumn(int x, int y){\n return board[x][y].getColumn();\n }",
"public Column getColumn(int pos) { return columns[pos]; }",
"public int visibleCell(int row, int column) {\n return column;\n }",
"public abstract boolean actualPlace(int row, int col);",
"public void play(int column);",
"Piece getPieceAt(int col, int row);",
"public int getColumn()\n {\n return column;\n }",
"void placePowerStation() {\n this.board.get(powerRow).get(powerCol).placePowerStation();\n }",
"String getColumn();",
"public int getBoardLocation() {return boardLocation;}",
"public int col() {\r\n return col;\r\n }",
"int changeTile(int column, char playerChar) throws ColumnFullException {\n int line;\n if(column == 0 || column > this.columns|| !this.columnIsFree(column)) throw new ColumnFullException(\"Column full\");\n else{\n line = insertOnColumn(column,playerChar);\n }\n\n return line;\n }",
"private Point2D getBoardPosition() {\n double size = getCellSize();\n double x = canvas.getWidth() / 2 - board.getWidth() * size / 2;\n double y = canvas.getHeight() / 2 - board.getHeight() * size / 2;\n\n return new Point2D(x, y);\n }",
"@Override\n public int getCol() {\n return getLayout().getCol();\n }",
"public static void setPlayerColumn(int buttonNumber){\n\n int playerColumn; // global in python\n boolean moveFlag; // global in python\n\n if (gameBoard[0][buttonNumber].equals(\"-\")) { // Check if .equals() needs to be implemented\n playerColumn = buttonNumber;\n moveFlag = true;\n System.out.println(\"Player selected column: \" + (playerColumn + 1));\n }\n\n else{\n // Show dialgoue box that column is already full\n System.out.println(\"Column is full\");\n }\n }",
"public int getColumn(){\n return this.column;\n }",
"public int getColumn() {\r\n return column;\r\n }",
"public int getColumn() {\r\n return column;\r\n }",
"public int getColumn() {\r\n\t\treturn slot % 9;\r\n\t}",
"private int getColumn( int position ) {\n if ( columns == 1 ) {\n return 0;\n }\n //Log.d(TAG, \"getColumn returning some shit: \" + position + \" % \" + columns + \" = \" + (position % columns));\n return position % columns;\n }",
"public abstract int findColForWindow(int x);",
"private int getColumn(int x) {\n\t\t// TODO Auto-generated method stub\n\t\tint w = view.getWidth() / nColumns;\n\t\treturn x / w;\n\t}",
"public interface ColumnLaneInterface {\r\n\r\n\t/**\r\n\t * This method converts the current x position and determines which column lane this is\r\n\t * @return Returns the number of this column lane\r\n\t * @author Justin Yau\r\n\t */\r\n\tpublic int getLane();\r\n\t\r\n\t\r\n\t\r\n}",
"public int getColumn() {\n return column;\n }",
"public int getColumn() {\n return column;\n }",
"public int getColumn() {\n return column;\n }",
"public int getColumn() {\n return col;\n }",
"Square getCurrentPosition();",
"public int addPiece(int column, char piece) {\n if (column < 0 || column > 6 || this.hasPiece(0, column)) {\n return 0;\n }\n for (int i = 0; i < 6; i++) {\n if (i == 5 || !hasPiece(i, column) && hasPiece(i + 1, column)) {\n board[i][column] = piece;\n return i;\n }\n } \n return -1;\n\t}",
"public int getColumn() {\r\n\t\treturn column;\r\n\t}",
"public int getCol() { return _col; }",
"public int getPosition(){\n\t\treturn this.cell;\n\t}",
"public int getColumn()\n\t{\n\t\treturn col;\n\t}",
"private static void drawTableCompenents() {\n\t\ttopColumn = new JLabel(\"location\");\r\n\t\ttopColumn.setLocation(200, 0);\r\n\t\tExtension.instance.add(topColumn);\r\n\t}",
"public int snapToGridVertically(int p)\r\n {\r\n return p;\r\n }",
"private static int leftScore(char piece, State state, int row, int col) {\n\t\tif(col != 0 && state.getGrid()[row][col-1] == piece) {\n\t\t\treturn NEXT_TO;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}",
"int getColumnIndex();",
"int getColumnIndex();",
"int getColumnIndex();",
"public void paintColumn(Graphics g, Rectangle column)\r\n\t{\r\n\t\t//Si estamos en el nivel especial del undertale pondremos una imagen de ese juego a las columnas.\r\n\t\tif (Menu.jugador.equals(\"undertale\") || Menu.jugador.equals(\"Undertale\")) {\r\n\t\t\tImageIcon tub = new ImageIcon(new ImageIcon(getClass().getResource(\"/flappyBird/hueso.png\")).getImage());\r\n\t\t\tg.drawImage(tub.getImage(), column.x, column.y, column.width, column.height, null);\r\n\r\n\t\t//imagen por defecto de las columnas.\t\t\r\n\t\t}else {\r\n\t\t\tImageIcon tub = new ImageIcon(new ImageIcon(getClass().getResource(\"/flappyBird/Tub.JPG\")).getImage());\r\n\t\t\tg.drawImage(tub.getImage(), column.x, column.y, column.width, column.height, null);\r\n\r\n\t\t}\r\n\r\n\t}",
"private static int rightScore(char piece, State state, int row, int col) {\n\t\tif(col != state.getGrid().length-1 && state.getGrid()[row][col+1] == piece) {\n\t\t\treturn NEXT_TO;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}",
"public void moveRight() {\n this.position.addColumn(1);\n }",
"String getLawnPosition();",
"void onColumnClick(int column);",
"void colFull(int col);",
"private void setGridElement (int row, int column, Player player)\n {\n mGrid[row][column] = new Move(player, row, column);\n }",
"public int getX() { return position.x; }",
"public int getColumn() {\n\t\treturn column;\n\t}",
"public int getColumn(){ return (Integer)args[1]; }",
"private int rowPos(int pos) {\r\n return pos / squareDimension;\r\n }",
"public int getColumn()\r\n\t{\r\n\t\treturn this.column;\r\n\t}",
"public void moveRight()\n\t{\n\t\tcol++;\n\t}",
"private int colToY(int c) { \n\t\treturn c * getWidth() / BOARD_LENGTH - (BOARD_PIECE_LENGTH);\n\t}",
"private void addColumn() {\n for (int j = 0; j < gridHeight; j++) {\n EscapeBlock block = new EscapeBlock(gridWidth,j);\n block.setLocation(margin + gridWidth * (Block.length+1) ,\n margin + topMargin + j * (Block.length+1)); \n this.add(block);\n grid.get(j).add(block);\n }\n gridWidth++;\n }",
"public void incremetColumn() {\n setRowAndColumn(row, column + 1);\n }",
"@Override\n\tpublic void mousePressed(MouseEvent e) {\n\t\tint[] position = new int[2];\n\t\tposition = db.MovableHumanPiecePosition(p);\n\t\t\n\t\t// show possible moves of the selected piece in the board\n\t\tif(position[0] < 6){\n\t\t\ttry{\n\t\t\t\tif(db.isPlayed() == false){\n\t\t\t\t\tdb.displayPossibleMoveSquare(position);\n\t\t\t}\n\t\t\t}catch(Exception e1){\n\t\t\t\te1.toString();\n\t\t\t}\n\t\t}\t\n\t\t\n\t}",
"public int getPositionRow(){return this.positionRow;}",
"public int getColumn() {\n return mCol;\n }",
"private void addPieces() {\n gridPane.getChildren().clear();\n Map<Piece, Position> pieces = controller.getAllActivePiecesPositions();\n /* Add the tiles */\n for (int row = 0; row < 8; row++) {\n for (int col = 0; col < 8; col++) {\n Tile tile = new TileView(new Position(row, col));\n gridPane.add(tile.getRootNode(),\n 1 + tile.getPosition().getCol(),\n 1 + tile.getPosition().getRow());\n GridPane.setHgrow(tile.getRootNode(), Priority.ALWAYS);\n GridPane.setVgrow(tile.getRootNode(), Priority.ALWAYS);\n getTiles()[row][col] = tile;\n tile.getRootNode().setOnMouseClicked(\n tileListener(tile));\n tile.clear();\n tile.setSymbol(\"\");\n }\n }\n /* Add the pieces */\n for (Piece p : pieces.keySet()) {\n Position placeAt = pieces.get(p);\n getTileAt(placeAt).setSymbol(p.getType().getSymbol(p.getSide()));\n }\n /* Add the coordinates around the perimeter */\n for (int i = 1; i <= 8; i++) {\n Text coord1 = new Text((char) (64 + i) + \"\");\n coord1.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord1.setFill(Color.WHITE);\n GridPane.setHalignment(coord1, HPos.CENTER);\n gridPane.add(coord1, i, 0);\n\n Text coord2 = new Text((char) (64 + i) + \"\");\n coord2.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord2.setFill(Color.WHITE);\n GridPane.setHalignment(coord2, HPos.CENTER);\n gridPane.add(coord2, i, 9);\n\n Text coord3 = new Text(\" \" + (9 - i) + \" \");\n coord3.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord3.setFill(Color.WHITE);\n GridPane.setHalignment(coord3, HPos.CENTER);\n gridPane.add(coord3, 0, i);\n\n Text coord4 = new Text(\" \" + (9 - i) + \" \");\n coord4.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord4.setFill(Color.WHITE);\n GridPane.setHalignment(coord4, HPos.CENTER);\n gridPane.add(coord4, 9, i);\n }\n }",
"void displayFilledSquare(Button button, int row, int column, ChessPiece piece);",
"public int col() {\r\n\t\treturn col;\r\n\t}",
"void lastMoveInfo(int playerIndex, int column, int row);",
"public int getColumn() {\n return this.column;\n }",
"private void locationClicked(int row, int col, int tool)\n {\n //2. Assign the values associated with the parameters to the grid\n\t grid[row][col] = tool;\n }",
"@Override\n\tpublic Piece view(Position boardPosition) {\n\t\tPiece temp;\n\t\ttemp = grid[boardPosition.row][boardPosition.col];\n\t\treturn temp;\n\t}",
"private int getIndex(int row, int column) {\n \n int pos;\n \n pos = (row*getVariables().size()*4)+(column*4);\n return pos;\n}",
"public static void placePlayerPiece(PlayerMovesHandler player) {\n\t\t// char piece = player.getPiece();\n\t\tScanner in = new Scanner(System.in);\n\t\tboolean invalidInput = true;\n\n\t\twhile (invalidInput) {\n\t\t\tSystem.out.println(\"Enter row and column no. where you want to place your mark (Top left is [1,1])\");\n\n\t\t\tint row = in.nextInt() - 1;\n\t\t\tint col = in.nextInt() - 1;\n\t\t\tinvalidInput = !(player.setPiece(row, col));\t// callee returns true if success \n\t\t}\n\t}",
"private static double downLeftScore(char piece, State state, int row, int col) {\n\t\tif(row != state.getGrid().length-1 && col != 0 && state.getGrid()[row+1][col-1] == piece) {\n\t\t\treturn DIAGONAL;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}",
"private int ufindex(int row, int col) {\n return grid.length * (row - 1) + col - 1;\n }",
"void showpos(pieces chesspiece)\n {if(chesspiece.alive == true)\n {\n int position = chesspiece.position;\n chesspiece.select = true;\n \n int x;int y;\n if((position+1)%8 == 0) {x = 8; y = (position+8)/8;}\n else{ x = (position+1)%8;\n y = (position+9)/8;}\n chesspiece.move(new moves(x,y));\n for( int a : chesspiece.movnum )\n {\n if ( chesspiece.color == 0)\n {\n if (Checkerboard.allWhitePositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.GRAY);\n else if (Checkerboard.allBlackPositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.RED);\n else\n panel[a-1].setBackground(Color.GREEN);\n }\n else\n {\n if (Checkerboard.allWhitePositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.RED);\n else if (Checkerboard.allBlackPositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.GRAY);\n else\n panel[a-1].setBackground(Color.GREEN);\n }\n \n }\n }//if(chesspiece.alive==true) ends\n }",
"public final int getColumn() {\n return column;\n }",
"public int getCol(){\r\n\t\treturn this.column;\r\n\t}",
"private static double upLeftScore(char piece, State state, int row, int col) {\n\t\tif(row != 0 && col != 0 && state.getGrid()[row-1][col-1] == piece) {\n\t\t\treturn DIAGONAL;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}",
"default int gridToSlot(int x, int y) {\n return y * 9 + x;\n }",
"public int getX(){ return xPosition; }",
"void movePiece() {\n\n }",
"private static int upScore(char piece, State state, int row, int col) {\n\t\tif(row != 0 && state.getGrid()[row-1][col] == piece) {\n\t\t\treturn NEXT_TO;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}",
"int getPosition();",
"public int getColumn() {\n\t\t\treturn column;\n\t\t}",
"private static int downScore(char piece, State state, int row, int col) {\n\t\tif(row != state.getGrid().length-1 && state.getGrid()[row+1][col] == piece) {\n\t\t\treturn NEXT_TO;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}"
] |
[
"0.7097758",
"0.70789164",
"0.68644863",
"0.6838201",
"0.6791147",
"0.65965194",
"0.655818",
"0.6526553",
"0.65221673",
"0.6481675",
"0.6471398",
"0.64640915",
"0.6464078",
"0.6446514",
"0.64310503",
"0.64267254",
"0.64078534",
"0.63765323",
"0.635659",
"0.6344121",
"0.6311388",
"0.6279893",
"0.6239424",
"0.6236824",
"0.62364817",
"0.62352574",
"0.62199634",
"0.6190276",
"0.61894035",
"0.6187023",
"0.6162404",
"0.61592263",
"0.6150099",
"0.6139542",
"0.61323464",
"0.6123121",
"0.61215174",
"0.61162305",
"0.61162305",
"0.60504884",
"0.60437423",
"0.60402566",
"0.60382545",
"0.6034472",
"0.601597",
"0.601597",
"0.601597",
"0.60086787",
"0.599008",
"0.5986249",
"0.5978855",
"0.59786326",
"0.5977764",
"0.5975794",
"0.5974357",
"0.597331",
"0.5966205",
"0.59595454",
"0.59595454",
"0.59595454",
"0.5958888",
"0.5940674",
"0.5936924",
"0.5935832",
"0.59347415",
"0.59178",
"0.5914105",
"0.59130216",
"0.5912012",
"0.59043616",
"0.5899145",
"0.5884311",
"0.5881662",
"0.58816063",
"0.58702195",
"0.5868384",
"0.5852084",
"0.58469164",
"0.5845008",
"0.5842979",
"0.5827949",
"0.58266777",
"0.5826481",
"0.5820118",
"0.58125484",
"0.58118826",
"0.5807104",
"0.5799366",
"0.5796122",
"0.5795284",
"0.5794739",
"0.57942075",
"0.57889503",
"0.5772019",
"0.57716566",
"0.576734",
"0.5766654",
"0.5765689",
"0.57601714",
"0.5758177",
"0.5755213"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public void onDialogNegativeClick(DialogFragment dialog) {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
whitebox branch coverage tests
|
@Test
void testInoltroSegnalazioneJpg() throws IOException {
request.setParameter("oggetto", "Perdita d'acqua");
request.setParameter("descrizione", "Perdita d’acqua in via roma, altezza supermercato, civico 3");
request.setParameter("via", "Via roma");
request.setParameter("civico", "3");
request.addPart(new Part() {
@Override
public InputStream getInputStream() throws IOException {
return new FileInputStream(new File("foto.jpg"));
}
@Override
public String getContentType() {
return "file";
}
@Override
public String getName() {
return "foto";
}
@Override
public String getSubmittedFileName() {
return "foto.jpg";
}
@Override
public long getSize() {
return 0;
}
@Override
public void write(String s) throws IOException {
}
@Override
public void delete() throws IOException {
}
@Override
public String getHeader(String s) {
return null;
}
@Override
public Collection<String> getHeaders(String s) {
return null;
}
@Override
public Collection<String> getHeaderNames() {
return null;
}
});
MyServletException exception =
assertThrows(MyServletException.class, () -> {servlet.doPost(request,response);});
assertEquals("Errore I/O nel caricamento della foto!" ,exception.getMessage());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n public void testBranchCoverageSuccess() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,75,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogNotContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogNotContains(\"ERROR:\", run);\n }",
"@Test\n public void testBranchCoverageFailUnstable() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,0,76\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Code coverage enforcement failed for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's stability is 75.0 and set mininum stability is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build due to unstability.\", run);\n }",
"@Test\n public void testBranchCoverageFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,76,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's health is 75.0 and set minimum health is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build because it is unhealthy.\", run);\n }",
"@Test\n public void testMethodCoverageFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder()\n .setMethodCoverage(\"80,101,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Methods's health is 100.0 and set minimum health is 101.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build because it is unhealthy.\", run);\n jenkinsRule.assertLogContains(\"Finished: FAILURE\", run);\n }",
"public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }",
"@Test\n public void testLineCoverageSuccess() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setLineCoverage(\"91,90,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogNotContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogNotContains(\"ERROR:\", run);\n }",
"@Test\n public void testLineCoverageUnstableNoFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(\n new ScriptBuilder().setFailUnstable(false).setLineCoverage(\"91,0,91\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Finished: UNSTABLE\", run);\n jenkinsRule.assertLogNotContains(\"ERROR:\", run);\n }",
"@Test\n public void testLineCoverageUnhealthyNoFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(\n new ScriptBuilder().setFailUnhealthy(false).setLineCoverage(\"91,91,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Finished: SUCCESS\", run);\n jenkinsRule.assertLogNotContains(\"ERROR:\", run);\n }",
"@Test\n public void testUnstableOnlyStableTrue() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n\n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBuildResult(\"UNSTABLE\").setOnlyStable(true).getScript()));\n\n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n\n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n\n jenkinsRule.assertLogNotContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Skipping Cobertura coverage report as build was not SUCCESS or better\", run);\n }",
"@Test\n public void testClassCoverageFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder()\n .setClassCoverage(\"80,101,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Classes's health is 100.0 and set minimum health is 101.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build because it is unhealthy.\", run);\n jenkinsRule.assertLogContains(\"Finished: FAILURE\", run);\n }",
"@Test\n public void testUnstableOnlyStableFalse() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n\n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBuildResult(\"UNSTABLE\").setOnlyStable(false).getScript()));\n\n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n\n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n\n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Cobertura coverage report found.\", run);\n }",
"@Test\n public void checkoutTest() {\n\n }",
"@org.junit.Test\n public void coverage()\n {\n new Encodings();\n }",
"@Test\n public void testLineCoverageFailUnstable() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setLineCoverage(\"91,0,91\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Code coverage enforcement failed for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Lines's stability is 90.0 and set mininum stability is 91.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build due to unstability.\", run);\n }",
"@Test\n public void testFailedOnlyStableFalse() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n\n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBuildResult(\"FAILURE\").setOnlyStable(false).getScript()));\n\n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n\n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n\n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Cobertura coverage report found.\", run);\n }",
"@Test\n public void testFailedOnlyStableTrue() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n\n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBuildResult(\"FAILURE\").setOnlyStable(true).getScript()));\n\n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n\n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n\n jenkinsRule.assertLogNotContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Skipping Cobertura coverage report as build was not SUCCESS or better\", run);\n }",
"@Test\n public void testStuffWithCoverage() {\n\n for(int a = -5; a <= 5; a ++) {\n for (int b = -5; b <= 5; b++) {\n SampleSmallClass.doSomeMath(a, b);\n }\n }\n }",
"@Test\n public void testLineCoverageFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setLineCoverage(\"91,91,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Lines's health is 90.0 and set minimum health is 91.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build because it is unhealthy.\", run);\n }",
"@Test\n public void testPackageCoverageFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder()\n .setPackageCoverage(\"80,101,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Packages's health is 100.0 and set minimum health is 101.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build because it is unhealthy.\", run);\n jenkinsRule.assertLogContains(\"Finished: FAILURE\", run);\n }",
"@Test\n public void testFileCoverageFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder()\n .setFileCoverage(\"80,101,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Files's health is 100.0 and set minimum health is 101.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build because it is unhealthy.\", run);\n jenkinsRule.assertLogContains(\"Finished: FAILURE\", run);\n }",
"@Test\n public void testReportFile() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n\n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().getScript()));\n\n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n try (OutputStream os = ensureWorkspaceExists(project).child(\"Main.java\").write(); PrintWriter pw = new PrintWriter(os)) {\n for (int i = 1; i <= 40; i++) {\n pw.println(\"line #\" + i);\n }\n }\n\n WorkflowRun run = jenkinsRule.buildAndAssertSuccess(project);\n\n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Cobertura coverage report found.\", run);\n\n assertTrue(new File(project.getRootDir(), \"cobertura/Main_2ejava\").isFile());\n }",
"@Test\n public void oncoTreeVersionTest() {\n // TODO: test oncoTreeVersion\n }",
"public void testGitHub() {\n\t}",
"public static void cover() {\n\t\tSystem.out.println(\"cover method\");\n\t\ttest();\n\t}",
"public void testCoverage01() {\r\n\r\n\t\t// The order of the tree must be greater than 2\r\n\t\ttry {\r\n\t\t\tnew BTree<String, String>(2);\r\n\t\t\tfail(\"Expected IllegalArgumentException\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t}\r\n\r\n\t\t// The order of the tree must be even\r\n\t\ttry {\r\n\t\t\tnew BTree<String, String>(3);\r\n\t\t\tfail(\"Expected IllegalArgumentException\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t}\r\n\t}",
"private static FaultyVersion createDummyVersion1() {\n\t\t/**\tzur Initialisierung der Coverage arrays in der TestCase Klasse wird auf\n\t\t * \tFaultyProjectGlobals.methodsCount zugegriffen\t*/\n\t\tFaultyProjectGlobals.methodsCount = 8;\n\t\t\n\t\tTestCase[] failures = new TestCase[6];\n\t\tfailures[0] = new TestCase(\"Test-A-Fail\", false, new Boolean[] {true, false, true, false, true, false, true, false});\n\t\tfailures[1] = new TestCase(\"Test-B-Fail\", false, new Boolean[] {true, false, true, false, true, false, true, false});\n\t\tfailures[2] = new TestCase(\"Test-C-Fail\", false, new Boolean[] {false, true, false, true, false, true, true, true});\n\t\tfailures[3] = new TestCase(\"Test-D-Fail\", false, new Boolean[] {false, false, false, false, false, false, true, true});\n\t\tfailures[4] = new TestCase(\"Test-E-Fail\", false, new Boolean[] {false, true, false, true, true, true, false, false});\n\t\tfailures[5] = new TestCase(\"Test-F-Fail\", false, new Boolean[] {false, true, true, true, true, true, false, false});\n\t\t\n\t\tTestCase[] passedTCs = new TestCase[8];\n\t\tpassedTCs[0] = new TestCase(\"Test-G-Success\", true, new Boolean[] {false, false, false, false, true, true, true, true});\n\t\tpassedTCs[1] = new TestCase(\"Test-H-Success\", true, new Boolean[] {true, false, true, false, false, false, false, true});\n\t\tpassedTCs[2] = new TestCase(\"Test-I-Success\", true, new Boolean[] {true, true, false, true, false, true, true, true});\n\t\tpassedTCs[3] = new TestCase(\"Test-J-Success\", true, new Boolean[] {false, false, false, true, true, true, false, true});\n\t\tpassedTCs[4] = new TestCase(\"Test-K-Success\", true, new Boolean[] {false, true, true, false, false, true, false, false});\n\t\tpassedTCs[5] = new TestCase(\"Test-L-Success\", true, new Boolean[] {true, false, true, true, true, true, false, false});\n\t\tpassedTCs[6] = new TestCase(\"Test-M-Success\", true, new Boolean[] {true, true, true, false, true, true, true, true});\n\t\tpassedTCs[7] = new TestCase(\"Test-N-Success\", true, new Boolean[] {false, false, false, true, false, false, true, true});\n\t\treturn new FaultyVersion(failures, passedTCs, \"dummyVersion-1\", 8);\n\t}",
"@Test\n public void testCheckout() throws Exception {\n }",
"@Test\n public void breweryTest() {\n // TODO: test brewery\n }",
"@Test\n public void testStyleUsingChannelsFromCoverageView() throws Exception {\n GetMapRequest request = new GetMapRequest();\n CoordinateReferenceSystem crs = DefaultGeographicCRS.WGS84;\n ReferencedEnvelope bbox = new ReferencedEnvelope(new Envelope((-116.90673461649858), (-114.30988665660261), 32.070937282184026, 33.8903284734844), crs);\n request.setBbox(bbox);\n request.setSRS(\"urn:x-ogc:def:crs:EPSG:4326\");\n request.setFormat(\"image/png\");\n final WMSMapContent map = new WMSMapContent(request);\n map.setMapWidth(300);\n map.setMapHeight(300);\n map.setTransparent(false);\n map.getViewport().setBounds(bbox);\n StyleBuilder styleBuilder = new StyleBuilder();\n Catalog catalog = getCatalog();\n // Source image\n CoverageInfo ci = catalog.getCoverageByName(MULTIBAND.getPrefix(), MULTIBAND.getLocalPart());\n GridCoverage2DReader reader = ((GridCoverage2DReader) (ci.getGridCoverageReader(null, null)));\n reader.getCoordinateReferenceSystem();\n Layer sl = new org.geoserver.wms.CachedGridReaderLayer(reader, styleBuilder.createStyle(styleBuilder.createRasterSymbolizer()));\n map.addLayer(sl);\n RenderedImageMap srcImageMap = this.rasterMapProducer.produceMap(map);\n RenderedImage srcImage = srcImageMap.getImage();\n // CoverageView band creation. We create a coverage view with 6 bands, using\n // the original bands from the multiband coverage\n // Note that first three bands are int reverse order of the bands of the source coverage\n final InputCoverageBand ib0 = new InputCoverageBand(\"multiband\", \"2\");\n final CoverageBand b0 = new CoverageBand(Collections.singletonList(ib0), \"multiband@2\", 0, CompositionType.BAND_SELECT);\n final InputCoverageBand ib1 = new InputCoverageBand(\"multiband\", \"1\");\n final CoverageBand b1 = new CoverageBand(Collections.singletonList(ib1), \"multiband@1\", 1, CompositionType.BAND_SELECT);\n final InputCoverageBand ib2 = new InputCoverageBand(\"multiband\", \"0\");\n final CoverageBand b2 = new CoverageBand(Collections.singletonList(ib2), \"multiband@0\", 2, CompositionType.BAND_SELECT);\n final InputCoverageBand ib3 = new InputCoverageBand(\"multiband\", \"0\");\n final CoverageBand b3 = new CoverageBand(Collections.singletonList(ib3), \"multiband@0\", 0, CompositionType.BAND_SELECT);\n final InputCoverageBand ib4 = new InputCoverageBand(\"multiband\", \"1\");\n final CoverageBand b4 = new CoverageBand(Collections.singletonList(ib4), \"multiband@1\", 1, CompositionType.BAND_SELECT);\n final InputCoverageBand ib5 = new InputCoverageBand(\"multiband\", \"2\");\n final CoverageBand b5 = new CoverageBand(Collections.singletonList(ib5), \"multiband@2\", 2, CompositionType.BAND_SELECT);\n final List<CoverageBand> coverageBands = new ArrayList<CoverageBand>(1);\n coverageBands.add(b0);\n coverageBands.add(b1);\n coverageBands.add(b2);\n coverageBands.add(b3);\n coverageBands.add(b4);\n coverageBands.add(b5);\n CoverageView multiBandCoverageView = new CoverageView(\"multiband_select\", coverageBands);\n CoverageStoreInfo storeInfo = catalog.getCoverageStoreByName(\"multiband\");\n CatalogBuilder builder = new CatalogBuilder(catalog);\n // Reordered bands coverage\n CoverageInfo coverageInfo = multiBandCoverageView.createCoverageInfo(\"multiband_select\", storeInfo, builder);\n coverageInfo.getParameters().put(\"USE_JAI_IMAGEREAD\", \"false\");\n catalog.add(coverageInfo);\n final LayerInfo layerInfoView = builder.buildLayer(coverageInfo);\n catalog.add(layerInfoView);\n final Envelope env = ci.boundingBox();\n RenderedImageMapOutputFormatTest.LOGGER.info((\"about to create map ctx for BasicPolygons with bounds \" + env));\n RasterSymbolizer symbolizer = styleBuilder.createRasterSymbolizer();\n ChannelSelection cs = new ChannelSelectionImpl();\n SelectedChannelType red = new SelectedChannelTypeImpl();\n SelectedChannelType green = new SelectedChannelTypeImpl();\n SelectedChannelType blue = new SelectedChannelTypeImpl();\n // We want to create an image where the RGB channels are in reverse order\n // regarding the band order of the input coverage view\n // Note that channel names start with index \"1\"\n red.setChannelName(\"3\");\n green.setChannelName(\"2\");\n blue.setChannelName(\"1\");\n cs.setRGBChannels(new SelectedChannelType[]{ red, green, blue });\n symbolizer.setChannelSelection(cs);\n reader = ((GridCoverage2DReader) (coverageInfo.getGridCoverageReader(null, null)));\n reader.getCoordinateReferenceSystem();\n Layer dl = new org.geoserver.wms.CachedGridReaderLayer(reader, styleBuilder.createStyle(symbolizer));\n map.removeLayer(sl);\n map.addLayer(dl);\n RenderedImageMap dstImageMap = this.rasterMapProducer.produceMap(map);\n RenderedImage destImage = dstImageMap.getImage();\n int dWidth = destImage.getWidth();\n int dHeight = destImage.getHeight();\n int[] destImageRowBand0 = new int[dWidth * dHeight];\n int[] destImageRowBand1 = new int[destImageRowBand0.length];\n int[] destImageRowBand2 = new int[destImageRowBand0.length];\n destImage.getData().getSamples(0, 0, dWidth, dHeight, 0, destImageRowBand0);\n destImage.getData().getSamples(0, 0, dWidth, dHeight, 1, destImageRowBand1);\n destImage.getData().getSamples(0, 0, dWidth, dHeight, 2, destImageRowBand2);\n int sWidth = srcImage.getWidth();\n int sHeight = srcImage.getHeight();\n int[] srcImageRowBand0 = new int[sWidth * sHeight];\n int[] srcImageRowBand2 = new int[srcImageRowBand0.length];\n srcImage.getData().getSamples(0, 0, sWidth, sHeight, 0, srcImageRowBand0);\n // Source and result image first bands should be the same. We have reversed the order\n // of the three first bands of the source coverage and then we re-reversed the three\n // first bands using channel selection on the raster symbolizer used for rendering.\n Assert.assertTrue(Arrays.equals(destImageRowBand0, srcImageRowBand0));\n // Result band 0 should not be equal to source image band 2\n Assert.assertFalse(Arrays.equals(destImageRowBand0, srcImageRowBand2));\n srcImageMap.dispose();\n dstImageMap.dispose();\n map.dispose();\n }",
"SuccessCoverage createSuccessCoverage();",
"@Test\n\tpublic void testVersionCheck() throws Exception{\n\t}",
"boolean isBranchTaken();",
"static void coverage()\n {\n new ServletUtils();\n }",
"@Override\n public void testTwoRequiredGroups() {\n }",
"@Override\n public void testTwoRequiredGroups() {\n }",
"ScriptBuilder setBranchCoverage(String branchCoverage) {\n this.branchCoverage = branchCoverage;\n return this;\n }",
"@Test\n public void testAdviceCopy() {\n//TODO: Test goes here... \n }",
"@Test\n public void testIsInCheckoutList() {\n }",
"public static void main(String... args) {\n new Coverage().run(args);\n }",
"@Test\n public void sustainMassiveDamage() {\n }",
"@Test\n public void testQuickCopy() {\n//TODO: Test goes here... \n }",
"@Test(dataProvider = \"doFetchInSeparateProcess\", dataProviderClass = FetchOptionsDataProvider.class)\n public void testCollectBuildChanges(boolean fetchInSeparateProcess) throws Exception {\n System.setProperty(\"teamcity.git.fetch.separate.process\", String.valueOf(fetchInSeparateProcess));\n GitVcsSupport support = getSupport();\n VcsRoot root = getRoot(\"master\");\n // ensure that all revisions reachable from master are fetched\n final List<ModificationData> ms = support.collectChanges(root, VERSION_TEST_HEAD, CUD1_VERSION, new CheckoutRules(\"\"));\n assertEquals(2, ms.size());\n ModificationData m2 = ms.get(1);\n assertEquals(\"The second commit\\n\", m2.getDescription());\n assertEquals(3, m2.getChanges().size());\n for (VcsChange ch : m2.getChanges()) {\n assertEquals(VcsChange.Type.ADDED, ch.getType());\n assertEquals(\"dir/\", ch.getFileName().substring(0, 4));\n }\n ModificationData m1 = ms.get(0);\n assertEquals(\"more changes\\n\", m1.getDescription());\n assertEquals(CUD1_VERSION, m1.getVersion());\n assertEquals(3, m1.getChanges().size());\n VcsChange ch10 = m1.getChanges().get(0);\n assertEquals(\"dir/a.txt\", ch10.getFileName());\n assertEquals(CUD1_VERSION, ch10.getAfterChangeRevisionNumber());\n assertEquals(m2.getVersion(), ch10.getBeforeChangeRevisionNumber());\n assertEquals(VcsChange.Type.CHANGED, ch10.getType());\n VcsChange ch11 = m1.getChanges().get(1);\n assertEquals(\"dir/c.txt\", ch11.getFileName());\n assertEquals(VcsChange.Type.ADDED, ch11.getType());\n VcsChange ch12 = m1.getChanges().get(2);\n assertEquals(\"dir/tr.txt\", ch12.getFileName());\n assertEquals(VcsChange.Type.REMOVED, ch12.getType());\n // now check merge commit relatively to the branch\n final List<ModificationData> mms0 = support.collectChanges(root, MERGE_BRANCH_VERSION, MERGE_VERSION, new CheckoutRules(\"\"));\n assertEquals(2, mms0.size());\n // no check the merge commit relatively to the fork\n final List<ModificationData> mms1 = support.collectChanges(root, CUD1_VERSION, MERGE_VERSION, new CheckoutRules(\"\"));\n assertEquals(3, mms1.size());\n ModificationData md1 = mms1.get(0);\n assertFalse(md1.isCanBeIgnored());\n assertEquals(\"merge commit\\n\", md1.getDescription());\n assertEquals(MERGE_VERSION, md1.getVersion());\n assertEquals(3, md1.getChanges().size());\n VcsChange ch20 = md1.getChanges().get(0);\n assertEquals(\"dir/a.txt\", ch20.getFileName());\n assertEquals(VcsChange.Type.REMOVED, ch20.getType());\n VcsChange ch21 = md1.getChanges().get(1);\n assertEquals(\"dir/b.txt\", ch21.getFileName());\n assertEquals(VcsChange.Type.CHANGED, ch21.getType());\n VcsChange ch22 = md1.getChanges().get(2);\n assertEquals(\"dir/q.txt\", ch22.getFileName());\n assertEquals(VcsChange.Type.ADDED, ch22.getType());\n ModificationData md2 = mms1.get(1);\n assertTrue(md2.isCanBeIgnored());\n assertEquals(\"b-mod, d-add\\n\", md2.getDescription());\n assertEquals(MERGE_BRANCH_VERSION, md2.getVersion());\n assertEquals(2, md2.getChanges().size());\n ModificationData md3 = mms1.get(2);\n assertEquals(\"a-mod, c-rm\\n\", md3.getDescription());\n assertEquals(2, md3.getChanges().size());\n // check the case with broken commit\n String missing = GitUtils.makeVersion(GitUtils.versionRevision(CUD1_VERSION).replace('0', 'f'), GitUtils.versionTime(CUD1_VERSION));\n final List<ModificationData> mms2 = support.collectChanges(root, missing, MERGE_VERSION, new CheckoutRules(\"\"));\n assertEquals(4, mms2.size());\n ModificationData mb3 = mms2.get(3);\n assertEquals(GitServerUtil.SYSTEM_USER, mb3.getUserName());\n assertEquals(0, mb3.getChanges().size());\n }",
"void z_piracy()\n {\n //branch (!f_setup.piracy);\n\n }",
"@Test\n\tpublic void testCanEnter(){\n\t}",
"@Test\n public void statusTest() {\n // TODO: test status\n }",
"@Test\n public void statusTest() {\n // TODO: test status\n }",
"@Test\n\tpublic void testBuild() {\n\n\t\tSystem.out.println(\"End\");\n\t}",
"@Test\n public void testCollisions(){\n }",
"@Test\n\tpublic void testGetAllBranchCopies() throws SQLException {\n\t\tfinal List<BranchCopies> allBranchCopies = copiesDaoImpl\n\t\t\t\t.getAllBranchCopies(testBranch);\n\t\tassertTrue(\n\t\t\t\tallBranchCopies.contains(\n\t\t\t\t\t\tnew BranchCopies(testBook, testBranch, NUM_COPIES)),\n\t\t\t\t\"branch's records includes correct copy count for test book at test branch\");\n\t}",
"@Test\n public void shouldTestBoardStatus(){\n\n }",
"@Before\n public void setUp() throws Exception {\n api = PowerMockito.spy(new BitbucketCloudApiClient(\"alexbrjo\", \"repo1\", null));\n String correctUrl = \"https://bitbucket.org/api/1.0/repositories/alexbrjo/repo1/raw/\";\n\n // mock api response for branch 'name with spaces'\n PowerMockito.doThrow(new IllegalArgumentException(\"Invalid uri\"))\n .when(api, \"getRequestStatus\",correctUrl + \"name with spaces/Jenkinsfile\");\n PowerMockito.doReturn(200)\n .when(api, \"getRequestStatus\",correctUrl + \"name%20with%20spaces/Jenkinsfile\");\n // mock api response for branch '~`!@#$%^&*()_+=[]{}\\|;\"<>,./\\?a'\n PowerMockito.doThrow(new IllegalArgumentException(\"Invalid uri\"))\n .when(api, \"getRequestStatus\",correctUrl + \"~`!@#$%^&*()_+=[]{}\\\\|;\\\"<>,./\\\\?a/Jenkinsfile\");\n PowerMockito.doReturn(200)\n .when(api, \"getRequestStatus\",correctUrl + \"~%60!@%23$%25%5E&*()_%2B=%5B%5D%7B%7D%5C%7C;%22%3C%3E,./%5C%3Fa/Jenkinsfile\");\n }",
"@Test\r\n\tpublic void testSanity() {\n\t}",
"@Test(enabled =true, groups={\"fast\",\"window.One\",\"unix.One\",\"release1.one\"})\n\tpublic void testOne(){\n\t\tSystem.out.println(\"In TestOne\");\n\t}",
"private void testEvidenceBankFolder() {\n LOG.debug(\"### Executing \"+ Thread.currentThread().getStackTrace()[1].getMethodName() +\" ####\");\n NodeRef eviBankFolder = getEvidenceBankFolder();\n assertNotNull(eviBankFolder);\n LOG.debug(\"Got Evidence Bank Folder NodeRef: \" + eviBankFolder); \n\n }",
"@Test\n public void testOncoKBInfo() {\n // TODO: test OncoKBInfo\n }",
"@Test\r\n public void testRentOut() {\r\n }",
"@Test\n public void consentsTest() {\n // TODO: test consents\n }",
"@Test\n public void brewTest(){\n try{\n cmTest.brew(2.5,15);\n cmTest.brew(2.4,14.5);\n cmTest.brew(2.6,14.5);\n } catch (Exception e) {\n fail();\n }\n\n }",
"@Test\n public void regionTest() {\n // TODO: test region\n }",
"@Test\n public void testBin() throws Exception {\n wrapper.setBinConfig(\"bin2\");\n \n String command = getCommandAllEnvVariables();\n FreeStyleBuild build = runBatchCommand(command);\n\n // Assert that the console log contains the output we expect\n rule.assertLogContains(\"path_to_bin2\", build);\n rule.assertLogNotContains(\"path_to_bin1\", build);\n checkMetricsUnset(build);\n checkAccessUnset(build);\n }",
"@Test\n\tfinal void test() {\n\t}",
"@Test\n public void testingTheTwoPlane2016Order() {\n }",
"@Test\n public void testCheckin() throws Exception {\n }",
"@Test\n public void testNoReportFile() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n\n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().getScript()));\n\n ensureWorkspaceExists(project);\n\n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n\n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogNotContains(\"Cobertura coverage report found.\", run);\n }",
"@Test\r\n\tpublic void testGetCondition35() {\n\r\n\t\tCancerHistory h1 = new CancerHistory(\"NHI123\", \"eref1\",\r\n\t\t\t\t(short) Util.FATHER, \"\", true, (short) 50, false, false,\r\n\t\t\t\t(short) -1, false, (short) -1, \"\");\r\n\r\n\t\tCancerHistory[] td1 = { h1 };\r\n\t\tmanager.setHistories(td1);\r\n\r\n\t\tassertEquals(\"# condition 3-5 (run 1) \", false,\r\n\t\t\t\triskCalculator.getCondition35());\r\n\r\n\t\t// run 2.\r\n\t\t// father with CC, diagnosed at 49 ==> true\r\n\r\n\t\tCancerHistory h2 = new CancerHistory(\"NHI123\", \"eref1\",\r\n\t\t\t\t(short) Util.FATHER, \"\", true, (short) 49, false, false,\r\n\t\t\t\t(short) -1, false, (short) -1, \"\");\r\n\r\n\t\tCancerHistory[] td2 = { h2 };\r\n\t\tmanager.setHistories(td2);\r\n\r\n\t\tassertEquals(\"# condition 3-5 (run 2) \", true,\r\n\t\t\t\triskCalculator.getCondition35());\r\n\t\t// risk category is 2, because condition 35 has been removed.\r\n\t\tassertEquals(\" run 2\",\r\n\t\t\t\t2 , riskCalculator.calculateRisk());\r\n\r\n\t\t// run 3.\r\n\t\t// grandfather with CC, diagnosed at 49 ==> false, because\r\n\t\t// it is a secondary relative\r\n\r\n\t\tCancerHistory h3 = new CancerHistory(\"NHI123\", \"eref1\",\r\n\t\t\t\t(short) Util.PAT_GRANDFATHER, \"\", true, (short) 49, false,\r\n\t\t\t\tfalse, (short) -1, false, (short) -1, \"\");\r\n\r\n\t\tCancerHistory[] td3 = { h3 };\r\n\t\tmanager.setHistories(td3);\r\n\r\n\t\tassertEquals(\"# condition 3-5 (run 3) \", false,\r\n\t\t\t\triskCalculator.getCondition35());\r\n\r\n\t\t\r\n\t\t// run 4.\r\n\t\t// father and grandfather with CC, diagnosed at 49 ==> true\r\n\r\n\t\tCancerHistory h4 = new CancerHistory(\"NHI123\", \"eref1\",\r\n\t\t\t\t(short) Util.PAT_GRANDFATHER, \"\", true, (short) 49, false,\r\n\t\t\t\tfalse, (short) -1, false, (short) -1, \"\");\r\n\t\tCancerHistory h5 = new CancerHistory(\"NHI123\", \"eref1\",\r\n\t\t\t\t(short) Util.FATHER, \"\", true, (short) 49, false,\r\n\t\t\t\tfalse, (short) -1, false, (short) -1, \"\");\r\n\r\n\t\t\r\n\t\tCancerHistory[] td4 = { h4, h5 };\r\n\t\tmanager.setHistories(td4);\r\n\r\n\t\tassertEquals(\"# condition 3-5 (run 4) \", true,\r\n\t\t\t\triskCalculator.getCondition35());\r\n\t\tassertEquals(\" run 4 \",\r\n\t\t\t\t3 , riskCalculator.calculateRisk());\r\n\t}",
"@LargeTest\n public void testWhiteBalance() {\n TestAction ta = new TestAction(TestName.WHITE_BALANCE);\n runTest(ta, TestName.WHITE_BALANCE.name());\n }",
"@Test\n public void functionalityTest() {\n new TestBuilder()\n .setModel(MODEL_PATH)\n .setContext(new ModelImplementationGroup3())\n .setPathGenerator(new RandomPath(new EdgeCoverage(100)))\n .setStart(\"e_GoToPage\")\n .execute();\n }",
"@Test\n public void sourceTest() {\n // TODO: test source\n }",
"@Test\n public void sourceTest() {\n // TODO: test source\n }",
"private CoverageReport convertToCoverageReport(Coverage report, ExecutionContext context) {\n\n\t\tCoverageReport coverageReport = new CoverageReport();\n\t\tcoverageReport.setName(\"Gobertura coverage\");\n\n\t\t// simple packages\n\t\tPackages packages = report.getPackages();\n\t\tfor (Package onePackage : packages.getPackage()) {\n\t\t\tcoverageReport.getDirectories().add(this.converPackage(onePackage));\n\t\t}\n\n\t\tInteger missed = 0;\n\t\tInteger covered = 0;\n\t\tInteger missedConditional = 0;\n\t\tInteger coveredConditional = 0;\n\t\tInteger classesCovered = 0;\n\t\tInteger classesMissed = 0;\n\n\t\tfor (DirectoryCoverage classCoverage : coverageReport.getDirectories()) {\n\t\t\tmissed += classCoverage.getLineMissed();\n\t\t\tcovered += classCoverage.getLineCovered();\n\t\t\tmissedConditional += classCoverage.getBranchMissed();\n\t\t\tcoveredConditional += classCoverage.getBranchCovered();\n\t\t\tclassesCovered += classCoverage.getClassCovered();\n\t\t\tclassesMissed += classCoverage.getClassMissed();\n\t\t}\n\n\t\tcoverageReport.setLineCovered(covered);\n\t\tcoverageReport.setLineMissed(missed);\n\n\t\tcoverageReport.setBranchCovered(coveredConditional);\n\t\tcoverageReport.setBranchMissed(missedConditional);\n\n\t\tcoverageReport.setClassCovered(classesCovered);\n\t\tcoverageReport.setClassMissed(classesMissed);\n\n\t\tcoverageReport.setMarkup(GcovHTMLMarkupBuilder.genearteSummary(coverageReport, context));\n\n\t\tcoverageReport.setType(CoverageType.COBERTURA);\n\n\t\treturn coverageReport;\n\t}",
"@Test\n\tvoid test() {\n\t\t\n\t}",
"@Test\n public void levelsTest() {\n // TODO: test levels\n }",
"public void testDummy() {\n }",
"String branch();",
"public void testSpock(){\n }",
"@Test\n public void versionTest() {\n // TODO: test version\n }",
"@Test\n public void agreementTest() {\n // TODO: test agreement\n }",
"public void TestMain(){\n SampleStatements();\n TestMyPow();\n }",
"@Test(dataProvider = \"doFetchInSeparateProcess\", dataProviderClass = FetchOptionsDataProvider.class)\n public void testConcurrentCollectBuildChanges(boolean fetchInSeparateProcess) throws Exception {\n System.setProperty(\"teamcity.git.fetch.separate.process\", String.valueOf(fetchInSeparateProcess));\n \n final GitVcsSupport support = getSupport();\n final List<Exception> errors = Collections.synchronizedList(new ArrayList<Exception>());\n \n Runnable r1 = new Runnable() {\n public void run() {\n try {\n // ensure that all revisions reachable from master are fetched\n final VcsRoot root = getRoot(\"master\");\n final List<ModificationData> ms = support.collectChanges(root, VERSION_TEST_HEAD, CUD1_VERSION, new CheckoutRules(\"\"));\n assertEquals(2, ms.size());\n ModificationData m2 = ms.get(1);\n assertEquals(\"The second commit\\n\", m2.getDescription());\n assertEquals(3, m2.getChanges().size());\n for (VcsChange ch : m2.getChanges()) {\n assertEquals(VcsChange.Type.ADDED, ch.getType());\n assertEquals(\"dir/\", ch.getFileName().substring(0, 4));\n }\n ModificationData m1 = ms.get(0);\n assertEquals(\"more changes\\n\", m1.getDescription());\n assertEquals(CUD1_VERSION, m1.getVersion());\n assertEquals(3, m1.getChanges().size());\n VcsChange ch10 = m1.getChanges().get(0);\n assertEquals(\"dir/a.txt\", ch10.getFileName());\n assertEquals(CUD1_VERSION, ch10.getAfterChangeRevisionNumber());\n assertEquals(m2.getVersion(), ch10.getBeforeChangeRevisionNumber());\n assertEquals(VcsChange.Type.CHANGED, ch10.getType());\n VcsChange ch11 = m1.getChanges().get(1);\n assertEquals(\"dir/c.txt\", ch11.getFileName());\n assertEquals(VcsChange.Type.ADDED, ch11.getType());\n VcsChange ch12 = m1.getChanges().get(2);\n assertEquals(\"dir/tr.txt\", ch12.getFileName());\n assertEquals(VcsChange.Type.REMOVED, ch12.getType());\n } catch (Exception e) {\n errors.add(e);\n }\n }\n };\n \n Runnable r2 = new Runnable() {\n public void run() {\n try {\n // now check merge commit relatively to the branch\n final VcsRoot root = getRoot(\"master\");\n final List<ModificationData> mms0 = support.collectChanges(root, MERGE_BRANCH_VERSION, MERGE_VERSION, new CheckoutRules(\"\"));\n assertEquals(2, mms0.size());\n } catch (Exception e) {\n errors.add(e);\n }\n }\n };\n \n Runnable r3 = new Runnable() {\n public void run() {\n try {\n // no check the merge commit relatively to the fork\n final VcsRoot root = getRoot(\"master\");\n final List<ModificationData> mms1 = support.collectChanges(root, CUD1_VERSION, MERGE_VERSION, new CheckoutRules(\"\"));\n assertEquals(3, mms1.size());\n ModificationData md1 = mms1.get(0);\n assertFalse(md1.isCanBeIgnored());\n assertEquals(\"merge commit\\n\", md1.getDescription());\n assertEquals(MERGE_VERSION, md1.getVersion());\n assertEquals(3, md1.getChanges().size());\n VcsChange ch20 = md1.getChanges().get(0);\n assertEquals(\"dir/a.txt\", ch20.getFileName());\n assertEquals(VcsChange.Type.REMOVED, ch20.getType());\n VcsChange ch21 = md1.getChanges().get(1);\n assertEquals(\"dir/b.txt\", ch21.getFileName());\n assertEquals(VcsChange.Type.CHANGED, ch21.getType());\n VcsChange ch22 = md1.getChanges().get(2);\n assertEquals(\"dir/q.txt\", ch22.getFileName());\n assertEquals(VcsChange.Type.ADDED, ch22.getType());\n ModificationData md2 = mms1.get(1);\n assertTrue(md2.isCanBeIgnored());\n assertEquals(\"b-mod, d-add\\n\", md2.getDescription());\n assertEquals(MERGE_BRANCH_VERSION, md2.getVersion());\n assertEquals(2, md2.getChanges().size());\n ModificationData md3 = mms1.get(2);\n assertEquals(\"a-mod, c-rm\\n\", md3.getDescription());\n assertEquals(2, md3.getChanges().size());\n } catch (Exception e) {\n errors.add(e);\n }\n }\n };\n \n Runnable r4 = new Runnable() {\n public void run() {\n try {\n // check the case with broken commit\n final VcsRoot root = getRoot(\"master\");\n String missing = GitUtils.makeVersion(GitUtils.versionRevision(CUD1_VERSION).replace('0', 'f'), GitUtils.versionTime(CUD1_VERSION));\n final List<ModificationData> mms2 = support.collectChanges(root, missing, MERGE_VERSION, new CheckoutRules(\"\"));\n assertEquals(4, mms2.size());\n ModificationData mb3 = mms2.get(3);\n assertEquals(GitServerUtil.SYSTEM_USER, mb3.getUserName());\n assertEquals(0, mb3.getChanges().size());\n } catch (Exception e) {\n errors.add(e);\n }\n }\n };\n \n for (int i = 0; i < 50; i++) {\n BaseTestCase.runAsync(4, r1, r2, r3, r4);\n }\n \n if (!errors.isEmpty()) {\n throw errors.get(0);\n }\n }",
"public void testDummy() {\n }",
"public void\n performTest\n ( \n BaseMasterExt ext\n )\n throws PipelineException\n {\n ext.preOfflineTest(pVersions);\n }",
"@Test\n public void temporaryTeamClosingUnavalableOption() {\n\n }",
"@Override\n public void runTest() {\n }",
"@Test\n public void testBuild() {\n writeBanner(getMethodName());\n }",
"@Test\n public void testBlock() {\n System.out.println(\"block\");\n //instance.block();\n }",
"@Test\n public void ncitVersionTest() {\n // TODO: test ncitVersion\n }",
"public static void run() {\n testAlgorithmOptimality();\n// BenchmarkGraphSets.testMapLoading();\n //testAgainstReferenceAlgorithm();\n //countTautPaths();\n// other();\n// testLOSScan();\n //testRPSScan();\n }",
"@Test\n public void solve1() {\n }",
"@Test\n public void costTest() {\n // TODO: test cost\n }",
"public void run(TestResult result) {\n try {\n TestHarness testApp = setupHarness();\n if (printInfo)\n testApp.printInfo(System.out, testBranchs);\n else\n testApp.run(result);\n } catch (Exception e) {\n result.addError(this, e);\n }\n }",
"@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testGREENBEB() {\n CuteNetlibCase.doTest(\"GREENBEB.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }",
"@Test\n public void testGetNumberCheckedOut() {\n }",
"@Test\n void play_BranchOne()\n {\n dealer = 22;\n player = 22;\n result = BlackjackSimple.play(dealer, player);\n\n assertEquals(0, result);\n }",
"@Test\n public void abandonFight() {\n }",
"@Test\n public void testingTheSixFlatbed2017Order() {\n }",
"@Test\n\tpublic void testMain() {\n\t}",
"@Test\n void play_BranchTwo()\n {\n dealer = 22;\n player = 21;\n result = BlackjackSimple.play(dealer, player);\n\n assertEquals(player, result);\n }",
"static void testCaculator(){\n }",
"@Override\n public void testOneRequiredGroup() {\n }",
"@Override\n public void testOneRequiredGroup() {\n }",
"@Override\n public int getGridCoverageCount() {\n return 1;\n }"
] |
[
"0.75518453",
"0.74084544",
"0.73195064",
"0.6707676",
"0.6665466",
"0.6564801",
"0.65455675",
"0.6544816",
"0.64717275",
"0.6459267",
"0.6436063",
"0.63723785",
"0.63609207",
"0.63508797",
"0.6292521",
"0.6273476",
"0.6251672",
"0.62385285",
"0.6205011",
"0.6155288",
"0.61170703",
"0.6049836",
"0.59967273",
"0.5993234",
"0.59607434",
"0.59525704",
"0.5908119",
"0.5876923",
"0.5875908",
"0.57836753",
"0.57719934",
"0.5671977",
"0.5666705",
"0.5665563",
"0.5665563",
"0.5647047",
"0.56125367",
"0.5607936",
"0.5604713",
"0.55877244",
"0.55830175",
"0.5573212",
"0.55623376",
"0.5523441",
"0.5522449",
"0.5522449",
"0.5518843",
"0.5500177",
"0.5496398",
"0.54868865",
"0.54658395",
"0.5463446",
"0.5461982",
"0.54591686",
"0.54402703",
"0.5440192",
"0.54377216",
"0.5423343",
"0.5417497",
"0.5415188",
"0.54015994",
"0.53979284",
"0.53885305",
"0.53858274",
"0.5384464",
"0.5379131",
"0.53660655",
"0.53608316",
"0.53608316",
"0.5357628",
"0.5348683",
"0.53411776",
"0.53305954",
"0.5327627",
"0.5321335",
"0.53203195",
"0.53174496",
"0.53086734",
"0.5306989",
"0.53024036",
"0.52996016",
"0.529752",
"0.5284953",
"0.5276376",
"0.5275865",
"0.5273429",
"0.52722365",
"0.5266623",
"0.526366",
"0.5253221",
"0.52513397",
"0.5250869",
"0.5250156",
"0.52500516",
"0.52476835",
"0.5243959",
"0.5242857",
"0.52377003",
"0.5235895",
"0.5235895",
"0.52347666"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setListAdapter(new ArrayAdapter<String>(Menu.this,android.R.layout.simple_list_item_1, classes));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);
String sample=classes[position];
try{
Class ob=Class.forName("com.example.mohit."+sample);
Intent navigate=new Intent(Menu.this,ob);
startActivity(navigate);
}catch(ClassNotFoundException e){
e.printStackTrace();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public boolean onCreateOptionsMenu(android.view.Menu menu) {
super.onCreateOptionsMenu(menu);
MenuInflater muu= getMenuInflater();
muu.inflate(R.menu.cool_menu, menu);
return true;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()){
case R.id.aboutus:
Intent about=new Intent(Menu.this,AboutUs.class);
startActivity(about);
break;
case R.id.pre:
Intent pre=new Intent(Menu.this,Prefs.class);
startActivity(pre);
break;
case R.id.exit:finish();
break;
case R.id.ma:Intent a=new Intent(Menu.this,hehhehe.class);
startActivity(a);
break;
}
return false;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
Use this factory method to create a new instance of this fragment using the provided parameters.
|
public static InscricoesFragment newInstance(String param1, String param2) {
InscricoesFragment fragment = new InscricoesFragment();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"protected abstract Fragment createFragment();",
"public void createFragment() {\n\n }",
"@Override\n protected Fragment createFragment() {\n Intent intent = getIntent();\n\n long id = intent.getLongExtra(MovieDetailFragment.EXTRA_ID, -1);\n return MovieDetailFragment.newInstance(id);\n }",
"public CuartoFragment() {\n }",
"public StintFragment() {\n }",
"public ExploreFragment() {\n\n }",
"public RickAndMortyFragment() {\n }",
"public FragmentMy() {\n }",
"public LogFragment() {\n }",
"public FeedFragment() {\n }",
"public HistoryFragment() {\n }",
"public HistoryFragment() {\n }",
"public static MyFeedFragment newInstance() {\n return new MyFeedFragment();\n }",
"public WkfFragment() {\n }",
"public static ScheduleFragment newInstance() {\n ScheduleFragment fragment = new ScheduleFragment();\n Bundle args = new Bundle();\n //args.putString(ARG_PARAM1, param1);\n //args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public WelcomeFragment() {}",
"public ProfileFragment(){}",
"public static ForumFragment newInstance() {\n ForumFragment fragment = new ForumFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n\n return fragment;\n }",
"public static NotificationFragment newInstance() {\n NotificationFragment fragment = new NotificationFragment();\n Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public progFragment() {\n }",
"public static RouteFragment newInstance() {\n RouteFragment fragment = new RouteFragment();\n Bundle args = new Bundle();\n //fragment.setArguments(args);\n return fragment;\n }",
"public HeaderFragment() {}",
"public EmployeeFragment() {\n }",
"public Fragment_Tutorial() {}",
"public NewShopFragment() {\n }",
"public FavoriteFragment() {\n }",
"public static MyCourseFragment newInstance() {\n MyCourseFragment fragment = new MyCourseFragment();\r\n// fragment.setArguments(args);\r\n return fragment;\r\n }",
"public static MessageFragment newInstance() {\n MessageFragment fragment = new MessageFragment();\n Bundle args = new Bundle();\n\n fragment.setArguments(args);\n return fragment;\n }",
"public static ReservationFragment newInstance() {\n\n ReservationFragment _fragment = new ReservationFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n return _fragment;\n }",
"public static RecipeListFragment newInstance() {\n RecipeListFragment fragment = new RecipeListFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n return fragment;\n }",
"public CreateEventFragment() {\n // Required empty public constructor\n }",
"public static Fragment newInstance() {\n\t\treturn new ScreenSlidePageFragment();\n\t}",
"public NoteActivityFragment() {\n }",
"public static WeekViewFragment newInstance(int param1, int param2) {\n WeekViewFragment fragment = new WeekViewFragment();\n //WeekViewFragment 객체 생성\n Bundle args = new Bundle();\n //Bundle 객체 생성\n args.putInt(ARG_PARAM1, param1);\n //ARG_PARAM1에 param1의 정수값 넣어서 args에 저장\n args.putInt(ARG_PARAM2, param2);\n //ARG_PARAM2에 param2의 정수값 넣어서 args에 저장\n fragment.setArguments(args);\n //args를 매개변수로 한 setArguments() 메소드 수행하여 fragment에 저장\n return fragment; //fragment 반환\n }",
"public static Fragment0 newInstance(String param1, String param2) {\n Fragment0 fragment = new Fragment0();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static QueenBEmbassyF newInstance() {\n QueenBEmbassyF fragment = new QueenBEmbassyF();\n //the way to pass arguments between fragments\n Bundle args = new Bundle();\n\n fragment.setArguments(args);\n return fragment;\n }",
"public EventHistoryFragment() {\n\t}",
"public static Fragment newInstance() {\n StatisticsFragment fragment = new StatisticsFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"public HomeFragment() {}",
"public PeopleFragment() {\n // Required empty public constructor\n }",
"public static FeedFragment newInstance() {\n FeedFragment fragment = new FeedFragment();\n return fragment;\n }",
"public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"public VantaggiFragment() {\n // Required empty public constructor\n }",
"public AddressDetailFragment() {\n }",
"public ArticleDetailFragment() { }",
"public static DropboxMainFrag newInstance() {\n DropboxMainFrag fragment = new DropboxMainFrag();\n // set arguments in Bundle\n return fragment;\n }",
"public RegisterFragment() {\n }",
"public EmailFragment() {\n }",
"public static FragmentComida newInstance(String param1) {\n FragmentComida fragment = new FragmentComida();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n return fragment;\n\n\n }",
"public static CommentFragment newInstance() {\n CommentFragment fragment = new CommentFragment();\n\n return fragment;\n }",
"public static ParqueosFragment newInstance() {\n ParqueosFragment fragment = new ParqueosFragment();\n return fragment;\n }",
"public ForecastFragment() {\n }",
"public FExDetailFragment() {\n \t}",
"public static AddressFragment newInstance(String param1) {\n AddressFragment fragment = new AddressFragment();\n\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n\n return fragment;\n }",
"public TripNoteFragment() {\n }",
"public ItemFragment() {\n }",
"public NoteListFragment() {\n }",
"public CreatePatientFragment() {\n\n }",
"public DisplayFragment() {\n\n }",
"public static frag4_viewcompliment newInstance(String param1, String param2) {\r\n frag4_viewcompliment fragment = new frag4_viewcompliment();\r\n Bundle args = new Bundle();\r\n args.putString(ARG_PARAM1, param1);\r\n args.putString(ARG_PARAM2, param2);\r\n fragment.setArguments(args);\r\n return fragment;\r\n }",
"public static fragment_profile newInstance(String param1, String param2) {\n fragment_profile fragment = new fragment_profile();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"@Override\n\tprotected Fragment createFragment() {\n\t\treturn new FormFragment();\n\t}",
"public static MainFragment newInstance() {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"public ProfileFragment() {\n\n }",
"public BackEndFragment() {\n }",
"public CustomerFragment() {\n }",
"public static FriendsFragment newInstance(int sectionNumber) {\n \tFriendsFragment fragment = new FriendsFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public ArticleDetailFragment() {\n }",
"public ArticleDetailFragment() {\n }",
"public ArticleDetailFragment() {\n }",
"public static Fragment newInstance() {\n return new SettingsFragment();\n }",
"public PeersFragment() {\n }",
"public SummaryFragment newInstance()\n {\n return new SummaryFragment();\n }",
"public TagsFragment() {\n }",
"public static ProfileFragment newInstance() {\n ProfileFragment fragment = new ProfileFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, \"\");\n args.putString(ARG_PARAM2, \"\");\n fragment.setArguments(args);\n return fragment;\n }",
"public HomeSectionFragment() {\n\t}",
"public static FriendsFragment newInstance() {\n FriendsFragment fragment = new FriendsFragment();\n\n return fragment;\n }",
"public static FirstFragment newInstance(String text) {\n\n FirstFragment f = new FirstFragment();\n Bundle b = new Bundle();\n b.putString(\"msg\", text);\n\n f.setArguments(b);\n\n return f;\n }",
"public PersonDetailFragment() {\r\n }",
"public static LogFragment newInstance(Bundle params) {\n LogFragment fragment = new LogFragment();\n fragment.setArguments(params);\n return fragment;\n }",
"public RegisterFragment() {\n // Required empty public constructor\n }",
"public VehicleFragment() {\r\n }",
"public static Fine newInstance(String param1, String param2) {\n Fine fragment = new Fine();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static FriendsFragment newInstance(String param1, String param2) {\n FriendsFragment fragment = new FriendsFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"public static NoteFragment newInstance(String param1, String param2) {\n NoteFragment fragment = new NoteFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static ChangesViewFragment newInstance() {\n\t\tChangesViewFragment fragment = new ChangesViewFragment();\n\t\tBundle args = new Bundle();\n\t\targs.putInt(HomeViewActivity.ARG_SECTION_NUMBER, 2);\n\t\tfragment.setArguments(args);\n\t\treturn fragment;\n\t}",
"public static MainFragment newInstance(Context context) {\n MainFragment fragment = new MainFragment();\n if(context != null)\n fragment.setVariables(context);\n return fragment;\n }",
"@Override\n\tprotected Fragment createFragment() {\n\t\treturn new CrimeListFragment();\n\t}",
"public static MoneyLogFragment newInstance() {\n MoneyLogFragment fragment = new MoneyLogFragment();\n return fragment;\n }",
"public static ForecastFragment newInstance() {\n\n //Create new fragment\n ForecastFragment frag = new ForecastFragment();\n return(frag);\n }",
"public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static MyTaskFragment newInstance(String param1) {\n MyTaskFragment fragment = new MyTaskFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n return fragment;\n }",
"public static MainFragment newInstance(int param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_PARAM1, param1);\n\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static MyProfileFragment newInstance(String param1, String param2) {\n MyProfileFragment fragment = new MyProfileFragment();\n return fragment;\n }",
"public PlaylistFragment() {\n }",
"public static HistoryFragment newInstance() {\n HistoryFragment fragment = new HistoryFragment();\n return fragment;\n }",
"public static SurvivorIncidentFormFragment newInstance(String param1, String param2) {\n// SurvivorIncidentFormFragment fragment = new SurvivorIncidentFormFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n// return fragment;\n\n SurvivorIncidentFormFragment fragment = new SurvivorIncidentFormFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n\n\n }",
"public static PersonalFragment newInstance(String param1, String param2) {\n PersonalFragment fragment = new PersonalFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }"
] |
[
"0.7259323",
"0.72325355",
"0.7113618",
"0.699069",
"0.69899815",
"0.6833516",
"0.68299687",
"0.6813079",
"0.6800701",
"0.6800411",
"0.6765796",
"0.67397755",
"0.67397755",
"0.67275816",
"0.6716515",
"0.6706048",
"0.6691217",
"0.66904765",
"0.6688572",
"0.66629845",
"0.66451705",
"0.66414434",
"0.6640613",
"0.6634166",
"0.6618567",
"0.66139966",
"0.66075873",
"0.6605316",
"0.65982974",
"0.6591943",
"0.6591915",
"0.6591447",
"0.6582179",
"0.6579097",
"0.65645105",
"0.65621173",
"0.65577924",
"0.65510404",
"0.65493095",
"0.6543832",
"0.65399647",
"0.65348274",
"0.6533803",
"0.6528235",
"0.65246284",
"0.65242815",
"0.65229326",
"0.6515168",
"0.6505565",
"0.6498693",
"0.64985",
"0.64962065",
"0.6493426",
"0.64862",
"0.6485037",
"0.6480159",
"0.64788073",
"0.6476525",
"0.6470913",
"0.64660394",
"0.64580023",
"0.6456585",
"0.6453523",
"0.6452654",
"0.6450429",
"0.64494765",
"0.6448625",
"0.64472264",
"0.6443905",
"0.6443905",
"0.6443905",
"0.6441467",
"0.6440794",
"0.6439393",
"0.6438171",
"0.6434303",
"0.64290327",
"0.6428435",
"0.64250207",
"0.64195585",
"0.6418594",
"0.64133036",
"0.6412074",
"0.6403921",
"0.6401819",
"0.63972855",
"0.6396208",
"0.6392687",
"0.63886577",
"0.63823956",
"0.63782495",
"0.6376538",
"0.6376538",
"0.6376538",
"0.63755065",
"0.6365754",
"0.63650936",
"0.63607186",
"0.635468",
"0.63526064",
"0.635223"
] |
0.0
|
-1
|
TODO: Rename method, update argument and hook method into UI event
|
public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\n\t\t\t\t}",
"@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t}",
"public abstract void update(UIReader event);",
"@Override\r\n\t\t\tpublic void handle(ActionEvent arg0) {\n\t\t\t}",
"@Override\n\tpublic void handle(ActionEvent event) {\n\t\t\n\t}",
"@Override\n\tpublic void handle(ActionEvent event) {\n\n\t}",
"@Override\n\tpublic void handleUpdateUI(String text, int code) {\n\t\t\n\t}",
"@Override\n\tpublic void update(Event e) {\n\t}",
"public abstract void onInvoked(CommandSender sender, String[] args);",
"@Override\r\n public void updateUI() {\r\n }",
"@Override\r\n\tpublic void handle(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"@Override\n\tpublic void processEvent(Event e) {\n\n\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}",
"@Override\n\tpublic void processCommand(JMVCommandEvent arg0) {\n\t}",
"@Override\n\tpublic void inputChanged( Viewer arg0, Object arg1, Object arg2 ) {\n\t}",
"@Override\n\tpublic void handleEvent(Event arg0) {\n\t\t\n\t}",
"@Override\r\n\tpublic void onCustomUpdate() {\n\t\t\r\n\t}",
"public void updateUI(){}",
"private synchronized void updateScreen(String arg){\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n setChanged();\n notifyObservers(arg);\n }\n });\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}",
"@Override\r\n public void actionPerformed( ActionEvent e )\r\n {\n }",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\tpublic void updateObjectListener(ActionEvent e) {\n\t\t\r\n\t}",
"Event () {\n // Nothing to do here.\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t}",
"void onArgumentsChanged();",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}",
"void eventChanged();",
"@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override public void handle(ActionEvent e)\n\t {\n\t }",
"@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\r\n\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override //se repita\r\n public void actionPerformed(ActionEvent ae) {\r\n \r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}",
"public abstract CommandResponse onCommand(CommandSender sender, String label, String[] args);",
"@Override\n public void actionPerformed(ActionEvent actionEvent) {\n }",
"@Override\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t}",
"@Override\r\n public void actionPerformed(ActionEvent e) {\n \r\n }",
"public abstract void onCommand(MessageEvent context) throws Exception;",
"@Override\r\n\tpublic void onEvent(Event arg0) {\n\r\n\t}",
"private void addParameterEventHandler(){\n\t\t\n\t\tgetParameterNameListBox().addDoubleClickHandler(new DoubleClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onDoubleClick(DoubleClickEvent event) {\n\t\t\t\tparameterAceEditor.clearAnnotations();\n\t\t\t\tparameterAceEditor.removeAllMarkers();\n\t\t\t\tparameterAceEditor.redisplay();\n\t\t\t\tSystem.out.println(\"In addParameterEventHandler on DoubleClick isPageDirty = \" + getIsPageDirty() + \" selectedIndex = \" + getParameterNameListBox().getSelectedIndex());\n\t\t\t\tsetIsDoubleClick(true);\n\t\t\t\tsetIsNavBarClick(false);\n\t\t\t\tif (getIsPageDirty()) {\n\t\t\t\t\tshowUnsavedChangesWarning();\n\t\t\t\t} else {\n\t\t\t\t\tint selectedIndex = getParameterNameListBox().getSelectedIndex();\n\t\t\t\t\tif (selectedIndex != -1) {\n\t\t\t\t\t\tfinal String selectedParamID = getParameterNameListBox().getValue(selectedIndex);\n\t\t\t\t\t\tcurrentSelectedParamerterObjId = selectedParamID;\n\t\t\t\t\t\tif(getParameterMap().get(selectedParamID) != null){\n\t\t\t\t\t\t\tgetParameterNameTxtArea().setText(getParameterMap().get(selectedParamID).getParameterName());\n\t\t\t\t\t\t\tgetParameterAceEditor().setText(getParameterMap().get(selectedParamID).getParameterLogic());\n\t\t\t\t\t\t\tSystem.out.println(\"In Parameter DoubleClickHandler, doing setText()\");\n\t\t\t\t\t\t\t//disable parameterName and Logic fields for Default Parameter\n\t\t\t\t\t\t\tboolean isReadOnly = getParameterMap().get(selectedParamID).isReadOnly();\n\t\t\t\t\t\t\tgetParameterButtonBar().getDeleteButton().setTitle(\"Delete\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(MatContext.get().getMeasureLockService()\n\t\t\t\t\t\t\t\t\t.checkForEditPermission()){\n\t\t\t\t\t\t\t\tsetParameterWidgetReadOnly(!isReadOnly);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// load most recent used cql artifacts\n\t\t\t\t\t\t\tMatContext.get().getMeasureService().getUsedCQLArtifacts(MatContext.get().getCurrentMeasureId(), new AsyncCallback<GetUsedCQLArtifactsResult>() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\t\t\t\tWindow.alert(MatContext.get().getMessageDelegate().getGenericErrorMessage());\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onSuccess(GetUsedCQLArtifactsResult result) {\n\t\t\t\t\t\t\t\t\tif(result.getUsedCQLParameters().contains(getParameterMap().get(selectedParamID).getParameterName())) {\n\t\t\t\t\t\t\t\t\t\tgetParameterButtonBar().getDeleteButton().setEnabled(false);\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});\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t\tsuccessMessageAlert.clearAlert();\n\t\t\t\t\terrorMessageAlert.clearAlert();\n\t\t\t\t\twarningMessageAlert.clearAlert();\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t}",
"@Override\n public void handle(Event event) {\n }",
"@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}",
"@Override\n public void actionPerformed(AnActionEvent e) {\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n \n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n \n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n \n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n \n }",
"@Override\r\n\tpublic void handleEvent(Event event) {\n\r\n\t}",
"public void ImageView(ActionEvent event) {\n\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n public void updateUi() {\n\n }",
"@Override\n public void updateUi() {\n\n }",
"@Override\n public void updateUi() {\n\n }",
"@Override\n public void delta() {\n \n }",
"public void runInUi(ElexisEvent ev){}",
"@Override\n\tpublic void onClick(ClickEvent arg0) {\n\t\t\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n }",
"@Override\n\tprotected void OnClick() {\n\t\t\n\t}",
"@Override\n public void actionPerformed(ActionEvent ev) {\n }",
"@Override\n public void actionPerformed(ActionEvent e)\n {\n \n }",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n\n }",
"@Override\n public void update(Observable o, Object arg)\n {\n \n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tupdate();\n\t\t\t}",
"@Override\r\n public void processEvent(IAEvent e) {\n\r\n }"
] |
[
"0.6621546",
"0.65269053",
"0.6475754",
"0.6475754",
"0.643746",
"0.63244635",
"0.6238664",
"0.6191726",
"0.6161001",
"0.6144338",
"0.61246425",
"0.6107387",
"0.60993314",
"0.6094632",
"0.6048703",
"0.6048703",
"0.60470945",
"0.6043571",
"0.6043571",
"0.6009135",
"0.5999534",
"0.5987294",
"0.59788",
"0.5956672",
"0.593762",
"0.59276015",
"0.59276015",
"0.59233564",
"0.5918783",
"0.5918783",
"0.5918783",
"0.5918783",
"0.5918783",
"0.5918481",
"0.5910399",
"0.5898694",
"0.5895058",
"0.5893118",
"0.5891507",
"0.5891507",
"0.5891507",
"0.5869864",
"0.5869864",
"0.5869864",
"0.5865938",
"0.5864961",
"0.5864961",
"0.58634657",
"0.5858542",
"0.58492506",
"0.58492506",
"0.58492506",
"0.58492506",
"0.5839893",
"0.58397126",
"0.5820217",
"0.58091575",
"0.58055836",
"0.5774899",
"0.5774169",
"0.5772363",
"0.5768262",
"0.5764584",
"0.5756907",
"0.57563096",
"0.57563096",
"0.57476324",
"0.5746835",
"0.5746835",
"0.5746835",
"0.5744083",
"0.57433665",
"0.5740363",
"0.5735659",
"0.5735659",
"0.5735659",
"0.5735659",
"0.5735659",
"0.5735659",
"0.5735659",
"0.57351744",
"0.57351744",
"0.57351744",
"0.5725159",
"0.5724416",
"0.57229793",
"0.5722422",
"0.5722422",
"0.5721186",
"0.5720473",
"0.57163644",
"0.5713028",
"0.5713028",
"0.5713028",
"0.5713028",
"0.5713028",
"0.5713028",
"0.57104236",
"0.5706721",
"0.570518",
"0.5704983"
] |
0.0
|
-1
|
This interface must be implemented by activities that contain this fragment to allow an interaction in this fragment to be communicated to the activity and potentially other fragments contained in that activity. See the Android Training lesson Communicating with Other Fragments for more information.
|
public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public interface OnFragmentInteractionListener {\n void onFragmentMessage(String TAG, Object data);\n}",
"public interface FragmentInteraction {\n void switchToBoardView();\n void switchToPinsView();\n void switchToPins(PDKBoard pdkBoard);\n void switchToDescription(PDKPin pin);\n}",
"public interface IFragmentView {\n public Activity getActivity();\n public void onItemClick(int position);\n}",
"public interface OnFragmentInteractionListener {\n void onMainFragmentInteraction(String string);\n }",
"@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n if (context instanceof RequestFragmentInterface) {\n mInterface = (RequestFragmentInterface) context;\n } else {\n throw new RuntimeException(context.toString()\n + \" must implement OnFragmentInteractionListener\");\n }\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onCallBellPressed(MessageReason reason);\n }",
"void onFragmentInteraction();",
"void onFragmentInteraction();",
"void onFragmentInteraction();",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n\n\n void onFragmentInteraction(String mId, String mProductName, String mItemRate, int minteger, int update);\n }",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onComidaSelected(int comidaId);\n }",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Qualification q);\n }",
"public interface OnFragmentInteractionListener {\n void onReceiverAcceptRequest(int nextState, String requestId);\n }",
"public interface FragMainLife\n{\n\tpublic void onResumeFragMainLife();\n}",
"public interface OnFragmentListener {\n\n void onAction(Intent intent);\n}",
"public interface IBaseFragmentActivity {\n void onFragmentExit(BaseFragment fragment);\n\n void onFragmentStartLoading(BaseFragment fragment);\n\n void onFragmentFinishLoad(BaseFragment fragment);\n}",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(String string);\n }",
"void onFragmentInteraction(Object ref);",
"public interface OnParametersFragmentInteractionListener {\n public void startTask();\n }",
"public interface OnFragmentInteractionListener {\n // Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Parcelable selectedItem);\n }",
"public interface FragmentInterface {\r\n void fragmentBecameVisible();\r\n}",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(String key);\n }",
"public interface OnFragmentInteractionListener {\n void newList();\n\n void searchList();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void pasarALista();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n\n /**\n * This interface's single method. The hosting Activity must implement this interface and\n * provide an implementation of this method so that this Fragment can communicate with the\n * Activity.\n *\n * @param spotId\n */\n// void onFragmentInteraction(Uri uri);\n void onFragmentInteraction(int spotId);\n// void onFragmentInteraction(LatLng spotPosition);\n\n }",
"public interface MainGameActivityCallBacks {\n public void onMsgFromFragmentToMainGame(String sender, String strValue);\n}",
"public interface IFragment {\n void onFragmentRefresh();\n\n void onMenuClick();\n}",
"public interface FragmentInterface {\n\n void onCreate();\n\n void initLayout();\n\n void updateLayout();\n\n void sendInitialRequest();\n}",
"public interface OnFragmentInteractionListener {\n void onFragmentInteraction(String accessToken, String network);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(View v);\n }",
"public interface OnFragmentInteractionListener {\n void swapFragments(SetupActivity.SetupActivityFragmentType type);\n\n void addServer(String name, String ipAddress, String port);\n }",
"public interface OnFragmentInteractionListener {\n\t\tvoid restUp(IGameState gameState);\n\t\tvoid restartGame();\n\t}",
"public interface OnFragmentInteractionListener\n {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface PersonalFragmentView extends BaseMvpView {\n\n}",
"public interface OnFragmentInteractionListener {\n void onFinishCreatingRequest();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"void onFragmentInteraction(View v);",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(ArrayList<Recepie> recepieList);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(String id);\n }",
"void onFragmentInteractionMain();",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void showRestaurantDetail(Map<String, Object> objectMap);\n\n public void showAddRestaurantFragment(String location);\n }",
"public interface FragmentNavigator {\n\n void SwitchFragment(Fragment fragment);\n}",
"public interface FragmentModellnt {\n void FragmentM(OnFinishListener onFinishListener,String dataId);\n}",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n //void onFragmentInteraction(Uri uri);\n }",
"void onFragmentInteraction(String id);",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(ArrayList naleznosci, String KLUCZ);\n }",
"public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onEditFragmentInteraction(Student student);\r\n }",
"public interface OnFragmentInteractionListener {\n void onStartFragmentStarted();\n\n void onStartFragmentStartTracking();\n\n void onStartFragmentStopTracking();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n Long onFragmentInteraction();\n }",
"public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n void onFragmentInteraction(String id);\n}",
"public interface IBaseFragment extends IBaseView {\n /**\n * 出栈到目标fragment\n * @param targetFragmentClass 目标fragment\n * @param includeTargetFragment 是否包涵目标fragment\n * true 目标fragment也出栈\n * false 出栈到目标fragment,目标fragment不出栈\n */\n void popToFragment(Class<?> targetFragmentClass, boolean includeTargetFragment);\n\n /**\n * 跳转到新的fragment\n * @param supportFragment 新的fragment继承SupportFragment\n */\n void startNewFragment(@NonNull SupportFragment supportFragment);\n\n /**\n * 跳转到新的fragment并出栈当前fragment\n * @param supportFragment\n */\n void startNewFragmentWithPop(@NonNull SupportFragment supportFragment);\n\n /**\n * 跳转到新的fragment并返回结果\n * @param supportFragment\n * @param requestCode\n */\n void startNewFragmentForResult(@NonNull SupportFragment supportFragment,int requestCode);\n\n /**\n * 设置fragment返回的result\n * @param requestCode\n * @param bundle\n */\n void setOnFragmentResult(int requestCode, Bundle bundle);\n\n /**\n * 跳转到新的Activity\n * @param clz\n */\n void startNewActivity(@NonNull Class<?> clz);\n\n /**\n * 携带数据跳转到新的Activity\n * @param clz\n * @param bundle\n */\n void startNewActivity(@NonNull Class<?> clz,Bundle bundle);\n\n /**\n * 携带数据跳转到新的Activity并返回结果\n * @param clz\n * @param bundle\n * @param requestCode\n */\n void startNewActivityForResult(@NonNull Class<?> clz,Bundle bundle,int requestCode);\n\n /**\n * 当前Fragment是否可见\n * @return true 可见,false 不可见\n */\n boolean isVisiable();\n\n /**\n * 获取当前fragment绑定的activity\n * @return\n */\n Activity getBindActivity();\n\n}",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onSocialLoginInteraction();\n }",
"public interface OnFragmentInteractionListener {\n /**\n * On fragment interaction.\n *\n * @param uri the uri\n */\n// TODO: Update argument type and name\n public void onFragmentInteraction(Uri uri);\n }",
"public interface OnFragmentListener {\n void onClick(Fragment fragment);\n}",
"public interface OnFragmentInteractionListener {\n void playGame(Uri location);\n }",
"public interface LoginFragmentListener {\n public void OnRegisterClicked();\n public void OnLoginClicked(String User, String Pass);\n}",
"public interface MoveFragment {\n\n\n public void moveFragment(Fragment selectedFragment);\n\n}",
"public interface ChangeFragmentListener {\n void changeFragment();\n}",
"public interface OnProductItemFragmentInteraction{\r\n public void itemSelected(Producto product);\r\n }",
"public interface FragmentInterface {\n public void fragmentResult(Fragment fragment, String title);\n}",
"@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n //this registers this fragment to recieve any EventBus\n EventBus.getDefault().register(this);\n }",
"void onFragmentInteraction(int position);",
"public interface AddFarmFragmentView extends BaseView {\n\n\n}",
"void OpenFragmentInteraction();",
"public interface OnFragmentInteractionListener {\n\t\t// TODO: Update argument type and name\n\t\tpublic void onFragmentInteraction(Uri uri);\n\t}",
"public interface FragmentDataObserver {\n void getDataFromActivity(String data);\n\n}",
"public interface OnFragInteractionListener {\n\n // replace top fragment with this fragment\n interface OnMainFragInteractionListener {\n void onWifiFragReplace();\n void onHistoryFragReplace();\n void onHistoryWithOsmMapFragReplace();\n void onMainFragReplace();\n }\n\n // interface for WifiPresenterFragment\n interface OnWifiScanFragInteractionListener {\n void onGetDataAfterScanWifi(ArrayList<WifiLocationModel> list);\n void onAllowToSaveWifiHotspotToDb(String ssid, String pass, String encryption, String bssid);\n }\n\n // interface for HistoryPresenterFragment\n interface OnHistoryFragInteractionListener {\n // get wifi info\n void onGetWifiHistoryCursor(Cursor cursor);\n // get mobile network generation\n void onGetMobileHistoryCursor(Cursor cursor);\n // get wifi state and date\n void onGetWifiStateAndDateCursor(Cursor cursor);\n }\n\n interface OnMapFragInteractionListerer {\n void onGetWifiLocationCursor(Cursor cursor);\n }\n}",
"public interface PesonageFragmentView extends MvpView {\n\n}",
"public interface OnUsersFragmentInteractionListener {\n void onListFragmentInteraction(User item);\n }",
"public interface MainScreeInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteractionMain();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onClickNextTurn();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction();\n\n void changeBottomNavSelection(int menuItem);\n }",
"public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n}",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }",
"public interface OnFragmentInteractionListener {\n void onSignoutClicked();\n\n void onExtraScopeRequested();\n }",
"public interface OnListFragmentInteractionListener {\n void onListFragmentInteraction(Note note);\n}",
"interface OnMainFragInteractionListener {\n void onWifiFragReplace();\n void onHistoryFragReplace();\n void onHistoryWithOsmMapFragReplace();\n void onMainFragReplace();\n }"
] |
[
"0.7323901",
"0.720826",
"0.71346456",
"0.712432",
"0.71223646",
"0.7014406",
"0.6975986",
"0.6975986",
"0.6975986",
"0.6973731",
"0.69676983",
"0.69656146",
"0.6960717",
"0.69542384",
"0.6943149",
"0.6933716",
"0.69288176",
"0.69264686",
"0.6922715",
"0.6909953",
"0.6902666",
"0.68968815",
"0.6894074",
"0.68821484",
"0.68811965",
"0.6875028",
"0.686441",
"0.686059",
"0.68592566",
"0.68580437",
"0.68551767",
"0.6844014",
"0.6839444",
"0.68299013",
"0.681755",
"0.68166876",
"0.680979",
"0.6785827",
"0.6769247",
"0.6769247",
"0.6769247",
"0.6769247",
"0.6769247",
"0.6769247",
"0.6769247",
"0.6769247",
"0.6769247",
"0.6768809",
"0.6765993",
"0.67613",
"0.675552",
"0.6753091",
"0.6698583",
"0.66805714",
"0.6673642",
"0.6670421",
"0.66695374",
"0.66619104",
"0.6660703",
"0.66551346",
"0.665202",
"0.6643579",
"0.6643505",
"0.6643505",
"0.6643505",
"0.6643505",
"0.6643505",
"0.6643505",
"0.6643505",
"0.6643505",
"0.6643505",
"0.6643505",
"0.6643505",
"0.6638241",
"0.66361165",
"0.66311413",
"0.662524",
"0.66250277",
"0.6618358",
"0.6609611",
"0.66091406",
"0.6608578",
"0.66044116",
"0.6596916",
"0.65967715",
"0.65872806",
"0.6572124",
"0.6567792",
"0.65597993",
"0.65597713",
"0.6555063",
"0.6550386",
"0.65484476",
"0.65428716",
"0.6538933",
"0.65341264",
"0.65341264",
"0.65341264",
"0.6519295",
"0.65169215",
"0.65164673"
] |
0.0
|
-1
|
TODO: Update argument type and name
|
void onFragmentInteraction(Uri uri);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n public String getFirstArg() {\n return name;\r\n }",
"@Override\n public int getNumberArguments() {\n return 1;\n }",
"java.lang.String getArg();",
"@Override\n public int getArgLength() {\n return 4;\n }",
"Argument createArgument();",
"@Override\r\n\tpublic String getFirstArg() {\n\t\treturn null;\r\n\t}",
"@Override\n protected PacketArgs.ArgumentType[] getArgumentTypes() {\n return new PacketArgs.ArgumentType[] { PacketArgs.ArgumentType.String };\n }",
"@Override\n\tpublic void traverseArg(UniArg node) {\n\t}",
"@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FArgument src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}",
"Object[] getArguments();",
"Object[] getArguments();",
"String getArguments();",
"@Override\n\tpublic void handleArgument(ArrayList<String> argument) {\n\t\t\n\t}",
"@Override\n public final int parseArguments(Parameters params) {\n return 1;\n }",
"ArgList createArgList();",
"public Object[] getArguments() { return args;}",
"@Override\n public String getInputArg(String argName) {\n Log.w(TAG, \"Test input args is not supported.\");\n return null;\n }",
"@Override\n protected String getName() {return _parms.name;}",
"private static AbstractType<?>[] argumentsType(@Nullable StringType algorithmArgumentType)\n {\n return algorithmArgumentType == null\n ? DEFAULT_ARGUMENTS\n : new AbstractType<?>[]{ algorithmArgumentType };\n }",
"uicargs createuicargs();",
"java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n getArgumentList();",
"java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n getArgumentList();",
"public static void main(String[] args) {\n\t\t\tmeth(args);\r\n\t\t\targument_test:meth(args);\r\n\t}",
"@Override\r\n\tpublic int getSecondArg() {\n\t\treturn 0;\r\n\t}",
"public getType_args(getType_args other) {\n }",
"Object[] args();",
"protected void validateArguments( Object[] args ) throws ActionExecutionException {\n\n Annotation[][] annotations = method.getParameterAnnotations();\n for (int i = 0; i < annotations.length; i++) {\n\n Annotation[] paramAnnotations = annotations[i];\n\n for (Annotation paramAnnotation : paramAnnotations) {\n if (paramAnnotation instanceof Parameter) {\n Parameter paramDescriptionAnnotation = (Parameter) paramAnnotation;\n ValidationType validationType = paramDescriptionAnnotation.validation();\n\n String[] validationArgs;\n\n // if we are checking for valid constants, then the\n // args array should contain\n // the name of the array holding the valid constants\n if (validationType == ValidationType.STRING_CONSTANT\n || validationType == ValidationType.NUMBER_CONSTANT) {\n try {\n String arrayName = paramDescriptionAnnotation.args()[0];\n\n // get the field and set access level if\n // necessary\n Field arrayField = method.getDeclaringClass().getDeclaredField(arrayName);\n if (!arrayField.isAccessible()) {\n arrayField.setAccessible(true);\n }\n Object arrayValidConstants = arrayField.get(null);\n\n // convert the object array to string array\n String[] arrayValidConstatnsStr = new String[Array.getLength(arrayValidConstants)];\n for (int j = 0; j < Array.getLength(arrayValidConstants); j++) {\n arrayValidConstatnsStr[j] = Array.get(arrayValidConstants, j).toString();\n }\n\n validationArgs = arrayValidConstatnsStr;\n\n } catch (IndexOutOfBoundsException iobe) {\n // this is a fatal error\n throw new ActionExecutionException(\"You need to specify the name of the array with valid constants in the 'args' field of the Parameter annotation\");\n } catch (Exception e) {\n // this is a fatal error\n throw new ActionExecutionException(\"Could not get array with valid constants - action annotations are incorrect\");\n }\n } else {\n validationArgs = paramDescriptionAnnotation.args();\n }\n\n List<BaseType> typeValidators = createBaseTypes(paramDescriptionAnnotation.validation(),\n paramDescriptionAnnotation.name(),\n args[i], validationArgs);\n //perform validation\n for (BaseType baseType : typeValidators) {\n if (baseType != null) {\n try {\n baseType.validate();\n } catch (TypeException e) {\n throw new InvalidInputArgumentsException(\"Validation failed while validating argument \"\n + paramDescriptionAnnotation.name()\n + e.getMessage());\n }\n } else {\n log.warn(\"Could not perform validation on argument \"\n + paramDescriptionAnnotation.name());\n }\n }\n }\n }\n }\n }",
"@Test\n void getArgString() {\n }",
"@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FEnumerator src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"int getArgIndex();",
"@Override\n\tpublic void addArg(FormulaElement arg){\n\t}",
"public Type[] getArgumentTypes() {\n/* 236 */ return Type.getArgumentTypes(this.desc);\n/* */ }",
"@Override\n public Object[] getArguments() {\n return null;\n }",
"public login_1_argument() {\n }",
"Optional<String[]> arguments();",
"private Main(String... arguments) {\n this.operations = new ArrayDeque<>(List.of(arguments));\n }",
"@Override\n\tprotected GATKArgumentCollection getArgumentCollection() {\n\t\treturn argCollection;\n\t}",
"protected void sequence_Argument(ISerializationContext context, Argument semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, TdlPackage.Literals.ARGUMENT__NAME) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TdlPackage.Literals.ARGUMENT__NAME));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getArgumentAccess().getNameSTRINGTerminalRuleCall_0_0(), semanticObject.getName());\n\t\tfeeder.finish();\n\t}",
"void setArguments(String arguments);",
"@Override\n\tpublic List<String> getArgumentDesc() {\n\t\treturn desc;\n\t}",
"OpFunctionArgAgregate createOpFunctionArgAgregate();",
"protected abstract Feature<T,?> convertArgument(Class<?> parameterType, Feature<T,?> originalArgument);",
"void visitArgument(Argument argument);",
"public Thaw_args(Thaw_args other) {\r\n }",
"@Override\r\n\tpublic List<String> getArguments()\r\n\t{\n\t\treturn null;\r\n\t}",
"private static String getArgumentString(Object arg) {\n if (arg instanceof String) {\n return \"\\\\\\\"\"+arg+\"\\\\\\\"\";\n }\n else return arg.toString();\n }",
"public interface Param {\n\n int[] args();\n String exec(ExecutePack pack);\n String label();\n}",
"@Override\n public void verifyArgs(ArrayList<String> args) throws ArgumentFormatException {\n super.checkNumArgs(args);\n _args = true;\n }",
"public abstract ValidationResults validArguments(String[] arguments);",
"public ArgumentException() {\n super(\"Wrong arguments passed to function\");\n }",
"public String getArgumentString() {\n\t\treturn null;\n\t}",
"@Override\n public String kind() {\n return \"@param\";\n }",
"@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FEnumerationType src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}",
"public void addArgumentTypeSerialization(String functionName, String argumentName, TensorType type) {\n wrappedSerializationContext.addArgumentTypeSerialization(functionName, argumentName, type);\n }",
"void setArgument(int idx,int v) \t\t{ setArgument(idx,Integer.valueOf(v)); }",
"@Override\n\tprotected byte[] getArgByte() {\n\t\treturn paramsJson.getBytes();\n\t}",
"void onArgumentsChanged();",
"com.google.protobuf.ByteString\n\t\tgetArgBytes();",
"@Override public int getNumArguments()\t\t\t{ return arg_list.size(); }",
"MyArg(int value){\n this.value = value;\n }",
"public ArgList(Object arg1) {\n super(1);\n addElement(arg1);\n }",
"public Clear_args(Clear_args other) {\r\n }",
"private ParameterInformation processArgumentReference(Argument argument,\n List<NameDescriptionType> argTypeSet,\n SequenceEntryType seqEntry,\n int seqIndex)\n {\n ParameterInformation argumentInfo = null;\n\n // Initialize the argument's attributes\n String argName = argument.getName();\n String dataType = null;\n String arraySize = null;\n String bitLength = null;\n BigInteger argBitSize = null;\n String enumeration = null;\n String description = null;\n UnitSet unitSet = null;\n String units = null;\n String minimum = null;\n String maximum = null;\n\n // Step through each command argument type\n for (NameDescriptionType argType : argTypeSet)\n {\n // Check if this is the same command argument referenced in the argument list (by\n // matching the command and argument names between the two)\n if (argument.getArgumentTypeRef().equals(argType.getName()))\n {\n boolean isInteger = false;\n boolean isUnsigned = false;\n boolean isFloat = false;\n boolean isString = false;\n\n // Check if this is an array parameter\n if (seqEntry instanceof ArrayParameterRefEntryType)\n {\n arraySize = \"\";\n\n // Store the reference to the array parameter type\n ArrayDataTypeType arrayType = (ArrayDataTypeType) argType;\n argType = null;\n\n // Step through each dimension for the array variable\n for (Dimension dim : ((ArrayParameterRefEntryType) seqEntry).getDimensionList().getDimension())\n {\n // Check if the fixed value exists\n if (dim.getEndingIndex().getFixedValue() != null)\n {\n // Build the array size string\n arraySize += String.valueOf(Integer.valueOf(dim.getEndingIndex().getFixedValue()) + 1)\n + \",\";\n }\n }\n\n arraySize = CcddUtilities.removeTrailer(arraySize, \",\");\n\n // The array parameter type references a non-array parameter type that\n // describes the individual array members. Step through each data type in the\n // parameter type set in order to locate this data type entry\n for (NameDescriptionType type : argTypeSet)\n {\n // Check if the array parameter's array type reference matches the data\n // type name\n if (arrayType.getArrayTypeRef().equals(type.getName()))\n {\n // Store the reference to the array parameter's data type and stop\n // searching\n argType = type;\n break;\n }\n }\n }\n\n // Check if a data type entry for the parameter exists in the parameter type set\n // (note that if the parameter is an array the steps above locate the data type\n // entry for the individual array members)\n if (argType != null)\n {\n long dataTypeBitSize = 0;\n\n // Check if the argument is an integer data type\n if (argType instanceof IntegerArgumentType)\n {\n IntegerArgumentType icmd = (IntegerArgumentType) argType;\n\n // Get the number of bits occupied by the argument\n argBitSize = icmd.getSizeInBits();\n\n // Get the argument units reference\n unitSet = icmd.getUnitSet();\n\n // Check if integer encoding is set to 'unsigned'\n if (icmd.getIntegerDataEncoding().getEncoding().equalsIgnoreCase(\"unsigned\"))\n {\n isUnsigned = true;\n }\n\n // Determine the smallest integer size that contains the number of bits\n // occupied by the argument\n dataTypeBitSize = 8;\n\n while (argBitSize.longValue() > dataTypeBitSize)\n {\n dataTypeBitSize *= 2;\n }\n\n // Get the argument alarm\n IntegerArgumentType.ValidRangeSet alarmType = icmd.getValidRangeSet();\n\n // Check if the argument has an alarm\n if (alarmType != null)\n {\n // Get the alarm range\n List<IntegerRangeType> alarmRange = alarmType.getValidRange();\n\n // Check if the alarm range exists\n if (alarmRange != null)\n {\n // Store the minimum alarm value\n minimum = alarmRange.get(0).getMinInclusive();\n\n // Store the maximum alarm value\n maximum = alarmRange.get(0).getMaxInclusive();\n }\n }\n\n isInteger = true;\n }\n // Check if the argument is a floating point data type\n else if (argType instanceof FloatArgumentType)\n {\n // Get the float argument attributes\n FloatArgumentType fcmd = (FloatArgumentType) argType;\n dataTypeBitSize = fcmd.getSizeInBits().longValue();\n unitSet = fcmd.getUnitSet();\n\n // Get the argument alarm\n FloatArgumentType.ValidRangeSet alarmType = fcmd.getValidRangeSet();\n\n // Check if the argument has an alarm\n if (alarmType != null)\n {\n // Get the alarm range\n List<FloatRangeType> alarmRange = alarmType.getValidRange();\n\n // Check if the alarm range exists\n if (alarmRange != null)\n {\n // Get the minimum value\n Double min = alarmRange.get(0).getMinInclusive();\n\n // Check if a minimum value exists\n if (min != null)\n {\n // Get the minimum alarm value\n minimum = String.valueOf(min);\n }\n\n // Get the maximum value\n Double max = alarmRange.get(0).getMaxInclusive();\n\n // Check if a maximum value exists\n if (max != null)\n {\n // Get the maximum alarm value\n maximum = String.valueOf(max);\n }\n }\n }\n\n isFloat = true;\n }\n // Check if the argument is a string data type\n else if (argType instanceof StringDataType)\n {\n // Get the string argument attributes\n StringDataType scmd = (StringDataType) argType;\n dataTypeBitSize = Integer.valueOf(scmd.getStringDataEncoding()\n .getSizeInBits()\n .getFixed()\n .getFixedValue());\n unitSet = scmd.getUnitSet();\n isString = true;\n }\n // Check if the argument is an enumerated data type\n else if (argType instanceof EnumeratedDataType)\n {\n EnumeratedDataType ecmd = (EnumeratedDataType) argType;\n EnumerationList enumList = ecmd.getEnumerationList();\n\n // Check if any enumeration parameters are defined\n if (enumList != null)\n {\n // Step through each enumeration parameter\n for (ValueEnumerationType enumType : enumList.getEnumeration())\n {\n // Check if this is the first parameter\n if (enumeration == null)\n {\n // Initialize the enumeration string\n enumeration = \"\";\n }\n // Not the first parameter\n else\n {\n // Add the separator for the enumerations\n enumeration += \", \";\n }\n\n // Begin building this enumeration\n enumeration += enumType.getValue() + \" | \" + enumType.getLabel();\n }\n\n argBitSize = ecmd.getIntegerDataEncoding().getSizeInBits();\n unitSet = ecmd.getUnitSet();\n\n // Check if integer encoding is set to 'unsigned'\n if (ecmd.getIntegerDataEncoding().getEncoding().equalsIgnoreCase(\"unsigned\"))\n {\n isUnsigned = true;\n }\n\n // Determine the smallest integer size that contains the number of bits\n // occupied by the argument\n dataTypeBitSize = 8;\n\n while (argBitSize.longValue() > dataTypeBitSize)\n {\n dataTypeBitSize *= 2;\n }\n\n isInteger = true;\n }\n }\n\n // Get the name of the data type from the data type table that matches the base\n // type and size of the parameter\n dataType = getMatchingDataType(dataTypeBitSize / 8,\n isInteger,\n isUnsigned,\n isFloat,\n isString,\n dataTypeHandler);\n\n // Check if the description exists\n if (argType.getLongDescription() != null)\n {\n // Store the description\n description = argType.getLongDescription();\n }\n\n // Check if the argument bit size exists\n if (argBitSize != null && argBitSize.longValue() != dataTypeBitSize)\n {\n // Store the bit length\n bitLength = argBitSize.toString();\n }\n\n // Check if the units exists\n if (unitSet != null)\n {\n List<UnitType> unitType = unitSet.getUnit();\n\n // Check if the units is set\n if (!unitType.isEmpty())\n {\n // Store the units\n units = unitType.get(0).getContent();\n }\n }\n\n argumentInfo = new ParameterInformation(argName,\n dataType,\n arraySize,\n bitLength,\n enumeration,\n units,\n minimum,\n maximum,\n description,\n 0,\n seqIndex);\n }\n\n break;\n }\n }\n\n return argumentInfo;\n }",
"public abstract interface QueryArgs {\n\n /** Return the catalog associated with this object */\n public Catalog getCatalog();\n\n /** Set the value for the ith parameter */\n public void setParamValue(int i, Object value);\n\n /** Set the value for the parameter with the given label */\n public void setParamValue(String label, Object value);\n\n /** Set the min and max values for the parameter with the given label */\n public void setParamValueRange(String label, Object minValue, Object maxValue);\n\n /** Set the int value for the parameter with the given label */\n public void setParamValue(String label, int value);\n\n /** Set the double value for the parameter with the given label */\n public void setParamValue(String label, double value);\n\n /** Set the double value for the parameter with the given label */\n public void setParamValueRange(String label, double minValue, double maxValue);\n\n /** Set the array of parameter values directly. */\n public void setParamValues(Object[] values);\n\n /** Get the value of the ith parameter */\n public Object getParamValue(int i);\n\n /** Get the value of the named parameter\n *\n * @param label the parameter name or id\n * @return the value of the parameter, or null if not specified\n */\n public Object getParamValue(String label);\n\n /**\n * Get the value of the named parameter as an integer.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public int getParamValueAsInt(String label, int defaultValue);\n\n /**\n * Get the value of the named parameter as a double.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public double getParamValueAsDouble(String label, double defaultValue);\n\n /**\n * Get the value of the named parameter as a String.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public String getParamValueAsString(String label, String defaultValue);\n\n\n /**\n * Return the object id being searched for, or null if none was defined.\n */\n public String getId();\n\n /**\n * Set the object id to search for.\n */\n public void setId(String id);\n\n\n /**\n * Return an object describing the query region (center position and\n * radius range), or null if none was defined.\n */\n public CoordinateRadius getRegion();\n\n /**\n * Set the query region (center position and radius range) for\n * the search.\n */\n public void setRegion(CoordinateRadius region);\n\n\n /**\n * Return an array of SearchCondition objects indicating the\n * values or range of values to search for.\n */\n public SearchCondition[] getConditions();\n\n /** Returns the max number of rows to be returned from a table query */\n public int getMaxRows();\n\n /** Set the max number of rows to be returned from a table query */\n public void setMaxRows(int maxRows);\n\n\n /** Returns the query type (an optional string, which may be interpreted by some catalogs) */\n public String getQueryType();\n\n /** Set the query type (an optional string, which may be interpreted by some catalogs) */\n public void setQueryType(String queryType);\n\n /**\n * Returns a copy of this object\n */\n public QueryArgs copy();\n\n /**\n * Optional: If not null, use this object for displaying the progress of the background query\n */\n public StatusLogger getStatusLogger();\n}",
"@Override\n public void doExeception(Map<String, Object> args)\n {\n \n }",
"@Override\n public void doExeception(Map<String, Object> args)\n {\n \n }",
"@Override\n\tprotected Collection<ArgumentTypeDescriptor> getArgumentTypeDescriptors() {\n\t\treturn Arrays.asList(new VCFWriterArgumentTypeDescriptor(engine, System.out, bisulfiteArgumentSources), new SAMReaderArgumentTypeDescriptor(engine),\n\t\t\t\tnew SAMFileWriterArgumentTypeDescriptor(engine, System.out), new OutputStreamArgumentTypeDescriptor(engine, System.out));\n\t}",
"@Override\n public int getArgent() {\n return _argent;\n }",
"private static @NonNull String resolveInputName(@NonNull Argument<?> argument) {\n String inputName = argument.getAnnotationMetadata().stringValue(Bindable.NAME).orElse(null);\n if (StringUtils.isEmpty(inputName)) {\n inputName = argument.getName();\n }\n return inputName;\n }",
"private Object[] getArguments (String className, Object field)\n\t{\n\t\treturn ((field == null) ? new Object[]{className} : \n\t\t\tnew Object[]{className, field});\n\t}",
"PermissionSerializer (GetArg arg) throws IOException, ClassNotFoundException {\n\tthis( \n\t create(\n\t\targ.get(\"targetType\", null, Class.class),\n\t\targ.get(\"type\", null, String.class),\n\t\targ.get(\"targetName\", null, String.class),\n\t\targ.get(\"targetActions\", null, String.class) \n\t )\n\t);\n }",
"public Type getArgumentDirection() {\n return direction;\n }",
"public String argTypes() {\n return \"I\";//NOI18N\n }",
"public static void main(String arg[]) {\n\n }",
"godot.wire.Wire.Value getArgs(int index);",
"@Override\n protected String[] getArguments() {\n String[] args = new String[1];\n args[0] = _game_file_name;\n return args;\n }",
"public void setArgs(java.lang.String value) {\n this.args = value;\n }",
"private Argument(Builder builder) {\n super(builder);\n }",
"@Override\n public void execute(String[] args) {\n\n }",
"@Override\n\tprotected final void setFromArgument(CommandContext<ServerCommandSource> context, String name) {\n\t}",
"UUID createArgument(ArgumentCreateRequest request);",
"@Override\n public void initialise(String[] arguments) {\n\n }",
"public static ParameterExpression parameter(Class type, String name) { throw Extensions.todo(); }",
"protected abstract void parseArgs() throws IOException;"
] |
[
"0.7164074",
"0.6946075",
"0.6714363",
"0.65115863",
"0.63969076",
"0.6375468",
"0.63481104",
"0.63162106",
"0.6260299",
"0.6208487",
"0.6208487",
"0.62070644",
"0.6197276",
"0.61806154",
"0.6177103",
"0.61530507",
"0.61472267",
"0.61243707",
"0.60771817",
"0.6054482",
"0.59906125",
"0.59906125",
"0.5984017",
"0.59791875",
"0.5977681",
"0.59532714",
"0.5946838",
"0.59457266",
"0.59452903",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.5909717",
"0.5889277",
"0.588111",
"0.5871162",
"0.5866624",
"0.58613646",
"0.58519953",
"0.58381283",
"0.58083445",
"0.58059824",
"0.5795826",
"0.57816726",
"0.57670826",
"0.57556796",
"0.57471323",
"0.57418406",
"0.5729463",
"0.57291526",
"0.5716928",
"0.5713024",
"0.56974274",
"0.56782854",
"0.56723106",
"0.5664594",
"0.5664104",
"0.5660337",
"0.5652865",
"0.5647883",
"0.5642134",
"0.5635645",
"0.5634968",
"0.562251",
"0.56210977",
"0.56167537",
"0.56138444",
"0.56044126",
"0.56044126",
"0.5602371",
"0.56012225",
"0.55986875",
"0.55893147",
"0.5588273",
"0.5583255",
"0.5582767",
"0.55681497",
"0.55626017",
"0.55577534",
"0.55524325",
"0.5549442",
"0.55378276",
"0.5536797",
"0.5527675",
"0.5511817",
"0.55099154",
"0.550257"
] |
0.0
|
-1
|
Join a room using it's id
|
private void joinRoom(int roomId) {
// Reset room state variables
messages.clear();
ChatAdapter adapter = new ChatAdapter(getApplicationContext(),messages);
adapter.notifyDataSetChanged();
chatRecyclerView.setAdapter(adapter);
this.destinationPublicKey = null;
// Emit room join request.
this.socket.emit("join", roomId, nickname);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void joinRoom(int roomId) throws RoomNotFoundException, RoomPermissionException, IOException;",
"@Override\n\tpublic SocketIOSocket join(String room) {\n\t\tString roomName = namespace.getName() + \"/\" + room;\n\t\tthis.manager.onJoin(this.id, roomName);\n//\t\tthis.manager.store.publish('join', this.id, name);\n\t\treturn this;\n\t}",
"@Override\n public void onTombstoneLinkClicked(String roomId, String senderId) {\n showInitLoading();\n\n // Extract the server name\n String serverName = MXPatterns.extractServerNameFromId(senderId);\n\n List<String> viaServers = null;\n\n if (serverName != null) {\n viaServers = Collections.singletonList(serverName);\n }\n\n mSession.joinRoom(roomId, viaServers, new ApiCallback<String>() {\n @Override\n public void onNetworkError(Exception e) {\n hideInitLoading();\n Toast.makeText(getActivity(), e.getLocalizedMessage(), Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onMatrixError(MatrixError e) {\n hideInitLoading();\n Toast.makeText(getActivity(), e.getLocalizedMessage(), Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onUnexpectedError(Exception e) {\n hideInitLoading();\n Toast.makeText(getActivity(), e.getLocalizedMessage(), Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onSuccess(String info) {\n hideInitLoading();\n\n // Open the room\n if (isAdded()) {\n Intent intent = new Intent(getActivity(), VectorRoomActivity.class);\n intent.putExtra(VectorRoomActivity.EXTRA_ROOM_ID, info);\n intent.putExtra(VectorRoomActivity.EXTRA_MATRIX_ID, mSession.getCredentials().userId);\n getActivity().startActivity(intent);\n getActivity().finish();\n }\n }\n });\n }",
"public void joinChatRoom(IChatroom room) {\n\t\tview.append(\"Join ChatRoom\" + room.getName());\n\t\tcountRoom++;\n\t\tIChatroom chatroom = new Chatroom(\"Chatroom\" + countRoom);\n\t\tIChatServer chatServer = new ChatServer(user, chatroom);\n\t\ttry {\n\t\t\tview.append(\"Start joining..\");\n\t\t\tIChatServer chatStub = (IChatServer) UnicastRemoteObject.exportObject(chatServer,\n\t\t\t\t\tIChatServer.BOUND_PORT + countRoom);\n\t\t\tfor (IChatServer members : room.getChatServers()) {\n\t\t\t\tchatroom.addChatServer(members);\n\t\t\t\tmembers.joinChatroom(chatStub);\n\t\t\t}\n\t\t\tchatroom.addChatServer(chatStub);\n\t\t\tuser.addRoom(chatroom);\n\t\t\tregistry.rebind(IChatServer.BOUND_NAME + chatroom.hashCode(), chatStub);\n\t\t\tHashSet<IChatServer> proxyChatServers = new HashSet<IChatServer>();\n\t\t\tfor (IChatServer stub : chatroom.getChatServers()) {\n\t\t\t\tProxyIChatServer proxyChatServer = new ProxyIChatServer(stub);\n\t\t\t\tproxyChatServers.add(proxyChatServer);\n\t\t\t}\n\t\t\tIMain2MiniAdpt miniMVCAdpt = view.makeMini(chatServer, proxyChatServers);\n\t\t\tminiMVCAdpts.put(chatroom, miniMVCAdpt);\n\t\t\tcountRoom++;\n\t\t\tview.append(\"Success!\");\n\t\t\t//\t\t\tminiMVCAdpt.refresh();\n\t\t} catch (Exception e) {\n\t\t\tview.append(\"Fail to join the room!\");\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"RoomInfo room(int id);",
"@Override\n public void onClick(View v) {\n Log.d(TAG,\"JOINING ROOMID\" + chat_list.get(position).roomhash );\n mSocket.emit(\"CreateRoom\",chat_list.get(position).roomhash,chat_list.get(position).gcmID);\n Intent intent2 = new Intent(CTX, ChatInstance.class);\n intent2.putExtra(\"roomnum\", chat_list.get(position).roomhash);\n\n CTX.startActivity(intent2);\n\n }",
"public void joinWave(String roomID) {\n\t\t\r\n\t}",
"public void joinChannel() {\n String userId = AuthenticationSingleton.getAdaptedInstance().getUid();\n String token1 = generateToken(userId);\n mRtcEngine.setAudioProfile(Constants.AUDIO_SCENARIO_SHOWROOM, Constants.AUDIO_SCENARIO_GAME_STREAMING);\n int joinStatus = mRtcEngine.joinChannelWithUserAccount(token1, appointment.getId(), userId);\n if (joinStatus == SUCCESS_CODE) {\n appointment.addInCallUser(new DatabaseUser(userId));\n }\n }",
"void setRoomId(String roomId);",
"public void joinGame(int lobbyId)\n {\n //call Client controller's joinLobby method with the selected lobby's\n //id\n clientController.joinGame(lobbyId);\n }",
"public void join() throws OperationFailedException\n {\n if (chatRoomSession == null && chatInvitation == null)\n { // the session is not set and we don't have a chatInvitatoin\n // so we try to join the chatRoom again\n ChatRoomManager chatRoomManager =\n provider.getAimConnection().getChatRoomManager();\n chatRoomSession = chatRoomManager.joinRoom(this.getName());\n chatRoomSession.addListener(new AdHocChatRoomSessionListenerImpl(\n this));\n }\n else if (chatInvitation != null)\n {\n chatRoomSession = chatInvitation.accept();\n chatRoomSession.addListener(new AdHocChatRoomSessionListenerImpl(\n this));\n }\n\n // We don't specify a reason.\n opSetMuc.fireLocalUserPresenceEvent(this,\n LocalUserAdHocChatRoomPresenceChangeEvent.LOCAL_USER_JOINED, null);\n }",
"long getRoomId();",
"public void setRoomId( String roomId ) {\n this.roomId = roomId;\n }",
"public Room findRoomById(Long id);",
"public void setRoomId(String roomId) {\n this.roomId = roomId;\n }",
"String getRoomId();",
"void join(User user);",
"Client join(Participant participant);",
"public Room createRoom(Room room);",
"void joinJob(long jobId, long joinJobId);",
"private void joinChannel() {\n // Get the User Id for the current user\n final String userId = mUser.getUid();\n // User Id set to 0 for auto handling by Agora\n int uid = 0;\n // Token object\n RtcTokenBuilder token = new RtcTokenBuilder();\n // Time stamp used for length of token\n int timestamp = (int)(System.currentTimeMillis() / 1000 + expirationTimeInSeconds);\n\n String uId = Objects.requireNonNull(mAuth.getCurrentUser()).getUid();\n\n addCallToDb(uId); // Add current user to db for active calls\n\n try {\n // Create a token using Agora Sdk\n agora_token = token.buildTokenWithUid(getString(R.string.agora_app_id), getString(R.string.agora_app_certificate),\n channelName, uid, RtcTokenBuilder.Role.Role_Publisher, timestamp);\n } catch (Exception e) {\n e.printStackTrace();\n }\n // Join the channel with the given token and channel name\n mRtcEngine.joinChannel(agora_token, channelName, \"\", uid);\n }",
"Join createJoin();",
"public void setRoomId(Integer roomId) {\n this.roomId = roomId;\n }",
"private void joinGame(int gameId){\n\n }",
"void joinGame(String playeruuid);",
"@Override\n\tpublic void joinLobby(int playerID, int sessionID){\n\t\tif(sessionID == NO_LOBBY_ID)\n\t\t\treturn;\n\t\t//check if the player is already in an other lobby\n\t\tint playerSession = getSessionFromClient(playerID);\n\n\t\tif(playerSession == NO_LOBBY_ID){\n\t\t\tlobbyMap.get(sessionID).addPlayer(getPlayerMap().get(playerID));\n\t\t\tDebugOutputHandler.printDebug(\"Player \"+getPlayerMap().get(playerID).getName()+\" now is in lobby \" + getPlayerMap().get(playerID).getSessionID());\n\t\t}\n\t}",
"private static void addGameJoinLink(GameDto gameDto) {\n if (gameDto.getPlayers()[0] == null || gameDto.getPlayers()[1] == null) {\n Link joinLink =\n linkTo(methodOn(GameController.class).join(gameDto.get_id(), null)).withRel(\"join\");\n gameDto.add(joinLink);\n }\n }",
"private void doJoin(){\n\n final String aggHost = System.getProperty(\"aggregate.host.uri\", \"\");\n if (aggHost.isEmpty()) {\n command(\"/aggregate\", \"addBot\", Record.of()\n .slot(\"node\", nodeUri().toString())\n .slot(\"key\", System.getProperty(\"device.name\", \"\")));\n } else {\n command(aggHost, \"/aggregate\", \"addBot\", Record.of()\n .slot(\"host\", hostUriHack().toString()) // ws://192.168.0.151:9001\n .slot(\"node\", nodeUri().toString()) // /bot/6\n .slot(\"key\", System.getProperty(\"device.name\", \"\")));// RaspiBot6|192.168.0.151:9001\n }\n }",
"public void setRoomId(int value) {\n this.roomId = value;\n }",
"private void joinNewClient() {\r\n\t\t\tString clientName = _clientView.getUserName();\r\n\t\t\tif(clientName == null)\r\n\t\t\t\treturn;\r\n\t\t\t_clientModel.connectToServer();\r\n\t\t\t_clientModel.joinChat(clientName);\r\n\t\t}",
"public String getRoomId() {\n return roomId;\n }",
"public void setId(int newId) {\n roomId = newId;\n }",
"public void setRoomId(Long roomId) {\n\t\tthis.roomId = roomId;\n\t}",
"@Query(\"from Room where id = :roomId\")\n\tRoom getRoomById(@Param(\"roomId\") long id);",
"public void setRoomID(byte id)\r\n\t {\r\n\t this.id = id;\r\n\t }",
"public void join(String ip,int port, int myPort){\r\n\t\ttry{\r\n\t\t\tXmlRpcSender.execute(\"joinRequest\", new Object[] { this.ip, String.valueOf(this.port), this.id }, ip, port);\r\n\t\t\tthis.isJoined = true;\r\n\t\t}catch(Exception e ){e.printStackTrace();}\t\r\n\t}",
"public void enterRoom(Room room) {\n currentRoom = room;\n }",
"public long getRoomId() {\n return roomId_;\n }",
"public RoomModel SelectRoomsById(int id)\r\n\t\t{\r\n\t\t\tRoomModel\trm\t\t\t\t=\tnew RoomModel();\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tp\t\t\t\t\t\t=\tcon.prepareStatement(\"select room.*,building.buil_id,building.buil_name,floor.floor_name,room_rent.rent,company_reg.comp_name from room inner join floor on floor.floor_id = room.floor_id inner join building on floor.buil_id=building.buil_id inner join room_rent on room.room_id=room_rent.room_id left join company_reg on company_reg.room_id = room.room_id where room.room_id = ? order by room.room_id asc\");\r\n\t\t\t\tp.setInt(1,id);\r\n\t\t\t\tResultSet\trs\t\t\t=\tp.executeQuery();\r\n\t\t\t\t//System.out.print(p);\r\n\t\t\t\twhile(rs.next())\r\n\t\t\t\t{\r\n\t\t\t\t\trm.setRoom_id(rs.getInt(1));\r\n\t\t\t\t\trm.setFloor_id(rs.getInt(2));\r\n\t\t\t\t\trm.setR_name(rs.getString(3));\r\n\t\t\t\t\trm.setS_feet(rs.getFloat(4));\r\n\t\t\t\t\trm.setStatus(rs.getString(6));\r\n\t\t\t\t\trm.setOccupied(rs.getInt(7));\r\n\t\t\t\t\trm.setDoor_num(rs.getString(8));\r\n\t\t\t\t\trm.setBuil_id(rs.getInt(9));\r\n\t\t\t\t\trm.setBuil_name(rs.getString(10));\r\n\t\t\t\t\trm.setFloor_name(rs.getString(11));\r\n\t\t\t\t\trm.setRent(rs.getFloat(12));\r\n\t\t\t\t\trm.setOccupied_name(rs.getString(13));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) \r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\treturn rm;\r\n\t\t}",
"public Builder setRoomId(long value) {\n copyOnWrite();\n instance.setRoomId(value);\n return this;\n }",
"private void providerJoinRoom(String roomName) {\n Room room = roomManager.getRoomOrCreate(roomName);\n\n WebUserSession provider = room.getProvider();\n\n // Start the session\n WebRtcEndpoint providerWebRtcEp = room.createProviderWebRtcEp(provider);\n\n if (room.getAlexaWebRtcEp() != null) {\n room.setUpPipeline();\n }\n\n // Generate SDP answer for caller(Provider)\n log.info(\"Provider SDP: {} \", provider.getSdpOffer());\n String callerSdpAnswer = providerWebRtcEp.processOffer(provider.getSdpOffer());\n JsonObject startCommunication = new JsonObject();\n startCommunication.addProperty(\"id\", \"startCommunication\");\n startCommunication.addProperty(\"sdpAnswer\", callerSdpAnswer);\n\n try {\n provider.sendMessage(startCommunication);\n } catch (IOException e) {\n e.printStackTrace();\n }\n log.info(\"SDP answer is generated for provider. \" + callerSdpAnswer);\n providerWebRtcEp.gatherCandidates();\n }",
"public Long getRoomId() {\n\t\treturn roomId;\n\t}",
"@Override\n public Room getRoom(String roomId) {\n return getRoom(roomId, true);\n }",
"@Override\n public int getRoomId() {\n return room.getRoomId();\n }",
"public void setRoomid(Integer roomid) {\r\n this.roomid = roomid;\r\n }",
"protected void makeRoom(String roomID)\n {\n mChat.child(roomID).child(\"sender1\").setValue(uid1);\n mChat.child(roomID).child(\"sender2\").setValue(uid);\n goToChat(roomID);\n }",
"public void addRoom(Chatroom room){\n\n }",
"GameJoinResult join(Player player);",
"public int getRoomId() {\n return roomId;\n }",
"RollingResult start(String roomId);",
"public boolean joinLobby(Lobby lobby)\n {\n if (lobby.assignSlot(this))\n {\n this.currentLobby = lobby;\n return true;\n }\n return false;\n }",
"public int getId() {\n return (roomId);\n }",
"public void sendJoinParty(String nomUser, int idParty) {\r\n\t\tsend(JSONEncode.encodeJoinParty(nomUser, idParty));\r\n\t\tnew MonLogClient().add(\"Le joueur \"+nomUser+\" a rejoint la partie \"+idParty, Level.INFO);\r\n\t}",
"public void moveToRoom(Rooms room) {\n this.currentRoom = room;\n }",
"private void onJoinRoom(String roomName) {\n if (roomEntries.containsKey(roomName)) {\n backBTN.setEnabled(chatController.getJoinedRooms().size() > 0);\n JPanel panel = roomEntries.get(roomName);\n panel.removeAll();\n renderRoom(roomName, panel);\n panel.revalidate();\n panel.repaint();\n }\n }",
"SrHotelRoomInfo selectByPrimaryKey(Long id);",
"@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n Rooms selectedRoom = ((Rooms) adapterView.getItemAtPosition(i));\n\n // Open chat room\n API.openPrivateChatActivity(API.currentUID, selectedRoom.getId(), getView());\n }",
"void joinBill(Bill toJoin);",
"void end(String roomId);",
"@SuppressWarnings(\"deprecation\")\n\tpublic void Join( String addr, int port) throws IOException {\n\t\t\n\t\t\tthis.port = port;\n\t\t\tgroupAddr = InetAddress.getByName(addr);\n\t\t\t// Create a multicast socket\n\t\t\tsocket = new MulticastSocket(port);\n\t\t\t// Join the group\n\t\t\tsocket.joinGroup(groupAddr);\n\t\t\trecieve = new RecieveThread(socket,this);\n\t\t\trecieve.start();\n\t }",
"@Test\r\n\tpublic final void testAddRoom() {\n\t\tboolean success = roomServices.addRoom(expected2);\r\n\t\t// check if added successfully\r\n\t\tassertTrue(success);\r\n\t\t// need to copy the id from database since it autoincrements\r\n\t\tRoom actual = roomServices.getRoomByName(expected2.getName());\r\n\t\texpected2.setId(actual.getId());\r\n\t\t// check content of data\r\n\t\tassertEquals(expected2, actual);\r\n\t\t// delete room on exit\r\n\t\troomServices.deleteRoom(actual);\r\n\t}",
"RoomInfo room(String name);",
"public void setRoom(Room room) {\n this.selectedRoom = room;\n }",
"Boolean deleteRoom(String roomId);",
"@Override\n\tpublic Room get(int id) {\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tStatement st = cn.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT * FROM room WHERE id_room = \" + id);\n\t\t\tif(rs.next()) {\n\t\t\t\treturn new Room(rs.getInt(1), rs.getInt(2));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().closeConnection(cn);\n\t\t}\n\t\treturn new Room();\n\t}",
"@GetMapping(\"/rooms/{id}\")\n public Room getRoomById (\n @PathVariable (value = \"id\") Long roomId) {\n return roomRepository.findById(roomId)\n .orElseThrow(() -> new ResourceNotFoundException(\"Room\", \"id\", roomId));\n }",
"Room updateOrAddRoom(String username, Room room);",
"public void link_rooms() {\n numberGen = new Random();\n int index = numberGen.nextInt(roomList.size());\n int direction = numberGen.nextInt(2);\n Room linkRoom = roomList.get(index);\n\n for(Room destRoom: roomList) {\n draw_link(linkRoom.getPosition(), destRoom, direction);\n }\n }",
"public void join(LobbyPlayer player) {\n if (listener == null) listener = Firebase.registerListener(\"lobbies/\" + player.getLobbyCode(), onLobbyChange);\n DocumentReference doc = Firebase.docRefFromPath(\"lobbies/\" + player.getLobbyCode());\n ObjectMapper mapper = new ObjectMapper();\n Map<String, Object> kv = mapper.convertValue(LobbyPlayerDTO.fromModel(player), new TypeReference<Map<String, Object>>() {});\n doc.update(\"players.\" + player.getUsername(), kv);\n }",
"Room getRoom();",
"Room getRoom();",
"public void join(PhoenixTransactionContext ctx);",
"public Room getRoom(String id) {\r\n\t\treturn rooms.get(id);\r\n\t}",
"public String getRoomid() {\r\n\t\treturn roomid;\r\n\t}",
"public Integer getRoomId() {\n return roomId;\n }",
"private void connectToRoom(String appKey, String appSecret) {\n initializeSkylinkConnection();\n\n // Obtaining the Skylink connection string locally.\n // In a production environment the connection string should be given\n // by an entity external to the App,\n // such as an App server that holds the Skylink App secret.\n // This is to avoid keeping the App secret within the application\n String skylinkConnectionString = Utils.\n getSkylinkConnectionString(ROOM_NAME,\n appKey,\n appSecret, new Date(),\n SkylinkConnection\n .DEFAULT_DURATION);\n\n // The skylinkConnectionString should not be logged in production,\n // as it contains potentially sensitive information like the Skylink App key.\n\n boolean connectFailed;\n connectFailed = !skylinkConnection.connectToRoom(skylinkConnectionString, MY_USER_NAME);\n if (connectFailed) {\n String error = \"Unable to connect to Room! Rotate device to try again later.\";\n Toast.makeText(parentActivity, error, Toast.LENGTH_LONG).show();\n Log.e(TAG, error);\n return;\n }\n\n // Initialize and use the Audio router to switch between headphone and headset\n AudioRouter.startAudioRouting(parentActivity);\n }",
"@PostMapping(\"/join\")\n\tpublic String join(@ModelAttribute(\"userId\") Long userId, @ModelAttribute(\"teamId\") Long teamId, Model model, RedirectAttributes redirectAttributes) {\n\t\tTeam team=teamService.findOne(teamId);\n\t\tList<User> users=team.getUsers();\n\t\t\n\t\tfor(User u: users) {\n\t\t\tif(u.getId()==userId) {\n\t\t\t\tSystem.err.println(\"EXISTSSSSS\");\n\t\t\t\tredirectAttributes.addFlashAttribute(\"error\",\"You can't join the same team twice\");\n\t\t\t\treturn \"redirect:/admin/foolCreator\";\n\t\t\t}\n\t\t}\n\n\t\tteamService.joinTeam(userId, teamId);\n\t\treturn \"redirect:/admin/foolCreator\";\n\t}",
"@Override\n public Room findById(Long id) {\n return roomRepository.getOne(id);\n }",
"public void join(NodeInfo info) {\n\t\taddAsPeer(info);\r\n\t\tSystem.out.println(\"Joined : \" + info.getIp() + \" \" + info.getPort());\r\n\t\t// join to obtained node\r\n\t\tString newJoinString = \"0114 JOIN \" + ip + \" \" + port;\r\n\t\tsend(newJoinString, info.getIp(), info.getPort());\r\n\t}",
"public FlowState join(UUID tenant, UUID id) {\n try {\n // Join the flow\n EngineInvokeResponse invokeResponse = runClient\n .join(tenant, id)\n .execute()\n .body();\n\n return new FlowState(runClient, tenant, invokeResponse);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"public Room getEventRoom(String id){\n return this.eventMap.get(getEvent(id)).getRoom();\n }",
"public void join(Player player) {\n\t\tGamePlayer gamePlayer = new GamePlayer(player);\n\t\tthis.gamePlayers.add(gamePlayer);\n\n\t\tif (getEmptyPad() != null) ß{\n\t\t\tPad pad = getEmptyPad();\n\t\t\tgamePlayer.setPad(pad);\n\t\t\tpad.setFree(false);\n\t\t\tLocation loc = pad.getLocation();\n\n\t\t\tplayer.teleport(new Location(loc.getWorld(), loc.getX(), loc.getY(), loc.getZ()));\n\t\t\tsetupPlayerInventory(player);\n\t\t\tplayer.sendMessage(\"You have joined the game\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Not enough room for \" + player.getName() + \" to join. Kicking...\");\n\t\t\tplayer.kickPlayer(\"Game Full\");\n\t\t}\n\t}",
"@Override\n public Room findRoomID(int id) throws AppException {\n log.info(\"RoomDAO#findAllRooms(id)\");\n Connection con = null;\n Room room;\n try {\n con = DataSource.getConnection();\n room = findRoomID(con, id);\n con.commit();\n } catch (SQLException e) {\n rollback(con);\n log.error(\"Problem at findRoomID(id)\", e);\n throw new AppException(\"Can not find specified room, try again\");\n } finally {\n close(con);\n }\n return room;\n }",
"private void joinGame() {\n\t\tgame.connect(list.getSelectedValue());\n\t\tdispose();\n\t}",
"public void setRoomid(Integer roomid) {\r\n\t\tthis.roomid = roomid;\r\n\t}",
"public void join() {\n FacesContext fc = FacesContext.getCurrentInstance();\n try {\n UbikeUser current = (UbikeUser) BaseBean.getSessionAttribute(\"user\");\n ExternalContext exctx = fc.getExternalContext();\n HttpServletRequest request = (HttpServletRequest) exctx.getRequest();\n long groupId = Long.parseLong(request.getParameter(\"groupId\"));\n long userId = current.getId();\n MemberShip m = memberShipService.getMemberShip(userId, groupId);\n\n if (m != null) {\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_ERROR,\n \"You are already member of this group\",\n \"You are already member of this group\"));\n return;\n }\n\n UbikeGroup group = groupService.find(groupId);\n m = new MemberShip(current, group, Role.Member);\n memberShipService.create(m);\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_INFO,\n \"You joined the group \" + group.getName() + \" successfully\",\n \"You joined the group \" + group.getName() + \" successfully\"));\n\n List<MemberShip> members = (List<MemberShip>) BaseBean.getSessionAttribute(\"tmp_members\");\n if (members == null) {\n members = new ArrayList<MemberShip>();\n BaseBean.setSessionAttribute(\"tmp_members\", members);\n }\n members.add(m);\n } catch (Exception exp) {\n logger.log(Level.SEVERE, \"An error occurs while joinning group\", exp);\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_ERROR,\n \"An error occurs while processing your request\",\n \"An error occurs while processing your request\"));\n }\n }",
"@Transactional\r\n\tpublic Room getRoom(Long id) {\r\n\t\tOptional<Room> o= this.roomRepository.findById(id);\r\n\t\treturn o.orElse(null);\r\n\t}",
"private void setRoomId(long value) {\n \n roomId_ = value;\n }",
"java.lang.String getLobbyId();",
"public void nextRoom() {\n room++;\n createRoom();\n }",
"public void setRoom(Room room) {\n currentRoom = room;\n }",
"@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int position,\r\n\t\t\t\t\tlong arg3) {\n\t\t\t\tIntent intent = new Intent(MultiRoomListActivity.this, ActivityMultiRoom.class);\r\n\t\t\t\tintent.putExtra(\"jid\", data.get(position).get(\"roomName\") + \"@conference\"+\".\"+((MyApplication)getApplication()).hostName);\r\n\t\t\t\tintent.putExtra(\"action\", \"join\");\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic JsonElement join(JoinGameRequest JoinRequest) {\n\t\treturn null;\n\t}",
"public static void join(Session session){\n _sessionRef.set(session); \n if(!session.isConnected())session.reconnect();\n }",
"void deleteRoom(int id) throws DataAccessException;",
"@GET\n @Produces(\"application/json\")\n @Path(\"/id/{id}\")\n public static CRoom roomById(@PathParam(\"id\") final int pId) {\n return (CRoom) sCrudRoom.findWithNamedQuery(\n CRoom.FIND_ROOM_BY_ID, QueryParameter.with(\"Pid\", pId).parameters()).get(0);\n }",
"void sendTo(String from, String to, String m_id);",
"@Override\n protected void onListItemClick(ListView l, View v, int position, long id) {\n super.onListItemClick(l, v, position, id);\n Cursor cursor = (Cursor) getListAdapter().getItem(position);\n int roomId = cursor.getInt(cursor.getColumnIndex(HomeManagementDBContract.RoomEntries._ID));\n Intent i = new Intent(this, RoomDetailActivity.class);\n i.putExtra(\"RoomID\", roomId);\n\n startActivity(i);\n }",
"public MyRoom(int id, String name, String building, int size) {\r\n this.id = id;\r\n this.name = name;\r\n this.building = building;\r\n this.size = size;\r\n }",
"@Override\n\tpublic Room queryById(String id) {\n\t\treturn null;\n\t}"
] |
[
"0.82181656",
"0.6988733",
"0.6938875",
"0.6817491",
"0.66829425",
"0.6460929",
"0.6433009",
"0.6284499",
"0.62599164",
"0.62436765",
"0.61286056",
"0.6018839",
"0.6006031",
"0.59977823",
"0.5990762",
"0.5982656",
"0.5959819",
"0.5929774",
"0.5903012",
"0.58325154",
"0.58315265",
"0.58302814",
"0.57578653",
"0.57551384",
"0.5733823",
"0.57306474",
"0.5714341",
"0.5707818",
"0.5690347",
"0.567511",
"0.56734025",
"0.5671152",
"0.56636727",
"0.5659544",
"0.5634837",
"0.5631226",
"0.5576809",
"0.55742127",
"0.5560185",
"0.5552618",
"0.55510944",
"0.55178875",
"0.5506015",
"0.55033886",
"0.54782027",
"0.5476909",
"0.54743016",
"0.5469655",
"0.54663837",
"0.54654646",
"0.5437853",
"0.54361933",
"0.54320526",
"0.54250807",
"0.54152584",
"0.54093975",
"0.54032886",
"0.54029804",
"0.53898996",
"0.53710055",
"0.536936",
"0.53689814",
"0.5367344",
"0.5361665",
"0.5361268",
"0.5359772",
"0.53512764",
"0.53511626",
"0.5339228",
"0.53366154",
"0.53366154",
"0.5331579",
"0.5330942",
"0.5326143",
"0.5323563",
"0.5309531",
"0.5309042",
"0.5303716",
"0.5303192",
"0.52976763",
"0.5295881",
"0.5285677",
"0.52802205",
"0.52791494",
"0.5273078",
"0.5265867",
"0.52643406",
"0.52476305",
"0.5238672",
"0.52343404",
"0.5230554",
"0.5218554",
"0.52181464",
"0.52095103",
"0.520699",
"0.5195556",
"0.5190094",
"0.5178531",
"0.5162796",
"0.51600003"
] |
0.7685982
|
1
|
Send message to current room
|
private void sendMessage(String message) {
// we need to encrypt message using destination public-key
if (destinationPublicKey == null) return;
/**
* Encrypt Message Here
*/
PublicKey publicKey = getPublicKey(Base64.decode(destinationPublicKey, Base64.URL_SAFE));
KeyPair keyPair = new KeyPair(publicKey, null);
SecurityKey securityKey = new SecurityKey(keyPair);
String encryptedMessage = securityKey.encrypt(message);
socket.emit("message", encryptedMessage);
// add raw text to recycler_view
messages.add(new Message(nickname,messageEditText.getText().toString(),0));
ChatAdapter adapter = new ChatAdapter(getApplicationContext(),messages);
adapter.notifyDataSetChanged();
chatRecyclerView.setAdapter(adapter);
// clear text box
messageEditText.setText("");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void sendMessage(String content, String room) {\n }",
"public void doSendMsg() {\n FacesContext fctx = FacesContext.getCurrentInstance();\n HttpSession sess = (HttpSession) fctx.getExternalContext().getSession(false);\n SEHRMessagingListener chatHdl = (SEHRMessagingListener) sess.getAttribute(\"ChatHandler\");\n if (chatHdl.isSession()) {\n //TODO implement chat via sehr.xnet.DOMAIN.chat to all...\n if (room.equalsIgnoreCase(\"public\")) {\n //send public inside zone\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PUBLIC, moduleCtrl.getLocalZoneID(), -1, -1);\n } else {\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PRIVATE_USER, moduleCtrl.getLocalZoneID(), -1, curUserToChat.getUsrid());\n }\n this.text = \"\";\n }\n //return \"pm:vwChatRoom\";\n }",
"long sendMessage(int roomId, String message) throws RoomNotFoundException, RoomPermissionException, IOException;",
"public void sendMessage() {\n\t\tString myPosition=this.agent.getCurrentPosition();\n\t\tif (myPosition!=null){\n\t\t\t\n\t\t\tList<String> wumpusPos = ((CustomAgent)this.myAgent).getStenchs();\n\t\t\t\n\t\t\tif(!wumpusPos.isEmpty()) {\n\t\t\t\tList<String> agents =this.agent.getYellowpage().getOtherAgents(this.agent);\n\t\t\t\t\n\t\t\t\tACLMessage msg=new ACLMessage(ACLMessage.INFORM);\n\t\t\t\tmsg.setSender(this.myAgent.getAID());\n\t\t\t\tmsg.setProtocol(\"WumpusPos\");\n\t\t\t\tmsg.setContent(wumpusPos.get(0)+\",\"+myPosition);\n\t\t\t\t\n\t\t\t\tfor(String a:agents) {\n\t\t\t\t\tif(this.agent.getConversationID(a)>=0) {\n\t\t\t\t\t\tif(a!=null) msg.addReceiver(new AID(a,AID.ISLOCALNAME));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.agent.sendMessage(msg);\n\t\t\t\tthis.lastPos=myPosition;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}",
"public void sendMessage()\r\n {\r\n MessageScreen messageScreen = new MessageScreen(_lastMessageSent);\r\n pushScreen(messageScreen);\r\n }",
"public void sendChat(String message) {\r\n connection.chat(message);\r\n }",
"public void writeUserMessage(String room, String name, String message) {\n ((GroupChatPanel)grouptabs.get(room)).writeUserMessage(name,message);\n }",
"public void sendChat(String message) {\n\t\tenqueue(\"PRIVMSG #\"+Executable.targetChannel+\" :imGlitch \"+message);\n\t}",
"public void actionPerformed(ActionEvent e) {\n try {\r\n if (roomOrUser == 1) {\r\n // send message to a room\r\n sock.executeCommand(new RoomMessageCommand(new LongInteger(name), textArea_1.getText()\r\n .getBytes()));\r\n textArea_2.setText(textArea_2.getText() + textField.getText() + \": \" + textArea_1.getText()\r\n + \"\\n\");\r\n } else if (roomOrUser == 2) {\r\n // send message to a user\r\n sock.executeCommand(new UserMessageCommand(new LongInteger(name), textArea_1.getText()\r\n .getBytes(), true));\r\n textArea_2.setText(textArea_2.getText() + textField.getText() + \": \" + textArea_1.getText()\r\n + \"\\n\");\r\n }\r\n } catch (InvalidCommandException ex) {\r\n JOptionPane.showMessageDialog(null, \"Unable to join or leave room.\", \"alert\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n }",
"@Override\n public void onClick(View v) {\n Log.d(TAG,\"JOINING ROOMID\" + chat_list.get(position).roomhash );\n mSocket.emit(\"CreateRoom\",chat_list.get(position).roomhash,chat_list.get(position).gcmID);\n Intent intent2 = new Intent(CTX, ChatInstance.class);\n intent2.putExtra(\"roomnum\", chat_list.get(position).roomhash);\n\n CTX.startActivity(intent2);\n\n }",
"public void sendMessage(String message){\n pw.print(message);\n pw.flush();\n }",
"private void sendMessage(String body, String toJid) {\n Log.d(TAG, \"Sending message to :\" + toJid);\n\n EntityBareJid jid = null;\n\n toJid = toJid + \"@\" + mApplicationContext.getString(R.string.txt_domain_name) + \"/\" + mApplicationContext.getString(R.string.txt_resource);\n ChatManager chatManager = ChatManager.getInstanceFor(mConnection);\n\n try {\n jid = JidCreate.entityBareFrom(toJid);\n Log.e(TAG, \"sendMessage: jid : \" + jid);\n } catch (XmppStringprepException e) {\n e.printStackTrace();\n }\n Chat chat = chatManager.chatWith(jid);\n try {\n Message message = new Message(jid, Message.Type.chat);\n message.setBody(body);\n chat.send(message);\n\n } catch (SmackException.NotConnectedException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"private void message(\n QueryParam params,\n ChatMessage message, WebSocketSession session) throws\n InvalidRoomException,\n BroadcastException {\n\n IRoomService roomService = roomServiceFactory.getRoomService();\n \n message.setFrom(params.displayName);\n\n IRoom targetRoom = roomService.getRoom(params.RoomId);\n\n targetRoom.broadcastMessage(message);\n }",
"void sendChat(SendChatParam param);",
"void onRoomMessage(String roomName, EcologyMessage message) {\n message.addArgument(roomName);\n message.addArgument(ROOM_MESSAGE_ID);\n message.setSource(getMyDeviceId());\n sendConnectorMessage(message);\n }",
"@Override\n public void send() {\n System.out.println(\"send message by SMS\");\n }",
"public void sendMessage(View v) {\n // retrieve the text typed in by the user in the EditText\n String message = ((EditText)(findViewById(R.id.editText_message))).getText().toString();\n // create an implicit intent to any app with SENDTO capability\n // set the destination (5556 is the phone number of the second emulator instance)\n Uri destination = Uri.parse(\"smsto:5556\");\n Intent smsIntent = new Intent(Intent.ACTION_SENDTO, destination);\n // pass the composed message to the messaging activity\n smsIntent.putExtra(\"sms_body\", message);\n // launch the intent\n startActivity(smsIntent);\n }",
"void sendTo(String from, String to, String m_id);",
"void sendMessage(ChatMessage msg) {\n\t\ttry {\n\t\t\tsOutput.writeObject(msg);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tdisplay(\"Não foi possível enviar a mesagem !!!\");\n\t\t}\n\t}",
"public void sendMsg(){\r\n\t\tsuper.getPPMsg(send);\r\n\t}",
"public void send(Message msg);",
"@OnClick(R.id.enter_chat1)\n public void sendMessage() {\n if (getView() == null) {\n return;\n }\n EditText editText = getView().findViewById(R.id.chat_edit_text1);\n sendMessageBackend(editText.getText().toString(), utils.getChatUser());\n updateListAdapter();\n editText.setText(\"\");\n }",
"public void sendChat(String client, String message) {\n\t\t//enqueue(\"PRIVMSG #\"+myself+\" :.w \"+client + \" imGlitch \" + message); //whisper\n\t\tenqueue(\"PRIVMSG #\"+Executable.targetChannel+\" :imGlitch (@\"+client + \") \" + message);\n\t}",
"public void sendMsgToClient() {\n\n try {\n\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())), true);\n\n Log.d(TAG, \"The transmitted data:\" + msg);\n\n writer.println(msg);\n\n } catch (Exception e) {\n\n e.printStackTrace();\n\n }\n\n }",
"@Override\n\tpublic void sendMessage() {\n\t\t\n\t}",
"public void sendMessage(String message){\n\t if (mOut != null && !mOut.checkError()) {\n\t mOut.println(message+\"\\n\");\n\t mOut.flush();\n\t }\n\t }",
"public void joinChatRoom(IChatroom room) {\n\t\tview.append(\"Join ChatRoom\" + room.getName());\n\t\tcountRoom++;\n\t\tIChatroom chatroom = new Chatroom(\"Chatroom\" + countRoom);\n\t\tIChatServer chatServer = new ChatServer(user, chatroom);\n\t\ttry {\n\t\t\tview.append(\"Start joining..\");\n\t\t\tIChatServer chatStub = (IChatServer) UnicastRemoteObject.exportObject(chatServer,\n\t\t\t\t\tIChatServer.BOUND_PORT + countRoom);\n\t\t\tfor (IChatServer members : room.getChatServers()) {\n\t\t\t\tchatroom.addChatServer(members);\n\t\t\t\tmembers.joinChatroom(chatStub);\n\t\t\t}\n\t\t\tchatroom.addChatServer(chatStub);\n\t\t\tuser.addRoom(chatroom);\n\t\t\tregistry.rebind(IChatServer.BOUND_NAME + chatroom.hashCode(), chatStub);\n\t\t\tHashSet<IChatServer> proxyChatServers = new HashSet<IChatServer>();\n\t\t\tfor (IChatServer stub : chatroom.getChatServers()) {\n\t\t\t\tProxyIChatServer proxyChatServer = new ProxyIChatServer(stub);\n\t\t\t\tproxyChatServers.add(proxyChatServer);\n\t\t\t}\n\t\t\tIMain2MiniAdpt miniMVCAdpt = view.makeMini(chatServer, proxyChatServers);\n\t\t\tminiMVCAdpts.put(chatroom, miniMVCAdpt);\n\t\t\tcountRoom++;\n\t\t\tview.append(\"Success!\");\n\t\t\t//\t\t\tminiMVCAdpt.refresh();\n\t\t} catch (Exception e) {\n\t\t\tview.append(\"Fail to join the room!\");\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void broadcastmsg(String msg){\r\n Server.getUsers().forEach((user) -> {\r\n user.sendmsg(msg);\r\n });\r\n }",
"public void sendmsg(String to, String msg){\n\n HashMap cur_hash = null;\n PrintWriter to_PW = null;\n\n try{\n synchronized (chat_room) {\n Iterator chat_hash = chat_room.values().iterator();\n while(chat_hash.hasNext()) {\n cur_hash = (HashMap)chat_hash.next();\n if(cur_hash.containsKey(to)) {\n to_PW = (PrintWriter)cur_hash.get(to);\n break;\n }\n }\n }\n \n if(to_PW != null){\n to_PW.println(msg);\n to_PW.flush();\n }\n } catch (Exception e) {\n System.out.println(e);\n } \n }",
"private void sendMessage(String message){\n\t\ttry{\n\t\t\toutput.writeObject(\"Punk Ass Server: \" + message);\n\t\t\toutput.flush();\n\t\t\tshowMessage(\"\\nPunk Ass Server: \" + message); \n\t\t}catch(IOException ioe){\n\t\t\tchatWindow.append(\"\\n Message not sent, try again or typing something else\");\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public void sendMessage(String msg) {\n\t\tplayer.sendMessage(msg);\n\t}",
"private void sendMessage() {\n if (mRecipientAddress == null) {\n if (mDevices.getSelectedItem() == null) {\n mStatusText.append(\"Please select a device to message.\\n\");\n return;\n }\n if (mMessage.getText() == null || mMessage.getText().toString().equals(\"\")) {\n mStatusText.append(\"Please enter a message to send.\\n\");\n return;\n }\n }\n WifiDirectClientAsyncTask t = new WifiDirectClientAsyncTask(this, mMessage.getText().toString());\n if (Build.VERSION.SDK_INT>=Build.VERSION_CODES.HONEYCOMB)\n t.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n else\n t.execute();\n }",
"private void sendMessage(ChatMessage msg) {\n try {\n sOutput.writeObject(msg);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void sendMessage(Message m) {\n commSender.sendMessage(m);\n }",
"@Override\r\n\tpublic void sendMessage(String message) {\n\t\t\r\n\t}",
"private void sendMessage(CommandSender p, String msg) {\n\t\tif (p instanceof Player) {\n\t\t\tif (!((Player) p).isOnline()) return;\n\t\t}\n\t\t_.msg(p, GameMode.Sonic, msg);\n\t}",
"@Override\r\n\tpublic void sendMessage(String message) {\n\t\tmediator.send(message, this);\r\n\t}",
"public void sendMessage(String message) {}",
"@Override\n\tpublic void Send(String message) {\n\t\tgetReceiveArea().append(\"我:\"+message + \"\\n\");\n\t\tgetMediator().sendMessage(getName(), message);\n\t}",
"@Override\n\tpublic void SendMessage(String message) {\n\t\t\n\t\ttry\n\t\t{\n\t\tprintWriters.get(clients.get(0)).println(message);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\n\t}",
"public void sendMessage(String message);",
"public void sendChannelMessage(String msg) throws RemoteException {\n if(mService.isConnected()) {\n try {\n IJumbleService binder = mService.getBinder();\n\n int channelId = mService.getBinder().getSessionChannel().getId();\n binder.sendChannelTextMessage(channelId, msg, false);\n }\n catch(NullPointerException e) {\n Log.d(TAG, \"Unable to send command '\" + msg + \"': \" + e);\n }\n }\n }",
"@Override\r\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tif (!chatTextBox.getText().equalsIgnoreCase(\"\")) {\r\n\t\t\t\t\tstoryTimeService.sendRoomChatMessage(roomData.roomName, chatTextBox.getText(), new AsyncCallback<Void>() {\r\n\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void onFailure(Throwable caught) {\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void onSuccess(Void result) {\r\n\t\t\t\t\t\t\tif (DEBUG)\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Client: Sent message: \" + chatTextBox.getText());\r\n\t\t\t\t\t\t\tchatTextBox.setText(\"\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}",
"public void sendRequest() {\r\n\t\t\r\n\t\tclient.join(this, isHost, gameCode, playerName, playerNumber);\r\n\t\t\r\n\t}",
"void sendMessage() {\n\n\t}",
"@FXML\n public void sendAmessage(ActionEvent event) throws SQLException{\n DBConnect db = DBConnect.getInstance();\n db.sendMessage(message.getText(), selectedCustomer.getChat_id());\n message.setText(\"\");\n updateChat();\n }",
"private void sendMessage() {\n\t\tString text = myMessagePane.getText();\n\t\tMessage msg = new Message(text, myData.userName, myData.color);\n\n\t\tcommunicationsHandler.send(msg);\n\n\t\t// De-escape xml-specific characters\n\t\tXmlParser xmlParser = new XmlParser(myData);\n\t\tString outText = xmlParser.deEscapeXMLChars(msg.text);\n\t\tmsg.text = outText;\n\n\t\tmyMessagePane.setText(\"\");\n\t\tupdateMessageArea(msg);\n\n\t}",
"public void sendMessage(NetMessage message) {\n ClientDirector.getDataManager().sendMessage(message);\n }",
"protected void sendMessage(String msg) {\n message = msg; \n newMessage = true;\n }",
"public void sendMessage(String msg) {\n Player player = RegionOwn.server.getPlayer(name);\n if (player != null) {\n player.sendMessage(msg);\n } else if (RegionOwn.pm.isPluginEnabled(\"TextPlayer\")) {\n User user = TextPlayer.findUser(name);\n user.sendText(\"Region Security System\", msg);\n }\n }",
"void sendMessage(String msg);",
"private void sendMessage(String message){\n try{\n output.writeObject(nickname+\" : \" + message);\n output.flush();\n showMessage(\"\\n\"+nickname+\" : \" + message);\n }catch(IOException ioException){\n chatWindow.append(\"\\n Oops! Something went wrong!\");\n }\n }",
"public void writeMassege() {\n m = ChatClient.message;\n jtaChatHistory.setText(\"You : \" + m);\n //writeMassageServer();\n }",
"private void send() {\n Toast.makeText(this, getString(R.string.message_sent, mBody, Contact.byId(mContactId).getName()),\n Toast.LENGTH_LONG).show();\n finish(); // back to DirectShareActivity\n }",
"public synchronized void sendMessage (String msg, ServerThread current) {\n\t\tcurrent.send (msg);\n\t}",
"private void sendMessage(ChatMessage msg) throws IOException {\n try {\n sOutput.writeObject(msg);\n } catch (IOException e) {\n sOutput.close();\n sInput.close();\n e.printStackTrace();\n }\n //sOutput.flush();\n }",
"public void sendMessage(String message) {\n\t\tsocketTextOut.println(message);\n\t\tsocketTextOut.flush();\n\t}",
"void sendMessage(String message) {\n writer.println(message);\n }",
"public void sendMessage(String msg) {\n try {\n out.write(msg);\n out.newLine();\n out.flush();\n \n } catch (IOException e) {\n \tshutdown();\n e.printStackTrace();\n }\n }",
"private void sendTextMessage(String message) {\n if ( message == null || message.length() < 1 ) {\n return;\n }\n DateFormat localDateFormat = Constant.getServerDateFormat();\n Chat chat = new Chat(0,tournamentID,clubID,receiverID, selfID,self.getDisplayName(),\n Constant.MESSAGE_TYPE_TEXT,message,localDateFormat.format(new Date()));\n RequestAction actionPostChatText = new RequestAction() {\n @Override\n public void actOnPre() {\n et_message.setText(\"\");\n }\n\n @Override\n public void actOnPost(int responseCode, String response) {\n if ( responseCode == 201 ) {\n Log.d(TAG,\"Message sent successfully!\");\n }\n }\n };\n String url;\n if ( tournament != null ) { // tournament chat\n url = UrlHelper.urlChatByTournament(tournament.id,club.id);\n } else if ( club != null ) {// club chat\n url = UrlHelper.urlChatByClub(club.id);\n } else if ( receiver != null ) { // private chat\n url = UrlHelper.urlPrivateChat(receiver.getId());\n } else {\n Toast.makeText(getContext(), \"Unknown error!\", Toast.LENGTH_SHORT).show();\n Log.e(TAG,\"Unspecified chat type.\");\n return;\n }\n RequestHelper.sendPostRequest(url,chat.toJson(),actionPostChatText);\n }",
"public void sendMessage(String message) {\n printWriter.append(message);\n printWriter.flush();\n }",
"private void forwardRoomMessage(EcologyMessage message) {\n String targetRoomName = null;\n try {\n targetRoomName = (String) message.fetchArgument();\n } catch (ClassCastException | IndexOutOfBoundsException e) {\n //throw new IllegalArgumentException(\"Unrecognized message format.\");\n Log.e(TAG, \"Exception \" + e.getMessage());\n }\n\n Room room = rooms.get(targetRoomName);\n if (room != null) {\n room.onMessage(message);\n }\n }",
"private void sendMessage() {\n Log.d(\"sender\", \"Broadcasting message\");\n Intent intent = new Intent(\"custom-event-name\");\n // You can also include some extra data.\n double[] destinationArray = {getDestination().latitude,getDestination().longitude};\n intent.putExtra(\"destination\", destinationArray);\n LocalBroadcastManager.getInstance(this).sendBroadcast(intent);\n }",
"public void sendMessage(String message) {\n\t\tif (!connectionActive()) {\n\t\t\tthrow new IllegalOperationException(\"Cannot send a message if you are not connected to a server!\\n\");\n\t\t}\n\t\tMessage bctMessage = Message.makeBroadcastMessage(userName, message);\n\t\tsocketConnection.print(bctMessage);\n\t}",
"public void sendMessage(ChatMessage msg) {\n try{\n loginOutput.writeObject(msg);\n }\n catch(IOException e){\n display(\"Exception on send message to server: \" + e);\n }\n }",
"public void sendMessage(ChatMessage msg) {\n\t\ttry {\n\t\t\tsOutput.writeObject(msg);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tdisplay(\"Exception writing to server: \" + e);\n\t\t}\n\t}",
"public void sendHelloMessage() {\n getSocketController().send(getMessageController().createHelloMessage(\"Сервер\", getUser().getName()));\n }",
"public void message(String from,String msg,String to);",
"protected boolean sendTo(int door, Message msg) {\n\t\tmsg.setMsgClock(this.getPulse());\n\t\treturn super.sendTo(door, msg);\n\t}",
"private void sendMessage(String mPos) {\n Log.d(\"sender\", \"Broadcasting message\");\n Intent intent = new Intent(\"adapter action\");\n // You can also include some extra data.\n intent.putExtra(\"song position\", mPos);\n LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent);\n }",
"private void joinRoom(int roomId) {\n // Reset room state variables\n messages.clear();\n\n ChatAdapter adapter = new ChatAdapter(getApplicationContext(),messages);\n adapter.notifyDataSetChanged();\n\n chatRecyclerView.setAdapter(adapter);\n this.destinationPublicKey = null;\n\n // Emit room join request.\n this.socket.emit(\"join\", roomId, nickname);\n }",
"@Override\n\tpublic void sendMsg(MsgVO mvo) {\n\t\tsession.insert(namespace + \".sendMsg\", mvo);\n\t}",
"@Override\n public void sendChat(String message) throws ModelException {\n assert message != null;\n\n try {\n String clientModel = m_theProxy.sendChat(GameModelFacade.instance().getLocalPlayer().getIndex(), message);\n new ModelInitializer().initializeClientModel(clientModel, m_theProxy.getPlayerId());\n } catch (NetworkException e) {\n throw new ModelException(e);\n }\n }",
"public void sendMessageXMPP(String message, String targetUser, MainActivity mainActivity) {\n ChatManager chatmanager = xmppConnection.getChatManager();\n Chat newChat = chatmanager.createChat(targetUser, new MessageListener(mainActivity));\n\n try {\n newChat.sendMessage(message);\n System.out.println(\"yohoo message sent\");\n// receiveMessage(connection);\n } catch (XMPPException e) {\n System.out.println(\"Error Delivering block\");\n System.out.println(\"----------sendMessageXMPP---------\" + e.getMessage());\n } catch (Exception e) {\n System.out.println(\"----------sendMessageXMPP---------\" + e.getMessage());\n }\n\n }",
"public void sendMessage(Message msg) {\n network.sendAsync(msg);\n }",
"@Override\n\tpublic void execute() {\n\t\tif (!(messageText == null || messageText.isEmpty())) {\n\n\t\t\tMessage message = new Message();\n\t\t\tMessage.Type messageType;\n\t\t\tif (recipientsIds.isEmpty())\n\t\t\t\tmessageType = Type.USER_BROADCAST;\n\t\t\telse\n\t\t\t\tmessageType = Type.USER_PERSONAL;\n\n\t\t\tmessage.setSender(PlayersRegister.getInstance().getPlayerById(getUserId()));\n\t\t\tmessage.setText(messageText);\n\t\t\tmessage.setType(messageType);\n\n\t\t\tArrayList<Player> recipients = PlayersRegister.getInstance().getPlayersById(recipientsIds);\n\t\t\tif (!recipientsIds.isEmpty())\n\t\t\t\trecipients.add(message.getSender()); // echo the message to the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// sender as well\n\n\t\t\tmessage.setRecipients(recipients);\n\t\t\tmessage.send();\n\n\t\t}\n\n\t}",
"static private void TalkTo() {\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(BSChristiansen.getDescription() + \", yet he still gives you good advice:\\n\");\n System.out.println(BSChristiansen.getDialog(0));\n System.out.println(\"\");\n woundedSurvivor();\n } else if (mysteriousCrab.getCurrentRoom() == currentRoom && inventory.getInventory().containsKey(\"Shroom\")) {\n System.out.println(mysteriousCrab.getDescription() + \"\\n\" + mysteriousCrab.getDialog(0));\n } else {\n System.out.println(\"There is nobody to communicate with in this Room\");\n }\n\n }",
"public void send(Object message) {\n try {\n if (message.equals(startTurnMessage)) {\n myTurn = true;\n }\n else if (message.equals(endTurnMessage)) {\n myTurn = false;\n }\n else {\n socketOut.reset();\n socketOut.writeObject(message);\n socketOut.flush();\n }\n } catch (IOException | NullPointerException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void sendMessage() {\n Intent intent = new Intent(this, GoToMessage.class);\n intent.putExtras(getIntent().getExtras());\n Bundle args = new Bundle();\n args.putString(\"nickname\", mNickname);\n //args.putSerializable(\"convoitem\", item);\n args.putString(\"topic\", mContact.getTopic());\n args.putInt(\"chatid\", mContact.getChatID());\n intent.putExtras(args);\n startActivity(intent);\n }",
"public void sendToActivity(String message){\n //In questo metodo \"avviso\" l'app che è arrivato un nuovo dato dal raspberry.\n\n Intent intent = new Intent(\"NOTIFY_ACTIVITY\");\n\n if(message != null){\n intent.putExtra(\"CURRENT_ACTIVITY\",message);\n }\n\n //invio messaggio tramite broadcaster\n broadcast.sendBroadcast(intent);\n\n }",
"@Override\n\tpublic void send(String msg) {\n\t\t\n\t\t\n\t\n\t}",
"public void chat ( String message ) {\n\t\texecute ( handle -> handle.chat ( message ) );\n\t}",
"private void sendMessageToAll(String message){\n for(Session s : sessions){\n try {\n s.getBasicRemote().sendText(message);\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n }",
"public void sendmessage(View v){\n \tIntent intent =new Intent();//意图\n \tintent.setAction(Intent.ACTION_SENDTO);//设置发短信意图\n \tintent.setData(Uri.parse(\"smsto:\"+1358752546));//设置拨号的信息\n \t//问题:怎么不能用11位电话号码\n \tString message=\"我是水哥,有妹子么\";\n \tintent.putExtra(\"sms_body\", message);\n \tstartActivity(intent);//开启意图\t \n }",
"Boolean sendMsg(String token, Long chatSessionId, String Content);",
"public void sendMessage(String message) {\n try {\n bos.write(message);\n bos.newLine();\n bos.flush();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void sendMsg(Message msg){\n messagesParser.sendMsg(msg);\n }",
"private void sendMessage(String message) {\n\t\tMainstarter.meClient.sendMessage(new MessageSend(message, Mainstarter.meClient));\n\t\ttextInputMessage.clear();\n\t}",
"public final void send(MidiMessage msg) {\n device.send(msg);\n }",
"public void writeStatusMessage(String room, String message) {\n ((GroupChatPanel)grouptabs.get(room)).writeStatusMessage(message);\n }",
"public void sendMessage(Message message) {\n if (accepted || !ended || message.type.equals(\"register\") || message.type.equals(\"lobby\")) {\n message.packetNum = packetNum;\n ByteBuffer buffer = ByteBuffer.wrap(SerializationUtils.serialize(message));\n SocketAddress addr = null;\n try {\n addr = client.getLocalAddress();\n log(\"sending [\" + message + \"] to \" + addr);\n client.write(buffer);\n reconciliation.add(message);\n packetNum++;\n } catch (IOException e) {\n error(\"Failed to send message to:\" + addr);\n e.printStackTrace();\n }\n }\n }",
"public void sendMessage(String message)\n\t\t{\n\t\t\twriter.println(message);\n\t\t\twriter.flush();\n\t\t}",
"private void sendMessage() {\n Log.d(\"FlashChat\", \"I sent something\");\n // get the message the user typed\n String userInput = mInputText.getText().toString();\n\n if (! (userInput.length() == 0)){\n\n InstantMessage message = new InstantMessage(userInput, mUserMe);\n // push the message to Firebase DB\n mDatabaseReference.child(mLocation).push().setValue(message);\n mInputText.setText(\"\");\n }\n\n }",
"void sendMessage(Message m) throws IOException {\n String msg = m.toString();\n\n buffer = msg.getBytes(\"Windows-1256\");\n toServer = new DatagramPacket(buffer, buffer.length,\n InetAddress.getByName(sendGroup), port);\n if (m.getType() == Message.DATA) {\n manager.mManager.addMessage(m);\n }\n\n System.out.println(getName() + \"-->\" + m);\n serverSocket.send(toServer);\n }",
"public void send_message(){\n logical_clock++;\n System.out.println(\"Send Message Clock:\" +logical_clock);\n encrypt(logical_clock);\n\n }",
"private void sendMessage(Space jSpace, int playerID, String msg) throws InterruptedException {\n\t\tsendHeader(jSpace, playerID, ServerCommands.message);\n\t\tjSpace.put(playerID, msg);\n\t}",
"public void send(Address from, String message);",
"protected void sendMessage(final String message) {\n\n logger.debug(LOG_TAG + \".sendMessage()\");\n\n // send message to client\n printWriter.println(message);\n\n }",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tmConnectedThread.write(\"send\");\n\t\t\t\t\tmConnectedThread.writeFile();\n\t\t\t\t}",
"protected void makeRoom(String roomID)\n {\n mChat.child(roomID).child(\"sender1\").setValue(uid1);\n mChat.child(roomID).child(\"sender2\").setValue(uid);\n goToChat(roomID);\n }",
"private static void sendMessageToAll(Message msg) throws IOException, EncodeException {\n String jsonStr = JSON.toJSONString(msg);\n\n for (String key : onlineSessions.keySet()) {\n System.out.println(\"WebSocketChatServer - Message \" + jsonStr + \" sent to client with username \" + key + \" and session \" + onlineSessions.get(key));\n System.out.println(key + \" : \" + onlineSessions.get(key));\n try {\n onlineSessions.get(key).getBasicRemote().sendObject(msg);\n } catch (IOException | EncodeException error) {\n error.printStackTrace();\n }\n }\n }"
] |
[
"0.7628863",
"0.75732416",
"0.69629115",
"0.6925068",
"0.68793005",
"0.6784194",
"0.6765136",
"0.6754809",
"0.66841114",
"0.65865314",
"0.6583517",
"0.65779793",
"0.6558191",
"0.6525422",
"0.6521595",
"0.6515703",
"0.64649993",
"0.6447764",
"0.6437228",
"0.6409398",
"0.6403135",
"0.6391311",
"0.6387744",
"0.6376099",
"0.6374078",
"0.6368723",
"0.6366499",
"0.6353452",
"0.63395256",
"0.6330189",
"0.63283485",
"0.63262284",
"0.6320417",
"0.6317329",
"0.63154036",
"0.6308034",
"0.6280199",
"0.6266851",
"0.6246134",
"0.6242636",
"0.6233513",
"0.6227482",
"0.6221942",
"0.62023264",
"0.6199329",
"0.6195242",
"0.619335",
"0.61927724",
"0.6180577",
"0.61788917",
"0.6175935",
"0.6170394",
"0.61673206",
"0.6166641",
"0.61549765",
"0.6149041",
"0.61464894",
"0.61389875",
"0.61336416",
"0.6132554",
"0.61287975",
"0.6127053",
"0.6124637",
"0.612089",
"0.6102384",
"0.6097424",
"0.6095272",
"0.60898304",
"0.60890925",
"0.60872495",
"0.60870516",
"0.6086301",
"0.60821205",
"0.6080736",
"0.6077585",
"0.6076612",
"0.60764074",
"0.6070746",
"0.6070405",
"0.6058998",
"0.60582775",
"0.6055368",
"0.6055349",
"0.60553396",
"0.6053149",
"0.60488975",
"0.6048493",
"0.6042075",
"0.60398525",
"0.6038892",
"0.6037562",
"0.60308874",
"0.6027305",
"0.6022856",
"0.6021797",
"0.6021683",
"0.6020825",
"0.60206157",
"0.6017583",
"0.6010802",
"0.6007764"
] |
0.0
|
-1
|
Send publickey to every other person on the chat
|
private void sendPublicKey() {
PublicKey publicKey = EncryptionUtils.getKeyPair(getApplicationContext()).getPublic();
String encodedPublicKey = Base64.encodeToString(publicKey.getEncoded(),Base64.URL_SAFE);
socket.emit("public_key",encodedPublicKey);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"String getPublicKeyActorSend();",
"String getPublicKeyActorReceive();",
"private static void keyExchange() throws IOException, NoSuchAlgorithmException, NoSuchProviderException, InvalidKeySpecException {\r\n\t\t//receive from server\r\n\t\tPublicKey keyserver = cryptoMessaging.recvPublicKey(auctioneer.getInputStream());\r\n\t\t//receive from clients\r\n\t\tPublicKey keyclients[] = new PublicKey[3];\r\n\t\tbiddersigs = new PublicKey[3];\r\n\t\tInputStream stream;\r\n\t\tfor (int i=0; i < bidders.size(); i++) {\r\n\t\t\tstream=(bidders.get(i)).getInputStream();\r\n\t\t\tkeyclients[i] = cryptoMessaging.recvPublicKey(stream);\r\n\t\t\tbiddersigs[i] = keyclients[i];\r\n\t\t}\r\n\t\t//send to auctioneer\r\n\t\tcryptoMessaging.sendPublicKey(auctioneer.getOutputStream(), keyclients[0]); \r\n\t\tcryptoMessaging.sendPublicKey(auctioneer.getOutputStream(), keyclients[1]); \r\n\t\tcryptoMessaging.sendPublicKey(auctioneer.getOutputStream(), keyclients[2]); \r\n\t\t//send to clients\r\n\t\tcryptoMessaging.sendPublicKey((bidders.get(0)).getOutputStream(), keyserver); \r\n\t\tcryptoMessaging.sendPublicKey((bidders.get(1)).getOutputStream(), keyserver); \r\n\t\tcryptoMessaging.sendPublicKey((bidders.get(2)).getOutputStream(), keyserver); \r\n\t\t\r\n\t\t\r\n\t\t// now receive paillier public keys from bidders and auctioneer\r\n\t\tauctioneer_pk = cryptoMessaging.recvPaillier(auctioneer.getInputStream());\r\n\t\tpk[0] = cryptoMessaging.recvPaillier((bidders.get(0)).getInputStream());\r\n\t\tpk[1] = cryptoMessaging.recvPaillier((bidders.get(1)).getInputStream());\r\n\t\tpk[2] = cryptoMessaging.recvPaillier((bidders.get(2)).getInputStream());\r\n\t}",
"java.lang.String getPubkey();",
"public void process(PublicKey msg) throws IOException {\n usersConnected.get(msg.getSource()).setPublicKeyPair(msg.getMessage());\n bradcast(msg);\n }",
"private final void configureKeys() {\n\t\t// SecretServer's public key\n\t\tString line = ComMethods.getValueFor(\"SecretServer\", pubkeysfn);\n\t\tint x = line.indexOf(',');\n\t\tmy_n = new BigInteger(line.substring(0,x));\n\t\tmy_e = new Integer(line.substring(x+1,line.length()));\n\n\t\t// SecretServer's private key\n\t\tline = ComMethods.getValueFor(\"SecretServer\", privkeysfn);\n\t\tx = line.indexOf(',');\n\t\tmy_d = new BigInteger(line.substring(x+1,line.length()));\n\n\t\t// Public keys for all registered Users\n\t\tusersPubKeys1 = new BigInteger[validUsers.length];\n\t\tusersPubKeys2 = new int[validUsers.length];\n\t\tfor (int i=0; i<validUsers.length; i++) {\n\t\t\tline = ComMethods.getValueFor(validUsers[i], pubkeysfn);\n\t\t\tx = line.indexOf(',');\n\t\t\tusersPubKeys1[i] = new BigInteger(line.substring(0,x));\n\t\t\tusersPubKeys2[i] = new Integer(line.substring(x+1,line.length()));\n\t\t}\n\t}",
"public static void main(String[] args) {\r\n\r\n String message = \"Hello, I'm Alice!\";\r\n // Alice's private and public key\r\n RSA rsaAlice = new RSA();\r\n rsaAlice.generateKeyPair();\r\n // Bob's private and public key\r\n RSA rsaBob = new RSA();\r\n rsaBob.generateKeyPair();\r\n // encrypted message from Alice to Bob\r\n BigInteger cipher = rsaAlice.encrypt(message, rsaBob.pubKey);\r\n // create digital signature by Alice\r\n BigInteger signature = rsaAlice.createSignature(message);\r\n\r\n // Bob decrypt message and verify signature\r\n String plain = rsaBob.decrypt(cipher, rsaBob.pubKey);\r\n boolean isVerify = rsaBob.verifySignature(plain, signature, rsaAlice.pubKey);\r\n\r\n if( isVerify )\r\n {\r\n System.out.println(\"Plain text : \" + plain);\r\n }\r\n\r\n /**\r\n * Part II. Two-part RSA protocol to receive\r\n * session key, with signature\r\n */\r\n\r\n // A's private and public key\r\n RSA rsaA = new RSA();\r\n rsaA.generateKeyPair();\r\n // B's private and public key\r\n RSA rsaB = new RSA();\r\n rsaB.generateKeyPair();\r\n\r\n BigInteger newSessionKey = new BigInteger(\"123456789123465\", 10);\r\n // create message by A\r\n BigInteger S = newSessionKey.modPow(rsaA.getPrivKeyD(), rsaA.pubKey[1]);\r\n BigInteger k1 = newSessionKey.modPow(rsaB.pubKey[0], rsaB.pubKey[1]);\r\n BigInteger S1 = S.modPow(rsaB.pubKey[0], rsaB.pubKey[1]);\r\n\r\n // --------- sending message to B --------- >>>\r\n\r\n // receive message by B and take new session key\r\n BigInteger k = k1.modPow(rsaB.getPrivKeyD(), rsaB.pubKey[1]);\r\n BigInteger Sign = S1.modPow(rsaB.getPrivKeyD(), rsaB.pubKey[1]);\r\n BigInteger verifyK = Sign.modPow(rsaA.pubKey[0], rsaA.pubKey[1]);\r\n\r\n if(verifyK.equals(k))\r\n {\r\n System.out.println(\"B receive new session key from A: \" + k.toString());\r\n }\r\n else\r\n {\r\n System.out.println(\"B receive FAKE session key from A: \" + k.toString());\r\n }\r\n\r\n }",
"private void sendGroupMessage(String message){\n\n\t\tObject[] userIDs = chatInstanceMap.keySet().toArray();\n\n\t\tfor(int i = 0; i < userIDs.length; i++ ){\n\n\t\t\tsendMessage((String) userIDs[i], message);\n\t\t}\n\t}",
"public static void main(String[] args) throws ClassNotFoundException, BadPaddingException, IllegalBlockSizeException,\n IOException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException {\n KeyPairGenerator kpg = KeyPairGenerator.getInstance(\"RSA\");\n // Generate the keys — might take sometime on slow computers\n KeyPair myPair = kpg.generateKeyPair();\n\n /*\n * This will give you a KeyPair object, which holds two keys: a private\n * and a public. In order to make use of these keys, you will need to\n * create a Cipher object, which will be used in combination with\n * SealedObject to encrypt the data that you are going to end over the\n * network. Here’s how you do that:\n */\n\n // Get an instance of the Cipher for RSA encryption/decryption\n Cipher c = Cipher.getInstance(\"RSA\");\n // Initiate the Cipher, telling it that it is going to Encrypt, giving it the public key\n c.init(Cipher.ENCRYPT_MODE, myPair.getPublic());\n\n /*\n * After initializing the Cipher, we’re ready to encrypt the data.\n * Since after encryption the resulting data will not make much sense if\n * you see them “naked”, we have to encapsulate them in another\n * Object. Java provides this, by the SealedObject class. SealedObjects\n * are containers for encrypted objects, which encrypt and decrypt their\n * contents with the help of a Cipher object.\n *\n * The following example shows how to create and encrypt the contents of\n * a SealedObject:\n */\n\n // Create a secret message\n String myMessage = new String(\"Secret Message\");\n // Encrypt that message using a new SealedObject and the Cipher we created before\n SealedObject myEncryptedMessage= new SealedObject( myMessage, c);\n\n /*\n * The resulting object can be sent over the network without fear, since\n * it is encrypted. The only one who can decrypt and get the data, is the\n * one who holds the private key. Normally, this should be the server. In\n * order to decrypt the message, we’ll need to re-initialize the Cipher\n * object, but this time with a different mode, decrypt, and use the\n * private key instead of the public key.\n *\n * This is how you do this in Java:\n */\n\n // Get an instance of the Cipher for RSA encryption/decryption\n Cipher dec = Cipher.getInstance(\"RSA\");\n // Initiate the Cipher, telling it that it is going to Decrypt, giving it the private key\n dec.init(Cipher.DECRYPT_MODE, myPair.getPrivate());\n\n /*\n * Now that the Cipher is ready to decrypt, we must tell the SealedObject\n * to decrypt the held data.\n */\n\n // Tell the SealedObject we created before to decrypt the data and return it\n String message = (String) myEncryptedMessage.getObject(dec);\n System.out.println(\"foo = \"+message);\n\n /*\n * Beware when using the getObject method, since it returns an instance\n * of an Object (even if it is actually an instance of String), and not\n * an instance of the Class that it was before encryption, so you’ll\n * have to cast it to its prior form.\n *\n * The above is from: http:andreas.louca.org/2008/03/20/java-rsa-\n * encryption-an-example/\n *\n * [msj121] [so/q/13500368] [cc by-sa 3.0]\n */\n }",
"public void sendKeys() throws Exception{\n ATMMessage atmMessage = (ATMMessage)is.readObject();\r\n System.out.println(\"\\nGot response\");\r\n \r\n //System.out.println(\"Received second message from the client with below details \");\r\n //System.out.println(\"Response Nonce value : \"+atmMessage.getResponseNonce());\r\n \r\n if(!verifyMessage(atmMessage))error(\" Nonce or time stamp does not match\") ;\r\n kSession = crypto.makeRijndaelKey();\r\n \r\n Key kRandom = crypto.makeRijndaelKey();\r\n byte [] cipherText = crypto.encryptRSA(kRandom,kPubClient);\r\n os.writeObject((Serializable)cipherText);\r\n System.out.println(\"\\nSending Accept and random key\");\r\n \r\n \r\n cipherText = crypto.encryptRSAPrivateKey(kSession,kPrivBank);\r\n atmMessage = new ATMMessage(); \r\n atmMessage.setEncryptedSessionKey(cipherText);\r\n cipherText = crypto.encryptRijndael(atmMessage,kRandom);\r\n currTimeStamp = System.currentTimeMillis();\r\n os.writeObject((Serializable)cipherText);\r\n //System.out.println(\"Session Key send to the client \");\r\n \r\n //SecondServerMessage secondServerMessage = new SecondServerMessage();\r\n //secondServerMessage.setSessionKey(kSession);\r\n \r\n //byte [] cipherText1;\r\n //cipherText = crypto.encryptRSAPrivateKey(kSession,kPrivBank);\r\n //cipherText1 = crypto.encryptRSA(cipherText,clientPublicKey);\r\n //os.writeObject((Serializable)cipherText1);\r\n \r\n //System.out.println(\"Second message send by the server which contains the session key. \");\r\n //System.out.println(\"\\n\\n\\n\");\r\n \r\n \r\n }",
"public void sendmsg(String to, String msg){\n\n HashMap cur_hash = null;\n PrintWriter to_PW = null;\n\n try{\n synchronized (chat_room) {\n Iterator chat_hash = chat_room.values().iterator();\n while(chat_hash.hasNext()) {\n cur_hash = (HashMap)chat_hash.next();\n if(cur_hash.containsKey(to)) {\n to_PW = (PrintWriter)cur_hash.get(to);\n break;\n }\n }\n }\n \n if(to_PW != null){\n to_PW.println(msg);\n to_PW.flush();\n }\n } catch (Exception e) {\n System.out.println(e);\n } \n }",
"java.lang.String getPublicEciesKey();",
"public void generateKeys()\n\t{\n\t\tmyP = BigInteger.probablePrime(myView.getBitLength(), rand());\n\t\tmyQ = BigInteger.probablePrime(myView.getBitLength(), rand());\n\t\tif(confirmPrimes(myP, myQ))\n\t\t{\n\t\t\tpublicKey = myP.multiply(myQ);\n\t\t\tmyView.displayPublicKey(publicKey.toString());\n\t\t\tmyPhi = (myP.subtract(BigInteger.ONE).multiply(myQ.subtract(BigInteger.ONE)));\n\t\t\tprivateKey = E.modInverse(myPhi);\n\t\t\tmyView.displayPrivateKey(privateKey.toString());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgenerateKeys();\n\t\t}\n\t}",
"@Test\n\tpublic void getOtherKeys() {\n\t\tRsaKeyStore ks = new RsaKeyStore();\n\t\tKeyPair kp = RsaHelper.generateKeyPair();\n\t\tks.addOtherKey(\"first other one\", kp.getPublic());\n\t\tKeyPair kpp = RsaHelper.generateKeyPair();\n\t\tks.addOtherKey(\"second other one\", kpp.getPublic());\n\t\tPublicKey pk = ks.getOtherKey(\"first other one\");\n\t\tassertTrue(\"should be same key\", kp.getPublic().equals(pk));\n\t\tPublicKey ppk = ks.getOtherKey(\"second other one\");\n\t\tassertTrue(\"should be same key\", kpp.getPublic().equals(ppk));\n\t}",
"void onPrivMsg(TwitchUser sender, TwitchMessage message);",
"public void RSAyoyo() throws NoSuchAlgorithmException, GeneralSecurityException, IOException {\r\n\r\n KeyPairGenerator kPairGen = KeyPairGenerator.getInstance(\"RSA\");\r\n kPairGen.initialize(2048);\r\n KeyPair kPair = kPairGen.genKeyPair();\r\n publicKey = kPair.getPublic();\r\n System.out.println(publicKey);\r\n privateKey = kPair.getPrivate();\r\n\r\n KeyFactory fact = KeyFactory.getInstance(\"RSA\");\r\n RSAPublicKeySpec pub = fact.getKeySpec(kPair.getPublic(), RSAPublicKeySpec.class);\r\n RSAPrivateKeySpec priv = fact.getKeySpec(kPair.getPrivate(), RSAPrivateKeySpec.class);\r\n serializeToFile(\"public.key\", pub.getModulus(), pub.getPublicExponent()); \t\t\t\t// this will give public key file\r\n serializeToFile(\"private.key\", priv.getModulus(), priv.getPrivateExponent());\t\t\t// this will give private key file\r\n\r\n \r\n }",
"private static void sendMessageToAll(Message msg) throws IOException, EncodeException {\n String jsonStr = JSON.toJSONString(msg);\n\n for (String key : onlineSessions.keySet()) {\n System.out.println(\"WebSocketChatServer - Message \" + jsonStr + \" sent to client with username \" + key + \" and session \" + onlineSessions.get(key));\n System.out.println(key + \" : \" + onlineSessions.get(key));\n try {\n onlineSessions.get(key).getBasicRemote().sendObject(msg);\n } catch (IOException | EncodeException error) {\n error.printStackTrace();\n }\n }\n }",
"@Override\n\tpublic void visit(SendRSAKey srsak) {\n\t\t\n\t}",
"private static void SendToAuctioneer(BigInteger msg) {\r\n\t\tmsg=auctioneer_pk.encrypt(msg)[0];\r\n\t\tsendToClient(auctioneer,msg);\r\n\t}",
"@Override\n public void send(String key, String data) throws IOException {\n\n }",
"public void sendPlayer(Player p) {\n\t\tp.sendMessage(ChatColor.GREEN + \"Welcome to the \" + ChatColor.GOLD + \"Tregmine Network\" + ChatColor.GREEN + \" Lobby!\");\n\t\tByteArrayDataOutput out = ByteStreams.newDataOutput();\n\t\tout.writeUTF(\"Connect\");\n\t\tout.writeUTF(\"Hub\");\n\t\tp.sendPluginMessage(this, \"BungeeCord\", out.toByteArray());\n\t}",
"public void generateKey() {\n\twhile(true){\n\t rsaKeyA = (int)(Math.random()*20000 + 26);\n\t if(isPrime(rsaKeyA)){\n\t\tbreak;\n\t }\n\t}\n\twhile(true){\n\t rsaKeyB = (int)(Math.random()* 20000 + 26);\n\t if(isPrime(rsaKeyB)&& rsaKeyB != rsaKeyA){\n\t\tbreak;\n\t }\n\t}\n \n }",
"String getPublicKey();",
"java.lang.String getPublicKey();",
"public boolean sendHipChatMessage(String hipChatKey, String message) {\n\t\tthrow new NotImplementedException();\n\t}",
"private void sendMessage(String message) {\n\n // we need to encrypt message using destination public-key\n if (destinationPublicKey == null) return;\n\n /**\n * Encrypt Message Here\n */\n PublicKey publicKey = getPublicKey(Base64.decode(destinationPublicKey, Base64.URL_SAFE));\n KeyPair keyPair = new KeyPair(publicKey, null);\n SecurityKey securityKey = new SecurityKey(keyPair);\n String encryptedMessage = securityKey.encrypt(message);\n\n socket.emit(\"message\", encryptedMessage);\n\n // add raw text to recycler_view\n messages.add(new Message(nickname,messageEditText.getText().toString(),0));\n\n ChatAdapter adapter = new ChatAdapter(getApplicationContext(),messages);\n adapter.notifyDataSetChanged();\n\n chatRecyclerView.setAdapter(adapter);\n\n // clear text box\n messageEditText.setText(\"\");\n }",
"private static void getJokeOrProverb(String username, String userkey, String servername, int port){\n\t\tSocket socket;\n\t\tBufferedReader fromServer;\n\t\tPrintStream toServer;\n\n\t\ttry{\n\t\t\t// Open a new socket connection to the server with the specified port number\n\t\t\tsocket = new Socket(servername, port);\n\t\t\tfromServer = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\t\ttoServer = new PrintStream(socket.getOutputStream());\n\t\t\t// Send user name and user key to server\n\t\t\ttoServer.println(username + \" \" + userkey);\n\t\t\ttoServer.flush();\n\n\t\t\t// There is nothing special for the number(50) of iteration times\n\t\t\tString strOutput;\n\t\t\tfor (int ix = 1; ix <= 50; ix++){\n\t\t\t\tstrOutput = fromServer.readLine();\n\t\t\t\tif (strOutput == null){ // There is no more messages\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// Write log and print\n\t\t\t\t\twriteLog(strOutput);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Close the socket\n\t\t\tsocket.close();\n\t\t}\n\t\tcatch(IOException ex) {\n\t\t\twriteLog(\"Exception occurs, see the below details:\");\n\t\t\tex.printStackTrace ();\n\t\t}\n\t}",
"public String getPublicKey();",
"public void send(String user, String msgToSend, String userFrom){\n\t\ttry{\n\t\t\tif(sock.isConnected()){\n\t\t\t\tOutputStream sout = sock.getOutputStream();\n\t\t\t\tByteArrayOutputStream out = new ByteArrayOutputStream();\n\t\t\t\tCryptoHelper ch = new CryptoHelper();\n\t\t\t\t\n\t\t\t\t// send KAS{Key_Req+Username}\n\t\t\t\tHashHelper.WriteInt(out, KEY_REQ);\n\t\t\t\tout.write(user.getBytes());\n\t\t\t\tbyte[] msg = ch.symEncrypt(symK, out.toByteArray());\n\t\t\t\tout = new ByteArrayOutputStream();\n\t\t\t\tHashHelper.WriteInt(out, msg.length);\n\t\t\t\tout.write(msg);\n\t\t\t\tsout.write(out.toByteArray());\n\t\t\t\t\n\t\t\t\t// receive KAS{B,ttB,KAB}\n\t\t\t\tDataInputStream dis = new DataInputStream(sock.getInputStream());\n\t\t\t\t\n\t\t\t\t// read the message encrypted with the symmetric key\n\t\t\t\tbyte[] msgiv = new byte[HashHelper.ReadInt(dis)];\n\t\t\t\tdis.readFully(msgiv);\n\t\t\t\t\n\t\t\t\t// Decrypt the message\n\t\t\t\tByteArrayInputStream bais = new ByteArrayInputStream(msgiv);\n\t\t\t\tDataInputStream dis2 = new DataInputStream(bais);\n\t\t\t\tbyte[] iv = new byte[HashHelper.ReadInt(dis2)];\n\t\t\t\tdis2.readFully(iv);\n\t\t\t\tbyte[] msg_en = new byte[HashHelper.ReadInt(dis2)]; \n\t\t\t\tdis2.readFully(msg_en);\n\t\t\t\tbyte[] msg1 = ch.symDecrypt(symK, iv, msg_en);\n\n\t\t\t\t// Separate B,ttB and KAB\n\t\t\t\tByteArrayInputStream bin = new ByteArrayInputStream(msg1);\n\t\t\t\tObjectInputStream deserializer = new ObjectInputStream(bin);\n\t\t\t\tString userTo = (String) deserializer.readObject();\n\t\t\t\tInetAddress sockB = (InetAddress) deserializer.readObject();\n\t\t\t\tint portB = deserializer.readInt();\n\t\t\t\tint len = deserializer.readInt();\n\t\t\t\tbyte[] ttB = new byte[len];\n\t\t\t\tdeserializer.readFully(ttB);\n\t\t\t\tSecretKey KAB = (SecretKey) deserializer.readObject();\n\t\t\t\t\n\t\t\t\t// Connecting to the intended online user\n\t\t\t\tSocket socB = new Socket(sockB, portB);\n\t\t\t\tdis = new DataInputStream(socB.getInputStream());\n\t\t\t\tsout = socB.getOutputStream();\n\t\t\t\t\n\t\t\t\t// create Diffie-Hellman part g^a modp\n\t\t\t\tDHHelper dh = new DHHelper();\n\t\t\t\tout = new ByteArrayOutputStream();\n\t\t\t\tObjectOutputStream serializer = new ObjectOutputStream(out);\n\t\t\t\tDHParameterSpec spec = dh.getParameterSpec();\n\t\t\t\tserializer.writeObject(spec.getP());\n\t\t\t\tserializer.writeObject(spec.getG());\n\t\t\t\tserializer.writeInt(spec.getL());\n\t\t\t\tserializer.writeObject(dh.getPublicKey());\n\t\t\t\tserializer.flush();\n\t\t\t\tbyte[] gamodp = out.toByteArray();\n\t\t\t\t\n\t\t\t\t// Creating KAB{chat_msg,A,N1} to be sent over to the other user\n\t\t\t\tSecureRandom rand = new SecureRandom();\n\t\t\t\tbyte[] N1 = new byte[32];\n\t\t\t\trand.nextBytes(N1);\n\t\t\t\tout = new ByteArrayOutputStream();\n\t\t\t\tout.write(MESSAGE);\n\t\t\t\tbyte[] userFromB = userFrom.getBytes();\n\t\t\t\tHashHelper.WriteInt(out, userFromB.length);\n\t\t\t\tout.write(userFromB);\n\t\t\t\tout.write(N1);\n\t\t\t\tbyte[] encMsg = ch.symEncrypt(KAB, out.toByteArray());\n\t\t\t\t\n\t\t\t\t// Send ttB, g^a modp and KAB{chat_msg,A,N1} to the intended receiver\n\t\t\t\tout = new ByteArrayOutputStream();\n\t\t\t\tHashHelper.WriteInt(out, ttB.length);\n\t\t\t\tout.write(ttB);\n\t\t\t\tHashHelper.WriteInt(out, gamodp.length);\n\t\t\t\tout.write(gamodp);\n\t\t\t\tHashHelper.WriteInt(out, encMsg.length);\n\t\t\t\tout.write(encMsg);\n\t\t\t\tsout.write(out.toByteArray());\n\t\t\t\t\n\t\t\t\t// Receiving g^b modp and KAB{N1,N2}\n\t\t\t\t// Read Diffie-Hellman part of client B\n\t\t\t\tdeserializer = new ObjectInputStream(dis);\n\t\t\t\tPublicKey pkB = (PublicKey) deserializer.readObject();\n\t\t\t\t\n\t\t\t\t// Create key KABN\n\t\t\t\tSecretKey KABN = dh.doFinal(pkB, \"AES\");\n\t\t\t\t\n\t\t\t\t// Receive KAB{N1,N2}\n\t\t\t\tlen = HashHelper.ReadInt(dis);\n\t\t\t\tmsgiv = new byte[len];\n\t\t\t\tdis.readFully(msgiv);\n\t\t\t\t\n\t\t\t\t// Decrypt the message\n\t\t\t\tbais = new ByteArrayInputStream(msgiv);\n\t\t\t\tdis2 = new DataInputStream(bais);\n\t\t\t\tiv = new byte[HashHelper.ReadInt(dis2)];\n\t\t\t\tdis2.readFully(iv);\n\t\t\t\tmsg_en = new byte[HashHelper.ReadInt(dis2)]; \n\t\t\t\tdis2.readFully(msg_en);\n\t\t\t\tmsg1 = ch.symDecrypt(KAB, iv, msg_en);\n\t\t\t\t\n\t\t\t\tbyte[] N1_received = Arrays.copyOfRange(msg1, 0, 32);\n\t\t\t\tbyte[] N2 = Arrays.copyOfRange(msg1, 32, msg1.length);\n\t\t\t\t\n\t\t\t\t// Validate N1\n\t\t\t\tif(!Arrays.equals(N1, N1_received)){\n\t\t\t\t\tSystem.out.println(\"N1 nonce is not equal...\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Send KAB{N2} to B\n\t\t\t\tbyte[] N2enc = ch.symEncrypt(KAB, N2); // Encrypting N2 with the symmetric key KAB\n\t\t\t\tout = new ByteArrayOutputStream();\n\t\t\t\tHashHelper.WriteInt(out, N2enc.length);\n\t\t\t\tout.write(N2enc);\n\t\t\t\tsout.write(out.toByteArray());\n\t\t\t\t\n\t\t\t\t// For sending the message to B - KABN{message,HMAC}\n\t\t\t\tout = new ByteArrayOutputStream();\n\t\t\t\tserializer = new ObjectOutputStream(out);\n\n\t\t\t\t// Encrypting the message to be sent to B\n\t\t\t\tserializer.writeObject(msgToSend);\n\t\t\t\tserializer.flush();\n\n\t\t\t\t// Create HMAC\n\t\t\t\tMessageDigest msgDigest = MessageDigest.getInstance(\"SHA-256\");\n\t\t\t\tbyte[] mac = msgDigest.digest(msgToSend.getBytes());\n\t\t\t\tHashHelper.WriteInt(out, mac.length);\n\t\t\t\tout.write(mac);\n\t\t\t\tmsg_en = ch.symEncrypt(KABN, out.toByteArray());\n\t\t\t\t\n\t\t\t\t// Send KABN{message,HMAC}\n\t\t\t\tout = new ByteArrayOutputStream(); \n\t\t\t\tHashHelper.WriteInt(out, msg_en.length);\n\t\t\t\tout.write(msg_en);\n\t\t\t\tsout.write(out.toByteArray());\n\t\t\t\n\t\t\t\tSystem.out.println(\"Message sent...\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Connection lost...\");\n\t\t\t}\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void main(String[] args) throws Exception\n\t{\n\t\tSecurity.addProvider(new BouncyCastleProvider());\n\t\t//generate pub/prv keys \n\t\trsaGenerator rsa = new rsaGenerator();\n\t\trsa.generateRSAKey(\"server\");\n\n\t\t//Create a socket on port 3000\n\t\tServerSocket ss = new ServerSocket(3000);\t\n\t\tSystem.out.println(\"Waiting for client to connect...\");\n\t\tSocket s = ss.accept(); //Accept client connection \n\t\tSystem.out.println(\"Client connected\");\n\t\tObjectOutputStream dos = new ObjectOutputStream(s.getOutputStream()); //outputstream to send message to client\n\t\tdos.writeObject(\"You are connected\");\n\t\t\t\n\t\tObjectInputStream dis = new ObjectInputStream(s.getInputStream()); //input stream to recieve message from client\n\t\tSystem.out.println();\n\n //Recieve key and message from client\n SecretKey k = (SecretKey) dis.readObject(); //recieves the key\n byte[] iv = (byte[])dis.readObject(); //receives the iv\n byte[] received = (byte[])dis.readObject(); //recieves the encypted hash + message\n \n System.out.println(\"Received: \"+Base64.getEncoder().encodeToString(received));\n System.out.println();\n\n //decrypt the shared key using RSA\n System.out.println(\"Encoded Key: \"+ k);\n SecretKey decKey = rsa.decryptSharedKey(k.getEncoded());\n System.out.println(\"Decoded Key: \"+decKey);\n System.out.println();\n\n //decrypt using shared key \n\t\tbyte[] decryptCompByte = decryptByte(received,decKey,iv);\n System.out.println(\"Decrypted compressed concatenation: \"+Base64.getEncoder().encodeToString(decryptCompByte));\n System.out.println();\n \n //decompress\n String dcomp = decompress(decryptCompByte);\n \n \n //Separating the concatination\n String hash = dcomp.substring(0,dcomp.indexOf(\"|||\"));\n String message = dcomp.substring(dcomp.indexOf(\"|||\")+3);\n System.out.println(\"Encrypted hash: \"+hash);\n System.out.println();\n \n //decrypt hash using rsa\n hash = rsa.decryptHas(Base64.getDecoder().decode(hash));\n System.out.println(\"Decrypted hash: \"+hash);\n System.out.println();\n\n //create own hash to compare for authentication\n String myHash = Hash.hash(message);\n if(hash.equals(myHash))\n {\n System.out.println(\"---Message authenticated---\");\n System.out.println(message);\n System.out.println();\n System.out.println(\"Message received. Goodbye.\");\n }\n else\n {\n System.out.println(\"---Message NOT authenticated---\\nGoodbye.\");\n }\n \n s.close();\n ss.close();\n dos.close();\n dis.close();\n\t\t\t\n\n\t}",
"public static void main(String[] args){\n\t\tRSA rsa = new RSA();\n\t\tString msg = \"hi there\";\n\t\tbyte [] code = rsa.encrypt(msg, rsa.publicKey);\n\t\tSystem.out.println(code.toString());\n\t\tSystem.out.println(rsa.decrypt(code, rsa.privateKey));\n\t}",
"public static void client() \n\t{\n\t\tint cMessage;\n\t\tint cMessageSquared;\n\t\tfor(int i=0; i<serverMsg.length;i++)\n\t\t{\n\t\t\tcMessage = clientMsg[i]; \n\t\t\tcMessageSquared = cMessage*cMessage;\n\t\t\tclientCyphertext[i] = Damgard.Encrypt(BigInteger.valueOf(cMessage),key);\n\t\t\tclientCyphertextSquared[i] = Damgard.Encrypt(BigInteger.valueOf(cMessageSquared),key);\n\t\t\tif(debug) System.out.println(\"x^2 \" + i + \": \" + Damgard.Decrypt(clientCyphertextSquared[i], key));\n\t\t\tif(debug) System.out.println(\"x\" + i + \": \" + Damgard.Decrypt(clientCyphertext[i], key));\n\t\t}\n\t}",
"static synchronized void SendMessage(String message, ClientHandler user, boolean same) throws IOException\r\n {\r\n String mes = message;\r\n if(!same)\r\n mes = user.username + \": \" + mes;\r\n //System.out.println(mes);\r\n\r\n chatLogWriter.write(mes + \"\\n\");\r\n chatLogWriter.flush();\r\n\r\n for (ClientHandler ch : users)\r\n {\r\n if(!ch.equals(user))\r\n ch.WriteCypherMessage(mes);\r\n else if(same)\r\n ch.WriteCypherMessage(message);\r\n }\r\n }",
"@Test\n\tpublic void addOtherKeys() {\n\t\tRsaKeyStore ks = new RsaKeyStore();\n\t\tKeyPair kp = RsaHelper.generateKeyPair();\n\t\tassertTrue(\"should have added key\", ks.addOtherKey(\"firstOther\", kp.getPublic()));\n\t\tKeyPair kpp = RsaHelper.generateKeyPair();\n\t\tassertTrue(\"should have added key\", ks.addOtherKey(\"secondOther\", kpp.getPublic()));\n\t}",
"public abstract void sendPrivateMessage(String nickname, String message);",
"public void make_chat_room() {\n client_PW.println(\"------------make new chat-------------\");\n client_PW.println(\"Enter chat name : \");\n client_PW.flush();\n String line = null;\n String ad=null;\n PrintWriter pw=null;\n HashMap new_chat = new HashMap();\n try {\n line = client_BR.readLine();\n try{\n File file = new File(System.getProperty(\"user.home\"),line + \".txt\");\n pw = new PrintWriter(file);\n \n }catch(Exception e){System.out.println(e);}\n \n synchronized(chat_room) {\n chat_room.put(line, new_chat);\n }\n synchronized(cur_chat_room) {\n cur_chat_room.remove(client_ID);\n }\n String msg = client_ID + \"님이 퇴장하셨습니다\";\n broadcast(msg, null);\n synchronized(new_chat) {\n new_chat.put(client_ID,client_PW);\n }\n synchronized(new_chat) {\n \n new_chat.put(ad,pw);\n }\n cur_chat_room = new_chat;\n } catch (Exception e) { System.out.println(e); }\n \n\n }",
"OctetString getPublicKey();",
"private static void keyPairGenerator() throws NoSuchAlgorithmException, IOException {\n KeyPairGenerator kpg = KeyPairGenerator.getInstance(\"RSA\");\n kpg.initialize(2048);\n KeyPair keyPair = kpg.generateKeyPair();\n\n //Get public and private keys\n Key publicKey = keyPair.getPublic();\n Key privateKey = keyPair.getPrivate();\n\n String outFile = files_path + \"/Client_public\";\n PrintStream out = null;\n out = new PrintStream(new FileOutputStream(outFile + \".key\"));\n out.write(publicKey.getEncoded());\n out.close();\n\n outFile = files_path + \"/Client_private\";\n out = new PrintStream(new FileOutputStream(outFile + \".key\"));\n out.write(privateKey.getEncoded());\n out.close();\n\n System.err.println(\"Private key format: \" + privateKey.getFormat());\n // prints \"Private key format: PKCS#8\" on my machine\n\n System.err.println(\"Public key format: \" + publicKey.getFormat());\n // prints \"Public key format: X.509\" on my machine\n\n }",
"void sendExample(String key, String value1, String value2) {\n messageProducer.send(new Key(key), new Value(value1, value2));\n }",
"@Override\n\tpublic void procesareMesajChat(MesajChat mesaj) {\n\t\tif(mesaj.getDestinatie(). isEmpty() || mesaj.getDestinatie().equals(\"@Everyoane\")) {\n\t\t\tif(this.next!=null)\n\t\t\t\tthis.next.procesareMesajChat(mesaj);\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//procesare mesaj privat\n\t\t\tSystem.out.println(String.format(\"Mesaj privat pentru %s = %s\",\n\t\t\t\t\tmesaj.getDestinatie(), mesaj.getContinut()));\n\t\t}\n\t}",
"public byte[] getPubkey() {\n return pubkey;\n }",
"private byte[] encryptSymmetricKey(PublicKey receiverPublicKey, SecretKey semetricKey) throws Exception {\n\t\ttry {\n\t\t\tmyCipher = Cipher.getInstance(\"RSA\");\n\t\t\tmyCipher.init(Cipher.ENCRYPT_MODE, receiverPublicKey);\n\t\t\treturn myCipher.doFinal(semetricKey.getEncoded());\n\t\t} catch (Exception e) {\n\t\t\twriteToLog(\"Error While trying to encrypt the semetric-key: \" + e.getMessage());\n\t\t\tLogWriter.close();\n\t\t\tthrow new Exception();\n\t\t}\n\n\t}",
"String publicKey();",
"private String getClientKey(Channel channel) {\n InetSocketAddress socketAddress = (InetSocketAddress) channel.remoteAddress();\n String hostName = socketAddress.getHostName();\n int port = socketAddress.getPort();\n return hostName + port;\n }",
"public void process(Key msg) throws IOException {\n relay(msg);\n }",
"public void sendGameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tString message = \"UDGM\" + lobby.getGameString();\r\n\t\t\r\n\t\tif(!players.isEmpty()){\r\n\t \tfor(int i=0; i<players.size(); i++){\t \t\t\r\n\t \t\tsendOnePlayer(players.get(i), message);\t \t\t\r\n\t \t}\r\n\t\t}\r\n\t}",
"public static String createAuthorizedKeysSegment(String proxyexecutable, String key, String pubkey){\n String ret=\"\";\n String command = \" command=\\\"\"+proxyexecutable+\" username\\\",no-X11-forwarding,no-pty,no-port-forwarding,no-agent-forwarding \";\n ret=\"#\"+key+\"\\n\"+command+\" \"+pubkey+\"\\n\"+\"#\"+key+\"end\"+\"\\n\";\n return ret;\n }",
"void distributeKeys() {\n // System.out.println(\"Mapper.distributeKeys() :: 1\");\n while (!toDistribute.empty()) {\n Entry e = toDistribute.pop();\n sendEntry(e);\n printAct(\">sent Entry \" + e.hash);\n\n }//while\n }",
"public void authenticate(View view) {\n String value = makeXor(xorNum.getBytes(), key.getBytes());\n\n if(socket.isConnected()){\n try {\n socket.getOutputStream().write(value.getBytes());\n socket.getOutputStream().flush();\n Toast.makeText(ControlActivity.this, \"Message Sent\", Toast.LENGTH_SHORT).show();\n } catch (IOException e) {\n e.printStackTrace();\n Toast.makeText(ControlActivity.this, \"Error in sending message\", Toast.LENGTH_SHORT).show();\n }\n }else{\n Toast.makeText(ControlActivity.this, \"Bluetooth connection lost!\", Toast.LENGTH_SHORT).show();\n }\n\n\n }",
"public void generateKeys() {\r\n try {\r\n SecureRandom random = SecureRandom.getInstance(Constants.SECURE_RANDOM_ALGORITHM);\r\n KeyPairGenerator generator = KeyPairGenerator.getInstance(Constants.ALGORITHM);\r\n generator.initialize(Constants.KEY_BIT_SIZE, random);\r\n \r\n KeyPair keys = generator.genKeyPair();\r\n \r\n persistPrivateKey(keys.getPrivate().getEncoded());\r\n persistPublicKey(keys.getPublic().getEncoded());\r\n logger.log(Level.INFO, \"Done with generating persisting Public and Private Key.\");\r\n \r\n } catch (NoSuchAlgorithmException ex) {\r\n logger.log(Level.SEVERE, \"En error occured while generating the Public and Private Key\");\r\n }\r\n }",
"private ChatNetworkServicePluginRoot getRandomChatNs(){\n Map.Entry<String, ChatNetworkServicePluginRoot> entry = nsPublicKeyMap.entrySet().iterator().next();\n return entry.getValue();\n }",
"public boolean isMine(String publicKey) {\r\n return (publicKey.equals(recipient));\r\n }",
"public void tellEveryone(String message) \r\n\t{\r\n\t\tIterator it = Output_Streams_Client.iterator();\r\n\t\twhile (it.hasNext()) \r\n\t\t{\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tPrintWriter writer = (PrintWriter) it.next();\r\n\t\t\t\twriter.println(message);\r\n\t\t\t\tChat.append(\"Sending : \" + message + \"\\n\");\r\n\t\t\t\twriter.flush();\r\n\t\t\t\tChat.setCaretPosition(Chat.getDocument().getLength());\r\n\r\n\t\t\t} \r\n\t\t\tcatch (Exception ex) \r\n\t\t\t{\r\n\t\t\t\tChat.append(\"Mistake to tell everyone \\n\");\r\n\t\t\t}\r\n\t\t} \r\n\t}",
"public static void main(String[] args) {\n KeyPairGenerator keygen = null;\n try {\n keygen = KeyPairGenerator.getInstance(\"RSA\");\n SecureRandom secrand = new SecureRandom();\n // secrand.setSeed(\"17\".getBytes());//初始化随机产生器\n keygen.initialize(2048, secrand);\n KeyPair keys = keygen.genKeyPair();\n PublicKey publicKey = keys.getPublic();\n PrivateKey privateKey = keys.getPrivate();\n String pubKey = Base64.encode(publicKey.getEncoded());\n String priKey = Base64.encode(privateKey.getEncoded());\n System.out.println(\"pubKey = \" + new String(pubKey));\n System.out.println(\"priKey = \" + new String(priKey));\n\n/*\n X509EncodedKeySpec keySpec = new X509EncodedKeySpec(pubkey.getEncoded());\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n PublicKey publicKey = keyFactory.generatePublic(keySpec);\n pubKey = Base64.encode(publicKey.getEncoded());\n System.out.println(\"pubKey = \" + new String(pubKey));\n*/\n\n/*\n PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(prikey.getEncoded());\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n PrivateKey privateKey = keyFactory.generatePrivate(keySpec);\n priKey = Base64.encode(privateKey.getEncoded());\n System.out.println(\"priKey = \" + new String(priKey));\n*/\n //(N,e)是公钥\n RSAPublicKey rsaPublicKey = (RSAPublicKey) publicKey;\n System.out.println(\"RSAPublicKey:\");\n System.out.println(\"Modulus.length=\" +\n rsaPublicKey.getModulus().bitLength());\n System.out.println(\"Modulus=\" + rsaPublicKey.getModulus().toString());//n\n System.out.println(\"PublicExponent.length=\" +\n rsaPublicKey.getPublicExponent().bitLength());\n System.out.println(\"PublicExponent=\" + rsaPublicKey.getPublicExponent().toString());//e\n\n\n //(N,d)是私钥\n RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) privateKey;\n System.out.println(\"RSAPrivateKey:\");\n System.out.println(\"Modulus.length=\" +\n rsaPrivateKey.getModulus().bitLength());\n System.out.println(\"Modulus=\" + rsaPrivateKey.getModulus().toString());//n\n System.out.println(\"PrivateExponent.length=\" +\n rsaPrivateKey.getPrivateExponent().bitLength());\n System.out.println(\"PrivateExponent=\" + rsaPrivateKey.getPrivateExponent().toString());//d\n\n String encodeData = encode(\" public static String encode(String toEncode,String D, String N) {\\n\" +\n \" // BigInteger var2 = new BigInteger(\\\"17369712262290647732768133445861332449863405383733306695896586821166245382729380222118948668590047591903813382253186640467063376463309880263824085810383552963627855603429835060435976633955217307266714318344160886538360012623239010786668755679438900124601074924850696725233212494777766999123952653273738958617798460338184668049410136792403729341479373919634041235053823478242208651592611582439749292909499663165109004083820192135244694907138372731716013807836312280426304459316963033144149631900633817073029029413556757588486052978078614048837784810650766996280232645714319416096306667876390555673421669667406990886847\\\");\\n\" +\n \" // BigInteger var3 = new BigInteger(\\\"65537\\\");\\n\" +\n \" int MAX_ENCRYPT_BLOCK = 128;\\n\" +\n \" int offSet = 0;\\n\" +\n \" byte[] cache;\\n\" +\n \" int i = 0;\\n\" +\n \" ByteArrayOutputStream out = new ByteArrayOutputStream();\\n\" +\n \" try {\\n\" +\n \" RSAPrivateKeySpec rsaPrivateKeySpec = new java.security.spec.RSAPrivateKeySpec(new BigInteger(N),new BigInteger(D));\\n\" +\n \" KeyFactory keyFactory = java.security.KeyFactory.getInstance(\\\"RSA\\\");\\n\" +\n \" PrivateKey privateKey = keyFactory.generatePrivate(rsaPrivateKeySpec);\\n\" +\n \" Cipher cipher = javax.crypto.Cipher.getInstance(\\\"RSA\\\");\\n\" +\n \" cipher.init(Cipher.ENCRYPT_MODE,privateKey);\\n\" +\n \"\\n\" +\n \" byte[] data = toEncode.getBytes(StandardCharsets.UTF_8);\\n\" +\n \" int inputLen = data.length;\\n\" +\n \" // 对数据分段加密\\n\" +\n \" while (inputLen - offSet > 0) {\\n\" +\n \" if (inputLen - offSet > MAX_ENCRYPT_BLOCK) {\\n\" +\n \" cache = cipher.doFinal(data, offSet, MAX_ENCRYPT_BLOCK);\\n\" +\n \" } else {\\n\" +\n \" cache = cipher.doFinal(data, offSet, inputLen - offSet);\\n\" +\n \" }\\n\" +\n \" out.write(cache, 0, cache.length);\\n\" +\n \" i++;\\n\" +\n \" offSet = i * MAX_ENCRYPT_BLOCK;\\n\" +\n \" }\\n\" +\n \" byte[] datas = out.toByteArray();\\n\" +\n \" out.close();\\n\" +\n \"\\n\" +\n \" //byte[] datas = datas = cipher.doFinal(toEncode.getBytes());\\n\" +\n \" datas = org.apache.commons.codec.binary.Base64.encodeBase64(datas);\\n\" +\n \" return new String(datas,StandardCharsets.UTF_8);\\n\" +\n \" } catch (NoSuchAlgorithmException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (InvalidKeySpecException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (NoSuchPaddingException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (InvalidKeyException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (BadPaddingException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (IllegalBlockSizeException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (IOException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" }\\n\" +\n \" return null;\\n\" +\n \" }\",rsaPrivateKey.getPrivateExponent().toString(),rsaPrivateKey.getModulus().toString());\n String decodeData = decode(encodeData,rsaPublicKey.getPublicExponent().toString(),rsaPublicKey.getModulus().toString());\n\n System.out.println(encodeData);\n System.out.println(decodeData);\n\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }/* catch (InvalidKeySpecException e) {\n e.printStackTrace();\n }*/\n }",
"ArrayList<ExportedKeyData> generatePublicKeyList();",
"public void generateKeyPair() {\n\t\ttry {\n\t\t\tKeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"DSA\", \"SUN\");\n\t\t\tSecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\", \"SUN\");\n\t\t\tkeyGen.initialize(1024, random);\n\t\t\tKeyPair pair = keyGen.generateKeyPair();\n\t\t\tprivateKey = pair.getPrivate();\n\t\t\tpublicKey = pair.getPublic();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public synchronized void sendPublicMessageToPlayer(Player recipient, String message) {\n session.sendMessage(gameChannel, recipient.getUserName() + \", \" + message,null);\n }",
"byte[] encodePublicKey(PublicKey publicKey) throws IOException;",
"public byte[] getPubKey() {\n return pub.getEncoded();\n }",
"@Override\n\tpublic void visit(SendSymmetricKey ssyk) {\n\t\t\n\t}",
"public void sendChat(String client, String message) {\n\t\t//enqueue(\"PRIVMSG #\"+myself+\" :.w \"+client + \" imGlitch \" + message); //whisper\n\t\tenqueue(\"PRIVMSG #\"+Executable.targetChannel+\" :imGlitch (@\"+client + \") \" + message);\n\t}",
"public void send_message(){\n logical_clock++;\n System.out.println(\"Send Message Clock:\" +logical_clock);\n encrypt(logical_clock);\n\n }",
"private void broadcast(String msg) {\n\t\tIterator i = onlineUsers.entrySet().iterator();\n\t\t\n\t\twhile (i.hasNext()) {\n\t\t\tMap.Entry p = (Map.Entry)i.next();\n\t\t\tUser u = (User)p.getValue();\n\t\t\t\n\t\t\tu.output.println(msg);\n\t\t}\n\t}",
"public void connect() throws OOBException {\n \t\tlog.debug(\"enter to connect \");\n \t\tJSch jsch = new JSch();\n \t\ttry {\n\t\t\tjsch.addIdentity(PRIVATE_KEY, PASSPHRASE);\n \t\t\tjsch.setKnownHosts(KNOWN_HOSTS);\n \t\t\tlog.debug(\"user \" + user + \"host : \" + host);\n \t\t\tsession = jsch.getSession(user, host, 22);\n \t\t\tsession.connect();\n \t\t} catch (JSchException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}",
"public void sendTo(P2PUser dest, Object msg) throws IOException;",
"private void negotiateSecurityParams(CommunicationChannel channel) throws Exception {\n channel.writeMessage(CryptoUtils.getBase64FromKey(keyPair.getPublic()));\n\n // read the symmetric key\n String encryptedSymmetricKey = channel.readMessage();\n String b64key = CryptoUtils.decrypt(encryptedSymmetricKey, keyPair.getPrivate());\n final byte[] key = Base64.getDecoder().decode(b64key.getBytes());\n\n DataTransformer inputTransformer = (input, length) -> CryptoUtils.symmetricEncrypt(new String(input), key).getBytes();\n DataTransformer outputTransformer = ((input, length) -> CryptoUtils.symmetricDecrypt(new String(input), key).getBytes());\n\n channel.withInputTransformer(inputTransformer);\n channel.withOutputTransformer(outputTransformer);\n }",
"com.google.protobuf.ByteString\n getPubkeyBytes();",
"public byte[] encrypt(String data, Key privatekey) {\r\n\t\tif (!presentkey) {\r\n\t\t\t//TODO\r\n\t\t\tkeyDiffieHellmanFirst();\r\n\t\t\t// need to send these values to other side\r\n\t\t\t// wait\r\n\t\t\tkeyDiffieHellmanFinal(//nummer uit packet from the other side);\r\n\t\t}\r\n\t\tbyte[] encrypt = OFB.EnDecrypt(data.getBytes(), diffie.getKey().toByteArray());\r\n\t\tString sign = ((Integer) data.hashCode()).toString();\r\n\t\tbyte[] signed = RSA.encrypt(sign, privatekey);\r\n\t\tbyte[] encrypted = new byte[encrypt.length + signed.length];\r\n\t\tSystem.arraycopy(encrypt, 0, encrypted, 0, encrypt.length);\r\n\t\tSystem.arraycopy(signed, 0, encrypted, encrypt.length, signed.length);\r\n\t\treturn encrypted;\r\n\t}",
"public void MultiSend(KeyPair kp) {\n Socket sock;\n PrintStream toServer;\n try {\n for (int i = 0; i < numProcesses; i++) {\n sock = new Socket(serverName, Ports.KeyServerPortBase + i);\n toServer = new PrintStream(sock.getOutputStream()); \n toServer.println(kp.getPublic()); //sending our Public key to every process\n toServer.flush();\n sock.close();\n }\n \n Thread.sleep(1000); //wait for keys to settle\n long current_time = System.currentTimeMillis(); //current time for Timestamp field\n File f = new File(\"BlockInput\" + Blockchain.PID + \".txt\");\n FileReader fr = new FileReader(f);\n BufferedReader br = new BufferedReader(fr);\n \n //read each line into input and place it into a block\n String realBlockA = System.currentTimeMillis() + \" \" + br.readLine(); \n String realBlockB = System.currentTimeMillis() + \" \" + br.readLine();\n String realBlockC = System.currentTimeMillis() + \" \" + br.readLine();\n String realBlockD = System.currentTimeMillis() + \" \" + br.readLine();\n String toConvertA = realBlockA;\n BlockRecord A = new BlockRecord();\n BlockRecord B = new BlockRecord();\n BlockRecord C = new BlockRecord();\n BlockRecord D = new BlockRecord();\n //converting each String read in from input into a Block\n A = BlockProcessing.toXML(realBlockA, Blockchain.PID);\n B = BlockProcessing.toXML(realBlockB, Blockchain.PID);\n C = BlockProcessing.toXML(realBlockC, Blockchain.PID);\n D = BlockProcessing.toXML(realBlockD, Blockchain.PID);\n \n for (int i = 0; i < numProcesses; i++) { //send block A to each process\n sock = new Socket(serverName, Ports.UnverifiedBlockServerPortBase + i);\n toServer = new PrintStream(sock.getOutputStream());\n toServer.println(realBlockA);\n toServer.flush();\n sock.close();\n }\n \n for (int i = 0; i < numProcesses; i++) { //send block B to each process\n sock = new Socket(serverName, Ports.UnverifiedBlockServerPortBase + i);\n toServer = new PrintStream(sock.getOutputStream());\n toServer.println(realBlockB);\n toServer.flush();\n sock.close();\n }\n \n for (int i = 0; i < numProcesses; i++) { //send block C to each process\n sock = new Socket(serverName, Ports.UnverifiedBlockServerPortBase + i);\n toServer = new PrintStream(sock.getOutputStream());\n toServer.println(realBlockC);\n toServer.flush();\n sock.close();\n }\n \n for (int i = 0; i < numProcesses; i++) { //send block D to each process\n sock = new Socket(serverName, Ports.UnverifiedBlockServerPortBase + i);\n toServer = new PrintStream(sock.getOutputStream());\n toServer.println(realBlockD);\n toServer.flush();\n sock.close();\n }\n \n } \n catch (Exception x) {\n x.printStackTrace();\n }\n }",
"public static KeyPair generateRecipientKeyPairFromSender(Message message) throws MessagingException {\n\n PublicKey publicKeySender = HeaderUtils.getHeaderSenderPublicKey(message);\n\n try {\n DHParameterSpec paramsFromSender = DHHelper.PublicKeyClass.keyToParams(publicKeySender);\n return DHAlgorithm.generateKeyPairFromParameters(paramsFromSender.getP(), paramsFromSender.getG());\n } catch (InvalidAlgorithmParameterException |\n NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n return null;\n }",
"private void abrirVentanaChatPrivada() {\n\t\tthis.chatPublico = new MenuVentanaChat(\"Sala\", this, false);\n\t}",
"private void sendGMToAll(String msg){\r\n for(ClientHandler ch: clientThreads){\r\n try{\r\n //Get the client's ObjectOutputStream\r\n ObjectOutputStream oos = ch.getOOS();\r\n //Print the message to the client\r\n oos.writeObject(new DataWrapper(0, msg, true));\r\n } catch(IOException ioe) {\r\n System.out.println(\"IOException occurred: \" + ioe.getMessage());\r\n ioe.printStackTrace();\r\n }\r\n }\r\n }",
"public static void publicAndPrivateKeys() throws Exception {\n Metered metered = new Metered();\n // Set public and private keys\n metered.setMeteredKey(\"your-public-key\", \"your-private-key\");\n // ExEnd:PublicAndPrivateKeys\n }",
"private synchronized void sendToAllClients(Object whatever) // Synchronized to work among multiple clients and multiple threads\n {\n System.out.println(\"Sending '\" + whatever + \"' to everyone.\");\t\n \n ObjectOutputStream[] oosList = whosIn.values().toArray(new ObjectOutputStream[0]);\n \n for (ObjectOutputStream clientOOS : oosList)\n {\n try {clientOOS.writeObject(whatever);}\n catch (IOException e) {} \n }\n\t \n }",
"private void userMessageEvent(){\n message = UI.getMessage(); //Get object\r\n message.addKeyListener(new KeyListener() {\r\n @Override\r\n public void keyTyped(KeyEvent e) {}\r\n\r\n @Override\r\n public void keyPressed(KeyEvent e) {\r\n if(e.getKeyCode() == KeyEvent.VK_ENTER){ //Check if enter button is pressed\r\n if(!UI.getMessage().getText().equalsIgnoreCase(\"\")){ //If the message is not empty\r\n for (UserLogic t : threads) { //Go through users\r\n if(((String)UI.getContacts().getSelectedValue()).equals(groupChat)) { //If the chat is a group chat\r\n groupChatSend(t);\r\n }\r\n else { //Current User\r\n individualSend(t);\r\n }\r\n }\r\n UI.getMessage().setText(\"\"); //Clear message\r\n }\r\n }\r\n }\r\n\r\n @Override\r\n public void keyReleased(KeyEvent e) {}\r\n });\r\n }",
"private static String generateServerKey(Poi poi) {\n LonLat viewPoint = poi.getViewPosition();\n int lon = viewPoint.getLonInt();\n int lat = viewPoint.getLatInt();\n int alt = viewPoint.getAltInt();\n return generateServerKey(poi.getName(), poi.getAddress(), lon, lat, alt);\n }",
"public static void main(String[] args) throws UnknownHostException {\n PrivateMessage pm = new PrivateMessage(\"hello, this is me\", \"Mark\", new User(\"fvilches17\"));\n System.out.println(pm);\n }",
"public void sendChat(String message) {\n\t\tenqueue(\"PRIVMSG #\"+Executable.targetChannel+\" :imGlitch \"+message);\n\t}",
"public void requestAddUserToChat(String otherUsername){\n System.out.println(\"addtochat\" + \" \" + chatID + \" \" + otherUsername);\n toServer.println(\"addtochat\" + \" \" + chatID + \" \" + otherUsername);\n toServer.flush();\n }",
"public PublicKey[] getPeopleInConvo (String sig) {\n Logger.write(\"VERBOSE\", \"DB\", \"getPeopleInConvo(...)\");\n Vector<PublicKey> keys = new Vector<PublicKey>();\n \n try {\n ResultSet keySet = query(DBStrings.getConversationMembers.replace(\"__SIG__\", sig));\n while (keySet.next())\n keys.add(Crypto.decodeKey(keySet.getString(\"key\")));\n } catch (java.sql.SQLException e) {\n Logger.write(\"ERROR\", \"DB\", \"SQLException: \" + e);\n }\n \n return keys.toArray(new PublicKey[0]);\n }",
"@PostMapping(\"/createKeyPair\")\n public String createKeyPair() {\n \n AWSKMS kmsClient = AWSKMSClientBuilder.standard().build();\n \n return \"Private uid: \"+ priuid +\"\\nPublic uid: \" + pubuid +\"\\n\";\n }",
"public void insertDeviceRSAPublicKey(int deviceID, String data) {\n Log.i(LOG_TAG, \"Writing RSA Public key of \"+deviceID);\n if (deviceID > -1) {\n connection.delete(\"RSA\",\"DeviceID = ?\",new String[]{deviceID+\"\"});\n ContentValues cv = new ContentValues();\n cv.put(\"DeviceID\", deviceID);\n cv.put(\"Key\",data);\n connection.insert(\"RSA\",null,cv);\n Log.i(LOG_TAG,\"New RSA Public key for device \"+deviceID);\n }\n }",
"protected void onPrivateMessage(String sender, String login, String hostname, String message) {}",
"private void receiveKey() throws Exception {\n System.out.println(\"Receive Key\");\n DataInputStream dis = new DataInputStream(is);\n String keyBase64 = dis.readUTF();\n byte[] key = Util.convertBase64ToBytes(keyBase64);\n byte[] rc4key = Util.RSADecrypt(key, prikey);\n synchronized (GUITracker.onlinePeer) {\n GUITracker.RC4KeyByte = rc4key;\n }\n RC4Key = RC4.convertBytesToSecretKey(rc4key);\n encrypt = new RC4(RC4Key, RC4.ENCRYPT);\n decrypt = new RC4(RC4Key, RC4.DECRYPT);\n CipherInputStream cis = decrypt.getBindingInputStream(socket.getInputStream());\n CipherOutputStream cos = encrypt.getBindingOutputStream(socket.getOutputStream());\n is = cis;\n os = cos;\n System.out.println(\"Get symmetric key from: \" + addressPort);\n }",
"ExportedKeyData makeKeyPairs(PGPKeyPair masterKey, PGPKeyPair subKey, String username, String email, String password) throws PGPException, IOException;",
"public void imprimirPeersConectados() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\n\t\t\t\tDisplayConstants.COMMAND_PREFIX + \"Peers conectados: \" + this.listaChavesPublicas.keySet().toString());\n\t\tSystem.out.println();\n\t}",
"public PublicKey getPublicKey(){\n\t\treturn this.publickey;\n\t}",
"private static PluginMessageRecipient getThroughWhomSendMessage() {\n\t\treturn Remain.getOnlinePlayers().isEmpty() ? Bukkit.getServer() : Remain.getOnlinePlayers().iterator().next();\n\t}",
"public String getPublicKeyIdentifier();",
"public static KeyPair GenrateandEncrypt(String keyname) throws NoSuchAlgorithmException, InvalidKeySpecException, IOException\n\t {\n\t \tKeyPairGenerator kpg;\n\t kpg = KeyPairGenerator.getInstance(\"RSA\");\n kpg.initialize(4096);\n \n KeyPair kp = kpg.genKeyPair();\n PublicKey publicKey = kp.getPublic();\n PrivateKey privateKey = kp.getPrivate();\n\n //save keys \n \n \n String sPublic = Base64.getEncoder().encodeToString( publicKey.getEncoded());\n String sPrivate = Base64.getEncoder().encodeToString( privateKey.getEncoded());\n\n File file1 = new File(keyname+\"public.txt\");\n\t\t\tFileWriter fileWriter1 = new FileWriter(file1);\n\t\t\tfileWriter1.write(sPublic);\n\t\t\t\n\t\t\t\n\t\t\tFile file2 = new File(keyname+\"private.txt\");\n\t\t\tFileWriter fileWriter2 = new FileWriter(file2);\n\t\t\tfileWriter2.write(sPrivate);\n\t\t\t \n fileWriter1.flush();\n fileWriter1.close();\n \n fileWriter2.flush();\n fileWriter2.close();\n ////////////\n \n return kp;\n\t }",
"public void requestChat(String otherUsername) {\n System.out.println(\"Requesting chat with \" + otherUsername);\n toServer.println(\"newchat\" + \" \" + username + \" \" + otherUsername);\n toServer.flush();\n }",
"public boolean connectAs(String uname) {\n\t\tboolean noProblems = true; // no problems have been encountered\n \n\t\t// First Message: A->B: Alice || E_kB(Alice || nonce_A)\n\t\tbyte[] nonce_user = ComMethods.genNonce();\n\t\tComMethods.report(accountName+\" has randomly generated a 128-bit nonce_user = \"+(new String(nonce_user))+\".\",simMode);\n\n\t\tbyte[] unameBytes = uname.getBytes();\n\t\tbyte[] srvrNameBytes = \"SecretServer\".getBytes();\n\n\t\tbyte[] pload = ComMethods.concatByteArrs(unameBytes, nonce_user);\n\t\tpload = SecureMethods.encryptRSA(pload, serv_n, BigInteger.valueOf(serv_e), simMode);\n\n\t\tbyte[] message1 = ComMethods.concatByteArrs(unameBytes,pload);\n\n\t\tComMethods.report(accountName+\" is sending SecretServer the name \"+uname+\", concatenated with '\"+uname+\" || nonce_user' encrypted under RSA with the SecretServer's public key.\", simMode);\t\t\n\t\tbyte[] response1 = sendServer(message1,false);\n\n\t\tif (!checkError(response1)) {\n\t\t\tresponse1 = SecureMethods.decryptRSA(response1, my_n, my_d, simMode);\n\t\t\tComMethods.report(accountName+\" has decrypted the SecretServer's message using \"+accountName+\"'s private RSA key.\", simMode);\n\t\t} else {\n\t\t\tComMethods.report(accountName+\" has received the SecretServer's error message.\", simMode);\n\t\t}\n\n\t\t// Test for proper formatting of the second message in the protocol\n\t\tif (!Arrays.equals(Arrays.copyOf(response1,nonce_user.length), nonce_user) || !Arrays.equals(Arrays.copyOfRange(response1, nonce_user.length, nonce_user.length+srvrNameBytes.length), srvrNameBytes)) {\n\n\t\t\tnoProblems = false;\n\t\t\tSystem.out.println(\"ERROR ~ something went wrong.\");\n\t\t} else {\n\t\t\tbyte[] nonce_srvr = Arrays.copyOfRange(response1, nonce_user.length + srvrNameBytes.length, response1.length);\n\t\t\tComMethods.report(accountName+\" now has nonce_srvr.\", simMode);\n\n\t\t\t// Third Message: A->B: E_kB(nonce_B || kS)\n\t\t\tsessionKey = ComMethods.genNonce();\n\t\t\tComMethods.report(accountName+\" has generated a random 128-bit session key.\", simMode);\n\t\t\t\n\t\t\tbyte[] message2 = ComMethods.concatByteArrs(nonce_srvr, sessionKey);\n\t\t\tmessage2 = SecureMethods.encryptRSA(message2, serv_n, BigInteger.valueOf(serv_e), simMode);\n\t\t\tComMethods.report(accountName+\" is sending the SecretServer the concatenation of nonce_srvr and the session key, encrypted under RSA using the SecretServer's public key.\", simMode);\n\n\t\t\tbyte[] response2 = sendServer(message2, true);\n\t\t\tif (!checkError(response2)) {\n\t\t\t\tresponse2 = SecureMethods.processPayload(srvrNameBytes, response2, 11, sessionKey, simMode);\n\t\t\t\tComMethods.report(accountName+\" has decrypted the SecretServer's message using the symmetric session key that \"+accountName+\" just generated.\", simMode);\t\t\t\t\n\t\t\t} else {\n\t\t\t\tComMethods.report(accountName+\" has received the SecretServer's error message.\", simMode);\n\t\t\t}\n\n\t\t\t// Test formatting of the 4th message in the protocol\n\t\t\tbyte[] expected = \"understood\".getBytes();\n\t\t\tif (!Arrays.equals(Arrays.copyOf(response2, expected.length), expected)) {\n\t\t\t\tnoProblems = false;\n\t\t\t\tComMethods.report(\"ERROR ~ something went wrong with the fourth message in the Bilateral Authentication Protocol.\", simMode);\n\t\t\t} else {\n\t\t\t\tcounter = 12; // counter to be used in future messages\n\t\t\t}\n\t\t}\n\n\t\tif (noProblems) {\n\t\t\tusername = uname;\n\t\t}\n\n\t\treturn noProblems; \n\t}",
"private void hardCodeNikesh() {\n User nikesh = new User(\"Nikesh\", new Timeline(), new Subscriptions());\n nikesh.post(\"sunfish sunfish sunfish\");\n jitter.addUser(\"Nikesh\", nikesh);\n }",
"private void processPublicMessages(String[] messageParts) {\r\n\r\n\t\t// Set user to send the Public Chat\r\n\t\tUser fromUser = controller.getModel().getUsers().get(0);\t\t\r\n\r\n\t\tString[] messages = messageParts[3].split(SEPARATOR2);\r\n\r\n\t\tfor (int i = 0; i < messages.length; i++) {\r\n\r\n\t\t\t// Crate and add message to Public Chat\r\n\t\t\tString[] aMessage = messages[i].split(SEPARATOR3);\t\t\t\r\n\t\t\tfromUser.addMessage(new Message(aMessage[0],aMessage[1]));\r\n\t\t\tfromUser.update();\t\t\r\n\t\t}\r\n\t}",
"static public String makeKey(WebSocket ws) {\n\t\treturn String.format(\"%s:%d\", ws.getRemoteSocketAddress().getAddress().getHostAddress(), ws.getRemoteSocketAddress().getPort());\n\t}",
"private String exportkey() {\n\n\t\ttry {\n\t\t\tbyte[] keyBytes = serversharedkey.getEncoded();\n\t\t\tString encodedKey = new String(Base64.encodeBase64(keyBytes), \"UTF-8\");\n\t\t\tFile file = new File(\"serversharedKey\");\n\t\t\t//System.out.println(\"The server Private key: \" + encodedKey);\n\t\t\tPrintWriter writer = new PrintWriter(file, \"UTF-8\");\n\t\t\twriter.println(encodedKey);\n\t\t\twriter.close();\n\n\t\t\treturn encodedKey;\n\n\t\t} catch (UnsupportedEncodingException | FileNotFoundException ex) {\n\t\t\tLogger.getLogger(ClientTCP.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\t\treturn null;\n\t}",
"void firePeerConnected(ConnectionKey connectionKey);",
"@Override\n public byte[] generateKey() throws ProtocolException, IOException {\n BigInteger p, q, n, e, d;\n Polynomial pol;\n do {\n // we want e such that GCD(e, phi(p*q))=1. as e is actually fixed\n // below, then we need to search for suitable p and q\n p = generateCofactor();\n q = generateCofactor();\n n = computeModulus(p, q);\n e = generatePublicExponent(p, q);\n } while (!verifyCofactors(p, q, e));\n d = computePrivateExponent(p, q, e);\n pol = generatePolynomial(p, q, d);\n BigInteger[] shares = ProtocolUtil.generateShares(pol, tparams.getParties());\n RSAPrivateCrtKey[] packedShares = packShares(e, shares, n);\n try {\n storeShares(packedShares);\n } catch (SmartCardException ex) {\n throw new ProtocolException(\n \"Error while communicating with smart card: \" + ex.toString());\n }\n\n RSAPublicKey pk = SignatureUtil.RSA.paramsToRSAPublicKey(e, n);\n return pk.getEncoded();\n }",
"void saveKeys(String publicKeyFileLocation, String secretKeyFileLocation) throws IOException;",
"private static void sendAll(byte[] bytes) {\n int turn=0;\n for(InetAddress i : map.keySet()) {\n byte[] newBytes = new byte[bytes.length+1];\n for (int j = 0; j < bytes.length; j++) {\n newBytes[j]= bytes[j];\n }\n map.get(i).turn = turn;\n newBytes[bytes.length]= (byte) turn;\n turn++;\n try {\n// System.out.println(Arrays.toString(newBytes));\n// System.out.println(Arrays.toString(DH.convert(newBytes,map.get(i).secret)));\n socket.send(new DatagramPacket(DH.convert(newBytes,map.get(i).secret),newBytes.length,i,2791));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n System.out.println(\"Sent \"+ Arrays.toString(bytes));\n }"
] |
[
"0.6792673",
"0.6373727",
"0.6203933",
"0.6081435",
"0.5997752",
"0.5936513",
"0.59312654",
"0.58880174",
"0.5823006",
"0.58064234",
"0.57835734",
"0.56887436",
"0.5678968",
"0.5661653",
"0.56535196",
"0.5621096",
"0.5612598",
"0.5609919",
"0.5571997",
"0.5563427",
"0.55092686",
"0.5508282",
"0.5506437",
"0.54733545",
"0.54150397",
"0.5412639",
"0.5411494",
"0.5387294",
"0.53794134",
"0.5356138",
"0.5352411",
"0.5346172",
"0.5345359",
"0.53423357",
"0.53163743",
"0.5313656",
"0.5313302",
"0.5304561",
"0.5287747",
"0.5280364",
"0.5274869",
"0.52737695",
"0.525951",
"0.5250281",
"0.524846",
"0.5239594",
"0.52246094",
"0.52087474",
"0.5205849",
"0.51871765",
"0.5181798",
"0.5175678",
"0.5165979",
"0.5159142",
"0.5154733",
"0.5131424",
"0.51192164",
"0.51153404",
"0.5114639",
"0.5113803",
"0.51080143",
"0.5099196",
"0.5097904",
"0.50899875",
"0.5084578",
"0.50839674",
"0.5083672",
"0.50789297",
"0.50770307",
"0.50743824",
"0.5072755",
"0.5072115",
"0.507053",
"0.5069603",
"0.5063317",
"0.50630987",
"0.5059633",
"0.50506216",
"0.50504905",
"0.50488555",
"0.5041342",
"0.5038866",
"0.50374734",
"0.50351346",
"0.5028559",
"0.5028123",
"0.50257456",
"0.5021902",
"0.5018896",
"0.50139546",
"0.50119346",
"0.5006925",
"0.50055623",
"0.5001248",
"0.49985057",
"0.49920744",
"0.4991386",
"0.49896932",
"0.49834362",
"0.4980508"
] |
0.70544165
|
0
|
Convert base64url encoded string to public key
|
private PublicKey getPublicKey(byte[] publicKeyBytes) {
try {
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
X509EncodedKeySpec keySpec = new X509EncodedKeySpec(publicKeyBytes);
return keyFactory.generatePublic(keySpec);
} catch (NoSuchAlgorithmException | InvalidKeySpecException e) {
Log.e(TAG, "getPublicKey: " + e.getMessage());
}
return null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private static PublicKey buildPublicKeyFromString(String publicKeyAsString) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException, KeyStoreException, CertificateException {\n String publicKeyStrWithoutHeaderFooter = publicKeyAsString.\n replaceAll(\"-----BEGIN PUBLIC KEY-----\\n\", \"\").\n replaceAll(\"-----END PUBLIC KEY-----\\n\", \"\").\n replaceAll(\"\\n\", \"\");\n ;\n byte[] publicKeyBytes = Base64.getDecoder().decode(publicKeyStrWithoutHeaderFooter.getBytes(\"UTF-8\"));\n X509EncodedKeySpec spec = new X509EncodedKeySpec(publicKeyBytes);\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n return keyFactory.generatePublic(spec);\n }",
"OctetString getPublicKey();",
"java.lang.String getPublicKey();",
"String getPublicKey();",
"String publicKey();",
"public static PublicKey getPublicKeyFromString(String stringkey){\n byte[] byte_pubkey = android.util.Base64.decode(stringkey, android.util.Base64.DEFAULT);\n System.out.println(\"BYTE KEY::\" + byte_pubkey);\n\n\n //converting it back to public key\n KeyFactory factory = null;\n try {\n factory = KeyFactory.getInstance(\"ECDSA\", \"SC\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n } catch (NoSuchProviderException e) {\n e.printStackTrace();\n }\n try {\n return (factory != null ? factory.generatePublic(new X509EncodedKeySpec(byte_pubkey)) : null);\n } catch (InvalidKeySpecException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public String getPublicKey();",
"PublicKey decodePublicKey(byte[] encoded) throws IOException;",
"java.lang.String getPubkey();",
"public static RSAPublicKey getPublicKeyFromString(String key)\n\t\t\tthrows IOException, GeneralSecurityException {\n\t\tString publicKeyPEM = key;\n\n\t\t// Remove the first and last lines\n\t\tpublicKeyPEM = publicKeyPEM.replace(\"-----BEGIN PUBLIC KEY-----\", \"\");\n\t\tpublicKeyPEM = publicKeyPEM.replace(\"-----END PUBLIC KEY-----\", \"\");\n\n\t\t// Base64 decode data\n\t\tbyte[] encoded = org.bouncycastle.util.encoders.Base64\n\t\t\t\t.decode(publicKeyPEM);\n\n\t\tKeyFactory kf = KeyFactory.getInstance(\"RSA\");\n\t\tRSAPublicKey pubKey = (RSAPublicKey) kf\n\t\t\t\t.generatePublic(new X509EncodedKeySpec(encoded));\n\t\treturn pubKey;\n\t}",
"java.lang.String getPublicEciesKey();",
"public T participationPublicKeyBase64(String pk) {\n this.votePK = new ParticipationPublicKey(Encoder.decodeFromBase64(pk));\n return (T) this;\n\n }",
"private static String extractBase64EncodedKey(String pemKey) throws GeneralSecurityException\n {\n Matcher matcher = KEY_PATTERN.matcher(pemKey);\n if (matcher.find())\n {\n return matcher.group(1).replaceAll(\"\\\\s\", \"\");\n }\n else\n {\n throw new GeneralSecurityException(\"Invalid private key format\");\n }\n }",
"private static PublicKey getPublicKey(String keyStr)\n throws Exception\n {\n return KeyFactory.getInstance(RSA).generatePublic(new X509EncodedKeySpec(Base64.decode(keyStr)));\n }",
"java.lang.String getExtendedPublicKey();",
"public static PublicKey string2PublicKey(String pubStr) throws Exception {\n byte[] keyBytes = base642Byte(pubStr);\n X509EncodedKeySpec keySpec = new X509EncodedKeySpec(keyBytes);\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n PublicKey publicKey = keyFactory.generatePublic(keySpec);\n return publicKey;\n }",
"public String base64Encode(String str) throws StoreFactoryException;",
"com.google.protobuf.ByteString getPublicKeyBytes();",
"@Test\n public void testEncodeDecodePublic() {\n int keySizeInBits = 2048;\n PublicKey pub;\n KeyFactory kf;\n try {\n kf = KeyFactory.getInstance(\"RSASSA-PSS\");\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSASSA-PSS\");\n keyGen.initialize(keySizeInBits);\n KeyPair keypair = keyGen.genKeyPair();\n pub = keypair.getPublic();\n } catch (NoSuchAlgorithmException ex) {\n TestUtil.skipTest(\"Key generation for RSASSA-PSS is not supported.\");\n return;\n }\n byte[] encoded = pub.getEncoded();\n assertEquals(\n \"The test assumes that the public key is in X.509 format\", \"X.509\", pub.getFormat());\n X509EncodedKeySpec spec = new X509EncodedKeySpec(encoded);\n try {\n kf.generatePublic(spec);\n } catch (InvalidKeySpecException ex) {\n throw new AssertionError(\"Provider can't decode its own key\", ex);\n }\n }",
"public static String encrypt(String input) {\n\t\tBase64.Encoder encoder = Base64.getMimeEncoder();\n String message = input;\n String key = encoder.encodeToString(message.getBytes());\n return key;\n\t}",
"byte[] encodePublicKey(PublicKey publicKey) throws IOException;",
"public String base64Decode(String str) throws StoreFactoryException;",
"JwtParserBuilder base64UrlDecodeWith(Decoder<String, byte[]> base64UrlDecoder);",
"public String getPublicKeyIdentifier();",
"@Test\n public void testEncodeDecodePublicWithParameters() {\n int keySizeInBits = 2048;\n PublicKey pub;\n String sha = \"SHA-256\";\n String mgf = \"MGF1\";\n int saltLength = 32;\n try {\n RSAKeyGenParameterSpec params =\n getPssAlgorithmParameters(keySizeInBits, sha, mgf, sha, saltLength);\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSASSA-PSS\");\n keyGen.initialize(params);\n KeyPair keypair = keyGen.genKeyPair();\n pub = keypair.getPublic();\n } catch (NoSuchAlgorithmException | InvalidAlgorithmParameterException ex) {\n TestUtil.skipTest(\"Key generation for RSASSA-PSS is not supported.\");\n return;\n }\n byte[] encoded = pub.getEncoded();\n X509EncodedKeySpec spec = new X509EncodedKeySpec(encoded);\n KeyFactory kf;\n try {\n kf = KeyFactory.getInstance(\"RSASSA-PSS\");\n } catch (NoSuchAlgorithmException ex) {\n fail(\"Provider supports KeyPairGenerator but not KeyFactory\");\n return;\n }\n try {\n kf.generatePublic(spec);\n } catch (InvalidKeySpecException ex) {\n throw new AssertionError(\n \"Provider failed to decode its own public key: \" + TestUtil.bytesToHex(encoded), ex);\n }\n }",
"static byte[] base64ToByteArray(String s) {\r\n byte[] alphaToInt = base64ToInt;\r\n int sLen = s.length();\r\n int numGroups = sLen/4;\r\n if (4*numGroups != sLen)\r\n throw new IllegalArgumentException(\r\n \"String length must be a multiple of four.\");\r\n int missingBytesInLastGroup = 0;\r\n int numFullGroups = numGroups;\r\n if (sLen != 0) {\r\n if (s.charAt(sLen-1) == '=') {\r\n missingBytesInLastGroup++;\r\n numFullGroups--;\r\n }\r\n if (s.charAt(sLen-2) == '=')\r\n missingBytesInLastGroup++;\r\n }\r\n byte[] result = new byte[3*numGroups - missingBytesInLastGroup];\r\n\r\n // Translate all full groups from base64 to byte array elements\r\n int inCursor = 0, outCursor = 0;\r\n for (int i=0; i<numFullGroups; i++) {\r\n int ch0 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n int ch1 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n int ch2 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n int ch3 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n result[outCursor++] = (byte) ((ch0 << 2) | (ch1 >> 4));\r\n result[outCursor++] = (byte) ((ch1 << 4) | (ch2 >> 2));\r\n result[outCursor++] = (byte) ((ch2 << 6) | ch3);\r\n }\r\n\r\n // Translate partial group, if present\r\n if (missingBytesInLastGroup != 0) {\r\n int ch0 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n int ch1 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n result[outCursor++] = (byte) ((ch0 << 2) | (ch1 >> 4));\r\n\r\n if (missingBytesInLastGroup == 1) {\r\n int ch2 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n result[outCursor++] = (byte) ((ch1 << 4) | (ch2 >> 2));\r\n }\r\n }\r\n // assert inCursor == s.length()-missingBytesInLastGroup;\r\n // assert outCursor == result.length;\r\n return result;\r\n }",
"public String encodeKey() {\n byte[] keyByte = secretKey.getEncoded();\n return Base64.getEncoder().encodeToString(keyByte);\n }",
"public String encrypt(String input) throws Throwable {\n\n byte[] inputByteArray = input.getBytes();\n String keyString = \"\";\n\n // reading the public key\n BufferedReader reader = null;\n try {\n reader = new BufferedReader(\n new InputStreamReader(context.getAssets().open(\"Put your public key in assets and Enter its name here\"), \"UTF-8\"));\n String line;\n while ((line = reader.readLine()) != null) {\n keyString += line;\n }\n reader.close();\n }catch (IOException e){\n Toast.makeText(context, \"Couldn't create file reader\", Toast.LENGTH_SHORT).show();\n }\n\n // fetching the key from public key\n keyString = keyString.replaceAll(NEW_LINE_CHARACTER, EMPTY_STRING)\n .replaceAll(PUBLIC_KEY_START_KEY_STRING, EMPTY_STRING)\n .replaceAll(PUBLIC_KEY_END_KEY_STRING, EMPTY_STRING);\n\n byte[] publicKey = keyString.getBytes();\n\n Key generatePublic = KeyFactory.getInstance(\"RSA\").\n generatePublic(new X509EncodedKeySpec(Base64.getDecoder().decode(publicKey)));\n\n // create RSA Cipher instance\n Cipher cipherInstance = Cipher.getInstance(\"RSA/None/PKCS1Padding\");\n cipherInstance.init(Cipher.ENCRYPT_MODE, generatePublic);\n\n // encrypt string\n byte[] encryptedByteArray = cipherInstance.doFinal(inputByteArray);\n return Base64.getEncoder().encodeToString(encryptedByteArray);\n }",
"com.google.protobuf.ByteString\n getPubkeyBytes();",
"private void sendPublicKey() {\n PublicKey publicKey = EncryptionUtils.getKeyPair(getApplicationContext()).getPublic();\n String encodedPublicKey = Base64.encodeToString(publicKey.getEncoded(),Base64.URL_SAFE);\n socket.emit(\"public_key\",encodedPublicKey);\n }",
"com.google.protobuf.ByteString getPublicEciesKeyBytes();",
"public static String decrypt(String input) {\n\t\t Base64.Decoder decoder = Base64.getMimeDecoder();\n\t String key = new String(decoder.decode(input));\n\t return key;\n\t}",
"public java.lang.String getExtendedPublicKey() {\n java.lang.Object ref = extendedPublicKey_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n extendedPublicKey_ = s;\n }\n return s;\n }\n }",
"@SuppressWarnings(\"unused\")\n private static String getKeyString(Key key)\n {\n return Base64.encode(key.getEncoded());\n }",
"public T selectionPublicKeyBase64(String pk) {\n this.selectionPK = new VRFPublicKey(Encoder.decodeFromBase64(pk));\n return (T) this;\n }",
"java.lang.String getEncoded();",
"public static PublicKey getPublicKey(String pubKey) {\n try {\n PemReader pemReader = new PemReader(new StringReader(pubKey));\n byte[] content = pemReader.readPemObject().getContent();\n X509EncodedKeySpec spec = new X509EncodedKeySpec(content);\n KeyFactory kf = KeyFactory.getInstance(\"RSA\");\n return kf.generatePublic(spec);\n } catch (IOException | NoSuchAlgorithmException | InvalidKeySpecException | NullPointerException ex) {\n return getPublicKeyFromNonPem(pubKey);\n }\n }",
"private static String encryptWithPublicKey(String plainData, RSAPublicKey rsaPublicKey, String keyFingerPrint, String requestContentType) throws JOSEException {\n\t\t\tfinal JWEHeader.Builder builder = new JWEHeader.Builder(ALG, ENC_MTHD);\n\t\t\tif(keyFingerPrint != null){\n\t\t\t\tbuilder.keyID(keyFingerPrint);\n\t\t\t}\n\t\t\tif(requestContentType != null){\n\t\t\t\tbuilder.contentType(requestContentType);\n\t\t\t}\n\t\t\tfinal JWEHeader jweHeader = builder.build();\n\t\t\tJWEObject jwe = new JWEObject(\n\t\t\t\t\tjweHeader,\n\t\t\t\t\tnew Payload(plainData));\n\n\t\t\tfinal RSAEncrypter encrypter = new RSAEncrypter(rsaPublicKey);\n\n\t\t\tjwe.encrypt(encrypter);\n\t\t\treturn jwe.serialize();\n\t\t}",
"com.google.protobuf.ByteString\n getExtendedPublicKeyBytes();",
"public java.lang.String getExtendedPublicKey() {\n java.lang.Object ref = extendedPublicKey_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n extendedPublicKey_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public static String getEncodedKey(final String key)\n {\n String encodedKey = key;\n \n try {\n final int ontEnd = key.indexOf(ONT_SEPARATOR);\n if (ontEnd != -1) { \n final String prefix = key.substring(0, ontEnd + 1);\n final String name = key.substring(ontEnd + 1, key.length());\n final String encodedName = java.net.URLEncoder.encode(name, \"UTF-8\");\n if (name != encodedName) {\n encodedKey = prefix + encodedName;\n if (DEBUG.RDF) Log.debug(\"encoded \" + Util.tags(key) + \" to \" + Util.tags(encodedKey));\n }\n } else {\n encodedKey = java.net.URLEncoder.encode(key, \"UTF-8\");\n if (DEBUG.RDF && encodedKey != key) Log.debug(\"encoded \" + Util.tags(key) + \" to \" + Util.tags(encodedKey));\n }\n }\n catch (java.io.UnsupportedEncodingException e) {\n Log.warn(\"encoding key \" + Util.tags(key), e); \n }\n \n return encodedKey;\n }",
"public static void main(String[] args) {\n KeyPairGenerator keygen = null;\n try {\n keygen = KeyPairGenerator.getInstance(\"RSA\");\n SecureRandom secrand = new SecureRandom();\n // secrand.setSeed(\"17\".getBytes());//初始化随机产生器\n keygen.initialize(2048, secrand);\n KeyPair keys = keygen.genKeyPair();\n PublicKey publicKey = keys.getPublic();\n PrivateKey privateKey = keys.getPrivate();\n String pubKey = Base64.encode(publicKey.getEncoded());\n String priKey = Base64.encode(privateKey.getEncoded());\n System.out.println(\"pubKey = \" + new String(pubKey));\n System.out.println(\"priKey = \" + new String(priKey));\n\n/*\n X509EncodedKeySpec keySpec = new X509EncodedKeySpec(pubkey.getEncoded());\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n PublicKey publicKey = keyFactory.generatePublic(keySpec);\n pubKey = Base64.encode(publicKey.getEncoded());\n System.out.println(\"pubKey = \" + new String(pubKey));\n*/\n\n/*\n PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(prikey.getEncoded());\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n PrivateKey privateKey = keyFactory.generatePrivate(keySpec);\n priKey = Base64.encode(privateKey.getEncoded());\n System.out.println(\"priKey = \" + new String(priKey));\n*/\n //(N,e)是公钥\n RSAPublicKey rsaPublicKey = (RSAPublicKey) publicKey;\n System.out.println(\"RSAPublicKey:\");\n System.out.println(\"Modulus.length=\" +\n rsaPublicKey.getModulus().bitLength());\n System.out.println(\"Modulus=\" + rsaPublicKey.getModulus().toString());//n\n System.out.println(\"PublicExponent.length=\" +\n rsaPublicKey.getPublicExponent().bitLength());\n System.out.println(\"PublicExponent=\" + rsaPublicKey.getPublicExponent().toString());//e\n\n\n //(N,d)是私钥\n RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) privateKey;\n System.out.println(\"RSAPrivateKey:\");\n System.out.println(\"Modulus.length=\" +\n rsaPrivateKey.getModulus().bitLength());\n System.out.println(\"Modulus=\" + rsaPrivateKey.getModulus().toString());//n\n System.out.println(\"PrivateExponent.length=\" +\n rsaPrivateKey.getPrivateExponent().bitLength());\n System.out.println(\"PrivateExponent=\" + rsaPrivateKey.getPrivateExponent().toString());//d\n\n String encodeData = encode(\" public static String encode(String toEncode,String D, String N) {\\n\" +\n \" // BigInteger var2 = new BigInteger(\\\"17369712262290647732768133445861332449863405383733306695896586821166245382729380222118948668590047591903813382253186640467063376463309880263824085810383552963627855603429835060435976633955217307266714318344160886538360012623239010786668755679438900124601074924850696725233212494777766999123952653273738958617798460338184668049410136792403729341479373919634041235053823478242208651592611582439749292909499663165109004083820192135244694907138372731716013807836312280426304459316963033144149631900633817073029029413556757588486052978078614048837784810650766996280232645714319416096306667876390555673421669667406990886847\\\");\\n\" +\n \" // BigInteger var3 = new BigInteger(\\\"65537\\\");\\n\" +\n \" int MAX_ENCRYPT_BLOCK = 128;\\n\" +\n \" int offSet = 0;\\n\" +\n \" byte[] cache;\\n\" +\n \" int i = 0;\\n\" +\n \" ByteArrayOutputStream out = new ByteArrayOutputStream();\\n\" +\n \" try {\\n\" +\n \" RSAPrivateKeySpec rsaPrivateKeySpec = new java.security.spec.RSAPrivateKeySpec(new BigInteger(N),new BigInteger(D));\\n\" +\n \" KeyFactory keyFactory = java.security.KeyFactory.getInstance(\\\"RSA\\\");\\n\" +\n \" PrivateKey privateKey = keyFactory.generatePrivate(rsaPrivateKeySpec);\\n\" +\n \" Cipher cipher = javax.crypto.Cipher.getInstance(\\\"RSA\\\");\\n\" +\n \" cipher.init(Cipher.ENCRYPT_MODE,privateKey);\\n\" +\n \"\\n\" +\n \" byte[] data = toEncode.getBytes(StandardCharsets.UTF_8);\\n\" +\n \" int inputLen = data.length;\\n\" +\n \" // 对数据分段加密\\n\" +\n \" while (inputLen - offSet > 0) {\\n\" +\n \" if (inputLen - offSet > MAX_ENCRYPT_BLOCK) {\\n\" +\n \" cache = cipher.doFinal(data, offSet, MAX_ENCRYPT_BLOCK);\\n\" +\n \" } else {\\n\" +\n \" cache = cipher.doFinal(data, offSet, inputLen - offSet);\\n\" +\n \" }\\n\" +\n \" out.write(cache, 0, cache.length);\\n\" +\n \" i++;\\n\" +\n \" offSet = i * MAX_ENCRYPT_BLOCK;\\n\" +\n \" }\\n\" +\n \" byte[] datas = out.toByteArray();\\n\" +\n \" out.close();\\n\" +\n \"\\n\" +\n \" //byte[] datas = datas = cipher.doFinal(toEncode.getBytes());\\n\" +\n \" datas = org.apache.commons.codec.binary.Base64.encodeBase64(datas);\\n\" +\n \" return new String(datas,StandardCharsets.UTF_8);\\n\" +\n \" } catch (NoSuchAlgorithmException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (InvalidKeySpecException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (NoSuchPaddingException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (InvalidKeyException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (BadPaddingException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (IllegalBlockSizeException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (IOException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" }\\n\" +\n \" return null;\\n\" +\n \" }\",rsaPrivateKey.getPrivateExponent().toString(),rsaPrivateKey.getModulus().toString());\n String decodeData = decode(encodeData,rsaPublicKey.getPublicExponent().toString(),rsaPublicKey.getModulus().toString());\n\n System.out.println(encodeData);\n System.out.println(decodeData);\n\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }/* catch (InvalidKeySpecException e) {\n e.printStackTrace();\n }*/\n }",
"private static String encodeBase64(String stringToEncode){\r\n\t\treturn Base64.getEncoder().encodeToString(stringToEncode.getBytes());\t\r\n\t}",
"OpenSSLKey mo134201a();",
"public String encryptAESKey(String plainAESKey, PublicKey publicKey) throws Exception {\r\n Cipher cipher = Cipher.getInstance(\"RSA\");\r\n cipher.init(Cipher.ENCRYPT_MODE, publicKey);\r\n return Base64.getEncoder().encodeToString(cipher.doFinal(plainAESKey.getBytes()));\r\n }",
"public static Optional<BRCryptoKey> createFromPublicKeyString(byte[] keyString) {\n keyString = Arrays.copyOf(keyString, keyString.length + 1);\n try {\n Memory keyMemory = new Memory(keyString.length);\n try {\n keyMemory.write(0, keyString, 0, keyString.length);\n ByteBuffer keyBuffer = keyMemory.getByteBuffer(0, keyString.length);\n\n return Optional.fromNullable(CryptoLibrary.INSTANCE.cryptoKeyCreateFromStringPublic(keyBuffer));\n } finally {\n keyMemory.clear();\n }\n } finally {\n // clear out our copy; caller responsible for original array\n Arrays.fill(keyString, (byte) 0);\n }\n }",
"public static byte[] fromBase64(String data)\n {\n return Base64.decode(data, Base64.NO_WRAP);\n }",
"public com.google.protobuf.ByteString\n getExtendedPublicKeyBytes() {\n java.lang.Object ref = extendedPublicKey_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n extendedPublicKey_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"private static void showKeysInBase64(KeyPair keyPair) {\r\n\r\n\t\tfinal byte[] encodedPrivateKey = keyPair.getPrivate().getEncoded();\r\n\t\tfinal byte[] encodedPublicKey = keyPair.getPublic().getEncoded();\r\n\t\tSystem.out.printf(\"encoded private key length[%3d], encoded public key length[%3d]%n\", encodedPrivateKey.length,\r\n\t\t\t\tencodedPublicKey.length);\r\n\t\tfinal String base64Priv = Base64.getUrlEncoder().encodeToString(encodedPrivateKey);\r\n\t\tfinal String base64Pub = Base64.getUrlEncoder().encodeToString(encodedPublicKey);\r\n\t\tSystem.out.printf(\"private key changed to Base64 (length[%3d]):%n [%s]%n\", base64Priv.length(), base64Priv);\r\n\t\tSystem.out.printf(\"public key changed to Base64 (length[%3d]):%n [%s]%n\", base64Pub.length(), base64Pub);\r\n\t}",
"public static String base64Encode(String str) {\n sun.misc.BASE64Encoder encoder = new sun.misc.BASE64Encoder();\n byte[] bytes = str.getBytes();\n return encoder.encode(bytes);\n\n }",
"private Base64(){}",
"public CodePointIterator base64Encode() {\n return base64Encode(Base64Alphabet.STANDARD, true);\n }",
"public static PrivateKey getPrivateKeyFromString(String stringkey){\n byte[] byte_privkey = android.util.Base64.decode(stringkey, android.util.Base64.DEFAULT);\n System.out.println(\"BYTE KEY::\" + byte_privkey);\n\n\n //converting it back to public key\n KeyFactory factory = null;\n try {\n factory = KeyFactory.getInstance(\"ECDSA\", \"SC\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n } catch (NoSuchProviderException e) {\n e.printStackTrace();\n }\n try {\n PKCS8EncodedKeySpec privateKeySpec = new PKCS8EncodedKeySpec(\n byte_privkey);\n return (factory != null ? factory.generatePrivate(privateKeySpec) : null);\n } catch (InvalidKeySpecException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public static byte[] base642Byte(String base64Key) throws IOException {\n BASE64Decoder decoder = new BASE64Decoder();\n return decoder.decodeBuffer(base64Key);\n }",
"public static String base64EncodeString(String input) throws Exception\n {\n return base64Encode(input.getBytes(\"UTF-8\"));\n }",
"void addPublicKey(InputStream publicKey) throws IOException, PGPException;",
"@Test\n public void testDecodeEncodePublicKeyWithPssParameters() {\n String encodedPubKey =\n \"30820151303c06092a864886f70d01010a302fa00f300d060960864801650304\"\n + \"02010500a11c301a06092a864886f70d010108300d0609608648016503040201\"\n + \"05000382010f003082010a0282010100b09191ef91e8b4ab58f7c66430636641\"\n + \"0988d8cba6f2e0f33495d37b355828d04554472e854dff7d8c1dfd1ea50123de\"\n + \"12d34b77280220184b924db82a535978e9bfe7a6111f455028f18cd923c54144\"\n + \"08a247409d7121a99c3594708c0dd9cdebf1c9bb0060ff1c4c0363e25fac0d5b\"\n + \"bf85013945f393b0b9673780c6f579353ae895d7dc891220a92bac0a8deb35b5\"\n + \"20803cf82b19c27232a889d0f04fb2bde6623f357e3e56027298379d10bee8fa\"\n + \"4e0c29029a78fde01694719d2d036fe726aa5633205553565f127a78fec46918\"\n + \"182e41a16c5cc86bd3b77d26c5113082cb1f2d83d9213eca019bbdee99001e11\"\n + \"16bcfec1242ece175558b15c5bbbc4710203010001\";\n RSAPublicKey pubKey;\n try {\n KeyFactory kf = KeyFactory.getInstance(\"RSASSA-PSS\");\n X509EncodedKeySpec spec = new X509EncodedKeySpec(TestUtil.hexToBytes(encodedPubKey));\n pubKey = (RSAPublicKey) kf.generatePublic(spec);\n } catch (NoSuchAlgorithmException | InvalidKeySpecException ex) {\n TestUtil.skipTest(\"RSASSA-PSS keys with parameters are not supported.\");\n return;\n }\n // Ensures that the encoding format is X.509. Other formats would not only break\n // this test but lead to incompatible implementations.\n assertEquals(\"Public key does not use X.509 format\", \"X.509\", pubKey.getFormat());\n byte[] encoded = pubKey.getEncoded();\n assertEquals(encodedPubKey, TestUtil.bytesToHex(encoded));\n }",
"default String codificarBase64(String contenido) {\n\t\tbyte[] encoded = Base64.getEncoder().encode(contenido.getBytes(StandardCharsets.UTF_8));\n\t\treturn new String(encoded);\n\t}",
"static byte[] base64decode(String base64)\n {\n // Remove all whitespace.\n base64 = base64.replaceAll(\"\\\\s\", \"\");\n int endTrim = 0;\n if (base64.endsWith(\"==\")) {\n endTrim = 2;\n base64 = base64.substring(0, base64.length() - 2) + \"AA\";\n } else if (base64.endsWith(\"=\"))\n {\n endTrim = 1;\n base64 = base64.substring(0, base64.length() - 1) + \"A\";\n }\n if (base64.length() % 4 != 0) throw new IllegalArgumentException(\"Illegal base64 string, length \" + base64.length());\n int length = (base64.length() / 4) * 3 - endTrim;\n base64 = base64.replace('=', 'A');\n byte[] result = new byte[length];\n int stringLength = base64.length();\n int index = 0;\n for (int i = 0; i < stringLength; i += 4)\n {\n int i0 = BASE64_STRING.indexOf(base64.charAt(i));\n int i1 = BASE64_STRING.indexOf(base64.charAt(i + 1));\n int i2 = BASE64_STRING.indexOf(base64.charAt(i + 2));\n int i3 = BASE64_STRING.indexOf(base64.charAt(i + 3));\n byte b0 = (byte) ((i0 << 2) | (i1 >> 4));\n byte b1 = (byte) ((i1 << 4) | (i2 >> 2));\n byte b2 = (byte) ((i2 << 6) | i3);\n result[index++] = b0;\n if (index < length)\n {\n result[index++] = b1;\n if (index < length)\n {\n result[index++] = b2;\n }\n }\n }\n return result;\n }",
"public static byte[] base64ToByte(String data) throws IOException {\n BASE64Decoder decoder = new BASE64Decoder();\n return decoder.decodeBuffer(data);\n }",
"public com.google.protobuf.ByteString\n getExtendedPublicKeyBytes() {\n java.lang.Object ref = extendedPublicKey_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n extendedPublicKey_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public byte[] getPublicEncoded() throws NoSuchAlgorithmException, InvalidKeySpecException {\n\t\t\n\t\tKey publicKey = getPublic();\n\t\t\n\t\t //Key factory, for key-key specification transformations\n KeyFactory kfac = KeyFactory.getInstance(\"RSA\");\n //Generate plain-text key specification\n RSAPublicKeySpec keyspec = (RSAPublicKeySpec)kfac.getKeySpec(publicKey, RSAPublicKeySpec.class);\n \n\t\tSystem.out.println(\"Public key, RSA modulus: \" +\n\t\t\tkeyspec.getModulus() + \"\\nexponent: \" +\n\t\t\tkeyspec.getPublicExponent() + \"\\n\");\n\t\t\n\t\t//Building public key from the plain-text specification\n\t\t//Key recoveredPublicFromSpec = kfac.generatePublic(keyspec);\n\t\t\n\t\t//Encode a version of the public key in a byte-array\n\t\n\t\tSystem.out.print(\"Public key encoded in \" +\n\t\t_kpair.getPublic().getFormat() + \" format: \");\n\t\tbyte[] encodedPublicKey = _kpair.getPublic().getEncoded();\n\t\t\n\t\tSystem.out.println(Arrays.toString(encodedPublicKey) + \"\\n\");\n\t\t\n\t\tSystem.out.println(\"Length: \" + encodedPublicKey.length);\n\t\treturn encodedPublicKey;\n\t}",
"private static String shortKey(PublicKey publicKey) {\n return publicKey.toString().substring(publicKey.toString().length() - 4);\n }",
"public static PublicKey pubkeyEncoder(byte[] pubkey) throws NoSuchAlgorithmException, InvalidKeySpecException\n\t {\n\t\tX509EncodedKeySpec encode_pub_key = new X509EncodedKeySpec(pubkey);\n\t KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\t \n\t PublicKey publickey = keyFactory.generatePublic(encode_pub_key);\n\t return publickey;\n\t }",
"private String encode(String str) {\n verifyNotNull(str, ERROR_MESSAGE);\n byte[] bytes = str.getBytes();\n return Base64.getEncoder()\n .withoutPadding()\n .encodeToString(bytes);\n }",
"public interface PublicKey {\n\n /**\n * Returns id of the public key.\n *\n * @return id of key\n */\n String getId();\n\n /**\n * Returns ids from gpg sub keys.\n *\n * @return sub key ids\n * @since 2.19.0\n */\n default Set<String> getSubkeys() {\n return Collections.emptySet();\n }\n\n /**\n * Returns the username of the owner or an empty optional.\n *\n * @return owner or empty optional\n */\n Optional<String> getOwner();\n\n /**\n * Returns raw of the public key.\n *\n * @return raw of key\n */\n String getRaw();\n\n /**\n * Returns the contacts of the publickey.\n *\n * @return owner or empty optional\n */\n Set<Person> getContacts();\n\n /**\n * Verifies that the signature is valid for the given data.\n *\n * @param stream stream of data to verify\n * @param signature signature\n * @return {@code true} if the signature is valid for the given data\n */\n boolean verify(InputStream stream, byte[] signature);\n\n /**\n * Verifies that the signature is valid for the given data.\n *\n * @param data data to verify\n * @param signature signature\n * @return {@code true} if the signature is valid for the given data\n */\n default boolean verify(byte[] data, byte[] signature) {\n return verify(new ByteArrayInputStream(data), signature);\n }\n}",
"public static PublicKey loadPublicKey(byte[] data) throws Exception {\n\n ECPublicKeySpec pubKey = new ECPublicKeySpec(\n ecParams.getCurve().decodePoint(data), ecParams);\n return kf.generatePublic(pubKey);\n }",
"public static PublicKey\nparseRecord(KEYRecord r) {\n\tint alg = r.getAlgorithm();\n\tbyte [] data = r.getKey();\n\treturn parseRecord(alg, data);\n}",
"public static String base64Encode(final byte[] key) {\n return Base64.encode(key);\n }",
"public PublicKey(Blob keyDer) throws UnrecognizedKeyFormatException\n {\n keyDer_ = keyDer;\n\n // Get the public key OID.\n String oidString = null;\n try {\n DerNode parsedNode = DerNode.parse(keyDer.buf(), 0);\n List rootChildren = parsedNode.getChildren();\n List algorithmIdChildren =\n DerNode.getSequence(rootChildren, 0).getChildren();\n oidString = \"\" + ((DerNode)algorithmIdChildren.get(0)).toVal();\n }\n catch (DerDecodingException ex) {\n throw new UnrecognizedKeyFormatException\n (\"PublicKey: Error decoding the public key: \" +\n ex.getMessage());\n }\n\n // Verify that the we can decode.\n if (oidString.equals(RSA_ENCRYPTION_OID)) {\n keyType_ = KeyType.RSA;\n\n KeyFactory keyFactory = null;\n try {\n keyFactory = KeyFactory.getInstance(\"RSA\");\n }\n catch (NoSuchAlgorithmException exception) {\n // Don't expect this to happen.\n throw new UnrecognizedKeyFormatException\n (\"RSA is not supported: \" + exception.getMessage());\n }\n\n try {\n keyFactory.generatePublic\n (new X509EncodedKeySpec(keyDer.getImmutableArray()));\n }\n catch (InvalidKeySpecException exception) {\n // Don't expect this to happen.\n throw new UnrecognizedKeyFormatException\n (\"X509EncodedKeySpec is not supported for RSA: \" + exception.getMessage());\n }\n }\n else if (oidString.equals(EC_ENCRYPTION_OID)) {\n keyType_ = KeyType.EC;\n\n KeyFactory keyFactory = null;\n try {\n keyFactory = KeyFactory.getInstance(\"EC\");\n }\n catch (NoSuchAlgorithmException exception) {\n // Don't expect this to happen.\n throw new UnrecognizedKeyFormatException\n (\"EC is not supported: \" + exception.getMessage());\n }\n\n try {\n keyFactory.generatePublic\n (new X509EncodedKeySpec(keyDer.getImmutableArray()));\n }\n catch (InvalidKeySpecException exception) {\n // Don't expect this to happen.\n throw new UnrecognizedKeyFormatException\n (\"X509EncodedKeySpec is not supported for EC: \" + exception.getMessage());\n }\n }\n else\n throw new UnrecognizedKeyFormatException(\n \"PublicKey: Unrecognized OID \" + oidString);\n }",
"public static String getEmailEncoded(String email){\n String preKey = email.replace(\"_\",\"__\");\n return preKey.replace(\".\",\"_\");\n }",
"private String encodeBase64(String msg) {\n\t\tbyte[] bytesEncoded = Base64.encodeBase64(msg.getBytes());\n\t\t//System.out.println(\"encoded value is \" + new String(bytesEncoded));\n\n\t\treturn new String(bytesEncoded);\n\t}",
"public static String encodeString(String str) throws IOException {\n BASE64Encoder encoder = new BASE64Encoder();\n String encodedStr = encoder.encodeBuffer(str.getBytes());\n \n return (encodedStr.trim());\n }",
"public byte[] getPubKey() {\n return pub.getEncoded();\n }",
"public static PublicKey\nparseRecord(DNSKEYRecord r) {\n\tint alg = r.getAlgorithm();\n\tbyte [] data = r.getKey();\n\treturn parseRecord(alg, data);\n}",
"String encrypt(String input) {\n\t\treturn BaseEncoding.base64().encode(input.getBytes());\n\t}",
"public String toExternalString() {\n\t\treturn new String(signature, US_ASCII);\n\t}",
"private String exportkey() {\n\n\t\ttry {\n\t\t\tbyte[] keyBytes = serversharedkey.getEncoded();\n\t\t\tString encodedKey = new String(Base64.encodeBase64(keyBytes), \"UTF-8\");\n\t\t\tFile file = new File(\"serversharedKey\");\n\t\t\t//System.out.println(\"The server Private key: \" + encodedKey);\n\t\t\tPrintWriter writer = new PrintWriter(file, \"UTF-8\");\n\t\t\twriter.println(encodedKey);\n\t\t\twriter.close();\n\n\t\t\treturn encodedKey;\n\n\t\t} catch (UnsupportedEncodingException | FileNotFoundException ex) {\n\t\t\tLogger.getLogger(ClientTCP.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\t\treturn null;\n\t}",
"public static Payload decode(String base64) {\n JsonObject json = decodeToJson(base64);\n Payload payload = new Payload();\n json.keySet().forEach(key -> {\n switch (key) {\n case \"iss\" -> payload.issuer = json.getString(key);\n case \"sub\" -> payload.subject = json.getString(key);\n case \"aud\" -> payload.audience = json.getString(key);\n case \"exp\" -> payload.expires = Long.valueOf(json.get(key).toString());\n case \"nbf\" -> payload.notBefore = Long.valueOf(json.get(key).toString());\n case \"iat\" -> payload.issuedAt = Long.valueOf(json.get(key).toString());\n case \"jti\" -> payload.jwtId = json.getString(key);\n default -> payload.add(key, json.getString(key));\n }\n });\n return payload;\n }",
"public String toUrlSafe() {\n// try {\n //todo: key encoder\n return Base64.getEncoder().encodeToString(new Gson().toJson(this).getBytes());\n// return URLEncoder.encode(\"\", UTF_8.name());\n// return URLEncoder.encode(TextFormat.printToString(toPb()), UTF_8.name());\n// } catch (UnsupportedEncodingException e) {\n// throw new IllegalStateException(\"Unexpected encoding exception\", e);\n// }\n }",
"public static String encrypt(byte[] plaintext) throws Exception,NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException\n\t\t{\n\n\t\t\tPublicKey key = readPublicKey(publicKeyUrl1);\n\t\t\tCipher cipher = Cipher.getInstance(\"RSA/ECB/PKCS1Padding\");\n\t\t\tcipher.init(Cipher.ENCRYPT_MODE, key);\n\t\t\tbyte[] encryptedByte= cipher.doFinal(plaintext);\n\t\t\tString encodedString = new String(java.util.Base64.getEncoder().encode(encryptedByte));\n\t\t\treturn encodedString;\n\t\t}",
"public static byte[] base64Decode(final String key) {\n return Base64.decode(key);\n }",
"public String getPublicKey() {\n return publicKey;\n }",
"@Test\n public void testEncodeDecodeBase64() {\n ///////////////////////////////\n // plaintext=\"Text to convert.\";\n plaintext=\"ABCDEFGHIJKLMNOPQRSTUPVWYZ123456789\";\n /////////////////////////////////\n System.out.println(\"Convert following text: \"+plaintext);\n \n System.out.println(\"::encodeBase64::\");\n \n byte[] plaindata = plaintext.getBytes();\n byte[] tmp = Base64Encoder.encodeBase64(plaindata);\n this.storeEncoding=new String(tmp);\n System.out.println(storeEncoding);\n System.out.println(\"::decodeBase64::\");\n byte[] base64Message = this.storeEncoding.getBytes();\n byte[] expResult = plaindata;\n byte[] result = Base64Encoder.decodeBase64(base64Message);\n String decodedText=new String(result);\n System.out.println(\"Decoded Text: \"+decodedText);\n assertArrayEquals(expResult, result);\n }",
"private static String encodeToBase64(byte[] data) {\n return Base64.encodeToString(data, BASE64_EFLAGS);\n }",
"public String encodePassword(String normalPassword, String key);",
"public static RSAPublicKey getPublicKey(String filename)\n\t\t\tthrows IOException, GeneralSecurityException {\n\t\tString publicKeyPEM = getKey(filename);\n\t\treturn getPublicKeyFromString(publicKeyPEM);\n\t}",
"private static String normalizeB64String(String s) {\n while(s.length() % 4 != 0)\n s += \"=\";\n return s;\n }",
"public Builder setExtendedPublicKey(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000020;\n extendedPublicKey_ = value;\n onChanged();\n return this;\n }",
"public void testPubliKeyField() throws Exception {\r\n // Create new key pair\r\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\", \"BC\");\r\n keyGen.initialize(1024, new SecureRandom());\r\n KeyPair keyPair = keyGen.generateKeyPair();\r\n\r\n PublicKeyRSA rsa1 = (PublicKeyRSA)KeyFactory.createInstance(keyPair.getPublic(), \"SHA1WITHRSA\", null);\r\n byte[] der = rsa1.getEncoded();\r\n\r\n CVCObject cvcObj = CertificateParser.parseCVCObject(der);\r\n assertTrue(\"Parsed array was not a PublicKeyRSA\", (cvcObj instanceof PublicKeyRSA));\r\n\r\n RSAPublicKey rsaKey = (RSAPublicKey)keyPair.getPublic();\r\n\r\n RSAPublicKey rsa2 = (RSAPublicKey)cvcObj; // This casting should be successful\r\n assertEquals(\"Key modulus\", rsaKey.getModulus(), rsa2.getModulus());\r\n assertEquals(\"Key exponent\", rsaKey.getPublicExponent(), rsa2.getPublicExponent());\r\n assertEquals(\"Key algorithm\", \"RSA\", rsa2.getAlgorithm());\r\n \r\n PublicKeyRSA rsa3 = (PublicKeyRSA)rsa2;\r\n assertEquals(\"OIDs\", rsa1.getObjectIdentifier(), rsa3.getObjectIdentifier());\r\n }",
"public PublicKey GetPublicKey(String filename)\n\t\t\t throws Exception {\n\t\t\t \n\t\t\t File f = new File(filename);\n\t\t\t FileInputStream fis = new FileInputStream(f);\n\t\t\t DataInputStream dis = new DataInputStream(fis);\n\t\t\t byte[] keyBytes = new byte[(int)f.length()];\n\t\t\t dis.readFully(keyBytes);\n\t\t\t dis.close();\n\n\t\t\t X509EncodedKeySpec spec =\n\t\t\t new X509EncodedKeySpec(keyBytes);\n\t\t\t KeyFactory kf = KeyFactory.getInstance(\"RSA\");\n\t\t\t return kf.generatePublic(spec);\n\t\t\t }",
"@Override\n public byte[] getRSAKeyById(String id) throws IOException, DecoderException {\n // TODO: bring that back after LocalEGA key server becomes able to register itself against Eureka\n // ResponseEntity<Resource> responseEntity =\n // restTemplate.getForEntity(keyServiceURL + \"/temp/rsa/\" + id, Resource.class);\n\n String rawKey = IOUtils.toString(new URL(keyServiceURL + \"/temp/rsa/\" + id).openStream(), Charset.defaultCharset());\n System.out.println(\"DEBUG getRSAKey: rawKey=\" + rawKey);\n String privateKey = String.valueOf(rawKey);\n byte[] privateKeyBytes = Hex.decodeHex(privateKey.toCharArray());\n try (PemReader pemReader = new PemReader(new InputStreamReader(new ByteArrayInputStream(privateKeyBytes)))) {\n return pemReader.readPemObject().getContent();\n }\n }",
"public static String uuencode (String str) {\n\tStringBuilder ret = new StringBuilder (str.length () * 4 / 3);\n\tchar ch, ch1, ch2, ch3;\n\tint i;\n\t\n\tfor (i = 0; i+2 < str.length (); i+=3) {\t \n\t ch1 = str.charAt (i);\n\t ch2 = str.charAt (i+1);\n\t ch3 = str.charAt (i+2);\n\t ch = uu_base64[((ch1 >> 2) & 077)];\n\t ret.append (ch);\n\t \n\t ch = uu_base64[(((ch1 << 4) & 060) | ((ch2 >> 4) & 017))];\n\t ret.append (ch);\n\t \n\t ch = uu_base64[(((ch2 << 2) & 074) | ((ch3 >> 6) & 03))];\n\t ret.append (ch);\n\t \n\t ch = uu_base64[(ch3 & 077)];\n\t ret.append (ch);\n\t}\n\t\n\t// are we done yet?\n\tif (i == str.length ()) \n\t return ret.toString ();\n\n\t// no so handle the trailing characters.\n\tch1 = str.charAt (i);\n\tch2 = str.length() > i + 1 ? str.charAt (i+1) : (char)0;\n\t\n\tch = uu_base64[((ch1 >> 2) & 077)];\n\tret.append (ch);\n\t\n\tch = uu_base64[(((ch1 << 4) & 060) | ((ch2 >> 4) & 017))];\n\tret.append (ch);\n\t\n\tif (str.length () > i + 1) {\n\t ch = uu_base64[((ch2 << 2) & 074)];\n\t ret.append (ch);\n\t} else {\n\t ret.append ('=');\n\t}\n\tret.append ('=');\n\treturn ret.toString ();\n }",
"public static String encode(String inString, String type, String Key) throws Exception{\r\n\t\tStringBuilder encodedString = new StringBuilder();\r\n\t\tString thisString;\r\n\t\tencodedString.append(\"<encrypted type=\" + type + \" key=\");\r\n\t\tif(type==\"Caesar\"){\r\n\t\t\tencodedString.append(Integer.toHexString(Integer.parseInt(Key)) + \"> \");\r\n\t\t\tchar[] alphabet ={'a','b','c','d','e','f','g','h','i','j','k','l','m',\r\n\t\t\t\t\t'n','o','p','q','r','s','t','u','v','w','x','y','z','å','ä','ö','A','B',\r\n\t\t\t\t\t'C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U',\r\n\t\t\t\t\t'V','W','X','Y','Z','Å','Ä','Ö','0','1','2','3','4','5','6','7','8','9',\r\n\t\t\t\t\t'!','?',')','(','=','>','<','/','&','%','#','@','$','[',']'};\r\n\t\t\tfor(int i = 0; i < inString.length(); i++){\r\n\t\t\t\tchar a = inString.charAt(i);\r\n\t\t\t\tint used = 0;\r\n\t\t\t\tfor(char b: alphabet){\r\n\t\t\t\t\tif(b==a){\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tthisString = String.format(\"%02x\",(int)alphabet[(indexOf(alphabet,b)\r\n\t\t\t\t\t\t\t\t\t+Integer.parseInt(Key))%alphabet.length]);\r\n\t\t\t\t\t\t\tencodedString.append(thisString);\r\n\t\t\t\t\t\t\tused = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}catch(Exception c){\r\n\t\t\t\t\t\t\tSystem.out.print(c.getMessage());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(used==0){\r\n\t\t\t\t\tthisString = String.format(\"%02x\", (int)a);\r\n\t\t\t\t\tencodedString.append(thisString);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(type==\"AES\"){\r\n\t\t\tfor(int i = 0; i<Key.length();i++){\r\n\t\t\t\tencodedString.append(String.format(\"%02x\", (int)Key.charAt(i)));\r\n\t\t\t}\r\n\t\t\tencodedString.append(\">\");\r\n\t\t\tencodedString.append(\" \");\r\n\t\t\tbyte[] keyContent = Base64.getDecoder().decode(Key);\r\n\t\t\tSecretKeySpec AESkey = new SecretKeySpec(keyContent,0,keyContent.length, \"AES\");\r\n\t\t\tSystem.out.println(keyContent);\r\n\t\t\t\r\n\t\t\tCipher AEScipher = Cipher.getInstance(\"AES\");\r\n\t\t\tAEScipher.init(Cipher.ENCRYPT_MODE, AESkey);\r\n\t\t\tbyte[] cipherData = AEScipher.doFinal(inString.getBytes());\r\n\t\t\tfor(byte b: cipherData){\r\n\t\t\t\tencodedString.append(String.format(\"%02x\", b));\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tthrow new Exception(\"Unknown encryption\");\r\n\t\t}\r\n\t\tencodedString.append(\" </encrypted> \");\r\n\t\treturn encodedString.toString();\r\n\t\t\r\n\t}",
"public static byte[] decode(char[] in) {\r\n \t\tint iLen = in.length;\r\n \t\tif (iLen % 4 != 0)\r\n \t\t\tthrow new IllegalArgumentException(\r\n \t\t\t\t\t\"Length of Base64 encoded input string is not a multiple of 4.\");\r\n \t\twhile (iLen > 0 && in[iLen - 1] == '=')\r\n \t\t\tiLen--;\r\n \t\tint oLen = (iLen * 3) / 4;\r\n \t\tbyte[] out = new byte[oLen];\r\n \t\tint ip = 0;\r\n \t\tint op = 0;\r\n \t\twhile (ip < iLen) {\r\n \t\t\tint i0 = in[ip++];\r\n \t\t\tint i1 = in[ip++];\r\n \t\t\tint i2 = ip < iLen ? in[ip++] : 'A';\r\n \t\t\tint i3 = ip < iLen ? in[ip++] : 'A';\r\n \t\t\tif (i0 > 127 || i1 > 127 || i2 > 127 || i3 > 127)\r\n \t\t\t\tthrow new IllegalArgumentException(\r\n \t\t\t\t\t\t\"Illegal character in Base64 encoded data.\");\r\n \t\t\tint b0 = map2[i0];\r\n \t\t\tint b1 = map2[i1];\r\n \t\t\tint b2 = map2[i2];\r\n \t\t\tint b3 = map2[i3];\r\n \t\t\tif (b0 < 0 || b1 < 0 || b2 < 0 || b3 < 0)\r\n \t\t\t\tthrow new IllegalArgumentException(\r\n \t\t\t\t\t\t\"Illegal character in Base64 encoded data.\");\r\n \t\t\tint o0 = (b0 << 2) | (b1 >>> 4);\r\n \t\t\tint o1 = ((b1 & 0xf) << 4) | (b2 >>> 2);\r\n \t\t\tint o2 = ((b2 & 3) << 6) | b3;\r\n \t\t\tout[op++] = (byte) o0;\r\n \t\t\tif (op < oLen)\r\n \t\t\t\tout[op++] = (byte) o1;\r\n \t\t\tif (op < oLen)\r\n \t\t\t\tout[op++] = (byte) o2;\r\n \t\t}\r\n \t\treturn out;\r\n \t}",
"public static String encodeBase64(String string) {\n\t\tif (string == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn Base64.getEncoder().encodeToString(string.getBytes(UTF_8));\n\t}",
"public static ECKey fromPublicOnly(byte[] pub) {\n return new ECKey(null, EccCurve.getCurve().decodePoint(pub));\n }",
"public static String base64Encode(byte[] input) {\n return DatatypeConverter.printBase64Binary(input);\n }",
"default byte[] decodificarBase64(String archivoBase64) {\n\t\treturn Base64.getDecoder().decode(archivoBase64);\n\t}",
"public String encode() {\n return encodeToBase64(encKey.getEncoded()) + \":\" + encodeToBase64(macKey.getEncoded());\n }",
"private static byte[] decodeBase64(String data) {\n return Base64.decode(data, BASE64_DFLAGS);\n }"
] |
[
"0.6814906",
"0.6729484",
"0.67117435",
"0.66883886",
"0.6682766",
"0.66287345",
"0.6470619",
"0.6429858",
"0.64209366",
"0.63776004",
"0.6377535",
"0.6373564",
"0.6298133",
"0.62961835",
"0.624829",
"0.6245648",
"0.6200661",
"0.6178753",
"0.6159828",
"0.613426",
"0.5979282",
"0.5912606",
"0.58199793",
"0.5802954",
"0.5749853",
"0.56965446",
"0.56835645",
"0.56749",
"0.5672729",
"0.5635134",
"0.56236786",
"0.55764616",
"0.557302",
"0.55651397",
"0.55633396",
"0.5559684",
"0.5554348",
"0.55506426",
"0.55393654",
"0.5534747",
"0.5532167",
"0.5514939",
"0.55076855",
"0.5480047",
"0.54723334",
"0.54575014",
"0.5455761",
"0.54406756",
"0.54347736",
"0.54337937",
"0.5425521",
"0.5418279",
"0.541722",
"0.54076743",
"0.5405734",
"0.5391038",
"0.5390739",
"0.53634197",
"0.5354159",
"0.53487825",
"0.5348255",
"0.534239",
"0.5325451",
"0.5311125",
"0.53105026",
"0.5304826",
"0.53039926",
"0.53021646",
"0.52895695",
"0.52724403",
"0.52721846",
"0.5267274",
"0.52622074",
"0.5252287",
"0.52458256",
"0.5223302",
"0.520424",
"0.51974314",
"0.51719284",
"0.5170372",
"0.5167729",
"0.5167642",
"0.5156552",
"0.51492614",
"0.51293355",
"0.51232594",
"0.5119299",
"0.5112605",
"0.5094826",
"0.50816727",
"0.5078004",
"0.5066139",
"0.5062601",
"0.5055768",
"0.5053854",
"0.5045548",
"0.5040342",
"0.50321794",
"0.5031909",
"0.5022801",
"0.5019614"
] |
0.0
|
-1
|
States of user disconnection
|
@Override
public void onBackPressed() {
super.onBackPressed();
socket.emit("user_disconnected","");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"abstract protected void onDisconnection();",
"protected void processDisconnection(){}",
"void onDisconnected();",
"public void handleDisconnectedState() {\n\n setProgressBarVisible(false);\n setGreenCheckMarkVisible(false);\n setMessageText(\"Failed to connect to \" + tallyDeviceName);\n\n }",
"void onDisconnect(User user);",
"protected void onRobotDisconnect (boolean bbUserNotify)\r\n\t{\r\n\t\tUI_RefreshConnStatus ();\r\n\t}",
"@Override\n public void gattDisconnected() {\n mConnected = false;\n updateConnectionState(R.string.disconnected);\n mDataField.setText(R.string.no_data);\n getActivity().invalidateOptionsMenu();\n sCapSwitch.setChecked(false);\n sCapSwitch.setEnabled(false);\n }",
"public void onDisconnected() {\n\t\t\r\n\t}",
"@Override\n public void onAgentDisconnect(long agentId, Status state) {\n }",
"void onDisconnect();",
"void onDisconnect();",
"@Override\n\tpublic void onDisconnected() {\n\t\t// Display the connection status\n\t\tToast.makeText(this, \"Disconnected. Please re-connect.\", Toast.LENGTH_SHORT).show();\n\t}",
"public void onDisconnected() {\n\n }",
"public void onDisconnected() {\n\n }",
"public void disconnected(String reason) {}",
"public void onDisconnected() {\r\n // Display the connection status\r\n Toast.makeText(this, \"Disconnected. Please re-connect.\",\r\n Toast.LENGTH_SHORT).show();\r\n }",
"@SubscribeEvent\n public void onFMLNetworkClientDisconnectionFromServer(ClientDisconnectionFromServerEvent event) {\n hypixel = false;\n bedwars = false;\n }",
"protected void onDisconnect() {}",
"@Override\n\tprotected void onNetworkDisConnected() {\n\n\t}",
"@Override\n\tpublic void onDisconnected() {\n\t\tmConnectionStatus.setText(R.string.disconnected);\n\t}",
"public void doOnDisconnect() {\n\t\t// Shut off any sensors that are on\n\t\tMainActivity.this.runOnUiThread(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\n\t\t\t\tresetAllOperations();\n\n\t\t\t\t\n\t\t\t\t// Make sure the LEDs go off\n\t\t\t\tif (droneApp.myDrone.isConnected) {\n\t\t\t\t\tdroneApp.myDrone.setLEDs(0, 0, 0);\n\t\t\t\t}\n\n\n\t\t\t\t// Only try and disconnect if already connected\n\t\t\t\tif (droneApp.myDrone.isConnected) {\n\t\t\t\t\tdroneApp.myDrone.disconnect();\n\t\t\t\t}\n\n\t\t\t\t// Remind people how to connect\n\t\t\t\ttvConnectInfo.setVisibility(TextView.VISIBLE);\n\t\t\t}\n\t\t});\n\t}",
"public void disconnectConvo() {\n convo = null;\n setConnStatus(false);\n }",
"public void disconnect()\n {\n isConnected = false;\n }",
"@Override\n\tpublic void onDisconnected() {\n\t\tToast.makeText(context, \"Disconnected. Please re-connect.\",Toast.LENGTH_SHORT).show();\n\t}",
"void onDisconnect( String errorMsg );",
"void disconnect(String reason);",
"public LWTRTPdu disConnect() throws IncorrectTransitionException;",
"@Override\n\tpublic void onDisconnected() {\n\t\t\n\t}",
"@Override\n\tpublic void onDisconnected() {\n\t\t\n\t}",
"@Override\n\tpublic void onDisconnected() {\n\t\t\n\t}",
"private void disconnected() {\n m_connectionLabel.setBackground(Color.RED);\n m_connectionLabel.setText(\"Disconnected\");\n }",
"void onDisconnectFailure();",
"public void onDeviceDisconnected() {\n btButton.setText(\"Disconnnected\");\n }",
"@Override\n public void Disconnect() {\n bReConnect = true;\n }",
"void clientDisconnected(Client client, DisconnectInfo info);",
"boolean getDisconnect();",
"public void setDisconnected()\n\t{\n\t\tSwingUtilities.invokeLater(new Runnable()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\tsetConnected(false);\n\t\t\t\tclearUserNames();\n\t\t\t\tprint(\"\\nConnection has been lost. Try reconnecting.\\n\");\n\t\t\t\tmainFrame.revalidate();\n\t\t \t\tmainFrame.repaint();\n\t\t\t}\n\t\t});\n\t}",
"protected void processDisconnect() {\n\t\tconnected.set(false);\n\t\tsenderChannel = null;\n\t}",
"@Override\n\tpublic void onDisconnected() {\n\n\t}",
"public void disconnect() {}",
"private void disConnect() {\n Auth.GoogleSignInApi.revokeAccess(mGoogleApiClient).setResultCallback(\n new ResultCallback<Status>() {\n @Override\n public void onResult(Status status) {\n m_tvStatus.setText(R.string.status_notconnected);\n m_tvEmail.setText(\"\");\n m_tvDispName.setText(\"\");\n }\n });\n }",
"public LWTRTPdu disConnectRsp() throws IncorrectTransitionException;",
"void onDisconnect(DisconnectReason reason, String errorMessage);",
"public void disconnectedFromHost();",
"@Override\n public void onDisconnected() {\n }",
"public void disconnect() {\r\n\t\trunning = false;\r\n\t}",
"public void setUserDisconnected(String userDisconnected)\n {\n this.userDisconnected = userDisconnected;\n this.currentState = ClientStateName.USER_DISCONNECT;\n setChanged();\n notifyObservers(currentState);\n }",
"public void notifyDisconnection(String username){\r\n for(SocketClientHandlerObserver obs:observers){\r\n obs.onDisconnection(username);\r\n }\r\n }",
"@Override public void onDisconnected() {\n }",
"default void onDisconnect(SessionID sessionID) {\n }",
"public void notifySwitchAway() { }",
"boolean hasDisconnect();",
"@Override\r\n public void onDeactivated(int reason) {\r\n if (connectionEstablished) {\r\n Message msg = Message.obtain(null, StatefulProtocolHandler.MSG_NFC_CONNECTION_LOST);\r\n msg.arg1 = reason;\r\n try {\r\n mNfcMessagingService.send(msg);\r\n } catch (RemoteException e) {\r\n Log.e(TAG, \"Could not send status to NFC message exchange service.\");\r\n }\r\n }\r\n Log.i(TAG, \"Lost connection to NFC reader.\");\r\n }",
"public void onNetDisConnect() {\n\n\t}",
"void onDisconnectSuccess();",
"private void connectionLost() {\n// mConnectionLostCount++;\n// if (mConnectionLostCount < 3) {\n// \t// Send a reconnect message back to the Activity\n//\t Message msg = mHandler.obtainMessage(RemoteBluetooth.MESSAGE_TOAST);\n//\t Bundle bundle = new Bundle();\n//\t bundle.putString(RemoteBluetooth.TOAST, \"Device connection was lost. Reconnecting...\");\n//\t msg.setData(bundle);\n//\t mHandler.sendMessage(msg);\n//\t \n// \tconnect(mSavedDevice); \t\n// } else {\n \tsetState(STATE_LISTEN);\n\t // Send a failure message back to the Activity\n\t Message msg = mHandler.obtainMessage(RemoteBluetooth.MESSAGE_TOAST);\n\t Bundle bundle = new Bundle();\n\t bundle.putString(RemoteBluetooth.TOAST, \"Device connection was lost\");\n\t msg.setData(bundle);\n\t mHandler.sendMessage(msg);\n// }\n }",
"@Override\n public void onDisconnected() {\n }",
"protected void onDisconnected(long hconv)\n {\n }",
"void userPressDisconnectButton();",
"public LWTRTPdu disConnectReq() throws IncorrectTransitionException;",
"@Then(\"^User is disconnected$\")\n\tpublic void user_is_disconnected() throws Throwable {\n\t\tisElementPresent(driver, By.className(\"user-menu-offline\"));\n\t\tThread.sleep(2000);\n\t}",
"public void unsetConnectionStateValue() throws JNCException {\n delete(\"connection-state\");\n }",
"void notifyPlayerDisconnected(String username);",
"public static void disconnection(DisconnectionEvent e)\n\t{\n\t\tDisplay.getDefault().asyncExec(new Runnable(){\n\n\t\t\t@Override\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\tif(!e.getState() && e.getNumOfConnectedSensors()==0)\n\t\t\t\t{\n\t\t\t\t\tresetGuiData();\n\t\t\t\t\tconfigButton.setEnabled(false);\n\t\t\t\t\tstatusBar.setText(\"Sensor \" + e.getSensorPath() + \" has been disconnected. Please connect sensor for configuration\");\n\t\t\t\t} else if (!e.getState() && shell.isVisible() && e.getNumOfConnectedSensors() == 1)\n\t\t\t\t{\n\t\t\t\t\tconfigButton.setEnabled(true);\n\t\t\t\t\tresetGuiData();\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tsetData();\n\t\t\t\t\t\tstatusBar.setText(\"Only Sensor \" + ConnectionManager.getInstance().currentSensor(0).getSensorPath()\n\t\t\t\t\t\t\t\t+ \" has been connected\");\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SensorNotFoundException e)\n\t\t\t\t\t{\n\t\t\t\t\t\tstatusBar.setText(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else if (e.getState())\n\t\t\t\t{\n\t\t\t\t\tstatusBar.setText(\"Please connect any sensor for configuration!\");\n\t\t\t\t\tresetGuiData();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t}",
"@Override\r\n\t\tpublic void onDisconnect(Connection connection) {\n\r\n\t\t}",
"public void disconnect() {if(mEnable) mBS.disconnect();}",
"@Override\npublic boolean isDisconnected(NodeIDType node) {\n\treturn false;\n}",
"@Override\n\t\t\tpublic void onNetworkDisconnected() {\n\t\t\t\t\n\t\t\t}",
"void channelInactive() throws Exception;",
"void channelInactive() throws Exception;",
"public boolean disconnect() {\r\n\t\t\r\n\t\tString message;\r\n\t\t//ENTER YOUR CODE TO DISCONNECT\r\n\t\tif (isChatSessionOpened()){\r\n\t\t\tsendChatClosure();\r\n\t\t}\r\n\t\t\r\n\t\tmessage= \"106\";\r\n\t\tsendDatagramPacket(message);\r\n\t\t\r\n\t\tthis.connectedUser = null;\r\n\t\tthis.chatReceiver = null;\r\n\t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\n\t\t\t\t\tSystem.out.println(\"CLIENT DISCONNECTED FROM SERVER.\");\r\n\t\t\t\t}",
"public void unsubscribeSwitchState() {\n\t\t\n\t}",
"public void onDisconnect(Controller controller) {\n\t\tSystem.out.println(\"Disconnected\");\r\n\t}",
"public void onDisconnect(Controller controller) {\n\t\tSystem.out.println(\"Disconnected\");\r\n\t}",
"void onUserSessionDisconnected(WebSocketConnection connection, Session session, String accountId);",
"interface Disconnect extends RconConnectionEvent {}",
"@Override\n public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {\n ctx.getChannel().getRemoteAddress();\n System.out.println(ctx.getChannel().getRemoteAddress()+\" Disconnected..\");\n Client user = ServerTools.getClientByChannel(ctx.getChannel());\n if(Server.live_clients.contains(user)){\n Server.live_clients.remove(user);\n System.out.println(\"User removed\");\n }\n }",
"public void disconnect() {\n\t\t\n\t}",
"@Override\r\n\t\t\t\tpublic void onServerDisconnect() {\n\t\t\t\t\tSystem.out.println(\"CONNECTION HAS BEEN LOST.\");\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\n\t\t\t\t}",
"public void opponentDisconnected() {\n \t\tif (lobbyManager.getHostedGame() != null) { // we haven't actually started a game yet\n \t\t\thostWaitScreen.setPotentialOpponent(null);\n \t\t}\n \t\t\n \t\tif (gameInProgress) {\n \t\t\tJOptionPane.showMessageDialog(gameMain, \n \t\t\t\t\t\"Your opponent disconnected unexpectedly (they're probably scared of you)\", \"Disconnection\", JOptionPane.ERROR_MESSAGE);\n \t\t\tquitNetworkGame();\n \t\t}\n \t\t\n \t\tgameInProgress = false;\n \t\tlobbyManager.resetOpponentConnection();\n \t}",
"public void disconnect();",
"public void disconnect();",
"public void disconnect();",
"public void disconnect();",
"@Override\n public void onDisconnect(BinaryLogClient client) {\n }",
"@Override\n public void disconnect() {\n getMvpView().showLoading();\n getDataManager().setSetupStatus(false);\n getDataManager().setIpAddress(\"\");\n getMvpView().setIpDetails(\"\", \"Disconnected\");\n\n new Handler().postDelayed(() -> {\n getMvpView().hideLoading();\n getMvpView().toSetupActivity();\n }, 1000);\n }",
"public void socketDisconnected(PacketChannel pc, boolean failed);",
"public void reconnected() { }",
"void disconnectedPlayerMessage(String name);",
"@Override\n public boolean disconnectFromSensor() {\n return false;\n }",
"@Override\n\tpublic boolean disconnect() {\n\t\treturn false;\n\t}",
"@Override\n public void disconnect() {\n super.disconnect();\n if (playStateSubscription != null) {\n playStateSubscription.unsubscribe();\n playStateSubscription = null;\n }\n connected = false;\n }",
"public void onIceDisconnected();",
"public interface ConnectionStateListener {\n void onDisconnect();\n void onConnect();\n void onLogout();\n}",
"public void disconnectedFrom(ServerDescriptor desc);",
"public void onDisconnect(DisconnectMsg msg) {\n\n\t\tString user = msg.getUser();\n\n\t\tLogger.log(\"onDisconnect:\" + msg.toString());\n\n\t\tstorage.removeClientSession(user);\n\n\t\tstorage.addBuffer(user);\n\t\t\n\t\tstorage.getThread(user).doStop();\n\t\t\n\t\t\n\t}",
"private void disconnect() {\n activityRunning = false;\n MRTClient.getInstance().doHangup();\n MRTClient.getInstance().removeClientListener(this);\n\n finish();\n }",
"void disconnect();",
"void disconnect();"
] |
[
"0.7494824",
"0.7238941",
"0.68365794",
"0.6806254",
"0.67839384",
"0.6711997",
"0.6601257",
"0.6589258",
"0.65658134",
"0.65634793",
"0.65634793",
"0.6501628",
"0.648018",
"0.648018",
"0.64706814",
"0.64120704",
"0.64029044",
"0.6397521",
"0.63803184",
"0.63731956",
"0.6350298",
"0.6333333",
"0.6333061",
"0.63295084",
"0.6315337",
"0.63143605",
"0.6309862",
"0.6306291",
"0.6306291",
"0.6306291",
"0.62959677",
"0.62782294",
"0.62569124",
"0.6250861",
"0.6225446",
"0.62212586",
"0.6204419",
"0.6197342",
"0.61965317",
"0.61946344",
"0.61825895",
"0.61806506",
"0.6173",
"0.6170978",
"0.61666745",
"0.61540586",
"0.61521477",
"0.6142876",
"0.6138624",
"0.6131677",
"0.6128058",
"0.6126319",
"0.6117771",
"0.6107631",
"0.6105457",
"0.60981596",
"0.60927254",
"0.60673606",
"0.6058256",
"0.6055874",
"0.6051932",
"0.602723",
"0.6024655",
"0.6024246",
"0.60230094",
"0.60170615",
"0.6009321",
"0.6001155",
"0.60007817",
"0.60007817",
"0.5992474",
"0.5983507",
"0.59815043",
"0.5972753",
"0.5972753",
"0.5964258",
"0.59630436",
"0.59473205",
"0.5945045",
"0.59222627",
"0.5917398",
"0.5904685",
"0.59031415",
"0.59031415",
"0.59031415",
"0.59031415",
"0.5900447",
"0.5898914",
"0.5888007",
"0.58875066",
"0.5884514",
"0.5875402",
"0.58653456",
"0.5860553",
"0.58601445",
"0.584736",
"0.58466184",
"0.5844942",
"0.5844486",
"0.5843743",
"0.5843743"
] |
0.0
|
-1
|
It initializes the class by connecting to the database
|
public DataHandlerDBMS() {
try {
Class.forName("com.mysql.jdbc.Driver");
DBMS = DriverManager.getConnection(url);
System.out.println("DBSM inizializzato");
} catch (SQLException e) {
System.out.println("Errore apertura DBMS");
e.printStackTrace();
} catch (ClassNotFoundException e) {
System.out.println("Assenza driver mySQL");
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private DBConnection() \n {\n initConnection();\n }",
"public Database()\r\n\t{\r\n\t\tinitializeDatabase();\r\n\t\t\r\n\t}",
"private Database() throws SQLException, ClassNotFoundException {\r\n Class.forName(\"org.postgresql.Driver\");\r\n con = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/postgres\", \"postgres\", \"kuka\");\r\n }",
"public ConnectDB(){\r\n\r\n\t}",
"public DatabaseManager() {\n try {\n con = DriverManager.getConnection(DB_URL, \"root\", \"marko\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"private void initialize() {\n try {\n Class.forName(\"org.postgresql.Driver\");\n } catch (ClassNotFoundException e) {\n LOGGER.error(\"DB: Unable to find sql driver.\", e);\n throw new AppRuntimeException(\"Unable to find sql driver\", e);\n }\n\n DbCred cred = getDbCred();\n this.connection = getConnection(cred);\n this.isInitialized.set(Boolean.TRUE);\n }",
"public Database() {\r\n\t\ttry {\t\r\n\t\t\tSystem.out.println(\"Database: Connected\");\r\n\t\t\tconn = DriverManager.getConnection(DB_URL,USER,PASS);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Unable to connect to database\");\r\n\t\t}\r\n\t}",
"public DatabaseController()\n\t{\n\t\tconnectionString = \"jdbc:mysql://localhost/?user=root\";\n\t\tcheckDriver();\n\t\tsetupConnection();\n\t}",
"@Override\n public void initializeConnection() throws SQLException, ClassNotFoundException {\n \n Class.forName(\"com.mysql.jdbc.Driver\");\n //setConnection(DriverManager.getConnection(\"jdbc:mysql://localhost/rabidusDB\",\"root\",\"password\"));\n setConnection(DriverManager.getConnection( host + \":3306/\" + databaseName, user, password));\n \n }",
"public connect_db() {\n initComponents();\n }",
"public DBManager(){\r\n connect(DBConstant.driver,DBConstant.connetionstring);\r\n }",
"public void initConnection() throws SQLException{\n\t\tuserCon = new UserDBHandler(\"jdbc:mysql://127.0.0.1:3306/users\", \"admin\", \"admin\");\n\t\tproductCon = new ProductDBHandler(\"jdbc:mysql://127.0.0.1:3306/products\", \"admin\", \"admin\");\n\t}",
"private void connectDatabase(){\n }",
"public MyGameDatabaseHandler() throws SQLException, ClassNotFoundException{\n Class.forName(DRIVER);\n con = DriverManager.getConnection(DATABASE_URL);\n connected = true;\n }",
"public void init() {\n\n\t\tConnection connection = null;\n\t\tStatement statement = null;\n\n\t\ttry {\n\n\t\t\tconnection = DatabaseInteractor.getConnection();\n\t\t\tstatement = connection.createStatement();\n\n\t\t} catch (SQLException exception) {\n\t\t\texception.printStackTrace();\n\t\t\treturn;\n\t\t} catch (ClassNotFoundException exception) {\n\t\t\texception.printStackTrace();\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\n\t\t\tDatabaseInteractor.createTable(StringConstants.USERS_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.QUESTIONS_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.ANSWERS_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.TOPICS_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.USER_QUESTION_VOTES_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.USER_ANSWER_VOTES_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.USER_TOPIC_RANKS_TABLE, statement);\n\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"private void initDB() {\n dataBaseHelper = new DataBaseHelper(this);\n }",
"public DBConnection()\n {\n\n }",
"public void initializeConnection(){\n try{\n dbConnect = DriverManager.getConnection(DBURL, USERNAME, PASSWORD);\n } catch (SQLException ex){\n ex.printStackTrace();\n }\n }",
"DatabaseController() {\n\n\t\tloadDriver();\n\t\tconnection = getConnection(connection);\n\t}",
"public DBhandler() throws ClassNotFoundException, SQLException\r\n {\r\n connectToDB();\r\n }",
"private void initConnection() {\n\t\tMysqlDataSource ds = new MysqlDataSource();\n\t\tds.setServerName(\"localhost\");\n\t\tds.setDatabaseName(\"sunshine\");\n\t\tds.setUser(\"root\");\n\t\tds.setPassword(\"sqlyella\");\n\t\ttry {\n\t\t\tConnection c = ds.getConnection();\n\t\t\tSystem.out.println(\"Connection ok\");\n\t\t\tthis.setConn(c);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void init() throws ClassNotFoundException\n {\n url = \"jdbc:derby://localhost:1527/ticket_booking\";\n username = \"nbuser\";\n password = \"nbuser\";\n\n /**\n * Links to the driver for Java DB (JDBC)\n */\n\n Class.forName(\"org.apache.derby.jdbc.ClientDriver\");\n }",
"public void initialize() {\r\n final String JDBC_DRIVER = \"org.h2.Driver\";\r\n final String DB_URL = \"jdbc:h2:./res/AnimalShelterDB\";\r\n final String USER = \"\";\r\n final String PASS;\r\n\r\n System.out.println(\"Attempting to connect to database\");\r\n try {\r\n Class.forName(JDBC_DRIVER);\r\n Properties prop = new Properties();\r\n prop.load(new FileInputStream(\"res/properties\"));\r\n PASS = prop.getProperty(\"password\");\r\n conn = DriverManager.getConnection(DB_URL, USER, PASS);\r\n stmt = conn.createStatement();\r\n System.out.println(\"Successfully connected to Animal database!\");\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n Alert a = new Alert(Alert.AlertType.ERROR);\r\n a.show();\r\n }\r\n startTA();\r\n }",
"protected void initializeDB() {\r\n try {\r\n // Load the JDBC driver\r\n // Class.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n Class.forName(\"com.mysql.jdbc.Driver \");\r\n\r\n System.out.println(\"Driver registered\");\r\n\r\n // Establish connection\r\n /*Connection conn = DriverManager.getConnection\r\n (\"jdbc:oracle:thin:@drake.armstrong.edu:1521:orcl\",\r\n \"scott\", \"tiger\"); */\r\n Connection conn = DriverManager.getConnection(\r\n \"jdbc:mysql://localhost/javabook\" , \"scott\", \"tiger\");\r\n System.out.println(\"Database connected\");\r\n\r\n // Create a prepared statement for querying DB\r\n pstmt = conn.prepareStatement(\r\n \"select * from Scores where name = ?\");\r\n }\r\n catch (Exception ex) {\r\n System.out.println(ex);\r\n }\r\n }",
"public DB() {\r\n\t\r\n\t}",
"private void setupDatabase() {\r\n\t\tDatabaseHelperFactory.init(this);\r\n\t\tdatabase = DatabaseHelperFactory.getInstance();\r\n\t}",
"public DataConnection() {\n\t\ttry {\n\t\t\tString dbClass = \"com.mysql.jdbc.Driver\";\n\t\t\tClass.forName(dbClass).newInstance();\n\t\t\tConnection con = DriverManager.getConnection(DIR_DB, USER_DB, PASS_DB);\n\t\t\tstatement = con.createStatement();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void initConnection() throws DatabaseConnectionException, SQLException {\n\t\t\tString connectionString = DBMS+\"://\" + SERVER + \":\" + PORT + \"/\" + DATABASE;\n\t\t\ttry{\n\t\t\t\tClass.forName(DRIVER_CLASS_NAME).newInstance();\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.err.println(\"IMPOSSIBILE TROVARE DRIVER\");\n\t\t\t\n\t\t\t}\n\t\t\ttry{\n\t\t\t\tconn=DriverManager.getConnection(connectionString, USER_ID, PASSWORD);\n\t\t\t\t\n\t\t\t}catch(SQLException e){\n\t\t\t\tSystem.err.println(\"IMPOSSIBILE STABILIRE CONNESSIONE DATABASE\");\n\t\t\t\t\n\t\t\t}\n\t\t}",
"public static void init()\n {\n try\n {\n // The newInstance() call is a work around for some broken Java implementations\n Class.forName(\"com.mysql.jdbc.Driver\").newInstance();\n\n // Create a new configuration object\n BoneCPConfig config = new BoneCPConfig();\n\n // Setup the configuration\n config.setJdbcUrl(\"jdbc:mysql://cs304.c0mk5mvcjljr.us-west-2.rds.amazonaws.com/cs304\"); // jdbc url specific to your database, eg jdbc:mysql://127.0.0.1/yourdb\n config.setUsername(\"cs304\");\n config.setPassword(\"ubccs304\");\n config.setConnectionTestStatement(\"SELECT 1\");\n config.setConnectionTimeout(10, TimeUnit.SECONDS);\n config.setMinConnectionsPerPartition(5);\n config.setMaxConnectionsPerPartition(10);\n config.setPartitionCount(1);\n\n // Setup the connection pool\n _pool = new BoneCP(config);\n\n // Log\n LogManager.getLogger(DatabasePoolManager.class).info(\"Database configuration initialized\");\n }\n catch (Exception ex)\n {\n // Log\n LogManager.getLogger(DatabasePoolManager.class).fatal(\"Could not initialize Database configuration\", ex);\n }\n\n }",
"public static Connection initializeDatabase()\n throws SQLException, ClassNotFoundException\n {\n \t\n \tString dbDriver = \"com.mysql.cj.jdbc.Driver\";\n String dbURL = \"jdbc:mysql://localhost:3306/\";\n // Database name, database user and password to access\n String dbName = \"jaltantra_db\";\n String dbUsername = \"root\";\n String dbPassword = \"jaldb@2050\";\n \n Class.forName(dbDriver);\n Connection conn = DriverManager.getConnection(dbURL + dbName ,dbUsername, dbPassword);\n return conn;\n }",
"private Database() throws SQLException {\n con = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:MusicAlbums\", \"c##dba\", \"sql\");\n }",
"@Override\n\tpublic void construct() {\n\t\tSystem.out.println(\"Getting a MySQL Database Connection\");\n\n\t}",
"private DatabaseHandler(){\n createConnection();\n }",
"private void initDb() {\n\t\tif (dbHelper == null) {\n\t\t\tdbHelper = new DatabaseOpenHelper(this);\n\t\t}\n\t\tif (dbAccess == null) {\n\t\t\tdbAccess = new DatabaseAccess(dbHelper.getWritableDatabase());\n\t\t}\n\t}",
"public static void initialize()\n\t{\n\t\tProperties props = new Properties();\n\t\tFileInputStream in = new fileInputStream(\"database.properties\");\n\t\tprops.load(in);\n\t\tin.close();\n\t\tString drivers = props.getProperty(\"jdbc.drivers\");\n\t\tif (drivers != null)\n\t\t\tSystem.setProperty(\"jdbc.drivers\", drivers);\n\t\tString url = props.getProperty(\"jdbc.url\");\n\t\tString username = props.getProperty(\"jdbc.username\");\n\t\tString password = props.getProperty(\"jdbc.password\");\n\t\t\n\t\tSystem.out.println(\"url=\"+url+\" user=\"+username+\" password=\"+password);\n\n\t\tdbConnect = DriverManager.getConnection( url, username, password);\n\t\t\n\t\tinitializeDatabase();\n\t}",
"public void init() {\n\r\n\t\ttry {\r\n\r\n\t\t\t//// 등록한 bean 에 있는 datasource를 가져와서 Connection을 받아온다\r\n\t\t\tcon = ds.getConnection();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}",
"public void connect() {\n\n DatabaseGlobalAccess.getInstance().setEmf(Persistence.createEntityManagerFactory(\"PU_dashboarddb\"));\n DatabaseGlobalAccess.getInstance().setEm(DatabaseGlobalAccess.getInstance().getEmf().createEntityManager());\n DatabaseGlobalAccess.getInstance().getDatabaseData();\n DatabaseGlobalAccess.getInstance().setDbReachable(true);\n }",
"public DBConnection() {\n this(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST, DB_PORT);\n }",
"private DatabaseRepository() {\n try {\n // connect to database\n\n DB_URL = \"jdbc:sqlite:\"\n + this.getClass().getProtectionDomain()\n .getCodeSource()\n .getLocation()\n .toURI()\n .getPath().replaceAll(\"[/\\\\\\\\]\\\\w*\\\\.jar\", \"/\")\n + \"lib/GM-SIS.db\";\n connection = DriverManager.getConnection(DB_URL);\n mapper = ObjectRelationalMapper.getInstance();\n mapper.initialize(this);\n }\n catch (SQLException | URISyntaxException e) {\n System.out.println(e.toString());\n }\n }",
"public void initialize()\r\n\t{\r\n\t\tdatabaseHandler = DatabaseHandler.getInstance();\r\n\t\tfillPatientsTable();\r\n\t}",
"DBConnect() {\n \n }",
"public Database() {\n\t\tconn = null;\n\t}",
"public Database() throws SQLException {\n conn = DriverManager.getConnection(dbURL, username, password);\n }",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n try {\r\n con = DriverManager.getConnection(\"jdbc:derby://localhost:1527/BracuConnect\", \"sayeem\", \"17101009\");\r\n } catch (SQLException e) {\r\n }\r\n }",
"public ConexionDB() {\n\n\t\tconn = null;\n\n\t}",
"public sqlDatabase() {\n }",
"public DBHandler() {\n\n driverName = \"com.mysql.jdbc.Driver\";\n url = \"jdbc:mysql://us-cdbr-azure-southcentral-e.cloudapp.net/newsstand\";\n userId = (String) \"ba7e286a39ae9e\";\n password = (String) \"d89b6d9b\";\n \n }",
"public void DBConnect() {\n \tdatabase = new DatabaseAccess();\n \tif (database != null) {\n \t\ttry {\n \t\t\tString config = getServletContext().getInitParameter(\"dbConfig\");\n \t\t\tdatabase.GetConnectionProperties(config);\n \t\t\tdatabase.DatabaseConnect();\n \t\t}\n \t\tcatch (Exception e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}\n }",
"private void init() throws SQLException, MalformedURLException {\n\t\tconnection = connect();\n\t\tstmt = connection.createStatement();\n\t\tstmt.setQueryTimeout(30);\n\t}",
"public DaoConnection() {\n\t\t\n\t}",
"public final void init() {\n connectDB();\n\n initMainPanel();\n\n initOthers();\n }",
"protected void init() throws SQLException {\n }",
"public static void initConnection() throws SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException{\r\n\t\t//create database connection only once\r\n\t\tif(dbCon == null){\t\r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\tdbCon = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/wip?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC\",\"root\",\"\");\r\n\t\t}\r\n\t}",
"public static void setUpConnection()\n\t{\n\t\ttry{\n\t\t\t//The information necessary to create a connection to the database, need to figure out what this will be\n\t\n\t\t\n\t\t\t// Register driver by finding the class that corresponds do it \n\t\t\tString driverName = \"oracle.jdbc.OracleDriver\"; \n\t\t\tClass.forName(driverName);\n\t\t\n\t\t\tconn = DriverManager.getConnection(URL, USR, PWD);\n\t\t\n\t\t\tSystem.out.println(\"Connected to C325.\");\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\r\n protected void connect() {\r\n try {\r\n this.setDatabase();\r\n } catch (SQLException e) {\r\n Log.w(NoteTraitDataSource.class.getName(), \"Error setting database.\");\r\n }\r\n }",
"public void init() {\n\n try {\n Context initCtx = new InitialContext();\n Context envCtx = (Context) initCtx.lookup(\"java:comp/env\");\n ds = (DataSource) envCtx.lookup(\"jdbc/QuotingDB\");\n// dbCon = ds.getConnection();\n }\n catch (javax.naming.NamingException e) {\n System.out.println(\"A problem occurred while retrieving a DataSource object\");\n System.out.println(e.toString());\n }\n\n }",
"public void Initialize() throws DBException {\n // Divide jndi and url\n StringTokenizer st = new StringTokenizer(m_dbURL, \",\");\n m_jndiName \t= st.nextToken();\n m_dbURL \t= st.nextToken();\n \n if (m_jndiName != null) {\n try {\n Context ctx = new InitialContext();\n s_ds = (DataSource) ctx.lookup(m_jndiName); \n } catch (Exception e) {\n System.out.println(\"err\"+e);\n SystemLog.getInstance().getErrorLog().error(\"ERR,HSQLDBTomCTRL,getInit-JNDI,\" + e, e);\n }\n }\n\t \n\t\t//\t\tLoad class incase faliure\n\t\t try {\n\t\t\tClass.forName(\"org.hsqldb.jdbcDriver\");\t\t\t\n\t\t} catch (ClassNotFoundException e1) {\t\t\t\n\t\t\te1.printStackTrace();\n\t\t}\t\t\n\t}",
"public void init(){\n\n stmt = null;\n\n try{\n\n Class.forName(\"com.mysql.jdbc.Driver\");\n myConnection=DriverManager.getConnection(DBUrl,userName,password);\n stmt=myConnection.createStatement();\n }\n catch(ClassNotFoundException | SQLException e){\n System.out.println(\"Failed to get connection\");\n }\n return;\n }",
"private static void initializeDatabase() {\n\t\tArrayList<String> data = DatabaseHandler.readDatabase(DATABASE_NAME);\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\trecords = serializer.deserialize(data);\n\t}",
"public void init() {\r\n \tconnection = Connect.initConnexion();\r\n \tSystem.out.println(\"connexion :\"+connection);\r\n }",
"public ConnexioBD() {\n try {\n Class.forName(driver);\n connection = DriverManager.getConnection(url, user, password);\n\n\n } catch (ClassNotFoundException | SQLException e) {\n System.out.println(\"Error al connectar amb la base de dades:\" + e);\n }\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n DBHandler = DBConnection.getConnection();\n }",
"public void initConnection(){\n \t String HOST = \"jdbc:mysql://10.20.63.22:3306/cloud\";\n String USERNAME = \"root\";\n String PASSWORD = \"test\";\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n } catch (ClassNotFoundException ex) {\n ex.printStackTrace();\n }\n \n try {\n conn = DriverManager.getConnection(HOST, USERNAME, PASSWORD);\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }",
"public SetupDatabase() {\n }",
"public DatabaseAdaptor() {\n\t\ttry {\n\t\t\tdatabase = new MyDatabase(DB_NAME);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public DbConnection() throws SQLException, ClassNotFoundException {\r\n\t\tClass.forName (DRIVER);\r\n\t\tconn = DriverManager.getConnection(CONNECTION, \"JavaDev\", \"password\");\r\n\t\tstmt = conn.createStatement();\r\n\t}",
"@SuppressWarnings(\"unchecked\")\npublic final void initDatabase()throws SQLException {\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n con =(Connection) DriverManager.getConnection(\"jdbc:mysql://localhost:3306/yajnab?zeroDateTimeBehavior=convertToNull\",\"root\",\"11\"); \n } \n catch (ClassNotFoundException | SQLException e) {\n }\n }",
"public DatabaseManagement() throws SQLException {\n\t\n\t\ttry {\n\t\t\t//use driver\n\t\t\tClass.forName(MYSQL_DRIVER);\n\t\t System.out.println(\"Class Loaded....\");\n\t\t\t\n\t\t //get connection to database\n\t\t\tmyConn = DriverManager.getConnection(getDbUrl(), getUserName(), getPassword());\n\t\t\t//System.out.println(\"Connected to database...\");\n\t\t\t\n\t\t\t//create a statement\n\t\t\tmyStmt = myConn.createStatement();\t\t\t\n\t\t}\n\t\t\t\t\t\n\t\tcatch (Exception exc){\n\t\t\texc.printStackTrace();\n\t\t}\t\t\n\t}",
"public JPersonelGiris() {\n initComponents();\n try {\n con = DriverManager.getConnection(\"jdbc:derby://localhost:1527/sample\", \"app\", \"app\");\n } catch (SQLException ex) {\n Logger.getLogger(JPersonelGiris.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private void setupDatabase()\n {\n try\n {\n Class.forName(\"com.mysql.jdbc.Driver\");\n }\n catch (ClassNotFoundException e)\n {\n simpleEconomy.getLogger().severe(\"Could not load database driver.\");\n simpleEconomy.getServer().getPluginManager().disablePlugin(simpleEconomy);\n e.printStackTrace();\n }\n\n try\n {\n connection = DriverManager\n .getConnection(String.format(\"jdbc:mysql://%s/%s?user=%s&password=%s\",\n simpleEconomy.getConfig().getString(\"db.host\"),\n simpleEconomy.getConfig().getString(\"db.database\"),\n simpleEconomy.getConfig().getString(\"db.username\"),\n simpleEconomy.getConfig().getString(\"db.password\")\n ));\n\n // Loads the ddl from the jar and commits it to the database.\n InputStream input = getClass().getResourceAsStream(\"/ddl.sql\");\n try\n {\n String s = IOUtils.toString(input);\n connection.createStatement().execute(s);\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n finally\n {\n try\n {\n input.close();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n }\n catch (SQLException e)\n {\n simpleEconomy.getLogger().severe(\"Could not connect to database.\");\n simpleEconomy.getServer().getPluginManager().disablePlugin(simpleEconomy);\n e.printStackTrace();\n }\n }",
"public AdminDAO()\n {\n con = DataBase.getConnection();//crear una conexión al crear un objeto AdminDAO\n }",
"public Database() {\n //Assign instance variables.\n this.movies = new ArrayList<>();\n this.users = new ArrayList<>();\n }",
"public DatabaseConnector() {\n HikariConfig config = new HikariConfig();\n config.setJdbcUrl(\"jdbc:postgresql://localhost:5547/go_it_homework\");\n config.setUsername(\"postgres\");\n config.setPassword(\"Sam@64hd!+4\");\n this.ds = new HikariDataSource(config);\n ds.setMaximumPoolSize(5);\n }",
"public DBConn(){\n\t\t//Create a variable for the connection string.\n\t\tthis.connectionUrl = \"jdbc:sqlserver://localhost:1433;\" +\n\t\t \"databaseName=CSE132B; username=sa; password=cse132b\";\t\t//Daniel: integratedSecurity=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Kalvin: username=sa; password=cse132b\n\n\t\t// Declare the JDBC objects.\n\t\tthis.conn = null;\n\t\tthis.stmt = null;\n\t\tthis.rs = null;\n\t}",
"public MenuDAO() {\n\t\t\n\t\tconnection = ConnectDatabase.connectDatabase();\n\t\t\n\t}",
"public void init() {\n\t\tlog.info(\"Initialise StudentDAO\");\n\t\tquery_getStudent = new Query_GetStudent(dataSource);\n\t\tquery_insertStudent = new Query_InsertStudent(dataSource);\n\t\tquery_getStudentId = new Query_GetStudentID(dataSource);\n\t\tquery_updateStudent = new Query_UpdateStudent(dataSource);\n\t\tquery_deleteStudent = new Query_DeleteStudent(dataSource);\n\t\tquery_getAllStudentsOrderMatnr = new Query_GetAllStudentsOrderMatnr(\n\t\t\t\tdataSource);\n\t\tquery_getAllStudentsOrderNachname = new Query_GetAllStudentsOrderNachname(\n\t\t\t\tdataSource);\n\t}",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n // TODO\r\n dc= new mysqlconnect();\r\n populateTableView();\r\n \r\n \r\n\r\n //populateTableView();\r\n }",
"public RentalManager() {\n DataAccess da = new DataAccess();\n try {\n conn = DriverManager.getConnection(da.getCONN_STR(), da.getUSER(), da.getPASS());\n } catch (SQLException ex) {\n Logger.getLogger(RentalManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public DatabaseSeeder() {\n // initialSeed properties...\n super();\n\n // retrieve a database connection instance...\n this.connector = new DatabaseConnector();\n this.connection = this.connector.connect();\n }",
"public Database() {\n size = 0;\n tables = new HashMap();\n p = new Parse(this);\n }",
"public SQLCommunicator() {\n logger.info(\"Inside SQLConstructor\");\n try {\n //Connect to the database\n connectionUrl = \"jdbc:derby://localhost:1527/DribbleDerbyDB\";\n\n con = DriverManager.getConnection(connectionUrl, \"APP\", \"dribble\");\n logger.info(\"Connected to Glassfish database\");\n DatabaseMetaData md = con.getMetaData();\n //Check if the table exists in the database\n ResultSet rs = md.getTables(null, \"APP\", \"%\", null);\n //Add a table if the table does not exist\n if (rs.next() == false) {\n Statement stmt = con.createStatement();\n logger.info(\"No table in database. Creating main table...\");\n stmt.execute(\"CREATE TABLE DRIBBLE_SYSTEM_SUBJECTS\"\n + \"(NAME VARCHAR(20),\"\n + \"ID INTEGER NOT NULL,\"\n + \"LATITUDE BIGINT,\"\n + \"LONGITUDE BIGINT,\"\n + \"VIEWS INTEGER default 0,\"\n + \"POSTS INTEGER default 0,\"\n + \"POPULARITY BIGINT default 0,\"\n + \"CURRENTIME BIGINT\"\n + \")\");\n } else {\n logger.info(\"Table exists in database\");\n }\n\n\n } catch (SQLException e) {\n logger.severe(\"SQLexception: \" + e.toString());\n }\n\n logger.info(\"Constructed SQLCommunicator\");\n\n }",
"public DBManager() {\n\t\t\n\t}",
"public static void InitializeDatabase() throws SQLException {\n dataSource = new SQLiteConnectionPoolDataSource();\n dataSource.setUrl(\"jdbc:sqlite:application.db\");\n\n // Optional Configuration Settings\n org.sqlite.SQLiteConfig config = new org.sqlite.SQLiteConfig();\n config.enforceForeignKeys(true);\n config.enableLoadExtension(true);\n dataSource.setConfig(config);\n\n connectionPool = dataSource.getPooledConnection();\n }",
"private Conexao() {\r\n\t\ttry {\r\n\t\t\tconnection = DriverManager.getConnection(\"jdbc:hsqldb:mem:.\", \"sa\", \"\");\r\n\t\t\tnew LoadTables().creatScherma(connection);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Erro ao conectar com o banco: \"+e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public Database() {\n if (init) {\n\n //creating Transaction data\n Transaction transactionOne\n = new Transaction(1, \"Debit\", \"Spar Grocery\", 54.68,1);\n\n transactionDB.add(transactionOne);\n\n // Creating an Account data\n Account accountOne = new Account(1, 445, 111111111, \"Savings\",\n 1250.24, transactionDB);\n\n accountDB.add(accountOne);\n\n //creating withdrawal data\n Withdrawal withdrawalOne = new Withdrawal(1, 64422545, 600.89);\n withdrawalDB.add(withdrawalOne);\n\n //creating transfer data\n Transfer transferOne = new Transfer(1, 25252525, 521.23);\n transferDB.add(transferOne);\n\n //creating lodgement data\n Lodgement lodgementOne = new Lodgement(1, 67766666, 521.23);\n lodgementDB.add(lodgementOne);\n\n //add Customer data \n Customer customerOne\n = new Customer(1, \"Darth Vader\", \"[email protected]\",\n \"Level 5, Suit Dark\", \"darkSideIsGoodStuff\",\n accountDB, withdrawalDB, transferDB, lodgementDB);\n\n customerDB.add(customerOne);\n\n init = false;\n }\n }",
"private DbConnection() {\n }",
"public static void init()\n\t{\n\t\tMongoClient mongoClient = new MongoClient(new MongoClientURI(\"mongodb://111.111.111.111:27017\"));\n\t\tdatabase=mongoClient.getDatabase(\"mydb\");\n\t}",
"private void makeSQLConn() {\n\t\ttry {\n\t\t\tmyDB = new MySQLAccess();\n\t\t} catch (Exception e) { e.printStackTrace(); }\n\t}",
"@Override\r\n\tpublic void init(Context context, Request request, Response response) {\r\n\t\tsuper.init(context, request, response);\r\n\t\t/*try {\r\n\t\t\tconnection = EleaveDB.getConnection();\r\n\t\t\tif (connection == null) {\r\n\t\t\t\tlogger.info(\"can not connect to database\");\r\n\t\t\t} else {\r\n\t\t\t\t//statement = connection.createStatement();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}*/\r\n\t}",
"@Override\n public void init() throws DBException {\n System.out.println(\"Initializing :)\");\n\n YCSBLevelDBClient client = new YCSBLevelDBClient();\n }",
"public Persistence() {\n\t\tconn = dbConnection();\n\t}",
"public DataBaseConnector()\n {\n dataSource = new SQLServerDataSource();\n dataSource.setServerName(\"EASV-DB2\");\n dataSource.setPortNumber(1433);\n dataSource.setDatabaseName(\"AutistMovies\");\n dataSource.setUser(\"CS2017A_15\");\n dataSource.setPassword(\"Bjoernhart1234\");\n }",
"@WebMethod\n\tpublic void initializeBD() {\n\t\tdbManager.open(false);\n\t\tdbManager.initializeDB();\n\t\tdbManager.close();\n\t}",
"public ConnexionBD() throws ClassNotFoundException, SQLException {\n\t\tClass.forName(\"com.mysql.jdbc.Driver\") ;\n\t\tconnexion = DriverManager.getConnection(dbURL,user,password) ;\n\t}",
"private DatabaseContext() {\r\n datastore = createDatastore();\r\n init();\r\n }",
"public SqlHelper() {\n\t\tloadDbDriver();\n\t}",
"public AppointmentDAOImpl() {\n this.conn = DBConnector.getConnection();\n }",
"public setup() {\n dbConnection = \"jdbc:\"+DEFAULT_DB_TYPE+\"://\"+DEFAULT_DB_HOST+\":\"+DEFAULT_DB_PORT+\"/\"+DEFAULT_DB_PATH;\n dbType = DEFAULT_DB_TYPE;\n dbUser = DEFAULT_DB_USER;\n dbPass = DEFAULT_DB_PASSWORD;\n beginSetup();\n }",
"public Login() {\n super(\"Login\");\n initComponents();\n conn=javaconnect.ConnectDb();\n }",
"public Conexion() throws ClassNotFoundException, SQLException {\n Class.forName(DRIVER);//Cargamos las clases\n conn = DriverManager.getConnection(URL, \"root\", \"\");//Obtenemos la conexion\n System.out.println(\"Conectado a la base de datos\");//Confirmamos que todo salio bien\n }"
] |
[
"0.81281894",
"0.7828036",
"0.7755878",
"0.76907",
"0.76548564",
"0.76482874",
"0.76384693",
"0.7636664",
"0.7634969",
"0.76286805",
"0.76031727",
"0.7587989",
"0.7554947",
"0.75407237",
"0.7523875",
"0.7520403",
"0.7499743",
"0.7497395",
"0.7481627",
"0.744421",
"0.74342513",
"0.74086404",
"0.73998195",
"0.738765",
"0.7365849",
"0.73586875",
"0.7352783",
"0.7344969",
"0.7332647",
"0.73287",
"0.73054403",
"0.72872645",
"0.728562",
"0.7284624",
"0.7282565",
"0.7248009",
"0.72437596",
"0.7230731",
"0.72296095",
"0.7229502",
"0.720941",
"0.71989876",
"0.71816295",
"0.7178049",
"0.71727514",
"0.7166976",
"0.7158007",
"0.7149507",
"0.71457773",
"0.71191317",
"0.7114933",
"0.71133465",
"0.70984197",
"0.7081219",
"0.70782447",
"0.7050051",
"0.7039785",
"0.7037938",
"0.7037311",
"0.70302963",
"0.7026945",
"0.7020679",
"0.7010068",
"0.69811296",
"0.69809353",
"0.6978247",
"0.6970744",
"0.696969",
"0.6964477",
"0.6957715",
"0.6956514",
"0.6955281",
"0.69264764",
"0.69257736",
"0.6914417",
"0.69134593",
"0.69102764",
"0.6899067",
"0.6897991",
"0.6895455",
"0.6893481",
"0.68933696",
"0.68824756",
"0.6881835",
"0.688163",
"0.68767965",
"0.68500024",
"0.6824206",
"0.6816071",
"0.68155444",
"0.6815313",
"0.68097764",
"0.6800089",
"0.6796454",
"0.67959",
"0.6795281",
"0.67924756",
"0.67901975",
"0.67880535",
"0.67874783"
] |
0.70144767
|
62
|
Created by budde on 4/26/15.
|
public interface AssignmentNode extends StackOperationNode {
TemporaryVariableName getValueName();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"public final void mo51373a() {\n }",
"protected boolean func_70814_o() { return true; }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"private void kk12() {\n\n\t}",
"private void m50366E() {\n }",
"private stendhal() {\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public void mo38117a() {\n }",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"private void init() {\n\n\t}",
"private void poetries() {\n\n\t}",
"private void strin() {\n\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public abstract void mo70713b();",
"public void method_4270() {}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n public void init() {\n\n }",
"public void mo12628c() {\n }",
"static void feladat9() {\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"public void m23075a() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"public abstract void mo56925d();",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public void mo21779D() {\n }",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"public final void mo91715d() {\n }",
"static void feladat4() {\n\t}",
"@Override\n protected void init() {\n }",
"protected boolean func_70041_e_() { return false; }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"private void m50367F() {\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"public void skystonePos4() {\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"public void mo115190b() {\n }",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n public void init() {\n }",
"public void mo21825b() {\n }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"static void feladat7() {\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"public void mo6081a() {\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void init() {\n\t}",
"public void mo21877s() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\n public void init() {}",
"public abstract void mo27386d();",
"public void baocun() {\n\t\t\n\t}",
"private void init() {\n\n\n\n }",
"public void skystonePos6() {\n }",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"protected void mo6255a() {\n }",
"public abstract void mo6549b();"
] |
[
"0.5982899",
"0.5884431",
"0.5876487",
"0.58756727",
"0.5866924",
"0.58666587",
"0.5820854",
"0.5820854",
"0.5779621",
"0.5776179",
"0.57668734",
"0.57613975",
"0.57510513",
"0.57180643",
"0.5675869",
"0.5672647",
"0.56649584",
"0.5654211",
"0.5654211",
"0.5654211",
"0.5654211",
"0.5654211",
"0.5648491",
"0.5642917",
"0.56283224",
"0.5624469",
"0.56044066",
"0.5583844",
"0.5571814",
"0.5571374",
"0.55615497",
"0.5557266",
"0.55560267",
"0.55505985",
"0.5549698",
"0.55476475",
"0.5546931",
"0.5545266",
"0.5533794",
"0.55141133",
"0.55066717",
"0.54935455",
"0.5486859",
"0.5486859",
"0.54814255",
"0.54795337",
"0.5476806",
"0.5475544",
"0.5473857",
"0.5473857",
"0.5473857",
"0.5473857",
"0.5473857",
"0.5473857",
"0.5473857",
"0.54672253",
"0.54672253",
"0.54672253",
"0.5463215",
"0.54608876",
"0.5457847",
"0.5454433",
"0.54507947",
"0.54497105",
"0.54492795",
"0.5446452",
"0.54398775",
"0.54394567",
"0.5436391",
"0.5436391",
"0.5434872",
"0.5434602",
"0.5434602",
"0.5434602",
"0.54314727",
"0.54314727",
"0.54314727",
"0.54302615",
"0.54272115",
"0.5425609",
"0.5422483",
"0.5418889",
"0.5411194",
"0.54058963",
"0.54047626",
"0.5400508",
"0.53942037",
"0.539316",
"0.53889704",
"0.53889704",
"0.53858167",
"0.53846383",
"0.5376587",
"0.53758895",
"0.5375237",
"0.5372911",
"0.5372398",
"0.5365751",
"0.53633547",
"0.53521883",
"0.5351999"
] |
0.0
|
-1
|
Creates a variable grid layout manager with the specified mode and zero horizontal and vertical gap.
|
public VariableGridLayout(int mode, int size) {
this(mode, size, 0, 0);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"protected void createLayout() {\n\t\tthis.layout = new GridLayout();\n\t\tthis.layout.numColumns = 2;\n\t\tthis.layout.marginWidth = 2;\n\t\tthis.setLayout(this.layout);\n\t}",
"@Override\n protected Layout constructShellLayout() {\n GridLayout mainLayout = new GridLayout(1, false);\n\n return mainLayout;\n }",
"private VerticalLayout buildGridInfo() {\n\t\tgridInfo = new VerticalLayout();\r\n\t\tgridInfo.setImmediate(false);\r\n\t\tgridInfo.setWidth(\"100%\");\r\n\t\tgridInfo.setHeight(\"100.0%\");\r\n\t\tgridInfo.setMargin(false);\r\n\t\tgridInfo.setSpacing(true);\r\n\t\t\r\n\t\t// gridTitle\r\n\t\tgridTitle = buildGridTitle();\r\n\t\tgridInfo.addComponent(gridTitle);\r\n\t\tgridInfo.setExpandRatio(gridTitle, 1.0f);\r\n\t\t\r\n\t\t// gridData\r\n\t\tgridData = buildGridData();\r\n\t\tgridInfo.addComponent(gridData);\r\n\t\tgridInfo.setExpandRatio(gridData, 1.0f);\r\n\t\t\r\n\t\treturn gridInfo;\r\n\t}",
"public VariableGridLayout() {\n\t\tthis(FIXED_NUM_ROWS, 1, 0, 0);\n\t}",
"private GridPane inicializarPanelGrid() {\n GridPane gridPane = new GridPane();\n\n // Position the pane at the center of the screen, both vertically and horizontally\n gridPane.setAlignment(Pos.CENTER);\n\n // Set a padding of 20px on each side\n gridPane.setPadding(new Insets(40, 40, 40, 40));\n\n // Set the horizontal gap between columns\n gridPane.setHgap(10);\n\n // Set the vertical gap between rows\n gridPane.setVgap(10);\n\n // Add Column Constraints\n // columnOneConstraints will be applied to all the nodes placed in column one.\n ColumnConstraints columnOneConstraints = new ColumnConstraints(100, 100, Double.MAX_VALUE);\n columnOneConstraints.setHalignment(HPos.RIGHT);\n\n // columnTwoConstraints will be applied to all the nodes placed in column two.\n ColumnConstraints columnTwoConstrains = new ColumnConstraints(200, 200, Double.MAX_VALUE);\n columnTwoConstrains.setHgrow(Priority.ALWAYS);\n\n gridPane.getColumnConstraints().addAll(columnOneConstraints, columnTwoConstrains);\n\n return gridPane;\n }",
"public Node createGrid() {\n\t\tGroup gridGroup = new Group();\n\t\tgridGroup.getChildren().addAll(buildXYPlane());\n\t\t/*\n\t\t * XXX extend the grid\n\t\t * \n\t\t * here it would be possible to extend the grid, e.g. with a graph\n\t\t * or another plane with a grid (XZ, YZ, ...).\n\t\t * \n\t\t * it would look like this:\n\t\t * gridGroup.getChildren().addAll(buildGraph());\n\t\t */\n\t\treturn gridGroup;\n\t}",
"private RecyclerView.LayoutManager createLayoutManager() {\n int orientation = getResources().getConfiguration().orientation;\n int columnNum;\n if (orientation == Configuration.ORIENTATION_PORTRAIT) {\n columnNum = COLUMN_NUM_PORT;\n } else {\n columnNum = COLUMN_NUM_LAND;\n }\n return new GridLayoutManager(this, columnNum);\n }",
"GridPanel create(GridDataModel model);",
"private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, new Dimension(100, 20), new Dimension(100, 20), new Dimension(100, 20), 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonClose = new JButton();\n buttonClose.setText(\"Close\");\n panel2.add(buttonClose, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n messageLabel = new JLabel();\n messageLabel.setText(\"\");\n panel3.add(messageLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }",
"public void createGrid() {\n\t\tint[][] neighbours = getIo().getNeighbours();\n\t\tsetGrid(new GridAlg(neighbours, animals));\n\t\tgetGrid().setStep(getStep());\n\t}",
"private Grid makeGrid()\n\t{\n\t\tGrid grid = Grid.grid().\n\t\t\t\tBus(\"1\").\n\t\t\t\tSlackSource(\"Slack\", BASE_VOLTAGE, 0, 0, 0).\n\t\t\t\tLine(\"1-2\", 1, 0.06*BASE_IMPEDANCE, 0.03*BASE_IMPEDANCE).\n\t\t\t\t\tBus(\"2\").\n\t\t\t\t\t\tControllableDemand(\"S\").\n\t\t\t\t\t\tLine(\"2-3\", 1, 0.06*BASE_IMPEDANCE, 0.03*BASE_IMPEDANCE).\n\t\t\t\t\t\t\tBus(\"3\").\n\t\t\t\t\t\t\t\tLoad(\"L\").\n\t\t\t\t\t\t\tterminate().\n\t\t\t\t\t\tterminate().\n\t\t\t\t\t\tLine(\"2-4\", 1, 0.06*BASE_IMPEDANCE, 0.03*BASE_IMPEDANCE).\n\t\t\t\t\t\tBus(\"4\").\n\t\t\t\t\t\t\tDistributedSource(\"DG\").\n\t\t\t\t\t\tterminate().\n\t\t\t\t\tterminate().\n\t\t\t\t\tterminate().\n\t\t\t\tterminate().\n\t\t\tterminate().\n\t\tgrid();\n\t\t\n\t\t// x_0:\n\t\tLoad load = grid.getLoad(\"L\");\n\t\tControllableDemand storage = grid.getControllableDemand(\"S\");\n\t\tDistributedSource dg = grid.getDistributedSource(\"DG\");\n\t\tsetupUnits(load, storage, dg);\n\t\t\n\t\treturn grid;\n\t}",
"Board createLayout();",
"protected void createMainPanel() {\n\t\tthis.mainPanel = new VerticalPanel(); \n\t\tthis.mainPanel.setSpacing(5);\n\t\tthis.mainPanel.setScrollMode(getScrollMode());\n\t}",
"private GridLayout buildGridData() {\n\t\tgridData = new GridLayout();\r\n\t\tgridData.setImmediate(false);\r\n\t\tgridData.setWidth(\"-1px\");\r\n\t\tgridData.setHeight(\"100.0%\");\r\n\t\tgridData.setMargin(false);\r\n\t\tgridData.setSpacing(true);\r\n\t\tgridData.setColumns(2);\r\n\t\tgridData.setRows(2);\r\n\t\t\r\n\t\t// labelA\r\n\t\tlabelA = new Label();\r\n\t\tlabelA.setImmediate(false);\r\n\t\tlabelA.setWidth(\"-1px\");\r\n\t\tlabelA.setHeight(\"-1px\");\r\n\t\tlabelA.setValue(\"<b>Autor:</b>\");\r\n\t\tlabelA.setContentMode(3);\r\n\t\tgridData.addComponent(labelA, 0, 0);\r\n\t\t\r\n\t\t// labelAuthor\r\n\t\tlabelAuthor = new Label();\r\n\t\tlabelAuthor.setImmediate(false);\r\n\t\tlabelAuthor.setWidth(\"-1px\");\r\n\t\tlabelAuthor.setHeight(\"-1px\");\r\n\t\tlabelAuthor.setValue(\"Label\");\r\n\t\tgridData.addComponent(labelAuthor, 1, 0);\r\n\t\t\r\n\t\t// labelB\r\n\t\tlabelB = new Label();\r\n\t\tlabelB.setImmediate(false);\r\n\t\tlabelB.setWidth(\"-1px\");\r\n\t\tlabelB.setHeight(\"-1px\");\r\n\t\tlabelB.setValue(\"<b>Editorial:</b>\");\r\n\t\tlabelB.setContentMode(3);\r\n\t\tgridData.addComponent(labelB, 0, 1);\r\n\t\t\r\n\t\t// labelPublisher\r\n\t\tlabelPublisher = new Label();\r\n\t\tlabelPublisher.setImmediate(false);\r\n\t\tlabelPublisher.setWidth(\"-1px\");\r\n\t\tlabelPublisher.setHeight(\"-1px\");\r\n\t\tlabelPublisher.setValue(\"Label\");\r\n\t\tgridData.addComponent(labelPublisher, 1, 1);\r\n\t\t\r\n\t\treturn gridData;\r\n\t}",
"public DynamicGrid() {\n\t\t// constructor\n\t\t// create an empty table of 0 rows and 0 cols\n\t\tthis.storage = new DynamicArray<DynamicArray<T>>();\n\t}",
"@AutoGenerated\r\n\tprivate GridLayout buildMainLayout() {\n\t\tmainLayout = new GridLayout();\r\n\t\tmainLayout.setImmediate(false);\r\n\t\tmainLayout.setWidth(\"-1px\");\r\n\t\tmainLayout.setMargin(true);\r\n\t\tmainLayout.setSpacing(true);\r\n\t\tmainLayout.setRows(2);\r\n\t\t\r\n\t\t// top-level component properties\r\n\t\tsetWidth(\"-1px\");\r\n\t\t\r\n\t\t// verticalLayout_1\r\n\t\thorizontalLayout_1 = buildHorizontalLayout_1();\r\n\t\tmainLayout.addComponent(horizontalLayout_1, 0, 0);\r\n\t\t\r\n\t\treturn mainLayout;\r\n\t}",
"private void setGrid() {\r\n maxRows = (FORM_HEIGHT - FORM_HEIGHT_ADJUST) / SQUARE_SIZE;\r\n maxColumns = (FORM_WIDTH - FORM_WIDTH_ADJUST) / SQUARE_SIZE; \r\n grid = new JLabel[maxRows][maxColumns];\r\n int y = (FORM_HEIGHT - (maxRows * SQUARE_SIZE)) / 2;\r\n for (int row = 0; row < maxRows; row++) {\r\n int x = (FORM_WIDTH - (maxColumns * SQUARE_SIZE)) / 2;\r\n for (int column = 0; column < maxColumns; column++) {\r\n createSquare(x,y,row,column);\r\n x += SQUARE_SIZE;\r\n }\r\n y += SQUARE_SIZE;\r\n } \r\n }",
"private GridLayout initGridLayout(int rows, int colums) {\n GridLayout gridLayout = new GridLayout(this);\n gridLayout = findViewById(R.id.game_grid);\n gridLayout.setColumnCount(colums);\n gridLayout.setRowCount(rows);\n\n // gridLayout.setLayoutParams(gridLayoutParams);\n gridLayout.setOrientation(GridLayout.HORIZONTAL);\n return gridLayout;\n }",
"private void $$$setupUI$$$() {\n mainPanel = new JPanel();\n mainPanel.setLayout(new GridLayoutManager(3, 3, new Insets(0, 0, 0, 0), -1, -1));\n toolBarPanel = new JPanel();\n toolBarPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(toolBarPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n containerPanel = new JPanel();\n containerPanel.setLayout(new BorderLayout(0, 0));\n mainPanel.add(containerPanel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n errorPanel = new JPanel();\n errorPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(errorPanel, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n valuePanel = new JPanel();\n valuePanel.setLayout(new BorderLayout(0, 0));\n mainPanel.add(valuePanel, new GridConstraints(1, 1, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"view as\");\n mainPanel.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n comboBox1 = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n defaultComboBoxModel1.addElement(\"UTF-8String\");\n comboBox1.setModel(defaultComboBoxModel1);\n mainPanel.add(comboBox1, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }",
"private Panel buildPanelImg() {\n\t\tpanelImg = new Panel();\r\n\t\tpanelImg.setImmediate(false);\r\n\t\tpanelImg.setWidth(\"-1px\");\r\n\t\tpanelImg.setHeight(\"-1px\");\r\n\t\t\r\n\t\t// gridImg\r\n\t\tgridImg = new HorizontalLayout();\r\n\t\tgridImg.setImmediate(false);\r\n\t\tgridImg.setWidth(\"128px\");\r\n\t\tgridImg.setHeight(\"128px\");\r\n\t\tgridImg.setMargin(false);\r\n\t\tpanelImg.setContent(gridImg);\r\n\t\t\r\n\t\treturn panelImg;\r\n\t}",
"public void createGrid() {\r\n generator.generate();\r\n }",
"private GridData newGridData(int horizSpan) {\n GridData gd = new GridData();\n gd.horizontalSpan = horizSpan;\n return gd;\n }",
"private JPanel initializePanel() {\n JPanel myPanel = new JPanel();\n //myPanel.setPreferredSize(new Dimension(600,600));\n\n myPanel.setLayout(new GridLayout(8,8));\n myPanel.setSize(600,600);\n myPanel.setLocation(100,100);\n myPanel.setBorder(new LineBorder(Color.BLACK));\n return myPanel;\n }",
"private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonOK = new JButton();\n buttonOK.setText(\"OK\");\n panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n content = new JPanel();\n content.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(content, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n tabbedPane1 = new JTabbedPane();\n content.add(tabbedPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, 200), null, 0, false));\n Gesture = new JPanel();\n Gesture.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n tabbedPane1.addTab(\"Gesture\", Gesture);\n final JLabel label1 = new JLabel();\n label1.setIcon(new ImageIcon(getClass().getResource(\"/reference/by_gesture.png\")));\n label1.setText(\"\");\n Gesture.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }",
"private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));\n materialFirstWordLabel = new JLabel();\n materialFirstWordLabel.setText(\"нет данных\");\n contentPane.add(materialFirstWordLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(10, -1), null, 0, false));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n materialMarkLabel = new JLabel();\n materialMarkLabel.setText(\" \");\n materialMarkLabel.setVerticalTextPosition(1);\n panel1.add(materialMarkLabel, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n materialProfileLabel = new JLabel();\n materialProfileLabel.setText(\" \");\n materialProfileLabel.setVerticalTextPosition(3);\n panel1.add(materialProfileLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n materialSeparator = new JSeparator();\n panel1.add(materialSeparator, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n contentPane.add(spacer1, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n }",
"private void $$$setupUI$$$() {\n rootPanel = new JPanel();\n rootPanel.setLayout(new GridLayoutManager(3, 5, new Insets(0, 5, 5, 5), -1, -1));\n worldMap = new JPanel();\n worldMap.setLayout(new GridBagLayout());\n worldMap.setBackground(new Color(-1250068));\n rootPanel.add(worldMap, new GridConstraints(1, 0, 2, 5, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, new Dimension(500, 500), null, null, 0, false));\n simulationTime = new JLabel();\n simulationTime.setText(\"0s\");\n rootPanel.add(simulationTime, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Simulation time:\");\n rootPanel.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n rootPanel.add(spacer1, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n averageWaitingTime = new JLabel();\n averageWaitingTime.setText(\"0s\");\n rootPanel.add(averageWaitingTime, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"Average waiting time\");\n rootPanel.add(label2, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }",
"public GriddedPanel() {\n this(new Insets(2, 2, 2, 2));\n\n }",
"public SameGnomeFrame() {\n\t\tsetSize(DEFUALT_WIDTH,DEFUALT_WIDTH);\n\t\tintializeGridBall();\n\t\tgrid = new GridComponent(gridBall);\n\t\tadd(grid);\n\t\t\n\t}",
"public interface GridPanelFactory {\r\n /**\r\n * Creates an instance of the grid panel and initializes it.\r\n *\r\n * @param model is a model instance.\r\n * @return a newly created grid panel.\r\n */\r\n GridPanel create(GridDataModel model);\r\n\r\n /**\r\n * This method creates a data model.<p>\r\n * It's used by the hiearachical grid if there is no data model defined for the cell \r\n * in the parent data model.\r\n *\r\n * @param parentRow is a parent model row.\r\n * @param parentModel is a parent model instance.\r\n * \r\n * @return a data model.\r\n */\r\n GridDataModel create(int parentRow, GridDataModel parentModel);\r\n}",
"private void $$$setupUI$$$() {\r\n final JPanel panel1 = new JPanel();\r\n panel1.setLayout(new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel = new JPanel();\r\n mMainPanel.setLayout(new GridLayoutManager(15, 3, new Insets(0, 0, 0, 0), -1, -1));\r\n panel1.add(mMainPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n label = new JLabel();\r\n Font labelFont = this.$$$getFont$$$(null, -1, 28, label.getFont());\r\n if (labelFont != null) label.setFont(labelFont);\r\n label.setText(\"CodeRecommender\");\r\n mMainPanel.add(label, new GridConstraints(0, 0, 2, 1, GridConstraints.ANCHOR_NORTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer1 = new Spacer();\r\n mMainPanel.add(spacer1, new GridConstraints(5, 2, 1, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_NONE, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final JPanel panel2 = new JPanel();\r\n panel2.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel.add(panel2, new GridConstraints(4, 0, 6, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel3 = new JPanel();\r\n panel3.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel2.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n statement = new JTextArea();\r\n statement.setBackground(new Color(-12434103));\r\n statement.setColumns(0);\r\n statement.setEditable(false);\r\n statement.setEnabled(true);\r\n Font statementFont = this.$$$getFont$$$(\"Arial\", Font.PLAIN, 15, statement.getFont());\r\n if (statementFont != null) statement.setFont(statementFont);\r\n statement.setText(\" In the current ai craze, we want to use neural network-related technology to grab a large amount of source code from the open source community to achieve the recommendation of the N+1 line of code from the known N lines of code, and package this function into a practical plug-in on the IDE.\");\r\n panel3.add(statement, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, 70), null, 1, false));\r\n final JPanel panel4 = new JPanel();\r\n panel4.setLayout(new GridLayoutManager(12, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.setBackground(new Color(-12828863));\r\n panel3.add(panel4, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n Download = new JButton();\r\n Font DownloadFont = this.$$$getFont$$$(null, -1, 12, Download.getFont());\r\n if (DownloadFont != null) Download.setFont(DownloadFont);\r\n Download.setText(\"Find\");\r\n panel4.add(Download, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel5 = new JPanel();\r\n panel5.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel5, new GridConstraints(11, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JLabel label1 = new JLabel();\r\n label1.setText(\"See the guide on the https://github.com/huangjihui511/java-code-recommand-IDEA-plugin \");\r\n panel5.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer2 = new Spacer();\r\n panel5.add(spacer2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\r\n pathTextField = new JTextField();\r\n pathTextField.setEditable(false);\r\n Font pathTextFieldFont = this.$$$getFont$$$(\"Arial\", Font.PLAIN, 12, pathTextField.getFont());\r\n if (pathTextFieldFont != null) pathTextField.setFont(pathTextFieldFont);\r\n pathTextField.setText(\"/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 \");\r\n panel4.add(pathTextField, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\r\n SetPath = new JButton();\r\n Font SetPathFont = this.$$$getFont$$$(null, -1, 12, SetPath.getFont());\r\n if (SetPathFont != null) SetPath.setFont(SetPathFont);\r\n SetPath.setText(\"Set\");\r\n panel4.add(SetPath, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n Help = new JButton();\r\n Help.setText(\"Help\");\r\n panel4.add(Help, new GridConstraints(11, 1, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel6 = new JPanel();\r\n panel6.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel6.setFocusTraversalPolicyProvider(false);\r\n panel6.setFocusable(false);\r\n panel4.add(panel6, new GridConstraints(10, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel7 = new JPanel();\r\n panel7.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel7, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JLabel label2 = new JLabel();\r\n label2.setIcon(new ImageIcon(getClass().getResource(\"/timg (1) - 副本.jpg\")));\r\n label2.setText(\"\");\r\n panel7.add(label2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JLabel label3 = new JLabel();\r\n label3.setIcon(new ImageIcon(getClass().getResource(\"/微信图片_20190328224952 (2) - 副本.jpg\")));\r\n label3.setText(\"\");\r\n panel7.add(label3, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel8 = new JPanel();\r\n panel8.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel7.add(panel8, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel9 = new JPanel();\r\n panel9.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel9, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n webaddressTextField = new JTextField();\r\n webaddressTextField.setEditable(false);\r\n Font webaddressTextFieldFont = this.$$$getFont$$$(\"Arial\", Font.PLAIN, 12, webaddressTextField.getFont());\r\n if (webaddressTextFieldFont != null) webaddressTextField.setFont(webaddressTextFieldFont);\r\n webaddressTextField.setText(\"/Volumes/PythonSupporting\");\r\n panel4.add(webaddressTextField, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\r\n final JPanel panel10 = new JPanel();\r\n panel10.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel10, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JLabel label4 = new JLabel();\r\n Font label4Font = this.$$$getFont$$$(\"Consolas\", Font.BOLD, 14, label4.getFont());\r\n if (label4Font != null) label4.setFont(label4Font);\r\n label4.setText(\"Find the package\");\r\n panel10.add(label4, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer3 = new Spacer();\r\n panel10.add(spacer3, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\r\n final JPanel panel11 = new JPanel();\r\n panel11.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel11.setToolTipText(\"\");\r\n panel4.add(panel11, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JLabel label5 = new JLabel();\r\n Font label5Font = this.$$$getFont$$$(\"Consolas\", Font.BOLD, 14, label5.getFont());\r\n if (label5Font != null) label5.setFont(label5Font);\r\n label5.setText(\"Set the path\");\r\n panel11.add(label5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer4 = new Spacer();\r\n panel11.add(spacer4, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\r\n final JPanel panel12 = new JPanel();\r\n panel12.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel12, new GridConstraints(9, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel13 = new JPanel();\r\n panel13.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel13, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel14 = new JPanel();\r\n panel14.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel14, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel15 = new JPanel();\r\n panel15.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel15, new GridConstraints(8, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n pic = new JPanel();\r\n pic.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n pic.putClientProperty(\"html.disable\", Boolean.FALSE);\r\n panel3.add(pic, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n a = new JLabel();\r\n a.setText(\"\");\r\n pic.add(a, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel16 = new JPanel();\r\n panel16.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n pic.add(panel16, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel17 = new JPanel();\r\n panel17.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n pic.add(panel17, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel18 = new JPanel();\r\n panel18.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel2.add(panel18, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final Spacer spacer5 = new Spacer();\r\n mMainPanel.add(spacer5, new GridConstraints(5, 1, 10, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_NONE, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final JPanel panel19 = new JPanel();\r\n panel19.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel.add(panel19, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel20 = new JPanel();\r\n panel20.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel.add(panel20, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final Spacer spacer6 = new Spacer();\r\n panel1.add(spacer6, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final Spacer spacer7 = new Spacer();\r\n panel1.add(spacer7, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final Spacer spacer8 = new Spacer();\r\n panel1.add(spacer8, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n }",
"private void initialize() {\n\n\t\tGridLayout gridLayout = new GridLayout();\n\t\tgridLayout.setRows(1);\n\t\t\n\t\tGridBagLayout gridbag = new GridBagLayout();\n\t\tbase=new JPanel(gridbag);\n\t\tbase.setBackground(new Color(250,251,245));\n\t\t// default size\n\t\tbase.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\n\t\t//base.setPreferredSize(new Dimension(200,320));\n\t\t\n\t\t/*\n\t\t// separator\n\t\tGridBagConstraints constraints1 = new GridBagConstraints();\n\t\tconstraints1.gridx = 0;\n\t\tconstraints1.gridy = 0;\n\t\tconstraints1.gridwidth= 1;\n\t\tconstraints1.gridheight = 1;\n\t\tconstraints1.insets = new Insets(0, 0, 0, 0);\n\n\t\tJSeparator vspr=new JSeparator(JSeparator.HORIZONTAL);\n\t\tvspr.setPreferredSize(new Dimension(200, 20));\n\t\tgridbag.setConstraints(vspr, constraints1);\n\t\tbase.add(vspr);\n\t\t*/\n\t\t\n\t\t// panel1\n\t\tString st = Path.getPath()+\"/images//program_h6_bg_illuminance.gif\";\n\t\tif(IsMacorWin.isMacOrWin()==false) st = Path.getPath()+\"images\\\\/program_h6_bg_illuminance.gif\";\n\n\t\tgJPanel = new GJPanel(st);\n\t\tgJPanel.setText(\"LEDライト\");\n\n\t\tGridBagConstraints constraints1 = new GridBagConstraints();\n\t\tconstraints1.gridx = 0;\n\t\tconstraints1.gridy = 1;\n\t\tconstraints1.gridwidth= 1;\n\t\tconstraints1.gridheight = 1;\n\t\tconstraints1.insets = new Insets(0, 0, 0, 0);\n\t\tgridbag.setConstraints(gJPanel, constraints1);\n\t\tbase.add(gJPanel);\n\t\t\n\t\t\n\t\t// panel\n\t\tJPanel jp1=new JPanel();\n\t\tjp1.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\n\t\tjp1.setLayout(gridLayout);\n//\t\tjp1.setPreferredSize(new Dimension(gJPanel.getWidth(),gJPanel.getHeight()));\n\t\tjp1.setPreferredSize(new Dimension(160,50));\n\t\tjp1.setBackground(Color.gray);\n\t\n//\n\t\tifD1=new InfoDispEdit();\n\t\tifD1.setText(\"警告下限照度\");\n\t\t// lux\n\t\tString[] illumdata=new String[50];\n\t\tfor(int i=0;i<50;i++){\n\t\t\tillumdata[i]= String.valueOf(i*100);\n\t\t}\n\t\tifD1.setSelectionItems(illumdata);\n\t\tifD1.setSelectedIndex(22);// 2500 lux\n\t\tifD1.setUnit(\"lux\");\n\t\t//\n\t\tGridBagConstraints constraints2 = new GridBagConstraints();\n\t\tconstraints2.gridy = 0;\t\n\t\tconstraints2.gridy = 2;\t\n\t\tconstraints2.gridwidth= 1;\n\t\tconstraints2.gridheight = 1;\n\t\tconstraints2.insets = new Insets(0, 0, 0, 0);\n\t\tgridbag.setConstraints(ifD1, constraints2);\n\t\t\n\t\tif(Version.getRevision().equals(\"Education\")!=true)\n\t\t\tbase.add(ifD1);\n\n\t\tsetParentClass(this);\n\t\tthis.setLayout(new BorderLayout());\n\t\tthis.add( base, BorderLayout.CENTER );\n\n\t\t// 観察される人を生成\n\t\tobservableMan = new ObservableMan();\n\n\t\t// デフォルトの観察者を追加\n\t\tdefaultO=new PlantPrgEdit.ObserverA();\n\t\tobservableMan.addObserver(defaultO);\n\t}",
"private void setPanel()\r\n\t{\r\n\t\tpanel = new JPanel();\r\n\t\tpanel.setLayout(new GridLayout(5, 2));\r\n\t\t\r\n\t\tpanel.add(bubbleL);\r\n\t\tpanel.add(bubblePB);\r\n\t\t\r\n\t\tpanel.add(insertionL);\r\n\t\tpanel.add(insertionPB);\r\n\t\t\r\n\t\tpanel.add(mergeL);\r\n\t\tpanel.add(mergePB);\r\n\t\t\r\n\t\tpanel.add(quickL);\r\n\t\tpanel.add(quickPB);\r\n\t\t\r\n\t\tpanel.add(radixL);\r\n\t\tpanel.add(radixPB);\r\n\t}",
"private HorizontalLayout buildMainLayout() {\n\t\tmainLayout = new HorizontalLayout();\r\n\t\tmainLayout.setImmediate(false);\r\n\t\tmainLayout.setWidth(\"100%\");\r\n\t\tmainLayout.setHeight(\"-1px\");\r\n\t\tmainLayout.setMargin(true);\r\n\t\tmainLayout.setSpacing(true);\r\n\t\t\r\n\t\t// top-level component properties\r\n\t\tsetWidth(\"100%\");\r\n\t\tsetHeight(\"100%\");\r\n\t\t\r\n\t\t// panelImg\r\n\t\tpanelImg = buildPanelImg();\r\n\t\tmainLayout.addComponent(panelImg);\r\n\t\t\r\n\t\t// gridInfo\r\n\t\tgridInfo = buildGridInfo();\r\n\t\tmainLayout.addComponent(gridInfo);\r\n\t\t\r\n\t\treturn mainLayout;\r\n\t}",
"private void createGraphics() {\n\t\toppStatGrid = new GridPane();\n\t\toppStatGrid.setHgap(5);\n\t\tColumnConstraints columnOpp1 = new ColumnConstraints();\n\t\tcolumnOpp1.setMinWidth(gameScene.getWidth()*0.3);\n\t\t//column1.setPrefWidth(gameScene.getWidth()*0.3);\n\t\tColumnConstraints columnOpp2 = new ColumnConstraints();\n\t\tcolumnOpp2.setMinWidth(gameScene.getWidth()*0.3);\n\t\toppStatGrid.getColumnConstraints().addAll(columnOpp1,columnOpp2);\n\t\tRowConstraints rowOpp = new RowConstraints();\n\t\trowOpp.setMinHeight(gameScene.getHeight()*0.1);\n\t\toppStatGrid.getRowConstraints().add(rowOpp);\n\t\toppStatGrid.getRowConstraints().add(rowOpp);\n\n\t\tlocStatGrid = new GridPane();\n\t\tlocStatGrid.setHgap(5);\n\t\tColumnConstraints columnLoc1 = new ColumnConstraints();\n\t\tcolumnLoc1.setMinWidth(gameScene.getWidth()*0.1);\n\t\t//column1.setPrefWidth(gameScene.getWidth()*0.3);\n\t\tColumnConstraints columnLoc2 = new ColumnConstraints();\n\t\tcolumnLoc2.setMinWidth(gameScene.getWidth()*0.3);\n\t\tlocStatGrid.getColumnConstraints().addAll(columnLoc1,columnLoc2);\n\t\tRowConstraints rowLoc2 = new RowConstraints();\n\t\trowLoc2.setMinHeight(gameScene.getHeight()*0.1);\n\t\tlocStatGrid.getRowConstraints().add(rowLoc2);\n\t\tlocStatGrid.getRowConstraints().add(rowLoc2);\n\n\t\topponentName.setFont(Font.font(defaultFont, FontWeight.BOLD, 16));\n\t\tlocalName.setFont(Font.font(defaultFont, FontWeight.BOLD, 16));\n\t\topponentLevel.setFont(Font.font(defaultFont, 14));\n\t\tlocalLevel.setFont(Font.font(defaultFont, 14));\n\t\topponentHealth.setFont(Font.font(defaultFont, 14));\n\t\tlocalHealth.setFont(Font.font(defaultFont, 14));\n\n\t\topponentName.setAlignment(Pos.CENTER_LEFT);\n\t\tGridPane.setHalignment(localName, HPos.RIGHT);\n\t\topponentLevel.setAlignment(Pos.CENTER_RIGHT);\n\t\tlocalLevel.setAlignment(Pos.CENTER_LEFT);\n\t\tGridPane.setHalignment(localLevel, HPos.RIGHT);\n\t\topponentHealth.setAlignment(Pos.CENTER_RIGHT);\n\t\tlocalHealth.setAlignment(Pos.CENTER_LEFT);\n\t\tGridPane.setHalignment(localHealth, HPos.RIGHT);\n\n\t\topponentHealthBar = new Rectangle();\n\t\tlocalHealthBar = new Rectangle();\n\t\topponentHealthBar.setWidth(gameScene.getWidth()*0.3);\n\t\tlocalHealthBar.setWidth(gameScene.getWidth()*0.3);\n\t\topponentHealthBar.setHeight(gameScene.getHeight()*0.1);\n\t\tlocalHealthBar.setHeight(gameScene.getHeight()*0.1);\n\t\topponentHealthBar.setArcWidth(5);\n\t\topponentHealthBar.setArcHeight(5);\n\t\tlocalHealthBar.setArcWidth(5);\n\t\tlocalHealthBar.setArcHeight(5);\n\t\t/*NumberBinding oppHealthBind = gameScene.property\n\t\topponentHealthBar.prop*/\n\n\t\topponentHealthBar.setEffect(new Lighting());\n\t\tlocalHealthBar.setEffect(new Lighting());\n\n\t\topponentHealthBar.setFill(Color.DARKRED);\n\t\tlocalHealthBar.setFill(Color.DARKRED);\n\n\t\toppStatGrid.add(opponentName, 0, 0);\n\t\toppStatGrid.add(opponentLevel, 1, 0);\n\t\toppStatGrid.add(opponentHealthBar, 0, 1);\n\t\toppStatGrid.add(opponentHealth, 1, 1);\n\n\t\tlocStatGrid.add(localLevel, 0, 0);\n\t\tlocStatGrid.add(localName, 1, 0);\n\t\tlocStatGrid.add(localHealthBar, 1, 1);\n\t\tlocStatGrid.add(localHealth, 0, 1);\n\n\t\tAnchorPane.setTopAnchor(oppStatGrid, 10.0);\n\t\tAnchorPane.setLeftAnchor(oppStatGrid, 10.0);\n\n\t\tAnchorPane.setBottomAnchor(locStatGrid, 10.0);\n\t\tAnchorPane.setRightAnchor(locStatGrid, 10.0);\n\n\t\tthis.getChildren().addAll(oppStatGrid,locStatGrid);\n\t\t\n\t\toppPane = new Pane();\n\t\toppPane.setMinWidth(gameScene.getWidth()*0.5);\n\t\toppPane.setMinHeight(gameScene.getHeight()*0.5);\n\t\t\n\t\tlocPane = new Pane();\n\t\tlocPane.setMinWidth(gameScene.getWidth()*0.5);\n\t\tlocPane.setMinHeight(gameScene.getHeight()*0.5);\n\t\t\n\t\tAnchorPane.setBottomAnchor(locPane, 10.0);\n\t\tAnchorPane.setLeftAnchor(locPane, 10.0);\n\t\t\n\t\tAnchorPane.setTopAnchor(oppPane, 10.0);\n\t\tAnchorPane.setRightAnchor(oppPane, 10.0);\n\t\t\n\t\tthis.getChildren().addAll(locPane,oppPane);\n\t\t\n\n\t}",
"@AutoGenerated\r\n\tprivate VerticalLayout buildVerticalLayout_4() {\n\t\tverticalLayout_4 = new VerticalLayout();\r\n\t\tverticalLayout_4.setWidth(\"100.0%\");\r\n\t\tverticalLayout_4.setHeight(\"100.0%\");\r\n\t\tverticalLayout_4.setImmediate(false);\r\n\t\tverticalLayout_4.setMargin(false);\r\n\t\t\r\n\t\t// gridLayout_5\r\n\t\tgridLayout_5 = buildGridLayout_5();\r\n\t\tverticalLayout_4.addComponent(gridLayout_5);\r\n\t\t\r\n\t\treturn verticalLayout_4;\r\n\t}",
"@AutoGenerated\r\n\tprivate GridLayout buildGridLayout_4() {\n\t\tgridLayout_4 = new GridLayout();\r\n\t\tgridLayout_4.setWidth(\"100.0%\");\r\n\t\tgridLayout_4.setHeight(\"100.0%\");\r\n\t\tgridLayout_4.setImmediate(false);\r\n\t\tgridLayout_4.setMargin(false);\r\n\t\tgridLayout_4.setSpacing(true);\r\n\t\tgridLayout_4.setColumns(5);\r\n\t\tgridLayout_4.setRows(7);\r\n\t\t\r\n\t\t// frmtLbl\r\n\t\tfrmtLbl = new Label();\r\n\t\tfrmtLbl.setWidth(\"-1px\");\r\n\t\tfrmtLbl.setHeight(\"-1px\");\r\n\t\tfrmtLbl.setValue(\"Format\");\r\n\t\tfrmtLbl.setImmediate(false);\r\n\t\tgridLayout_4.addComponent(frmtLbl, 0, 1);\r\n\t\t\r\n\t\t// slctFrmt\r\n\t\tslctFrmt = new NativeSelect();\r\n\t\tslctFrmt.setWidth(\"-1px\");\r\n\t\tslctFrmt.setHeight(\"-1px\");\r\n\t\tslctFrmt.setImmediate(false);\r\n\t\tslctFrmt.addItem(\"mp4\");\r\n\t\tslctFrmt.addItem(\"avi\");\r\n\t\tslctFrmt.addItem(\"mov\");\r\n\t\tslctFrmt.addItem(\"flv\");\r\n\t\tslctFrmt.setValue(\"mp4\"); //set default video format\r\n\t\tgridLayout_4.addComponent(slctFrmt, 1, 1);\r\n\t\t\r\n\t\t// cdcLbl\r\n\t\tcdcLbl = new Label();\r\n\t\tcdcLbl.setWidth(\"-1px\");\r\n\t\tcdcLbl.setHeight(\"-1px\");\r\n\t\tcdcLbl.setValue(\"Codec\");\r\n\t\tcdcLbl.setImmediate(false);\r\n\t\tgridLayout_4.addComponent(cdcLbl, 0, 2);\r\n\t\t\r\n\t\t// slctCdc\r\n\t\tslctCdc = new NativeSelect();\r\n\t\tslctCdc.setWidth(\"-1px\");\r\n\t\tslctCdc.setHeight(\"-1px\");\r\n\t\tslctCdc.setImmediate(false);\r\n\t\tgridLayout_4.addComponent(slctCdc, 1, 2);\r\n\t\t\r\n\t\treturn gridLayout_4;\r\n\t}",
"private void $$$setupUI$$$() {\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n }",
"public Grid() {\n super(); // create a new JPanel\n grid = new ArrayList<>(); // initialize a list containing the blocks\n \n setLayout(null); // format the component\n setFocusable(false);\n setBackground(Block.deadColor);\n addComponentListener(new java.awt.event.ComponentAdapter() { // detects when the window is resized to resize the grid\n @Override\n public void componentResized(java.awt.event.ComponentEvent evt) {\n resizeGrid();\n }\n });\n \n // provide a link to the grid to classes so that all instances have access to it\n PathFinder.setGrid(this);\n EscapeBlock.setGrid(this);\n Character.setGrid(this);\n \n }",
"public GridBagConstraints createGridConstraints(int top, int left, int bottom, int right, int L) {\n\t\tGridBagConstraints gbc= new GridBagConstraints();\n\t\tgbc.weightx = 1;\n\t\tgbc.weighty = 1;\n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = 0;\n\t\tgbc.insets = new Insets(top,left, bottom,right);\n\t\tgbc.anchor = L;\n\t\treturn gbc;\n\t}",
"private void createComponents() {\n view = new JPanel(new GridBagLayout());\n\n GridBagConstraints constraints = new GridBagConstraints();\n constraints.gridx = 0;\n constraints.gridy = 0;\n constraints.weightx = 1;\n constraints.weighty = 1;\n constraints.fill = GridBagConstraints.BOTH;\n\n view.add(new JPanel(), constraints);\n\n constraints.gridy = 1;\n view.add(new JPanel(), constraints);\n\n constraints.gridx = 1;\n constraints.weighty = 4;\n constraints.weightx = 6;\n view.add(renderMain(), constraints);\n\n constraints.gridx = 2;\n constraints.weightx = 1;\n constraints.weighty = 1;\n view.add(new JPanel(), constraints);\n\n constraints.gridx = 0;\n constraints.gridy = 2;\n view.add(renderBottom(), constraints);\n\n registerEvents();\n }",
"private void initialize() {\r\n\t\tframe = new JFrame(\"New Room\");\r\n\t\tframe.setResizable(false);\r\n\t\tframe.setBounds(100, 100, 450, 178);\r\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tframe.getContentPane().add(panel, BorderLayout.CENTER);\r\n\t\tGridBagLayout gbl_panel = new GridBagLayout();\r\n\t\tgbl_panel.columnWidths = new int[]{0, 0, 104, 0, 0};\r\n\t\tgbl_panel.rowHeights = new int[]{0, 0, 0, 0, 0};\r\n\t\tgbl_panel.columnWeights = new double[]{0.0, 0.0, 1.0, 0.0, Double.MIN_VALUE};\r\n\t\tgbl_panel.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};\r\n\t\tpanel.setLayout(gbl_panel);\r\n\t\t\r\n\t\tComponent verticalStrut = Box.createVerticalStrut(20);\r\n\t\tGridBagConstraints gbc_verticalStrut = new GridBagConstraints();\r\n\t\tgbc_verticalStrut.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_verticalStrut.gridx = 2;\r\n\t\tgbc_verticalStrut.gridy = 0;\r\n\t\tpanel.add(verticalStrut, gbc_verticalStrut);\r\n\t\t\r\n\t\tComponent horizontalStrut_1 = Box.createHorizontalStrut(20);\r\n\t\tGridBagConstraints gbc_horizontalStrut_1 = new GridBagConstraints();\r\n\t\tgbc_horizontalStrut_1.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_horizontalStrut_1.gridx = 0;\r\n\t\tgbc_horizontalStrut_1.gridy = 1;\r\n\t\tpanel.add(horizontalStrut_1, gbc_horizontalStrut_1);\r\n\t\t\r\n\t\tJLabel lblRoomName = new JLabel(\"Room Name: \");\r\n\t\tGridBagConstraints gbc_lblRoomName = new GridBagConstraints();\r\n\t\tgbc_lblRoomName.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_lblRoomName.anchor = GridBagConstraints.EAST;\r\n\t\tgbc_lblRoomName.gridx = 1;\r\n\t\tgbc_lblRoomName.gridy = 1;\r\n\t\tpanel.add(lblRoomName, gbc_lblRoomName);\r\n\t\t\r\n\t\ttextField = new JTextField();\r\n\t\tGridBagConstraints gbc_textField = new GridBagConstraints();\r\n\t\tgbc_textField.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_textField.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgbc_textField.gridx = 2;\r\n\t\tgbc_textField.gridy = 1;\r\n\t\tpanel.add(textField, gbc_textField);\r\n\t\ttextField.setColumns(10);\r\n\t\t\r\n\t\tComponent horizontalStrut = Box.createHorizontalStrut(20);\r\n\t\tGridBagConstraints gbc_horizontalStrut = new GridBagConstraints();\r\n\t\tgbc_horizontalStrut.insets = new Insets(0, 0, 5, 0);\r\n\t\tgbc_horizontalStrut.gridx = 3;\r\n\t\tgbc_horizontalStrut.gridy = 1;\r\n\t\tpanel.add(horizontalStrut, gbc_horizontalStrut);\r\n\t\t\r\n\t\tComponent verticalStrut_1 = Box.createVerticalStrut(20);\r\n\t\tGridBagConstraints gbc_verticalStrut_1 = new GridBagConstraints();\r\n\t\tgbc_verticalStrut_1.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_verticalStrut_1.gridx = 2;\r\n\t\tgbc_verticalStrut_1.gridy = 2;\r\n\t\tpanel.add(verticalStrut_1, gbc_verticalStrut_1);\r\n\t\t\r\n\t\tJButton btnCreate = new JButton(\"Create\");\r\n\t\tGridBagConstraints gbc_btnCreate = new GridBagConstraints();\r\n\t\tgbc_btnCreate.anchor = GridBagConstraints.WEST;\r\n\t\tgbc_btnCreate.insets = new Insets(0, 0, 0, 5);\r\n\t\tgbc_btnCreate.gridx = 2;\r\n\t\tgbc_btnCreate.gridy = 3;\r\n\t\tpanel.add(btnCreate, gbc_btnCreate);\r\n\t}",
"public JPanel createPanel() {\n\t\t\r\n\t\tJPanel mainPanel = new JPanel();\r\n\t\tmainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));\r\n\t\tmainPanel.setBackground(Color.WHITE);\r\n\t\tmainPanel.setBorder(new CompoundBorder(\r\n\t\t\t\tBorderFactory.createLineBorder(new Color(0x3B70A3), 4),\r\n\t\t\t\tnew EmptyBorder(10, 20, 10, 20)));\r\n\r\n\t\t/*\r\n\t\t * Instruction\r\n\t\t */\t\r\n\t\tmainPanel.add(instructionPanel());\r\n\t\t\r\n\t\t\r\n\t\t// TODO: set task order for each group - make first 3 tasks = groups tasks\r\n\t\tmainPanel.add(messagesPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(phonePanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(clockPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(cameraPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\t\r\n\r\n\t\tmainPanel.add(contactPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(galleryPanel());\r\n\t\t\r\n\t\treturn mainPanel;\r\n\t}",
"private void InitilizeGridLayout() {\n Resources r = getResources();\n float padding = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,\n Const.GRID_PADDING, r.getDisplayMetrics());\n\n // Column width\n columnWidth = (int) ((getScreenWidth() - ((4) * padding)) / 2);\n\n // Setting number of grid columns\n mGridView.setNumColumns(2);\n mGridView.setColumnWidth(columnWidth);\n mGridView.setStretchMode(GridView.NO_STRETCH);\n mGridView.setPadding((int) padding, (int) padding, (int) padding,\n (int) padding);\n\n // Setting horizontal and vertical padding\n mGridView.setHorizontalSpacing((int) padding);\n mGridView.setVerticalSpacing((int) padding);\n }",
"GridBagLayoutCalc(){\n\n windowContent = new JPanel();\n\n // Set the layout manager for this panel\n GridBagLayout gblwc = new GridBagLayout();\n windowContent.setLayout(gblwc);\n\n\n // Create the display field and place it in the\n // North area of the window\n\n displayField = new JTextField(20);\n gblwc.setConstraints(displayField, constr);\n windowContent.add(\"0\",displayField);\n \n\n // Create buttons using constructor of the\n // class JButton that takes the label of the\n // button as a parameter\n\n JButton[] numbers = new JButton[10];\n JButton[] equals = new JButton[1];\n JButton[] controllers = new JButton[4];\n\n String[] numbers_name = {\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"0\"};\n String[] equals_name = {\"=\"};\n String[] controllers_name = {\"+\", \"-\", \"*\", \"/\"};\n\n // Create the panel with the GridBagLayout with 15 buttons\n //10 numeric ones, 4 controllers, and the equal sign\n\n p1 = new JPanel();\n GridBagLayout gbl =new GridBagLayout();\n p1.setLayout(gbl);\n\n // Add window controls to the panel p1\n panelMaker(numbers, numbers_name, p1, Color.BLUE);\n panelMaker(equals, equals_name, p1, Color.BLACK);\n panelMaker(controllers, controllers_name, p1, Color.BLACK);\n\n }",
"private void setViewLayout() {\n\t\tthis.setBorder(new EmptyBorder(15, 15, 15, 15));\n\t\tthis.setLayout(new GridLayout(2, 2, 15, 15));\n\t}",
"public MazeSettingsPanel(MazeSettings settings){\r\n \tsuper();\r\n \tthis.settings=settings;\r\n \tthis.layout = new GridLayout(0,2);\r\n \tthis.layout.setVgap(10);\r\n \tthis.setLayout(this.layout);\r\n \r\n \tpadding = BorderFactory.createEmptyBorder(20,20,15,10);\r\n \tthis.setBorder(padding);\r\n \r\n \tinitFields();\r\n \tupdateFieldValues();\r\n }",
"protected void makeContent() {\n\n \t// panel for main control and setup\n\tGridBagLayout setGridBag = new GridBagLayout();\n\tmainPanel.setLayout(setGridBag);\n\n\tInsets sepInsets = new Insets(5, 0, 5, 0);\n\tInsets nullInsets = new Insets(0, 0, 0, 0);\n\tInsets defaultInsets = new Insets(5,5,5,5);\n\t\n\tint sumy = 0;\n\tGridBagConstraints gbc = new GridBagConstraints();\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 0.; gbc.weighty = 0.;\n\tgbc.gridx = 0; gbc.gridy = sumy++;\n\tgbc.insets = new Insets(10, 5, 10,5);\n\tgbc.gridwidth = 3;\n\tsetGridBag.setConstraints(sequenceLabel, gbc);\n\tmainPanel.add(sequenceLabel);\n\n\tgbc.fill = GridBagConstraints.HORIZONTAL;\n\tgbc.insets = sepInsets;\n\tgbc.weightx = 1.;\n\tgbc.gridx = 0; gbc.gridy = sumy++;\n\tJSeparator sep1 = new JSeparator(SwingConstants.HORIZONTAL);\n\tsetGridBag.setConstraints(sep1, gbc);\n\tmainPanel.add(sep1);\n\tsep1.setVisible(true);\n\t\n\tJLabel typeLabel = new JLabel(\"Device Type\");\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 0; gbc.gridy = sumy;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(typeLabel, gbc);\n\tmainPanel.add(typeLabel);\n\t\n\tJLabel pvLabel = new JLabel(\"PV Choice\");\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 1; gbc.gridy = sumy;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(pvLabel, gbc);\n\tmainPanel.add(pvLabel);\n\t\n\tJLabel actionLabel = new JLabel(\"Action Choice\");\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 2; gbc.gridy = sumy++;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(actionLabel, gbc);\n\tmainPanel.add(actionLabel);\t\n\t\n\ttypeList.setListData(nullDevices);\n\ttypeList.setVisibleRowCount(6);\n\ttypeList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\t\n\tJScrollPane typeScrollPane = new JScrollPane(typeList);\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 0; gbc.gridy = sumy;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(typeScrollPane, gbc);\n\tmainPanel.add(typeScrollPane);\n\ttypeList.addMouseListener(new MouseAdapter() {\n public void mouseClicked(MouseEvent evt) {\n theDoc.typeSelected();\n }\n\t});\t\n\t\n\tsignalList.setListData(nullSignals);\n\tsignalList.setVisibleRowCount(6);\n\tsignalList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\t\t\n\tJScrollPane signalScrollPane = new JScrollPane(signalList);\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 1; gbc.gridy = sumy;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(signalScrollPane, gbc);\n\tmainPanel.add(signalScrollPane);\n\tsignalList.addMouseListener(new MouseAdapter() {\n public void mouseClicked(MouseEvent evt) {\n theDoc.signalSelected();\n }\n\t});\t\n\t\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 2; gbc.gridy = sumy++;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(actionChoice, gbc);\n\tmainPanel.add(actionChoice);\n\n\tgbc.fill = GridBagConstraints.HORIZONTAL;\n\tgbc.insets = sepInsets;\n\tgbc.gridwidth = 3;\tgbc.weightx = 1.;\n\tgbc.gridx = 0; gbc.gridy = sumy++;\n\tJSeparator sep2 = new JSeparator(SwingConstants.HORIZONTAL);\n\tsetGridBag.setConstraints(sep2, gbc);\n\tmainPanel.add(sep2);\n\tsep2.setVisible(true);\n\t\n\tJLabel setValueLabel = new JLabel(\"Set Value\");\n\tgbc.gridwidth = 1;\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 0; gbc.gridy = sumy;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(setValueLabel, gbc);\n\tmainPanel.add(setValueLabel);\n\n\tJLabel selectValueLabel = new JLabel(\"Select Value\");\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 1; gbc.gridy = sumy++;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(selectValueLabel, gbc);\n\tmainPanel.add(selectValueLabel);\n\t\n\tvalueField = new DoubleInputTextField( (new Double(theDoc.newSetValue)).toString());\n\tvalueField.setNumberFormat(new DecimalFormat(\"####.#####\"));\n\tvalueField.setEnabled(false);\n\tvalueField.setPreferredSize(new Dimension(80, 20));\n\tgbc.weightx = 1.; gbc.weighty = 1.;\t\n\tgbc.gridx = 0; gbc.gridy = sumy;\n\tvalueField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n theDoc.newSetValue= valueField.getValue();\n }\n\t});\t\t\n\tsetGridBag.setConstraints(valueField, gbc);\n\tmainPanel.add(valueField);\n\n\tvalueList = new JList<String>(nullValues);\n\tvalueList.setEnabled(false);\n\tgbc.weightx = 1.; gbc.weighty = 1.;\t\n\tgbc.gridx = 1; gbc.gridy = sumy++;\n\tvalueList.addMouseListener(new MouseAdapter() {\n public void mouseClicked(MouseEvent evt) {\n theDoc.newSetValueString = valueList.getSelectedValue();\n }\n\t});\t\t\n\tsetGridBag.setConstraints(valueList, gbc);\n\tmainPanel.add(valueList);\n\t\n\tJSeparator sep3 = new JSeparator(SwingConstants.HORIZONTAL);\n\tgbc.fill = GridBagConstraints.HORIZONTAL;\n\tgbc.insets = sepInsets;\n\tgbc.gridwidth = 3;\tgbc.weightx = 1.;\n\tgbc.gridx = 0; gbc.gridy = sumy++;\n\tsetGridBag.setConstraints(sep2, gbc);\n\tmainPanel.add(sep3);\n\tsep3.setVisible(true);\n\t\n\tJButton confirmButton = new JButton(\"Confirm\");\n\tconfirmButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n theDoc.confirmIt();\t\t\n }\n\t});\t\t\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 0.; gbc.weighty = 0.;\n\tgbc.gridx = 0; gbc.gridy = sumy;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(confirmButton, gbc);\n\tmainPanel.add(confirmButton);\n\t\n\t\n\ttextArea = new JTextArea(\"\");\n\tJScrollPane textScrollPane = new JScrollPane(textArea);\n\ttextScrollPane.setVerticalScrollBarPolicy(\n JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n textScrollPane.setPreferredSize(new Dimension(100, 150));\n textScrollPane.setMinimumSize(new Dimension(10, 10));\t\n\tgbc.insets = nullInsets;\n\tgbc.fill = GridBagConstraints.BOTH;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridwidth = 2; gbc.gridheight = 2;\t\n\tgbc.gridx = 1; gbc.gridy = sumy++;\n\tsetGridBag.setConstraints(textScrollPane, gbc);\n\tmainPanel.add(textScrollPane);\t\t\n\t// The analysis plot panel:\t\n\t\n\tJButton doItButton = new JButton(\"Set'em\");\n\tdoItButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n theDoc.fireSignals();\t\t\n }\n\t});\t\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 0.; gbc.weighty = 0.;\n\tgbc.gridx = 0; gbc.gridy = sumy;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(doItButton, gbc);\n\tmainPanel.add(doItButton);\t\n\t\n\t// the type selection list:\n\t\n\t//\tcontainer.add(mainTabbedPane,BorderLayout.CENTER);\n\t//container.add(errorText,BorderLayout.SOUTH);\n\n }",
"public static Layout createVerticalFlowLayout() {\n\t\treturn createVerticalFlowLayout(null, 0);\n\t}",
"private void createSwitchSpace() {\n\t\t// create constraints for switchPanel layout (required)\n\t\tGridBagConstraints constraints = new GridBagConstraints();\n\t\t\n\t\t// display the image icon for the box as empty or not depending on whether the player has already found the paper\n\t\tif (boxOpen && eventsMain.getEventsLogic().getPaperFound()) {\n\t\t\tboxImage.setIcon(switchIconEmpty);\n\t\t} else if (boxOpen && !eventsMain.getEventsLogic().getPaperFound()) {\n\t\t\tboxImage.setIcon(switchIconOpen);\n\t\t} else if (!boxOpen) {\n\t\t\tboxImage.setIcon(switchIconClosed);\n\t\t}\n\t\t\n\t\t// display the image icon as on or off depending on its current state before being clicked again\n\t\tif (eventsMain.getEventsLogic().getSwitchSetting()) {\n\t\t\tswitchImage.setIcon(switchIconOn);\n\t\t} else {\n\t\t\tswitchImage.setIcon(switchIconOff);\n\t\t}\n\t\t\n\t\t// add listeners to the container\n\t\tswitchImage.addMouseListener(eventsMain);\n\t\tboxImage.addMouseListener(eventsMain);\n\t\tboxImage.addMouseMotionListener(eventsMain);\n\t\t\n\t\t// add each image to the container\n\t\tconstraints.gridy = 0;\n\t\tswitchPanel.add(boxImage, constraints);\n\t\t\n\t\tconstraints.gridy = 1;\n\t\tswitchPanel.add(switchImage, constraints);\n\t\t\n\t\tswitchPanel.setOpaque(false);\n\t}",
"void initLayout() {\n\t\t/* Randomize the number of rows and columns */\n\t\tNUM = Helper.randomizeNumRowsCols();\n\n\t\t/* Remove all the children of the gridContainer. It will be added again */\n\t\tpiecesGrid.removeAllViews();\n\t\t\n\t\t/* Dynamically calculate the screen positions and sizes of the individual pieces\n\t * Store the starting (x,y) of all the pieces in pieceViewLocations */\n\t\tpieceViewLocations = InitDisplay.initialize(getScreenDimensions(), getRootLayoutPadding());\n\t\t\n\t\t/* Create an array of ImageViews to store the individual piece images */\n\t\tcreatePieceViews();\n\t\t\n\t\t/* Add listeners to the ImageViews that were created above */\n\t\taddImageViewListeners();\n\t}",
"private void constructContainer(LayoutManager manager) {\n this.container = new JPanel();\n container.setLayout(manager);\n setGraphPanels();\n }",
"private void initIslandGrid()\n {\n // Add the grid\n int rows = game.getNumRows();\n int columns = game.getNumColumns();\n // set up the layout manager for the island grid panel\n pnlIsland.setLayout(new GridLayout(rows, columns));\n // create all the grid square panels and add them to the panel\n // the layout manager of the panel takes care of assigning them to the\n // the right position\n for ( int row = 0 ; row < rows ; row++ )\n {\n for ( int col = 0 ; col < columns ; col++ )\n {\n pnlIsland.add(new GridSquarePanel(game, row, col));\n }\n }\n }",
"private void setLayout() {\n\tHorizontalLayout main = new HorizontalLayout();\n\tmain.setMargin(true);\n\tmain.setSpacing(true);\n\n\t// vertically divide the right area\n\tVerticalLayout left = new VerticalLayout();\n\tleft.setSpacing(true);\n\tmain.addComponent(left);\n\n\tleft.addComponent(openProdManager);\n\topenProdManager.addListener(new Button.ClickListener() {\n\t public void buttonClick(ClickEvent event) {\n\t\tCustomerWindow productManagerWin = new CustomerWindow(CollectorManagerApplication.this);\n\t\tproductManagerWin.addListener(new Window.CloseListener() {\n\t\t public void windowClose(CloseEvent e) {\n\t\t\topenProdManager.setEnabled(true);\n\t\t }\n\t\t});\n\n\t\tCollectorManagerApplication.this.getMainWindow().addWindow(productManagerWin);\n\t\topenProdManager.setEnabled(false);\n\t }\n\t});\n\n\t\n\tsetMainWindow(new Window(\"Sistema de Cobranzas\", main));\n\n }",
"private void initializeGrid() {\n // 50 pixel first row for banner\n addPercentRows(root, 5);\n // second row takes up 100% of the remaining space\n addPercentRows(root, 95);\n // One column at 100% width\n addPercentColumns(root, 100);\n\n Label title = new Label(\"Mission Control\");\n title.setFont(new Font(\"Arial\", 22));\n title.setTextFill(Color.WHITE);\n\n GridPane contentGrid = new GridPane();\n // Only need one row as content will fill the entire vertical space\n addPercentRows(contentGrid, 100);\n\n // Need three columns, 1/6 column for nav, 2/3 for main content, 1/6 for warnings\n double sidePanelPercent = (1d / 6d) * 100d;\n double centerPanelPercent = (2d / 3d) * 100d;\n addPercentColumns(contentGrid, sidePanelPercent, centerPanelPercent, sidePanelPercent);\n\n\n addNodeToGrid(title, root, 0, 0, Pos.CENTER, Colours.PRIMARY_COLOUR, Insets.EMPTY);\n // NOTE:: This assumes that it is the only child added to root by this point to set ID.\n // If this is changed DynamicGuiTests will break.\n root.getChildren().get(0).setId(\"pnBanner\");\n\n addNodeToGrid(contentGrid, root, 1, 0);\n\n setupCenterPanel(contentGrid);\n setupRightHandSidePanel(contentGrid);\n setupLeftHandSidePanel(contentGrid);\n\n // Assert they are created - mainly to bypass Spot bugs issues.\n assert this.navigationView != null;\n assert this.graphView != null;\n assert this.informationView != null;\n }",
"private void createSimulatorMode() {\n setSize(1000, 750);\n setLocation(new Point(200, 100));\n setDefaultCloseOperation(EXIT_ON_CLOSE);\n\n Container content = getContentPane();\n content.setLayout(new GridBagLayout());\n \n GridBagConstraints c = new GridBagConstraints();\n \n map = new UAVMap(this, UAVModes.SIMULATION, false);\n smenu = new SimUAVMenu();\n toolBar = new SimUAVToolBar();\n map.addConnections(toolBar, smenu);\n smenu.addConnections(toolBar, map);\n toolBar.addConnections(smenu, map);\n \n c.gridy = 0;\n c.fill = GridBagConstraints.HORIZONTAL;\n c.weightx = 1;\n c.weighty = 0;\n content.add(smenu, c);\n \n c.gridy = 1;\n c.fill = GridBagConstraints.BOTH;\n c.weightx = 1;\n c.weighty = 0;\n content.add(toolBar, c);\n \n c.gridy = 2;\n c.fill = GridBagConstraints.BOTH;\n c.weightx = 1;\n c.weighty = 1;\n content.add(map.getCanvas(), c);\n \n setVisible(true);\n map.initializeSimulation();\n map.startTimer();\n }",
"NodeLayout createNodeLayout();",
"private void initMiddleBodyLayout() {\r\n midPanelLayoutCanv = new VerticalPanel();\r\n midPanelLayoutCanv.setWidth(middlePanelWidth + \"px\");\r\n midPanelLayoutCanv.setHeight((leftPanelHeight - 2) + \"px\");\r\n RootPanel.get(\"diva_mid_panel\").clear();\r\n RootPanel.get(\"diva_mid_panel\").add(midPanelLayoutCanv);\r\n //pca and profile plot layout\r\n topMidLayout = new HorizontalPanel();\r\n int newWidth = (middlePanelWidth / 2);\r\n int newHeight = newWidth + 22;\r\n topMidLayout.setHeight(newHeight + \"px\");\r\n topMidLayout.setWidth(middlePanelWidth + \"px\");\r\n topMidLayout.setStyleName(\"whitelayout\");\r\n\r\n //rank table layout\r\n rankLayoutCanv = new VLayout();\r\n rankLayoutCanv.setHeight((leftPanelHeight - (newHeight + 2)) + \"px\");\r\n rankLayoutCanv.setWidth(middlePanelWidth + \"px\");\r\n midPanelLayoutCanv.add(topMidLayout);\r\n midPanelLayoutCanv.add(rankLayoutCanv);\r\n }",
"public void createLayout() {\n\t\tpersons = createPersonGuessPanel();\t\t\n\t\tweapons = createWeaponGuessPanel();\n\t\trooms = createRoomGuessPanel();\n\t\t\n\t\tpersonCheckList = createPeoplePanel();\n\t\tweaponCheckList =createWeaponsPanel(); \n\t\troomCheckList = createRoomsPanel();\n\t\t\n\t\tJPanel completed = new JPanel();\n\t\tcompleted.setLayout(new GridLayout(3, 2));\n\t\tadd(completed, BorderLayout.CENTER);\n\t\tcompleted.add(personCheckList);\n\t\tcompleted.add(persons);\n\t\tcompleted.add(weaponCheckList);\n\t\tcompleted.add(weapons);\n\t\tcompleted.add(roomCheckList);\n\t\tcompleted.add(rooms);\n\t}",
"public void layoutView()\n\t{\n\t\tthis.setLayout(new GridLayout(2,5));\n\t\tthis.add(expression);\n\t\tthis.add(var);\n\t\tthis.add(start);\n\t\tthis.add(end);\n\t\tthis.add(this.plot);\n\t\tthis.add(InputView.coords);\n\t\tthis.add(this.in);\n\t\tthis.add(this.out);\n\t}",
"private void geometry()\n\t\t{\n\t\tgridLayout = new GridLayout(2, -1);\n\n\t\tthis.setLayout(gridLayout);\n\n\t\tadd(component1);\n\t\tadd(component2);\n\t\t}",
"private void createGUI() {\r\n\r\n cgRect modelSpace = new cgRect(0, 0, 11, 11);\r\n cgRect deviceSpace = new cgRect(0, 0, 600, 600);\r\n\r\n cgTransformation tr = new cgTransformation(modelSpace, deviceSpace, false, false);\r\n\r\n /**\r\n *\r\n */\r\n // The formatter of axis' labels will use default locale and pattern\r\n NumberFormat nf = NumberFormat.getInstance();\r\n\r\n // We will use \"fixed size\" axis renderer for all axes\r\n \r\n // 参数一:标签刻度长度大小 参数二:标签数字长度大小 参数三:数字和刻度之间的距离大小,长度为像素\r\n cgAxisRenderer ar = new cgFixedSizeAxisRenderer(5, 15, 50, nf);\r\n\r\n // ----------------------------------------------------\r\n // First axis - values match the model coordinates,\r\n // model origin is at 0.0\r\n // ----------------------------------------------------\r\n \r\n // 第三个参数为显示的数字数\r\n cgRect bbox1 = new cgRect(0, 0, 11, 1);\r\n TickGenerator tg1 = new NumericTickGenerator(1.0);\r\n cgAxisShape axis1 = new cgAxisShape(cgAxisShape.NORTH, bbox1, tg1, ar);\r\n\r\n cgShapeListLayer layer = new cgShapeListLayer();\r\n\r\n layer.addShape(axis1);\r\n\r\n /**\r\n *\r\n */\r\n // ----------------------------------------------------\r\n // Create grid using regular grid renderer\r\n // ----------------------------------------------------\r\n cgRect bbox = new cgRect(0, 0, 10, 10);\r\n TickGenerator htg = new NumericTickGenerator(1.0);\r\n TickGenerator vtg = new NumericTickGenerator(1.0);\r\n cgGridRenderer gr = new cgRegularGridRenderer();\r\n cgGridShape grid = new cgGridShape(bbox, htg, vtg, gr);\r\n\r\n // ----------------------------------------------------\r\n // Create view\r\n // ----------------------------------------------------\r\n// cgShapeListLayer layer = new cgShapeListLayer();\r\n// layer.addShape( grid );\r\n cgContainerModel model = new cgContainerModel();\r\n model.setBoundingBox(modelSpace);\r\n model.addLayer(layer);\r\n\r\n cgPlotView view = new cgPlotView(model, tr);\r\n\r\n // ----------------------------------------------------\r\n // Create plot\r\n // ----------------------------------------------------\r\n cgPlot plot = new cgPlot(view);\r\n\r\n plot.addScrollbar(cgGenericPlotLayout.SOUTH);\r\n plot.addScrollbar(cgGenericPlotLayout.EAST);\r\n\r\n getContentPane().add(plot);\r\n\r\n // ----------------------------------------------------\r\n // Set up listeners\r\n // ----------------------------------------------------\r\n // Set window listener\r\n addWindowListener(new WindowAdapter() {\r\n public void windowClosing(WindowEvent e) {\r\n System.exit(0);\r\n }\r\n });\r\n }",
"public void setBoard() {\n margin = Math.round((sizeOfCell * 3) / 2);\n RelativeLayout.LayoutParams marginParam = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n marginParam.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);\n marginParam.addRule(RelativeLayout.CENTER_HORIZONTAL);\n marginParam.setMargins(0, 0, 0, (margin));\n gridContainer.setLayoutParams(marginParam);\n\n LinearLayout.LayoutParams lpRow = new LinearLayout.LayoutParams(sizeOfCell * maxN, sizeOfCell);\n LinearLayout.LayoutParams lpCell = new LinearLayout.LayoutParams(sizeOfCell, sizeOfCell);\n LinearLayout linRow;\n\n for (int row = 0; row < maxN; row++) {\n linRow = new LinearLayout(context);\n for (int col = 0; col < maxN; col++) {\n ivCell[row][col] = new ImageView(context);\n linRow.addView(ivCell[row][col], lpCell);\n }\n linBoardGame.addView(linRow, lpRow);\n }\n }",
"@AutoGenerated\r\n\tprivate VerticalLayout buildVerticalLayout_3() {\n\t\tverticalLayout_3 = new VerticalLayout();\r\n\t\tverticalLayout_3.setWidth(\"100.0%\");\r\n\t\tverticalLayout_3.setHeight(\"100.0%\");\r\n\t\tverticalLayout_3.setImmediate(false);\r\n\t\tverticalLayout_3.setMargin(false);\r\n\t\t\r\n\t\t// gridLayout_4\r\n\t\tgridLayout_4 = buildGridLayout_4();\r\n\t\tverticalLayout_3.addComponent(gridLayout_4);\r\n\t\t\r\n\t\treturn verticalLayout_3;\r\n\t}",
"private void setLayout() {\n if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {\n recyclerView.setLayoutManager(new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL));\n\n } else if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {\n recyclerView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));\n }\n }",
"private void init() {\r\n\r\n createGUI();\r\n\r\n setSize(new Dimension(600, 600));\r\n setTitle(\"Grid - Regular Grid Renderer\");\r\n }",
"private void $$$setupUI$$$() {\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel = new JPanel();\n mainPanel.setLayout(new GridLayoutManager(8, 4, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(mainPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n mainPanel.setBorder(BorderFactory.createTitledBorder(\"New Mapper Pattern Keywords\"));\n final JLabel label1 = new JLabel();\n label1.setText(\"Insert\");\n mainPanel.add(label1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n insertPatternTextField = new JTextField();\n mainPanel.add(insertPatternTextField, new GridConstraints(2, 1, 1, 3, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150,\n -1), null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"Delete\");\n mainPanel.add(label2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n deletePatternTextField = new JTextField();\n mainPanel.add(deletePatternTextField, new GridConstraints(3, 1, 1, 3, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150,\n -1), null, 0, false));\n final JLabel label3 = new JLabel();\n label3.setText(\"Update\");\n mainPanel.add(label3, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n updatePatternTextField = new JTextField();\n mainPanel.add(updatePatternTextField, new GridConstraints(4, 1, 1, 3, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150,\n -1), null, 0, false));\n final JLabel label4 = new JLabel();\n label4.setText(\"Select\");\n mainPanel.add(label4, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n selectPatternTextField = new JTextField();\n mainPanel.add(selectPatternTextField, new GridConstraints(5, 1, 1, 3, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150,\n -1), null, 0, false));\n final JLabel label5 = new JLabel();\n label5.setText(\"Patterns should be separated with \\\";\\\"\");\n mainPanel.add(label5, new GridConstraints(0, 1, 1, 3, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n modelComboBox = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n defaultComboBoxModel1.addElement(\"startWith\");\n defaultComboBoxModel1.addElement(\"endWith\");\n defaultComboBoxModel1.addElement(\"contain\");\n modelComboBox.setModel(defaultComboBoxModel1);\n mainPanel.add(modelComboBox, new GridConstraints(1, 1, 1, 3, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n mainPanel.add(spacer1, new GridConstraints(7, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final JLabel label6 = new JLabel();\n label6.setText(\"Model\");\n mainPanel.add(label6, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n openNaviButton = new JRadioButton();\n openNaviButton.setText(\"开\");\n mainPanel.add(openNaviButton, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED\n , null, null, null, 0, false));\n openNaviLabel = new JLabel();\n openNaviLabel.setText(\"导航开关\");\n mainPanel.add(openNaviLabel, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n closeNaviRadioButton = new JRadioButton();\n closeNaviRadioButton.setText(\"关\");\n mainPanel.add(closeNaviRadioButton, new GridConstraints(6, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }",
"public VFlowLayout() {\n this(TOP, 5, 5, true, false);\n }",
"private Grid<Movimiento> createGrid() {\n\t\tgrid = new Grid<>();\n\t\tgrid.addThemeVariants(GridVariant.LUMO_NO_BORDER,GridVariant.LUMO_ROW_STRIPES);\n\t\t\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\n\t\tgrid.addComponentColumn(c -> new IconoMovimientoTarjeta(c))\n\t\t.setWidth(\"100px\").setHeader(\"Tarjeta\").setFlexGrow(1);\n\t\tgrid.addColumn(c -> c.getCantidad()+\" €\").setHeader(\"Cantidad\").setFlexGrow(1);\n grid.addColumn(c -> c.getConcepto()).setHeader(\"Concepto\").setFlexGrow(1);\n grid.addColumn(c -> dateFormat.format(c.getFecha())).setHeader(\"Fecha\").setWidth(\"125px\").setFlexGrow(0);\n \n return grid;\n\t}",
"private void $$$setupUI$$$() {\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(5, 2, new Insets(0, 0, 0, 0), -1, -1));\n targetClassesTextField = new JTextField();\n panel.add(targetClassesTextField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel.add(spacer1, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n targetClassesLabel = new JLabel();\n targetClassesLabel.setText(\"Target classes\");\n panel.add(targetClassesLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n sourceDirTextField = new JTextField();\n panel.add(sourceDirTextField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n sourceDirLabel = new JLabel();\n sourceDirLabel.setText(\"Source dir\");\n panel.add(sourceDirLabel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n reportDirTextField = new JTextField();\n panel.add(reportDirTextField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n reportDirLabel = new JLabel();\n reportDirLabel.setText(\"Report dir\");\n panel.add(reportDirLabel, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n otherParamsTextField = new JTextField();\n panel.add(otherParamsTextField, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n otherParamsLabel = new JLabel();\n otherParamsLabel.setText(\"Other params\");\n panel.add(otherParamsLabel, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }",
"@AutoGenerated\n\tprivate VerticalLayout buildMainLayout() {\n\t\tmainLayout = new VerticalLayout();\n\t\tmainLayout.setStyleName(\"contenido\");\n\t\tmainLayout.setImmediate(false);\n\t\tmainLayout.setWidth(\"100%\");\n\t\tmainLayout.setHeight(\"-1px\");\n\t\tmainLayout.setMargin(true);\n\t\tmainLayout.setSpacing(true);\n\t\t\n\t\t// top-level component properties\n\t\tsetWidth(\"100.0%\");\n\t\tsetHeight(\"-1px\");\n\t\t\n\t\t// hl_cabecera\n\t\thl_cabecera = buildHl_cabecera();\n\t\tmainLayout.addComponent(hl_cabecera);\n\t\t\n\t\t// horizontalLayout_1\n\t\thorizontalLayout_1 = buildHorizontalLayout_1();\n\t\tmainLayout.addComponent(horizontalLayout_1);\n\t\tmainLayout.setComponentAlignment(horizontalLayout_1, new Alignment(20));\n\t\t\n\t\t// l_preferenciasUsuario\n\t\tl_preferenciasUsuario = new Label();\n\t\tl_preferenciasUsuario.setStyleName(\"mih2\");\n\t\tl_preferenciasUsuario.setImmediate(false);\n\t\tl_preferenciasUsuario.setWidth(\"100.0%\");\n\t\tl_preferenciasUsuario.setHeight(\"-1px\");\n\t\tl_preferenciasUsuario.setValue(\"Preferencias de Usuario\");\n\t\tmainLayout.addComponent(l_preferenciasUsuario);\n\t\t\n\t\t// hl_gridContent\n\t\thl_gridContent = new HorizontalLayout();\n\t\thl_gridContent.setImmediate(false);\n\t\thl_gridContent.setWidth(\"100.0%\");\n\t\thl_gridContent.setHeight(\"-1px\");\n\t\thl_gridContent.setMargin(false);\n\t\tmainLayout.addComponent(hl_gridContent);\n\t\t\n\t\t// b_enviar\n\t\tb_enviar = new Button();\n\t\tb_enviar.setCaption(\"Actualizar\");\n\t\tb_enviar.setImmediate(true);\n\t\tb_enviar.setWidth(\"-1px\");\n\t\tb_enviar.setHeight(\"-1px\");\n\t\tmainLayout.addComponent(b_enviar);\n\t\tmainLayout.setComponentAlignment(b_enviar, new Alignment(48));\n\t\t\n\t\treturn mainLayout;\n\t}",
"public VerticalLayout() {\n setWidth(\"100%\");\n setSpacing(true);\n setMargin(true);\n }",
"private static void initMainLayout(String mode) {\n\t\tCardLayout cl = ((CardLayout) _mapCards.getLayout());\n\n\t\t// update map\n\t\tif (mode == \"FP\") {\n\t\t\t_mapCards.add(ui, \"REAL_MAP\");\n\t\t\tcl.show(_mapCards, \"REAL_MAP\");\n\t\t} else {\n\t\t\t_mapCards.add(ui, \"EXPLORATION\");\n\t\t\tcl.show(_mapCards, \"EXPLORATION\");\n\t\t}\n\n\t}",
"public GridPane initializeGridPane() {\n\t\tGridPane world = new GridPane();\n\t\t\n\t\tfor (int x = 0; x < this.columns; x++) {\n\t\t\tfor (int y = 0; y < this.rows; y++) {\n\t\t\t\tRectangle cellGUI = new Rectangle(this.widthOfCells - 1, this.heightOfCells - 1);\n\t\t\t\tcellGUI.setFill(Color.web(\"#FFFFFF\"));\t\t// White cell background color\n cellGUI.setStroke(Color.web(\"#C0C0C0\")); \t// Grey cell border color\n cellGUI.setStrokeWidth(1); \t\t\t\t\t// Width of the border\n\n world.add(cellGUI, x, y);\n this.cellGUIArray[x][y] = cellGUI;\n\n cellGUI.setOnMouseClicked((event) -> {\n \tthis.currentGeneration = this.simulation.getCurrentGeneration();\n for (int i = 0; i < columns; i++) {\n for (int j = 0; j < rows; j++) {\n if (this.cellGUIArray[i][j].equals(cellGUI) && this.currentGeneration[i][j] == 0) {\n this.currentGeneration[i][j] = 1;\n } else if (this.cellGUIArray[i][j].equals(cellGUI) && this.currentGeneration[i][j] == 1) {\n this.currentGeneration[i][j] = 0;\n }\n }\n }\n this.simulation.setCurrentGeneration(this.currentGeneration);\n });\n\t\t\t}\n\t\t}\n\t\treturn world;\n\t}",
"private void $$$setupUI$$$() {\n panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n rootTabControl = new JTabbedPane();\n panel1.add(rootTabControl, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, 200), null, 0, false));\n }",
"public Panel(LayoutManager paramLayoutManager)\n/* */ {\n/* 65 */ setLayout(paramLayoutManager);\n/* */ }",
"private void $$$setupUI$$$() {\n createUIComponents();\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n scrollPane1.setViewportView(table);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));\n panel.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonRegister = new JButton();\n buttonRegister.setText(\"Track\");\n panel1.add(buttonRegister, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonMenu = new JButton();\n buttonMenu.setText(\"Menu\");\n panel1.add(buttonMenu, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n }",
"private void createLayout () {\n \t\n \tBorderPane border = new BorderPane();\n \t\n \t\n \t tabPane = new TabPane();\n ArrayList <ScrollPane> tabs = new ArrayList <ScrollPane>();\n \t\n //create column 1 - need to refactor this and make more generic\n TilePane col1 = new TilePane();\n \tcol1.setPrefColumns(2);\n \tcol1.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n \tcol1.setAlignment(Pos.TOP_LEFT);\n \tcol1.getChildren().addAll(createElements ());\n \tScrollPane scrollCol1 = new ScrollPane(col1);\n \ttabs.add(scrollCol1);\n \t\n \tTilePane col2 = new TilePane();\n \tcol2.setPrefColumns(2);\n \tcol2.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n \tcol2.setAlignment(Pos.TOP_LEFT);\n \tcol2.getChildren().addAll(createElements ());\n \tScrollPane scrollCol2 = new ScrollPane(col2);\n \ttabs.add(scrollCol2);\n \t\n \t\n \t\n for (int i = 0; i < tabs.size(); i++) {\n Tab tab = new Tab();\n String tabLabel = \"Col-\" + i;\n tab.setText(tabLabel);\n keywordsList.put(tabLabel, new ArrayList <String>());\n \n tab.setContent(tabs.get(i));\n tabPane.getTabs().add(tab);\n }\n \t\n \t\n \t\n \t\n \t\n \t\n //System.out.println(controller.getScene());\n border.prefHeightProperty().bind(controller.primaryStage.heightProperty());\n border.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n ToolBar toolbar = createtoolBar();\n toolbar.setPrefHeight(50);\n \n border.setTop(toolbar);\n\t\t\n\n\t scrollCol1.prefHeightProperty().bind(controller.primaryStage.heightProperty());\n\t scrollCol1.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n border.setCenter(tabPane);\n\t Group root = (Group)this.getRoot();\n root.getChildren().add(border);\n\t}",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 800, 640);\n\t\tframe.setTitle(\"Graphite\");\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJPanel mainPanel = new JPanel();\n\t\tframe.getContentPane().add(mainPanel);\n\t\tGridBagLayout gbl_mainPanel = new GridBagLayout();\n\t\tgbl_mainPanel.columnWidths = new int[]{0,0};\n\t\tgbl_mainPanel.rowHeights = new int[]{0, 0};\n\t\tgbl_mainPanel.columnWeights = new double[]{1.0, Double.MIN_VALUE};\n\t\tgbl_mainPanel.rowWeights = new double[]{1.0, Double.MIN_VALUE};\n\t\tmainPanel.setLayout(gbl_mainPanel);\n\t\t\n\t\tdrawpad = new canvas();\n\t\tdrawpad.setDoubleBuffered(true);\n\t\tdrawpad.setBackground(Color.LIGHT_GRAY);\n\t\tGridBagConstraints gbc_drawpad = new GridBagConstraints();\n\t\tgbc_drawpad.gridwidth = 22;\n\t\tgbc_drawpad.gridheight = 2;\n\t\tgbc_drawpad.insets = new Insets(5, 5, 5, 5);\n\t\tgbc_drawpad.fill = GridBagConstraints.BOTH;\n\t\tgbc_drawpad.gridx = 0;\n\t\tgbc_drawpad.gridy = 0;\n\t\tmainPanel.add(drawpad, gbc_drawpad);\n\t\t\n\t\tJPanel sidePanel = new JPanel();\n\t\tGridBagConstraints gbc_sidePanel = new GridBagConstraints();\n\t\tgbc_sidePanel.gridheight = 2;\n\t\tgbc_sidePanel.insets = new Insets(5, 5, 5, 5);\n\t\tgbc_sidePanel.fill = GridBagConstraints.BOTH;\n\t\tgbc_sidePanel.gridx = 22;\n\t\tgbc_sidePanel.gridy = 0;\n\t\tmainPanel.add(sidePanel, gbc_sidePanel);\n\t\tGridBagLayout gbl_sidePanel = new GridBagLayout();\n\t\tgbl_sidePanel.columnWidths = new int[]{118};\n\t\tgbl_sidePanel.rowHeights = new int[]{25, 0, 0, 0, 0, 0, 0, 0, 0, 0};\n\t\tgbl_sidePanel.columnWeights = new double[]{1.0};\n\t\tgbl_sidePanel.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};\n\t\tsidePanel.setLayout(gbl_sidePanel);\n\t\t\n\t\tJButton btnColorGraph = new JButton(\"Color Graph\");\n\t\tbtnColorGraph.setPreferredSize(new Dimension(120,25));\n\t\tGridBagConstraints gbc_btnColorGraph = new GridBagConstraints();\n\t\tgbc_btnColorGraph.anchor = GridBagConstraints.NORTHWEST;\n\t\tgbc_btnColorGraph.insets = new Insets(0, 0, 5, 0);\n\t\tgbc_btnColorGraph.gridx = 0;\n\t\tgbc_btnColorGraph.gridy = 0;\n\t\tsidePanel.add(btnColorGraph, gbc_btnColorGraph);\n\t\tbgpFunctions.add(btnColorGraph);\n\t\tbtnColorGraph.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tFunctions func = new Functions();\n\t\t\t\tgraph = func.colorGraph(graph);\n\t\t\t\tconsoleOut.setText(\"Colors: \"+graph.attributes.get(\"colors\")+\"\\nBipartite: \" + graph.attributes.get(\"bipartite\"));\n\t\t\t\tdrawpad.repaint();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton btnClear = new JButton(\"Clear\");\n\t\tbtnClear.setPreferredSize(new Dimension(120,25));\n\t\tGridBagConstraints gbc_btnClear = new GridBagConstraints();\n\t\tgbc_btnClear.insets = new Insets(5, 0, 5, 0);\n\t\tgbc_btnClear.anchor = GridBagConstraints.NORTHWEST;\n\t\tgbc_btnClear.gridx = 0;\n\t\tgbc_btnClear.gridy = 2;\n\t\tsidePanel.add(btnClear, gbc_btnClear);\n\t\tbtnClear.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgraph = new AdjListGraph<Integer, Integer>();\n\t\t\t\tconsoleOut.setText(\"\");\n\t\t\t\tdrawpad.repaint();\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton btnHelp = new JButton(\"Help\");\n\t\tbtnHelp.setPreferredSize(new Dimension(120,25));\n\t\tGridBagConstraints gbc_btnHelp = new GridBagConstraints();\n\t\tgbc_btnHelp.insets = new Insets(0, 0, 5, 0);\n\t\tgbc_btnHelp.anchor = GridBagConstraints.NORTHWEST;\n\t\tgbc_btnHelp.gridx = 0;\n\t\tgbc_btnHelp.gridy = 3;\n\t\tsidePanel.add(btnHelp, gbc_btnHelp);\n\t\tbtnHelp.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tHelp help = new Help();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton btnFindPath = new JButton(\"Find Path\");\n\t\tbtnFindPath.setPreferredSize(new Dimension(120,25));\n\t\tGridBagConstraints gbc_btnFindPath = new GridBagConstraints();\n\t\tgbc_btnFindPath.insets = new Insets(0, 0, 5, 0);\n\t\tgbc_btnFindPath.gridx = 0;\n\t\tgbc_btnFindPath.gridy = 1;\n\t\tsidePanel.add(btnFindPath, gbc_btnFindPath);\n\t\tbtnFindPath.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tFunctions func = new Functions();\n\t\t\t\tgraph = func.findPath(graph, selected, altSelected);\n\t\t\t\tdrawpad.repaint();\n\t\t\t}\n\t\t});\n\t\t\n\t\tconsoleOut = new JTextArea();\n\t\tconsoleOut.setEditable(false);\n\t\tGridBagConstraints gbc_consoleOut = new GridBagConstraints();\n\t\tgbc_consoleOut.fill = GridBagConstraints.BOTH;\n\t\tgbc_consoleOut.gridx = 0;\n\t\tgbc_consoleOut.gridy = 8;\n\t\tsidePanel.add(consoleOut, gbc_consoleOut);\n\t\tconsoleOut.setPreferredSize(new Dimension(10,10));\n\t\t\n\t\t\n\t\tframe.setFocusTraversalPolicy(new FocusTraversalOnArray(new Component[]{drawpad}));\n\t}",
"private void $$$setupUI$$$() {\n statusPanel = new JPanel();\n statusPanel.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));\n statusLabel = new JLabel();\n statusLabel.setText(\"Status Label\");\n statusPanel.add(statusLabel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JSeparator separator1 = new JSeparator();\n statusPanel.add(separator1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n }",
"public RegularGrid() {\r\n }",
"private JPanel buildNorthPanel() {\n\t\t\n\t\tGridBagLayout layout;\n\t\tGridBagConstraints constraints;\n\t\tJPanel panel;\n\t\tint row, col;\n\t\t\n\t\tlayout = new GridBagLayout();\n\t\tconstraints = new GridBagConstraints();\n\t\tpanel = new JPanel(layout);\n\t\trow = 0;\n\t\tcol = 0;\n\t\tJLabel headerLabel = new JLabel(stringFactory.getString(\n\t\t\t\tLabelStringFactory.SAVEASCONFIG_FRAME_SAVE_NEW_CONFIGURATION));\n\t\theaderLabel.setFont(new Font(\"arial\", Font.PLAIN, 18));\n\t\tGUIUtils.add(panel, headerLabel, layout, constraints, row++, col, \n\t\t\t1, 1, 1, 1, GridBagConstraints.NORTHEAST, GridBagConstraints.BOTH,\n\t\t\tGUIUtils.MED_LARGE_INSETS);\n\t\treturn panel;\n\t}",
"@AutoGenerated\r\n\tprivate VerticalLayout buildVerticalLayout_1() {\n\t\tverticalLayout_1 = new VerticalLayout();\r\n\t\tverticalLayout_1.setImmediate(false);\r\n\t\tverticalLayout_1.setWidth(\"-1px\");\r\n\t\tverticalLayout_1.setHeight(\"-1px\");\r\n\t\tverticalLayout_1.setMargin(false);\r\n\t\tverticalLayout_1.setSpacing(true);\r\n\t\t\r\n\t\t// pnlFondos\r\n\t\tpnlFondos = buildPnlFondos();\r\n\t\tverticalLayout_1.addComponent(pnlFondos);\r\n\t\t\r\n\t\treturn verticalLayout_1;\r\n\t}",
"@AutoGenerated\r\n\tprivate GridLayout buildPnlDatos() {\n\t\tpnlDatos = new GridLayout();\r\n\t\tpnlDatos.setImmediate(false);\r\n\t\tpnlDatos.setWidth(\"350px\");\r\n\t\tpnlDatos.setHeight(\"-1px\");\r\n\t\tpnlDatos.setMargin(false);\r\n\t\tpnlDatos.setSpacing(true);\r\n\t\tpnlDatos.setColumns(2);\r\n\t\tpnlDatos.setRows(3);\r\n\t\t\r\n\t\t// lblUsuario\r\n\t\tlblUsuario = new Label();\r\n\t\tlblUsuario.setImmediate(false);\r\n\t\tlblUsuario.setWidth(\"-1px\");\r\n\t\tlblUsuario.setHeight(\"-1px\");\r\n\t\tlblUsuario.setValue(\"Usuario\");\r\n\t\tpnlDatos.addComponent(lblUsuario, 0, 0);\r\n\t\tpnlDatos.setComponentAlignment(lblUsuario, new Alignment(34));\r\n\t\t\r\n\t\t// txtUsuario\r\n\t\ttxtUsuario = new TextField();\r\n\t\ttxtUsuario.setImmediate(false);\r\n\t\ttxtUsuario.setWidth(\"-1px\");\r\n\t\ttxtUsuario.setHeight(\"-1px\");\r\n\t\tpnlDatos.addComponent(txtUsuario, 1, 0);\r\n\t\tpnlDatos.setComponentAlignment(txtUsuario, new Alignment(33));\r\n\t\t\r\n\t\t// lblClave\r\n\t\tlblClave = new Label();\r\n\t\tlblClave.setImmediate(false);\r\n\t\tlblClave.setWidth(\"-1px\");\r\n\t\tlblClave.setHeight(\"-1px\");\r\n\t\tlblClave.setValue(\"Contraseña\");\r\n\t\tpnlDatos.addComponent(lblClave, 0, 1);\r\n\t\tpnlDatos.setComponentAlignment(lblClave, new Alignment(34));\r\n\t\t\r\n\t\t// txtClave\r\n\t\ttxtClave = new PasswordField();\r\n\t\ttxtClave.setImmediate(false);\r\n\t\ttxtClave.setWidth(\"-1px\");\r\n\t\ttxtClave.setHeight(\"-1px\");\r\n\t\tpnlDatos.addComponent(txtClave, 1, 1);\r\n\t\tpnlDatos.setComponentAlignment(txtClave, new Alignment(33));\r\n\t\t\r\n\t\treturn pnlDatos;\r\n\t}",
"private void createFunctionPanel()\n\t{\n\t\tGridLayout funcGrid = new GridLayout(2,5);\n\t\tfuncGrid.setHgap (5);\n\t\tfuncGrid.setVgap (5);\n\t\tfunctionPanel.setLayout(funcGrid);\n\t\tfunctionPanel.add (eToPower);\n\t\tfunctionPanel.add (ln);\n\t\tfunctionPanel.add (twoPower);\n\t\tfunctionPanel.add (xCube);\n\t\tfunctionPanel.add (xSquare);\n\t\tfunctionPanel.add (del);\n\t\tfunctionPanel.add (C);\n\t\tfunctionPanel.add (negate);\n\t\tfunctionPanel.add (cubeRoot);\t\t\n\t\tfunctionPanel.add (squareRoot);\n\t\t\n\t}",
"public Grid() {\n minorLinesPath = new Path2D.Double();\n majorLinesPath = new Path2D.Double();\n\n minorLinePositions = new double[2][];\n majorLinePositions = new double[2][];\n\n minorLinePositionsScreen = new int[2][];\n majorLinePositionsScreen = new int[2][];\n\n listeners = new LinkedList<>();\n\n stroke = new BasicStroke();\n }",
"private void createGraph() {\r\n graph = new Graph(SHELL, SWT.NONE);\r\n\r\n final GridData gridData = new GridData();\r\n gridData.horizontalAlignment = GridData.FILL;\r\n gridData.verticalAlignment = GridData.FILL;\r\n gridData.grabExcessHorizontalSpace = true;\r\n gridData.grabExcessVerticalSpace = true;\r\n gridData.heightHint = DEFAULT_GRAPH_SIZE;\r\n gridData.widthHint = DEFAULT_GRAPH_SIZE;\r\n graph.setLayoutData(gridData);\r\n }",
"private void makeContainer(){\n Container X = (Container) ((SpringGridLayout) headlineContainer.getLayout()).getChild(1, 0);\n if (!(X == null)) headlineContainer.removeChild(X);\n\n Container sub = new Container(new SpringGridLayout(Axis.X,Axis.Y,FillMode.Last,FillMode.None));\n sub.setBackground(null); // just in case style sets an bg here\n Container sub1 = new Container();\n sub1.setBackground(null);\n Container sub2 = new Container();\n sub2.setBackground(null);\n Container sub3 = new Container();\n sub3.setBackground(null);\n\n sub.addChild(sub1);\n sub.addChild(sub2);\n sub.addChild(sub3);\n\n headlineContainer.addChild(sub ,1,0);\n/*\n sub2.setName(\"TEST\");\n sub3.setBackground(new QuadBackgroundComponent(ColorRGBA.Pink));\n\n // sub1.setPreferredSize(new Vector3f(25,50,0));\n sub1.setBackground(new QuadBackgroundComponent(ColorRGBA.Green));\n */\n }",
"GeomLayout.IGeomLayoutCreateFromNode geomLayoutCreator();",
"private void initUI() {\r\n\t\tthis.verticalLayout = new XdevVerticalLayout();\r\n\t\tthis.verticalLayout2 = new XdevVerticalLayout();\r\n\t\r\n\t\tthis.setSpacing(false);\r\n\t\tthis.setMargin(new MarginInfo(false));\r\n\t\tthis.verticalLayout.setSpacing(false);\r\n\t\tthis.verticalLayout.setMargin(new MarginInfo(false));\r\n\t\tthis.verticalLayout2.setMargin(new MarginInfo(false));\r\n\t\r\n\t\tthis.verticalLayout2.setSizeFull();\r\n\t\tthis.verticalLayout.addComponent(this.verticalLayout2);\r\n\t\tthis.verticalLayout.setComponentAlignment(this.verticalLayout2, Alignment.MIDDLE_CENTER);\r\n\t\tthis.verticalLayout.setExpandRatio(this.verticalLayout2, 20.0F);\r\n\t\tthis.verticalLayout.setSizeFull();\r\n\t\tthis.addComponent(this.verticalLayout);\r\n\t\tthis.setComponentAlignment(this.verticalLayout, Alignment.MIDDLE_CENTER);\r\n\t\tthis.setExpandRatio(this.verticalLayout, 10.0F);\r\n\t\tthis.setSizeFull();\r\n\t\r\n\t\tthis.addContextClickListener(event -> this.this_contextClick(event));\r\n\t}",
"private CellPanel defineUI()\n\t{\n\t\t//TODO define all UI Stuff here - not needed if GWT Designer is used as it will do the work for us.\n\n\t\tcellPanelContainer = new VerticalPanel();\t\t\n\t cellPanelContainer.setSize(\"598px\", \"530px\");\n\t\treturn cellPanelContainer;\n\t}",
"private void constructMainPanel() {\n // initialize the main panel\n mainPanel = new JPanel();\n mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));\n mainPanel.setPreferredSize(new Dimension(model.getWidth() + 50,\n model.getHeight() + 240));\n JScrollPane mainPane = new JScrollPane(mainPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,\n ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);\n this.add(mainPane);\n\n }",
"private void createGrid() {\n Platform.runLater(() -> {\n\n // Update UI here\n //createGrid(numRows); // E.g. let's create a 20 x 20 grid\n createGrid(20);\n });\n }",
"private void $$$setupUI$$$() {\n createUIComponents();\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonOK = new JButton();\n buttonOK.setText(\"OK\");\n panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonCancel = new JButton();\n buttonCancel.setText(\"Cancel\");\n panel2.add(buttonCancel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n pan1 = new JPanel();\n pan1.setLayout(new GridLayoutManager(4, 3, new Insets(0, 0, 0, 0), -1, -1));\n panel3.add(pan1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Название номера\");\n pan1.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"Дата регистрации\");\n pan1.add(label2, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label3 = new JLabel();\n label3.setText(\"Дата истечения\");\n pan1.add(label3, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_VERTICAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer2 = new Spacer();\n pan1.add(spacer2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(0, 25), new Dimension(0, 25), new Dimension(0, 25), 0, false));\n number = new JTextField();\n pan1.add(number, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n pan1.add(creationDatePanel, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n pan1.add(expirationDatePanel, new GridConstraints(2, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n }",
"private void setUpLayout() {\n\n this.setLayout(new GridLayout(7, 1, 40, 37));\n this.setBackground(new Color(72, 0, 0));\n this.setBorder(BorderFactory.createEmptyBorder(8, 150, 8, 150));\n }",
"private Container layoutContainer(Container panel, XmlNode node,\n Vector xmlChildren) {\n panel.removeAll();\n String panelId = node.getAttribute(ATTR_ID);\n String layout = node.getAttribute(ATTR_LAYOUT, \"\");\n Vector children = new Vector();\n Vector nodes = new Vector();\n int hspace = node.getAttribute(ATTR_HSPACE, 0);\n int vspace = node.getAttribute(ATTR_VSPACE, 0);\n int rows = node.getAttribute(ATTR_ROWS, 0);\n int cols = node.getAttribute(ATTR_COLS, 1);\n String defaultComp = node.getAttribute(ATTR_DEFAULT, \"nocomp\");\n JTabbedPane tabs = null;\n\n if (layout.equals(VALUE_LAYOUTBORDER)) {\n panel.setLayout(new BorderLayout());\n } else if (layout.equals(VALUE_LAYOUTCARD)) {\n panel.setLayout(new CardLayout());\n } else if (layout.equals(VALUE_LAYOUTTAB)) {\n tabs = new JTabbedPane();\n panel.setLayout(new BorderLayout());\n panel.add(\"Center\", tabs);\n } else if (layout.equals(VALUE_LAYOUTFLOW)) {\n panel.setLayout(new FlowLayout(FlowLayout.LEFT, hspace, vspace));\n } else if (layout.equals(VALUE_LAYOUTGRID)) {\n panel.setLayout(new GridLayout(rows, cols, hspace, vspace));\n }\n for (int i = 0; i < xmlChildren.size(); i++) {\n XmlNode childXmlNode =\n getReffedNode((XmlNode) xmlChildren.elementAt(i));\n Component childComponent = xmlToUi(childXmlNode);\n if (childComponent == null) {\n continue;\n }\n componentToParent.put(childComponent, panel);\n children.addElement(childComponent);\n nodes.addElement(childXmlNode);\n if ( !childComponent.isVisible()) {\n continue;\n }\n if (layout.equals(VALUE_LAYOUTBORDER)) {\n String place = childXmlNode.getAttribute(ATTR_PLACE,\n \"Center\");\n panel.add(place, childComponent);\n } else if (layout.equals(VALUE_LAYOUTTAB)) {\n tabs.add(childXmlNode.getAttribute(ATTR_LABEL),\n childComponent);\n } else if (layout.equals(VALUE_LAYOUTCARD)) {\n String childId = childXmlNode.getAttribute(ATTR_ID);\n panel.add(childId, childComponent);\n if (defaultComp.equals(childId)) {\n ((CardLayout) panel.getLayout()).show(panel, childId);\n }\n } else if (layout.equals(VALUE_LAYOUTINSET)) {\n GuiUtils.tmpInsets = new Insets(vspace, hspace, vspace,\n hspace);\n GuiUtils.doLayout(panel, new Component[] { childComponent },\n 1, GuiUtils.DS_Y, GuiUtils.DS_Y);\n\n break;\n } else if (layout.equals(VALUE_LAYOUTWRAP)) {\n GuiUtils.tmpInsets = new Insets(vspace, hspace, vspace,\n hspace);\n GuiUtils.doLayout(panel, new Component[] { childComponent },\n 1, GuiUtils.DS_N, GuiUtils.DS_N);\n\n break;\n } else if ( !layout.equals(VALUE_LAYOUTGRIDBAG)) {\n panel.add(childComponent);\n }\n }\n if (layout.equals(VALUE_LAYOUTGRIDBAG)) {\n double[] cw =\n GuiUtils.parseDoubles(node.getAttribute(ATTR_COLWIDTHS));\n double[] rh =\n GuiUtils.parseDoubles(node.getAttribute(ATTR_ROWHEIGHTS));\n if (cw == null) {\n cw = GuiUtils.DS_Y;\n }\n if (rh == null) {\n rh = GuiUtils.DS_N;\n }\n GuiUtils.tmpInsets = new Insets(vspace, hspace, vspace, hspace);\n GuiUtils.doLayout(panel, GuiUtils.getCompArray(children),\n node.getAttribute(ATTR_COLS, 1), cw, rh);\n }\n\n containerToNodeList.put(panel, nodes);\n\n return panel;\n }",
"private void generateLayout() {\n\t\tJPanel generatePanel = new JPanel();\n\t\tgeneratePanel.setLayout(new GridBagLayout());\n\t\tJButton generatePrimes = new JButton(\"Generate Primes\");\n\t\tgeneratePrimes.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgeneratePrimesPopup();\n\t\t\t}\n\t\t});\n\t\tJButton generateHex = new JButton(\"Generate Hex Cross\");\n\t\tgenerateHex.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tprimes.clearCrosses();\n\t\t\t\tprimes.generateHexPrimes();\n\t\t\t\tupdateValues(\"Succesful Hex Cross Prime Numbers Generated\");\n\t\t\t}\n\t\t});\n\t\tGridBagConstraints gbc = new GridBagConstraints();\n\t\tgbc.fill = GridBagConstraints.CENTER;\n\t\tgbc.insets = new Insets(1,1,0,0);\n\t\tJPanel digitsPanel = new JPanel();\n\t\tdigitsPanel.setLayout(new GridLayout(2,1));\n\t\tLPrimedigits.setFont(new Font(\"Tahoma\", Font.BOLD,15));\n\t\tLHexDigits.setFont(new Font(\"Tahoma\", Font.BOLD,15));\n\t\tdigitsPanel.add(LPrimedigits);\n\t\tdigitsPanel.add(LHexDigits);\n\t\tgbc.gridx = 0;\n\t\tgbc.weightx = 0.1;\n\t\tgeneratePanel.add(generatePrimes,gbc);\n\t\tgbc.gridx = 1;\n\t\tgbc.weightx = 0.1;\n\t\tgeneratePanel.add(digitsPanel,gbc);\n\t\tgbc.weightx = 0.1;\n\t\tgbc.gridx = 2;\n\t\tgeneratePanel.add(generateHex,gbc);\n\t\tgeneratePanel.setBorder(BorderFactory.createLineBorder(new Color(150,0,0), 2));\n\t\tmainLayout.add(generatePanel);\n\t}",
"protected void computeGridParameters() {\n float padding = 0.02f * overlay.getScalingValue();\n boolean flipX = x2 < x1;\n float xx1 = flipX ? (x1 + padding) : (x1 - padding);\n float xx2 = flipX ? (x2 - padding) : (x2 + padding);\n boolean flipY = y2 < y1;\n float yy1 = flipY ? (y1 + padding) : (y1 - padding);\n float yy2 = flipY ? (y2 - padding) : (y2 + padding);\n \n xGrid1 = xx1; yGrid1 = yy1;\n xGrid2 = xx2; yGrid2 = yy1;\n xGrid3 = xx1; yGrid3 = yy2;\n xGrid4 = xx2; yGrid4 = yy2;\n horizGridCount = 3; vertGridCount = 3;\n }",
"private void $$$setupUI$$$() {\n topPanel = new JPanel();\n topPanel.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));\n headerLabel = new JLabel();\n headerLabel.setText(\"Header\");\n topPanel.add(headerLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n contentPanel = new JPanel();\n contentPanel.setLayout(new BorderLayout(0, 0));\n topPanel.add(contentPanel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), -1, -1));\n topPanel.add(panel1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n buttonBack = new JButton();\n buttonBack.setText(\"Back\");\n panel1.add(buttonBack, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonNext = new JButton();\n buttonNext.setText(\"Next\");\n panel1.add(buttonNext, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonCancel = new JButton();\n buttonCancel.setText(\"Cancel\");\n panel1.add(buttonCancel, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n topPanel.add(panel2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n statusLabel = new JLabel();\n statusLabel.setText(\"Status\");\n panel2.add(statusLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }",
"private GridPane setInfoVindu(){\r\n GridPane grid = new GridPane();\r\n grid.setPadding(new Insets(13, 13, 13,13));\r\n grid.setHgap(15);\r\n grid.setVgap(5);\r\n\r\n nyeTall = new TextField();\r\n settInnTall = new Button(\"Sett inn\");\r\n leggInnTilfeldigeTall = new Button(\"Legg inn 10 tilfeldige tall\");\r\n slettTre = new Button(\"Slett tre\");\r\n nodeFarge = new ColorPicker();\r\n nodeFarge.setValue(Color.LIGHTGREEN);\r\n\r\n grid.add(nyeTall, 0,0);\r\n grid.add(settInnTall, 1, 0);\r\n grid.add(leggInnTilfeldigeTall, 2, 0);\r\n grid.add(slettTre, 3, 0);\r\n grid.add(nodeFarge, 4, 0);\r\n\r\n return grid;\r\n }",
"public MazePanel(int width, int height) {\r\n\r\n\t\t\tsetLayout(null);\r\n\r\n\t\t\tMouseHandler listener = new MouseHandler();\r\n\t\t\taddMouseListener(listener);\r\n\t\t\taddMouseMotionListener(listener);\r\n\r\n\t\t\tsetBorder(BorderFactory.createMatteBorder(2, 2, 2, 2, Color.blue));\r\n\r\n\t\t\tsetPreferredSize(new Dimension(width, height));\r\n\r\n\t\t\tgrid = new int[rows][columns];\r\n\r\n\t\t\t// Criando o conteudo do panel\r\n\r\n\t\t\tmessage = new JLabel(msgDrawAndSelect, JLabel.CENTER);\r\n\t\t\tmessage.setForeground(Color.blue);\r\n\t\t\tmessage.setFont(new Font(\"Helvetica\", Font.PLAIN, 16));\r\n\r\n\t\t\tJLabel rowsLbl = new JLabel(\"Nº Linhas (5-50):\", JLabel.RIGHT);\r\n\t\t\trowsLbl.setFont(new Font(\"Helvetica\", Font.PLAIN, 13));\r\n\r\n\t\t\trowsField = new JTextField();\r\n\t\t\trowsField.setText(Integer.toString(rows));\r\n\r\n\t\t\tJLabel columnsLbl = new JLabel(\"Nº Colunas (5-50):\", JLabel.RIGHT);\r\n\t\t\tcolumnsLbl.setFont(new Font(\"Helvetica\", Font.PLAIN, 13));\r\n\r\n\t\t\tcolumnsField = new JTextField();\r\n\t\t\tcolumnsField.setText(Integer.toString(columns));\r\n\r\n\t\t\tJButton resetButton = new JButton(\"Novo GRID\");\r\n\t\t\tresetButton.addActionListener(new ActionHandler());\r\n\t\t\tresetButton.setBackground(Color.lightGray);\r\n\t\t\tresetButton\r\n\t\t\t\t\t.setToolTipText(\"Limpa e redesenha o GRID de acordo com o número de linhas e colunas estipulado.\");\r\n\t\t\tresetButton.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\t\tresetButtonActionPerformed(evt);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tJButton mazeButton = new JButton(\"Gerar Labirinto\");\r\n\t\t\tmazeButton.addActionListener(new ActionHandler());\r\n\t\t\tmazeButton.setBackground(Color.lightGray);\r\n\t\t\tmazeButton.setToolTipText(\"Cria um labirinto aleatório\");\r\n\t\t\tmazeButton.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\t\tmazeButtonActionPerformed(evt);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tJButton clearButton = new JButton(\"Limpar\");\r\n\t\t\tclearButton.addActionListener(new ActionHandler());\r\n\t\t\tclearButton.setBackground(Color.lightGray);\r\n\t\t\tclearButton.setToolTipText(\"Primeiro click: Limpa as buscas, Segundo click: Limpa obstáculos\");\r\n\r\n\t\t\tJButton stepButton = new JButton(\"Passo-a-Passo\");\r\n\t\t\tstepButton.addActionListener(new ActionHandler());\r\n\t\t\tstepButton.setBackground(Color.lightGray);\r\n\t\t\tstepButton.setToolTipText(\"A busca é realizada passo-a-passo pelo click\");\r\n\r\n\t\t\tJButton animationButton = new JButton(\"INICIAR\");\r\n\t\t\tanimationButton.addActionListener(new ActionHandler());\r\n\t\t\tanimationButton.setBackground(Color.lightGray);\r\n\t\t\tanimationButton.setToolTipText(\"A pesquisa é realizada automaticamente\");\r\n\r\n\t\t\tJLabel velocity = new JLabel(\"Velocidade\", JLabel.CENTER);\r\n\t\t\tvelocity.setFont(new Font(\"Helvetica\", Font.PLAIN, 10));\r\n\r\n\t\t\tslider = new JSlider(0, 1000, 500); // valor inicial do slider em 500 msec\r\n\t\t\tslider.setToolTipText(\"Regula o atraso para cada etapa (0 to 1 sec)\");\r\n\r\n\t\t\tdelay = 1000 - slider.getValue();\r\n\t\t\tslider.addChangeListener(new ChangeListener() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void stateChanged(ChangeEvent evt) {\r\n\t\t\t\t\tJSlider source = (JSlider) evt.getSource();\r\n\t\t\t\t\tif (!source.getValueIsAdjusting()) {\r\n\t\t\t\t\t\tdelay = 1000 - source.getValue();\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// ButtonGroup que sincroniza os cinco botões de rádio \r\n\t\t\t// escolha do algoritmo, de modo que apenas uma \r\n\t\t\t// pode ser selecionada a qualquer momento\r\n\t\t\t\r\n\t\t\tButtonGroup algoGroup = new ButtonGroup();\r\n\r\n\t\t\tdfs = new JRadioButton(\"DFS\");\r\n\t\t\tdfs.setToolTipText(\"Depth First Search algorithm\");\r\n\t\t\talgoGroup.add(dfs);\r\n\t\t\tdfs.addActionListener(new ActionHandler());\r\n\r\n\t\t\tbfs = new JRadioButton(\"BFS\");\r\n\t\t\tbfs.setToolTipText(\"Breadth First Search algorithm\");\r\n\t\t\talgoGroup.add(bfs);\r\n\t\t\tbfs.addActionListener(new ActionHandler());\r\n\r\n\t\t\taStar = new JRadioButton(\"A*\");\r\n\t\t\taStar.setToolTipText(\"Algoritmo A Estrela \");\r\n\t\t\taStar.setSelected(true);\r\n\t\t\talgoGroup.add(aStar);\r\n\t\t\taStar.addActionListener(new ActionHandler());\r\n\r\n\t\t\tguloso = new JRadioButton(\"Guloso\");\r\n\t\t\tguloso.setToolTipText(\"Algoritmo de Busca Gulosa\");\r\n\t\t\talgoGroup.add(guloso);\r\n\t\t\tguloso.addActionListener(new ActionHandler());\r\n\r\n\t\t\tdijkstra = new JRadioButton(\"Dijkstra\");\r\n\t\t\tdijkstra.setToolTipText(\"Dijkstra's algorithm\");\r\n\t\t\talgoGroup.add(dijkstra);\r\n\t\t\tdijkstra.addActionListener(new ActionHandler());\r\n\r\n\t\t\tJPanel algoPanel = new JPanel();\r\n\t\t\talgoPanel.setBorder(\r\n\t\t\t\t\tjavax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(),\r\n\t\t\t\t\t\t\t\"Algoritmos\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,\r\n\t\t\t\t\t\t\tjavax.swing.border.TitledBorder.TOP, new java.awt.Font(\"Helvetica\", 0, 14)));\r\n\r\n\t\t\taStar.setSelected(true); // A* selecionado como inicial\r\n\r\n\t\t\tdiagonal = new JCheckBox(\"Movimentos Diagonais\");\r\n\t\t\tdiagonal.setToolTipText(\"Movimentos diagonais também estão autorizados\");\r\n\t\t\tdiagonal.setSelected(true);\r\n\r\n\t\t\tdrawArrows = new JCheckBox(\"Setas para antecessores\");\r\n\t\t\tdrawArrows.setToolTipText(\"Desenha setas para os antecessores\");\r\n\r\n\t\t\tJLabel robot = new JLabel(\"INICIO\", JLabel.LEFT);\r\n\t\t\trobot.setForeground(Color.red);\r\n\t\t\trobot.setFont(new Font(\"Helvetica\", Font.BOLD, 14));\r\n\r\n\t\t\tJLabel target = new JLabel(\"ALVO\", JLabel.LEFT);\r\n\t\t\ttarget.setForeground(Color.green);\r\n\t\t\ttarget.setFont(new Font(\"Helvetica\", Font.BOLD, 14));\r\n\r\n\t\t\tJLabel frontier = new JLabel(\"FRONTEIRA\", JLabel.LEFT);\r\n\t\t\tfrontier.setForeground(Color.blue);\r\n\t\t\tfrontier.setFont(new Font(\"Helvetica\", Font.BOLD, 14));\r\n\r\n\t\t\tJLabel closed = new JLabel(\"FECHADOS\", JLabel.LEFT);\r\n\t\t\tclosed.setForeground(Color.cyan);\r\n\t\t\tclosed.setFont(new Font(\"Helvetica\", Font.BOLD, 14));\r\n\r\n\t\t\tJButton aboutButton = new JButton(\"Sobre\");\r\n\t\t\taboutButton.addActionListener(new ActionHandler());\r\n\t\t\taboutButton.setBackground(Color.lightGray);\r\n\t\t\taboutButton.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\t\taboutButtonActionPerformed(evt);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t//Adicionando conteudo ao Panel\r\n\t\t\tadd(message);\r\n\t\t\tadd(rowsLbl);\r\n\t\t\tadd(rowsField);\r\n\t\t\tadd(columnsLbl);\r\n\t\t\tadd(columnsField);\r\n\t\t\tadd(resetButton);\r\n\t\t\tadd(mazeButton);\r\n\t\t\tadd(clearButton);\r\n\t\t\tadd(stepButton);\r\n\t\t\tadd(animationButton);\r\n\t\t\tadd(velocity);\r\n\t\t\tadd(slider);\r\n\t\t\tadd(dfs);\r\n\t\t\tadd(bfs);\r\n\t\t\tadd(aStar);\r\n\t\t\tadd(guloso);\r\n\t\t\tadd(dijkstra);\r\n\t\t\tadd(algoPanel);\r\n\t\t\tadd(diagonal);\r\n\t\t\t// add(drawArrows);\r\n\t\t\tadd(robot);\r\n\t\t\tadd(target);\r\n\t\t\tadd(frontier);\r\n\t\t\tadd(closed);\r\n\t\t\tadd(aboutButton);\r\n\r\n\t\t\t// Regulando posição dos componentes\r\n\t\t\tmessage.setBounds(0, 515, 500, 23);\r\n\t\t\trowsLbl.setBounds(520, 5, 140, 25);\r\n\t\t\trowsField.setBounds(665, 5, 25, 25);\r\n\t\t\tcolumnsLbl.setBounds(520, 35, 140, 25);\r\n\t\t\tcolumnsField.setBounds(665, 35, 25, 25);\r\n\t\t\tresetButton.setBounds(520, 65, 170, 25);\r\n\t\t\tmazeButton.setBounds(520, 95, 170, 25);\r\n\t\t\tclearButton.setBounds(520, 125, 170, 25);\r\n\t\t\tstepButton.setBounds(520, 155, 170, 25);\r\n\t\t\tanimationButton.setBounds(520, 185, 170, 25);\r\n\t\t\tvelocity.setBounds(520, 215, 170, 10);\r\n\t\t\tslider.setBounds(520, 225, 170, 25);\r\n\t\t\t// dfs.setBounds(530, 270, 70, 25);\r\n\t\t\t// bfs.setBounds(600, 270, 70, 25);\r\n\t\t\taStar.setBounds(530, 295, 70, 25);\r\n\t\t\tguloso.setBounds(600, 295, 85, 25);\r\n\t\t\t// dijkstra.setBounds(530, 320, 85, 25);\r\n\t\t\talgoPanel.setLocation(520, 250);\r\n\t\t\talgoPanel.setSize(170, 100);\r\n\t\t\tdiagonal.setBounds(520, 355, 170, 25);\r\n\t\t\t// drawArrows.setBounds(520, 380, 170, 25);\r\n\t\t\trobot.setBounds(530, 380, 80, 25);\r\n\t\t\ttarget.setBounds(530, 400, 80, 25);\r\n\t\t\tfrontier.setBounds(530, 420, 80, 25);\r\n\t\t\tclosed.setBounds(530, 440, 80, 25);\r\n\t\t\taboutButton.setBounds(520, 515, 170, 25);\r\n\r\n\t\t\t// Criando timer\r\n\t\t\ttimer = new Timer(delay, action);\r\n\r\n\t\t\t// Nós ligamos às células nos valores iniciais de grade.\r\n\t\t\t// Aqui é os primeiros passos dos algoritmos\r\n\t\t\tfillGrid();\r\n\r\n\t\t}"
] |
[
"0.6481506",
"0.6308262",
"0.62355196",
"0.62108725",
"0.6017477",
"0.5944937",
"0.5905617",
"0.5900884",
"0.58796716",
"0.5793823",
"0.5765277",
"0.575119",
"0.5695213",
"0.5666735",
"0.565249",
"0.5648782",
"0.5632991",
"0.5595765",
"0.55904025",
"0.55747306",
"0.55661875",
"0.55439204",
"0.5524341",
"0.55165976",
"0.5502461",
"0.54806143",
"0.54703575",
"0.5441156",
"0.543206",
"0.5427303",
"0.542317",
"0.54132164",
"0.5413035",
"0.5408845",
"0.54073745",
"0.54036534",
"0.5394501",
"0.53923523",
"0.5369565",
"0.5365776",
"0.53625005",
"0.53507906",
"0.5340461",
"0.5336277",
"0.5321658",
"0.5319772",
"0.5317321",
"0.53160226",
"0.5312482",
"0.5307044",
"0.5300685",
"0.5287832",
"0.5284999",
"0.52749705",
"0.5272059",
"0.5267665",
"0.52676475",
"0.5267595",
"0.52611405",
"0.5252146",
"0.5249242",
"0.52327913",
"0.5211657",
"0.5207519",
"0.5185657",
"0.5173665",
"0.5167062",
"0.5165344",
"0.51636636",
"0.51578426",
"0.51566976",
"0.5145448",
"0.5129009",
"0.51253724",
"0.5124381",
"0.51239735",
"0.5123403",
"0.5122671",
"0.51191825",
"0.5118353",
"0.511026",
"0.5107357",
"0.5106157",
"0.50994045",
"0.5093596",
"0.5086371",
"0.50784594",
"0.5073577",
"0.50609165",
"0.5059032",
"0.5057614",
"0.50508547",
"0.50495297",
"0.50481445",
"0.5046683",
"0.5030033",
"0.50295097",
"0.5015053",
"0.5011507",
"0.50092804"
] |
0.6166298
|
4
|
Creates a variable grid layout manager with mode FIXED_NUM_ROWS, number of rows == 1 and zero horizontal and vertical gap.
|
public VariableGridLayout() {
this(FIXED_NUM_ROWS, 1, 0, 0);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"protected void createLayout() {\n\t\tthis.layout = new GridLayout();\n\t\tthis.layout.numColumns = 2;\n\t\tthis.layout.marginWidth = 2;\n\t\tthis.setLayout(this.layout);\n\t}",
"private GridLayout initGridLayout(int rows, int colums) {\n GridLayout gridLayout = new GridLayout(this);\n gridLayout = findViewById(R.id.game_grid);\n gridLayout.setColumnCount(colums);\n gridLayout.setRowCount(rows);\n\n // gridLayout.setLayoutParams(gridLayoutParams);\n gridLayout.setOrientation(GridLayout.HORIZONTAL);\n return gridLayout;\n }",
"@Override\n protected Layout constructShellLayout() {\n GridLayout mainLayout = new GridLayout(1, false);\n\n return mainLayout;\n }",
"public DynamicGrid() {\n\t\t// constructor\n\t\t// create an empty table of 0 rows and 0 cols\n\t\tthis.storage = new DynamicArray<DynamicArray<T>>();\n\t}",
"private GridLayout buildGridData() {\n\t\tgridData = new GridLayout();\r\n\t\tgridData.setImmediate(false);\r\n\t\tgridData.setWidth(\"-1px\");\r\n\t\tgridData.setHeight(\"100.0%\");\r\n\t\tgridData.setMargin(false);\r\n\t\tgridData.setSpacing(true);\r\n\t\tgridData.setColumns(2);\r\n\t\tgridData.setRows(2);\r\n\t\t\r\n\t\t// labelA\r\n\t\tlabelA = new Label();\r\n\t\tlabelA.setImmediate(false);\r\n\t\tlabelA.setWidth(\"-1px\");\r\n\t\tlabelA.setHeight(\"-1px\");\r\n\t\tlabelA.setValue(\"<b>Autor:</b>\");\r\n\t\tlabelA.setContentMode(3);\r\n\t\tgridData.addComponent(labelA, 0, 0);\r\n\t\t\r\n\t\t// labelAuthor\r\n\t\tlabelAuthor = new Label();\r\n\t\tlabelAuthor.setImmediate(false);\r\n\t\tlabelAuthor.setWidth(\"-1px\");\r\n\t\tlabelAuthor.setHeight(\"-1px\");\r\n\t\tlabelAuthor.setValue(\"Label\");\r\n\t\tgridData.addComponent(labelAuthor, 1, 0);\r\n\t\t\r\n\t\t// labelB\r\n\t\tlabelB = new Label();\r\n\t\tlabelB.setImmediate(false);\r\n\t\tlabelB.setWidth(\"-1px\");\r\n\t\tlabelB.setHeight(\"-1px\");\r\n\t\tlabelB.setValue(\"<b>Editorial:</b>\");\r\n\t\tlabelB.setContentMode(3);\r\n\t\tgridData.addComponent(labelB, 0, 1);\r\n\t\t\r\n\t\t// labelPublisher\r\n\t\tlabelPublisher = new Label();\r\n\t\tlabelPublisher.setImmediate(false);\r\n\t\tlabelPublisher.setWidth(\"-1px\");\r\n\t\tlabelPublisher.setHeight(\"-1px\");\r\n\t\tlabelPublisher.setValue(\"Label\");\r\n\t\tgridData.addComponent(labelPublisher, 1, 1);\r\n\t\t\r\n\t\treturn gridData;\r\n\t}",
"private VerticalLayout buildGridInfo() {\n\t\tgridInfo = new VerticalLayout();\r\n\t\tgridInfo.setImmediate(false);\r\n\t\tgridInfo.setWidth(\"100%\");\r\n\t\tgridInfo.setHeight(\"100.0%\");\r\n\t\tgridInfo.setMargin(false);\r\n\t\tgridInfo.setSpacing(true);\r\n\t\t\r\n\t\t// gridTitle\r\n\t\tgridTitle = buildGridTitle();\r\n\t\tgridInfo.addComponent(gridTitle);\r\n\t\tgridInfo.setExpandRatio(gridTitle, 1.0f);\r\n\t\t\r\n\t\t// gridData\r\n\t\tgridData = buildGridData();\r\n\t\tgridInfo.addComponent(gridData);\r\n\t\tgridInfo.setExpandRatio(gridData, 1.0f);\r\n\t\t\r\n\t\treturn gridInfo;\r\n\t}",
"private GridPane inicializarPanelGrid() {\n GridPane gridPane = new GridPane();\n\n // Position the pane at the center of the screen, both vertically and horizontally\n gridPane.setAlignment(Pos.CENTER);\n\n // Set a padding of 20px on each side\n gridPane.setPadding(new Insets(40, 40, 40, 40));\n\n // Set the horizontal gap between columns\n gridPane.setHgap(10);\n\n // Set the vertical gap between rows\n gridPane.setVgap(10);\n\n // Add Column Constraints\n // columnOneConstraints will be applied to all the nodes placed in column one.\n ColumnConstraints columnOneConstraints = new ColumnConstraints(100, 100, Double.MAX_VALUE);\n columnOneConstraints.setHalignment(HPos.RIGHT);\n\n // columnTwoConstraints will be applied to all the nodes placed in column two.\n ColumnConstraints columnTwoConstrains = new ColumnConstraints(200, 200, Double.MAX_VALUE);\n columnTwoConstrains.setHgrow(Priority.ALWAYS);\n\n gridPane.getColumnConstraints().addAll(columnOneConstraints, columnTwoConstrains);\n\n return gridPane;\n }",
"private void setGrid() {\r\n maxRows = (FORM_HEIGHT - FORM_HEIGHT_ADJUST) / SQUARE_SIZE;\r\n maxColumns = (FORM_WIDTH - FORM_WIDTH_ADJUST) / SQUARE_SIZE; \r\n grid = new JLabel[maxRows][maxColumns];\r\n int y = (FORM_HEIGHT - (maxRows * SQUARE_SIZE)) / 2;\r\n for (int row = 0; row < maxRows; row++) {\r\n int x = (FORM_WIDTH - (maxColumns * SQUARE_SIZE)) / 2;\r\n for (int column = 0; column < maxColumns; column++) {\r\n createSquare(x,y,row,column);\r\n x += SQUARE_SIZE;\r\n }\r\n y += SQUARE_SIZE;\r\n } \r\n }",
"private RecyclerView.LayoutManager createLayoutManager() {\n int orientation = getResources().getConfiguration().orientation;\n int columnNum;\n if (orientation == Configuration.ORIENTATION_PORTRAIT) {\n columnNum = COLUMN_NUM_PORT;\n } else {\n columnNum = COLUMN_NUM_LAND;\n }\n return new GridLayoutManager(this, columnNum);\n }",
"private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, new Dimension(100, 20), new Dimension(100, 20), new Dimension(100, 20), 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonClose = new JButton();\n buttonClose.setText(\"Close\");\n panel2.add(buttonClose, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n messageLabel = new JLabel();\n messageLabel.setText(\"\");\n panel3.add(messageLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }",
"public void createGrid() {\n\t\tint[][] neighbours = getIo().getNeighbours();\n\t\tsetGrid(new GridAlg(neighbours, animals));\n\t\tgetGrid().setStep(getStep());\n\t}",
"public void createGrid() {\r\n generator.generate();\r\n }",
"private void createGrid() {\n Platform.runLater(() -> {\n\n // Update UI here\n //createGrid(numRows); // E.g. let's create a 20 x 20 grid\n createGrid(20);\n });\n }",
"@AutoGenerated\r\n\tprivate GridLayout buildMainLayout() {\n\t\tmainLayout = new GridLayout();\r\n\t\tmainLayout.setImmediate(false);\r\n\t\tmainLayout.setWidth(\"-1px\");\r\n\t\tmainLayout.setMargin(true);\r\n\t\tmainLayout.setSpacing(true);\r\n\t\tmainLayout.setRows(2);\r\n\t\t\r\n\t\t// top-level component properties\r\n\t\tsetWidth(\"-1px\");\r\n\t\t\r\n\t\t// verticalLayout_1\r\n\t\thorizontalLayout_1 = buildHorizontalLayout_1();\r\n\t\tmainLayout.addComponent(horizontalLayout_1, 0, 0);\r\n\t\t\r\n\t\treturn mainLayout;\r\n\t}",
"private Grid makeGrid()\n\t{\n\t\tGrid grid = Grid.grid().\n\t\t\t\tBus(\"1\").\n\t\t\t\tSlackSource(\"Slack\", BASE_VOLTAGE, 0, 0, 0).\n\t\t\t\tLine(\"1-2\", 1, 0.06*BASE_IMPEDANCE, 0.03*BASE_IMPEDANCE).\n\t\t\t\t\tBus(\"2\").\n\t\t\t\t\t\tControllableDemand(\"S\").\n\t\t\t\t\t\tLine(\"2-3\", 1, 0.06*BASE_IMPEDANCE, 0.03*BASE_IMPEDANCE).\n\t\t\t\t\t\t\tBus(\"3\").\n\t\t\t\t\t\t\t\tLoad(\"L\").\n\t\t\t\t\t\t\tterminate().\n\t\t\t\t\t\tterminate().\n\t\t\t\t\t\tLine(\"2-4\", 1, 0.06*BASE_IMPEDANCE, 0.03*BASE_IMPEDANCE).\n\t\t\t\t\t\tBus(\"4\").\n\t\t\t\t\t\t\tDistributedSource(\"DG\").\n\t\t\t\t\t\tterminate().\n\t\t\t\t\tterminate().\n\t\t\t\t\tterminate().\n\t\t\t\tterminate().\n\t\t\tterminate().\n\t\tgrid();\n\t\t\n\t\t// x_0:\n\t\tLoad load = grid.getLoad(\"L\");\n\t\tControllableDemand storage = grid.getControllableDemand(\"S\");\n\t\tDistributedSource dg = grid.getDistributedSource(\"DG\");\n\t\tsetupUnits(load, storage, dg);\n\t\t\n\t\treturn grid;\n\t}",
"Board createLayout();",
"private GridData newGridData(int horizSpan) {\n GridData gd = new GridData();\n gd.horizontalSpan = horizSpan;\n return gd;\n }",
"public Node createGrid() {\n\t\tGroup gridGroup = new Group();\n\t\tgridGroup.getChildren().addAll(buildXYPlane());\n\t\t/*\n\t\t * XXX extend the grid\n\t\t * \n\t\t * here it would be possible to extend the grid, e.g. with a graph\n\t\t * or another plane with a grid (XZ, YZ, ...).\n\t\t * \n\t\t * it would look like this:\n\t\t * gridGroup.getChildren().addAll(buildGraph());\n\t\t */\n\t\treturn gridGroup;\n\t}",
"private JPanel initializePanel() {\n JPanel myPanel = new JPanel();\n //myPanel.setPreferredSize(new Dimension(600,600));\n\n myPanel.setLayout(new GridLayout(8,8));\n myPanel.setSize(600,600);\n myPanel.setLocation(100,100);\n myPanel.setBorder(new LineBorder(Color.BLACK));\n return myPanel;\n }",
"GridPanel create(GridDataModel model);",
"@AutoGenerated\r\n\tprivate GridLayout buildPnlDatos() {\n\t\tpnlDatos = new GridLayout();\r\n\t\tpnlDatos.setImmediate(false);\r\n\t\tpnlDatos.setWidth(\"350px\");\r\n\t\tpnlDatos.setHeight(\"-1px\");\r\n\t\tpnlDatos.setMargin(false);\r\n\t\tpnlDatos.setSpacing(true);\r\n\t\tpnlDatos.setColumns(2);\r\n\t\tpnlDatos.setRows(3);\r\n\t\t\r\n\t\t// lblUsuario\r\n\t\tlblUsuario = new Label();\r\n\t\tlblUsuario.setImmediate(false);\r\n\t\tlblUsuario.setWidth(\"-1px\");\r\n\t\tlblUsuario.setHeight(\"-1px\");\r\n\t\tlblUsuario.setValue(\"Usuario\");\r\n\t\tpnlDatos.addComponent(lblUsuario, 0, 0);\r\n\t\tpnlDatos.setComponentAlignment(lblUsuario, new Alignment(34));\r\n\t\t\r\n\t\t// txtUsuario\r\n\t\ttxtUsuario = new TextField();\r\n\t\ttxtUsuario.setImmediate(false);\r\n\t\ttxtUsuario.setWidth(\"-1px\");\r\n\t\ttxtUsuario.setHeight(\"-1px\");\r\n\t\tpnlDatos.addComponent(txtUsuario, 1, 0);\r\n\t\tpnlDatos.setComponentAlignment(txtUsuario, new Alignment(33));\r\n\t\t\r\n\t\t// lblClave\r\n\t\tlblClave = new Label();\r\n\t\tlblClave.setImmediate(false);\r\n\t\tlblClave.setWidth(\"-1px\");\r\n\t\tlblClave.setHeight(\"-1px\");\r\n\t\tlblClave.setValue(\"Contraseña\");\r\n\t\tpnlDatos.addComponent(lblClave, 0, 1);\r\n\t\tpnlDatos.setComponentAlignment(lblClave, new Alignment(34));\r\n\t\t\r\n\t\t// txtClave\r\n\t\ttxtClave = new PasswordField();\r\n\t\ttxtClave.setImmediate(false);\r\n\t\ttxtClave.setWidth(\"-1px\");\r\n\t\ttxtClave.setHeight(\"-1px\");\r\n\t\tpnlDatos.addComponent(txtClave, 1, 1);\r\n\t\tpnlDatos.setComponentAlignment(txtClave, new Alignment(33));\r\n\t\t\r\n\t\treturn pnlDatos;\r\n\t}",
"public static GridPane createHorizontalGridPane(final Control... controls) {\n if (controls.length == 0) {\n return new GridPane();\n }\n\n final GridPane pane = new GridPane();\n final double sectionWidth = 100.0 / controls.length;\n\n for (final Control ignored : controls) {\n final ColumnConstraints constraints = new ColumnConstraints();\n constraints.setPercentWidth(sectionWidth);\n\n pane.getColumnConstraints().add(constraints);\n }\n\n for (int i = 0 ; i < controls.length ; i++) {\n pane.add(controls[i], i, 0);\n }\n\n return pane;\n }",
"private void InitilizeGridLayout() {\n Resources r = getResources();\n float padding = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,\n Const.GRID_PADDING, r.getDisplayMetrics());\n\n // Column width\n columnWidth = (int) ((getScreenWidth() - ((4) * padding)) / 2);\n\n // Setting number of grid columns\n mGridView.setNumColumns(2);\n mGridView.setColumnWidth(columnWidth);\n mGridView.setStretchMode(GridView.NO_STRETCH);\n mGridView.setPadding((int) padding, (int) padding, (int) padding,\n (int) padding);\n\n // Setting horizontal and vertical padding\n mGridView.setHorizontalSpacing((int) padding);\n mGridView.setVerticalSpacing((int) padding);\n }",
"public void initGridGUI() {\n JLabel jl = new JLabel(Integer.toString(0));\n jl.setVisible(false);\n //TODO: create keyListener for the 'enter' key\n //when the enter key is pressed the following code should be run (note: this assumes jt is the name of the\n // JTextField variable)\n\n JFrame frame = new JFrame(\"Sudoku\");\n frame.setSize(400, 450);\n frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\n frame.setLayout(new GridLayout(9, 9));\n JPanel[][] panels = new JPanel[9][9];\n\n Border border= BorderFactory.createLineBorder(Color.black);\n\n\n\n for (int i = 0; i < 9; i++) {\n for (int c = 0; c < 9; c++){\n panels[i][c] = new JPanel();\n panels[i][c].setBorder(border);\n panels[i][c].setSize(50, 50);\n\n Border left = BorderFactory.createMatteBorder(0, 5, 0, 0, Color.black);\n Border right = BorderFactory.createMatteBorder(0, 0, 0, 5, Color.black);\n Border top = BorderFactory.createMatteBorder(5, 0, 0, 0, Color.black);\n Border bottom = BorderFactory.createMatteBorder(0, 0, 5, 0, Color.black);\n\n\n if ((i+1)%3!=0 && c == 0) {\n panels[i][c].setBorder(BorderFactory.createCompoundBorder(border, left));\n }\n if ((c+1)%3!=0 && i == 0) {\n panels[i][c].setBorder(BorderFactory.createCompoundBorder(border, top));\n }\n if ((i+1)%3!=0 && c == 8) {\n panels[i][c].setBorder(BorderFactory.createCompoundBorder(border, right));\n }\n if ((c+1)%3!=0 && i == 8) {\n panels[i][c].setBorder(BorderFactory.createCompoundBorder(border, bottom));\n }\n if (i ==0 && c==0){\n panels[i][c].setBorder(BorderFactory.createCompoundBorder(border, BorderFactory.createCompoundBorder(left, top)));\n }\n if (i ==8 && c==0){\n panels[i][c].setBorder(BorderFactory.createCompoundBorder(border, BorderFactory.createCompoundBorder(left, bottom)));\n }\n if (i ==0 && c==8){\n panels[i][c].setBorder(BorderFactory.createCompoundBorder(border, BorderFactory.createCompoundBorder(right, top)));\n }\n if (i ==8 && c==8){\n panels[i][c].setBorder(BorderFactory.createCompoundBorder(border, BorderFactory.createCompoundBorder(bottom, right)));\n }\n if (i == 0 && (c == 2||c==5)) {\n panels[i][c].setBorder(BorderFactory.createCompoundBorder(border, BorderFactory.createCompoundBorder(right, top)));\n }\n if (c == 0 && (i == 2||i==5)) {\n panels[i][c].setBorder(BorderFactory.createCompoundBorder(border, BorderFactory.createCompoundBorder(left, bottom)));\n }\n if (c == 8 && (i == 2||i==5)) {\n panels[i][c].setBorder(BorderFactory.createCompoundBorder(border, BorderFactory.createCompoundBorder(right, bottom)));\n }\n if (i == 8 && (c == 2||c==5)) {\n panels[i][c].setBorder(BorderFactory.createCompoundBorder(border, BorderFactory.createCompoundBorder(right, bottom)));\n }\n if ((c == 2||c==5) && (i == 2||i==5)) {\n panels[i][c].setBorder(BorderFactory.createCompoundBorder(border, BorderFactory.createCompoundBorder(right, bottom)));\n }\n\n if (((c==2)||(c==5)) && (i == 1||i==3||i==4||i==6||i==7)) {\n panels[i][c].setBorder(BorderFactory.createCompoundBorder(border, right));\n }\n\n if (((i==2)||(i==5)) && (c == 1||c==3||c==4||c==6||c==7)) {\n panels[i][c].setBorder(BorderFactory.createCompoundBorder(border, bottom));\n }\n\n\n int x = i;\n int y = c;\n if (SudokuModel.game[x][y] != 0){\n JLabel label = new JLabel(String.valueOf(SudokuModel.game[x][y]));\n panels[i][c].add(label);\n } else {\n JLabel label = new JLabel();\n JTextField field = new JTextField(null, 2);\n panels[i][c].add(field);\n field.addKeyListener(new KeyAdapter() { //add key listener\n @Override\n public void keyPressed(KeyEvent e) {\n if (e.getKeyCode() == KeyEvent.VK_ENTER){ //when enter key is pressed\n int in = Integer.parseInt(field.getText().trim());\n\n if (checkValid(x, y, in)) {\n field.setVisible(false);\n label.setText(Integer.toString(in));\n\n\n panels[x][y].add(label); //add label to panel\n label.setVisible(true);\n panels[x][y].setVisible(true);\n }\n\n }\n }\n });\n panels[i][c].add(field);\n panels[i][c].add(label);\n\n }\n\n frame.add(panels[i][c]); //add panel\n }\n }\n\n frame.setVisible(true);\n\n }",
"public interface GridPanelFactory {\r\n /**\r\n * Creates an instance of the grid panel and initializes it.\r\n *\r\n * @param model is a model instance.\r\n * @return a newly created grid panel.\r\n */\r\n GridPanel create(GridDataModel model);\r\n\r\n /**\r\n * This method creates a data model.<p>\r\n * It's used by the hiearachical grid if there is no data model defined for the cell \r\n * in the parent data model.\r\n *\r\n * @param parentRow is a parent model row.\r\n * @param parentModel is a parent model instance.\r\n * \r\n * @return a data model.\r\n */\r\n GridDataModel create(int parentRow, GridDataModel parentModel);\r\n}",
"GridBagLayoutCalc(){\n\n windowContent = new JPanel();\n\n // Set the layout manager for this panel\n GridBagLayout gblwc = new GridBagLayout();\n windowContent.setLayout(gblwc);\n\n\n // Create the display field and place it in the\n // North area of the window\n\n displayField = new JTextField(20);\n gblwc.setConstraints(displayField, constr);\n windowContent.add(\"0\",displayField);\n \n\n // Create buttons using constructor of the\n // class JButton that takes the label of the\n // button as a parameter\n\n JButton[] numbers = new JButton[10];\n JButton[] equals = new JButton[1];\n JButton[] controllers = new JButton[4];\n\n String[] numbers_name = {\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"0\"};\n String[] equals_name = {\"=\"};\n String[] controllers_name = {\"+\", \"-\", \"*\", \"/\"};\n\n // Create the panel with the GridBagLayout with 15 buttons\n //10 numeric ones, 4 controllers, and the equal sign\n\n p1 = new JPanel();\n GridBagLayout gbl =new GridBagLayout();\n p1.setLayout(gbl);\n\n // Add window controls to the panel p1\n panelMaker(numbers, numbers_name, p1, Color.BLUE);\n panelMaker(equals, equals_name, p1, Color.BLACK);\n panelMaker(controllers, controllers_name, p1, Color.BLACK);\n\n }",
"private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));\n materialFirstWordLabel = new JLabel();\n materialFirstWordLabel.setText(\"нет данных\");\n contentPane.add(materialFirstWordLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(10, -1), null, 0, false));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n materialMarkLabel = new JLabel();\n materialMarkLabel.setText(\" \");\n materialMarkLabel.setVerticalTextPosition(1);\n panel1.add(materialMarkLabel, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n materialProfileLabel = new JLabel();\n materialProfileLabel.setText(\" \");\n materialProfileLabel.setVerticalTextPosition(3);\n panel1.add(materialProfileLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n materialSeparator = new JSeparator();\n panel1.add(materialSeparator, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n contentPane.add(spacer1, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n }",
"public void setBoard() {\n margin = Math.round((sizeOfCell * 3) / 2);\n RelativeLayout.LayoutParams marginParam = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n marginParam.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);\n marginParam.addRule(RelativeLayout.CENTER_HORIZONTAL);\n marginParam.setMargins(0, 0, 0, (margin));\n gridContainer.setLayoutParams(marginParam);\n\n LinearLayout.LayoutParams lpRow = new LinearLayout.LayoutParams(sizeOfCell * maxN, sizeOfCell);\n LinearLayout.LayoutParams lpCell = new LinearLayout.LayoutParams(sizeOfCell, sizeOfCell);\n LinearLayout linRow;\n\n for (int row = 0; row < maxN; row++) {\n linRow = new LinearLayout(context);\n for (int col = 0; col < maxN; col++) {\n ivCell[row][col] = new ImageView(context);\n linRow.addView(ivCell[row][col], lpCell);\n }\n linBoardGame.addView(linRow, lpRow);\n }\n }",
"private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonOK = new JButton();\n buttonOK.setText(\"OK\");\n panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n content = new JPanel();\n content.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(content, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n tabbedPane1 = new JTabbedPane();\n content.add(tabbedPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, 200), null, 0, false));\n Gesture = new JPanel();\n Gesture.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n tabbedPane1.addTab(\"Gesture\", Gesture);\n final JLabel label1 = new JLabel();\n label1.setIcon(new ImageIcon(getClass().getResource(\"/reference/by_gesture.png\")));\n label1.setText(\"\");\n Gesture.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }",
"public VariableGridLayout(int mode, int size) {\n\t\tthis(mode, size, 0, 0);\n\t}",
"public JPanel createPanel(List<AbstractFieldEditor> editorList,int cols) {\n\r\n JPanel panel=new JPanel();\r\n\r\n panel.setLayout(new GridBagLayout());\r\n \r\n int row = 0;\r\n\r\n int col = 0;\r\n\r\n for (int i = 0; i < editorList.size(); i++) {\r\n\r\n AbstractFieldEditor comp = editorList.get(i);\r\n\r\n if (comp.isVisible()) {\r\n\r\n if (comp instanceof NewLineFieldEditor) {\r\n row++;\r\n col = 0;\r\n continue;\r\n } else if (comp instanceof TextAreaFieldEditor) {\r\n // 转到新的一行\r\n row++;\r\n col = 0;\r\n JLabel label = new JLabel(getLabelText(comp));\r\n if (comp.getMaxContentSize() != 9999) {\r\n label.setText(comp.getName() + \"(\"+ comp.getMaxContentSize() + \"字内)\" + \"*\");\r\n }\r\n comp.setPreferredSize(new Dimension(150, comp.getOccRow() * 26));\r\n \r\n panel.add(label, new GridBagConstraints(col,row, 1, 1, 1.0, 1.0, GridBagConstraints.EAST,GridBagConstraints.NONE, new Insets(4, 0, 4, 4), 0,0));\r\n\r\n panel.add(comp, new GridBagConstraints(col + 1,row, comp.getOccCol(), comp.getOccRow(), 1.0, 1.0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL, new Insets(4, 0, 4,4), 0, 0));\r\n\r\n // 将当前所占的行空间偏移量计算上\r\n row += comp.getOccRow();\r\n col = 0;\r\n\r\n continue;\r\n }\r\n\r\n JLabel label = new JLabel(comp.getName());\r\n\r\n comp.setPreferredSize(new Dimension(200, 23));\r\n\r\n panel.add(label, new GridBagConstraints(col, row, 1,1, 1.0, 1.0, GridBagConstraints.EAST,GridBagConstraints.NONE, new Insets(5, 0, 5, 5), 0, 0));\r\n\r\n panel.add(comp, new GridBagConstraints(col + 1, row,1, 1, 1.0, 1.0, GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL, new Insets(5, 0, 5, 5),0, 0));\r\n\r\n if (col == cols * 2 - 2) {\r\n row++;\r\n col = 0;\r\n } else {\r\n col += 2;\r\n }\r\n }\r\n\r\n }\r\n return panel;\r\n }",
"private Grid<Movimiento> createGrid() {\n\t\tgrid = new Grid<>();\n\t\tgrid.addThemeVariants(GridVariant.LUMO_NO_BORDER,GridVariant.LUMO_ROW_STRIPES);\n\t\t\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\n\t\tgrid.addComponentColumn(c -> new IconoMovimientoTarjeta(c))\n\t\t.setWidth(\"100px\").setHeader(\"Tarjeta\").setFlexGrow(1);\n\t\tgrid.addColumn(c -> c.getCantidad()+\" €\").setHeader(\"Cantidad\").setFlexGrow(1);\n grid.addColumn(c -> c.getConcepto()).setHeader(\"Concepto\").setFlexGrow(1);\n grid.addColumn(c -> dateFormat.format(c.getFecha())).setHeader(\"Fecha\").setWidth(\"125px\").setFlexGrow(0);\n \n return grid;\n\t}",
"private void $$$setupUI$$$() {\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel = new JPanel();\n mainPanel.setLayout(new GridLayoutManager(8, 4, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(mainPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n mainPanel.setBorder(BorderFactory.createTitledBorder(\"New Mapper Pattern Keywords\"));\n final JLabel label1 = new JLabel();\n label1.setText(\"Insert\");\n mainPanel.add(label1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n insertPatternTextField = new JTextField();\n mainPanel.add(insertPatternTextField, new GridConstraints(2, 1, 1, 3, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150,\n -1), null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"Delete\");\n mainPanel.add(label2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n deletePatternTextField = new JTextField();\n mainPanel.add(deletePatternTextField, new GridConstraints(3, 1, 1, 3, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150,\n -1), null, 0, false));\n final JLabel label3 = new JLabel();\n label3.setText(\"Update\");\n mainPanel.add(label3, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n updatePatternTextField = new JTextField();\n mainPanel.add(updatePatternTextField, new GridConstraints(4, 1, 1, 3, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150,\n -1), null, 0, false));\n final JLabel label4 = new JLabel();\n label4.setText(\"Select\");\n mainPanel.add(label4, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n selectPatternTextField = new JTextField();\n mainPanel.add(selectPatternTextField, new GridConstraints(5, 1, 1, 3, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150,\n -1), null, 0, false));\n final JLabel label5 = new JLabel();\n label5.setText(\"Patterns should be separated with \\\";\\\"\");\n mainPanel.add(label5, new GridConstraints(0, 1, 1, 3, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n modelComboBox = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n defaultComboBoxModel1.addElement(\"startWith\");\n defaultComboBoxModel1.addElement(\"endWith\");\n defaultComboBoxModel1.addElement(\"contain\");\n modelComboBox.setModel(defaultComboBoxModel1);\n mainPanel.add(modelComboBox, new GridConstraints(1, 1, 1, 3, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n mainPanel.add(spacer1, new GridConstraints(7, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final JLabel label6 = new JLabel();\n label6.setText(\"Model\");\n mainPanel.add(label6, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n openNaviButton = new JRadioButton();\n openNaviButton.setText(\"开\");\n mainPanel.add(openNaviButton, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED\n , null, null, null, 0, false));\n openNaviLabel = new JLabel();\n openNaviLabel.setText(\"导航开关\");\n mainPanel.add(openNaviLabel, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n closeNaviRadioButton = new JRadioButton();\n closeNaviRadioButton.setText(\"关\");\n mainPanel.add(closeNaviRadioButton, new GridConstraints(6, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }",
"public JComponent createContentPanel() {\n\t\t// Separating the component initialization and configuration\n\t\t// from the layout code makes both parts easier to read.\n\t\tinitControls();\n\t\t//TODO set minimum size\n\t\tFormLayout layout = new FormLayout(\"default, 3dlu, default\", // cols\n\t\t\t\t\"p, 3dlu,p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu\"); // rows\n\t\tDefaultFormBuilder builder = new DefaultFormBuilder(layout);\n\t\tbuilder.setDefaultDialogBorder();\n\t\tCellConstraints cc = new CellConstraints();\n\t\t\n\t\tIterator l=labels.iterator();\n\t\tIterator c=valueComponents.iterator();\n\t\twhile (l.hasNext()){\n\t\t String name=(String)l.next();\n\t\t JComponent comp=(JComponent)c.next();\n\t\t builder.append(name,comp);\n\t\t builder.nextLine(2);\n\t\t}\n\t\treturn builder.getPanel();\n\t}",
"private void initialize() {\n\n\t\tGridLayout gridLayout = new GridLayout();\n\t\tgridLayout.setRows(1);\n\t\t\n\t\tGridBagLayout gridbag = new GridBagLayout();\n\t\tbase=new JPanel(gridbag);\n\t\tbase.setBackground(new Color(250,251,245));\n\t\t// default size\n\t\tbase.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\n\t\t//base.setPreferredSize(new Dimension(200,320));\n\t\t\n\t\t/*\n\t\t// separator\n\t\tGridBagConstraints constraints1 = new GridBagConstraints();\n\t\tconstraints1.gridx = 0;\n\t\tconstraints1.gridy = 0;\n\t\tconstraints1.gridwidth= 1;\n\t\tconstraints1.gridheight = 1;\n\t\tconstraints1.insets = new Insets(0, 0, 0, 0);\n\n\t\tJSeparator vspr=new JSeparator(JSeparator.HORIZONTAL);\n\t\tvspr.setPreferredSize(new Dimension(200, 20));\n\t\tgridbag.setConstraints(vspr, constraints1);\n\t\tbase.add(vspr);\n\t\t*/\n\t\t\n\t\t// panel1\n\t\tString st = Path.getPath()+\"/images//program_h6_bg_illuminance.gif\";\n\t\tif(IsMacorWin.isMacOrWin()==false) st = Path.getPath()+\"images\\\\/program_h6_bg_illuminance.gif\";\n\n\t\tgJPanel = new GJPanel(st);\n\t\tgJPanel.setText(\"LEDライト\");\n\n\t\tGridBagConstraints constraints1 = new GridBagConstraints();\n\t\tconstraints1.gridx = 0;\n\t\tconstraints1.gridy = 1;\n\t\tconstraints1.gridwidth= 1;\n\t\tconstraints1.gridheight = 1;\n\t\tconstraints1.insets = new Insets(0, 0, 0, 0);\n\t\tgridbag.setConstraints(gJPanel, constraints1);\n\t\tbase.add(gJPanel);\n\t\t\n\t\t\n\t\t// panel\n\t\tJPanel jp1=new JPanel();\n\t\tjp1.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\n\t\tjp1.setLayout(gridLayout);\n//\t\tjp1.setPreferredSize(new Dimension(gJPanel.getWidth(),gJPanel.getHeight()));\n\t\tjp1.setPreferredSize(new Dimension(160,50));\n\t\tjp1.setBackground(Color.gray);\n\t\n//\n\t\tifD1=new InfoDispEdit();\n\t\tifD1.setText(\"警告下限照度\");\n\t\t// lux\n\t\tString[] illumdata=new String[50];\n\t\tfor(int i=0;i<50;i++){\n\t\t\tillumdata[i]= String.valueOf(i*100);\n\t\t}\n\t\tifD1.setSelectionItems(illumdata);\n\t\tifD1.setSelectedIndex(22);// 2500 lux\n\t\tifD1.setUnit(\"lux\");\n\t\t//\n\t\tGridBagConstraints constraints2 = new GridBagConstraints();\n\t\tconstraints2.gridy = 0;\t\n\t\tconstraints2.gridy = 2;\t\n\t\tconstraints2.gridwidth= 1;\n\t\tconstraints2.gridheight = 1;\n\t\tconstraints2.insets = new Insets(0, 0, 0, 0);\n\t\tgridbag.setConstraints(ifD1, constraints2);\n\t\t\n\t\tif(Version.getRevision().equals(\"Education\")!=true)\n\t\t\tbase.add(ifD1);\n\n\t\tsetParentClass(this);\n\t\tthis.setLayout(new BorderLayout());\n\t\tthis.add( base, BorderLayout.CENTER );\n\n\t\t// 観察される人を生成\n\t\tobservableMan = new ObservableMan();\n\n\t\t// デフォルトの観察者を追加\n\t\tdefaultO=new PlantPrgEdit.ObserverA();\n\t\tobservableMan.addObserver(defaultO);\n\t}",
"private void $$$setupUI$$$() {\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n }",
"private void setViewLayout() {\n\t\tthis.setBorder(new EmptyBorder(15, 15, 15, 15));\n\t\tthis.setLayout(new GridLayout(2, 2, 15, 15));\n\t}",
"private void setUpLayout() {\n\n this.setLayout(new GridLayout(7, 1, 40, 37));\n this.setBackground(new Color(72, 0, 0));\n this.setBorder(BorderFactory.createEmptyBorder(8, 150, 8, 150));\n }",
"private HorizontalLayout buildMainLayout() {\n\t\tmainLayout = new HorizontalLayout();\r\n\t\tmainLayout.setImmediate(false);\r\n\t\tmainLayout.setWidth(\"100%\");\r\n\t\tmainLayout.setHeight(\"-1px\");\r\n\t\tmainLayout.setMargin(true);\r\n\t\tmainLayout.setSpacing(true);\r\n\t\t\r\n\t\t// top-level component properties\r\n\t\tsetWidth(\"100%\");\r\n\t\tsetHeight(\"100%\");\r\n\t\t\r\n\t\t// panelImg\r\n\t\tpanelImg = buildPanelImg();\r\n\t\tmainLayout.addComponent(panelImg);\r\n\t\t\r\n\t\t// gridInfo\r\n\t\tgridInfo = buildGridInfo();\r\n\t\tmainLayout.addComponent(gridInfo);\r\n\t\t\r\n\t\treturn mainLayout;\r\n\t}",
"private void createGrid(int numRows) {\n // Creates a grid so that we can display the animation. We will see\n // other layout panes in the lectures.\n grid = new GridPane();\n\n // We need to create a 2D array of javafx Buttons that we will\n // add to the grid. The 2D array makes it much easier to change\n // the colour of the buttons in the grid; easy lookup using\n // 2D indicies. Note that we make this read-only for this display\n // onlt grid. If you go for flair marks, then I'd imagine that you\n // could create something similar that allows you to edits frames\n // in the footage.\n gridArray = new Button[numRows][numRows];\n Button displayButton = null;\n for (int row = 0; row < numRows; row++) {\n for (int col = 0; col < numRows; col++) { // The display is square\n displayButton = new Button();\n gridArray[row][col] = displayButton;\n displayButton.setDisable(true);\n grid.add(displayButton, col, row);\n }\n }\n\n // Create a scene to hold the grid of buttons\n // The stage will \"shrink wrap\" around the grid of buttons,\n // so we don't need to set its height and width.\n scene = new Scene(grid);\n stage.setScene(scene);\n scene.getStylesheets().add(Animator.class.getResource(\"styling.css\").toExternalForm());\n\n // Make it resizable so that the window shrinks to fit the scene grid\n stage.setResizable(true);\n stage.sizeToScene();\n // Raise the curtain on the stage!\n stage.show();\n // Stop the user from resizing the window\n stage.setResizable(false);\n }",
"protected void adjustGridLayout() {\n\t\tint numColumns = calcNumberOfColumns();\n\t\t((GridLayout) fieldEditorParent.getLayout()).numColumns = numColumns;\n\t\tif (fields != null) {\n\t\t\tfor (int i = 0; i < fields.size(); i++) {\n\t\t\t\tFieldEditor fieldEditor = fields.get(i);\n\t\t\t\tfieldEditor.fillIntoGrid(fieldEditorParent, numColumns);\n\t\t\t}\n\t\t}\n\t}",
"private TilePane createGrid() {\n\t\tTilePane board = new TilePane();\n\t\tboard.setPrefRows(9);\n\t\tboard.setPrefColumns(9);\n\t\tboard.setPadding(new Insets(3,3,3,3));\n\t\tboard.setHgap(3); //Horisontal gap between tiles\n\t\tboard.setVgap(3); //Vertical gap between tiles\n\t\t\n\t\t//Creates and colors tiles\n\t\tfor(int i = 0; i < 9; i++){\n\t\t\tfor(int k = 0; k < 9; k++){\n\t\t\t\tLetterTextField text = new LetterTextField();\n\t\t\t\ttext.setPrefColumnCount(1);\n\t\t\t\t\n\t\t\t\tif(!(i/3 == 1 || k/3 == 1) || (i/3 == 1 && k/3 == 1)){\n\t\t\t\t\ttext.setStyle(\"-fx-background-color: #daa520;\");\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfield[i][k] = text;\n\t\t\t\tboard.getChildren().add(text);\n\t\t\t}\n\t\t}\t\t\n\t\treturn board;\n\t}",
"void initLayout() {\n\t\t/* Randomize the number of rows and columns */\n\t\tNUM = Helper.randomizeNumRowsCols();\n\n\t\t/* Remove all the children of the gridContainer. It will be added again */\n\t\tpiecesGrid.removeAllViews();\n\t\t\n\t\t/* Dynamically calculate the screen positions and sizes of the individual pieces\n\t * Store the starting (x,y) of all the pieces in pieceViewLocations */\n\t\tpieceViewLocations = InitDisplay.initialize(getScreenDimensions(), getRootLayoutPadding());\n\t\t\n\t\t/* Create an array of ImageViews to store the individual piece images */\n\t\tcreatePieceViews();\n\t\t\n\t\t/* Add listeners to the ImageViews that were created above */\n\t\taddImageViewListeners();\n\t}",
"public Grid() {\n super(); // create a new JPanel\n grid = new ArrayList<>(); // initialize a list containing the blocks\n \n setLayout(null); // format the component\n setFocusable(false);\n setBackground(Block.deadColor);\n addComponentListener(new java.awt.event.ComponentAdapter() { // detects when the window is resized to resize the grid\n @Override\n public void componentResized(java.awt.event.ComponentEvent evt) {\n resizeGrid();\n }\n });\n \n // provide a link to the grid to classes so that all instances have access to it\n PathFinder.setGrid(this);\n EscapeBlock.setGrid(this);\n Character.setGrid(this);\n \n }",
"private void initGrids() {\n grid0 = new Grid(100f, 50f, 100f, 0);\n grid1 = new Grid(100f, 150f, 100f, 1);\n grid2 = new Grid(100f, 250f, 100f, 2);\n grid3 = new Grid(100f, 350f, 100f, 3);\n grid4 = new Grid(100f, 50f, 200f, 4);\n grid5 = new Grid(100f, 150f, 200f, 5);\n grid6 = new Grid(100f, 250f, 200f, 6);\n grid7 = new Grid(100f, 350f, 200f, 7);\n grid8 = new Grid(100f, 50f, 300f, 8);\n grid9 = new Grid(100f, 150f, 300f, 9);\n grid10 = new Grid(100f, 250f, 300f, 10);\n grid11 = new Grid(100f, 350f, 300f, 11);\n grid12 = new Grid(100f, 50f, 400f, 12);\n grid13 = new Grid(100f, 150f, 400f, 13);\n grid14 = new Grid(100f, 250f, 400f, 14);\n grid15 = new Grid(100f, 350f, 400f, 15);\n\n /**\n * Adding grids from 0 to 15 to static ArayList of all grids\n */\n grids.clear();\n\n grids.add(grid0);\n grids.add(grid1);\n grids.add(grid2);\n grids.add(grid3);\n grids.add(grid4);\n grids.add(grid5);\n grids.add(grid6);\n grids.add(grid7);\n grids.add(grid8);\n grids.add(grid9);\n grids.add(grid10);\n grids.add(grid11);\n grids.add(grid12);\n grids.add(grid13);\n grids.add(grid14);\n grids.add(grid15);\n }",
"private void initializeGrid() {\r\n if (this.rowCount > 0 && this.columnCount > 0) {\r\n this.cellViews = new Rectangle[this.rowCount][this.columnCount];\r\n for (int row = 0; row < this.rowCount; row++) {\r\n for (int column = 0; column < this.columnCount; column++) {\r\n Rectangle rectangle = new Rectangle();\r\n rectangle.setX((double)column * CELL_WIDTH);\r\n rectangle.setY((double)row * CELL_WIDTH);\r\n rectangle.setWidth(CELL_WIDTH);\r\n rectangle.setHeight(CELL_WIDTH);\r\n this.cellViews[row][column] = rectangle;\r\n this.getChildren().add(rectangle);\r\n }\r\n }\r\n }\r\n }",
"private Pane getGridPane ()\r\n {\r\n GridPane gridPane = new GridPane();\r\n \r\n int i = 0;\r\n for(Button b : this.buttons)\r\n {\r\n gridPane.add( b, i*(i+(int)b.getWidth()), 0);\r\n i++;\r\n }\r\n \r\n return gridPane;\r\n }",
"@AutoGenerated\n\tprivate GridLayout buildGridLayout_1() {\n\t\tgridLayout_1 = new GridLayout();\n\t\tgridLayout_1.setImmediate(false);\n\t\tgridLayout_1.setWidth(\"-1px\");\n\t\tgridLayout_1.setHeight(\"-1px\");\n\t\tgridLayout_1.setMargin(true);\n\t\tgridLayout_1.setSpacing(true);\n\t\tgridLayout_1.setColumns(2);\n\t\tgridLayout_1.setRows(13);\n\t\t\n\t\t// l_nombre\n\t\tl_nombre = new Label();\n\t\tl_nombre.setImmediate(false);\n\t\tl_nombre.setWidth(\"200px\");\n\t\tl_nombre.setHeight(\"18px\");\n\t\tl_nombre.setValue(\"Nombres:\");\n\t\tgridLayout_1.addComponent(l_nombre, 0, 0);\n\t\t\n\t\t// tf_nombres\n\t\ttf_nombres = new TextField();\n\t\ttf_nombres.setImmediate(false);\n\t\ttf_nombres.setWidth(\"300px\");\n\t\ttf_nombres.setHeight(\"-1px\");\n\t\tgridLayout_1.addComponent(tf_nombres, 1, 0);\n\t\t\n\t\t// l_apellidos\n\t\tl_apellidos = new Label();\n\t\tl_apellidos.setImmediate(false);\n\t\tl_apellidos.setWidth(\"-1px\");\n\t\tl_apellidos.setHeight(\"-1px\");\n\t\tl_apellidos.setValue(\"Apellidos:\");\n\t\tgridLayout_1.addComponent(l_apellidos, 0, 1);\n\t\t\n\t\t// tf_apellidos\n\t\ttf_apellidos = new TextField();\n\t\ttf_apellidos.setImmediate(false);\n\t\ttf_apellidos.setWidth(\"100.0%\");\n\t\ttf_apellidos.setHeight(\"-1px\");\n\t\tgridLayout_1.addComponent(tf_apellidos, 1, 1);\n\t\t\n\t\t// l_pass\n\t\tl_pass = new Label();\n\t\tl_pass.setImmediate(false);\n\t\tl_pass.setWidth(\"-1px\");\n\t\tl_pass.setHeight(\"-1px\");\n\t\tl_pass.setValue(\"Contraseña:\");\n\t\tgridLayout_1.addComponent(l_pass, 0, 2);\n\t\t\n\t\t// pw_pass\n\t\tpw_pass = new PasswordField();\n\t\tpw_pass.setImmediate(false);\n\t\tpw_pass.setWidth(\"100.0%\");\n\t\tpw_pass.setHeight(\"-1px\");\n\t\tgridLayout_1.addComponent(pw_pass, 1, 2);\n\t\t\n\t\t// l_confirmarPass\n\t\tl_confirmarPass = new Label();\n\t\tl_confirmarPass.setImmediate(false);\n\t\tl_confirmarPass.setWidth(\"-1px\");\n\t\tl_confirmarPass.setHeight(\"-1px\");\n\t\tl_confirmarPass.setValue(\"Confirmar Contraseña:\");\n\t\tgridLayout_1.addComponent(l_confirmarPass, 0, 3);\n\t\t\n\t\t// pw_confirmarPass\n\t\tpw_confirmarPass = new PasswordField();\n\t\tpw_confirmarPass.setImmediate(false);\n\t\tpw_confirmarPass.setWidth(\"100.0%\");\n\t\tpw_confirmarPass.setHeight(\"-1px\");\n\t\tgridLayout_1.addComponent(pw_confirmarPass, 1, 3);\n\t\t\n\t\t// l_nick\n\t\tl_nick = new Label();\n\t\tl_nick.setImmediate(false);\n\t\tl_nick.setWidth(\"-1px\");\n\t\tl_nick.setHeight(\"-1px\");\n\t\tl_nick.setValue(\"Nombre Usuario/Nick:\");\n\t\tgridLayout_1.addComponent(l_nick, 0, 4);\n\t\t\n\t\t// tf_nick\n\t\ttf_nick = new TextField();\n\t\ttf_nick.setImmediate(false);\n\t\ttf_nick.setWidth(\"100.0%\");\n\t\ttf_nick.setHeight(\"-1px\");\n\t\tgridLayout_1.addComponent(tf_nick, 1, 4);\n\t\t\n\t\t// l_Registro\n\t\tl_Registro = new Label();\n\t\tl_Registro.setImmediate(false);\n\t\tl_Registro.setWidth(\"-1px\");\n\t\tl_Registro.setHeight(\"-1px\");\n\t\tl_Registro.setValue(\"Fecha de Registro:\");\n\t\tgridLayout_1.addComponent(l_Registro, 0, 5);\n\t\t\n\t\t// l_fechaRegistro\n\t\tl_fechaRegistro = new Label();\n\t\tl_fechaRegistro.setImmediate(false);\n\t\tl_fechaRegistro.setWidth(\"100.0%\");\n\t\tl_fechaRegistro.setHeight(\"-1px\");\n\t\tl_fechaRegistro.setValue(\"---------\");\n\t\tgridLayout_1.addComponent(l_fechaRegistro, 1, 5);\n\t\t\n\t\t// l_genero\n\t\tl_genero = new Label();\n\t\tl_genero.setImmediate(false);\n\t\tl_genero.setWidth(\"-1px\");\n\t\tl_genero.setHeight(\"-1px\");\n\t\tl_genero.setValue(\"Genero:\");\n\t\tgridLayout_1.addComponent(l_genero, 0, 6);\n\t\t\n\t\t// opg_sexo\n\t\topg_sexo = new OptionGroup();\n\t\topg_sexo.setImmediate(false);\n\t\topg_sexo.setWidth(\"100.0%\");\n\t\topg_sexo.setHeight(\"30px\");\n\t\tgridLayout_1.addComponent(opg_sexo, 1, 6);\n\t\t\n\t\t// l_email\n\t\tl_email = new Label();\n\t\tl_email.setImmediate(false);\n\t\tl_email.setWidth(\"-1px\");\n\t\tl_email.setHeight(\"-1px\");\n\t\tl_email.setValue(\"Email:\");\n\t\tgridLayout_1.addComponent(l_email, 0, 7);\n\t\t\n\t\t// tf_email\n\t\ttf_email = new TextField();\n\t\ttf_email.setImmediate(false);\n\t\ttf_email.setWidth(\"100.0%\");\n\t\ttf_email.setHeight(\"-1px\");\n\t\tgridLayout_1.addComponent(tf_email, 1, 7);\n\t\t\n\t\t// l_nacionalidad\n\t\tl_nacionalidad = new Label();\n\t\tl_nacionalidad.setImmediate(false);\n\t\tl_nacionalidad.setWidth(\"-1px\");\n\t\tl_nacionalidad.setHeight(\"-1px\");\n\t\tl_nacionalidad.setValue(\"Nacionalidad:\");\n\t\tgridLayout_1.addComponent(l_nacionalidad, 0, 8);\n\t\t\n\t\t// cb_nacionalidad\n\t\tcb_nacionalidad = new ComboBox();\n\t\tcb_nacionalidad.setImmediate(false);\n\t\tcb_nacionalidad.setWidth(\"100%\");\n\t\tcb_nacionalidad.setHeight(\"-1px\");\n\t\tgridLayout_1.addComponent(cb_nacionalidad, 1, 8);\n\t\t\n\t\t// l_blog\n\t\tl_blog = new Label();\n\t\tl_blog.setImmediate(false);\n\t\tl_blog.setWidth(\"-1px\");\n\t\tl_blog.setHeight(\"-1px\");\n\t\tl_blog.setValue(\"Tu Blog/Web:\");\n\t\tgridLayout_1.addComponent(l_blog, 0, 9);\n\t\t\n\t\t// tf_blogWeb\n\t\ttf_blogWeb = new TextField();\n\t\ttf_blogWeb.setImmediate(false);\n\t\ttf_blogWeb.setWidth(\"100.0%\");\n\t\ttf_blogWeb.setHeight(\"-1px\");\n\t\tgridLayout_1.addComponent(tf_blogWeb, 1, 9);\n\t\t\n\t\t// l_facebook\n\t\tl_facebook = new Label();\n\t\tl_facebook.setImmediate(false);\n\t\tl_facebook.setWidth(\"-1px\");\n\t\tl_facebook.setHeight(\"-1px\");\n\t\tl_facebook.setValue(\"Facebook:\");\n\t\tgridLayout_1.addComponent(l_facebook, 0, 10);\n\t\t\n\t\t// tf_facebook\n\t\ttf_facebook = new TextField();\n\t\ttf_facebook.setImmediate(false);\n\t\ttf_facebook.setWidth(\"100.0%\");\n\t\ttf_facebook.setHeight(\"-1px\");\n\t\tgridLayout_1.addComponent(tf_facebook, 1, 10);\n\t\t\n\t\t// l_twitter\n\t\tl_twitter = new Label();\n\t\tl_twitter.setImmediate(false);\n\t\tl_twitter.setWidth(\"-1px\");\n\t\tl_twitter.setHeight(\"-1px\");\n\t\tl_twitter.setValue(\"Twitter:\");\n\t\tgridLayout_1.addComponent(l_twitter, 0, 11);\n\t\t\n\t\t// tf_twitter\n\t\ttf_twitter = new TextField();\n\t\ttf_twitter.setImmediate(false);\n\t\ttf_twitter.setWidth(\"100.0%\");\n\t\ttf_twitter.setHeight(\"-1px\");\n\t\tgridLayout_1.addComponent(tf_twitter, 1, 11);\n\t\t\n\t\t// l_descripcion\n\t\tl_descripcion = new Label();\n\t\tl_descripcion.setImmediate(false);\n\t\tl_descripcion.setWidth(\"-1px\");\n\t\tl_descripcion.setHeight(\"-1px\");\n\t\tl_descripcion.setValue(\"Descripción:\");\n\t\tgridLayout_1.addComponent(l_descripcion, 0, 12);\n\t\t\n\t\t// ta_descripcion\n\t\tta_descripcion = new TextArea();\n\t\tta_descripcion.setImmediate(false);\n\t\tta_descripcion.setWidth(\"100.0%\");\n\t\tta_descripcion.setHeight(\"60px\");\n\t\tgridLayout_1.addComponent(ta_descripcion, 1, 12);\n\t\t\n\t\treturn gridLayout_1;\n\t}",
"public RegularGrid() {\r\n }",
"private void createComponents() {\n view = new JPanel(new GridBagLayout());\n\n GridBagConstraints constraints = new GridBagConstraints();\n constraints.gridx = 0;\n constraints.gridy = 0;\n constraints.weightx = 1;\n constraints.weighty = 1;\n constraints.fill = GridBagConstraints.BOTH;\n\n view.add(new JPanel(), constraints);\n\n constraints.gridy = 1;\n view.add(new JPanel(), constraints);\n\n constraints.gridx = 1;\n constraints.weighty = 4;\n constraints.weightx = 6;\n view.add(renderMain(), constraints);\n\n constraints.gridx = 2;\n constraints.weightx = 1;\n constraints.weighty = 1;\n view.add(new JPanel(), constraints);\n\n constraints.gridx = 0;\n constraints.gridy = 2;\n view.add(renderBottom(), constraints);\n\n registerEvents();\n }",
"public GriddedPanel() {\n this(new Insets(2, 2, 2, 2));\n\n }",
"public void createLayout() {\n\t\tpersons = createPersonGuessPanel();\t\t\n\t\tweapons = createWeaponGuessPanel();\n\t\trooms = createRoomGuessPanel();\n\t\t\n\t\tpersonCheckList = createPeoplePanel();\n\t\tweaponCheckList =createWeaponsPanel(); \n\t\troomCheckList = createRoomsPanel();\n\t\t\n\t\tJPanel completed = new JPanel();\n\t\tcompleted.setLayout(new GridLayout(3, 2));\n\t\tadd(completed, BorderLayout.CENTER);\n\t\tcompleted.add(personCheckList);\n\t\tcompleted.add(persons);\n\t\tcompleted.add(weaponCheckList);\n\t\tcompleted.add(weapons);\n\t\tcompleted.add(roomCheckList);\n\t\tcompleted.add(rooms);\n\t}",
"protected void makeContent() {\n\n \t// panel for main control and setup\n\tGridBagLayout setGridBag = new GridBagLayout();\n\tmainPanel.setLayout(setGridBag);\n\n\tInsets sepInsets = new Insets(5, 0, 5, 0);\n\tInsets nullInsets = new Insets(0, 0, 0, 0);\n\tInsets defaultInsets = new Insets(5,5,5,5);\n\t\n\tint sumy = 0;\n\tGridBagConstraints gbc = new GridBagConstraints();\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 0.; gbc.weighty = 0.;\n\tgbc.gridx = 0; gbc.gridy = sumy++;\n\tgbc.insets = new Insets(10, 5, 10,5);\n\tgbc.gridwidth = 3;\n\tsetGridBag.setConstraints(sequenceLabel, gbc);\n\tmainPanel.add(sequenceLabel);\n\n\tgbc.fill = GridBagConstraints.HORIZONTAL;\n\tgbc.insets = sepInsets;\n\tgbc.weightx = 1.;\n\tgbc.gridx = 0; gbc.gridy = sumy++;\n\tJSeparator sep1 = new JSeparator(SwingConstants.HORIZONTAL);\n\tsetGridBag.setConstraints(sep1, gbc);\n\tmainPanel.add(sep1);\n\tsep1.setVisible(true);\n\t\n\tJLabel typeLabel = new JLabel(\"Device Type\");\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 0; gbc.gridy = sumy;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(typeLabel, gbc);\n\tmainPanel.add(typeLabel);\n\t\n\tJLabel pvLabel = new JLabel(\"PV Choice\");\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 1; gbc.gridy = sumy;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(pvLabel, gbc);\n\tmainPanel.add(pvLabel);\n\t\n\tJLabel actionLabel = new JLabel(\"Action Choice\");\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 2; gbc.gridy = sumy++;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(actionLabel, gbc);\n\tmainPanel.add(actionLabel);\t\n\t\n\ttypeList.setListData(nullDevices);\n\ttypeList.setVisibleRowCount(6);\n\ttypeList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\t\n\tJScrollPane typeScrollPane = new JScrollPane(typeList);\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 0; gbc.gridy = sumy;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(typeScrollPane, gbc);\n\tmainPanel.add(typeScrollPane);\n\ttypeList.addMouseListener(new MouseAdapter() {\n public void mouseClicked(MouseEvent evt) {\n theDoc.typeSelected();\n }\n\t});\t\n\t\n\tsignalList.setListData(nullSignals);\n\tsignalList.setVisibleRowCount(6);\n\tsignalList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\t\t\n\tJScrollPane signalScrollPane = new JScrollPane(signalList);\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 1; gbc.gridy = sumy;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(signalScrollPane, gbc);\n\tmainPanel.add(signalScrollPane);\n\tsignalList.addMouseListener(new MouseAdapter() {\n public void mouseClicked(MouseEvent evt) {\n theDoc.signalSelected();\n }\n\t});\t\n\t\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 2; gbc.gridy = sumy++;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(actionChoice, gbc);\n\tmainPanel.add(actionChoice);\n\n\tgbc.fill = GridBagConstraints.HORIZONTAL;\n\tgbc.insets = sepInsets;\n\tgbc.gridwidth = 3;\tgbc.weightx = 1.;\n\tgbc.gridx = 0; gbc.gridy = sumy++;\n\tJSeparator sep2 = new JSeparator(SwingConstants.HORIZONTAL);\n\tsetGridBag.setConstraints(sep2, gbc);\n\tmainPanel.add(sep2);\n\tsep2.setVisible(true);\n\t\n\tJLabel setValueLabel = new JLabel(\"Set Value\");\n\tgbc.gridwidth = 1;\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 0; gbc.gridy = sumy;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(setValueLabel, gbc);\n\tmainPanel.add(setValueLabel);\n\n\tJLabel selectValueLabel = new JLabel(\"Select Value\");\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 1; gbc.gridy = sumy++;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(selectValueLabel, gbc);\n\tmainPanel.add(selectValueLabel);\n\t\n\tvalueField = new DoubleInputTextField( (new Double(theDoc.newSetValue)).toString());\n\tvalueField.setNumberFormat(new DecimalFormat(\"####.#####\"));\n\tvalueField.setEnabled(false);\n\tvalueField.setPreferredSize(new Dimension(80, 20));\n\tgbc.weightx = 1.; gbc.weighty = 1.;\t\n\tgbc.gridx = 0; gbc.gridy = sumy;\n\tvalueField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n theDoc.newSetValue= valueField.getValue();\n }\n\t});\t\t\n\tsetGridBag.setConstraints(valueField, gbc);\n\tmainPanel.add(valueField);\n\n\tvalueList = new JList<String>(nullValues);\n\tvalueList.setEnabled(false);\n\tgbc.weightx = 1.; gbc.weighty = 1.;\t\n\tgbc.gridx = 1; gbc.gridy = sumy++;\n\tvalueList.addMouseListener(new MouseAdapter() {\n public void mouseClicked(MouseEvent evt) {\n theDoc.newSetValueString = valueList.getSelectedValue();\n }\n\t});\t\t\n\tsetGridBag.setConstraints(valueList, gbc);\n\tmainPanel.add(valueList);\n\t\n\tJSeparator sep3 = new JSeparator(SwingConstants.HORIZONTAL);\n\tgbc.fill = GridBagConstraints.HORIZONTAL;\n\tgbc.insets = sepInsets;\n\tgbc.gridwidth = 3;\tgbc.weightx = 1.;\n\tgbc.gridx = 0; gbc.gridy = sumy++;\n\tsetGridBag.setConstraints(sep2, gbc);\n\tmainPanel.add(sep3);\n\tsep3.setVisible(true);\n\t\n\tJButton confirmButton = new JButton(\"Confirm\");\n\tconfirmButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n theDoc.confirmIt();\t\t\n }\n\t});\t\t\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 0.; gbc.weighty = 0.;\n\tgbc.gridx = 0; gbc.gridy = sumy;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(confirmButton, gbc);\n\tmainPanel.add(confirmButton);\n\t\n\t\n\ttextArea = new JTextArea(\"\");\n\tJScrollPane textScrollPane = new JScrollPane(textArea);\n\ttextScrollPane.setVerticalScrollBarPolicy(\n JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n textScrollPane.setPreferredSize(new Dimension(100, 150));\n textScrollPane.setMinimumSize(new Dimension(10, 10));\t\n\tgbc.insets = nullInsets;\n\tgbc.fill = GridBagConstraints.BOTH;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridwidth = 2; gbc.gridheight = 2;\t\n\tgbc.gridx = 1; gbc.gridy = sumy++;\n\tsetGridBag.setConstraints(textScrollPane, gbc);\n\tmainPanel.add(textScrollPane);\t\t\n\t// The analysis plot panel:\t\n\t\n\tJButton doItButton = new JButton(\"Set'em\");\n\tdoItButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n theDoc.fireSignals();\t\t\n }\n\t});\t\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 0.; gbc.weighty = 0.;\n\tgbc.gridx = 0; gbc.gridy = sumy;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(doItButton, gbc);\n\tmainPanel.add(doItButton);\t\n\t\n\t// the type selection list:\n\t\n\t//\tcontainer.add(mainTabbedPane,BorderLayout.CENTER);\n\t//container.add(errorText,BorderLayout.SOUTH);\n\n }",
"@AutoGenerated\r\n\tprivate GridLayout buildGridLayout_4() {\n\t\tgridLayout_4 = new GridLayout();\r\n\t\tgridLayout_4.setWidth(\"100.0%\");\r\n\t\tgridLayout_4.setHeight(\"100.0%\");\r\n\t\tgridLayout_4.setImmediate(false);\r\n\t\tgridLayout_4.setMargin(false);\r\n\t\tgridLayout_4.setSpacing(true);\r\n\t\tgridLayout_4.setColumns(5);\r\n\t\tgridLayout_4.setRows(7);\r\n\t\t\r\n\t\t// frmtLbl\r\n\t\tfrmtLbl = new Label();\r\n\t\tfrmtLbl.setWidth(\"-1px\");\r\n\t\tfrmtLbl.setHeight(\"-1px\");\r\n\t\tfrmtLbl.setValue(\"Format\");\r\n\t\tfrmtLbl.setImmediate(false);\r\n\t\tgridLayout_4.addComponent(frmtLbl, 0, 1);\r\n\t\t\r\n\t\t// slctFrmt\r\n\t\tslctFrmt = new NativeSelect();\r\n\t\tslctFrmt.setWidth(\"-1px\");\r\n\t\tslctFrmt.setHeight(\"-1px\");\r\n\t\tslctFrmt.setImmediate(false);\r\n\t\tslctFrmt.addItem(\"mp4\");\r\n\t\tslctFrmt.addItem(\"avi\");\r\n\t\tslctFrmt.addItem(\"mov\");\r\n\t\tslctFrmt.addItem(\"flv\");\r\n\t\tslctFrmt.setValue(\"mp4\"); //set default video format\r\n\t\tgridLayout_4.addComponent(slctFrmt, 1, 1);\r\n\t\t\r\n\t\t// cdcLbl\r\n\t\tcdcLbl = new Label();\r\n\t\tcdcLbl.setWidth(\"-1px\");\r\n\t\tcdcLbl.setHeight(\"-1px\");\r\n\t\tcdcLbl.setValue(\"Codec\");\r\n\t\tcdcLbl.setImmediate(false);\r\n\t\tgridLayout_4.addComponent(cdcLbl, 0, 2);\r\n\t\t\r\n\t\t// slctCdc\r\n\t\tslctCdc = new NativeSelect();\r\n\t\tslctCdc.setWidth(\"-1px\");\r\n\t\tslctCdc.setHeight(\"-1px\");\r\n\t\tslctCdc.setImmediate(false);\r\n\t\tgridLayout_4.addComponent(slctCdc, 1, 2);\r\n\t\t\r\n\t\treturn gridLayout_4;\r\n\t}",
"public GridBagConstraints createGridConstraints(int top, int left, int bottom, int right, int L) {\n\t\tGridBagConstraints gbc= new GridBagConstraints();\n\t\tgbc.weightx = 1;\n\t\tgbc.weighty = 1;\n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = 0;\n\t\tgbc.insets = new Insets(top,left, bottom,right);\n\t\tgbc.anchor = L;\n\t\treturn gbc;\n\t}",
"private void $$$setupUI$$$() {\n topPanel = new JPanel();\n topPanel.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));\n headerLabel = new JLabel();\n headerLabel.setText(\"Header\");\n topPanel.add(headerLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n contentPanel = new JPanel();\n contentPanel.setLayout(new BorderLayout(0, 0));\n topPanel.add(contentPanel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), -1, -1));\n topPanel.add(panel1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n buttonBack = new JButton();\n buttonBack.setText(\"Back\");\n panel1.add(buttonBack, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonNext = new JButton();\n buttonNext.setText(\"Next\");\n panel1.add(buttonNext, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonCancel = new JButton();\n buttonCancel.setText(\"Cancel\");\n panel1.add(buttonCancel, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n topPanel.add(panel2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n statusLabel = new JLabel();\n statusLabel.setText(\"Status\");\n panel2.add(statusLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }",
"private void initIslandGrid()\n {\n // Add the grid\n int rows = game.getNumRows();\n int columns = game.getNumColumns();\n // set up the layout manager for the island grid panel\n pnlIsland.setLayout(new GridLayout(rows, columns));\n // create all the grid square panels and add them to the panel\n // the layout manager of the panel takes care of assigning them to the\n // the right position\n for ( int row = 0 ; row < rows ; row++ )\n {\n for ( int col = 0 ; col < columns ; col++ )\n {\n pnlIsland.add(new GridSquarePanel(game, row, col));\n }\n }\n }",
"private void $$$setupUI$$$() {\r\n final JPanel panel1 = new JPanel();\r\n panel1.setLayout(new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel = new JPanel();\r\n mMainPanel.setLayout(new GridLayoutManager(15, 3, new Insets(0, 0, 0, 0), -1, -1));\r\n panel1.add(mMainPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n label = new JLabel();\r\n Font labelFont = this.$$$getFont$$$(null, -1, 28, label.getFont());\r\n if (labelFont != null) label.setFont(labelFont);\r\n label.setText(\"CodeRecommender\");\r\n mMainPanel.add(label, new GridConstraints(0, 0, 2, 1, GridConstraints.ANCHOR_NORTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer1 = new Spacer();\r\n mMainPanel.add(spacer1, new GridConstraints(5, 2, 1, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_NONE, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final JPanel panel2 = new JPanel();\r\n panel2.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel.add(panel2, new GridConstraints(4, 0, 6, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel3 = new JPanel();\r\n panel3.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel2.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n statement = new JTextArea();\r\n statement.setBackground(new Color(-12434103));\r\n statement.setColumns(0);\r\n statement.setEditable(false);\r\n statement.setEnabled(true);\r\n Font statementFont = this.$$$getFont$$$(\"Arial\", Font.PLAIN, 15, statement.getFont());\r\n if (statementFont != null) statement.setFont(statementFont);\r\n statement.setText(\" In the current ai craze, we want to use neural network-related technology to grab a large amount of source code from the open source community to achieve the recommendation of the N+1 line of code from the known N lines of code, and package this function into a practical plug-in on the IDE.\");\r\n panel3.add(statement, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, 70), null, 1, false));\r\n final JPanel panel4 = new JPanel();\r\n panel4.setLayout(new GridLayoutManager(12, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.setBackground(new Color(-12828863));\r\n panel3.add(panel4, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n Download = new JButton();\r\n Font DownloadFont = this.$$$getFont$$$(null, -1, 12, Download.getFont());\r\n if (DownloadFont != null) Download.setFont(DownloadFont);\r\n Download.setText(\"Find\");\r\n panel4.add(Download, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel5 = new JPanel();\r\n panel5.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel5, new GridConstraints(11, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JLabel label1 = new JLabel();\r\n label1.setText(\"See the guide on the https://github.com/huangjihui511/java-code-recommand-IDEA-plugin \");\r\n panel5.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer2 = new Spacer();\r\n panel5.add(spacer2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\r\n pathTextField = new JTextField();\r\n pathTextField.setEditable(false);\r\n Font pathTextFieldFont = this.$$$getFont$$$(\"Arial\", Font.PLAIN, 12, pathTextField.getFont());\r\n if (pathTextFieldFont != null) pathTextField.setFont(pathTextFieldFont);\r\n pathTextField.setText(\"/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 \");\r\n panel4.add(pathTextField, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\r\n SetPath = new JButton();\r\n Font SetPathFont = this.$$$getFont$$$(null, -1, 12, SetPath.getFont());\r\n if (SetPathFont != null) SetPath.setFont(SetPathFont);\r\n SetPath.setText(\"Set\");\r\n panel4.add(SetPath, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n Help = new JButton();\r\n Help.setText(\"Help\");\r\n panel4.add(Help, new GridConstraints(11, 1, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel6 = new JPanel();\r\n panel6.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel6.setFocusTraversalPolicyProvider(false);\r\n panel6.setFocusable(false);\r\n panel4.add(panel6, new GridConstraints(10, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel7 = new JPanel();\r\n panel7.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel7, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JLabel label2 = new JLabel();\r\n label2.setIcon(new ImageIcon(getClass().getResource(\"/timg (1) - 副本.jpg\")));\r\n label2.setText(\"\");\r\n panel7.add(label2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JLabel label3 = new JLabel();\r\n label3.setIcon(new ImageIcon(getClass().getResource(\"/微信图片_20190328224952 (2) - 副本.jpg\")));\r\n label3.setText(\"\");\r\n panel7.add(label3, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel8 = new JPanel();\r\n panel8.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel7.add(panel8, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel9 = new JPanel();\r\n panel9.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel9, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n webaddressTextField = new JTextField();\r\n webaddressTextField.setEditable(false);\r\n Font webaddressTextFieldFont = this.$$$getFont$$$(\"Arial\", Font.PLAIN, 12, webaddressTextField.getFont());\r\n if (webaddressTextFieldFont != null) webaddressTextField.setFont(webaddressTextFieldFont);\r\n webaddressTextField.setText(\"/Volumes/PythonSupporting\");\r\n panel4.add(webaddressTextField, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\r\n final JPanel panel10 = new JPanel();\r\n panel10.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel10, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JLabel label4 = new JLabel();\r\n Font label4Font = this.$$$getFont$$$(\"Consolas\", Font.BOLD, 14, label4.getFont());\r\n if (label4Font != null) label4.setFont(label4Font);\r\n label4.setText(\"Find the package\");\r\n panel10.add(label4, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer3 = new Spacer();\r\n panel10.add(spacer3, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\r\n final JPanel panel11 = new JPanel();\r\n panel11.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel11.setToolTipText(\"\");\r\n panel4.add(panel11, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JLabel label5 = new JLabel();\r\n Font label5Font = this.$$$getFont$$$(\"Consolas\", Font.BOLD, 14, label5.getFont());\r\n if (label5Font != null) label5.setFont(label5Font);\r\n label5.setText(\"Set the path\");\r\n panel11.add(label5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer4 = new Spacer();\r\n panel11.add(spacer4, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\r\n final JPanel panel12 = new JPanel();\r\n panel12.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel12, new GridConstraints(9, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel13 = new JPanel();\r\n panel13.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel13, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel14 = new JPanel();\r\n panel14.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel14, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel15 = new JPanel();\r\n panel15.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel15, new GridConstraints(8, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n pic = new JPanel();\r\n pic.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n pic.putClientProperty(\"html.disable\", Boolean.FALSE);\r\n panel3.add(pic, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n a = new JLabel();\r\n a.setText(\"\");\r\n pic.add(a, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel16 = new JPanel();\r\n panel16.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n pic.add(panel16, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel17 = new JPanel();\r\n panel17.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n pic.add(panel17, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel18 = new JPanel();\r\n panel18.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel2.add(panel18, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final Spacer spacer5 = new Spacer();\r\n mMainPanel.add(spacer5, new GridConstraints(5, 1, 10, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_NONE, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final JPanel panel19 = new JPanel();\r\n panel19.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel.add(panel19, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel20 = new JPanel();\r\n panel20.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel.add(panel20, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final Spacer spacer6 = new Spacer();\r\n panel1.add(spacer6, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final Spacer spacer7 = new Spacer();\r\n panel1.add(spacer7, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final Spacer spacer8 = new Spacer();\r\n panel1.add(spacer8, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n }",
"private void initializeGrid() {\n // 50 pixel first row for banner\n addPercentRows(root, 5);\n // second row takes up 100% of the remaining space\n addPercentRows(root, 95);\n // One column at 100% width\n addPercentColumns(root, 100);\n\n Label title = new Label(\"Mission Control\");\n title.setFont(new Font(\"Arial\", 22));\n title.setTextFill(Color.WHITE);\n\n GridPane contentGrid = new GridPane();\n // Only need one row as content will fill the entire vertical space\n addPercentRows(contentGrid, 100);\n\n // Need three columns, 1/6 column for nav, 2/3 for main content, 1/6 for warnings\n double sidePanelPercent = (1d / 6d) * 100d;\n double centerPanelPercent = (2d / 3d) * 100d;\n addPercentColumns(contentGrid, sidePanelPercent, centerPanelPercent, sidePanelPercent);\n\n\n addNodeToGrid(title, root, 0, 0, Pos.CENTER, Colours.PRIMARY_COLOUR, Insets.EMPTY);\n // NOTE:: This assumes that it is the only child added to root by this point to set ID.\n // If this is changed DynamicGuiTests will break.\n root.getChildren().get(0).setId(\"pnBanner\");\n\n addNodeToGrid(contentGrid, root, 1, 0);\n\n setupCenterPanel(contentGrid);\n setupRightHandSidePanel(contentGrid);\n setupLeftHandSidePanel(contentGrid);\n\n // Assert they are created - mainly to bypass Spot bugs issues.\n assert this.navigationView != null;\n assert this.graphView != null;\n assert this.informationView != null;\n }",
"public GridPane initializeGridPane() {\n\t\tGridPane world = new GridPane();\n\t\t\n\t\tfor (int x = 0; x < this.columns; x++) {\n\t\t\tfor (int y = 0; y < this.rows; y++) {\n\t\t\t\tRectangle cellGUI = new Rectangle(this.widthOfCells - 1, this.heightOfCells - 1);\n\t\t\t\tcellGUI.setFill(Color.web(\"#FFFFFF\"));\t\t// White cell background color\n cellGUI.setStroke(Color.web(\"#C0C0C0\")); \t// Grey cell border color\n cellGUI.setStrokeWidth(1); \t\t\t\t\t// Width of the border\n\n world.add(cellGUI, x, y);\n this.cellGUIArray[x][y] = cellGUI;\n\n cellGUI.setOnMouseClicked((event) -> {\n \tthis.currentGeneration = this.simulation.getCurrentGeneration();\n for (int i = 0; i < columns; i++) {\n for (int j = 0; j < rows; j++) {\n if (this.cellGUIArray[i][j].equals(cellGUI) && this.currentGeneration[i][j] == 0) {\n this.currentGeneration[i][j] = 1;\n } else if (this.cellGUIArray[i][j].equals(cellGUI) && this.currentGeneration[i][j] == 1) {\n this.currentGeneration[i][j] = 0;\n }\n }\n }\n this.simulation.setCurrentGeneration(this.currentGeneration);\n });\n\t\t\t}\n\t\t}\n\t\treturn world;\n\t}",
"public JComponent createTopPanel() {\n\n\t//\tcontent();\n\t\tfields = new JTextField[NBR_FIELDS];\n\t\tmyTable = new PalletTable(db);\n\t\ttable = new JTable(myTable);\n\t\ttable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);\n\t\ttable.setPreferredScrollableViewportSize(new Dimension(750, 100));\n table.setFillsViewportHeight(true);\n\t\tscroll = new JScrollPane(table);\n\t//\tcontent();\n\t\tmainPanel= new JPanel();\n\t\tmainPanel.setLayout(new GridBagLayout());\n\t\tGridBagConstraints c = new GridBagConstraints();\n\t\tc.gridy=0;\n\t\tmainPanel.add(scroll,c);\n\t\tc.gridy=1;\n\t\tmainPanel.add(content(),c);\n\t\t//scroll.setPreferredSize(new Dimension(300,250));\n\t\treturn mainPanel;\n\t}",
"private void initialize() {\n GridBagConstraints gridBagConstraints21 = new GridBagConstraints();\n gridBagConstraints21.gridx = 0;\n gridBagConstraints21.weightx = 1.0D;\n gridBagConstraints21.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints21.gridy = 1;\n GridBagConstraints gridBagConstraints11 = new GridBagConstraints();\n gridBagConstraints11.gridx = 0;\n gridBagConstraints11.insets = new java.awt.Insets(2, 2, 2, 2);\n gridBagConstraints11.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints11.weightx = 1.0D;\n gridBagConstraints11.weighty = 1.0D;\n gridBagConstraints11.gridy = 2;\n GridBagConstraints gridBagConstraints = new GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0D;\n gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);\n gridBagConstraints.gridy = 0;\n this.setLayout(new GridBagLayout());\n setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Manage Grid Map File\",\n javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION,\n null, PortalLookAndFeel.getPanelLabelColor()));\n this.add(getGridMapFilePanel(), gridBagConstraints);\n this.add(getTablePanel(), gridBagConstraints11);\n this.add(getControlPanel(), gridBagConstraints21);\n }",
"public SameGnomeFrame() {\n\t\tsetSize(DEFUALT_WIDTH,DEFUALT_WIDTH);\n\t\tintializeGridBall();\n\t\tgrid = new GridComponent(gridBall);\n\t\tadd(grid);\n\t\t\n\t}",
"private void createTileViews() {\n\t\tfor (short row = 0; row < gridSize; row++) {\n\t\t\tfor (short column = 0; column < gridSize; column++) {\n\t\t\t\tTileView tv = new TileView(context, row, column);\n\t\t\t\ttileViews.add(tv);\n\t\t\t\ttableRow.get(row).addView(tv);\n\t\t\t} // end column\n\t\t\tparentLayout.addView(tableRow.get(row));\n\t\t} // end row\n\n\t}",
"private void makeContainer(){\n Container X = (Container) ((SpringGridLayout) headlineContainer.getLayout()).getChild(1, 0);\n if (!(X == null)) headlineContainer.removeChild(X);\n\n Container sub = new Container(new SpringGridLayout(Axis.X,Axis.Y,FillMode.Last,FillMode.None));\n sub.setBackground(null); // just in case style sets an bg here\n Container sub1 = new Container();\n sub1.setBackground(null);\n Container sub2 = new Container();\n sub2.setBackground(null);\n Container sub3 = new Container();\n sub3.setBackground(null);\n\n sub.addChild(sub1);\n sub.addChild(sub2);\n sub.addChild(sub3);\n\n headlineContainer.addChild(sub ,1,0);\n/*\n sub2.setName(\"TEST\");\n sub3.setBackground(new QuadBackgroundComponent(ColorRGBA.Pink));\n\n // sub1.setPreferredSize(new Vector3f(25,50,0));\n sub1.setBackground(new QuadBackgroundComponent(ColorRGBA.Green));\n */\n }",
"@Override\n public void buildGrid(){\n for(int column=0; column<columns; column++){\n for(int row=0; row<rows; row++){\n grid[column][row] = \"[ ]\";\n }\n }\n }",
"protected void createMainPanel() {\n\t\tthis.mainPanel = new VerticalPanel(); \n\t\tthis.mainPanel.setSpacing(5);\n\t\tthis.mainPanel.setScrollMode(getScrollMode());\n\t}",
"private Panel buildPanelImg() {\n\t\tpanelImg = new Panel();\r\n\t\tpanelImg.setImmediate(false);\r\n\t\tpanelImg.setWidth(\"-1px\");\r\n\t\tpanelImg.setHeight(\"-1px\");\r\n\t\t\r\n\t\t// gridImg\r\n\t\tgridImg = new HorizontalLayout();\r\n\t\tgridImg.setImmediate(false);\r\n\t\tgridImg.setWidth(\"128px\");\r\n\t\tgridImg.setHeight(\"128px\");\r\n\t\tgridImg.setMargin(false);\r\n\t\tpanelImg.setContent(gridImg);\r\n\t\t\r\n\t\treturn panelImg;\r\n\t}",
"private void $$$setupUI$$$() {\n createUIComponents();\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n scrollPane1.setViewportView(table);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));\n panel.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonRegister = new JButton();\n buttonRegister.setText(\"Track\");\n panel1.add(buttonRegister, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonMenu = new JButton();\n buttonMenu.setText(\"Menu\");\n panel1.add(buttonMenu, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n }",
"private void generateLayout() {\n\t\tJPanel generatePanel = new JPanel();\n\t\tgeneratePanel.setLayout(new GridBagLayout());\n\t\tJButton generatePrimes = new JButton(\"Generate Primes\");\n\t\tgeneratePrimes.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgeneratePrimesPopup();\n\t\t\t}\n\t\t});\n\t\tJButton generateHex = new JButton(\"Generate Hex Cross\");\n\t\tgenerateHex.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tprimes.clearCrosses();\n\t\t\t\tprimes.generateHexPrimes();\n\t\t\t\tupdateValues(\"Succesful Hex Cross Prime Numbers Generated\");\n\t\t\t}\n\t\t});\n\t\tGridBagConstraints gbc = new GridBagConstraints();\n\t\tgbc.fill = GridBagConstraints.CENTER;\n\t\tgbc.insets = new Insets(1,1,0,0);\n\t\tJPanel digitsPanel = new JPanel();\n\t\tdigitsPanel.setLayout(new GridLayout(2,1));\n\t\tLPrimedigits.setFont(new Font(\"Tahoma\", Font.BOLD,15));\n\t\tLHexDigits.setFont(new Font(\"Tahoma\", Font.BOLD,15));\n\t\tdigitsPanel.add(LPrimedigits);\n\t\tdigitsPanel.add(LHexDigits);\n\t\tgbc.gridx = 0;\n\t\tgbc.weightx = 0.1;\n\t\tgeneratePanel.add(generatePrimes,gbc);\n\t\tgbc.gridx = 1;\n\t\tgbc.weightx = 0.1;\n\t\tgeneratePanel.add(digitsPanel,gbc);\n\t\tgbc.weightx = 0.1;\n\t\tgbc.gridx = 2;\n\t\tgeneratePanel.add(generateHex,gbc);\n\t\tgeneratePanel.setBorder(BorderFactory.createLineBorder(new Color(150,0,0), 2));\n\t\tmainLayout.add(generatePanel);\n\t}",
"private void createGraphics() {\n\t\toppStatGrid = new GridPane();\n\t\toppStatGrid.setHgap(5);\n\t\tColumnConstraints columnOpp1 = new ColumnConstraints();\n\t\tcolumnOpp1.setMinWidth(gameScene.getWidth()*0.3);\n\t\t//column1.setPrefWidth(gameScene.getWidth()*0.3);\n\t\tColumnConstraints columnOpp2 = new ColumnConstraints();\n\t\tcolumnOpp2.setMinWidth(gameScene.getWidth()*0.3);\n\t\toppStatGrid.getColumnConstraints().addAll(columnOpp1,columnOpp2);\n\t\tRowConstraints rowOpp = new RowConstraints();\n\t\trowOpp.setMinHeight(gameScene.getHeight()*0.1);\n\t\toppStatGrid.getRowConstraints().add(rowOpp);\n\t\toppStatGrid.getRowConstraints().add(rowOpp);\n\n\t\tlocStatGrid = new GridPane();\n\t\tlocStatGrid.setHgap(5);\n\t\tColumnConstraints columnLoc1 = new ColumnConstraints();\n\t\tcolumnLoc1.setMinWidth(gameScene.getWidth()*0.1);\n\t\t//column1.setPrefWidth(gameScene.getWidth()*0.3);\n\t\tColumnConstraints columnLoc2 = new ColumnConstraints();\n\t\tcolumnLoc2.setMinWidth(gameScene.getWidth()*0.3);\n\t\tlocStatGrid.getColumnConstraints().addAll(columnLoc1,columnLoc2);\n\t\tRowConstraints rowLoc2 = new RowConstraints();\n\t\trowLoc2.setMinHeight(gameScene.getHeight()*0.1);\n\t\tlocStatGrid.getRowConstraints().add(rowLoc2);\n\t\tlocStatGrid.getRowConstraints().add(rowLoc2);\n\n\t\topponentName.setFont(Font.font(defaultFont, FontWeight.BOLD, 16));\n\t\tlocalName.setFont(Font.font(defaultFont, FontWeight.BOLD, 16));\n\t\topponentLevel.setFont(Font.font(defaultFont, 14));\n\t\tlocalLevel.setFont(Font.font(defaultFont, 14));\n\t\topponentHealth.setFont(Font.font(defaultFont, 14));\n\t\tlocalHealth.setFont(Font.font(defaultFont, 14));\n\n\t\topponentName.setAlignment(Pos.CENTER_LEFT);\n\t\tGridPane.setHalignment(localName, HPos.RIGHT);\n\t\topponentLevel.setAlignment(Pos.CENTER_RIGHT);\n\t\tlocalLevel.setAlignment(Pos.CENTER_LEFT);\n\t\tGridPane.setHalignment(localLevel, HPos.RIGHT);\n\t\topponentHealth.setAlignment(Pos.CENTER_RIGHT);\n\t\tlocalHealth.setAlignment(Pos.CENTER_LEFT);\n\t\tGridPane.setHalignment(localHealth, HPos.RIGHT);\n\n\t\topponentHealthBar = new Rectangle();\n\t\tlocalHealthBar = new Rectangle();\n\t\topponentHealthBar.setWidth(gameScene.getWidth()*0.3);\n\t\tlocalHealthBar.setWidth(gameScene.getWidth()*0.3);\n\t\topponentHealthBar.setHeight(gameScene.getHeight()*0.1);\n\t\tlocalHealthBar.setHeight(gameScene.getHeight()*0.1);\n\t\topponentHealthBar.setArcWidth(5);\n\t\topponentHealthBar.setArcHeight(5);\n\t\tlocalHealthBar.setArcWidth(5);\n\t\tlocalHealthBar.setArcHeight(5);\n\t\t/*NumberBinding oppHealthBind = gameScene.property\n\t\topponentHealthBar.prop*/\n\n\t\topponentHealthBar.setEffect(new Lighting());\n\t\tlocalHealthBar.setEffect(new Lighting());\n\n\t\topponentHealthBar.setFill(Color.DARKRED);\n\t\tlocalHealthBar.setFill(Color.DARKRED);\n\n\t\toppStatGrid.add(opponentName, 0, 0);\n\t\toppStatGrid.add(opponentLevel, 1, 0);\n\t\toppStatGrid.add(opponentHealthBar, 0, 1);\n\t\toppStatGrid.add(opponentHealth, 1, 1);\n\n\t\tlocStatGrid.add(localLevel, 0, 0);\n\t\tlocStatGrid.add(localName, 1, 0);\n\t\tlocStatGrid.add(localHealthBar, 1, 1);\n\t\tlocStatGrid.add(localHealth, 0, 1);\n\n\t\tAnchorPane.setTopAnchor(oppStatGrid, 10.0);\n\t\tAnchorPane.setLeftAnchor(oppStatGrid, 10.0);\n\n\t\tAnchorPane.setBottomAnchor(locStatGrid, 10.0);\n\t\tAnchorPane.setRightAnchor(locStatGrid, 10.0);\n\n\t\tthis.getChildren().addAll(oppStatGrid,locStatGrid);\n\t\t\n\t\toppPane = new Pane();\n\t\toppPane.setMinWidth(gameScene.getWidth()*0.5);\n\t\toppPane.setMinHeight(gameScene.getHeight()*0.5);\n\t\t\n\t\tlocPane = new Pane();\n\t\tlocPane.setMinWidth(gameScene.getWidth()*0.5);\n\t\tlocPane.setMinHeight(gameScene.getHeight()*0.5);\n\t\t\n\t\tAnchorPane.setBottomAnchor(locPane, 10.0);\n\t\tAnchorPane.setLeftAnchor(locPane, 10.0);\n\t\t\n\t\tAnchorPane.setTopAnchor(oppPane, 10.0);\n\t\tAnchorPane.setRightAnchor(oppPane, 10.0);\n\t\t\n\t\tthis.getChildren().addAll(locPane,oppPane);\n\t\t\n\n\t}",
"void drawGridLayout() {\n\t\tpiecesGrid = (GridLayout) findViewById(R.id.layout_container); //get a reference to the GridLayout\n\t\tpiecesGrid.setColumnCount(NUM[COLS]); //set number of columns\n\t\tpiecesGrid.setRowCount(NUM[ROWS]); //set number of rows\n\t\tfor (int i=0; i<NUM[TOTAL]; i++) {\n\t\t\tpiecesGrid.addView(pieceViews.get(i), i); //add the ImageViews\n\t\t}\n\t}",
"private void initialize() {\r\n\t\tthis.setSize(734, 710);\r\n\t\tfinal GridBagLayout gridBagLayout_1 = new GridBagLayout();\r\n\t\tgridBagLayout_1.rowWeights = new double[]{0.0, 1.0,0};\r\n\t\tgridBagLayout_1.columnWeights = new double[]{1.0};\r\n\t\tgridBagLayout_1.rowHeights = new int[] {0,0, 0}; \r\n\t\tthis.setLayout(gridBagLayout_1);\r\n\r\n\t\teditROIPanel = new JPanel();\r\n\t\tfinal GridBagLayout gridBagLayout_2 = new GridBagLayout();\r\n\t\tgridBagLayout_2.rowHeights = new int[] {0,0,7};\r\n\t\tgridBagLayout_2.columnWidths = new int[] {0,7};\r\n\t\teditROIPanel.setLayout(gridBagLayout_2);\r\n\t\tfinal GridBagConstraints gridBagConstraints_6 = new GridBagConstraints();\r\n\t\tgridBagConstraints_6.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_6.insets = new Insets(2, 2, 5, 2);\r\n\t\tgridBagConstraints_6.weightx = 1.0;\r\n\t\tgridBagConstraints_6.gridy = 0;\r\n\t\tgridBagConstraints_6.gridx = 0;\r\n\t\tadd(editROIPanel, gridBagConstraints_6);\r\n\r\n\t\tfinal JLabel infoLabel = new JLabel();\r\n\t\tinfoLabel.setText(\"Data Info:\");\r\n\t\tfinal GridBagConstraints gridBagConstraints_12 = new GridBagConstraints();\r\n\t\tgridBagConstraints_12.insets = new Insets(0, 0, 0, 4);\r\n\t\tgridBagConstraints_12.anchor = GridBagConstraints.EAST;\r\n\t\tgridBagConstraints_12.gridy = 0;\r\n\t\tgridBagConstraints_12.gridx = 0;\r\n\t\teditROIPanel.add(infoLabel, gridBagConstraints_12);\r\n\r\n\t\ttextLabel = new JLabel();\r\n\t\ttextLabel.setPreferredSize(new Dimension(500, 20));\r\n\t\ttextLabel.setMinimumSize(new Dimension(500, 20));\r\n\t\tfinal GridBagConstraints gridBagConstraints_2 = new GridBagConstraints();\r\n\t\tgridBagConstraints_2.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_2.weightx = 1;\r\n\t\tgridBagConstraints_2.insets = new Insets(0, 2, 0, 0);\r\n\t\tgridBagConstraints_2.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_2.gridy = 0;\r\n\t\tgridBagConstraints_2.gridx = 1;\r\n\t\tgridBagConstraints_2.gridwidth = 2;\r\n\t\teditROIPanel.add(textLabel, gridBagConstraints_2);\r\n\t\ttextLabel.setText(\"No FRAP DataSet loaded.\");\r\n\r\n\t\tautoCropButton = new JButton(new ImageIcon(getClass().getResource(\"/images/autoCrop.gif\")));\r\n\t\tautoCropButton.setName(\"roiAutoCropBtn\");\r\n\t\tautoCropButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(final ActionEvent e) {\r\n\t\t\t\tfirePropertyChange(FRAP_DATA_AUTOCROP_PROPERTY, null,null);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tclearROIbutton = new JButton(new ImageIcon(getClass().getResource(\"/images/clearROI.gif\")));\r\n\t\tclearROIbutton.setEnabled(false);\r\n\t\tclearROIbutton.setName(\"clearROIBtn\");\r\n\t\tclearROIbutton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(final ActionEvent e) {\r\n\t\t\t\tif(roiComboBox.getItemCount() == 0){\r\n\t\t\t\t\tgiveROIRequiredWarning(\"Clear Domain\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tfirePropertyChange(FRAP_DATA_CLEARROI_PROPERTY, ((ROIMultiPaintManager.ComboboxROIName)roiComboBox.getSelectedItem()), null);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tviewZLabel = new JLabel();\r\n\t\tviewZLabel.setText(\"View Z:\");\r\n\t\tfinal GridBagConstraints gridBagConstraints_17 = new GridBagConstraints();\r\n\t\tgridBagConstraints_17.insets = new Insets(0, 0, 0, 4);\r\n\t\tgridBagConstraints_17.anchor = GridBagConstraints.EAST;\r\n\t\tgridBagConstraints_17.gridy = 1;\r\n\t\tgridBagConstraints_17.gridx = 0;\r\n\t\teditROIPanel.add(viewZLabel, gridBagConstraints_17);\r\n\r\n\t\tfinal JPanel panel_1 = new JPanel();\r\n\t\tfinal GridBagLayout gridBagLayout_4 = new GridBagLayout();\r\n\t\tgridBagLayout_4.columnWeights = new double[]{1.0};\r\n\t\tgridBagLayout_4.columnWidths = new int[] {7};\r\n\t\tpanel_1.setLayout(gridBagLayout_4);\r\n\t\tfinal GridBagConstraints gridBagConstraints_18 = new GridBagConstraints();\r\n\t\tgridBagConstraints_18.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_18.insets = new Insets(0, 2, 0, 0);\r\n\t\tgridBagConstraints_18.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_18.weightx = 0;\r\n\t\tgridBagConstraints_18.gridy = 1;\r\n\t\tgridBagConstraints_18.gridx = 1;\r\n\t\teditROIPanel.add(panel_1, gridBagConstraints_18);\r\n\t\tfinal GridBagConstraints gridBagConstraints_19 = new GridBagConstraints();\r\n\t\tgridBagConstraints_19.insets = new Insets(0, 0, 5, 0);\r\n\t\tgridBagConstraints_19.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_19.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_19.weightx = 1;\r\n\t\tgridBagConstraints_19.gridy = 0;\r\n\t\tgridBagConstraints_19.gridx = 0;\r\n\t\tpanel_1.add(getZSlider(), gridBagConstraints_19);\r\n\r\n\t\tviewTLabel = new JLabel();\r\n\t\tviewTLabel.setText(\"View Time:\");\r\n\t\tfinal GridBagConstraints gridBagConstraints_13 = new GridBagConstraints();\r\n\t\tgridBagConstraints_13.insets = new Insets(0, 0, 0, 4);\r\n\t\tgridBagConstraints_13.anchor = GridBagConstraints.EAST;\r\n\t\tgridBagConstraints_13.gridy = 2;\r\n\t\tgridBagConstraints_13.gridx = 0;\r\n\t\teditROIPanel.add(viewTLabel, gridBagConstraints_13);\r\n\r\n\t\tfinal JPanel panel = new JPanel();\r\n\t\tpanel.setLayout(new GridBagLayout());\r\n\t\tfinal GridBagConstraints gridBagConstraints_15 = new GridBagConstraints();\r\n\t\tgridBagConstraints_15.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_15.weightx = 1;\r\n\t\tgridBagConstraints_15.insets = new Insets(0, 0, 0, 0);\r\n\t\tgridBagConstraints_15.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_15.gridy = 0;\r\n\t\tgridBagConstraints_15.gridx = 0;\r\n\t\tpanel.add(getTimeSlider(), gridBagConstraints_15);\r\n\t\t\r\n\t\tfinal GridBagConstraints gridBagConstraints_14 = new GridBagConstraints();\r\n\t\tgridBagConstraints_14.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_14.insets = new Insets(0, 2, 0, 0);\r\n\t\tgridBagConstraints_14.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_14.gridy = 2;\r\n\t\tgridBagConstraints_14.gridx = 1;\r\n\t\teditROIPanel.add(panel, gridBagConstraints_14);\r\n\r\n\t\tfinal JPanel editROIButtonPanel = new JPanel();\r\n\t\tfinal GridBagLayout gridBagLayout_3 = new GridBagLayout();\r\n\t\tgridBagLayout_3.rowWeights = new double[]{0.0, 1.0};\r\n\t\tgridBagLayout_3.columnWeights = new double[]{0.0, 1.0, 0.0, 0.0, 0.0, 0.0};\r\n\t\tgridBagLayout_3.columnWidths = new int[] {0, 0,7,7, 0, 0};\r\n\t\teditROIButtonPanel.setLayout(gridBagLayout_3);\r\n\t\tfinal GridBagConstraints gridBagConstraints_8 = new GridBagConstraints();\r\n\t\tgridBagConstraints_8.gridwidth = 2;\r\n\t\tgridBagConstraints_8.weightx = 0;\r\n\t\tgridBagConstraints_8.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_8.insets = new Insets(0, 2, 0, 0);\r\n\t\tgridBagConstraints_8.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_8.gridy = 3;\r\n\t\tgridBagConstraints_8.gridx = 0;\r\n\t\teditROIPanel.add(editROIButtonPanel, gridBagConstraints_8);\r\n\t\t\r\n\t\tpanel_2 = new JPanel();\r\n\t\tGridBagConstraints gbc_panel_2 = new GridBagConstraints();\r\n\t\tgbc_panel_2.insets = new Insets(2, 2, 2, 2);\r\n\t\tgbc_panel_2.weighty = 1.0;\r\n\t\tgbc_panel_2.weightx = 1.0;\r\n\t\tgbc_panel_2.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_panel_2.gridx = 0;\r\n\t\tgbc_panel_2.gridy = 1;\r\n\t\tadd(panel_2, gbc_panel_2);\r\n\t\tGridBagLayout gbl_panel_2 = new GridBagLayout();\r\n\t\tgbl_panel_2.columnWidths = new int[]{0, 0, 0};\r\n\t\tgbl_panel_2.rowHeights = new int[]{0};\r\n\t\tgbl_panel_2.columnWeights = new double[]{0, 1.0, 0.0};\r\n\t\tgbl_panel_2.rowWeights = new double[]{0.0};\r\n\t\tpanel_2.setLayout(gbl_panel_2);\r\n\t\t\r\n\t\tpanel_3 = new JPanel();\r\n\t\tpanel_3.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\tGridBagConstraints gbc_panel_3 = new GridBagConstraints();\r\n\t\tgbc_panel_3.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_panel_3.insets = new Insets(2, 2, 2, 2);\r\n\t\tgbc_panel_3.gridx = 0;\r\n\t\tgbc_panel_3.gridy = 0;\r\n\t\tpanel_2.add(panel_3, gbc_panel_3);\r\n\t\tGridBagLayout gbl_panel_3 = new GridBagLayout();\r\n\t\tgbl_panel_3.columnWidths = new int[]{0, 0};\r\n\t\tgbl_panel_3.rowHeights = new int[]{0, 0, 0, 0};\r\n\t\tgbl_panel_3.columnWeights = new double[]{0.0, Double.MIN_VALUE};\r\n\t\tgbl_panel_3.rowWeights = new double[]{0.0, 0.0, 0.0, Double.MIN_VALUE};\r\n\t\tpanel_3.setLayout(gbl_panel_3);\r\n\t\t\r\n\t\tdomainRegionLabel = new JLabel(DOMAIN_LIST_TEXT);\r\n\t\tGridBagConstraints gbc_domainRegionLabel = new GridBagConstraints();\r\n\t\tgbc_domainRegionLabel.insets = new Insets(0, 0, 2, 0);\r\n\t\tgbc_domainRegionLabel.gridx = 0;\r\n\t\tgbc_domainRegionLabel.gridy = 0;\r\n\t\tpanel_3.add(domainRegionLabel, gbc_domainRegionLabel);\r\n\t\t\r\n\t\tscrollPane = new JScrollPane();\r\n\t\tGridBagConstraints gbc_scrollPane = new GridBagConstraints();\r\n\t\tgbc_scrollPane.insets = new Insets(0, 2, 0, 0);\r\n\t\tgbc_scrollPane.weighty = 1.0;\r\n\t\tgbc_scrollPane.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_scrollPane.gridx = 0;\r\n\t\tgbc_scrollPane.gridy = 1;\r\n\t\tpanel_3.add(scrollPane, gbc_scrollPane);\r\n\t\tscrollPane.setPreferredSize(new Dimension(125, 10));\r\n\t\tscrollPane.setMinimumSize(new Dimension(125,10));\r\n\t\tscrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\r\n\t\tscrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);\r\n\t\t\r\n\t\tresolvedList = new JList();\r\n\t\tresolvedList.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\tsuper.mouseClicked(e);\r\n\t\t\t\tif(showConvertPopup(e,false) == SHOWCONVERT.HANDLED){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif(e.getClickCount() == 2){\r\n\t\t\t\t\tfirePropertyChange(FRAP_DATA_FINDROI_PROPERTY, null, resolvedList.getSelectedValue());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tsuper.mousePressed(e);\r\n\t\t\t\tif(showConvertPopup(e,false) == SHOWCONVERT.HANDLED){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tsuper.mouseReleased(e);\r\n\t\t\t\tif(showConvertPopup(e,false) == SHOWCONVERT.HANDLED){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\tresolvedList.addListSelectionListener(resolvedListSelectionListener);\r\n\t\tresolvedList.setCellRenderer(resolvedObjectListCellRenderer);\r\n\t\tscrollPane.setViewportView(resolvedList);\r\n\t\t\r\n\t\tmergeButton = new JButton(\"Auto-Merge\");\r\n\t\tmergeButton.setToolTipText(\"Remove regions by merging with neighbor\");\r\n\t\tmergeButton.setEnabled(false);\r\n\t\tmergeButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tresolvedListSelection(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridBagConstraints gbc_mergeButton = new GridBagConstraints();\r\n\t\tgbc_mergeButton.gridx = 0;\r\n\t\tgbc_mergeButton.gridy = 2;\r\n\t\tpanel_3.add(mergeButton, gbc_mergeButton);\r\n\t\tGridBagConstraints gbc_jScrollPane2 = new GridBagConstraints();\r\n\t\tgbc_jScrollPane2.weighty = 1.0;\r\n\t\tgbc_jScrollPane2.weightx = 1.0;\r\n\t\tgbc_jScrollPane2.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_jScrollPane2.insets = new Insets(2, 2, 2, 2);\r\n\t\tgbc_jScrollPane2.gridx = 1;\r\n\t\tgbc_jScrollPane2.gridy = 0;\r\n\t\tpanel_2.add(getJScrollPane2(), gbc_jScrollPane2);\r\n\t\tGridBagConstraints gbc_toolButtonPanel = new GridBagConstraints();\r\n\t\tgbc_toolButtonPanel.weighty = 1.0;\r\n\t\tgbc_toolButtonPanel.insets = new Insets(2, 2, 0, 2);\r\n\t\tgbc_toolButtonPanel.anchor = GridBagConstraints.NORTH;\r\n\t\tgbc_toolButtonPanel.gridx = 2;\r\n\t\tgbc_toolButtonPanel.gridy = 0;\r\n\t\tpanel_2.add(getToolButtonPanel(), gbc_toolButtonPanel);\r\n\r\n\t\troiComboBox = new JComboBox();\r\n\t\troiComboBox.setName(\"activeROIComboBox\");\r\n\t\troiComboBox.setRenderer(new ListCellRenderer() {\r\n\t\t\tprivate DefaultListCellRenderer listCellRender = new DefaultListCellRenderer();\r\n\t\t\tpublic Component getListCellRendererComponent(JList list, Object value,\r\n\t\t\t\t\tint index, boolean isSelected, boolean cellHasFocus) {\r\n\t\t\t\tROIMultiPaintManager.ComboboxROIName comboboxROIName = (ROIMultiPaintManager.ComboboxROIName)value;\r\n\t\t\t\tif(comboboxROIName == null){//return blank\r\n\t\t\t\t\treturn listCellRender.getListCellRendererComponent(list, null, index, isSelected, cellHasFocus);\r\n\t\t\t\t}\r\n\t\t\t\tif(comboboxROIName.getHighlightColor() == null){//return text only\r\n\t\t\t\t\treturn listCellRender.getListCellRendererComponent(list, comboboxROIName.getROIName(), index, isSelected, cellHasFocus);\r\n\t\t\t\t}\r\n\t\t\t\t//return text with small color box\r\n\t\t\t\tIcon icon = new ColorIcon(20,20,comboboxROIName.getHighlightColor());\r\n\t\t\t\tJLabel jlable = (JLabel)listCellRender.getListCellRendererComponent(list, icon, index, isSelected, cellHasFocus);\r\n\t\t\t\tjlable.setText(comboboxROIName.getROIName());\r\n\t\t\t\treturn jlable;\r\n\t\t\t}\r\n\t\t});\r\n\t\troiComboBox.addActionListener(ROI_COMBOBOX_ACTIONLISTENER);\r\n\t\t\r\n\t\tlblNewLabel = new JLabel(\"Active Domain:\");\r\n\t\tGridBagConstraints gbc_lblNewLabel = new GridBagConstraints();\r\n\t\tgbc_lblNewLabel.insets = new Insets(4, 4, 4, 4);\r\n\t\tgbc_lblNewLabel.anchor = GridBagConstraints.EAST;\r\n\t\tgbc_lblNewLabel.gridx = 0;\r\n\t\tgbc_lblNewLabel.gridy = 0;\r\n\t\teditROIButtonPanel.add(lblNewLabel, gbc_lblNewLabel);\r\n\t\tfinal GridBagConstraints gridBagConstraints_1 = new GridBagConstraints();\r\n\t\tgridBagConstraints_1.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_1.insets = new Insets(4, 4, 5, 5);\r\n\t\tgridBagConstraints_1.weightx = 1;\r\n\t\tgridBagConstraints_1.gridy = 0;\r\n\t\tgridBagConstraints_1.gridx = 1;\r\n\t\teditROIButtonPanel.add(roiComboBox, gridBagConstraints_1);\r\n\r\n\t\taddROIButton = new JButton();\r\n\t\taddROIButton.setName(\"roiAddBtn\");\r\n\t\taddROIButton.addActionListener(addROIActionListener);\r\n\t\taddROIButton.setText(\"Add Domain...\");\r\n\t\tfinal GridBagConstraints gridBagConstraints_3 = new GridBagConstraints();\r\n\t\tgridBagConstraints_3.insets = new Insets(4, 4, 5, 5);\r\n\t\tgridBagConstraints_3.gridy = 0;\r\n\t\tgridBagConstraints_3.gridx = 2;\r\n\t\teditROIButtonPanel.add(addROIButton, gridBagConstraints_3);\r\n\r\n\t\tdelROIButton = new JButton();\r\n\t\tdelROIButton.setName(\"roiDeleteBtn\");\r\n\t\tdelROIButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(final ActionEvent e) {\r\n\t\t\t\tfirePropertyChange(FRAP_DATA_DELETEROI_PROPERTY, ((ROIMultiPaintManager.ComboboxROIName)roiComboBox.getSelectedItem()), null);\r\n\t\t\t}\r\n\t\t});\r\n\t\tdelROIButton.setText(\"Delete Domain...\");\r\n\t\tdelROIButton.setEnabled(false);\r\n\t\tfinal GridBagConstraints gridBagConstraints_4 = new GridBagConstraints();\r\n\t\tgridBagConstraints_4.insets = new Insets(4, 4, 5, 5);\r\n\t\tgridBagConstraints_4.gridy = 0;\r\n\t\tgridBagConstraints_4.gridx = 3;\r\n\t\teditROIButtonPanel.add(delROIButton, gridBagConstraints_4);\r\n\t\t\r\n\t\tdiscardHighlightsButton = new JButton(\"Clear Selections\");\r\n\t\tdiscardHighlightsButton.setEnabled(false);\r\n\t\tdiscardHighlightsButton.setName(\"clearHighlightsBtn\");\r\n\t\tdiscardHighlightsButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tfirePropertyChange(FRAP_DATA_DISCARDHIGHLIGHT_PROPERTY,null,null);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tGridBagConstraints gbc_specialActionsButton = new GridBagConstraints();\r\n\t\tgbc_specialActionsButton.insets = new Insets(4, 4, 5, 5);\r\n\t\tgbc_specialActionsButton.gridx = 4;\r\n\t\tgbc_specialActionsButton.gridy = 0;\r\n\t\teditROIButtonPanel.add(discardHighlightsButton, gbc_specialActionsButton);\r\n\t\t\r\n\t\tchannelComboBox = new JComboBox();\r\n\t\tGridBagConstraints gbc_channelComboBox = new GridBagConstraints();\r\n\t\tgbc_channelComboBox.insets = new Insets(4, 4, 5, 4);\r\n\t\tgbc_channelComboBox.gridx = 5;\r\n\t\tgbc_channelComboBox.gridy = 0;\r\n\t\teditROIButtonPanel.add(channelComboBox, gbc_channelComboBox);\r\n\t\tchannelComboBox.addActionListener(channelActionListener);\r\n\t\tchannelComboBox.setPreferredSize(new Dimension(100, 22));\r\n\t\tchannelComboBox.setMinimumSize(new Dimension(100, 20));\r\n\t\t\r\n\t\tblendPercentPanel = new JPanel();\r\n\t\tblendPercentPanel.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\tGridBagConstraints gbc_panel_2a = new GridBagConstraints();\r\n\t\tgbc_panel_2a.gridwidth = 6;\r\n\t\tgbc_panel_2a.insets = new Insets(4, 4, 4, 4);\r\n\t\tgbc_panel_2a.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_panel_2a.gridx = 0;\r\n\t\tgbc_panel_2a.gridy = 1;\r\n\t\teditROIButtonPanel.add(blendPercentPanel, gbc_panel_2a);\r\n\t\tGridBagLayout gbl_panel_2a = new GridBagLayout();\r\n\t\tblendPercentPanel.setLayout(gbl_panel_2a);\r\n\t\t\r\n\t\tblendPercentROILabel = new JLabel(\"Domains\");\r\n\t\tGridBagConstraints gbc_blendPercentROILabel = new GridBagConstraints();\r\n\t\tgbc_blendPercentROILabel.anchor = GridBagConstraints.WEST;\r\n\t\tgbc_blendPercentROILabel.gridx = 0;\r\n\t\tgbc_blendPercentROILabel.gridy = 0;\r\n\t\tblendPercentPanel.add(blendPercentROILabel, gbc_blendPercentROILabel);\r\n\t\t\r\n\t\tblendPercentSlider = new JSlider();\r\n\t\tblendPercentSlider.setToolTipText(\"Mix view of Domains and background image\");\r\n\t\tblendPercentSlider.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tsetBlendPercent(blendPercentSlider.getValue());\r\n//\t\t\t\tif(!blendPercentSlider.getValueIsAdjusting()){\r\n//\t\t\t\t\tsetBlendPercent(blendPercentSlider.getValue());\r\n//\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridBagConstraints gbc_blendPercentSlider = new GridBagConstraints();\r\n\t\tgbc_blendPercentSlider.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgbc_blendPercentSlider.weightx = 0.5;\r\n\t\tgbc_blendPercentSlider.gridx = 1;\r\n\t\tgbc_blendPercentSlider.gridy = 0;\r\n\t\tblendPercentPanel.add(blendPercentSlider, gbc_blendPercentSlider);\r\n\t\t\r\n\t\tblendPercentImageLabel = new JLabel(\"Image\");\r\n\t\tGridBagConstraints gbc_blendPercentImageLabel = new GridBagConstraints();\r\n\t\tgbc_blendPercentImageLabel.anchor = GridBagConstraints.EAST;\r\n\t\tgbc_blendPercentImageLabel.gridx = 2;\r\n\t\tgbc_blendPercentImageLabel.gridy = 0;\r\n\t\tblendPercentPanel.add(blendPercentImageLabel, gbc_blendPercentImageLabel);\r\n\t\t\r\n\t\tsmoothOrigLabel = new JLabel(\"Original\");\r\n\t\tGridBagConstraints gbc_smoothOrigLabel = new GridBagConstraints();\r\n\t\tgbc_smoothOrigLabel.insets = new Insets(0, 20, 0, 0);\r\n\t\tgbc_smoothOrigLabel.gridx = 3;\r\n\t\tgbc_smoothOrigLabel.gridy = 0;\r\n\t\tblendPercentPanel.add(smoothOrigLabel, gbc_smoothOrigLabel);\r\n\t\t\r\n\t\tsmoothslider = new JSlider();\r\n\t\tsmoothslider.setToolTipText(\"Smooth background image\");\r\n\t\tsmoothslider.setSnapToTicks(true);\r\n\t\tsmoothslider.setPaintTicks(true);\r\n\t\tsmoothslider.setMajorTickSpacing(1);\r\n\t\tsmoothslider.setMaximum(10);\r\n\t\tsmoothslider.setValue(0);\r\n\t\tsmoothslider.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tif(!smoothslider.getValueIsAdjusting()){\r\n\t\t\t\t\tfirePropertyChange(FRAP_DATA_UNDERLAY_SMOOTH_PROPERTY, null, new Integer(smoothslider.getValue()));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridBagConstraints gbc_smoothslider = new GridBagConstraints();\r\n\t\tgbc_smoothslider.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgbc_smoothslider.weightx = 0.5;\r\n\t\tgbc_smoothslider.gridx = 4;\r\n\t\tgbc_smoothslider.gridy = 0;\r\n\t\tblendPercentPanel.add(smoothslider, gbc_smoothslider);\r\n\t\t\r\n\t\tsmootherLabel = new JLabel(\"Smoother\");\r\n\t\tGridBagConstraints gbc_smootherLabel = new GridBagConstraints();\r\n\t\tgbc_smootherLabel.gridx = 5;\r\n\t\tgbc_smootherLabel.gridy = 0;\r\n\t\tblendPercentPanel.add(smootherLabel, gbc_smootherLabel);\r\n\t\t\r\n\t\troiDrawButtonGroup.add(selectButton);\r\n\t\troiDrawButtonGroup.add(paintButton);\r\n\t\troiDrawButtonGroup.add(eraseButton);\r\n\t\troiDrawButtonGroup.add(fillButton);\r\n\t\troiDrawButtonGroup.add(cropButton);\r\n\t\troiDrawButtonGroup.add(translateToolButton);\r\n\t\troiDrawButtonGroup.add(scaleToolButton);\r\n\t\t\r\n\t\tBeanUtils.enableComponents(getToolButtonPanel(), false);\r\n\t\tBeanUtils.enableComponents(editROIPanel, false);\r\n\t\t\r\n\t\thistogramPanel = new HistogramPanel();\r\n\t\thistogramPanel.addPropertyChangeListener(new PropertyChangeListener() {\r\n\t\t\tpublic void propertyChange(PropertyChangeEvent evt) {\r\n\t\t\t\tif(evt.getPropertyName().equals(HistogramPanel.HISTOGRAM_SELECT_PROPERTY)){\r\n\t\t\t\t\tOverlayEditorPanelJAI.this.firePropertyChange(\r\n\t\t\t\t\tOverlayEditorPanelJAI.FRAP_DATA_HISTOUPDATEHIGHLIGHT_PROPERTY, null, (ListSelectionModel)evt.getNewValue());\r\n\t\t\t\t}else if(evt.getPropertyName().equals(HistogramPanel.HISTOGRAM_APPLY_ACTION)){\r\n\t\t\t\t\tfirePropertyChange(OverlayEditorPanelJAI.FRAP_DATA_UPDATEROI_WITHHIGHLIGHT_PROPERTY,null,null);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\thistogramPanel.setVisible(false);\r\n\t\thistogramPanel.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\tGridBagConstraints gbc_histogramButton = new GridBagConstraints();\r\n\t\tgbc_histogramButton.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_histogramButton.insets = new Insets(2, 2, 2, 2);\r\n\t\tgbc_histogramButton.gridx = 0;\r\n\t\tgbc_histogramButton.gridy = 2;\r\n\t\tadd(histogramPanel, gbc_histogramButton);\r\n\t}",
"public SchemaLayoutManager() {\n\t\tthis.sizeKnown = true;\n\t\tthis.size = new Dimension(0, 0);\n\t\tthis.tableCount = 0;\n\t}",
"@AutoGenerated\r\n\tprivate VerticalLayout buildVerticalLayout_4() {\n\t\tverticalLayout_4 = new VerticalLayout();\r\n\t\tverticalLayout_4.setWidth(\"100.0%\");\r\n\t\tverticalLayout_4.setHeight(\"100.0%\");\r\n\t\tverticalLayout_4.setImmediate(false);\r\n\t\tverticalLayout_4.setMargin(false);\r\n\t\t\r\n\t\t// gridLayout_5\r\n\t\tgridLayout_5 = buildGridLayout_5();\r\n\t\tverticalLayout_4.addComponent(gridLayout_5);\r\n\t\t\r\n\t\treturn verticalLayout_4;\r\n\t}",
"protected void CreateWindow(){\n\t\tdouble[] colWeight = {1,1,1,1,1,1};\n\t\tdouble[] rowWeight = {5,1,1,1,1};\n\t\tint[] colWidth = {1,1,1,1,1,1};\n\t\tint[] rowHeight = {5,1,1,1,1};\n\t\t\n\t\t//creates new GridBagLayout and the Constraints for it\n\t\tGridBagLayout normal = new GridBagLayout();\n\t\t\n\t\tGridBagConstraints constrain = new GridBagConstraints();\n\t\t\n\t\tnormal.rowHeights = rowHeight;\n\t\tnormal.columnWidths = colWidth;\n\t\tnormal.columnWeights = colWeight;\n\t\tnormal.rowWeights = rowWeight;\n\t\t\n\t\tsetBounds(100,100,400,600);\n\t\tsetLayout(normal);\n\t\t\n\t\t//create messagefield. set the Grid Layout for it.\n\t\tchatDisplay.messageField.setSize(300, 500);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 5;\n\t\tconstrain.gridheight = 18;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 0;\n\t\tconstrain.gridy = 0;\n\t\tnormal.setConstraints(chatDisplay.messageField, constrain);\n\t\t\n\t\t//create input. set the Grid Layout for it.\n\t\tthis.input.setSize(450, 20);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 4;\n\t\tconstrain.gridheight = 2;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 0;\n\t\tconstrain.gridy = 18;\n\t\tnormal.setConstraints(this.input, constrain);\n\t\t\n\t\t//create send button. set the Grid Layout for it.\n\t\tthis.send.setSize(50, 5);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 1;\n\t\tconstrain.gridheight = 1;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 4;\n\t\tconstrain.gridy = 18;\n\t\tnormal.setConstraints(this.send, constrain);\n\t\t\n\t\tthis.quit.setSize(50, 5);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 1;\n\t\tconstrain.gridheight = 1;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 4;\n\t\tconstrain.gridy = 19;\n\t\tnormal.setConstraints(this.quit, constrain);\n\t\t\n\t\tthis.server.setSize(50, 5);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 1;\n\t\tconstrain.gridheight = 1;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 4;\n\t\tconstrain.gridy = 20;\n\t\tnormal.setConstraints(this.server, constrain);\n\t\t\n\t\tthis.client.setSize(50, 5);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 1;\n\t\tconstrain.gridheight = 1;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 4;\n\t\tconstrain.gridy = 21;\n\t\tnormal.setConstraints(this.client, constrain);\n\t\t\n\t\t//add the fields...\n\t\tadd(this.input);\n\t\tadd(chatDisplay.messageField);\n\t\tadd(this.send);\n\t\tadd(this.quit);\n\t\tadd(this.server);\n\t\tadd(this.client);\n\t\t\n\t\t//set windowlistener and set the window resizability to true\n\t\taddWindowListener(this);\n\t\tsetResizable(true);\n\t\t\n\t\t//adds action listeners for use later on.\n\t\tinput.addActionListener(this);\n\t\tsend.addActionListener(this);\n\t\tquit.addActionListener(this);\n\t\tserver.addActionListener(this);\n\t\tclient.addActionListener(this);\n\t\t\n\t\tthis.setVisible(true);\n\t\t\n\t\trun();\n\t}",
"private void initComponents() {\n\t\tSplitPane mainSplitPane = new SplitPane(SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM);\n\t\tmainSplitPane.setSeparatorPosition(new Extent(34));\n\t\tnavigator = new AnyRowNavigator();\n\t\tmainSplitPane.add(navigator);\n\t\tSplitPane splitPane = new SplitPane();\n\t\tsplitPane.setOrientation(SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM);\n\t\tsplitPane.setSeparatorPosition(new Extent(200));\n\t\tsplitPane.setResizable(true);\n\t\tmainSplitPane.add(splitPane);\n\t\tadd(mainSplitPane);\t\t\n rootLayout = new Grid();\n rootLayout.setWidth(new Extent(100, Extent.PERCENT));\n rootLayout.setSize(8);\n splitPane.add(rootLayout);\n EMPSN_CaptionLabel = new nextapp.echo2.app.Label();\n EMPSN_CaptionLabel.setText(\"N_GET_DATA.EMPSN\");\n rootLayout.add(EMPSN_CaptionLabel);\n GridLayoutData infoLayout = new GridLayoutData();\n infoLayout.setColumnSpan(7);\n Row row = new Row();\n row.setLayoutData(infoLayout);\n EMPSN_DscField1 = new dsc.echo2app.component.DscField();\n EMPSN_DscField1.setWidth(new Extent(60));\n EMPSN_DscField1.setId(\"EMPSN_DscField1\");\n row.add(EMPSN_DscField1);\n lblInfo = new DirectHtml();\n row.add(lblInfo);\n rootLayout.add(row);\n// DEPSN_CaptionLabel = new nextapp.echo2.app.Label();\n// rootLayout.add(DEPSN_CaptionLabel);\n// DEPSN_DscField1 = new dsc.echo2app.component.DscField();\n// DEPSN_DscField1.setWidth(new Extent(60));\n// DEPSN_DscField1.setId(\"DEPSN_DscField1\");\n// rootLayout.add(DEPSN_DscField1);\n MONTHS_CaptionLabel = new nextapp.echo2.app.Label();\n MONTHS_CaptionLabel.setText(\"N_GET_DATA.MONTHS\");\n rootLayout.add(MONTHS_CaptionLabel);\n MONTHS_DscField2 = new dsc.echo2app.component.DscField();\n MONTHS_DscField2.setWidth(new Extent(60));\n MONTHS_DscField2.setId(\"MONTHS_DscField2\");\n rootLayout.add(MONTHS_DscField2);\n YEARS_CaptionLabel = new nextapp.echo2.app.Label();\n YEARS_CaptionLabel.setText(\"N_GET_DATA.YEARS\");\n rootLayout.add(YEARS_CaptionLabel);\n YEARS_DscField3 = new dsc.echo2app.component.DscField();\n YEARS_DscField3.setWidth(new Extent(60));\n YEARS_DscField3.setId(\"YEARS_DscField3\");\n rootLayout.add(YEARS_DscField3);\n DUCLS_CaptionLabel = new nextapp.echo2.app.Label();\n DUCLS_CaptionLabel.setText(\"N_GET_DATA.DUCLS\");\n rootLayout.add(DUCLS_CaptionLabel);\n DUCLS_DscField4 = new dsc.echo2app.component.DscField();\n DUCLS_DscField4.setWidth(new Extent(60));\n DUCLS_DscField4.setDisabledBackground(new Color(0xFBF4D4));\n DUCLS_DscField4.setDisabledForeground(new Color(0x2A7FFF));\n DUCLS_DscField4.setId(\"DUCLS_DscField4\");\n rootLayout.add(DUCLS_DscField4);\n NDUCLS_CaptionLabel = new nextapp.echo2.app.Label();\n NDUCLS_CaptionLabel.setText(\"N_GET_DATA.NDUCLS\");\n rootLayout.add(NDUCLS_CaptionLabel);\n NDUCLS_DscField5 = new dsc.echo2app.component.DscField();\n NDUCLS_DscField5.setWidth(new Extent(60));\n NDUCLS_DscField5.setId(\"NDUCLS_DscField5\");\n rootLayout.add(NDUCLS_DscField5);\n ADDHOL_CaptionLabel = new nextapp.echo2.app.Label();\n ADDHOL_CaptionLabel.setText(\"N_GET_DATA.ADDHOL\");\n rootLayout.add(ADDHOL_CaptionLabel);\n ADDHOL_DscField6 = new dsc.echo2app.component.DscField();\n ADDHOL_DscField6.setWidth(new Extent(60));\n ADDHOL_DscField6.setId(\"ADDHOL_DscField6\");\n rootLayout.add(ADDHOL_DscField6);\n ADDCLS1_CaptionLabel = new nextapp.echo2.app.Label();\n ADDCLS1_CaptionLabel.setText(\"N_GET_DATA.ADDCLS1\");\n rootLayout.add(ADDCLS1_CaptionLabel);\n ADDCLS1_DscField7 = new dsc.echo2app.component.DscField();\n ADDCLS1_DscField7.setWidth(new Extent(60));\n ADDCLS1_DscField7.setId(\"ADDCLS1_DscField7\");\n rootLayout.add(ADDCLS1_DscField7);\n NADDCLS_CaptionLabel = new nextapp.echo2.app.Label();\n NADDCLS_CaptionLabel.setText(\"N_GET_DATA.NADDCLS\");\n rootLayout.add(NADDCLS_CaptionLabel);\n NADDCLS_DscField8 = new dsc.echo2app.component.DscField();\n NADDCLS_DscField8.setWidth(new Extent(60));\n NADDCLS_DscField8.setId(\"NADDCLS_DscField8\");\n rootLayout.add(NADDCLS_DscField8);\n LATE_CaptionLabel = new nextapp.echo2.app.Label();\n LATE_CaptionLabel.setText(\"N_GET_DATA.LATE\");\n rootLayout.add(LATE_CaptionLabel);\n LATE_DscField9 = new dsc.echo2app.component.DscField();\n LATE_DscField9.setWidth(new Extent(60));\n LATE_DscField9.setId(\"LATE_DscField9\");\n rootLayout.add(LATE_DscField9);\n SIGN_CaptionLabel = new nextapp.echo2.app.Label();\n SIGN_CaptionLabel.setText(\"N_GET_DATA.SIGN\");\n rootLayout.add(SIGN_CaptionLabel);\n SIGN_DscField10 = new dsc.echo2app.component.DscField();\n SIGN_DscField10.setWidth(new Extent(60));\n SIGN_DscField10.setId(\"SIGN_DscField10\");\n rootLayout.add(SIGN_DscField10);\n ACN_CaptionLabel = new nextapp.echo2.app.Label();\n ACN_CaptionLabel.setText(\"N_GET_DATA.ACN\");\n rootLayout.add(ACN_CaptionLabel);\n ACN_DscField11 = new dsc.echo2app.component.DscField();\n ACN_DscField11.setWidth(new Extent(60));\n ACN_DscField11.setId(\"ACN_DscField11\");\n rootLayout.add(ACN_DscField11);\n ACNM_CaptionLabel = new nextapp.echo2.app.Label();\n ACNM_CaptionLabel.setText(\"N_GET_DATA.ACNM\");\n rootLayout.add(ACNM_CaptionLabel);\n ACNM_DscField12 = new dsc.echo2app.component.DscField();\n ACNM_DscField12.setWidth(new Extent(60));\n ACNM_DscField12.setId(\"ACNM_DscField12\");\n rootLayout.add(ACNM_DscField12);\n REST_CaptionLabel = new nextapp.echo2.app.Label();\n REST_CaptionLabel.setText(\"N_GET_DATA.REST\");\n rootLayout.add(REST_CaptionLabel);\n REST_DscField13 = new dsc.echo2app.component.DscField();\n REST_DscField13.setWidth(new Extent(60));\n REST_DscField13.setId(\"REST_DscField13\");\n rootLayout.add(REST_DscField13);\n REST_PAY_CaptionLabel = new nextapp.echo2.app.Label();\n REST_PAY_CaptionLabel.setText(\"N_GET_DATA.REST_PAY\");\n rootLayout.add(REST_PAY_CaptionLabel);\n REST_PAY_DscField14 = new dsc.echo2app.component.DscField();\n REST_PAY_DscField14.setWidth(new Extent(60));\n REST_PAY_DscField14.setId(\"REST_PAY_DscField14\");\n rootLayout.add(REST_PAY_DscField14);\n REST_SICK_CaptionLabel = new nextapp.echo2.app.Label();\n REST_SICK_CaptionLabel.setText(\"N_GET_DATA.REST_SICK\");\n rootLayout.add(REST_SICK_CaptionLabel);\n REST_SICK_DscField15 = new dsc.echo2app.component.DscField();\n REST_SICK_DscField15.setWidth(new Extent(60));\n REST_SICK_DscField15.setId(\"REST_SICK_DscField15\");\n rootLayout.add(REST_SICK_DscField15);\n OTHER_CaptionLabel = new nextapp.echo2.app.Label();\n OTHER_CaptionLabel.setText(\"N_GET_DATA.OTHER\");\n rootLayout.add(OTHER_CaptionLabel);\n OTHER_DscField16 = new dsc.echo2app.component.DscField();\n OTHER_DscField16.setWidth(new Extent(60));\n OTHER_DscField16.setId(\"OTHER_DscField16\");\n rootLayout.add(OTHER_DscField16);\n NWHOUR_CaptionLabel = new nextapp.echo2.app.Label();\n NWHOUR_CaptionLabel.setText(\"N_GET_DATA.NWHOUR\");\n rootLayout.add(NWHOUR_CaptionLabel);\n NWHOUR_DscField17 = new dsc.echo2app.component.DscField();\n NWHOUR_DscField17.setWidth(new Extent(60));\n NWHOUR_DscField17.setId(\"NWHOUR_DscField17\");\n rootLayout.add(NWHOUR_DscField17);\n ADDHOLN_CaptionLabel = new nextapp.echo2.app.Label();\n ADDHOLN_CaptionLabel.setText(\"N_GET_DATA.ADDHOLN\");\n rootLayout.add(ADDHOLN_CaptionLabel);\n ADDHOLN_DscField18 = new dsc.echo2app.component.DscField();\n ADDHOLN_DscField18.setWidth(new Extent(60));\n ADDHOLN_DscField18.setId(\"ADDHOLN_DscField18\");\n rootLayout.add(ADDHOLN_DscField18);\n LMATER_CaptionLabel = new nextapp.echo2.app.Label();\n LMATER_CaptionLabel.setText(\"N_GET_DATA.LMATER\");\n rootLayout.add(LMATER_CaptionLabel);\n LMATER_DscField19 = new dsc.echo2app.component.DscField();\n LMATER_DscField19.setWidth(new Extent(60));\n LMATER_DscField19.setId(\"LMATER_DscField19\");\n rootLayout.add(LMATER_DscField19);\n LOCKED_CaptionLabel = new nextapp.echo2.app.Label();\n LOCKED_CaptionLabel.setText(\"N_GET_DATA.LOCKED\");\n rootLayout.add(LOCKED_CaptionLabel);\n LOCKED_DscField20 = new dsc.echo2app.component.DscField();\n LOCKED_DscField20.setWidth(new Extent(60));\n LOCKED_DscField20.setId(\"LOCKED_DscField20\");\n rootLayout.add(LOCKED_DscField20);\n// UP_DATE_CaptionLabel = new nextapp.echo2.app.Label();\n// UP_DATE_CaptionLabel.setText(\"N_GET_DATA.UP_DATE\");\n// rootLayout.add(UP_DATE_CaptionLabel);\n// UP_DATE_DscDateField1 = new dsc.echo2app.component.DscDateField();\n// UP_DATE_DscDateField1.setId(\"UP_DATE_DscDateField1\");\n// rootLayout.add(UP_DATE_DscDateField1);\n// UP_USER_CaptionLabel = new nextapp.echo2.app.Label();\n// UP_USER_CaptionLabel.setText(\"N_GET_DATA.UP_USER\");\n// rootLayout.add(UP_USER_CaptionLabel);\n// UP_USER_DscField22 = new dsc.echo2app.component.DscField();\n// UP_USER_DscField22.setId(\"UP_USER_DscField22\");\n// rootLayout.add(UP_USER_DscField22);\n dailyContent = new DataDailyBrowserContent();\n splitPane.add(dailyContent);\n\t}",
"private JPanel buildNorthPanel() {\n\t\t\n\t\tGridBagLayout layout;\n\t\tGridBagConstraints constraints;\n\t\tJPanel panel;\n\t\tint row, col;\n\t\t\n\t\tlayout = new GridBagLayout();\n\t\tconstraints = new GridBagConstraints();\n\t\tpanel = new JPanel(layout);\n\t\trow = 0;\n\t\tcol = 0;\n\t\tJLabel headerLabel = new JLabel(stringFactory.getString(\n\t\t\t\tLabelStringFactory.SAVEASCONFIG_FRAME_SAVE_NEW_CONFIGURATION));\n\t\theaderLabel.setFont(new Font(\"arial\", Font.PLAIN, 18));\n\t\tGUIUtils.add(panel, headerLabel, layout, constraints, row++, col, \n\t\t\t1, 1, 1, 1, GridBagConstraints.NORTHEAST, GridBagConstraints.BOTH,\n\t\t\tGUIUtils.MED_LARGE_INSETS);\n\t\treturn panel;\n\t}",
"private CellPanel defineUI()\n\t{\n\t\t//TODO define all UI Stuff here - not needed if GWT Designer is used as it will do the work for us.\n\n\t\tcellPanelContainer = new VerticalPanel();\t\t\n\t cellPanelContainer.setSize(\"598px\", \"530px\");\n\t\treturn cellPanelContainer;\n\t}",
"private void layoutControls() {\n\t\t// cleanup all elements of lane (old regions for task)\n\t\tgetChildren().clear();\n\t\tgetRowConstraints().clear();\n\t\tgetColumnConstraints().clear();\n\t\trow = 1;\n\n\t\tallTasks = createRegionsForTasks(model.getRepo().readByStatus(status), color);\n\n\t\t// Nur eine Spalte für diese Lane.\n\t\tConstraintHelper.setColumnPercentConstraint(this, 100);\n\t\t\n\t\t// Für das Label.\n\t\tadd(label, 0, 0);\n\t\tConstraintHelper.setRowPercentConstraint(this, 5);\n\t\tGridPane.setMargin(label, new Insets(0, 0, 0, 3));\n\t\t\n\t\t// Padding für die Lane.\n\t\tsetPadding(new Insets(5));\n\n\t\tallTasks.stream()\n\t\t\t.forEach(task -> {\n\t\t\t\tConstraintHelper.setRowPercentConstraint(this, 95.0 / MAX_TASKS_PER_LANE);\n\t\t\t\tadd(task, 0, row++);\n\t\t\t\tGridPane.setMargin(task, new Insets(3));\n\t\t\t});\n\t}",
"@AutoGenerated\r\n\tprivate GridLayout buildGridLayout_3() {\n\t\tgridLayout_3 = new GridLayout();\r\n\t\tgridLayout_3.setWidth(\"100.0%\");\r\n\t\tgridLayout_3.setHeight(\"100.0%\");\r\n\t\tgridLayout_3.setImmediate(false);\r\n\t\tgridLayout_3.setMargin(false);\r\n\t\tgridLayout_3.setSpacing(true);\r\n\t\tgridLayout_3.setColumns(4);\r\n\t\tgridLayout_3.setRows(7);\r\n\t\t\r\n\t\t// flnmLbl\r\n\t\tflnmLbl = new Label();\r\n\t\tflnmLbl.setWidth(\"-1px\");\r\n\t\tflnmLbl.setHeight(\"-1px\");\r\n\t\tflnmLbl.setValue(\"Filename\");\r\n\t\tflnmLbl.setImmediate(false);\r\n\t\tgridLayout_3.addComponent(flnmLbl, 0, 1);\r\n\t\t\r\n\t\t// txtFlnm\r\n\t\ttxtFlnm = new TextField();\r\n\t\ttxtFlnm.setWidth(\"-1px\");\r\n\t\ttxtFlnm.setHeight(\"-1px\");\r\n\t\ttxtFlnm.setImmediate(false);\r\n\t\ttxtFlnm.setValue(\"test\"); //set default filename\r\n\t\tgridLayout_3.addComponent(txtFlnm, 1, 1);\r\n\t\t\r\n\t\t// svlcLbl\r\n\t\tsvlcLbl = new Label();\r\n\t\tsvlcLbl.setWidth(\"-1px\");\r\n\t\tsvlcLbl.setHeight(\"-1px\");\r\n\t\tsvlcLbl.setValue(\"Save location\");\r\n\t\tsvlcLbl.setImmediate(false);\r\n\t\tgridLayout_3.addComponent(svlcLbl, 0, 2);\r\n\t\t\r\n\t\t// txtSvLc\r\n\t\ttxtSvLc = new TextField();\r\n\t\ttxtSvLc.setWidth(\"-1px\");\r\n\t\ttxtSvLc.setHeight(\"-1px\");\r\n\t\ttxtSvLc.setImmediate(false);\r\n\t\ttxtSvLc.setValue(System.getProperty(\"user.home\") + File.separator);\r\n\t\tgridLayout_3.addComponent(txtSvLc, 1, 2);\r\n\t\t\r\n\t\t// brwBtn\r\n\t\tbrwBtn = new NativeButton();\r\n\t\tbrwBtn.setWidth(\"-1px\");\r\n\t\tbrwBtn.setHeight(\"-1px\");\r\n\t\tbrwBtn.setCaption(\"Browse...\");\r\n\t\tbrwBtn.setImmediate(true);\r\n\t\tgridLayout_3.addComponent(brwBtn, 2, 2);\r\n\t\t\r\n\t\tbrwBtn.addListener(new Button.ClickListener() {\r\n\r\n\t\t\tprivate static final long serialVersionUID = -8389582613309805795L;\r\n\r\n\t\t\tpublic void buttonClick(Button.ClickEvent event) {\r\n//\t\t\t\tbrowse();\r\n\t\t\t}\r\n });\r\n\t\t\r\n\t\t// rcrdLbl\r\n\t\trcrdLbl = new Label();\r\n\t\trcrdLbl.setWidth(\"-1px\");\r\n\t\trcrdLbl.setHeight(\"-1px\");\r\n\t\trcrdLbl.setValue(\"Record type\");\r\n\t\trcrdLbl.setImmediate(false);\r\n\t\tgridLayout_3.addComponent(rcrdLbl, 0, 3);\r\n\t\t\r\n\t\t// slctRrcdTp\r\n\t\tslctRrcdTp = new NativeSelect();\r\n\t\tslctRrcdTp.setWidth(\"-1px\");\r\n\t\tslctRrcdTp.setHeight(\"-1px\");\r\n\t\tslctRrcdTp.setImmediate(false);\r\n\t\tslctRrcdTp.addItem(\"audio+video\");\r\n\t\tslctRrcdTp.addItem(\"video only\");\r\n\t\tslctRrcdTp.addItem(\"audio only\");\r\n\t\tslctRrcdTp.setValue(\"audio+video\"); //set default record type\r\n\t\tgridLayout_3.addComponent(slctRrcdTp, 1, 3);\r\n\t\t\r\n\t\t// RcrdCtdLbl\r\n\t\tRcrdCtdLbl = new Label();\r\n\t\tRcrdCtdLbl.setWidth(\"-1px\");\r\n\t\tRcrdCtdLbl.setHeight(\"-1px\");\r\n\t\tRcrdCtdLbl.setValue(\"Recording countdown\");\r\n\t\tRcrdCtdLbl.setImmediate(false);\r\n\t\tgridLayout_3.addComponent(RcrdCtdLbl, 0, 4);\r\n\t\t\r\n\t\t// txtRrcdCtd\r\n\t\ttxtRrcdCtd = new TextField();\r\n\t\ttxtRrcdCtd.setWidth(\"-1px\");\r\n\t\ttxtRrcdCtd.setHeight(\"-1px\");\r\n\t\ttxtRrcdCtd.setValue(0);\r\n\t\ttxtRrcdCtd.setImmediate(false);\r\n\t\tgridLayout_3.addComponent(txtRrcdCtd, 1, 4);\r\n\t\t\r\n\t\t// DrRcrdLbl\r\n\t\tDrRcrdLbl = new Label();\r\n\t\tDrRcrdLbl.setWidth(\"-1px\");\r\n\t\tDrRcrdLbl.setHeight(\"-1px\");\r\n\t\tDrRcrdLbl.setValue(\"Duration of record\");\r\n\t\tDrRcrdLbl.setImmediate(false);\r\n\t\tgridLayout_3.addComponent(DrRcrdLbl, 0, 5);\r\n\t\t\r\n\t\t// txtDrRcrd\r\n\t\ttxtDrRcrd = new TextField();\r\n\t\ttxtDrRcrd.setWidth(\"-1px\");\r\n\t\ttxtDrRcrd.setHeight(\"-1px\");\r\n\t\ttxtDrRcrd.setValue(0);\r\n\t\ttxtDrRcrd.setImmediate(false);\r\n\t\tgridLayout_3.addComponent(txtDrRcrd, 1, 5);\r\n\t\t\r\n\t\treturn gridLayout_3;\r\n\t}",
"private JPanel buildContentPanel() {\n JPanel content = new JPanel();\n content.setLayout(new GridBagLayout());\n\n m_ipField = new JTextField(10);\n m_ipField.setText(m_defaultIp);\n\n m_portField = new JTextField(5);\n m_portField.setText(m_defaultPort);\n\n // First Column\n GridBagConstraints gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.insets = new Insets(2, 2, 2, 2);\n content.add(new JLabel(\"IP:\"), gbc);\n\n\n // Second Column\n gbc.gridx = 1;\n gbc.gridy = 0;\n content.add(m_ipField, gbc);\n\n\n // Third Column\n gbc.gridx = 2;\n gbc.gridy = 0;\n gbc.gridwidth = 1;\n content.add(new JLabel(\"Port:\"), gbc);\n\n // Fourth Column\n gbc.gridx = 3;\n content.add(m_portField, gbc);\n\n\n // Separator\n gbc.gridx = 0;\n gbc.gridy = 2;\n gbc.gridwidth = 5;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n content.add(new JSeparator(), gbc);\n\n return content;\n }",
"public int getGridWidth() { return gridWidth; }",
"private void $$$setupUI$$$() {\n mainPanel = new JPanel();\n mainPanel.setLayout(new GridLayoutManager(3, 3, new Insets(0, 0, 0, 0), -1, -1));\n toolBarPanel = new JPanel();\n toolBarPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(toolBarPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n containerPanel = new JPanel();\n containerPanel.setLayout(new BorderLayout(0, 0));\n mainPanel.add(containerPanel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n errorPanel = new JPanel();\n errorPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(errorPanel, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n valuePanel = new JPanel();\n valuePanel.setLayout(new BorderLayout(0, 0));\n mainPanel.add(valuePanel, new GridConstraints(1, 1, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"view as\");\n mainPanel.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n comboBox1 = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n defaultComboBoxModel1.addElement(\"UTF-8String\");\n comboBox1.setModel(defaultComboBoxModel1);\n mainPanel.add(comboBox1, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }",
"public void fillGamePanel() {\n for (int row = 0; row < world.getRowCount(); row++) {\n for (int col = 0; col < world.getColumnCount(); col++) {\n add(world.getCellAt(row, col));\n world.getCellAt(row, col).setBorder(\n BorderFactory.createMatteBorder(\n 1, 1, 0, 0, Color.BLACK));\n }\n }\n for (int row = 0; row < world.getRowCount(); row++) {\n for (int col = 0; col < world.getColumnCount(); col++) {\n gridPanel.add(world.getCellAt(row, col));\n world.getCellAt(row, col).setBorder(\n BorderFactory.createMatteBorder(\n 1, 1, 0, 0, Color.BLACK));\n }\n }\n }",
"private void initDiceGridPanel() {\n\t\tdicePanel = new JPanel(new GridLayout(GRID, GRID));\n\t\tdicePanel.setPreferredSize(new Dimension(400, 400));\n\t\tdicePanel.setBorder(BorderFactory.createTitledBorder(\"Boggle Board\"));\n\t\tdieListener = new DieListener();\n\t\tint x, y;\n\t\t//int dieCounter = 0;\n\t\tdieGrid = new DieButton[GRID][GRID];\n\t\tfor (y = 0; y < GRID; y++) {\n\t\t\tfor (x = 0; x < GRID; x++) {\n\t\t\t\tdieGrid[y][x] = new DieButton(\"\");\n\t\t\t\tdieGrid[y][x].setFont(new Font(\"Arial\", Font.BOLD, 40));\n\t\t\t\tdieGrid[y][x].setFocusable(false);\n\t\t\t\tdieGrid[y][x].setRow(y);\n\t\t\t\tdieGrid[y][x].setCol(x);\n\t\t\t\tdieGrid[y][x].addActionListener(dieListener);\n\t\t\t\tdicePanel.add(dieGrid[y][x]);\n\t\t\t}\n\t\t}\n\t}",
"public Grid() {\n minorLinesPath = new Path2D.Double();\n majorLinesPath = new Path2D.Double();\n\n minorLinePositions = new double[2][];\n majorLinePositions = new double[2][];\n\n minorLinePositionsScreen = new int[2][];\n majorLinePositionsScreen = new int[2][];\n\n listeners = new LinkedList<>();\n\n stroke = new BasicStroke();\n }",
"private void $$$setupUI$$$() {\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(5, 2, new Insets(0, 0, 0, 0), -1, -1));\n targetClassesTextField = new JTextField();\n panel.add(targetClassesTextField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel.add(spacer1, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n targetClassesLabel = new JLabel();\n targetClassesLabel.setText(\"Target classes\");\n panel.add(targetClassesLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n sourceDirTextField = new JTextField();\n panel.add(sourceDirTextField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n sourceDirLabel = new JLabel();\n sourceDirLabel.setText(\"Source dir\");\n panel.add(sourceDirLabel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n reportDirTextField = new JTextField();\n panel.add(reportDirTextField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n reportDirLabel = new JLabel();\n reportDirLabel.setText(\"Report dir\");\n panel.add(reportDirLabel, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n otherParamsTextField = new JTextField();\n panel.add(otherParamsTextField, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n otherParamsLabel = new JLabel();\n otherParamsLabel.setText(\"Other params\");\n panel.add(otherParamsLabel, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }",
"private void createLayout () {\n \t\n \tBorderPane border = new BorderPane();\n \t\n \t\n \t tabPane = new TabPane();\n ArrayList <ScrollPane> tabs = new ArrayList <ScrollPane>();\n \t\n //create column 1 - need to refactor this and make more generic\n TilePane col1 = new TilePane();\n \tcol1.setPrefColumns(2);\n \tcol1.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n \tcol1.setAlignment(Pos.TOP_LEFT);\n \tcol1.getChildren().addAll(createElements ());\n \tScrollPane scrollCol1 = new ScrollPane(col1);\n \ttabs.add(scrollCol1);\n \t\n \tTilePane col2 = new TilePane();\n \tcol2.setPrefColumns(2);\n \tcol2.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n \tcol2.setAlignment(Pos.TOP_LEFT);\n \tcol2.getChildren().addAll(createElements ());\n \tScrollPane scrollCol2 = new ScrollPane(col2);\n \ttabs.add(scrollCol2);\n \t\n \t\n \t\n for (int i = 0; i < tabs.size(); i++) {\n Tab tab = new Tab();\n String tabLabel = \"Col-\" + i;\n tab.setText(tabLabel);\n keywordsList.put(tabLabel, new ArrayList <String>());\n \n tab.setContent(tabs.get(i));\n tabPane.getTabs().add(tab);\n }\n \t\n \t\n \t\n \t\n \t\n \t\n //System.out.println(controller.getScene());\n border.prefHeightProperty().bind(controller.primaryStage.heightProperty());\n border.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n ToolBar toolbar = createtoolBar();\n toolbar.setPrefHeight(50);\n \n border.setTop(toolbar);\n\t\t\n\n\t scrollCol1.prefHeightProperty().bind(controller.primaryStage.heightProperty());\n\t scrollCol1.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n border.setCenter(tabPane);\n\t Group root = (Group)this.getRoot();\n root.getChildren().add(border);\n\t}",
"public JPanel createPanel() {\n\t\t\r\n\t\tJPanel mainPanel = new JPanel();\r\n\t\tmainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));\r\n\t\tmainPanel.setBackground(Color.WHITE);\r\n\t\tmainPanel.setBorder(new CompoundBorder(\r\n\t\t\t\tBorderFactory.createLineBorder(new Color(0x3B70A3), 4),\r\n\t\t\t\tnew EmptyBorder(10, 20, 10, 20)));\r\n\r\n\t\t/*\r\n\t\t * Instruction\r\n\t\t */\t\r\n\t\tmainPanel.add(instructionPanel());\r\n\t\t\r\n\t\t\r\n\t\t// TODO: set task order for each group - make first 3 tasks = groups tasks\r\n\t\tmainPanel.add(messagesPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(phonePanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(clockPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(cameraPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\t\r\n\r\n\t\tmainPanel.add(contactPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(galleryPanel());\r\n\t\t\r\n\t\treturn mainPanel;\r\n\t}",
"private void fillGridForPreLayout(RecyclerView.Recycler recycler, RecyclerView.State state) {\r\n while ( fakeSpanBottomMin <= bottomBorder\r\n && mCurrentPosition >=0 && mCurrentPosition < state.getItemCount()) {\r\n layoutChunk(recycler, state, true, true);\r\n }\r\n }",
"@AutoGenerated\r\n\tprivate GridLayout buildGridLayout_5() {\n\t\tgridLayout_5 = new GridLayout();\r\n\t\tgridLayout_5.setWidth(\"100.0%\");\r\n\t\tgridLayout_5.setHeight(\"100.0%\");\r\n\t\tgridLayout_5.setImmediate(false);\r\n\t\tgridLayout_5.setMargin(false);\r\n\t\tgridLayout_5.setSpacing(true);\r\n\t\tgridLayout_5.setColumns(4);\r\n\t\tgridLayout_5.setRows(7);\r\n\t\t\r\n\t\t// chnlsLbl\r\n\t\tchnlsLbl = new Label();\r\n\t\tchnlsLbl.setWidth(\"-1px\");\r\n\t\tchnlsLbl.setHeight(\"-1px\");\r\n\t\tchnlsLbl.setValue(\"Channels\");\r\n\t\tchnlsLbl.setImmediate(false);\r\n\t\tgridLayout_5.addComponent(chnlsLbl, 0, 1);\r\n\t\t\r\n\t\t// slctChnls\r\n\t\tslctChnls = new NativeSelect();\r\n\t\tslctChnls.setWidth(\"-1px\");\r\n\t\tslctChnls.setHeight(\"-1px\");\r\n\t\tslctChnls.setImmediate(false);\r\n\t\tslctChnls.addItem(1);\r\n\t\tslctChnls.addItem(2);\r\n\t\tslctChnls.setValue(2); //set default number of channels\r\n\t\tgridLayout_5.addComponent(slctChnls, 1, 1);\r\n\t\t\r\n\t\t// smplSzLbl\r\n\t\tsmplSzLbl = new Label();\r\n\t\tsmplSzLbl.setWidth(\"-1px\");\r\n\t\tsmplSzLbl.setHeight(\"-1px\");\r\n\t\tsmplSzLbl.setValue(\"Sample size\");\r\n\t\tsmplSzLbl.setImmediate(false);\r\n\t\tgridLayout_5.addComponent(smplSzLbl, 0, 2);\r\n\t\t\r\n\t\t// slctSmplSz\r\n\t\tslctSmplSz = new NativeSelect();\r\n\t\tslctSmplSz.setWidth(\"-1px\");\r\n\t\tslctSmplSz.setHeight(\"-1px\");\r\n\t\tslctSmplSz.setImmediate(false);\r\n\t\tslctSmplSz.addItem(\"8-bit\");\r\n\t\tslctSmplSz.addItem(\"16-bit\");\r\n\t\tslctSmplSz.setValue(\"16-bit\"); //set default sample size\r\n\t\tgridLayout_5.addComponent(slctSmplSz, 1, 2);\r\n\t\t\r\n\t\t// splRtLbl\r\n\t\tsplRtLbl = new Label();\r\n\t\tsplRtLbl.setWidth(\"-1px\");\r\n\t\tsplRtLbl.setHeight(\"-1px\");\r\n\t\tsplRtLbl.setValue(\"Sample rate\");\r\n\t\tsplRtLbl.setImmediate(false);\r\n\t\tgridLayout_5.addComponent(splRtLbl, 0, 3);\r\n\t\t\r\n\t\t// slctSmplRt\r\n\t\tslctSmplRt = new NativeSelect();\r\n\t\tslctSmplRt.setWidth(\"-1px\");\r\n\t\tslctSmplRt.setHeight(\"-1px\");\r\n\t\tslctSmplRt.setImmediate(false);\r\n\t\tslctSmplRt.addItem(8000);\r\n\t\tslctSmplRt.addItem(11025);\r\n\t\tslctSmplRt.addItem(16000);\r\n\t\tslctSmplRt.addItem(22050);\r\n\t\tslctSmplRt.addItem(44100);\r\n\t\tslctSmplRt.setValue(44100); //set default sample rate\r\n\t\tgridLayout_5.addComponent(slctSmplRt, 1, 3);\r\n\t\t\r\n\t\treturn gridLayout_5;\r\n\t}",
"public static Layout createHorizontalFlowLayout() {\n\t\treturn createHorizontalFlowLayout(null, 0);\n\t}",
"private void initView() {\n\n LayoutInflater inflater = getLayoutInflater();\n final int screenWidth = MyUtils.getScreenMetrics(this).widthPixels;\n final int screenHeight = MyUtils.getScreenMetrics(this).heightPixels;\n for (int i = 0; i < 3; i++) {\n ViewGroup layout = (ViewGroup) inflater.inflate(\n R.layout.content_layout, myHorizontal, false);\n layout.getLayoutParams().width = screenWidth;\n TextView textView = (TextView) layout.findViewById(R.id.title);\n textView.setText(\"page \" + (i + 1));\n layout.setBackgroundColor(Color.rgb(255 / (i + 1), 255 / (i + 1), 0));\n createList(layout);\n myHorizontal.addView(layout);\n }\n }",
"private void $$$setupUI$$$() {\n panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(5, 5, new Insets(5, 5, 5, 5), -1, -1));\n final JLabel label1 = new JLabel();\n label1.setText(\"Client\");\n panel1.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"Server\");\n panel1.add(label2, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel1.add(scrollPane1, new GridConstraints(1, 0, 1, 5, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n textArea1 = new JTextArea();\n textArea1.setText(\"\");\n scrollPane1.setViewportView(textArea1);\n final JScrollPane scrollPane2 = new JScrollPane();\n panel1.add(scrollPane2, new GridConstraints(3, 0, 1, 5, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n textArea2 = new JTextArea();\n scrollPane2.setViewportView(textArea2);\n closeButton = new JButton();\n closeButton.setText(\"Close\");\n panel1.add(closeButton, new GridConstraints(4, 4, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }",
"private void $$$setupUI$$$() {\n rootPanel = new JPanel();\n rootPanel.setLayout(new GridLayoutManager(3, 5, new Insets(0, 5, 5, 5), -1, -1));\n worldMap = new JPanel();\n worldMap.setLayout(new GridBagLayout());\n worldMap.setBackground(new Color(-1250068));\n rootPanel.add(worldMap, new GridConstraints(1, 0, 2, 5, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, new Dimension(500, 500), null, null, 0, false));\n simulationTime = new JLabel();\n simulationTime.setText(\"0s\");\n rootPanel.add(simulationTime, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Simulation time:\");\n rootPanel.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n rootPanel.add(spacer1, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n averageWaitingTime = new JLabel();\n averageWaitingTime.setText(\"0s\");\n rootPanel.add(averageWaitingTime, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"Average waiting time\");\n rootPanel.add(label2, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }",
"public Grid() {\n setPreferredSize(new Dimension(960, 640));\n setBounds(0, 0, 960, 640);\n setLayout(null);\n setBackground(Color.black);\n this.size = 30;\n squares = new Square[size][20];\n }",
"boolean hasGridLayout();",
"public void initializeCalendarGrid(){\n int rows = 6;\n int cols = 7;\n for (int i = 0; i < rows; i++){\n for (int j = 0; j < cols; j++){\n \n // Add VBox and style it\n VBox vPane = new VBox();\n vPane.getStyleClass().add(\"calendar_pane\");\n vPane.setMinWidth(weekdayHeader.getPrefWidth()/7);\n \n vPane.addEventHandler(MouseEvent.MOUSE_CLICKED, (e)->{\n addEvent(vPane);\n });\n \n GridPane.setVgrow(vPane, Priority.ALWAYS);\n \n // Add it to the grid\n calendarGrid.add(vPane, j, i); \n }\n } \n \n // Set up Row Constraints\n for (int i = 0; i < 7; i++) {\n RowConstraints row = new RowConstraints();\n row.setMinHeight(scrollPane.getHeight()/7);\n calendarGrid.getRowConstraints().add(row);\n }\n }",
"private void $$$setupUI$$$() {\n createUIComponents();\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel.setMinimumSize(new Dimension(-1, -1));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n nodeList.setSelectionMode(1);\n scrollPane1.setViewportView(nodeList);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel.add(panel1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n addNodeButton = new JButton();\n this.$$$loadButtonText$$$(addNodeButton, ResourceBundle.getBundle(\"language\").getString(\"button_addNode\"));\n panel1.add(addNodeButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n removeNodeButton = new JButton();\n this.$$$loadButtonText$$$(removeNodeButton, ResourceBundle.getBundle(\"language\").getString(\"button_removeNode\"));\n panel1.add(removeNodeButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n Font label1Font = this.$$$getFont$$$(\"Droid Sans Mono\", Font.BOLD, 16, label1.getFont());\n if (label1Font != null) label1.setFont(label1Font);\n this.$$$loadLabelText$$$(label1, ResourceBundle.getBundle(\"language\").getString(\"title_nodes\"));\n panel.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }"
] |
[
"0.6688575",
"0.6266112",
"0.6240668",
"0.62241185",
"0.59883046",
"0.5956099",
"0.59238017",
"0.58897537",
"0.58695024",
"0.58412755",
"0.58249074",
"0.5816845",
"0.5814632",
"0.571843",
"0.5679437",
"0.5664741",
"0.56318045",
"0.562016",
"0.5587103",
"0.55542445",
"0.5543225",
"0.55308384",
"0.5523578",
"0.55070025",
"0.549788",
"0.54833394",
"0.54802907",
"0.5479222",
"0.54356086",
"0.54248124",
"0.54091096",
"0.54077965",
"0.54028165",
"0.5389392",
"0.53773415",
"0.5375006",
"0.53744125",
"0.5361299",
"0.5339718",
"0.5337151",
"0.53299564",
"0.53256583",
"0.5321695",
"0.5316363",
"0.5315509",
"0.5301824",
"0.528889",
"0.5287457",
"0.5285231",
"0.52830774",
"0.52799284",
"0.52790886",
"0.5276388",
"0.5271024",
"0.5267096",
"0.52636546",
"0.52610856",
"0.5257564",
"0.52496725",
"0.52460104",
"0.5242416",
"0.524125",
"0.52301043",
"0.52292573",
"0.5229173",
"0.522052",
"0.5217751",
"0.5217522",
"0.5211206",
"0.5201638",
"0.51989985",
"0.5197833",
"0.51926553",
"0.51847875",
"0.51773894",
"0.51724696",
"0.5167851",
"0.51667845",
"0.5163964",
"0.5155083",
"0.51549554",
"0.5133935",
"0.5129439",
"0.5120111",
"0.5114429",
"0.5111257",
"0.51110023",
"0.5106643",
"0.5102816",
"0.5096981",
"0.50967336",
"0.50739944",
"0.50640607",
"0.5059804",
"0.5053386",
"0.50470483",
"0.50440294",
"0.5043278",
"0.5041333",
"0.5037121"
] |
0.7052298
|
0
|
Not used in this class.
|
public void addLayoutComponent(String name, Component component) { }
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n protected void init() {\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n protected void prot() {\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n }",
"@Override\n void init() {\n }",
"@Override\n public void init() {}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override public int describeContents() { return 0; }",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n public void initialize() {\n \n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"private MetallicityUtils() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"protected Doodler() {\n\t}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"protected Problem() {/* intentionally empty block */}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void initialize() { \n }",
"protected void initialize() {}",
"protected void initialize() {}",
"@Override\n public void init() {\n }",
"private TMCourse() {\n\t}",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n public void memoria() {\n \n }",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"private Unescaper() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void init() {\n\t}"
] |
[
"0.64961404",
"0.63214976",
"0.6217457",
"0.62030166",
"0.61921257",
"0.61761427",
"0.61761427",
"0.61761427",
"0.61761427",
"0.61761427",
"0.61761427",
"0.61731684",
"0.6170836",
"0.6168173",
"0.606804",
"0.6052826",
"0.60429525",
"0.60247415",
"0.6019729",
"0.6019729",
"0.59856457",
"0.59749216",
"0.597073",
"0.5968885",
"0.5956589",
"0.5949246",
"0.5949246",
"0.5943266",
"0.59403867",
"0.59388435",
"0.5930235",
"0.5886251",
"0.5886251",
"0.5881647",
"0.58636135",
"0.58482075",
"0.58447474",
"0.58362895",
"0.58337986",
"0.5827552",
"0.58148056",
"0.580768",
"0.5805137",
"0.5803095",
"0.5803095",
"0.5801211",
"0.5797574",
"0.5793956",
"0.5793956",
"0.5793956",
"0.57887566",
"0.5785383",
"0.5785383",
"0.5785383",
"0.5785383",
"0.5785383",
"0.5781262",
"0.57801616",
"0.57801616",
"0.57801616",
"0.5765502",
"0.5765174",
"0.57609737",
"0.57609737",
"0.5757033",
"0.57480484",
"0.5745851",
"0.57348335",
"0.5733251",
"0.57265806",
"0.57265806",
"0.5719118",
"0.57191133",
"0.57191133",
"0.5716613",
"0.57146907",
"0.5705756",
"0.56986946",
"0.56986946",
"0.56986946",
"0.56986946",
"0.56986946",
"0.56986946",
"0.56986946",
"0.56986946",
"0.56986946",
"0.56986946",
"0.5692686",
"0.5692686",
"0.5683777",
"0.56786627",
"0.5673094",
"0.56502223",
"0.56371635",
"0.56349844",
"0.5632787",
"0.5632787",
"0.5632787",
"0.5628922",
"0.5626513",
"0.5623928"
] |
0.0
|
-1
|
Not used in this class.
|
public void addLayoutComponent(Component component, Object constraints) { }
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n protected void init() {\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n protected void prot() {\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n }",
"@Override\n void init() {\n }",
"@Override\n public void init() {}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override public int describeContents() { return 0; }",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n public void initialize() {\n \n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"private MetallicityUtils() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"protected Doodler() {\n\t}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"protected Problem() {/* intentionally empty block */}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void initialize() { \n }",
"protected void initialize() {}",
"protected void initialize() {}",
"@Override\n public void init() {\n }",
"private TMCourse() {\n\t}",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n public void memoria() {\n \n }",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"private Unescaper() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void init() {\n\t}"
] |
[
"0.64961404",
"0.63214976",
"0.6217457",
"0.62030166",
"0.61921257",
"0.61761427",
"0.61761427",
"0.61761427",
"0.61761427",
"0.61761427",
"0.61761427",
"0.61731684",
"0.6170836",
"0.6168173",
"0.606804",
"0.6052826",
"0.60429525",
"0.60247415",
"0.6019729",
"0.6019729",
"0.59856457",
"0.59749216",
"0.597073",
"0.5968885",
"0.5956589",
"0.5949246",
"0.5949246",
"0.5943266",
"0.59403867",
"0.59388435",
"0.5930235",
"0.5886251",
"0.5886251",
"0.5881647",
"0.58636135",
"0.58482075",
"0.58447474",
"0.58362895",
"0.58337986",
"0.5827552",
"0.58148056",
"0.580768",
"0.5805137",
"0.5803095",
"0.5803095",
"0.5801211",
"0.5797574",
"0.5793956",
"0.5793956",
"0.5793956",
"0.57887566",
"0.5785383",
"0.5785383",
"0.5785383",
"0.5785383",
"0.5785383",
"0.5781262",
"0.57801616",
"0.57801616",
"0.57801616",
"0.5765502",
"0.5765174",
"0.57609737",
"0.57609737",
"0.5757033",
"0.57480484",
"0.5745851",
"0.57348335",
"0.5733251",
"0.57265806",
"0.57265806",
"0.5719118",
"0.57191133",
"0.57191133",
"0.5716613",
"0.57146907",
"0.5705756",
"0.56986946",
"0.56986946",
"0.56986946",
"0.56986946",
"0.56986946",
"0.56986946",
"0.56986946",
"0.56986946",
"0.56986946",
"0.56986946",
"0.5692686",
"0.5692686",
"0.5683777",
"0.56786627",
"0.5673094",
"0.56502223",
"0.56371635",
"0.56349844",
"0.5632787",
"0.5632787",
"0.5632787",
"0.5628922",
"0.5626513",
"0.5623928"
] |
0.0
|
-1
|
Not used in this class.
|
public void removeLayoutComponent(Component component) { }
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n protected void init() {\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n protected void prot() {\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n }",
"@Override\n void init() {\n }",
"@Override\n public void init() {}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override public int describeContents() { return 0; }",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n public void initialize() {\n \n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"private MetallicityUtils() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"protected Doodler() {\n\t}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"protected Problem() {/* intentionally empty block */}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void initialize() { \n }",
"protected void initialize() {}",
"protected void initialize() {}",
"@Override\n public void init() {\n }",
"private TMCourse() {\n\t}",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n public void memoria() {\n \n }",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"private Unescaper() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void init() {\n\t}"
] |
[
"0.64961404",
"0.63214976",
"0.6217457",
"0.62030166",
"0.61921257",
"0.61761427",
"0.61761427",
"0.61761427",
"0.61761427",
"0.61761427",
"0.61761427",
"0.61731684",
"0.6170836",
"0.6168173",
"0.606804",
"0.6052826",
"0.60429525",
"0.60247415",
"0.6019729",
"0.6019729",
"0.59856457",
"0.59749216",
"0.597073",
"0.5968885",
"0.5956589",
"0.5949246",
"0.5949246",
"0.5943266",
"0.59403867",
"0.59388435",
"0.5930235",
"0.5886251",
"0.5886251",
"0.5881647",
"0.58636135",
"0.58482075",
"0.58447474",
"0.58362895",
"0.58337986",
"0.5827552",
"0.58148056",
"0.580768",
"0.5805137",
"0.5803095",
"0.5803095",
"0.5801211",
"0.5797574",
"0.5793956",
"0.5793956",
"0.5793956",
"0.57887566",
"0.5785383",
"0.5785383",
"0.5785383",
"0.5785383",
"0.5785383",
"0.5781262",
"0.57801616",
"0.57801616",
"0.57801616",
"0.5765502",
"0.5765174",
"0.57609737",
"0.57609737",
"0.5757033",
"0.57480484",
"0.5745851",
"0.57348335",
"0.5733251",
"0.57265806",
"0.57265806",
"0.5719118",
"0.57191133",
"0.57191133",
"0.5716613",
"0.57146907",
"0.5705756",
"0.56986946",
"0.56986946",
"0.56986946",
"0.56986946",
"0.56986946",
"0.56986946",
"0.56986946",
"0.56986946",
"0.56986946",
"0.56986946",
"0.5692686",
"0.5692686",
"0.5683777",
"0.56786627",
"0.5673094",
"0.56502223",
"0.56371635",
"0.56349844",
"0.5632787",
"0.5632787",
"0.5632787",
"0.5628922",
"0.5626513",
"0.5623928"
] |
0.0
|
-1
|
Returns the string representation of this variable grid layout's values.
|
public String toString() {
return getClass().getName() + "[mode=" + mode + ",size=" + size
+ ",hgap=" + hgap + ",vgap=" + vgap + "]";
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String toString ()\n\t{\n\t\tString s = \"Grid:\\n\";\n\t\tfor (int row=0; row<GRID_SIZE; row++)\n\t\t{\n\t\t\tfor (int col=0; col<GRID_SIZE; col++) {\n\t\t\t\ts = s + grid[col][row].value()+ \" \";\n\t\t\t}\n\t\t\ts += \"\\n\";\n\t\t}\n\t\treturn s;\n\t}",
"public String getVals(){\n return (\"a: \" + a + \"\\nr: \" + r + \"\\nb: \" + b + \"\\ng: \" + g);\n }",
"public String getLayoutString() {\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tsb.append(\"[\");\r\n\t\tfor (int r=0; r<rows; r++) {\r\n\t\t\tfor (int c=0; c<columns; c++) {\r\n\t\t\t\tint fieldIndex = -1;\r\n\t\t\t\tfor (int i: fieldPositions.keySet()) {\r\n\t\t\t\t\tPoint pos = fieldPositions.get(i);\r\n\t\t\t\t\tif (pos.x == c && pos.y == r) {\r\n\t\t\t\t\t\tfieldIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tsb.append(fieldIndex + \",\");\r\n\t\t\t}\r\n\t\t\tsb.deleteCharAt(sb.length()-1);\r\n\t\t\tsb.append(\";\");\r\n\t\t}\r\n\t\tsb.deleteCharAt(sb.length()-1);\r\n\t\tsb.append(\"]\");\r\n\t\treturn sb.toString();\r\n\t}",
"@Override\n\tpublic String toString() {\n\t\tString grid = \"\";\n\t\tfor (int i = 0; i < this.getNumRow(); i++) {\n\t\t\tgrid = grid + this.storage.get(i).toString() + \"\\n\";\n\t\t}\n\t\tSystem.out.println(grid);\n\t\treturn grid;\n\t}",
"@Override\n\tpublic String toString(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString[] dimensions = {\"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"r\", \"s\", \"t\", \"u\", \"v\", \"z\"};\n\t\t\n\t\tsb.append(\"V = \");\n\t\tsb.append(this.get(0));\n\t\tsb.append(dimensions[0]);\n\t\tfor(int i=1; i<this.getDimension(); i++){\n\t\t\tsb.append(\" + \");\n\t\t\tsb.append(this.get(i));\n\t\t\tsb.append(dimensions[i]);\n\t\t}\n\t\t\t\t\n\t\treturn sb.toString();\n\t}",
"public String toString() {\r\n String modelString =\r\n \"value=\"\r\n + getValue()\r\n + \", \"\r\n + \"extent=\"\r\n + getExtent()\r\n + \", \"\r\n + \"min=\"\r\n + getMinimum()\r\n + \", \"\r\n + \"max=\"\r\n + getMaximum()\r\n + \", \"\r\n + \"adj=\"\r\n + getValueIsAdjusting();\r\n\r\n return getClass().getName() + \"[\" + modelString + \"]\";\r\n }",
"public String toString() {\n\t\tString str = \"(\";\n\t\tif (this.title != null)\n\t\t\tstr += this.title;\n\t\telse if (this.varName != null)\n\t\t\tstr += this.varName;\n\t\tif (this.minVal != null)\n\t\t\tstr += \",\" + this.minVal;\n\t\tif (this.curVal != null)\n\t\t\tstr += \",\" + this.curVal;\n\t\tif (this.maxVal != null)\n\t\t\tstr += \",\" + this.maxVal;\n\t\tstr += \")\";\n\t\treturn str;\n\t}",
"@Override\n public String toString() {\n StringBuilder matrixValues = new StringBuilder(\"\\nMatrix : \"\n + values.length + \"x\" + values[0].length + \"\\n\");\n for (int[] row : values) {\n for (int value : row) {\n matrixValues.append(value + \" \");\n }\n matrixValues.append(\"\\n\");\n }\n return matrixValues.toString();\n }",
"public String toString() {\n\t\treturn (\"The value of \\\"x\\\" is: \" + x + \"\\n\"\n\t\t\t + \"The value of \\\"y\\\" is: \" + y);\n\t}",
"public String getVariablesInternal() {\n StringBuilder b = new StringBuilder();\n JTable table = m_table.getTable();\n int numRows = table.getModel().getRowCount();\n\n for (int i = 0; i < numRows; i++) {\n String paramName = table.getValueAt(i, 0).toString();\n String paramValue = table.getValueAt(i, 1).toString();\n if (paramName.length() > 0 && paramValue.length() > 0) {\n b.append(paramName).append(SetVariables.SEP2).append(paramValue);\n }\n if (i < numRows - 1) {\n b.append(SetVariables.SEP1);\n }\n }\n\n return b.toString();\n }",
"public String toString() {\n\t\treturn type + \" x \" + dim;\n\t}",
"public String toString() {\n String result = \"\";\n result += \" \";\n // Column numbers\n for (int i = 0; i < numberOfColumns; i++) {\n result += (i % 10) + \" \";\n }\n result += \"\\n\";\n result += \" \";\n // Horizontal dividers\n for (int i = 0; i <= 2 * this.numberOfColumns - 2 ; i++) {\n result += HORI_DIVIDE;\n }\n result += \"\\n\";\n // Each horizontal line has the line number, a divider, and the safe data.\n for (int i = 0; i < numberOfRows; i++) {\n result += (i % 10);\n result += VERT_DIVIDE;\n for (int j = 0; j < numberOfColumns; j++) {\n result += grid[i][j];\n if (j != numberOfColumns - 1) {\n result += \" \";\n }\n }\n if (i != numberOfRows - 1) {\n result += \"\\n\";\n }\n }\n return result;\n }",
"public String toString() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (byte m = 0; m < 9; m++) {\n\t\t\tfor (byte n = 0; n < 9; n++) {\n\t\t\t\tsb.append(cells[m][n].getValue());\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}",
"public String toString() {\n\t\treturn (getValue().toString());\r\n\t}",
"@Override\n public String toString() {\n return \"V\"+this.VS_ID+\"\\tNodes: \"+getNodes()[0]+\" & \"+getNodes()[1]+\"\\t\"+\"DC\\t\"+getValue()+\" V\";\n }",
"public String toString()\n {\n String str = \"\";\n switch (align)\n {\n case LEFT :\n str = \",align=left\";\n break;\n case CENTER :\n str = \",align=center\";\n break;\n case RIGHT :\n str = \",align=right\";\n break;\n }\n return getClass().getName() + \"[hgap=\" + hgap + \",vgap=\" + vgap + str + \"]\";\n }",
"public String toString(){\n\t\treturn getValue();\n\t}",
"public String toString() {\r\n\t\tString cad = \"\";\r\n\t\tfor (int i = 0; i < nodes_.size(); i++) {\r\n\t\t\tcad += nodes_.get(i).getVal() + \" - \";\r\n\t\t}\r\n\t\treturn cad;\r\n\t}",
"@Override\n public String toString() {\n double[][] temp = matx.getArray();\n String tempstr = \"[\";\n for (int i = 0; i < temp.length; i++) {\n for (int j = 0; j < temp.length; j++) {\n tempstr += (int) temp[i][j] + \", \";\n }\n tempstr = tempstr.substring(0, tempstr.length() - 2);\n tempstr += \"]\\n[\";\n }\n return tempstr.substring(0, tempstr.length() - 2);\n }",
"public String toString()\n\t{\n\t\treturn getClass().getName() +\n\t\t\t\"[hgap=\" + hgap + \",vgap=\" + vgap + \"]\";\n\t}",
"public String toString () {\n return \"(\" + col + \",\" + row + \")\";\n }",
"public String toString() {\n\t\tString toString = null;\n\t\ttoString = \"[\" + this.px() + \", \" + this.py() + \", \" + this.pz() + \", \" + this.e() + \"]\";\n\t\treturn toString;\n\t}",
"public String getScriptOfValues() {\r\n\t\tString str = \"\";\r\n\r\n\t\tfor (DataVariable var : dataTestModel) {\r\n\t\t\tstr += var.getValue() + \",\";\r\n\t\t}\r\n\t\tif (str.endsWith(\",\")) {\r\n\t\t\tstr = str.substring(0, str.length() - 1);\r\n\t\t}\r\n\t\treturn str;\r\n\t}",
"public String toString() {\n\t\tStringBuilder buff = new StringBuilder();\n\t\tfor (int y = height-1; y>=0; y--) {\n\t\t\tbuff.append('|');\n\t\t\tfor (int x=0; x<width; x++) {\n\t\t\t\tif (getGrid(x,y)) buff.append('+');\n\t\t\t\telse buff.append(' ');\n\t\t\t}\n\t\t\tbuff.append(\"|\\n\");\n\t\t}\n\t\tfor (int x=0; x<width+2; x++) buff.append('-');\n\t\treturn(buff.toString());\n\t}",
"public String toString() {\n\t\tStringBuilder buff = new StringBuilder();\n\t\tfor (int y = height-1; y>=0; y--) {\n\t\t\tbuff.append('|');\n\t\t\tfor (int x=0; x<width; x++) {\n\t\t\t\tif (getGrid(x,y)) buff.append('+');\n\t\t\t\telse buff.append(' ');\n\t\t\t}\n\t\t\tbuff.append(\"|\\n\");\n\t\t}\n\t\tfor (int x=0; x<width+2; x++) buff.append('-');\n\t\treturn(buff.toString());\n\t}",
"public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(dimension + \"\\n\");\n for (int i = 0; i < dimension; i++) {\n for (int j = 0; j < dimension; j++) {\n s.append(String.format(\"%2d \", (int) blocks[i * dimension + j]));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }",
"public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(this.dim + \"\\n\");\n int counter = 0;\n for (int i = 0; i < this.dim; i++) {\n for (int j = 0; j < this.dim; j++) {\n int n = tiles[counter++];\n s.append(String.format(\"%2d \", n));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }",
"public String toString() {\n return label + \"(\" + MathUtil.doubleString(value, 1) + \")\\tweight: \" + MathUtil.doubleString(weight, 2) + \"\\tFeatureVector: \" + featureVector.toString();\n }",
"@Override\r\n\t\tpublic String toString() {\n\t\t\treturn \" \" + wt + \"- \" + val;\r\n\t\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\tString str = new String();\r\n\t\tfor(Cell2048[] a : game) {\r\n\t\t\tfor(Cell2048 b : a)\r\n\t\t\t\tstr += b.getValue();\r\n\t\t}\r\n\t\treturn Integer.toString(rows_size) + \",\" + Integer.toString(columns_size) +\",\" +str;\r\n\t}",
"public String toString()\r\n\t{\r\n\t\tStringBuffer buffer = new StringBuffer(\"{X = \");\r\n\t\tbuffer.append(this.x);\r\n\t\tbuffer.append(\", Y = \");\r\n\t\tbuffer.append(this.y);\r\n\t\tbuffer.append('}');\r\n\t\treturn buffer.toString();\r\n\t}",
"public String toString()\n\t{\n\t\treturn \"\" + storedVar1 + storedVar2;\n\t}",
"public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(dim + \"\\n\");\n for (int i = 0; i < dim; i++) {\n for (int j = 0; j < dim; j++) {\n s.append(String.format(\"%2d \", board[i][j]));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }",
"public String toString() {\n\t\treturn String.format(\"%s = %d\",name,value);\n\t}",
"public String toString() {\n return \"\" + \"Magic=\" + Magic // NOI18N\n + \", Version=\" + Version // NOI18N\n + \", Reserved=\" + Reserved // NOI18N\n + \", StringsOffset=\" + StringsOffset // NOI18N\n + \", NumEntries=\" + NumEntries // NOI18N\n + \", NumBuckets=\" + NumBuckets // NOI18N\n + \", MaxValueLength=\" + MaxValueLength; // NOI18N\n }",
"@Override\r\n public String toString() {\r\n StringBuilder sb = new StringBuilder();\r\n for (int i = 0; i < dimension; i++) {\r\n sb.append(rowToString(i)).append(\"\\n\");\r\n }\r\n //remove the last unnecessary carriage return from the string.\r\n return sb.toString().substring(0, sb.length() - 1);\r\n }",
"public String toString() {\n int[] d = new int[size];\n for (int k=0; k<size; k++)\n d[k] = data[k];\n return Arrays.toString(d);\n }",
"public String toString() {\n return \"mass||\" + iMass + \"\\t\\tintensity||\" + iIntensity;\n\n }",
"public String toString() {\n\t\tString s = \"\";\n\t\t// Loop through all the vertices and add their neighbors to a string\n\t\tfor (int i = 0; i < this.vertices.size(); i++) {\n\t\t\ts += this.vertices.get(i).toString() + \": \" + this.vertices.get(i).getNeighbors() + \"\\n\\n\";\n\t\t}\n\t\ts += \"Number of Total Edges: \" + this.actualTotalEdges;\n\t\treturn s;\n\t}",
"public String toString() {\n return\n getLatitude(\"\") + \"|\" +\n getLongitude(\"\") + \"|\" +\n getDepth(\"\") + \"|\" +\n getTemperatureMin(\"\") + \"|\" +\n getTemperatureMax(\"\") + \"|\" +\n getSalinityMin(\"\") + \"|\" +\n getSalinityMax(\"\") + \"|\" +\n getOxygenMin(\"\") + \"|\" +\n getOxygenMax(\"\") + \"|\" +\n getNitrateMin(\"\") + \"|\" +\n getNitrateMax(\"\") + \"|\" +\n getPhosphateMin(\"\") + \"|\" +\n getPhosphateMax(\"\") + \"|\" +\n getSilicateMin(\"\") + \"|\" +\n getSilicateMax(\"\") + \"|\" +\n getChlorophyllMin(\"\") + \"|\" +\n getChlorophyllMax(\"\") + \"|\";\n }",
"public String toString() {\n\t\tString returnString=\"\";\n\t\t\n\t\tfor (int i=0; i<squares.length; i++) {\n\t\t\tfor (int j=0; j<squares.length; j++) {\n\t\t\t\treturnString+=Character.toString(squares[i][j].getValue());\n\t\t\t}\n\t\t\treturnString+=\"// \";\n\t\t}\n\t\t\n\t\treturn returnString;\n\t}",
"public String toString() {\n return row + \",\" + col;\n }",
"public String toString() {\n\t\t\n\t\tString temp = new String();\n\t\tfor(int i=0; i<grad.length; i++) {\n\t\t\ttemp += grad[i] + \" \";\n\t\t}\n\t\t\n\t\treturn temp;\n\t}",
"public String variableValues() {\n\t\tif (name.values().size()==0)\n\t\t\treturn \"Symbol table is empty\";\n\t\tString s = \"Variable values\\n\";\n\t\tfor (NameSSA n : name.values()) {\n\t\t\tVariable v = var.get(n.current());\n\t\t\tif (v.isConstant())\n\t\t\t\ts += n.current() + \":\" + v.constantNumber();\n\t\t\telse \n\t\t\t\ts += n.current() + \":\" + \" unknown\";\n\t\t\ts+=\" \";\n\t\t}\n\t\treturn s;\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn val.toString();\r\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn value + \"\";\r\n\t}",
"public String getArrayValues(){\n String tempString = \"\";\r\n for(int y = 0; y < this.arraySize; y++){\r\n tempString += \" \"+this.arr[y]+\" \";\r\n }\r\n return tempString;\r\n }",
"public String toString()\n\t{\n\t\t//DecimalFormat df = new DecimalFormat(\"0.00\");\n\t\tString report = \"\";\n\t\treport += \"m = \" + rows + \"\\n\";\n\t\treport += \"n = \" + cols + \"\\n\";\n\t\treport += \"[ | ] = \" + \"\\n\";\n\t\tfor(int i = 0; i < rows; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < cols+1; j++)\n\t\t\t{\n\t\t\t\treport += /*df.format*/(A[i][j]) + \" \";\n\t\t\t}\n\t\t\treport += \"\\n\";\n\t\t}\n\t\treturn report;\n\t}",
"@Override public String toString() {\n return \"\" + \"Value=\" + Value; // NOI18N\n }",
"public String toString()\n {\n int spaceLength = this.lengthToSecondCol - this.name.length();\n String space = \" \";\n String n = \" \";\n String s;\n if(showName)\n {\n n = this.name;\n while(spaceLength > 1)\n {\n spaceLength--;\n space += \" \";\n }\n }\n\n switch (this.type)\n {\n case Pwr.eType_Float32:\n case Pwr.eType_Float64:\n s = n + space + this.valueFloat;\n break;\n case Pwr.eType_UInt32:\n case Pwr.eType_UInt64:\n case Pwr.eType_Int32:\n case Pwr.eType_Int64:\n case Pwr.eType_Enum:\n case Pwr.eType_Mask:\n\n //s = n + space + this.valueInt;\n\ts = n + space + (new Integer( (this.valueInt & 65535) )).intValue();\n break;\n\n case Pwr.eType_UInt16:\n s = n + space + (new Integer( (this.valueInt & 65535) )).intValue();\n break;\n case Pwr.eType_Int8:\n case Pwr.eType_UInt8:\n s = n + space + (new Integer(this.valueInt)).byteValue();\n break;\n case Pwr.eType_Int16:\n s = n + space + (new Integer(this.valueInt)).shortValue();\n break;\n case Pwr.eType_Boolean:\n if(this.valueBoolean)\n {\n s = n + space + \"1\";\n }\n else\n {\n s = n + space + \"0\";\n }\n break;\n default:\n s = n + space + this.valueString;\n break;\n }\n return s;\n }",
"@Override\n public String toString() {\n StringBuilder s = new StringBuilder();\n for (int i = 0; i < this.getHeight(); i++) {\n for (int j = 0; j < this.getWidth(); j++) {\n s.append(this.getEntry(j,i)).append(\" \");\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }",
"public String toString() {\r\n\t\treturn modifier + \" \" + value + \" \" + measure;\r\n\t}",
"@Override\n public String toString() {\n String r = \"\" + value[0];\n for (int i = 1; i < DIM; i++) {\n r += DELIMITER + value[i];\n }\n \n r += DELIMITER + count;\n\n return r;\n }",
"public String getStringValue() {\n return box.getFormat().format(box, box.getValue());\n }",
"public String toString()\n {\n StringBuffer sb = new StringBuffer(\"DoubleBoundedRangeModel[value=\"); //$NON-NLS-1$\n sb.append(\n Double.valueOf((double) getValue() / (double) multiplier).toString());\n sb.append(\", extent=\"); //$NON-NLS-1$\n sb.append(Double.valueOf(dblExtent).toString());\n sb.append(\", minimum=\"); //$NON-NLS-1$\n sb.append(Double.valueOf(dblMinimum).toString());\n sb.append(\", maximum=\"); //$NON-NLS-1$\n sb.append(Double.valueOf(dblMaximum).toString());\n sb.append(\", precision=\"); //$NON-NLS-1$\n sb.append(Integer.valueOf(precision).toString());\n sb.append(\", multiplier=\"); //$NON-NLS-1$\n sb.append(Integer.valueOf(multiplier).toString());\n sb.append(\", adj=\"); //$NON-NLS-1$\n sb.append(Boolean.valueOf(getValueIsAdjusting()).toString());\n sb.append(\"]\"); //$NON-NLS-1$\n\n return sb.toString();\n }",
"public String toString() {\n return value;\r\n }",
"public void printValues() {\n\t\tfor (int i = 0; i < 7; i++) {\n\t\t\tfor (int j = 0; j < 7; j++) {\n\t\t\t\tlblCenter[i][j].setText(\"\" + array.getElement(i, j));\n\t\t\t}\n\t\t\ttfWest[i].setText(\"\" + leftCol.getElement(i));\n\t\t\ttfSouth[i].setText(\"\" + bottomRow.getElement(i));\n\t\t}\n\t}",
"public String toString() {\n return String.format(\"%s%s\", column, row);\n }",
"public String toString() {\n\t String outPut = \"byteValue(): \" + byteValue()\n\t \t\t+ \"\\nshortValue(): \" + shortValue()\n\t \t\t+ \"\\nintValue(): \" + intValue()\n\t \t\t+ \"\\nlongValue(): \" + longValue()\n\t \t\t+ \"\\nfloatValue(): \" + floatValue()\n\t \t\t+ \"\\ndoubleValue(): \" + doubleValue();\n\t \n\t return outPut;\n }",
"public String toString() {\n\t\tString s = \"\";\n\t\tfor (Coord x : array)\n\t\t\ts += x;\n\t\treturn s;\n\t}",
"@Override\n public String toString(){\n return this.getValue();\n }",
"public String toString() {\n\t\treturn \"[\" + this.type + \n\t\t\t\t\" | rate:\" + this.rate + \n\t\t\t\t\" | err:\" + this.error + \n\t\t\t\t\" | loc:\" + this.localisation.x + \",\" + this.localisation.y + \"]\" + \n\t\t\t\t\" | range:\" + this.range + \"\\n\";\n\t}",
"public String toString()\r\n\t{\r\n\t\treturn \" \" + this.value;\r\n\t}",
"public String getGVString() {\n StringBuilder gvString = new StringBuilder();\n\n for (Room room : connections) {\n if (room != null) {\n gvString.append(getGVNodeName()).append(\" -- \").append(room.getGVNodeName()).append(\";\\n\");\n }\n }\n\n return gvString.toString();\n }",
"public String toString() {\n\t\tboolean first = true;\n\t\tStringWriter buf = new StringWriter();\n\t\tbuf.append('[');\n\t\tfor(String value : values) {\n\t\t\tif(first) { first = false; } else { buf.append(\",\"); }\n\t\t\tbuf.append(value);\n\t\t}\n\t\tbuf.append(']');\n\t\treturn buf.toString();\t\t\n\t}",
"public String getValues() {\n\t\tString[] valStrArr = values.toArray(new String[values.size()]);\n\t\tlogInfo(String.join(\", \", valStrArr));\n\t\treturn \"\"+String.join(\", \", valStrArr);\n\t}",
"public String toString() {\n return value;\n }",
"@Override\n public String toString() {\n StringBuilder result = new StringBuilder();\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n int cell = field[i][j];\n result.append(cell == 0 ? \"_\" : (cell == 1 ? \"X\" : \"O\")).append(\" \");\n }\n result.append(\"\\n\");\n }\n return result.toString();\n }",
"@Override\n public String toString() {\n // using String.format to display out put value and infomation of Property\n return String.format(\n \"\\nCoordinates: %d, %d\\n\" + \"Length: %d m Width: %d m\\n\" + \"Registrant: #%d\\nArea: %d m2\\n\"\n + \"Property Taxes : $%.1f\",\n this.getXLeft(), this.getYTop(), this.getXLength(), this.getYWidth(), this.getRegNum(), this.getArea(),\n this.getTaxes());\n }",
"public String toString() {\r\n return this.variable;\r\n }",
"@Override\n public final String toString() {\n return this.value;\n }",
"public String getValueString() {\n int len=0;\n for (String value : values)\n len += value.length();\n return Util.join(values, len>30 ?\"\\n\":\" \");\n }",
"@Override\r\n\tpublic String toString() {\n\t\treturn getValor();\r\n\t}",
"public String toString() {\r\n return \"Row: \" + this.row + \"Column: \"+ this.col;\r\n }",
"@Override\n\tpublic String toString()\n\t{\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tbuffer.append(\"Init: \" + initialState.toString() + \"\\n\");\n\t\tbuffer.append(\"Goal: \" + explicitGoal.toString() + \"\\n\");\n\t\tbuffer.append(\"Vars: \");\n\t\tfor (int var = 0; var < variableNames.size(); var++)\n\t\t{\n\t\t\tbuffer.append(var + \":\" + domainSizes.get(var) + \" \");\n\t\t}\n\t\tbuffer.append(\"\\n\");\n\t\tbuffer.append(\"Num ops: \" + getOperators().size() + \"\\n\");\n\t\treturn buffer.toString();\n\t}",
"@Override\n public String toString() {\n // Determine the width required for the maximum element,\n // and check for fractional display requirement.\n double maxval = 0;\n boolean fractional = false;\n for (int i = 0; i < getRowDimension(); i++) {\n for (int j = 0; j < getColumnDimension(); j++) {\n double current = get(i, j);\n if (current < 0)\n current *= -11;\n if (current > maxval)\n maxval = current;\n double fract = Math.abs(current - Math.rint(current));\n if (!fractional\n && ((Math.log(fract) / Math.log(10)) >= -2)) {\n fractional = true;\n }\n }\n }\n int width = (int)(Math.log(maxval) / Math.log(10)\n + (fractional ? 4 : 1));\n\n StringBuffer text = new StringBuffer();\n for (int i = 0; i < getRowDimension(); i++) {\n for (int j = 0; j < getColumnDimension(); j++)\n text.append(\" \").append(Functions.doubleToString(get(i, j),\n width, (fractional ? 2 : 0)));\n text.append(\"\\n\");\n }\n\n return text.toString();\n }",
"public String toString() {\n StringBuilder output = new StringBuilder();\n output.append(\"{\\n\");\n for (int i=0; i<rows; i++) {\n output.append(Arrays.toString(matrix.get(i)) + \",\\n\");\n }\n output.append(\"}\\n\");\n return output.toString();\n }",
"@Override\n\tpublic String toString() {\n\t\treturn value;\n\t}",
"public String toString() {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tint n = dimension();\r\n\t\tsb = sb.append(n + \"\\n\");\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\tfor (int j = 0; j < n; j++) {\r\n\t\t\t\tsb = sb.append(\" \" + this.blocks[i][j]);\r\n\t\t\t}\r\n\t\t\tif (i != n) {\r\n\t\t\t\tsb = sb.append(\"\\n\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn \"(\" + Double.toString(x) + \", \" + Double.toString(y) + \", \" + Double.toString(z) + \")\";\r\n\t\t// String.format is cleaner, but Double.toString appears to have behavior closer to that of the old editor\r\n//\t\treturn String.format(\"(%f, %f, %f)\", x, y, z);\r\n\t}",
"@Override\r\n public String toString() {\r\n String temp = \"\";\r\n\r\n // item statement are used to generate format for the matrix.\r\n String itemStatement = \" %x.yf\"\r\n .replace(\"x\", \"\" + (Prettify.countSingleDigitSpace(this) + Matrix.significantDigit + 2))\r\n .replace(\"y\", \"\" + Matrix.significantDigit);\r\n\r\n for (double[] row : matrix) {\r\n for (double col : row) {\r\n temp += String.format(itemStatement, col);\r\n }\r\n temp += \"\\n\";\r\n }\r\n\r\n // this one are used to clean up those junks.\r\n // if you need to know it's function, you can disable it,\r\n // it's just kind of magic, here :D\r\n return temp.replaceAll(\"[\\\\s\\\\n]+$\", \"\");\r\n }",
"public String toString()\n {\n return getValue(12);\n }",
"@Override\n public String toString()\n {\n\n String str = String.format(\"%5d %-20s %2c %11.2f\",id,name,rarity,value);\n\n return str;\n }",
"public String toString(){\n String string = new String();\n for(int i = 0; i < axis.length; i++){\n string += axis[i];\n if(i != (axis.length - 1)){\n string += \" / \";\n }\n }\n return string;\n }",
"public String makeString(){\n\t\tString title = getTitle();\n\t\tString xlabel = getXLabel();\n\t\tString ylabel = getYLabel();\n\t\tString GraphableDataInfoString = (\"<\" + title + \",\" + xlabel + \",\" + ylabel + \">\");\n\t\treturn GraphableDataInfoString;\n\t}",
"@Override\n public String toString() {\n //create a string in the following format “<row>,<column>”\n String out = \"\";\n out += row + \", \" + column;\n return out;\n }",
"public String toString() {\n\t\treturn i + \".\" + j;\n\t}",
"public String toString(){\n\t\treturn leftValue + \":\" +rightValue;\t\t\t\r\n\t}",
"public String toString()\n\t{\n\t\treturn \"\" + val;\n\t}",
"@Override\n\tpublic String toString() {\n\t\tString str = labelTemplate.toString();\n\t\tswitch (type) {\n\t\tcase SET: str += \":=\"; break;\n\t\tcase DISCARD: str += \"!=\"; break;\n\t\tcase ADD: str += \"+=\"; break;\n\t\t}\n\t\tstr += valueTemplate.toString();\n\t\treturn str;\n\t}",
"public String toString() {\n String s = \"\";\n for (Vertex v : mVertices.values()) {\n s += v + \": \";\n for (Vertex w : mAdjList.get(v)) {\n s += w + \" \";\n }\n s += \"\\n\";\n }\n return s;\n }",
"public String toString(){\n\n\t\tStringBuffer b = new StringBuffer();\n\t\tb.append('\\n');\n\n\t\tint i = 0, j, counter = 0;\n\t\twhile( i < numRows){\n\n\t\t\tj = 0;\n\t\t\twhile( j < numCols){\n\n\t\t\t\tb.append( \"\" + i + TAB + j + TAB);\n\t\t\t\tObject obj = this.get(i, j);\n\t\t\t\tif( obj != null ) {\n\t\t\t\t\tb.append( obj.toString() );\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t\telse b.append( \"NULL\" );\n\t\t\t\tb.append('\\n');\n\n\t\t\t\tj++;\n\t\t\t}\n\t\t\ti++;\n\n\t\t}\n\t\tb.append( \"\\nNumber of Rows = \" + numRows + '\\n' );\n\t\tb.append( \"Number of Columns = \" + numCols + '\\n' );\n\t\tb.append( \"Size = \" + size + '\\n' );\n\t\tb.append( \"Number of non-null objects = \" + counter + '\\n' );\n\t\treturn b.toString();\n\t}",
"public String toString() {\r\n\t\tStringBuilder stringBuilder = new StringBuilder();\r\n stringBuilder\r\n .append(this.x).append(\" \")\r\n .append(this.y).append(\" \")\r\n .append(this.z);\r\n\t\treturn stringBuilder.toString();\r\n }",
"public String toString()\n {\n String string = new Integer(this.getValue()).toString();\n return string; \n }",
"public String toString() {\n\t\treturn \"<\" + x + \", \" + y + \", \" + z + \">\";\n\t}",
"@Override\n\tpublic String toString(){\n\t\t// return a string of the board representation following these rules:\n\t\t// - if printed, it shows the board in R rows and C cols\n\t\t// - every cell should be represented as a 5-character long right-aligned string\n\t\t// - there should be one space between columns\n\t\t// - use \"-\" for empty cells\n\t\t// - every row ends with a new line \"\\n\"\n\t\t\n\t\t\n\t\tStringBuilder sb = new StringBuilder(\"\");\n\t\tfor (int i=0; i<numRows; i++){\n\t\t\tfor (int j =0; j<numCols; j++){\n\t\t\t\tPosition pos = new Position(i,j);\n\t\t\t\t\n\t\t\t\t// use the hash table to get the symbol at Position(i,j)\n\t\t\t\tif (grid.contains(pos))\n\t\t\t\t\tsb.append(String.format(\"%5s \",this.get(pos)));\n\t\t\t\telse\n\t\t\t\t\tsb.append(String.format(\"%5s \",\"-\")); //empty cell\n\t\t\t}\n\t\t\tsb.append(\"\\n\");\n\t\t}\n\t\treturn sb.toString();\n\n\t}",
"@Override\n public String toString()\n {\n return String.format(\"(%f,%f,%f,%f)\", kP, kI, kD, kF);\n }",
"public String toString() {\n\t\treturn \"[\" + x + \", \" + y + \"]\";\n\t}",
"public String toString()\n\t{\n\t\treturn \"x:\"+xPos+\" y:\"+yPos+\" width:\"+width+\" height:\"+height+\" color:\"+ color;\n\t}",
"public String toString() {\n\t\tString rowOne = Arrays.toString(finalGrid[0]);\n\t\tString rowTwo = Arrays.toString(finalGrid[1]);\n\t\tString rowThree = Arrays.toString(finalGrid[2]);\n\t\tString rowFour = Arrays.toString(finalGrid[3]);\n\t\tString rowFive = Arrays.toString(finalGrid[4]);\n\t\tString rowSix = Arrays.toString(finalGrid[5]);\n\t\tString rowSeven = Arrays.toString(finalGrid[6]);\n\t\tString rowEight = Arrays.toString(finalGrid[7]);\n\t\tString rowNine = Arrays.toString(finalGrid[8]);\n\t\tString allRows = \"The sudoku grid is as shown below: \\n\" + rowOne + \"\\n\" + rowTwo + \"\\n\" + rowThree + \"\\n\" + rowFour + \"\\n\" \n\t\t+ rowFive + \"\\n\" + rowSix + \"\\n\" + rowSeven + \"\\n\" + rowEight + \"\\n\" + rowNine;\n\t\treturn allRows;\n\t}"
] |
[
"0.7440584",
"0.73196363",
"0.71897566",
"0.7112965",
"0.70539814",
"0.7043449",
"0.6970052",
"0.687129",
"0.6826369",
"0.6772515",
"0.6728624",
"0.67231405",
"0.66838753",
"0.66534096",
"0.66103905",
"0.6607271",
"0.66032124",
"0.65970397",
"0.65555644",
"0.65553665",
"0.653037",
"0.652875",
"0.6467571",
"0.6462048",
"0.6462048",
"0.6456308",
"0.645139",
"0.64315796",
"0.6424981",
"0.64230746",
"0.641877",
"0.64042294",
"0.6394453",
"0.63861287",
"0.63698256",
"0.6365346",
"0.6360108",
"0.6334112",
"0.63189125",
"0.6318603",
"0.6317254",
"0.63076204",
"0.6302415",
"0.6295226",
"0.6294866",
"0.62841713",
"0.6278084",
"0.62761945",
"0.6271551",
"0.6268599",
"0.6264098",
"0.62626076",
"0.6257387",
"0.6254827",
"0.62536156",
"0.6245881",
"0.62436926",
"0.624266",
"0.6240859",
"0.62359667",
"0.62356365",
"0.62185425",
"0.62152994",
"0.6213444",
"0.62112117",
"0.6209091",
"0.62012184",
"0.61950135",
"0.6194466",
"0.6192279",
"0.6189138",
"0.61848265",
"0.6183667",
"0.61810416",
"0.6178969",
"0.6165829",
"0.61653465",
"0.6165063",
"0.61648333",
"0.61624664",
"0.61613727",
"0.61606836",
"0.6159198",
"0.6158804",
"0.614678",
"0.61464983",
"0.61312264",
"0.6124376",
"0.6120869",
"0.61170596",
"0.61135876",
"0.6106334",
"0.6097847",
"0.6096326",
"0.60882384",
"0.6078266",
"0.6073965",
"0.607074",
"0.60689145",
"0.60673046"
] |
0.6294244
|
45
|
TODO:get only last 1000 tweets
|
@Override
public List<String> getTweetsForMaps(String collectionName) {
Query q = new Query();
q.addCriteria(Criteria.where("coordinates").ne(null));
List<String> results = mongoOps.find(q, String.class, collectionName);
return results;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void getTweets(long lastUid) {\n client.getMentionsTimeline(lastUid, new JsonHttpResponseHandler() {\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n Log.d(\"DEBUG\", response.toString());\n addAll(Tweet.fromJsonArray(response));\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"DEBUG\", errorResponse.toString());\n }\n });\n }",
"public List<Status> getTweets() {\r\n\t\tincrementShutdownTimer();\r\n\t\treturn tweets;\r\n\t}",
"private List<ResponseList<Status>> get_tweet(long id) {\n\t\tList<ResponseList<Status>> tweets = new ArrayList(2);\n\t\ttry {\n\n\t\t\tPaging paging = new Paging(1, 200);\n\t\t\tResponseList<Status> tmp_Statues = twitter.getUserTimeline(id, paging); // get 200 Tweet\n\t\t\ttweets.add(0, tmp_Statues);\n\t\t\tpaging = new Paging(2, 200);\n\t\t\ttmp_Statues = twitter.getUserTimeline(id, paging);// get another 200 Tweet\n\t\t\ttweets.add(1, tmp_Statues);\n\n\t\t\tSystem.out.println(\"insert Tweets...\");\n\t\t\tSystem.out.println(\"path class\");\n\t\t\tSystem.getProperty(\"java.class.path\");\n\n\t\t\tfor (Status s : tweets.get(0))\n\t\t\t\tdb.insertTweets(s);\n\t\t\tSystem.out.println(\"tweets.get(1)\");\n\n\t\t\tfor (Status s : tweets.get(1))\n\t\t\t\tdb.insertTweets(s);\n\t\t\tSystem.out.println(\"Update_Creat_At(id);\");\n\n\t\t\tdb.Update_Creat_At(id);\n\t\t\tSystem.out.println(\"update_Complete_Tweets\");\n\n\t\t\tdb.update_Complete_Tweets(id);\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t}\n\t\treturn tweets;\n\t}",
"private ArrayList<TweetData> getTweets(JSONObject json, QueryTargetInfo info) {\n ArrayList<TweetData> tweets = new ArrayList<TweetData>();\n\n JSONArray jsonArray = json.optJSONArray(\"statuses\");\n\n\n if (jsonArray == null) {\n return tweets;\n }\n\n for (int i = 0; i < jsonArray.length(); i++) {\n try {\n TweetData tweet = new TweetData();\n JSONObject tweetJson = jsonArray.getJSONObject(i);\n\n SimpleDateFormat df = new SimpleDateFormat(TIME_FORMAT);\n\n tweet.twitterId = tweetJson.getString(\"id_str\");\n tweet.published = (int)(df.parse(tweetJson.getString(\"created_at\")).getTime() / 1000);\n tweet.content = tweetJson.getString(\"text\");\n tweet.source = tweetJson.optString(\"source\", \"<No Source>\");\n tweet.lang = tweetJson.optString(\"lang\", \"en\");\n\n tweet.author = \"Jon Doe\";\n JSONObject user = tweetJson.optJSONObject(\"user\");\n if (user != null) {\n tweet.author = user.optString(\"screen_name\", \"Jon Doe\");\n }\n\n tweet.place = tweetJson.optString(\"place\", \"\");\n tweet.geo = tweetJson.optString(\"geo\", \"\");\n\n // Keep track of the smallest id.\n if (info.smallestId == null ||\n Long.valueOf(tweet.twitterId) < Long.valueOf(info.smallestId)) {\n info.smallestId = tweet.twitterId;\n }\n\n // Keep track of the last seen (max) id.\n if (info.lastSeenId == null ||\n Long.valueOf(tweet.twitterId) > Long.valueOf(info.lastSeenId)) {\n info.lastSeenId = tweet.twitterId;\n }\n\n tweets.add(tweet);\n } catch (Exception ex) {\n Logger.logError(\"Unable to parse tweet.\", ex);\n }\n }\n\n return tweets;\n }",
"private static List<Status> getStatuses(Twitter twitter){\n\t\tList<Status> mainList = new ArrayList<Status>(900);\n\t\tPaging page = new Paging();\n\t\twhile(true){\n\t\t\ttry{\n\t\t\t\tList<Status> list = twitter.getUserTimeline(USER,page);\n\t\t\t\t\n\t\t\t\tif(list.size() == 0) break;\n\t\t\t\t\n\t\t\t\tmainList.addAll(list);\n\t\t\t\tlong max_id = list.get(list.size()-1).getId();\n\t\t\t\t\n\t\t\t\tpage.setMaxId(max_id-1);\n\t\t\t}catch(TwitterException e){\n\t\t\t\tSystem.out.println(\"Exception caught :\" +\n\t\t\t\t\t\t\" some thing wrong, check internet connction or try after some time\");\n\t\t\t\tSystem.out.println(\"error message : \"+ e.toString());\n\t\t\t\tSystem.out.println(\"Program will quit now\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn mainList;\n\t}",
"public void getTweets() {\r\n\t\t\r\n\t\tConfigurationBuilder cb = new ConfigurationBuilder();\r\n\t\tcb.setDebugEnabled(true);\r\n\t\t\r\n\t\t//provide your own keys\r\n\t cb.setOAuthConsumerKey(\"ConsumerKey\");\r\n\t cb.setOAuthConsumerSecret(\"ConsumerSecret\");\r\n\t cb.setOAuthAccessToken(\"AccessToken\");\r\n\t cb.setOAuthAccessTokenSecret(\"TokenSecret\");\r\n\r\n TwitterStream twitterStream = new TwitterStreamFactory(cb.build()).getInstance(); \r\n \r\n //Check for live status updates\r\n StatusListener listener = new StatusListener() {\r\n\r\n @Override\r\n public void onException(Exception arg0) {\r\n \tSystem.out.println(\"Exception!! Data Not Inserted Into Database\");\r\n }\r\n\r\n @Override\r\n public void onDeletionNotice(StatusDeletionNotice arg0) {\r\n \tSystem.out.println(\"Got a status deletion notice id:\" + arg0.getStatusId());\r\n }\r\n \r\n @Override\r\n public void onScrubGeo(long userId, long upToStatusId) {\r\n System.out.println(\"Got scrub_geo event userId:\" + userId + \" upToStatusId:\" + upToStatusId);\r\n }\r\n \r\n @Override\r\n public void onStatus(Status status) {\r\n \t\r\n \t User user = status.getUser();\r\n \t \r\n String username = status.getUser().getScreenName();\r\n String profileLocation = user.getLocation();\r\n long tweetId = status.getId(); \r\n String content = status.getText();\r\n \r\n \r\n //Create a model for the live data\r\n TweetModel memoryData = new TweetModel(username, profileLocation, tweetId, content);\r\n \r\n //store to MongoDB if data is correct\r\n System.out.println(++counter + \") username: \" + username + \" location: \" + profileLocation + \" tweetId \" + tweetId + \" Text: \" + content );\r\n data.save(memoryData);\r\n }\r\n \r\n\t\t\t@Override\r\n public void onTrackLimitationNotice(int arg0) {\r\n\t System.out.println(\"Got track limitation notice:\" + arg0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onStallWarning(StallWarning warning) {}\r\n };\r\n \r\n //Filter the live tweet results\r\n FilterQuery filterQuery = new FilterQuery();\r\n //Search for tweets with specific keywords\r\n String keywords[] = {\"Java\", \"Python\", \"PHP\"};\r\n //Restrict the language to English\r\n String[] lang = {\"en\"}; \r\n //Add the Filters\r\n filterQuery.language(lang);\r\n filterQuery.track(keywords);\r\n //Listen for Live Tweets\r\n twitterStream.addListener(listener);\r\n twitterStream.filter(filterQuery);\r\n\t}",
"private ArrayList<TweetData> query(QueryTargetInfo info) {\n String url;\n ArrayList<TweetData> tweets = new ArrayList<TweetData>();\n InputStream is = null;\n\n // lastSeenId should have been set earlier.\n // However, if it is still null, just use \"0\".\n if (info.lastSeenId == null) {\n url = String.format(\"%s?q=%s&count=%d&result_type=recent&since_id=0\",\n URL_BASE, info.query, RPP);\n } else if (info.smallestId == null) {\n url = String.format(\"%s?q=%s&count=%d&result_type=recent&since_id=%s\",\n URL_BASE, info.query, RPP, info.lastSeenId);\n } else {\n url = String.format(\"%s?q=%s&count=%d&result_type=recent&since_id=%s&max_id=%s\",\n URL_BASE, info.query, RPP, info.lastSeenId, info.smallestId);\n }\n\n try {\n do {\n URL searchURL = new URL(url);\n HttpsURLConnection searchConnection = (HttpsURLConnection)searchURL.openConnection();\n\n searchConnection.setRequestProperty(\"Host\", \"api.twitter.com\");\n searchConnection.setRequestProperty(\"User-Agent\", \"BirdCatcher\");\n searchConnection.setRequestProperty(\"Authorization\", \"Bearer \" + kBearerToken);\n\n is = searchConnection.getInputStream();\n\n JSONTokener jsonTokener = new JSONTokener(is);\n\n JSONObject json = new JSONObject(jsonTokener);\n\n is.close();\n\n url = getNextLink(json, url, info);\n\n tweets.addAll(getTweets(json, info));\n\n Thread.sleep(1000);\n\n is = null;\n } while (url != null);\n } catch (Exception e) {\n Logger.logError(\"Error performing query\", e);\n\n if (is != null) {\n try {\n java.io.BufferedReader in =\n new java.io.BufferedReader(new java.io.InputStreamReader(is));\n\n String response = \"Response from Twitter:\\n\";\n String temp;\n\n while ((temp = in.readLine()) != null) {\n response += (temp + \"\\n\");\n }\n\n Logger.logDebug(response);\n\n response = null;\n temp = null;\n } catch (Exception ex) {\n }\n }\n\n return tweets;\n }\n\n return tweets;\n }",
"@Transactional\r\n\tpublic List<Tweet> getAllTweets() {\n\t\tList<Tweet> tweets = tweetRepository.findAll(Sort.by(Sort.Direction.DESC, \"postDTTM\"));\r\n\t\treturn tweets;\r\n\t}",
"public List<Status> searchQuery(Twitter twitter, String search)\r\n throws TwitterException, IOException {\r\n\r\n Paging paging = new Paging(2, 100);\r\n List<Status> statuses = twitter.getHomeTimeline(paging);\r\n\r\n Query query = new Query(search);\r\n query.setCount(500);\r\n //this is a key part\r\n query.setSince(\"2015-01-02\");\r\n QueryResult result;\r\n List<Status> tweets = null;\r\n do {\r\n System.out.println(\"Write to File ...\");\r\n result = twitter.search(query);\r\n List<Status> newTweets = result.getTweets();\r\n if (tweets == null) {\r\n tweets = newTweets;\r\n } else {\r\n tweets.addAll(newTweets);\r\n }\r\n for (Status s:newTweets){\r\n System.out.println(s.getUser().getName() + \": \" + s.getText());\r\n }\r\n\r\n } while ((query = result.nextQuery()) != null);\r\n return tweets;\r\n }",
"public List<Tweet> getAllTweets() {\n\t\tList<Tweet> tweets = new ArrayList<Tweet>();\n\t\tString selectQuery = \"SELECT * FROM \" + TweetDataSource.TABLE_TWEETS;\n\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tCursor c = db.rawQuery(selectQuery, null);\n\n\t\t// looping through all rows and adding to list\n\t\tif (c.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tTweet tweet = TweetDataSource.cursorToTweet(c);\n\n\t\t\t\tUser user = getUserById(c.getLong(c\n\t\t\t\t\t\t.getColumnIndex(TweetDataSource.COLUMN_USER_UID)));\n\t\t\t\ttweet.setUser(user);\n\n\t\t\t\t// adding to list\n\t\t\t\ttweets.add(tweet);\n\t\t\t} while (c.moveToNext());\n\t\t}\n\n\t\treturn tweets;\n\t}",
"@Path(\"fetch/{query}/{limit}\")\r\n @GET\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public Response fetchTweets(@PathParam(\"query\") final String query, @PathParam(\"limit\") final String limit)\r\n {\r\n log.debug(\"GET: augmentTweets: \" + query + \"\\tlimit string: \" + limit);\r\n\r\n final TweetList list = new TweetList();\r\n final int limitValue = Integer.parseInt(limit);\r\n\r\n // TODO try-with-resources should be:\r\n // try(final MongoClient client = new MongoClient(host, port)){\r\n try (final MongoClient client = new MongoClient(\"74.140.208.12\", 6789))\r\n {\r\n final MongoCollection<Document> coll = client.getDatabase(\"visualdb\").getCollection(\"visualcollection\");\r\n\r\n final Document queryDoc = new Document();\r\n queryDoc.put(\"query\", query);\r\n\r\n final FindIterable<Document> results = coll.find(queryDoc);\r\n\r\n int count = 0;\r\n for (final Document doc : results)\r\n {\r\n count++;\r\n\r\n final Tweet tweet = new Tweet();\r\n tweet.setText(doc.getString(\"text\"));\r\n tweet.setTweetUrl(doc.getString(\"url\"));\r\n tweet.setId(doc.getString(\"tweetId\"));\r\n\r\n final Location loc = new Location();\r\n loc.setInitialized(true);\r\n\r\n final Document locationDoc = doc.get(\"loc\", Document.class);\r\n loc.setLatitude(locationDoc.getDouble(\"latitude\").doubleValue());\r\n loc.setLongitude(locationDoc.getDouble(\"longitude\").doubleValue());\r\n tweet.setLocation(loc);\r\n\r\n final List<String> imageUrls = new ArrayList<>();\r\n final List<?> urls = doc.get(\"images\", List.class);\r\n\r\n for (final Object object : urls)\r\n {\r\n imageUrls.add(object.toString());\r\n }\r\n tweet.setImageUrls(imageUrls);\r\n\r\n final List<String> entities = new ArrayList<>();\r\n final List<?> entityList = doc.get(\"entities\", List.class);\r\n for (final Object object : entityList)\r\n {\r\n entities.add(object.toString());\r\n }\r\n tweet.setExtractedEntities(entities);\r\n list.getTweets().add(tweet);\r\n\r\n if (count > limitValue)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return Response.ok(list).build();\r\n }",
"@Override\n\tpublic List<String> getTweetsForMapsWithLimit(String collectionName, int numberOfTweetsWanted) {\n\t\t\n\t\tDBCollection collection = mongoOps.getCollection(collectionName);\n\t\tDBObject q = QueryBuilder.start().put(\"coordinates\").notEquals(null).get();\n\t\tDBCursor c = collection.find(q).sort(new BasicDBObject(\"timestamp_ms\", -1)).limit(numberOfTweetsWanted);\n\t\tList<String> results = getResults(c);\n\t\treturn results;\n\t}",
"public int getCount() {\n return tweets.size();\n }",
"public LinkedList<Status> getTweets() {\r\n return tweets;\r\n }",
"private static void printMostRetweetedTweets() throws Exception{\n\t\t\n\t\tString max_retweeted_tweet[] = new String[3];\t//string containing tweets\n\t\tint max_counts[] = new int[3];\t//string containing their retweet count\n\t\t\n\t\tfor(Status status : statusList){\n\t\t\tif(!status.isRetweet() && status.getURLEntities().length != 0){\n\t\t\t\tint count = status.getRetweetCount();\n\t\t\t\tint index = getMinIndex(max_counts);\n\t\t\t\tif(count>max_counts[index]){\n\t\t\t\t\tmax_counts[index] = count;\n\t\t\t\t\tmax_retweeted_tweet[index] = status.getText();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* printing top 3 most retweeted tweets with links in them */\n\t\tSystem.out.println(\"the top 3 most retweeted tweets with links in them : \");\n\t\tfor(int i=0; i<3; i++){\n\t\t\tSystem.out.println(\"Tweet : \" + max_retweeted_tweet[i] + \" retweeted \"+ max_counts[i] + \" times\" );\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t}",
"public LinkedList<User> getUsers() throws TwitterException {\n System.out.println(\"##########Getting The Tweets##########\");\n LinkedList<User> users = new LinkedList<>();\n for (String keyword : this.wordsLookingFor) {\n //Search for tweets\n for (Status A : this.searchTweets(keyword)) {\n //System.out.println(A.getText());\n getUserFromStatus(users, A);\n }\n }\n\n System.out.println(\"Users Number is \".concat(Integer.toString(users.size())));\n return users;\n }",
"@Override\n public void onTweetsFetched(List<Tweet> tweets) {\n finalTweetID = tweets.get(tweets.size() - 1).getId();\n twitterCallback.onTweetsFetched(tweets); //Return tweets\n }",
"public List<String> homeTimeline() {\r\n\t\tList<String> twitterResponseList = new ArrayList<String>();\r\n\t\ttry {\r\n\t\t\tProperties properties = getProperties();\r\n\t\t\tString apiUrl = properties.getProperty(\"twitter.api.home.timeline\") + \"?count=10\"; // append count to max of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 10\r\n\r\n\t\t\tHttpResponse apiResponse = executeHttpGet(apiUrl);\r\n\r\n\t\t\tif (200 == apiResponse.getStatusLine().getStatusCode()) {\r\n\t\t\t\tJSONArray jsonArray = new JSONArray(EntityUtils.toString(apiResponse.getEntity()));\r\n\t\t\t\tfor (int i = 0; i < jsonArray.length(); i++) {\r\n\t\t\t\t\tJSONObject jsonObject = (JSONObject) jsonArray.get(i);\r\n\t\t\t\t\tJSONObject userObject = (JSONObject) jsonObject.get(\"user\");\r\n\t\t\t\t\tString displayText = (String) userObject.get(\"screen_name\") + \" : \"\r\n\t\t\t\t\t\t\t+ (String) jsonObject.get(\"text\"); // data to be displayed in screen_name : tweet format\r\n\t\t\t\t\ttwitterResponseList.add(displayText); // list of data in the format mentioned above\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn twitterResponseList;\r\n\r\n\t}",
"private long getTweets(String search, String geocode, Configuration auth) {\r\n TwitterFactory tf = new TwitterFactory(auth);\r\n Twitter twitter = tf.getInstance();\r\n \r\n try {\r\n Query query = new Query(search + \" \" + geocode);\r\n query.setSinceId(starttime);\r\n QueryResult result;\r\n \r\n for (int i = 0; i < blocks; i++) {\r\n if (Abort.getInstance().abort()) {\r\n return -1;\r\n }\r\n \r\n result = twitter.search(query);\r\n \r\n synchronized (this) {\r\n if (!tweets.containsKey(search)) {\r\n tweets.put(search, new HashSet());\r\n }\r\n tweets.get(search).addAll(result.getTweets());\r\n }\r\n \r\n //updateCommon(result.getTweets());\r\n //searched.add(search.toLowerCase());\r\n query.setSinceId(starttime + i * blocks15);\r\n }\r\n } catch (TwitterException te) {\r\n System.out.println(\"Failed to search tweets: \" + te);\r\n System.out.println(\"\\nRetry at: \" + \r\n (new Date(te.getRateLimitStatus()\r\n .getResetTimeInSeconds() * 1000L)));\r\n return te.getRateLimitStatus().getSecondsUntilReset() * 1000L;\r\n }\r\n return 0;\r\n }",
"public String getTweets(int user, int n) throws TwitterException{\n\t\n\n\t\ttry {\n\t\t\t\n\t\t\t\n\t twitter4j.User user1 = twitter.showUser(user);\n\t // System.out.println(\"INIZIO PER \" + user1.getScreenName() + \" - isProtect: \" + user1.isProtected()); \n\t \n\t \n\t if (user1.getLang().equalsIgnoreCase(\"en\") && user1.isProtected() == false /*&& user1.getFollowersCount() > 50*/ ){\n\t\t\t\t//First param of Paging() is the page number, second is the number per page (this is capped around 200 I think.\n\t\t\t\tPaging paging = new Paging(1, n);// fet 200 twett\n\t\t\t\tList<Status> statuses = twitter.getUserTimeline(user, paging);\n\t\t \tString out = \"\";\n\t\t\t\t/*User's Tweets*/\n\t\t\t\tfor(Status st : statuses)\n\t\t\t\t{\n\t\t\t\t//\tSystem.out.println(st.getUser().getLocation() + \" \" + st.getUser().getScreenName()+\" ----------- \" + st.getText() + \"\\n\");\n\t\t\t\t\tif (st.getLang().equals(\"en\")){\n\t\t\t\t\t\tout = out + \"\\n\" + st.getText();\n\t\t\t\t\t//\tSystem.out.println(st.getText()+ \" \" + user);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\treturn out;\n\t } else {\n\t \treturn \"\";\n\t }\n\n\t\t} catch (TwitterException name) {\n\t\t\t\n\t\t//\tSystem.out.println(\"This username is not valid \" + name.getErrorMessage());\n\t\t\treturn \"\";\n\t\t} \n\t\t\n \t\n }",
"public static List<Status> getTweets(Query query) {\n\n \tTwitter twitter = new TwitterFactory().getInstance();\n \tQueryResult result = null;\n try {\n \tresult = twitter.search(query);\n \tList<Status> tweets = result.getTweets();\n \treturn tweets;\n }\n catch (TwitterException te) {\n \tte.printStackTrace();\n System.out.println(\"Failed to search tweets: \" + te.getMessage());\n return null;\n }\n }",
"public List<Kweet> getTimelineKweets(String username) {\n return kweetDAO.getTimelineKweets(username);\n }",
"public List<Tweet> getTweets(String file) {\n List<String[]> data = this.extract(file);\n ArrayList<Tweet> tweets = new ArrayList<>();\n for (String[] row : data) {\n Tweet t = new Tweet(Integer.parseInt(row[0]), Integer.parseInt(row[1]), row[2], row[3]);\n tweets.add(t);\n }\n return tweets;\n }",
"public List<Status> searchQueryMk2(Twitter twitter, String search, int page)\r\n throws TwitterException {\n int pageInt = page;\r\n int count = 0;\r\n Paging paging = new Paging(pageInt, 10);\r\n List<Status> statuses = twitter.getUserTimeline(\"meemezy\",paging);\r\n\r\n\r\n for (Status s : statuses) {\r\n System.out.println(s.getUser().getName() + \": \" + s.getText());\r\n System.out.println(s.getCreatedAt()+\"\\n\");\r\n count++;\r\n if(count == 9 && s.getText() != null){\r\n pageInt++;\r\n searchQueryMk2(twitter, search, pageInt);\r\n }\r\n }\r\n\r\n return null;\r\n }",
"@Override\n\tpublic List<UserTweet> getFeed() throws Exception {\n\t\tList<UserTweet> usertweets = new ArrayList<UserTweet>();\n\t\t\n\t\tUserTweet userTweet1 = new UserTweet();\n\t\tuserTweet1.setUsername(\"aren from dao\");\n\t\tuserTweet1.setTweetMessage(\"hey was up\");\n\t\t\n\t\tUserTweet userTweet2 = new UserTweet();\n\t\tuserTweet2.setUsername(\"aren2 new\");\n\t\tuserTweet2.setTweetMessage(\"hey was up 2\");\n\t\t\n\t\tusertweets.add(userTweet1);\n\t\tusertweets.add(userTweet2);\n\t\t\n\t\treturn usertweets;\n\t}",
"public @NotNull TwitterFeedResponse getTwitterFeed(@NotNull final String userName,\n final int maxNumOfTweets,\n final long sinceMessageId) throws TwitterException {\n User u = twitter.showUser(userName);\n TwitterFeedResponse feed = initializeFeed(u);\n ResponseList<Status> tweets;\n if (sinceMessageId <= 0) {\n tweets = twitter.getUserTimeline(feed.userId, new Paging(1, maxNumOfTweets));\n } else {\n tweets = twitter.getUserTimeline(feed.userId, new Paging(1, maxNumOfTweets, sinceMessageId));\n }\n feed.limit = u.getRateLimitStatus().getLimit();\n feed.remaining = u.getRateLimitStatus().getRemaining();\n\n for (Status s : tweets) {\n TwitterFeedResponse.Tweet t = initializeTweet(s, feed);\n feed.tweets.add(t);\n }\n\n return feed;\n }",
"public ArrayList<String> getTweets (long currentUserId) throws TwitterException {\n\t\tArrayList<String> tweets = new ArrayList<String>();\n\n\t\tPaging paging = new Paging();\n\t\tResponseList<Status> currentUserTimeLine = this.twitter.getUserTimeline(currentUserId, paging);\n\n\t\tfor(Status status:currentUserTimeLine) {\n\t\t\ttweets.add(status.getText());\n\t\t}\n\n\t\treturn tweets;\n\t}",
"private void twitterStream(ServerAccess sa, String search, String geocode, \r\n int max) throws IOException {\r\n final TwitterStream twitterStream = \r\n new TwitterStreamFactory(getAuth()).getInstance();\r\n final Count count = new Count(max);\r\n \r\n final StatusListener listener = new StatusListener() {\r\n @Override\r\n public void onStatus(Status status) {\r\n count.increment();\r\n try {\r\n sa.addTweet(new TweetEntity(status, search));\r\n } catch (UnsupportedEncodingException ex) {\r\n }\r\n try {\r\n sa.addUser(new UserEntity(status.getUser()));\r\n } catch (UnsupportedEncodingException ex) {\r\n }\r\n \r\n if (Abort.getInstance().abort() || count.isMax()) {\r\n Abort.getInstance().setAbort(false);\r\n twitterStream.shutdown();\r\n }\r\n }\r\n\r\n @Override\r\n public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {\r\n //System.out.println(\"Got a status deletion notice id:\" + statusDeletionNotice.getStatusId());\r\n }\r\n\r\n @Override\r\n public void onTrackLimitationNotice(int numberOfLimitedStatuses) {\r\n //System.out.println(\"Got track limitation notice:\" + numberOfLimitedStatuses);\r\n }\r\n\r\n @Override\r\n public void onScrubGeo(long userId, long upToStatusId) {\r\n //System.out.println(\"Got scrub_geo event userId:\" + userId + \" upToStatusId:\" + upToStatusId);\r\n }\r\n\r\n @Override\r\n public void onStallWarning(StallWarning warning) {\r\n //System.out.println(\"Got stall warning:\" + warning);\r\n }\r\n\r\n @Override\r\n public void onException(Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n };\r\n twitterStream.addListener(listener);\r\n FilterQuery filterquery = new FilterQuery();\r\n //filterquery.count(500);\r\n //String[] searchwords = {\"voetbal\", \"tennis\", \"basketbal\"};\r\n //filterquery.track(searchwords);\r\n final List<String> alts = relations.get(search);\r\n final String[] altsGeo = new String[alts.size()];\r\n for (int i = 0; i < alts.size(); i++) {\r\n altsGeo[i] = alts.get(i) + \" \" + geocode;\r\n }\r\n filterquery.track(altsGeo);\r\n twitterStream.filter(filterquery);\r\n twitterStream.sample();\r\n }",
"public void searchUserAccount( )\r\n throws TwitterException, URISyntaxException, IOException{\r\n\r\n // looks at all tweets since this page\r\n // the count is the limit\r\n\r\n int count = 0;\r\n String text = \"\";\r\n Paging paging = new Paging(pageInt, 10);\r\n List<Status> statuses = twitter.getUserTimeline(user, paging);\r\n\r\n for (Status s : statuses) {\r\n String url = \"https://twitter.com/\" + s.getUser().getScreenName() + \"/status/\" + s.getId();\r\n if (s.getRetweetedStatus() == null) {\r\n content = url;\r\n //send the links to text\r\n HandleFile(override, active);\r\n\r\n //regular expressions\r\n String regex = \"https://t.co/.*\";\r\n text = s.getText().replaceAll(regex,\"\");\r\n\r\n System.out.println(s.getUser().getName() + \": \" + text);\r\n System.out.println(url); //prints the url of the tweet\r\n System.out.println(s.getCreatedAt()+\"\\n\");\r\n\r\n //sets the tweets to variables to be exported\r\n tweets = tweets + \" \" +text + \"\\n\"+ url + \"\\n\" + s.getCreatedAt() + \"\\n\\n\";\r\n\r\n\r\n active = false;\r\n\r\n //search for nudes\r\n getTwitterImage(s);\r\n }\r\n count++;\r\n\r\n if(count == 5 && limitInt > 0){\r\n limitInt--;\r\n pageInt++;\r\n searchUserAccount();\r\n }\r\n }\r\n }",
"private RetryQuery timeTweets(int n, Query lastQuery, String search, Configuration auth) {\r\n /*while (!DBStore.getInstance().isEmpty()) {\r\n try {\r\n Thread.sleep(10000);\r\n } catch (InterruptedException ex) {\r\n }\r\n }*/\r\n TwitterFactory tf = new TwitterFactory(auth);\r\n Twitter twitter = tf.getInstance();\r\n Query query = new Query(search);\r\n /*query.setGeoCode(new twitter4j.GeoLocation(geocode[0], geocode[1]), \r\n geocode[2], Query.Unit.km);*/\r\n query.setLang(\"nl\");\r\n query.count(1000);\r\n \r\n if (lastQuery != null) {\r\n query = lastQuery;\r\n }\r\n \r\n QueryResult result;\r\n \r\n if (Abort.getInstance().abort()) {\r\n return new RetryQuery(-1, query);\r\n }\r\n\r\n try {\r\n result = twitter.search(query);\r\n while (result.nextQuery() != null) {\r\n synchronized (lock) {\r\n if (!tweets.containsKey(search)) {\r\n tweets.put(search, new HashSet());\r\n }\r\n tweets.get(search).addAll(result.getTweets());\r\n }\r\n query = result.nextQuery();\r\n result = twitter.search(query);\r\n }\r\n\r\n synchronized (lock) {\r\n if (!tweets.containsKey(search)) {\r\n tweets.put(search, new HashSet());\r\n }\r\n tweets.get(search).addAll(result.getTweets());\r\n }\r\n\r\n } catch (TwitterException te) {\r\n System.out.println(\"Failed to search tweets: \" + te);\r\n System.out.println(\"\\nRetry at n = \" + n + \": \" + \r\n (new Date(te.getRateLimitStatus()\r\n .getResetTimeInSeconds() * 1000L)));\r\n return new RetryQuery(\r\n te.getRateLimitStatus().getResetTimeInSeconds() * 1000L,\r\n query);\r\n }\r\n return new RetryQuery(0, null);\r\n }",
"public ArrayList<Tweet> getTweetsByUserId(long id) {\n\t\tTweet tweet = null;\n\t\t\n\t\tString queryString = \n\t\t\t \"PREFIX sweb: <\" + Config.NS + \"> \" +\n\t\t\t \"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \" +\n\t\t\t \"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \" +\n\t\t\t \"PREFIX foaf: <http://xmlns.com/foaf/0.1/>\" +\n\t\t\t \"select * \" +\n\t\t\t \"where { \" +\n\t\t\t \t\t\"?user sweb:id \" + id + \".\" +\n\t\t\t \t\t\"?tweet sweb:user ?user. \" +\n\t\t\t \"} \\n \";\n\n\t Query query = QueryFactory.create(queryString);\n\t \n\t QueryExecution qe = QueryExecutionFactory.create(query, this.model);\n\t ResultSet results = qe.execSelect();\n\t \n\t ArrayList<Tweet> tweets = new ArrayList<Tweet>();\n\t while(results.hasNext()) {\n\t \tQuerySolution solution = results.nextSolution() ;\n\t Resource currentResource = solution.getResource(\"tweet\");\n\n\t /* Taking care of the date */\n\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-d k:m:s\");\n\t\t\tString dateRaw = currentResource.getProperty(this.createdAt).getString();\n\t\t\tdateRaw = dateRaw.replace('T', ' ');\n\t\t\tdateRaw = dateRaw.replace(\"Z\", \"\");\n\t\t\t\n\t\t\tDate date = null;\n\t\t\ttry {\n\t\t\t\tdate = dateFormat.parse(dateRaw);\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t tweet = new Tweet(\n\t \t\tString.valueOf(id),\n\t \t\tcurrentResource.getProperty(this.text).getString(),\n\t \t\tdate\n\t );\t\n\t \n\t tweets.add(tweet);\n\t }\n\t \n\t return tweets;\n\t}",
"@Override\n public void run() {\n try {\n\n try {\n mLastLocation = LocationServices.FusedLocationApi.getLastLocation(\n googleApiClient);\n } catch (SecurityException e) {\n e.printStackTrace();\n }\n\n if (mLastLocation != null) {\n\n\n Query query = new Query(\"India\"); //\n\n GeoLocation location = new GeoLocation(mLastLocation.getLatitude(), mLastLocation.getLongitude()); //latitude, longitude\n\n query.setGeoCode(location, 5, Query.MILES); //location, radius, unit\n query.setSinceId(latestTweetId);\n QueryResult result;\n\n do {\n result = twitter.search(query);\n\n for (twitter4j.Status tweet : result.getTweets()) {\n\n if (tweet.getGeoLocation() != null) {\n\n newTweets.add(tweet);\n long id = tweet.getId();\n\n if (id > latestTweetId) {\n\n latestTweetId = id;\n }\n\n }\n\n System.out.println(\"@\" + tweet.getUser().getScreenName() + \" - \" + tweet.getText());\n }\n\n } while ((query = result.nextQuery()) != null);\n\n handler.sendEmptyMessage(1);\n }\n\n }catch(TwitterException te){\n System.out.println(\"Failed to search tweets: \" + te.getMessage());\n }\n\n\n\n\n\n }",
"public List<TwitterDataExtract> GetData();",
"public ArrayList<Tweet> getTweets() {\n Collections.sort(tweets, new Comparator<Tweet>() {\n public int compare(Tweet tweet1, Tweet tweet2) {\n return tweet1.getDate().compareTo(tweet2.getDate());\n }\n });\n\n return tweets;\n }",
"public List<TweetDto> tweets(String username) {\n\t\tList<Tweet> convert = userRepository.findByUname(username).getTweets();\n\n\t\tList<TweetDto> dto = new ArrayList<>();\n\t\tfor(Tweet check : convert){\n\t\t\tswitch (check.getType()) {\n\t\t\tcase \"simple\":\n\t\t\t\tdto.add(tweetMapper.toSimpleDto(check));\n\t\t\t\tbreak;\n\t\t\tcase \"reply\":\n\t\t\t\tdto.add(tweetMapper.toReplyDto(check));\n\t\t\t\tbreak;\n\t\t\tcase \"repost\":\n\t\t\t\tdto.add(tweetMapper.toRepostDto(check));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tCollections.sort(dto, new TweetCompare());\n\t\tCollections.reverse(dto);\n\t\treturn dto;\n\t}",
"public Twitter() {\n\t\t\tuserMap = new HashMap<>();\n\t\t\tmaxFeed = 10;\n\t\t}",
"public static List<TopicBean> getRecentTopics() {\r\n\t\tDBCollection topicsColl = getCollection(TOPICS_COLLECTION);\r\n\t\t\r\n\t\tDBObject query = new BasicDBObject(\"deleted\", new BasicDBObject(\"$ne\", true));\r\n\t\t\r\n\t\tList<DBObject> topicsDBList=new ArrayList<DBObject>();//List<DBObject> topicsDBList = topicsColl.find(query).sort(new BasicDBObject(\"last_update\", -1)).toArray();\r\n\t\tDBCursor topicCur=topicsColl.find(query).sort(new BasicDBObject(\"last_update\", -1));\r\n\t\twhile(topicCur.hasNext()){\r\n\t\t\ttopicsDBList.add(topicCur.next());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tList<TopicBean> recentTopics = new ArrayList<TopicBean>();\r\n\t\tfor (DBObject topicDBObject : topicsDBList) {\r\n\t\t\tTopicBean topic = new TopicBean();\r\n\t\t\ttopic.parseBasicFromDB(topicDBObject);\r\n\t\t\ttopic.setConversations(ConversationDAO.loadConversationsByTopic(topic.getId()));\r\n\t\t\trecentTopics.add(topic);\r\n\t\t\t\r\n\t\t\tif (recentTopics.size() == 20) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn recentTopics;\r\n\t}",
"public static List<Tweets> readTweetsFromWeb(String url) throws Exception\r\n {\r\n // String USER_AGENT = \"Mozilla/5.0\";\r\n List<Tweets> tweetList = new ArrayList<>();\r\n /* ObjectMapper mapper = new ObjectMapper();\r\n URL obj = new URL(url);\r\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\r\n\r\n // optional default is GET\r\n con.setRequestMethod(\"GET\"); //establishing connection\r\n\r\n //add request header\r\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\r\n\r\n int responseCode = con.getResponseCode();\r\n\r\n BufferedReader in = new BufferedReader(\r\n new InputStreamReader(con.getInputStream()));\r\n String inputLine;\r\n\r\n\r\n StringBuffer response = new StringBuffer();\r\n\r\n while ((inputLine = in.readLine()) != null) {\r\n response.append(inputLine);\r\n }\r\n in.close();\r\n*/ StringBuffer response = new StringBuffer();\r\n ObjectMapper mapper = new ObjectMapper();\r\n try {\r\n String USER_AGENT = \"Mozilla/5.0\";\r\n\r\n URL obj = new URL(\"https://api.darksky.net/forecast/91064979649945a5465006904adb8770/30.2672,-97.7431\");\r\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\r\n\r\n // optional default is GET\r\n con.setRequestMethod(\"GET\"); //establishing connection\r\n\r\n //add request header\r\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\r\n\r\n int responseCode = con.getResponseCode();\r\n\r\n BufferedReader in = new BufferedReader(\r\n new InputStreamReader(con.getInputStream()));\r\n String inputLine;\r\n\r\n\r\n while ((inputLine = in.readLine()) != null) {\r\n response.append(inputLine);\r\n }\r\n in.close();\r\n String after = response.toString();\r\n int x=0;\r\n // JSONObject json = new JSONObject(after);\r\n // return json;\r\n\r\n }catch (MalformedURLException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } catch (JSONException e){\r\n e.printStackTrace();\r\n }\r\n return null;\r\n\r\n /* try {\r\n\r\n\r\n Tweets[] tweets = mapper.readValue(response.toString(), Tweets[].class);\r\n\r\n for(int i = 0; i<tweets.length; i++) {\r\n\r\n if(!((tweets[i].getId() > 0) && (tweets[i].getId() < Math.pow(2, 32)))) //making sure id in range\r\n {\r\n continue;\r\n }\r\n\r\n if(tweets[i].getName() == null)\r\n {\r\n continue;\r\n }\r\n\r\n if(checkName(tweets[i].getName(), i)){\r\n continue;\r\n }\r\n\r\n Date date = null;\r\n try {\r\n if(tweets[i].getDate() == null)\r\n {\r\n continue;\r\n }\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\"); //making date format\r\n date = sdf.parse(tweets[i].getDate()); //parsing into format\r\n if (!tweets[i].getDate().equals(sdf.format(date))) {\r\n date = null;\r\n }\r\n } catch (ParseException e) {\r\n e.printStackTrace();\r\n }\r\n if (date == null) {\r\n continue;\r\n }\r\n\r\n if(tweets[i].getText() == null)\r\n {\r\n continue;\r\n }\r\n\r\n if(checkLength(tweets[i].getText().length(), tweets[i].getName(), i)){\r\n continue;\r\n }\r\n\r\n // tweetList.add(tweets[i]);\r\n }\r\n\r\n\r\n\r\n\r\n }catch (UnrecognizedPropertyException e) {\r\n e.printStackTrace();\r\n } catch (JsonMappingException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return tweetList;\r\n */\r\n }",
"public static void main(String[] args) throws Exception\r\n\t{\n\t\tint\ttotalTweets = 0;\r\n FileOutputStream fout=new FileOutputStream(args[0]);\r\n PrintStream ps=new PrintStream(fout);\r\n FileOutputStream fout1=new FileOutputStream(\"location.txt\");\r\n PrintStream ps1=new PrintStream(fout1);\r\n //FileOutputStream fout=new FileOutputStream(\"result.csv\");\r\n //PrintStream ps=new PrintStream(fout);\r\n\r\n\t\t//\tThis variable is the key to our retrieving multiple blocks of tweets. In each batch of tweets we retrieve,\r\n\t\t//\twe use this variable to remember the LOWEST tweet ID. Tweet IDs are (java) longs, and they are roughly\r\n\t\t//\tsequential over time. Without setting the MaxId in the query, Twitter will always retrieve the most\r\n\t\t//\trecent tweets. Thus, to retrieve a second (or third or ...) batch of Tweets, we need to set the Max Id\r\n\t\t//\tin the query to be one less than the lowest Tweet ID we've seen already. This allows us to page backwards\r\n\t\t//\tthrough time to retrieve additional blocks of tweets\r\n\t\tlong maxID = -1;\r\n\r\n\t\tTwitter twitter = getTwitter();\r\n\r\n\t\t//\tNow do a simple search to show that the tokens work\r\n\t\ttry\r\n\t\t{\r\n\t\t\t\r\n\r\n\t\t\t//\tThis returns all the various rate limits in effect for us with the Twitter API\r\n\t\t\tMap<String, RateLimitStatus> rateLimitStatus = twitter.getRateLimitStatus(\"search\");\r\n\r\n\t\t\t//\tThis finds the rate limit specifically for doing the search API call we use in this program\r\n\t\t\tRateLimitStatus searchTweetsRateLimit = rateLimitStatus.get(\"/search/tweets\");\r\n \r\n \r\n \r\n\r\n\t\t\t//\tAlways nice to see these things when debugging code...\r\n\t\t\tSystem.out.printf(\"You have %d calls remaining out of %d, Limit resets in %d seconds\\n\",\r\n\t\t\t\t\t\t\t searchTweetsRateLimit.getRemaining(),\r\n\t\t\t\t\t\t\t searchTweetsRateLimit.getLimit(),\r\n\t\t\t\t\t\t\t searchTweetsRateLimit.getSecondsUntilReset());\r\n\r\n\r\n\t\t\t//\tThis is the loop that retrieve multiple blocks of tweets from Twitter\r\n\t\t\tfor (int queryNumber=0;queryNumber < MAX_QUERIES; queryNumber++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.printf(\"\\n\\n!!! Starting loop %d\\n\\n\", queryNumber);\r\n\r\n\t\t\t\t//\tDo we need to delay because we've already hit our rate limits?\r\n\t\t\t\tif (searchTweetsRateLimit.getRemaining() == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t//\tYes we do, unfortunately ...\r\n\t\t\t\t\tSystem.out.printf(\"!!! Sleeping for %d seconds due to rate limits\\n\", searchTweetsRateLimit.getSecondsUntilReset());\r\n\r\n\t\t\t\t\t//\tIf you sleep exactly the number of seconds, you can make your query a bit too early\r\n\t\t\t\t\t//\tand still get an error for exceeding rate limitations\r\n\t\t\t\t\t//\r\n\t\t\t\t\t// \tAdding two seconds seems to do the trick. Sadly, even just adding one second still triggers a\r\n\t\t\t\t\t//\trate limit exception more often than not. I have no idea why, and I know from a Comp Sci\r\n\t\t\t\t\t//\tstandpoint this is really bad, but just add in 2 seconds and go about your business. Or else.\r\n\t\t\t\t\tThread.sleep((searchTweetsRateLimit.getSecondsUntilReset()+2) * 1000l);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tQuery q = new Query(SEARCH_TERM);\t\t\t// Search for tweets that contains this term\r\n\t\t\t\tq.setCount(TWEETS_PER_QUERY);\t\t\t\t// How many tweets, max, to retrieve\r\n\t\t\t\tq.resultType(Query.ResultType.recent);\t\t\t\t\t\t// Get all tweets\r\n\t\t\t\tq.setLang(\"en\");\t\t\t\t\t\t\t// English language tweets, please\r\n\r\n\t\t\t\t//\tIf maxID is -1, then this is our first call and we do not want to tell Twitter what the maximum\r\n\t\t\t\t//\ttweet id is we want to retrieve. But if it is not -1, then it represents the lowest tweet ID\r\n\t\t\t\t//\twe've seen, so we want to start at it-1 (if we start at maxID, we would see the lowest tweet\r\n\t\t\t\t//\ta second time...\r\n\t\t\t\tif (maxID != -1)\r\n\t\t\t\t{\r\n\t\t\t\t\tq.setMaxId(maxID - 1);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//\tThis actually does the search on Twitter and makes the call across the network\r\n\t\t\t\tQueryResult r = twitter.search(q);\r\n\r\n\t\t\t\t//\tIf there are NO tweets in the result set, it is Twitter's way of telling us that there are no\r\n\t\t\t\t//\tmore tweets to be retrieved. Remember that Twitter's search index only contains about a week's\r\n\t\t\t\t//\tworth of tweets, and uncommon search terms can run out of week before they run out of tweets\r\n\t\t\t\tif (r.getTweets().size() == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tbreak;\t\t\t// Nothing? We must be done\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t//\tloop through all the tweets and process them. In this sample program, we just print them\r\n\t\t\t\t//\tout, but in a real application you might save them to a database, a CSV file, do some\r\n\t\t\t\t//\tanalysis on them, whatever...\r\n\t\t\t\tfor (Status s: r.getTweets())\t\t\t\t// Loop through all the tweets...\r\n\t\t\t\t{\r\n\t\t\t\t\t//\tIncrement our count of tweets retrieved\r\n\t\t\t\t\ttotalTweets++;\r\n\r\n\t\t\t\t\t//\tKeep track of the lowest tweet ID. If you do not do this, you cannot retrieve multiple\r\n\t\t\t\t\t//\tblocks of tweets...\r\n\t\t\t\t\tif (maxID == -1 || s.getId() < maxID)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaxID = s.getId();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//\tDo something with the tweet....\r\n\t\t\t\t\tSystem.out.printf(\"At %s, @%-20s said: %s\\n\",\r\n\t\t\t\t\t\t\t\t\t s.getCreatedAt().toString(),\r\n\t\t\t\t\t\t\t\t\t s.getUser().getScreenName(),\r\n\t\t\t\t\t\t\t\t\t cleanText(s.getText()));\r\n \r\n \r\n GeoLocation geoLocation = s.getGeoLocation();\r\n //Place place = s.getPlace();\r\n //String placeCountry = place.getCountry();\r\n //System.out.println(\"loc\" +placeCountry);\r\n \r\n //double latitude = geoLocation.getLatitude();\r\n //double longitude = geoLocation.getLongitude();\r\n double latitude=37.0902;\r\n double longitude=95.7129;\r\n //String userLocation = getUserLocation(String.valueOf(latitude), String.valueOf(longitude));\r\n \r\n String userLocation=\"US\"; \r\n ps.println(cleanText(s.getText()));\r\n ps1.println(userLocation);\r\n \r\n //System.out.println(\"loc\" +userLocation);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//\tAs part of what gets returned from Twitter when we make the search API call, we get an updated\r\n\t\t\t\t//\tstatus on rate limits. We save this now so at the top of the loop we can decide whether we need\r\n\t\t\t\t//\tto sleep or not before making the next call.\r\n\t\t\t\tsearchTweetsRateLimit = r.getRateLimitStatus();\r\n\t\t\t}\r\n \r\n \r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t//\tCatch all -- you're going to read the stack trace and figure out what needs to be done to fix it\r\n\t\t\tSystem.out.println(\"That didn't work well...wonder why?\");\r\n\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t}\r\n\r\n\t\tSystem.out.printf(\"\\n\\nA total of %d tweets retrieved\\n\", totalTweets);\r\n try\r\n {\r\n\t\tps.close();\r\n ps1.close();\r\n fout1.close();\r\n fout.close();\r\n }catch(Exception ee)\r\n {\r\n System.out.println(ee);\r\n }\r\n }",
"private void loadMoreData() {\n twitterClient.getNextPageOfTweets(new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Headers headers, JSON json) {\n Log.i(ACTIVITY_TAG, \"onSuccess: loadMoreData\");\n // deserialize and construct new model objects from API response\n JSONArray jsonArray = json.jsonArray;\n try {\n // append new data object tweets to existing list\n // notify adapter\n tweetsAdapter.addAll(Tweet.fromJsonArray(jsonArray));\n } catch (JSONException e) {\n Log.e(ACTIVITY_TAG, \"JSON exception: loadMoreData\", e);\n }\n }\n\n @Override\n public void onFailure(int statusCode, Headers headers, String response, Throwable throwable) {\n Log.e(ACTIVITY_TAG, \"onFailure: loadMoreData:\" + response , throwable);\n }\n }, tweets.get(tweets.size() - 1).getId());\n }",
"public Tweet getTweet() {\n\t\ttweetsIndex++;\n\t\treturn tweets.get(tweetsIndex);\n\t}",
"public List<Integer> getNewsFeed(int userId) {\n if (!userId2TopTenTweets.containsKey(userId)) {\n return new ArrayList<>(0);\n }\n\n\n userId2TopTenTweets.get(userId).sort((i1, i2)->i2.getTimestamp() - i1.getTimestamp() > 0 ? 1:i2.getTimestamp() - i1.getTimestamp() == 0 ? 0 : -1);\n List<Integer> result = new ArrayList<>();\n int size = 0;\n for (Tweet tweet : userId2TopTenTweets.get(userId)) {\n result.add(tweet.id);\n size++;\n if (size == 10) {\n return result;\n }\n }\n return result;\n }",
"@Override\n public void populateTimeline() {\n long fetchMoreStart = tweets.size() > 0 ? tweets.get(tweets.size() - 1).getUid() : -1;\n client.getHomeTimeline(new JsonHttpResponseHandler() {\n // on success\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray json) {\n addAll(Tweet.fromJSONArray(json));\n }\n\n // on failure\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"DEBUG\", errorResponse.toString());\n }\n }, fetchMoreStart);\n }",
"private int gather(QueryTargetInfo info) {\n ArrayList<TweetData> res;\n int count = 0;\n int tempCount;\n int ndx;\n boolean flag = true;\n\n info.smallestId = null;\n\n do {\n flag = true;\n res = query(info);\n\n //If there was an error getting the tweets, then don't continue.\n if (res == null) {\n flag = false;\n } else {\n //If we did not get the maximum tweets, then don't continue\n if (res.size() < (MAX_PAGES * RPP)) {\n flag = false;\n }\n\n //Save the results in the db.\n tempCount = store.insertTweets(info, res);\n\n count += tempCount;\n }\n } while (flag);\n\n return count;\n }",
"public List<Status> getTweetList(){\n\t\treturn this.tweetList;\n\t}",
"public List<Tweet> GetTweetInfo() {\n System.out.println(\"#### HomeSessionBean.GetTweetInfo ---List is being generated\");\n List<Tweet> t = em.createNamedQuery(\"Tweet.findAll\").getResultList();\n return t;\n }",
"public void sampleInvestigate ()\r\n {\r\n Query query = new Query(\"Hawker\");\r\n query.setCount(100);\r\n query.setGeoCode(new GeoLocation(1.423844, 103.776921), 5, Query.MILES);\r\n query.setSince(\"2016-12-1\");\r\n try {\r\n QueryResult result = twitter.search(query);\r\n System.out.println(\"Count : \" + result.getTweets().size()) ;\r\n for (Status tweet : result.getTweets()) {\r\n System.out.println(\"@\"+tweet.getUser().getName()+ \": \" + tweet.getText()); \r\n }\r\n } \r\n catch (TwitterException e) {\r\n e.printStackTrace();\r\n } \r\n System.out.println(); \r\n }",
"public List<TweetDto> feed(String username) {\n\t\tList<TweetDto> self = new ArrayList<>();\n\t\tfor (Tweet tweet : userRepository.findByUname(username).getTweets()) {\n\t\t\tif (tweet.isDeleted() == false){\n\t\t\t\tswitch (tweet.getType()) {\n\t\t\t\tcase \"simple\":\n\t\t\t\t\tself.add(tweetMapper.toSimpleDto(tweet));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"reply\":\n\t\t\t\t\tself.add(tweetMapper.toReplyDto(tweet));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"repost\":\n\t\t\t\t\tself.add(tweetMapper.toRepostDto(tweet));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n/* Gets their followers posts and determines if it is a new post, reply or a repost\nand sets it in the database accordingly */\n\t\tfor (User u : userRepository.findByUname(username).getFollowing()) {\n\t\t\tfor (Tweet tweet : u.getTweets()) {\n\t\t\t\tif (tweet.isDeleted() == false)\n\t\t\t\t\tif (tweet.isDeleted() == false){\n\t\t\t\t\t\tswitch (tweet.getType()) {\n\t\t\t\t\t\tcase \"simple\":\n\t\t\t\t\t\t\tself.add(tweetMapper.toSimpleDto(tweet));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"reply\":\n\t\t\t\t\t\t\tself.add(tweetMapper.toReplyDto(tweet));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"repost\":\n\t\t\t\t\t\t\tself.add(tweetMapper.toRepostDto(tweet));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tCollections.sort(self, new TweetCompare());\n\t\tCollections.reverse(self);\n\t\treturn self;\n\t}",
"public List<Kweet> getUserKweets(String username) {\n return kweetDAO.getUserKweets(username);\n }",
"public void downloadTweetsForItem(String item, int numTweets) \n\t\t\tthrows IOException, TwitterException\n\t{\n\t\t/*if (numTweets <= 0) \n\t\t{ \n\t\t\tnumTweets = Integer.MAX_VALUE; \n\t\t}*/\n\t\tFile userDir = new File(String.format(\"%s/%s\", DATA_DIR, item));\n\t\tboolean success = false;\n\t try{\n\t \t //success = userDir.mkdir();\t\n\t \t Files.createDirectory(userDir.toPath());\n\t } \n\t catch(IOException se)\n\t {\n\t \tSystem.out.println(\"****mkdir failed!!!!!!!!\");\n\t }\n\t\t\n\t\tString multiLineFile = \n\t\t\tString.format(\"%s/%s/%s_tweets.txt\", DATA_DIR, item, item);\n\t\tString singleLineFile = \n\t\t\tString.format(\"%s/%s/%s_tweets_single.txt\", DATA_DIR, item, item);\n\t\tString multiLineFileRaw = \n\t\t\t\tString.format(\"%s/%s/%s_tweets_multiRaw.txt\", DATA_DIR, item, item);\n\t\t//item = \"@\" + item;\n\t\t\n\t\tList<String> allTweets = GetAllTweets(item, numTweets);//Query(item, numTweets);\n\t\t\n\t\t// Now do some pre-processing on allTweets.\n\t\t// Topic modelling prefers text with stop words removed etc.\n\t\t List<String> filteredTweets = new ArrayList<String>();\n\n\t\t BufferedReader f = new BufferedReader(new FileReader(\"stopwords.txt\"));\n\t\t String line = f.readLine();\n\t\t List<String> stopwords = new ArrayList<String>();\n\t\t while(line != null)\n\t\t {\n\t\t\t stopwords.add(line);\n\t\t\t line = f.readLine();\n\t\t }\n\t\t f.close();\n\t\t \n\t\titem = item.toLowerCase();\n\t\tint i = 0;\n\t\twhile(i < allTweets.size())\n\t\t{\n\t\t\tString text = allTweets.get(i);\n\t\t\t\n\t\t\t// First, remove all non alphabetic characters. This removes a lot of junk! hash tags, prices, etc.\n\t\t\ttext = text.replaceAll(\"[^a-zA-Z\\\\s]\", \"\").toLowerCase();\n\t\t\t\n\t\t\t// first, get rid of our actual search term. we do not want it to come up as a topic,\n\t\t\t// as we already know that we are searching for tweets of that item\n\t\t\ttext = text.replace(item, \"\"); \n\t\t\t\n\t\t\t// Now, remove all words less than a certain length\n\t\t\ttext = text.replaceAll(\"\\\\b\\\\w{1,3}\\\\b\\\\s?\", \"\");\n\t\t\t\n\t\t\t// The DMM package doesn't do stop word removal! So I have to do this manually.\n\t\t\tfor(String word : stopwords){\n\t\t\t text = text.replace(word+\"\\\\s*\", \"\");\n\t\t\t}\n\t\t\t\n\t\t\t// Again, remove strings that are too short!\n\t\t\tif(text.length() > 14)\n\t\t\t{\n\t\t\t\tfilteredTweets.add(text);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// This string is too short, so it must get removed.\n\t\t\t\tallTweets.remove(i);\n\t\t\t\t// don't increment i, since we just deleted this one.\n\t\t\t}\n\t\t}\n\t\t// Sentiment analysis doesn't need pre-processing.\n\t\tsaveTweetsToFile(allTweets, multiLineFileRaw, true);\n\t\t\n\t\t// But our topics needs some stuff removed.\n\t\tsaveTweetsToFile(filteredTweets, multiLineFile, true);\n\t\tsaveTweetsToFile(filteredTweets, singleLineFile, false);\n\n\t}",
"@Override\n protected Void doInBackground(Void... params) {\n try {\n Query query = new Query(\"India\"); //\n\n GeoLocation location = new GeoLocation(mLastLocation.getLatitude(), mLastLocation.getLongitude()); //latitude, longitude\n\n query.setGeoCode(location, 1, Query.MILES); //location, radius, unit\n query.setSinceId(latestTweetId);\n QueryResult result;\n\n do {\n result = twitter.search(query);\n\n\n for (twitter4j.Status tweet : result.getTweets()) {\n\n if(tweet.getGeoLocation()!=null){\n\n newTweets.add(tweet);\n long id = tweet.getId();\n\n if(id>latestTweetId){\n\n latestTweetId = id;\n }\n\n }\n\n System.out.println(\"@\" + tweet.getUser().getScreenName() + \" - \" + tweet.getText());\n }\n\n } while ((query = result.nextQuery()) != null);\n\n } catch (TwitterException te) {\n System.out.println(\"Failed to search tweets: \" + te.getMessage());\n }\n return null;\n }",
"public List<Kweet> getMentionKweets(String username) {\n return kweetDAO.getMentionKweets(username);\n }",
"public List<Integer> getNewsFeed(int userId) {\n List<Integer> tmp = twitterTweetMap.getOrDefault(userId, new LinkedList<>());\n return tmp.size() <= 10 ? tmp : tmp.subList(0,10);\n }",
"@GetMapping(value = \"/stream/tweets\", produces = MediaType.TEXT_EVENT_STREAM_VALUE)\n\tpublic Flux<Tweet> streamAllTweets() {\n\t\treturn tweetRepository.findAll();\n\t}",
"public List<Integer> getNewsFeed(int userId) {\n\t\t\tint resultSize = 10;\n\t\t\tList<Integer> result = new ArrayList<>(resultSize);\n\t\t\tSet<Integer> followees = getFollowees(userId);\n\t\t\tint count = 0;\n\t\t\tfor (int i = tweets.size() - 1; i >= 0; i--) {\n\t\t\t\tif (count == resultSize)\n\t\t\t\t\tbreak;\n\t\t\t\tint tweet = tweets.get(i);\n\t\t\t\tint owner = tweetOwner.get(tweet);\n\t\t\t\tif (owner == userId || followees.contains(owner)) {\n\t\t\t\t\tresult.add(tweet);\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}",
"public CompletableFuture<List<Details>> reduceTweets(CompletableFuture<List<Details>> cfOriginalTweetData) {\n CompletableFuture<List<Details>> cfReducedTweets=null;\n\n cfReducedTweets= CompletableFuture.supplyAsync(() ->{\n List<Details> reducedTweetList=null;\n try{\n reducedTweetList= cfOriginalTweetData.get().stream()\n .limit(10).collect(Collectors.toList());\n }\n catch (Exception e){\n e.printStackTrace();\n }\n return reducedTweetList;\n });\n\n return cfReducedTweets;\n }",
"public static List<Status> getFeed() throws TwitterException {\n\t\tTwitter twitter = TwitterFactory.getSingleton();\n\t\tPaging paging = new Paging(1,100);\n\t\tList<Status> statuses = twitter.getHomeTimeline(paging);\n\t\treturn statuses;\n\t}",
"@Override\n public int getItemCount() {\n return tweets.size();\n }",
"@SuppressWarnings(\"unused\")\r\n private void getTweetsByHashtag(String hashtag) throws TwitterException {\n System.out.println(\"100 tweets with #\" + hashtag + \":\");\r\n Query query = new Query(hashtag);\r\n query.count(100);\r\n QueryResult result = twitter.search(query);\r\n for (Status status : result.getTweets()) {\r\n printStatus(status);\r\n }\r\n }",
"@SuppressWarnings({\"SleepWhileInLoop\", \"LoggerStringConcat\"})\n public static void main(String[] args) throws TwitterException, InterruptedException {\n ConfigurationBuilder cb = new ConfigurationBuilder();\n cb.setJSONStoreEnabled(true);\n TwitterFactory twitterFactory = new TwitterFactory(cb.build()); // The factory instance is re-useable and thread safe.\n Twitter twitter = twitterFactory.getInstance();\n\n // Set Twitter API keys.\n Properties twitterApiKeysProp = getProperties(Constants.AppConstants.TWITTER_PROP_FILE_NAME);\n AccessToken accessToken = new AccessToken(\n twitterApiKeysProp.getProperty(Constants.TwitterAPIConstants.ACCESS_TOKEN_KEY),\n twitterApiKeysProp.getProperty(Constants.TwitterAPIConstants.ACCESS_TOKEN_SECRET));\n twitter.setOAuthConsumer(\n twitterApiKeysProp.getProperty(Constants.TwitterAPIConstants.CONSUMER_KEY),\n twitterApiKeysProp.getProperty(Constants.TwitterAPIConstants.CONSUMER_SECRET));\n twitter.setOAuthAccessToken(accessToken);\n\n // Connect Database\n Properties appProp = getProperties(Constants.AppConstants.APPLICATION_PROP_FILE_NAME);\n MongoClient mongo = new MongoClient(\n appProp.getProperty(Constants.AppConstants.HOST),\n Integer.parseInt(appProp.getProperty(Constants.AppConstants.PORT)));\n MongoDatabase db = mongo.getDatabase(appProp.getProperty(Constants.AppConstants.DATABASE));\n MongoCollection<Document> collection = db.getCollection(\n appProp.getProperty(Constants.AppConstants.COLLECTION));\n\n // Set query properties to pass it to Twitter Search API\n Query query = new Query(appProp.getProperty(Constants.AppConstants.QUERY));\n query.setLang(Constants.AppConstants.LANG);\n query.setSince(appProp.getProperty(Constants.AppConstants.SINCE));\n query.setUntil(appProp.getProperty(Constants.AppConstants.UNTIL));\n Long maxId = Long.parseLong(appProp.getProperty(Constants.AppConstants.MAX_ID)) - 1;\n if (maxId > 0) {\n query.setMaxId(maxId);\n LOGGER.log(Level.INFO, \"Max Id set: \" + maxId);\n }\n LOGGER.log(Level.INFO, \"Query: {0}\", query.getQuery());\n\n QueryResult result = twitter.search(query);\n\n // In one try, only limited number of tweets are retrieved. So\n // keep retrying until all tweets are received.\n while (!result.getTweets().isEmpty()) {\n Long minId = Long.MAX_VALUE;\n Document document;\n for (Status status : result.getTweets()) {\n document = Document.parse(TwitterObjectFactory.getRawJSON(status));\n collection.insertOne(document);\n if (status.getId() < minId) {\n minId = status.getId();\n }\n LOGGER.log(Level.INFO, \"Id: \" + status.getId());\n }\n query.setMaxId(minId - 1);\n try {\n result = searchWithRetry(twitter, query);\n } catch (TwitterException ex) {\n LOGGER.log(Level.SEVERE, ex.getErrorMessage(), ex);\n LOGGER.log(Level.INFO, \"Thread is sleeping for 15 minutes. \"\n + \"Application will retry to make an API call after 15 minutes.\");\n Thread.sleep(15 * 60 * 1000); // sleep for 15 minutes\n result = searchWithRetry(twitter, query);\n }\n }\n }",
"public CompletableFuture<List<Status>> getUserTimeline(String screenName){\n CompletableFuture<List<Status>> userTimeline= null;\n\n try {\n userTimeline=CompletableFuture.supplyAsync(() -> {\n List<Status> temp=null;\n try{\n temp=twitter.getUserTimeline(screenName).stream().limit(10).collect(Collectors.toList());\n }\n catch (Exception e){\n e.printStackTrace();\n }\n return temp;\n });\n return userTimeline;\n }\n catch (Exception e){\n e.printStackTrace();\n }\n\n return userTimeline;\n }",
"public List<Integer> getNewsFeed(int userId) {\n Set<Integer> friendSet = friends.computeIfAbsent(userId, e -> new HashSet<>());\n\n List<Integer> result = new ArrayList<>();\n\n result.addAll(userToTwitter.computeIfAbsent(userId, e -> new LinkedList<>()));\n for (int uid : friendSet) {\n result.addAll(userToTwitter.computeIfAbsent(uid, e -> new LinkedList<>()));\n }\n\n result.sort(Comparator.comparingInt(tweets::get).reversed());\n\n return result.size() > 10 ? result.subList(0, 10) : result;\n }",
"public List<Integer> getNewsFeed(int userId) {\n ArrayList<Tweet> feeds = new ArrayList<>();\n\n User user = getOrCreateUser(userId);\n feeds.addAll(user.myTweets);\n for (User followee : user.following) {\n feeds.addAll(followee.myTweets);\n }\n\n feeds.sort(new Comparator<Tweet>() {\n @Override\n public int compare(Tweet o1, Tweet o2) {\n return o2.counter - o1.counter;\n }\n });\n\n ArrayList<Integer> rlt = new ArrayList<>();\n\n for (Tweet tweet : feeds) {\n rlt.add(tweet.id);\n }\n\n if (rlt.size() > 10)\n return rlt.subList(0, 10);\n\n return rlt;\n }",
"@PostMapping(\"/timeline\")\n\tpublic List<tweets> timelineList() {\n\n\t\tList<Tweet> timeline = twitter.timelineOperations().getHomeTimeline();\n\t\tfor (Tweet tweet : timeline) {\n\t\t\ttweets objTweets = new tweets(0, tweet.getText(), tweet.getProfileImageUrl(), tweet.getFromUser());\n\t\t\tservice.saveTweets(objTweets);\n\t\t}\n\t\tList<tweets> home = service.listAll();\n\t\treturn home;\n\t}",
"private void getTweetsMostCommonHashTag() {\r\n final List<Entry<String, Integer>> list = \r\n getCommonList(countHashtags, countHashtags.size());\r\n list.stream()\r\n .filter(entry -> !searched.contains(entry.getKey().toLowerCase()))\r\n .limit(1)\r\n .forEach(entry -> getTweets(entry.getKey(), geocode, getAuth()));\r\n }",
"@Path(\"tweets/{query}\")\r\n @GET\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public Response getTweets(@PathParam(\"query\") final String query)\r\n {\r\n log.debug(\"GET: getTweets\");\r\n\r\n if (store == null)\r\n {\r\n initializeStore();\r\n }\r\n\r\n final List<Tweet> tweets = store.getTweets(query);\r\n final TweetList list = new TweetList();\r\n list.setTweets(tweets);\r\n return Response.ok(list).build();\r\n }",
"@Override\n public int getItemCount() {\n return tweetList.size();\n }",
"public static void main(String[] args) throws TwitterException, IOException {\n\t\tfinal long count = 10;\n\n\t\t// Twitter Conf.\n\t\tConfigurationBuilder cb = new ConfigurationBuilder();\n\t\tcb.setDebugEnabled(true).setOAuthConsumerKey(CONSUMER_KEY)\n\t\t\t\t.setOAuthConsumerSecret(CONSUMER_SECRET)\n\t\t\t\t.setOAuthAccessToken(ACCESS_KEY)\n\t\t\t\t.setOAuthAccessTokenSecret(ACCESS_SECRET);\n\n\t\tfinal TwitterStream twitterStream = new TwitterStreamFactory(cb.build())\n\t\t\t\t.getInstance();\n\n\t\tStatusListener listener = new StatusListener() {\n\t\t\tprivate long counter = 0;\n\n\t\t\t@Override\n\t\t\tpublic void onStatus(Status status) {\n//\t\t\t\tSystem.out.println(status.getUser().getName());\n//\t\t\t\twriter.println(TwitterObjectFactory.getRawJSON(status)+\",\");\n\t\t\t\tTweet tweet = new Tweet(status);\n\t\t\t\ttry {\n\t\t\t\t\tHBaseHelper.put(tweet);\n\t\t\t\t} catch (IOException | JSONException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcounter++;\n\t\t\t\tSystem.out.println(counter);\n//\t\t\t\tif (counter >= count) {\n//\t\t\t\t\ttwitterStream.shutdown();\n//\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onDeletionNotice(\n\t\t\t\t\tStatusDeletionNotice statusDeletionNotice) {\n\t\t\t\t// System.out.println(statusDeletionNotice.toString());\n\t\t\t\t// System.out.println(\"Got a status deletion notice id:\" +\n\t\t\t\t// statusDeletionNotice.getStatusId());\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onTrackLimitationNotice(int numberOfLimitedStatuses) {\n\t\t\t\tSystem.out.println(\"Got track limitation notice:\"\n\t\t\t\t\t\t+ numberOfLimitedStatuses);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onScrubGeo(long userId, long upToStatusId) {\n\t\t\t\tSystem.out.println(\"Got scrub_geo event userId:\" + userId\n\t\t\t\t\t\t+ \" upToStatusId:\" + upToStatusId);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onStallWarning(StallWarning warning) {\n\t\t\t\tSystem.out.println(\"Got stall warning:\" + warning);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onException(Exception ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t};\n\t\ttwitterStream.addListener(listener);\n\t\tFilterQuery fq = new FilterQuery();\n\t\tString keywords[] = { \"#nosql\" };\n\t\tfq.track(keywords);\n\n\t\ttwitterStream.sample();\n\t}",
"public String getRetweet() {\n\t\treturn restClient.getReTweets();\n\t}",
"public long getLastTweetId() {\n return tweetAdapter.getItem(tweetAdapter.getCount()-1).getTweetId();\n }",
"public List<Integer> getNewsFeed(int userId) {\n\t\t//minHeap the top is the old tweet, which maybe remove from the list\n\t\tPriorityQueue<Tweet> minHeap = new PriorityQueue<>(new Comparator<Tweet>(){\n\t\t\t@Override\n\t\t\tpublic int compare(Tweet t1, Tweet t2) {\n\t\t\t\treturn t1.timePosted - t2.timePosted;\n\t\t\t}\n\t\t});\n\t\t// get my followee Set\n\t\tSet<Integer> myFollowees = followees.get(userId);\n\t\tif (myFollowees != null) {\n\t\t\tfor (Integer followeeId : myFollowees) {\n\t\t\t\t//get the tweets of them\n\t\t\t\tList<Tweet> followeeTweets = tweets.get(followeeId);\n\t\t\t\tif (followeeTweets != null) {\n\t\t\t\t\tfor (Tweet tweet : followeeTweets) {\n\t\t\t\t\t\tif (minHeap.size() < feedMaxNum) {\n\t\t\t\t\t\t\tminHeap.offer(tweet);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t//if it is older than the oldest one in the heap just discard\n\t\t\t\t\t\t\tif (tweet.timePosted <= minHeap.peek().timePosted) break;\n\t\t\t\t\t\t\tminHeap.offer(tweet);\n\t\t\t\t\t\t\tminHeap.poll();\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\tList<Integer> myFeed = new LinkedList<>();\n\t\twhile (!minHeap.isEmpty()) {\n\t\t\tmyFeed.add(0, minHeap.poll().tweetId);\n\t\t}\n\t\treturn myFeed;\n\t}",
"public Tweet getTweet(int idx) {\n return tweets.get(idx);\n }",
"public void onRequestMore() {\n buildTimeline(getLastTweetId() - 1, NO_SINCE_ID);\n }",
"public static void main(String[] args) {\r\n\r\n int sID=Integer.parseInt(args[0]);\r\n\r\n ConfigurationBuilder cb = new ConfigurationBuilder();\r\n cb.setDebugEnabled(true)\r\n .setOAuthConsumerKey(\"xJBKzaqxQiiV4EEkq2kamDopn\")\r\n .setOAuthConsumerSecret(\"cubJVmCSlbSGrdDNLlSM2P2P9YZF2FtIt3mh7izZKaHcFycJVz\")\r\n .setOAuthAccessToken(\"3229045309-QXL281PQ5SwwnLq2Myf8qYjZkP2NNy6lj0ottAI\")\r\n .setOAuthAccessTokenSecret(\"tzZtMyu3RYlQFUXiBoLbNfOxhaXz0yVKSVumEqv33SMqs\")\r\n .setHttpConnectionTimeout(100000)\r\n .setDebugEnabled(true);\r\n TwitterFactory tf = new TwitterFactory(cb.build());\r\n Twitter twitter = tf.getInstance();\r\n\r\n int tweetSaved = 0;\r\n long tweetID = Long.MAX_VALUE;\r\n\r\n Scanner scanner = null;\r\n try {\r\n scanner = new Scanner(new File(\"input.txt\"));\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n int totalTweetNeed = 10000;\r\n ArrayList<Status> tweets = new ArrayList<Status>();\r\n\r\n int sourceID = 1;\r\n String line = null;\r\n\r\n for (int i = 0; i < sourceID; i++) {\r\n\r\n line = scanner.nextLine();\r\n }\r\n // process the line\r\n System.out.println(\"From: \" + line + \" lang: en\");\r\n String source = \"from:\" + line + \" lang:en\";\r\n // Query is to set the source\r\n Query query = new Query(source);\r\n // set the starting search date\r\n query.setSince(\"2020-02-21\");\r\n // set the ending search date\r\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n Date todaysDate = new Date();\r\n String testDateString = formatter.format(todaysDate);\r\n System.out.println(\"String in yyy-MM-dd format is: \" + testDateString);\r\n query.setUntil(testDateString);\r\n CSVWriter writer = null;\r\n try {\r\n File directory = new File(\".\");\r\n writer = new CSVWriter(new FileWriter(directory + \"/newlyCrawled.csv\",true));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n while (tweets.size() < totalTweetNeed) {\r\n if (totalTweetNeed - tweetSaved > 100) {\r\n //Maximum each query is 100\r\n query.setCount(100);\r\n }\r\n else{\r\n query.setCount(totalTweetNeed - tweetSaved);\r\n }\r\n\r\n\r\n// query.setCount(1);\r\n QueryResult result = null;\r\n try {\r\n result = twitter.search(query);\r\n RateLimitStatus status = result.getRateLimitStatus();\r\n if (status.getRemaining() == 0) {\r\n try {\r\n Thread.sleep(status.getSecondsUntilReset() * 1000);\r\n } catch (InterruptedException e) {\r\n // ...\r\n }\r\n } else {\r\n tweets.addAll(result.getTweets());\r\n// File file = new File(\"output.txt\");\r\n// try (FileWriter fw = new FileWriter(file, true)) {\r\n// PrintWriter pw = new PrintWriter(fw, true);\r\n //Instantiating the CSVWriter class\r\n //Writing data to a csv file\r\n// String header[] = {\"user id\",\t\"tweets\" ,\"content\",\"created on\",\"tweets id\"};\r\n //Writing data to the csv file\r\n// writer.writeNext(header);\r\n\r\n\r\n for (Status status2 : result.getTweets()) {\r\n Date date = status2.getCreatedAt();\r\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\r\n String strDate = dateFormat.format(date);\r\n String tweetsID=Long.toString(status2.getId());\r\n String data[] ={status2.getUser().getScreenName() , status2.getText(), strDate, tweetsID};\r\n //Writing data to the csv file\r\n writer.writeNext(data);\r\n writer.flush();\r\n\r\n// pw.println(\"@\" + status2.getUser().getScreenName() + \":\" + status2.getText());\r\n// pw.println(\"Create on: \" + status2.getCreatedAt() + \" - ID: \" + status2.getId());\r\n if (status2.getId() < tweetID)\r\n tweetID = status2.getId();\r\n }\r\n //Flushing data from writer to file\r\n writer.flush();\r\n System.out.println(\"Data entered\");\r\n System.out.println(\"No. of tweets stored: \" + tweets.size());\r\n System.out.println(\"remaining left: \" + status.getRemaining());\r\n// } catch (IOException e) {\r\n// e.printStackTrace();\r\n// }write\r\n query.setMaxId(tweetID-1);\r\n\r\n }\r\n } catch (TwitterException e) {\r\n\r\n e.printStackTrace();\r\n System.out.println(\"Twitter API Limit reached\");\r\n new Thread(\"App-exit\") {\r\n @Override\r\n public void run() {\r\n System.exit(0);\r\n }\r\n }.start();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n System.out.println(\"Data Crawled Successfully\");\r\n\r\n try {\r\n writer.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n new Thread(\"App-exit\") {\r\n @Override\r\n public void run() {\r\n System.exit(0);\r\n }\r\n }.start();\r\n }",
"public String[] findUserTwitterId(String name, TweetsIndexManager tim) throws IOException {\r\n // Initialize a new Tweets index builder for the index of the all tweets\r\n \r\n String[] name_ary = name.split(\" \");\r\n \r\n\r\n ArrayList<String> fieldValues = new ArrayList<String>();\r\n // Search user that match name + surname\r\n fieldValues.add((name_ary[0] + \" \" + name_ary[1]).toLowerCase());\r\n // Search user that match surname + name\r\n fieldValues.add((name_ary[1] + \" \" + name_ary[0]).toLowerCase());\r\n \r\n ArrayList<Document> results = tim.searchForField(\"name\", fieldValues, 10000);\r\n \r\n // Variable that will mantain the max number of followers among the users found\r\n int max = 0;\r\n // User id related to the max\r\n String id = \"\";\r\n \r\n // For each document found \r\n for (Document doc : results) {\r\n // check if the user that made it has the more influencer of our actual max\r\n if (Integer.parseInt(doc.get(\"followers\")) >= max) {\r\n // And in case take it as new max\r\n max = Integer.parseInt(doc.get(\"followers\"));\r\n id = doc.get(\"screenName\");\r\n }\r\n }\r\n // Return the max\r\n String[] result = {id, new Integer(max).toString()};\r\n return result;\r\n }",
"public static void getUserTimeline(String user, Classifier classifier, HttpServletResponse response, int pagenum, int countnum) throws IOException {\n\t\tresponse.setContentType(\"application/json\");\n\t\tPrintWriter out = response.getWriter();\n Twitter twitter = new TwitterFactory().getInstance();\n try {\n List<Status> statuses;\n Paging page = new Paging(pagenum, countnum);\n statuses = twitter.getUserTimeline(user, page);\n String responseObject = \"{\\\"user\\\":\\\"\"+user+\"\\\",\\\"tweets\\\":[\";\n for (Status status : statuses) {\n // System.out.println(\"@\" + status.getUser().getScreenName() + \" - \" + status.getText());\n \t\n if (status.getText().length() >= 50) {\n \tString tweet = status.getText();\n \t\ttry {\n \t\t\ttweet = \"1 personal \"+tweet;\n \t\t\tresponseObject += \"{\\\"\"+status.getId()+\"\\\": {\\\"datetime\\\":\\\"\" + status.getCreatedAt().toString() + \"\\\",\";\n \t\t\tresponseObject += \"\\\"classification\\\":\"+printLabelings(classifier, tweet, out) + \"}},\";\n \t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n \t\t\t\t\n \t\t } else {\n \t\t\t\t// out.print(\"Please enter at least 50 characters for the tweet content.\");\n \t\t \t// TWEET CONTENT NOT LONG ENOUGH\n \t\t\t}\n }\n responseObject = responseObject.substring(0, responseObject.length()-1);\n out.print(responseObject + \"]}\");\n } catch (TwitterException te) {\n te.printStackTrace();\n System.out.println(\"Failed to get timeline: \" + te.getMessage());\n System.exit(-1);\n }\n }",
"public List<TwitterData> getValidatedTweets() {\n return new ArrayList<>();\n }",
"public Twitter() {\r\n\t\t\ttweet = new HashMap<Integer, List<twi>>(100);\r\n\t\t\tfollower = new HashMap<Integer, List<Integer>>(100);\r\n\t\t\ttimeStamp = 0;\r\n\t\t}",
"public List<Integer> getNewsFeed(int userId) {\n if (!followees.containsKey(userId)) {\n followees.put(userId, new HashSet<>());\n followees.get(userId).add(userId);\n }\n List<Integer> result = new ArrayList<>();\n for (int i = tweetList.size() - 1; i >= 0; i--) {\n if (followees.get(userId).contains(tweetList.get(i).userId))\n result.add(tweetList.get(i).tweetId);\n if (result.size() == 10)\n break;\n }\n return result;\n }",
"public List<Integer> getNewsFeed(int userId) {\n List<Integer> res = new ArrayList<Integer>();\n if (!followMap.containsKey(userId)) return res;\n PriorityQueue<Tweet> pq = new PriorityQueue<Tweet>(10000, new Comparator<Tweet>() {\n @Override\n public int compare(final Tweet t1, final Tweet t2) {\n return t2.ts - t1.ts;\n }\n });\n for (int followee : followMap.get(userId)) {\n if (!tweetMap.containsKey(followee) || tweetMap.get(followee).size()==0) continue;\n for (Tweet tweet : tweetMap.get(followee)) pq.add(tweet);\n }\n while (pq.size() > 0 && res.size() < 10) res.add(pq.poll().id);\n return res;\n }",
"public static List<Tweet> getTweetList(List<TweetWithUser> tweetWithUsers) {\n List<Tweet> tweets = new ArrayList<>();\n for (int i = 0; i < tweetWithUsers.size(); i++) {\n Tweet tweet = tweetWithUsers.get(i).tweet;\n tweet.user = tweetWithUsers.get(i).user;\n tweets.add(tweet);\n }\n return tweets;\n }",
"public List<Integer> getNewsFeed(int userId) {\n List<Integer> res = new ArrayList<>();\n PriorityQueue<Tweet> queue = new PriorityQueue<Tweet>((t1, t2) -> t2.ts - t1.ts);\n User u = u_map.get(userId);\n if(u == null) return res;\n u.followed.forEach(followeeId->{\n Tweet head = u_map.get(followeeId).head;\n if(head != null){\n queue.offer(head);\n }\n });\n \n while(res.size() < 10 && !queue.isEmpty()){\n Tweet t = queue.poll();\n res.add(t.id);\n if(t.next != null) queue.offer(t.next);\n }\n return res;\n }",
"long getLastFetchTimeMs();",
"public List<Integer> getNewsFeed(int userId) {\n User target = null;\n for (User user : users) {\n if (user.id == userId) {\n target = user;\n }\n }\n if (target == null) {\n return null;\n }\n List<Tweet> tweets = new ArrayList<>(target.tweetList);\n for (User follower : target.followers) {\n tweets.addAll(follower.tweetList);\n }\n tweets.sort((o1, o2) -> o2.publishTime - o1.publishTime);\n while (tweets.size() > 10) {\n tweets.remove(tweets.size() - 1);\n }\n List<Integer> list = new ArrayList<>();\n for (Tweet tweet : tweets) {\n list.add(tweet.Id);\n }\n return list;\n }",
"@RequestMapping(\"/comment/gettweet\")\n @CrossOrigin\n String gettweet(@RequestParam int count);",
"List<Tweet> findAllByOrderByCreatedAtDesc();",
"public List<Kweet> getTopicKweets(String topic) {\n return kweetDAO.getTopicKweets(topic);\n }",
"TwitterResourceProvider(final IndexableTweets indexableTweets) throws IOException {\r\n tweets = new Stack<>();\r\n clones = indexableTweets.getClones();\r\n TwitterTemplate twitterTemplate = new TwitterTemplate( //\r\n indexableTweets.getConsumerKey(), //\r\n indexableTweets.getConsumerSecret(), //\r\n indexableTweets.getToken(), //\r\n indexableTweets.getTokenSecret());\r\n StreamingOperations streamingOperations = twitterTemplate.streamingOperations();\r\n StreamListener streamListener = new StreamListener() {\r\n\r\n final AtomicInteger counter = new AtomicInteger();\r\n final AtomicInteger deleted = new AtomicInteger();\r\n\r\n @Override\r\n public void onTweet(final Tweet tweet) {\r\n if (tweets.size() < 10000) {\r\n tweets.push(tweet);\r\n }\r\n if (counter.incrementAndGet() % 1000 == 0) {\r\n logger.info(\"Tweets received : \" + counter.get() + \", tweet cache : \" + tweets.size() + \", tweet : \" + ToStringBuilder.reflectionToString(tweet));\r\n }\r\n }\r\n\r\n @Override\r\n public void onDelete(final StreamDeleteEvent streamDeleteEvent) {\r\n if (deleted.incrementAndGet() % 1000 == 0) {\r\n logger.info(\"Deleted : \" + deleted.get() + \", event : \" + ToStringBuilder.reflectionToString(streamDeleteEvent));\r\n }\r\n }\r\n\r\n @Override\r\n public void onLimit(final int i) {\r\n logger.info(\"Limit : \" + i);\r\n }\r\n\r\n @Override\r\n public void onWarning(final StreamWarningEvent streamWarningEvent) {\r\n logger.info(\"Warning : \" + streamWarningEvent);\r\n }\r\n };\r\n List<StreamListener> listeners = Collections.singletonList(streamListener);\r\n stream = streamingOperations.sample(listeners);\r\n }",
"@Path(\"clear\")\r\n @GET\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public Response clearTweets()\r\n {\r\n log.debug(\"GET: clearTweets\");\r\n if (store == null)\r\n {\r\n initializeStore();\r\n }\r\n store.empty();\r\n return Response.ok().build();\r\n }",
"public Twitter() {\n size = 0;\n users = new ArrayList<>();\n }",
"public void loadNextDataFromApi(int offset) {\n client.getMoreMentionsTimeline(maxId, new JsonHttpResponseHandler(){\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n\n for (int i = 0; i < response.length(); i++){\n //get json object in the position index\n //create a tweet object with json object\n //add the tweet object to the arraylist of tweets\n //notify changes to adapter\n Tweet tweet = null;\n try {\n tweet = Tweet.fromJson(response.getJSONObject(i));\n tweets.add(tweet);\n adapter.notifyItemInserted(tweets.size() - 1);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if (tweet.uid < maxId){\n maxId = tweet.uid;\n Log.d(\"MaxId\", String.valueOf(maxId));\n }\n\n }\n }\n });\n\n }",
"public Twitter() {\n\t\t\ttweets = new ArrayList<>();\n\t\t\tuserTweets = new HashMap<>();\n\t\t\ttweetOwner = new HashMap<>();\n\t\t\tuserRelation = new HashMap<>();\n\t\t}",
"public List<TwitterUser> getAllUsers(String table) {\n // Lista que almacenara el resultado\n List<TwitterUser> twitterUserList = new ArrayList<TwitterUser>();\n //hacemos una query porque queremos devolver un cursor\n\n String query = (table.equals(MyDBHelper.TABLE_UNFOLLOWERS)) ? \"select * from \" + table\n : \"select * from \" + table + \" order by \" + MyDBHelper.COLUMN_ORDER + \" asc \";\n\n Cursor cursor = database.rawQuery(query, null);\n\n if (cursor.moveToFirst()) {\n while (!cursor.isAfterLast()) {\n TwitterUser user = new TwitterUser(cursor.getLong(0), cursor.getString(1),\n cursor.getString(2), cursor.getString(3));\n\n twitterUserList.add(user);\n cursor.moveToNext();\n }\n }\n\n cursor.close();\n // Una vez obtenidos todos los datos y cerrado el cursor, devolvemos la\n // lista.\n return twitterUserList;\n }",
"private void printRetweets(long statusId) throws TwitterException {\r\n List<Status> list = twitter.getRetweets(statusId);\r\n for (int i = 0; i < list.size(); i++) {\r\n System.out.println(\"##### This retweet was found over the twitter search api! #####\");\r\n printStatus(list.get(i));\r\n }\r\n }",
"public List<String> trendsAvailable() {\r\n\t\tList<String> twitterResponseList = new ArrayList<String>();\r\n\t\ttry {\r\n\t\t\tProperties properties = getProperties();\r\n\t\t\tString apiUrl = properties.getProperty(\"twitter.api.trends.available\");\r\n\r\n\t\t\tHttpResponse apiResponse = executeHttpGet(apiUrl);\r\n\r\n\t\t\tif (200 == apiResponse.getStatusLine().getStatusCode()) {\r\n\t\t\t\tJSONArray jsonArray = new JSONArray(EntityUtils.toString(apiResponse.getEntity()));\r\n\t\t\t\tfor (int i = 1; i < jsonArray.length() && i <= 10; i++) {\r\n\t\t\t\t\tJSONObject object = (JSONObject) jsonArray.get(i);\r\n\t\t\t\t\tString displayText = (String) object.get(\"country\") + \" : \" + (String) object.get(\"url\");\r\n\t\t\t\t\ttwitterResponseList.add(displayText);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn twitterResponseList;\r\n\t}",
"public static void main(String[] args) {\n Tweet tweet1 = new Tweet(\n \"@TheAdamFields\",\n \"I'm learning #spring development with @craigsdennis...\",\n new Date(1502769600000L)\n );\n\n Tweet tweet2 = new Tweet(\n \"@TheAdamFields\",\n \"I'm learning #android development with @craigsdennis...\",\n new Date(1502856000000L)\n );\n\n // Create an array of tweets in reverse order, then sort\n Tweet[] tweets = {tweet2, tweet1};\n Arrays.sort(tweets);\n\n // Save the tweets to a .ser file\n TweetList.save(tweets);\n\n // Load tweets from the file\n Tweet[] loadedTweets = TweetList.load();\n\n for (Tweet tweet : loadedTweets) {\n System.out.println(tweet);\n }\n\n Set<String> allHashTags = new HashSet<>();\n Set<String> allMentions = new HashSet<>();\n\n for (Tweet tweet : tweets) {\n allHashTags.addAll(tweet.getHashTags());\n allMentions.addAll(tweet.getMentions());\n }\n\n System.out.printf(\"Hashtags: %s %n\", allHashTags);\n System.out.printf(\"Mentions: %s %n\", allMentions);\n\n Map<String, Integer> hashTagCounts = new HashMap<>();\n\n for (Tweet tweet : tweets) {\n for (String hashTag : tweet.getHashTags()) {\n Integer count = hashTagCounts.get(hashTag);\n\n if (count == null) {\n count = 0;\n }\n\n count++;\n hashTagCounts.put(hashTag, count);\n }\n }\n\n System.out.printf(\"Hashtag Counts: %s %n\", hashTagCounts);\n\n Map<String, List<Tweet>> tweetsByAuthor = new HashMap<>();\n\n for (Tweet tweet : tweets) {\n List<Tweet> authoredTweets = tweetsByAuthor.get(tweet.getAuthor());\n\n if (authoredTweets == null) {\n authoredTweets = new ArrayList<>();\n tweetsByAuthor.put(tweet.getAuthor(), authoredTweets);\n }\n\n authoredTweets.add(tweet);\n }\n\n System.out.printf(\"Tweets by author: %s %n\", tweetsByAuthor);\n }",
"List<String> searchTweets(String keywords) throws TwitterException;",
"public List<Entry> show10MostRecentEntries() {\n\t\tList<Entry> subList;\n\t\tif (entries.isEmpty()){\n\t\t\tSystem.out.println(\"The blog doesn't have any entries yet\");\n\t\t\treturn entries.getList();\n\t\t}\n\t\telse {\n\t\t\tif (entries.getSize()>= 10){\n\t\t\t\tsubList= entries.getSubList(0,10);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubList= entries.getSubList(0,entries.getSize());\n\t\t\t}\n\t\t\tIterator<Entry> it = subList.listIterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tEntry entry = it.next();\n\t\t\t\tSystem.out.println(\"Entry Title: \" + entry.getTitle());\n\t\t\t\tSystem.out.println(\"Entry Content: \" + entry.getContent());\n\t\t\t}\n\t\t\t\n\t\t\treturn subList;\n\t\t}\n\t}",
"public static Set<String> getMentionedUsers(List<Tweet> tweets) {\n\n// throw new RuntimeException(\"not implemented\");\n Set<String> anSet = new HashSet<>();\n Pattern pattern=Pattern.compile(\"@[a-zA-Z]{1,}\");\n Matcher matcher=pattern.matcher(tweets.get(0).getText());\n\n return anSet;\n }",
"public void getFavoritesTimeline(Long uid, Long since, Long max, AsyncHttpResponseHandler handler) {\n if (uid == null) {\n Log.i(\"DEBUG\", \"Invalid user id...\");\n return;\n }\n String apiUrl = getApiUrl(\"favorites/list.json\");\n // Specify params\n RequestParams params = new RequestParams();\n params.put(\"user_id\", uid);\n params.put(\"count\", 25);\n if (since != null) {\n params.put(\"since_id\", since);\n } else if (max != null) {\n params.put(\"max_id\", max);\n }\n // Execute the request\n getClient().get(apiUrl, params, handler);\n }",
"private void updateCommon(List<Status> tweetsList) {\r\n numberOfTweets += tweetsList.size();\r\n \r\n tweetsList.stream().forEach(tweet -> {\r\n final HashtagEntity[] hashtags = tweet.getHashtagEntities();\r\n for (HashtagEntity hashtag : hashtags) {\r\n final String text = hashtag.getText().toLowerCase();\r\n if (!countHashtags.containsKey(text)) {\r\n countHashtags.put(text, 0);\r\n }\r\n countHashtags.put(text, countHashtags.get(text) + 1);\r\n }\r\n \r\n final String[] words = tweet.getText().split(\" \");\r\n for (String word : words) {\r\n word = word.toLowerCase();\r\n if (!wordsFilter.contains(word)) {\r\n if (!countWords.containsKey(word)) {\r\n countWords.put(word, 0);\r\n }\r\n countWords.put(word, countWords.get(word) + 1);\r\n }\r\n }\r\n \r\n final String location = tweet.getUser().getLocation();\r\n if (!countLocation.containsKey(location)) {\r\n countLocation.put(location, 0);\r\n }\r\n countLocation.put(location, countLocation.get(location) + 1);\r\n });\r\n }"
] |
[
"0.7314263",
"0.71743536",
"0.6953106",
"0.6950714",
"0.6929173",
"0.6648685",
"0.65586746",
"0.653748",
"0.6507607",
"0.6501363",
"0.64768595",
"0.64459735",
"0.63425577",
"0.63357526",
"0.6312763",
"0.6297232",
"0.62880236",
"0.6267043",
"0.62669015",
"0.61617",
"0.61502445",
"0.61399835",
"0.6103839",
"0.6103055",
"0.6101644",
"0.6095141",
"0.60937786",
"0.6077087",
"0.6067018",
"0.60659385",
"0.6058044",
"0.60076356",
"0.59885067",
"0.59883255",
"0.59735596",
"0.5950917",
"0.59247196",
"0.5916536",
"0.59000504",
"0.58951885",
"0.5865587",
"0.58582383",
"0.58581024",
"0.58542997",
"0.58251584",
"0.58155835",
"0.5813431",
"0.58070433",
"0.5802549",
"0.5784169",
"0.5779553",
"0.57301384",
"0.5716866",
"0.5711538",
"0.57061774",
"0.568442",
"0.5672109",
"0.5665894",
"0.5652379",
"0.56394935",
"0.56231093",
"0.5617447",
"0.560091",
"0.56007266",
"0.55512524",
"0.55507195",
"0.5538287",
"0.5537477",
"0.5531914",
"0.5529313",
"0.5523206",
"0.55187565",
"0.5508187",
"0.55070287",
"0.5503565",
"0.5501491",
"0.54944015",
"0.549398",
"0.5487931",
"0.54862773",
"0.546235",
"0.5458215",
"0.5455323",
"0.5443317",
"0.5442719",
"0.54404765",
"0.5435561",
"0.5423226",
"0.54225385",
"0.54215926",
"0.5409242",
"0.5401768",
"0.5388022",
"0.5377873",
"0.5374119",
"0.5351326",
"0.53495455",
"0.5319223",
"0.5275204",
"0.52661794",
"0.5265286"
] |
0.0
|
-1
|
TODO:get only last 1000 tweets
|
@Override
public List<String> getTweetsForMapsWithLimit(String collectionName, int numberOfTweetsWanted) {
DBCollection collection = mongoOps.getCollection(collectionName);
DBObject q = QueryBuilder.start().put("coordinates").notEquals(null).get();
DBCursor c = collection.find(q).sort(new BasicDBObject("timestamp_ms", -1)).limit(numberOfTweetsWanted);
List<String> results = getResults(c);
return results;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void getTweets(long lastUid) {\n client.getMentionsTimeline(lastUid, new JsonHttpResponseHandler() {\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n Log.d(\"DEBUG\", response.toString());\n addAll(Tweet.fromJsonArray(response));\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"DEBUG\", errorResponse.toString());\n }\n });\n }",
"public List<Status> getTweets() {\r\n\t\tincrementShutdownTimer();\r\n\t\treturn tweets;\r\n\t}",
"private List<ResponseList<Status>> get_tweet(long id) {\n\t\tList<ResponseList<Status>> tweets = new ArrayList(2);\n\t\ttry {\n\n\t\t\tPaging paging = new Paging(1, 200);\n\t\t\tResponseList<Status> tmp_Statues = twitter.getUserTimeline(id, paging); // get 200 Tweet\n\t\t\ttweets.add(0, tmp_Statues);\n\t\t\tpaging = new Paging(2, 200);\n\t\t\ttmp_Statues = twitter.getUserTimeline(id, paging);// get another 200 Tweet\n\t\t\ttweets.add(1, tmp_Statues);\n\n\t\t\tSystem.out.println(\"insert Tweets...\");\n\t\t\tSystem.out.println(\"path class\");\n\t\t\tSystem.getProperty(\"java.class.path\");\n\n\t\t\tfor (Status s : tweets.get(0))\n\t\t\t\tdb.insertTweets(s);\n\t\t\tSystem.out.println(\"tweets.get(1)\");\n\n\t\t\tfor (Status s : tweets.get(1))\n\t\t\t\tdb.insertTweets(s);\n\t\t\tSystem.out.println(\"Update_Creat_At(id);\");\n\n\t\t\tdb.Update_Creat_At(id);\n\t\t\tSystem.out.println(\"update_Complete_Tweets\");\n\n\t\t\tdb.update_Complete_Tweets(id);\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t}\n\t\treturn tweets;\n\t}",
"private ArrayList<TweetData> getTweets(JSONObject json, QueryTargetInfo info) {\n ArrayList<TweetData> tweets = new ArrayList<TweetData>();\n\n JSONArray jsonArray = json.optJSONArray(\"statuses\");\n\n\n if (jsonArray == null) {\n return tweets;\n }\n\n for (int i = 0; i < jsonArray.length(); i++) {\n try {\n TweetData tweet = new TweetData();\n JSONObject tweetJson = jsonArray.getJSONObject(i);\n\n SimpleDateFormat df = new SimpleDateFormat(TIME_FORMAT);\n\n tweet.twitterId = tweetJson.getString(\"id_str\");\n tweet.published = (int)(df.parse(tweetJson.getString(\"created_at\")).getTime() / 1000);\n tweet.content = tweetJson.getString(\"text\");\n tweet.source = tweetJson.optString(\"source\", \"<No Source>\");\n tweet.lang = tweetJson.optString(\"lang\", \"en\");\n\n tweet.author = \"Jon Doe\";\n JSONObject user = tweetJson.optJSONObject(\"user\");\n if (user != null) {\n tweet.author = user.optString(\"screen_name\", \"Jon Doe\");\n }\n\n tweet.place = tweetJson.optString(\"place\", \"\");\n tweet.geo = tweetJson.optString(\"geo\", \"\");\n\n // Keep track of the smallest id.\n if (info.smallestId == null ||\n Long.valueOf(tweet.twitterId) < Long.valueOf(info.smallestId)) {\n info.smallestId = tweet.twitterId;\n }\n\n // Keep track of the last seen (max) id.\n if (info.lastSeenId == null ||\n Long.valueOf(tweet.twitterId) > Long.valueOf(info.lastSeenId)) {\n info.lastSeenId = tweet.twitterId;\n }\n\n tweets.add(tweet);\n } catch (Exception ex) {\n Logger.logError(\"Unable to parse tweet.\", ex);\n }\n }\n\n return tweets;\n }",
"private static List<Status> getStatuses(Twitter twitter){\n\t\tList<Status> mainList = new ArrayList<Status>(900);\n\t\tPaging page = new Paging();\n\t\twhile(true){\n\t\t\ttry{\n\t\t\t\tList<Status> list = twitter.getUserTimeline(USER,page);\n\t\t\t\t\n\t\t\t\tif(list.size() == 0) break;\n\t\t\t\t\n\t\t\t\tmainList.addAll(list);\n\t\t\t\tlong max_id = list.get(list.size()-1).getId();\n\t\t\t\t\n\t\t\t\tpage.setMaxId(max_id-1);\n\t\t\t}catch(TwitterException e){\n\t\t\t\tSystem.out.println(\"Exception caught :\" +\n\t\t\t\t\t\t\" some thing wrong, check internet connction or try after some time\");\n\t\t\t\tSystem.out.println(\"error message : \"+ e.toString());\n\t\t\t\tSystem.out.println(\"Program will quit now\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn mainList;\n\t}",
"public void getTweets() {\r\n\t\t\r\n\t\tConfigurationBuilder cb = new ConfigurationBuilder();\r\n\t\tcb.setDebugEnabled(true);\r\n\t\t\r\n\t\t//provide your own keys\r\n\t cb.setOAuthConsumerKey(\"ConsumerKey\");\r\n\t cb.setOAuthConsumerSecret(\"ConsumerSecret\");\r\n\t cb.setOAuthAccessToken(\"AccessToken\");\r\n\t cb.setOAuthAccessTokenSecret(\"TokenSecret\");\r\n\r\n TwitterStream twitterStream = new TwitterStreamFactory(cb.build()).getInstance(); \r\n \r\n //Check for live status updates\r\n StatusListener listener = new StatusListener() {\r\n\r\n @Override\r\n public void onException(Exception arg0) {\r\n \tSystem.out.println(\"Exception!! Data Not Inserted Into Database\");\r\n }\r\n\r\n @Override\r\n public void onDeletionNotice(StatusDeletionNotice arg0) {\r\n \tSystem.out.println(\"Got a status deletion notice id:\" + arg0.getStatusId());\r\n }\r\n \r\n @Override\r\n public void onScrubGeo(long userId, long upToStatusId) {\r\n System.out.println(\"Got scrub_geo event userId:\" + userId + \" upToStatusId:\" + upToStatusId);\r\n }\r\n \r\n @Override\r\n public void onStatus(Status status) {\r\n \t\r\n \t User user = status.getUser();\r\n \t \r\n String username = status.getUser().getScreenName();\r\n String profileLocation = user.getLocation();\r\n long tweetId = status.getId(); \r\n String content = status.getText();\r\n \r\n \r\n //Create a model for the live data\r\n TweetModel memoryData = new TweetModel(username, profileLocation, tweetId, content);\r\n \r\n //store to MongoDB if data is correct\r\n System.out.println(++counter + \") username: \" + username + \" location: \" + profileLocation + \" tweetId \" + tweetId + \" Text: \" + content );\r\n data.save(memoryData);\r\n }\r\n \r\n\t\t\t@Override\r\n public void onTrackLimitationNotice(int arg0) {\r\n\t System.out.println(\"Got track limitation notice:\" + arg0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onStallWarning(StallWarning warning) {}\r\n };\r\n \r\n //Filter the live tweet results\r\n FilterQuery filterQuery = new FilterQuery();\r\n //Search for tweets with specific keywords\r\n String keywords[] = {\"Java\", \"Python\", \"PHP\"};\r\n //Restrict the language to English\r\n String[] lang = {\"en\"}; \r\n //Add the Filters\r\n filterQuery.language(lang);\r\n filterQuery.track(keywords);\r\n //Listen for Live Tweets\r\n twitterStream.addListener(listener);\r\n twitterStream.filter(filterQuery);\r\n\t}",
"private ArrayList<TweetData> query(QueryTargetInfo info) {\n String url;\n ArrayList<TweetData> tweets = new ArrayList<TweetData>();\n InputStream is = null;\n\n // lastSeenId should have been set earlier.\n // However, if it is still null, just use \"0\".\n if (info.lastSeenId == null) {\n url = String.format(\"%s?q=%s&count=%d&result_type=recent&since_id=0\",\n URL_BASE, info.query, RPP);\n } else if (info.smallestId == null) {\n url = String.format(\"%s?q=%s&count=%d&result_type=recent&since_id=%s\",\n URL_BASE, info.query, RPP, info.lastSeenId);\n } else {\n url = String.format(\"%s?q=%s&count=%d&result_type=recent&since_id=%s&max_id=%s\",\n URL_BASE, info.query, RPP, info.lastSeenId, info.smallestId);\n }\n\n try {\n do {\n URL searchURL = new URL(url);\n HttpsURLConnection searchConnection = (HttpsURLConnection)searchURL.openConnection();\n\n searchConnection.setRequestProperty(\"Host\", \"api.twitter.com\");\n searchConnection.setRequestProperty(\"User-Agent\", \"BirdCatcher\");\n searchConnection.setRequestProperty(\"Authorization\", \"Bearer \" + kBearerToken);\n\n is = searchConnection.getInputStream();\n\n JSONTokener jsonTokener = new JSONTokener(is);\n\n JSONObject json = new JSONObject(jsonTokener);\n\n is.close();\n\n url = getNextLink(json, url, info);\n\n tweets.addAll(getTweets(json, info));\n\n Thread.sleep(1000);\n\n is = null;\n } while (url != null);\n } catch (Exception e) {\n Logger.logError(\"Error performing query\", e);\n\n if (is != null) {\n try {\n java.io.BufferedReader in =\n new java.io.BufferedReader(new java.io.InputStreamReader(is));\n\n String response = \"Response from Twitter:\\n\";\n String temp;\n\n while ((temp = in.readLine()) != null) {\n response += (temp + \"\\n\");\n }\n\n Logger.logDebug(response);\n\n response = null;\n temp = null;\n } catch (Exception ex) {\n }\n }\n\n return tweets;\n }\n\n return tweets;\n }",
"@Transactional\r\n\tpublic List<Tweet> getAllTweets() {\n\t\tList<Tweet> tweets = tweetRepository.findAll(Sort.by(Sort.Direction.DESC, \"postDTTM\"));\r\n\t\treturn tweets;\r\n\t}",
"public List<Status> searchQuery(Twitter twitter, String search)\r\n throws TwitterException, IOException {\r\n\r\n Paging paging = new Paging(2, 100);\r\n List<Status> statuses = twitter.getHomeTimeline(paging);\r\n\r\n Query query = new Query(search);\r\n query.setCount(500);\r\n //this is a key part\r\n query.setSince(\"2015-01-02\");\r\n QueryResult result;\r\n List<Status> tweets = null;\r\n do {\r\n System.out.println(\"Write to File ...\");\r\n result = twitter.search(query);\r\n List<Status> newTweets = result.getTweets();\r\n if (tweets == null) {\r\n tweets = newTweets;\r\n } else {\r\n tweets.addAll(newTweets);\r\n }\r\n for (Status s:newTweets){\r\n System.out.println(s.getUser().getName() + \": \" + s.getText());\r\n }\r\n\r\n } while ((query = result.nextQuery()) != null);\r\n return tweets;\r\n }",
"public List<Tweet> getAllTweets() {\n\t\tList<Tweet> tweets = new ArrayList<Tweet>();\n\t\tString selectQuery = \"SELECT * FROM \" + TweetDataSource.TABLE_TWEETS;\n\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tCursor c = db.rawQuery(selectQuery, null);\n\n\t\t// looping through all rows and adding to list\n\t\tif (c.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tTweet tweet = TweetDataSource.cursorToTweet(c);\n\n\t\t\t\tUser user = getUserById(c.getLong(c\n\t\t\t\t\t\t.getColumnIndex(TweetDataSource.COLUMN_USER_UID)));\n\t\t\t\ttweet.setUser(user);\n\n\t\t\t\t// adding to list\n\t\t\t\ttweets.add(tweet);\n\t\t\t} while (c.moveToNext());\n\t\t}\n\n\t\treturn tweets;\n\t}",
"@Path(\"fetch/{query}/{limit}\")\r\n @GET\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public Response fetchTweets(@PathParam(\"query\") final String query, @PathParam(\"limit\") final String limit)\r\n {\r\n log.debug(\"GET: augmentTweets: \" + query + \"\\tlimit string: \" + limit);\r\n\r\n final TweetList list = new TweetList();\r\n final int limitValue = Integer.parseInt(limit);\r\n\r\n // TODO try-with-resources should be:\r\n // try(final MongoClient client = new MongoClient(host, port)){\r\n try (final MongoClient client = new MongoClient(\"74.140.208.12\", 6789))\r\n {\r\n final MongoCollection<Document> coll = client.getDatabase(\"visualdb\").getCollection(\"visualcollection\");\r\n\r\n final Document queryDoc = new Document();\r\n queryDoc.put(\"query\", query);\r\n\r\n final FindIterable<Document> results = coll.find(queryDoc);\r\n\r\n int count = 0;\r\n for (final Document doc : results)\r\n {\r\n count++;\r\n\r\n final Tweet tweet = new Tweet();\r\n tweet.setText(doc.getString(\"text\"));\r\n tweet.setTweetUrl(doc.getString(\"url\"));\r\n tweet.setId(doc.getString(\"tweetId\"));\r\n\r\n final Location loc = new Location();\r\n loc.setInitialized(true);\r\n\r\n final Document locationDoc = doc.get(\"loc\", Document.class);\r\n loc.setLatitude(locationDoc.getDouble(\"latitude\").doubleValue());\r\n loc.setLongitude(locationDoc.getDouble(\"longitude\").doubleValue());\r\n tweet.setLocation(loc);\r\n\r\n final List<String> imageUrls = new ArrayList<>();\r\n final List<?> urls = doc.get(\"images\", List.class);\r\n\r\n for (final Object object : urls)\r\n {\r\n imageUrls.add(object.toString());\r\n }\r\n tweet.setImageUrls(imageUrls);\r\n\r\n final List<String> entities = new ArrayList<>();\r\n final List<?> entityList = doc.get(\"entities\", List.class);\r\n for (final Object object : entityList)\r\n {\r\n entities.add(object.toString());\r\n }\r\n tweet.setExtractedEntities(entities);\r\n list.getTweets().add(tweet);\r\n\r\n if (count > limitValue)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return Response.ok(list).build();\r\n }",
"public int getCount() {\n return tweets.size();\n }",
"public LinkedList<Status> getTweets() {\r\n return tweets;\r\n }",
"private static void printMostRetweetedTweets() throws Exception{\n\t\t\n\t\tString max_retweeted_tweet[] = new String[3];\t//string containing tweets\n\t\tint max_counts[] = new int[3];\t//string containing their retweet count\n\t\t\n\t\tfor(Status status : statusList){\n\t\t\tif(!status.isRetweet() && status.getURLEntities().length != 0){\n\t\t\t\tint count = status.getRetweetCount();\n\t\t\t\tint index = getMinIndex(max_counts);\n\t\t\t\tif(count>max_counts[index]){\n\t\t\t\t\tmax_counts[index] = count;\n\t\t\t\t\tmax_retweeted_tweet[index] = status.getText();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* printing top 3 most retweeted tweets with links in them */\n\t\tSystem.out.println(\"the top 3 most retweeted tweets with links in them : \");\n\t\tfor(int i=0; i<3; i++){\n\t\t\tSystem.out.println(\"Tweet : \" + max_retweeted_tweet[i] + \" retweeted \"+ max_counts[i] + \" times\" );\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t}",
"public LinkedList<User> getUsers() throws TwitterException {\n System.out.println(\"##########Getting The Tweets##########\");\n LinkedList<User> users = new LinkedList<>();\n for (String keyword : this.wordsLookingFor) {\n //Search for tweets\n for (Status A : this.searchTweets(keyword)) {\n //System.out.println(A.getText());\n getUserFromStatus(users, A);\n }\n }\n\n System.out.println(\"Users Number is \".concat(Integer.toString(users.size())));\n return users;\n }",
"@Override\n public void onTweetsFetched(List<Tweet> tweets) {\n finalTweetID = tweets.get(tweets.size() - 1).getId();\n twitterCallback.onTweetsFetched(tweets); //Return tweets\n }",
"private long getTweets(String search, String geocode, Configuration auth) {\r\n TwitterFactory tf = new TwitterFactory(auth);\r\n Twitter twitter = tf.getInstance();\r\n \r\n try {\r\n Query query = new Query(search + \" \" + geocode);\r\n query.setSinceId(starttime);\r\n QueryResult result;\r\n \r\n for (int i = 0; i < blocks; i++) {\r\n if (Abort.getInstance().abort()) {\r\n return -1;\r\n }\r\n \r\n result = twitter.search(query);\r\n \r\n synchronized (this) {\r\n if (!tweets.containsKey(search)) {\r\n tweets.put(search, new HashSet());\r\n }\r\n tweets.get(search).addAll(result.getTweets());\r\n }\r\n \r\n //updateCommon(result.getTweets());\r\n //searched.add(search.toLowerCase());\r\n query.setSinceId(starttime + i * blocks15);\r\n }\r\n } catch (TwitterException te) {\r\n System.out.println(\"Failed to search tweets: \" + te);\r\n System.out.println(\"\\nRetry at: \" + \r\n (new Date(te.getRateLimitStatus()\r\n .getResetTimeInSeconds() * 1000L)));\r\n return te.getRateLimitStatus().getSecondsUntilReset() * 1000L;\r\n }\r\n return 0;\r\n }",
"public List<String> homeTimeline() {\r\n\t\tList<String> twitterResponseList = new ArrayList<String>();\r\n\t\ttry {\r\n\t\t\tProperties properties = getProperties();\r\n\t\t\tString apiUrl = properties.getProperty(\"twitter.api.home.timeline\") + \"?count=10\"; // append count to max of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 10\r\n\r\n\t\t\tHttpResponse apiResponse = executeHttpGet(apiUrl);\r\n\r\n\t\t\tif (200 == apiResponse.getStatusLine().getStatusCode()) {\r\n\t\t\t\tJSONArray jsonArray = new JSONArray(EntityUtils.toString(apiResponse.getEntity()));\r\n\t\t\t\tfor (int i = 0; i < jsonArray.length(); i++) {\r\n\t\t\t\t\tJSONObject jsonObject = (JSONObject) jsonArray.get(i);\r\n\t\t\t\t\tJSONObject userObject = (JSONObject) jsonObject.get(\"user\");\r\n\t\t\t\t\tString displayText = (String) userObject.get(\"screen_name\") + \" : \"\r\n\t\t\t\t\t\t\t+ (String) jsonObject.get(\"text\"); // data to be displayed in screen_name : tweet format\r\n\t\t\t\t\ttwitterResponseList.add(displayText); // list of data in the format mentioned above\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn twitterResponseList;\r\n\r\n\t}",
"public String getTweets(int user, int n) throws TwitterException{\n\t\n\n\t\ttry {\n\t\t\t\n\t\t\t\n\t twitter4j.User user1 = twitter.showUser(user);\n\t // System.out.println(\"INIZIO PER \" + user1.getScreenName() + \" - isProtect: \" + user1.isProtected()); \n\t \n\t \n\t if (user1.getLang().equalsIgnoreCase(\"en\") && user1.isProtected() == false /*&& user1.getFollowersCount() > 50*/ ){\n\t\t\t\t//First param of Paging() is the page number, second is the number per page (this is capped around 200 I think.\n\t\t\t\tPaging paging = new Paging(1, n);// fet 200 twett\n\t\t\t\tList<Status> statuses = twitter.getUserTimeline(user, paging);\n\t\t \tString out = \"\";\n\t\t\t\t/*User's Tweets*/\n\t\t\t\tfor(Status st : statuses)\n\t\t\t\t{\n\t\t\t\t//\tSystem.out.println(st.getUser().getLocation() + \" \" + st.getUser().getScreenName()+\" ----------- \" + st.getText() + \"\\n\");\n\t\t\t\t\tif (st.getLang().equals(\"en\")){\n\t\t\t\t\t\tout = out + \"\\n\" + st.getText();\n\t\t\t\t\t//\tSystem.out.println(st.getText()+ \" \" + user);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\treturn out;\n\t } else {\n\t \treturn \"\";\n\t }\n\n\t\t} catch (TwitterException name) {\n\t\t\t\n\t\t//\tSystem.out.println(\"This username is not valid \" + name.getErrorMessage());\n\t\t\treturn \"\";\n\t\t} \n\t\t\n \t\n }",
"public static List<Status> getTweets(Query query) {\n\n \tTwitter twitter = new TwitterFactory().getInstance();\n \tQueryResult result = null;\n try {\n \tresult = twitter.search(query);\n \tList<Status> tweets = result.getTweets();\n \treturn tweets;\n }\n catch (TwitterException te) {\n \tte.printStackTrace();\n System.out.println(\"Failed to search tweets: \" + te.getMessage());\n return null;\n }\n }",
"public List<Kweet> getTimelineKweets(String username) {\n return kweetDAO.getTimelineKweets(username);\n }",
"public List<Tweet> getTweets(String file) {\n List<String[]> data = this.extract(file);\n ArrayList<Tweet> tweets = new ArrayList<>();\n for (String[] row : data) {\n Tweet t = new Tweet(Integer.parseInt(row[0]), Integer.parseInt(row[1]), row[2], row[3]);\n tweets.add(t);\n }\n return tweets;\n }",
"public List<Status> searchQueryMk2(Twitter twitter, String search, int page)\r\n throws TwitterException {\n int pageInt = page;\r\n int count = 0;\r\n Paging paging = new Paging(pageInt, 10);\r\n List<Status> statuses = twitter.getUserTimeline(\"meemezy\",paging);\r\n\r\n\r\n for (Status s : statuses) {\r\n System.out.println(s.getUser().getName() + \": \" + s.getText());\r\n System.out.println(s.getCreatedAt()+\"\\n\");\r\n count++;\r\n if(count == 9 && s.getText() != null){\r\n pageInt++;\r\n searchQueryMk2(twitter, search, pageInt);\r\n }\r\n }\r\n\r\n return null;\r\n }",
"@Override\n\tpublic List<UserTweet> getFeed() throws Exception {\n\t\tList<UserTweet> usertweets = new ArrayList<UserTweet>();\n\t\t\n\t\tUserTweet userTweet1 = new UserTweet();\n\t\tuserTweet1.setUsername(\"aren from dao\");\n\t\tuserTweet1.setTweetMessage(\"hey was up\");\n\t\t\n\t\tUserTweet userTweet2 = new UserTweet();\n\t\tuserTweet2.setUsername(\"aren2 new\");\n\t\tuserTweet2.setTweetMessage(\"hey was up 2\");\n\t\t\n\t\tusertweets.add(userTweet1);\n\t\tusertweets.add(userTweet2);\n\t\t\n\t\treturn usertweets;\n\t}",
"public @NotNull TwitterFeedResponse getTwitterFeed(@NotNull final String userName,\n final int maxNumOfTweets,\n final long sinceMessageId) throws TwitterException {\n User u = twitter.showUser(userName);\n TwitterFeedResponse feed = initializeFeed(u);\n ResponseList<Status> tweets;\n if (sinceMessageId <= 0) {\n tweets = twitter.getUserTimeline(feed.userId, new Paging(1, maxNumOfTweets));\n } else {\n tweets = twitter.getUserTimeline(feed.userId, new Paging(1, maxNumOfTweets, sinceMessageId));\n }\n feed.limit = u.getRateLimitStatus().getLimit();\n feed.remaining = u.getRateLimitStatus().getRemaining();\n\n for (Status s : tweets) {\n TwitterFeedResponse.Tweet t = initializeTweet(s, feed);\n feed.tweets.add(t);\n }\n\n return feed;\n }",
"public ArrayList<String> getTweets (long currentUserId) throws TwitterException {\n\t\tArrayList<String> tweets = new ArrayList<String>();\n\n\t\tPaging paging = new Paging();\n\t\tResponseList<Status> currentUserTimeLine = this.twitter.getUserTimeline(currentUserId, paging);\n\n\t\tfor(Status status:currentUserTimeLine) {\n\t\t\ttweets.add(status.getText());\n\t\t}\n\n\t\treturn tweets;\n\t}",
"private void twitterStream(ServerAccess sa, String search, String geocode, \r\n int max) throws IOException {\r\n final TwitterStream twitterStream = \r\n new TwitterStreamFactory(getAuth()).getInstance();\r\n final Count count = new Count(max);\r\n \r\n final StatusListener listener = new StatusListener() {\r\n @Override\r\n public void onStatus(Status status) {\r\n count.increment();\r\n try {\r\n sa.addTweet(new TweetEntity(status, search));\r\n } catch (UnsupportedEncodingException ex) {\r\n }\r\n try {\r\n sa.addUser(new UserEntity(status.getUser()));\r\n } catch (UnsupportedEncodingException ex) {\r\n }\r\n \r\n if (Abort.getInstance().abort() || count.isMax()) {\r\n Abort.getInstance().setAbort(false);\r\n twitterStream.shutdown();\r\n }\r\n }\r\n\r\n @Override\r\n public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {\r\n //System.out.println(\"Got a status deletion notice id:\" + statusDeletionNotice.getStatusId());\r\n }\r\n\r\n @Override\r\n public void onTrackLimitationNotice(int numberOfLimitedStatuses) {\r\n //System.out.println(\"Got track limitation notice:\" + numberOfLimitedStatuses);\r\n }\r\n\r\n @Override\r\n public void onScrubGeo(long userId, long upToStatusId) {\r\n //System.out.println(\"Got scrub_geo event userId:\" + userId + \" upToStatusId:\" + upToStatusId);\r\n }\r\n\r\n @Override\r\n public void onStallWarning(StallWarning warning) {\r\n //System.out.println(\"Got stall warning:\" + warning);\r\n }\r\n\r\n @Override\r\n public void onException(Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n };\r\n twitterStream.addListener(listener);\r\n FilterQuery filterquery = new FilterQuery();\r\n //filterquery.count(500);\r\n //String[] searchwords = {\"voetbal\", \"tennis\", \"basketbal\"};\r\n //filterquery.track(searchwords);\r\n final List<String> alts = relations.get(search);\r\n final String[] altsGeo = new String[alts.size()];\r\n for (int i = 0; i < alts.size(); i++) {\r\n altsGeo[i] = alts.get(i) + \" \" + geocode;\r\n }\r\n filterquery.track(altsGeo);\r\n twitterStream.filter(filterquery);\r\n twitterStream.sample();\r\n }",
"public void searchUserAccount( )\r\n throws TwitterException, URISyntaxException, IOException{\r\n\r\n // looks at all tweets since this page\r\n // the count is the limit\r\n\r\n int count = 0;\r\n String text = \"\";\r\n Paging paging = new Paging(pageInt, 10);\r\n List<Status> statuses = twitter.getUserTimeline(user, paging);\r\n\r\n for (Status s : statuses) {\r\n String url = \"https://twitter.com/\" + s.getUser().getScreenName() + \"/status/\" + s.getId();\r\n if (s.getRetweetedStatus() == null) {\r\n content = url;\r\n //send the links to text\r\n HandleFile(override, active);\r\n\r\n //regular expressions\r\n String regex = \"https://t.co/.*\";\r\n text = s.getText().replaceAll(regex,\"\");\r\n\r\n System.out.println(s.getUser().getName() + \": \" + text);\r\n System.out.println(url); //prints the url of the tweet\r\n System.out.println(s.getCreatedAt()+\"\\n\");\r\n\r\n //sets the tweets to variables to be exported\r\n tweets = tweets + \" \" +text + \"\\n\"+ url + \"\\n\" + s.getCreatedAt() + \"\\n\\n\";\r\n\r\n\r\n active = false;\r\n\r\n //search for nudes\r\n getTwitterImage(s);\r\n }\r\n count++;\r\n\r\n if(count == 5 && limitInt > 0){\r\n limitInt--;\r\n pageInt++;\r\n searchUserAccount();\r\n }\r\n }\r\n }",
"private RetryQuery timeTweets(int n, Query lastQuery, String search, Configuration auth) {\r\n /*while (!DBStore.getInstance().isEmpty()) {\r\n try {\r\n Thread.sleep(10000);\r\n } catch (InterruptedException ex) {\r\n }\r\n }*/\r\n TwitterFactory tf = new TwitterFactory(auth);\r\n Twitter twitter = tf.getInstance();\r\n Query query = new Query(search);\r\n /*query.setGeoCode(new twitter4j.GeoLocation(geocode[0], geocode[1]), \r\n geocode[2], Query.Unit.km);*/\r\n query.setLang(\"nl\");\r\n query.count(1000);\r\n \r\n if (lastQuery != null) {\r\n query = lastQuery;\r\n }\r\n \r\n QueryResult result;\r\n \r\n if (Abort.getInstance().abort()) {\r\n return new RetryQuery(-1, query);\r\n }\r\n\r\n try {\r\n result = twitter.search(query);\r\n while (result.nextQuery() != null) {\r\n synchronized (lock) {\r\n if (!tweets.containsKey(search)) {\r\n tweets.put(search, new HashSet());\r\n }\r\n tweets.get(search).addAll(result.getTweets());\r\n }\r\n query = result.nextQuery();\r\n result = twitter.search(query);\r\n }\r\n\r\n synchronized (lock) {\r\n if (!tweets.containsKey(search)) {\r\n tweets.put(search, new HashSet());\r\n }\r\n tweets.get(search).addAll(result.getTweets());\r\n }\r\n\r\n } catch (TwitterException te) {\r\n System.out.println(\"Failed to search tweets: \" + te);\r\n System.out.println(\"\\nRetry at n = \" + n + \": \" + \r\n (new Date(te.getRateLimitStatus()\r\n .getResetTimeInSeconds() * 1000L)));\r\n return new RetryQuery(\r\n te.getRateLimitStatus().getResetTimeInSeconds() * 1000L,\r\n query);\r\n }\r\n return new RetryQuery(0, null);\r\n }",
"public ArrayList<Tweet> getTweetsByUserId(long id) {\n\t\tTweet tweet = null;\n\t\t\n\t\tString queryString = \n\t\t\t \"PREFIX sweb: <\" + Config.NS + \"> \" +\n\t\t\t \"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \" +\n\t\t\t \"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \" +\n\t\t\t \"PREFIX foaf: <http://xmlns.com/foaf/0.1/>\" +\n\t\t\t \"select * \" +\n\t\t\t \"where { \" +\n\t\t\t \t\t\"?user sweb:id \" + id + \".\" +\n\t\t\t \t\t\"?tweet sweb:user ?user. \" +\n\t\t\t \"} \\n \";\n\n\t Query query = QueryFactory.create(queryString);\n\t \n\t QueryExecution qe = QueryExecutionFactory.create(query, this.model);\n\t ResultSet results = qe.execSelect();\n\t \n\t ArrayList<Tweet> tweets = new ArrayList<Tweet>();\n\t while(results.hasNext()) {\n\t \tQuerySolution solution = results.nextSolution() ;\n\t Resource currentResource = solution.getResource(\"tweet\");\n\n\t /* Taking care of the date */\n\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-d k:m:s\");\n\t\t\tString dateRaw = currentResource.getProperty(this.createdAt).getString();\n\t\t\tdateRaw = dateRaw.replace('T', ' ');\n\t\t\tdateRaw = dateRaw.replace(\"Z\", \"\");\n\t\t\t\n\t\t\tDate date = null;\n\t\t\ttry {\n\t\t\t\tdate = dateFormat.parse(dateRaw);\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t tweet = new Tweet(\n\t \t\tString.valueOf(id),\n\t \t\tcurrentResource.getProperty(this.text).getString(),\n\t \t\tdate\n\t );\t\n\t \n\t tweets.add(tweet);\n\t }\n\t \n\t return tweets;\n\t}",
"@Override\n public void run() {\n try {\n\n try {\n mLastLocation = LocationServices.FusedLocationApi.getLastLocation(\n googleApiClient);\n } catch (SecurityException e) {\n e.printStackTrace();\n }\n\n if (mLastLocation != null) {\n\n\n Query query = new Query(\"India\"); //\n\n GeoLocation location = new GeoLocation(mLastLocation.getLatitude(), mLastLocation.getLongitude()); //latitude, longitude\n\n query.setGeoCode(location, 5, Query.MILES); //location, radius, unit\n query.setSinceId(latestTweetId);\n QueryResult result;\n\n do {\n result = twitter.search(query);\n\n for (twitter4j.Status tweet : result.getTweets()) {\n\n if (tweet.getGeoLocation() != null) {\n\n newTweets.add(tweet);\n long id = tweet.getId();\n\n if (id > latestTweetId) {\n\n latestTweetId = id;\n }\n\n }\n\n System.out.println(\"@\" + tweet.getUser().getScreenName() + \" - \" + tweet.getText());\n }\n\n } while ((query = result.nextQuery()) != null);\n\n handler.sendEmptyMessage(1);\n }\n\n }catch(TwitterException te){\n System.out.println(\"Failed to search tweets: \" + te.getMessage());\n }\n\n\n\n\n\n }",
"public ArrayList<Tweet> getTweets() {\n Collections.sort(tweets, new Comparator<Tweet>() {\n public int compare(Tweet tweet1, Tweet tweet2) {\n return tweet1.getDate().compareTo(tweet2.getDate());\n }\n });\n\n return tweets;\n }",
"public List<TwitterDataExtract> GetData();",
"public List<TweetDto> tweets(String username) {\n\t\tList<Tweet> convert = userRepository.findByUname(username).getTweets();\n\n\t\tList<TweetDto> dto = new ArrayList<>();\n\t\tfor(Tweet check : convert){\n\t\t\tswitch (check.getType()) {\n\t\t\tcase \"simple\":\n\t\t\t\tdto.add(tweetMapper.toSimpleDto(check));\n\t\t\t\tbreak;\n\t\t\tcase \"reply\":\n\t\t\t\tdto.add(tweetMapper.toReplyDto(check));\n\t\t\t\tbreak;\n\t\t\tcase \"repost\":\n\t\t\t\tdto.add(tweetMapper.toRepostDto(check));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tCollections.sort(dto, new TweetCompare());\n\t\tCollections.reverse(dto);\n\t\treturn dto;\n\t}",
"public Twitter() {\n\t\t\tuserMap = new HashMap<>();\n\t\t\tmaxFeed = 10;\n\t\t}",
"public static List<TopicBean> getRecentTopics() {\r\n\t\tDBCollection topicsColl = getCollection(TOPICS_COLLECTION);\r\n\t\t\r\n\t\tDBObject query = new BasicDBObject(\"deleted\", new BasicDBObject(\"$ne\", true));\r\n\t\t\r\n\t\tList<DBObject> topicsDBList=new ArrayList<DBObject>();//List<DBObject> topicsDBList = topicsColl.find(query).sort(new BasicDBObject(\"last_update\", -1)).toArray();\r\n\t\tDBCursor topicCur=topicsColl.find(query).sort(new BasicDBObject(\"last_update\", -1));\r\n\t\twhile(topicCur.hasNext()){\r\n\t\t\ttopicsDBList.add(topicCur.next());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tList<TopicBean> recentTopics = new ArrayList<TopicBean>();\r\n\t\tfor (DBObject topicDBObject : topicsDBList) {\r\n\t\t\tTopicBean topic = new TopicBean();\r\n\t\t\ttopic.parseBasicFromDB(topicDBObject);\r\n\t\t\ttopic.setConversations(ConversationDAO.loadConversationsByTopic(topic.getId()));\r\n\t\t\trecentTopics.add(topic);\r\n\t\t\t\r\n\t\t\tif (recentTopics.size() == 20) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn recentTopics;\r\n\t}",
"public static List<Tweets> readTweetsFromWeb(String url) throws Exception\r\n {\r\n // String USER_AGENT = \"Mozilla/5.0\";\r\n List<Tweets> tweetList = new ArrayList<>();\r\n /* ObjectMapper mapper = new ObjectMapper();\r\n URL obj = new URL(url);\r\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\r\n\r\n // optional default is GET\r\n con.setRequestMethod(\"GET\"); //establishing connection\r\n\r\n //add request header\r\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\r\n\r\n int responseCode = con.getResponseCode();\r\n\r\n BufferedReader in = new BufferedReader(\r\n new InputStreamReader(con.getInputStream()));\r\n String inputLine;\r\n\r\n\r\n StringBuffer response = new StringBuffer();\r\n\r\n while ((inputLine = in.readLine()) != null) {\r\n response.append(inputLine);\r\n }\r\n in.close();\r\n*/ StringBuffer response = new StringBuffer();\r\n ObjectMapper mapper = new ObjectMapper();\r\n try {\r\n String USER_AGENT = \"Mozilla/5.0\";\r\n\r\n URL obj = new URL(\"https://api.darksky.net/forecast/91064979649945a5465006904adb8770/30.2672,-97.7431\");\r\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\r\n\r\n // optional default is GET\r\n con.setRequestMethod(\"GET\"); //establishing connection\r\n\r\n //add request header\r\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\r\n\r\n int responseCode = con.getResponseCode();\r\n\r\n BufferedReader in = new BufferedReader(\r\n new InputStreamReader(con.getInputStream()));\r\n String inputLine;\r\n\r\n\r\n while ((inputLine = in.readLine()) != null) {\r\n response.append(inputLine);\r\n }\r\n in.close();\r\n String after = response.toString();\r\n int x=0;\r\n // JSONObject json = new JSONObject(after);\r\n // return json;\r\n\r\n }catch (MalformedURLException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } catch (JSONException e){\r\n e.printStackTrace();\r\n }\r\n return null;\r\n\r\n /* try {\r\n\r\n\r\n Tweets[] tweets = mapper.readValue(response.toString(), Tweets[].class);\r\n\r\n for(int i = 0; i<tweets.length; i++) {\r\n\r\n if(!((tweets[i].getId() > 0) && (tweets[i].getId() < Math.pow(2, 32)))) //making sure id in range\r\n {\r\n continue;\r\n }\r\n\r\n if(tweets[i].getName() == null)\r\n {\r\n continue;\r\n }\r\n\r\n if(checkName(tweets[i].getName(), i)){\r\n continue;\r\n }\r\n\r\n Date date = null;\r\n try {\r\n if(tweets[i].getDate() == null)\r\n {\r\n continue;\r\n }\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\"); //making date format\r\n date = sdf.parse(tweets[i].getDate()); //parsing into format\r\n if (!tweets[i].getDate().equals(sdf.format(date))) {\r\n date = null;\r\n }\r\n } catch (ParseException e) {\r\n e.printStackTrace();\r\n }\r\n if (date == null) {\r\n continue;\r\n }\r\n\r\n if(tweets[i].getText() == null)\r\n {\r\n continue;\r\n }\r\n\r\n if(checkLength(tweets[i].getText().length(), tweets[i].getName(), i)){\r\n continue;\r\n }\r\n\r\n // tweetList.add(tweets[i]);\r\n }\r\n\r\n\r\n\r\n\r\n }catch (UnrecognizedPropertyException e) {\r\n e.printStackTrace();\r\n } catch (JsonMappingException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return tweetList;\r\n */\r\n }",
"public static void main(String[] args) throws Exception\r\n\t{\n\t\tint\ttotalTweets = 0;\r\n FileOutputStream fout=new FileOutputStream(args[0]);\r\n PrintStream ps=new PrintStream(fout);\r\n FileOutputStream fout1=new FileOutputStream(\"location.txt\");\r\n PrintStream ps1=new PrintStream(fout1);\r\n //FileOutputStream fout=new FileOutputStream(\"result.csv\");\r\n //PrintStream ps=new PrintStream(fout);\r\n\r\n\t\t//\tThis variable is the key to our retrieving multiple blocks of tweets. In each batch of tweets we retrieve,\r\n\t\t//\twe use this variable to remember the LOWEST tweet ID. Tweet IDs are (java) longs, and they are roughly\r\n\t\t//\tsequential over time. Without setting the MaxId in the query, Twitter will always retrieve the most\r\n\t\t//\trecent tweets. Thus, to retrieve a second (or third or ...) batch of Tweets, we need to set the Max Id\r\n\t\t//\tin the query to be one less than the lowest Tweet ID we've seen already. This allows us to page backwards\r\n\t\t//\tthrough time to retrieve additional blocks of tweets\r\n\t\tlong maxID = -1;\r\n\r\n\t\tTwitter twitter = getTwitter();\r\n\r\n\t\t//\tNow do a simple search to show that the tokens work\r\n\t\ttry\r\n\t\t{\r\n\t\t\t\r\n\r\n\t\t\t//\tThis returns all the various rate limits in effect for us with the Twitter API\r\n\t\t\tMap<String, RateLimitStatus> rateLimitStatus = twitter.getRateLimitStatus(\"search\");\r\n\r\n\t\t\t//\tThis finds the rate limit specifically for doing the search API call we use in this program\r\n\t\t\tRateLimitStatus searchTweetsRateLimit = rateLimitStatus.get(\"/search/tweets\");\r\n \r\n \r\n \r\n\r\n\t\t\t//\tAlways nice to see these things when debugging code...\r\n\t\t\tSystem.out.printf(\"You have %d calls remaining out of %d, Limit resets in %d seconds\\n\",\r\n\t\t\t\t\t\t\t searchTweetsRateLimit.getRemaining(),\r\n\t\t\t\t\t\t\t searchTweetsRateLimit.getLimit(),\r\n\t\t\t\t\t\t\t searchTweetsRateLimit.getSecondsUntilReset());\r\n\r\n\r\n\t\t\t//\tThis is the loop that retrieve multiple blocks of tweets from Twitter\r\n\t\t\tfor (int queryNumber=0;queryNumber < MAX_QUERIES; queryNumber++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.printf(\"\\n\\n!!! Starting loop %d\\n\\n\", queryNumber);\r\n\r\n\t\t\t\t//\tDo we need to delay because we've already hit our rate limits?\r\n\t\t\t\tif (searchTweetsRateLimit.getRemaining() == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t//\tYes we do, unfortunately ...\r\n\t\t\t\t\tSystem.out.printf(\"!!! Sleeping for %d seconds due to rate limits\\n\", searchTweetsRateLimit.getSecondsUntilReset());\r\n\r\n\t\t\t\t\t//\tIf you sleep exactly the number of seconds, you can make your query a bit too early\r\n\t\t\t\t\t//\tand still get an error for exceeding rate limitations\r\n\t\t\t\t\t//\r\n\t\t\t\t\t// \tAdding two seconds seems to do the trick. Sadly, even just adding one second still triggers a\r\n\t\t\t\t\t//\trate limit exception more often than not. I have no idea why, and I know from a Comp Sci\r\n\t\t\t\t\t//\tstandpoint this is really bad, but just add in 2 seconds and go about your business. Or else.\r\n\t\t\t\t\tThread.sleep((searchTweetsRateLimit.getSecondsUntilReset()+2) * 1000l);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tQuery q = new Query(SEARCH_TERM);\t\t\t// Search for tweets that contains this term\r\n\t\t\t\tq.setCount(TWEETS_PER_QUERY);\t\t\t\t// How many tweets, max, to retrieve\r\n\t\t\t\tq.resultType(Query.ResultType.recent);\t\t\t\t\t\t// Get all tweets\r\n\t\t\t\tq.setLang(\"en\");\t\t\t\t\t\t\t// English language tweets, please\r\n\r\n\t\t\t\t//\tIf maxID is -1, then this is our first call and we do not want to tell Twitter what the maximum\r\n\t\t\t\t//\ttweet id is we want to retrieve. But if it is not -1, then it represents the lowest tweet ID\r\n\t\t\t\t//\twe've seen, so we want to start at it-1 (if we start at maxID, we would see the lowest tweet\r\n\t\t\t\t//\ta second time...\r\n\t\t\t\tif (maxID != -1)\r\n\t\t\t\t{\r\n\t\t\t\t\tq.setMaxId(maxID - 1);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//\tThis actually does the search on Twitter and makes the call across the network\r\n\t\t\t\tQueryResult r = twitter.search(q);\r\n\r\n\t\t\t\t//\tIf there are NO tweets in the result set, it is Twitter's way of telling us that there are no\r\n\t\t\t\t//\tmore tweets to be retrieved. Remember that Twitter's search index only contains about a week's\r\n\t\t\t\t//\tworth of tweets, and uncommon search terms can run out of week before they run out of tweets\r\n\t\t\t\tif (r.getTweets().size() == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tbreak;\t\t\t// Nothing? We must be done\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t//\tloop through all the tweets and process them. In this sample program, we just print them\r\n\t\t\t\t//\tout, but in a real application you might save them to a database, a CSV file, do some\r\n\t\t\t\t//\tanalysis on them, whatever...\r\n\t\t\t\tfor (Status s: r.getTweets())\t\t\t\t// Loop through all the tweets...\r\n\t\t\t\t{\r\n\t\t\t\t\t//\tIncrement our count of tweets retrieved\r\n\t\t\t\t\ttotalTweets++;\r\n\r\n\t\t\t\t\t//\tKeep track of the lowest tweet ID. If you do not do this, you cannot retrieve multiple\r\n\t\t\t\t\t//\tblocks of tweets...\r\n\t\t\t\t\tif (maxID == -1 || s.getId() < maxID)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaxID = s.getId();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//\tDo something with the tweet....\r\n\t\t\t\t\tSystem.out.printf(\"At %s, @%-20s said: %s\\n\",\r\n\t\t\t\t\t\t\t\t\t s.getCreatedAt().toString(),\r\n\t\t\t\t\t\t\t\t\t s.getUser().getScreenName(),\r\n\t\t\t\t\t\t\t\t\t cleanText(s.getText()));\r\n \r\n \r\n GeoLocation geoLocation = s.getGeoLocation();\r\n //Place place = s.getPlace();\r\n //String placeCountry = place.getCountry();\r\n //System.out.println(\"loc\" +placeCountry);\r\n \r\n //double latitude = geoLocation.getLatitude();\r\n //double longitude = geoLocation.getLongitude();\r\n double latitude=37.0902;\r\n double longitude=95.7129;\r\n //String userLocation = getUserLocation(String.valueOf(latitude), String.valueOf(longitude));\r\n \r\n String userLocation=\"US\"; \r\n ps.println(cleanText(s.getText()));\r\n ps1.println(userLocation);\r\n \r\n //System.out.println(\"loc\" +userLocation);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//\tAs part of what gets returned from Twitter when we make the search API call, we get an updated\r\n\t\t\t\t//\tstatus on rate limits. We save this now so at the top of the loop we can decide whether we need\r\n\t\t\t\t//\tto sleep or not before making the next call.\r\n\t\t\t\tsearchTweetsRateLimit = r.getRateLimitStatus();\r\n\t\t\t}\r\n \r\n \r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t//\tCatch all -- you're going to read the stack trace and figure out what needs to be done to fix it\r\n\t\t\tSystem.out.println(\"That didn't work well...wonder why?\");\r\n\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t}\r\n\r\n\t\tSystem.out.printf(\"\\n\\nA total of %d tweets retrieved\\n\", totalTweets);\r\n try\r\n {\r\n\t\tps.close();\r\n ps1.close();\r\n fout1.close();\r\n fout.close();\r\n }catch(Exception ee)\r\n {\r\n System.out.println(ee);\r\n }\r\n }",
"private void loadMoreData() {\n twitterClient.getNextPageOfTweets(new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Headers headers, JSON json) {\n Log.i(ACTIVITY_TAG, \"onSuccess: loadMoreData\");\n // deserialize and construct new model objects from API response\n JSONArray jsonArray = json.jsonArray;\n try {\n // append new data object tweets to existing list\n // notify adapter\n tweetsAdapter.addAll(Tweet.fromJsonArray(jsonArray));\n } catch (JSONException e) {\n Log.e(ACTIVITY_TAG, \"JSON exception: loadMoreData\", e);\n }\n }\n\n @Override\n public void onFailure(int statusCode, Headers headers, String response, Throwable throwable) {\n Log.e(ACTIVITY_TAG, \"onFailure: loadMoreData:\" + response , throwable);\n }\n }, tweets.get(tweets.size() - 1).getId());\n }",
"public Tweet getTweet() {\n\t\ttweetsIndex++;\n\t\treturn tweets.get(tweetsIndex);\n\t}",
"@Override\n public void populateTimeline() {\n long fetchMoreStart = tweets.size() > 0 ? tweets.get(tweets.size() - 1).getUid() : -1;\n client.getHomeTimeline(new JsonHttpResponseHandler() {\n // on success\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray json) {\n addAll(Tweet.fromJSONArray(json));\n }\n\n // on failure\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"DEBUG\", errorResponse.toString());\n }\n }, fetchMoreStart);\n }",
"public List<Integer> getNewsFeed(int userId) {\n if (!userId2TopTenTweets.containsKey(userId)) {\n return new ArrayList<>(0);\n }\n\n\n userId2TopTenTweets.get(userId).sort((i1, i2)->i2.getTimestamp() - i1.getTimestamp() > 0 ? 1:i2.getTimestamp() - i1.getTimestamp() == 0 ? 0 : -1);\n List<Integer> result = new ArrayList<>();\n int size = 0;\n for (Tweet tweet : userId2TopTenTweets.get(userId)) {\n result.add(tweet.id);\n size++;\n if (size == 10) {\n return result;\n }\n }\n return result;\n }",
"private int gather(QueryTargetInfo info) {\n ArrayList<TweetData> res;\n int count = 0;\n int tempCount;\n int ndx;\n boolean flag = true;\n\n info.smallestId = null;\n\n do {\n flag = true;\n res = query(info);\n\n //If there was an error getting the tweets, then don't continue.\n if (res == null) {\n flag = false;\n } else {\n //If we did not get the maximum tweets, then don't continue\n if (res.size() < (MAX_PAGES * RPP)) {\n flag = false;\n }\n\n //Save the results in the db.\n tempCount = store.insertTweets(info, res);\n\n count += tempCount;\n }\n } while (flag);\n\n return count;\n }",
"public List<Status> getTweetList(){\n\t\treturn this.tweetList;\n\t}",
"public List<Tweet> GetTweetInfo() {\n System.out.println(\"#### HomeSessionBean.GetTweetInfo ---List is being generated\");\n List<Tweet> t = em.createNamedQuery(\"Tweet.findAll\").getResultList();\n return t;\n }",
"public void sampleInvestigate ()\r\n {\r\n Query query = new Query(\"Hawker\");\r\n query.setCount(100);\r\n query.setGeoCode(new GeoLocation(1.423844, 103.776921), 5, Query.MILES);\r\n query.setSince(\"2016-12-1\");\r\n try {\r\n QueryResult result = twitter.search(query);\r\n System.out.println(\"Count : \" + result.getTweets().size()) ;\r\n for (Status tweet : result.getTweets()) {\r\n System.out.println(\"@\"+tweet.getUser().getName()+ \": \" + tweet.getText()); \r\n }\r\n } \r\n catch (TwitterException e) {\r\n e.printStackTrace();\r\n } \r\n System.out.println(); \r\n }",
"public List<TweetDto> feed(String username) {\n\t\tList<TweetDto> self = new ArrayList<>();\n\t\tfor (Tweet tweet : userRepository.findByUname(username).getTweets()) {\n\t\t\tif (tweet.isDeleted() == false){\n\t\t\t\tswitch (tweet.getType()) {\n\t\t\t\tcase \"simple\":\n\t\t\t\t\tself.add(tweetMapper.toSimpleDto(tweet));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"reply\":\n\t\t\t\t\tself.add(tweetMapper.toReplyDto(tweet));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"repost\":\n\t\t\t\t\tself.add(tweetMapper.toRepostDto(tweet));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n/* Gets their followers posts and determines if it is a new post, reply or a repost\nand sets it in the database accordingly */\n\t\tfor (User u : userRepository.findByUname(username).getFollowing()) {\n\t\t\tfor (Tweet tweet : u.getTweets()) {\n\t\t\t\tif (tweet.isDeleted() == false)\n\t\t\t\t\tif (tweet.isDeleted() == false){\n\t\t\t\t\t\tswitch (tweet.getType()) {\n\t\t\t\t\t\tcase \"simple\":\n\t\t\t\t\t\t\tself.add(tweetMapper.toSimpleDto(tweet));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"reply\":\n\t\t\t\t\t\t\tself.add(tweetMapper.toReplyDto(tweet));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"repost\":\n\t\t\t\t\t\t\tself.add(tweetMapper.toRepostDto(tweet));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tCollections.sort(self, new TweetCompare());\n\t\tCollections.reverse(self);\n\t\treturn self;\n\t}",
"public List<Kweet> getUserKweets(String username) {\n return kweetDAO.getUserKweets(username);\n }",
"public void downloadTweetsForItem(String item, int numTweets) \n\t\t\tthrows IOException, TwitterException\n\t{\n\t\t/*if (numTweets <= 0) \n\t\t{ \n\t\t\tnumTweets = Integer.MAX_VALUE; \n\t\t}*/\n\t\tFile userDir = new File(String.format(\"%s/%s\", DATA_DIR, item));\n\t\tboolean success = false;\n\t try{\n\t \t //success = userDir.mkdir();\t\n\t \t Files.createDirectory(userDir.toPath());\n\t } \n\t catch(IOException se)\n\t {\n\t \tSystem.out.println(\"****mkdir failed!!!!!!!!\");\n\t }\n\t\t\n\t\tString multiLineFile = \n\t\t\tString.format(\"%s/%s/%s_tweets.txt\", DATA_DIR, item, item);\n\t\tString singleLineFile = \n\t\t\tString.format(\"%s/%s/%s_tweets_single.txt\", DATA_DIR, item, item);\n\t\tString multiLineFileRaw = \n\t\t\t\tString.format(\"%s/%s/%s_tweets_multiRaw.txt\", DATA_DIR, item, item);\n\t\t//item = \"@\" + item;\n\t\t\n\t\tList<String> allTweets = GetAllTweets(item, numTweets);//Query(item, numTweets);\n\t\t\n\t\t// Now do some pre-processing on allTweets.\n\t\t// Topic modelling prefers text with stop words removed etc.\n\t\t List<String> filteredTweets = new ArrayList<String>();\n\n\t\t BufferedReader f = new BufferedReader(new FileReader(\"stopwords.txt\"));\n\t\t String line = f.readLine();\n\t\t List<String> stopwords = new ArrayList<String>();\n\t\t while(line != null)\n\t\t {\n\t\t\t stopwords.add(line);\n\t\t\t line = f.readLine();\n\t\t }\n\t\t f.close();\n\t\t \n\t\titem = item.toLowerCase();\n\t\tint i = 0;\n\t\twhile(i < allTweets.size())\n\t\t{\n\t\t\tString text = allTweets.get(i);\n\t\t\t\n\t\t\t// First, remove all non alphabetic characters. This removes a lot of junk! hash tags, prices, etc.\n\t\t\ttext = text.replaceAll(\"[^a-zA-Z\\\\s]\", \"\").toLowerCase();\n\t\t\t\n\t\t\t// first, get rid of our actual search term. we do not want it to come up as a topic,\n\t\t\t// as we already know that we are searching for tweets of that item\n\t\t\ttext = text.replace(item, \"\"); \n\t\t\t\n\t\t\t// Now, remove all words less than a certain length\n\t\t\ttext = text.replaceAll(\"\\\\b\\\\w{1,3}\\\\b\\\\s?\", \"\");\n\t\t\t\n\t\t\t// The DMM package doesn't do stop word removal! So I have to do this manually.\n\t\t\tfor(String word : stopwords){\n\t\t\t text = text.replace(word+\"\\\\s*\", \"\");\n\t\t\t}\n\t\t\t\n\t\t\t// Again, remove strings that are too short!\n\t\t\tif(text.length() > 14)\n\t\t\t{\n\t\t\t\tfilteredTweets.add(text);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// This string is too short, so it must get removed.\n\t\t\t\tallTweets.remove(i);\n\t\t\t\t// don't increment i, since we just deleted this one.\n\t\t\t}\n\t\t}\n\t\t// Sentiment analysis doesn't need pre-processing.\n\t\tsaveTweetsToFile(allTweets, multiLineFileRaw, true);\n\t\t\n\t\t// But our topics needs some stuff removed.\n\t\tsaveTweetsToFile(filteredTweets, multiLineFile, true);\n\t\tsaveTweetsToFile(filteredTweets, singleLineFile, false);\n\n\t}",
"@Override\n protected Void doInBackground(Void... params) {\n try {\n Query query = new Query(\"India\"); //\n\n GeoLocation location = new GeoLocation(mLastLocation.getLatitude(), mLastLocation.getLongitude()); //latitude, longitude\n\n query.setGeoCode(location, 1, Query.MILES); //location, radius, unit\n query.setSinceId(latestTweetId);\n QueryResult result;\n\n do {\n result = twitter.search(query);\n\n\n for (twitter4j.Status tweet : result.getTweets()) {\n\n if(tweet.getGeoLocation()!=null){\n\n newTweets.add(tweet);\n long id = tweet.getId();\n\n if(id>latestTweetId){\n\n latestTweetId = id;\n }\n\n }\n\n System.out.println(\"@\" + tweet.getUser().getScreenName() + \" - \" + tweet.getText());\n }\n\n } while ((query = result.nextQuery()) != null);\n\n } catch (TwitterException te) {\n System.out.println(\"Failed to search tweets: \" + te.getMessage());\n }\n return null;\n }",
"public List<Kweet> getMentionKweets(String username) {\n return kweetDAO.getMentionKweets(username);\n }",
"public List<Integer> getNewsFeed(int userId) {\n List<Integer> tmp = twitterTweetMap.getOrDefault(userId, new LinkedList<>());\n return tmp.size() <= 10 ? tmp : tmp.subList(0,10);\n }",
"@GetMapping(value = \"/stream/tweets\", produces = MediaType.TEXT_EVENT_STREAM_VALUE)\n\tpublic Flux<Tweet> streamAllTweets() {\n\t\treturn tweetRepository.findAll();\n\t}",
"public List<Integer> getNewsFeed(int userId) {\n\t\t\tint resultSize = 10;\n\t\t\tList<Integer> result = new ArrayList<>(resultSize);\n\t\t\tSet<Integer> followees = getFollowees(userId);\n\t\t\tint count = 0;\n\t\t\tfor (int i = tweets.size() - 1; i >= 0; i--) {\n\t\t\t\tif (count == resultSize)\n\t\t\t\t\tbreak;\n\t\t\t\tint tweet = tweets.get(i);\n\t\t\t\tint owner = tweetOwner.get(tweet);\n\t\t\t\tif (owner == userId || followees.contains(owner)) {\n\t\t\t\t\tresult.add(tweet);\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}",
"public CompletableFuture<List<Details>> reduceTweets(CompletableFuture<List<Details>> cfOriginalTweetData) {\n CompletableFuture<List<Details>> cfReducedTweets=null;\n\n cfReducedTweets= CompletableFuture.supplyAsync(() ->{\n List<Details> reducedTweetList=null;\n try{\n reducedTweetList= cfOriginalTweetData.get().stream()\n .limit(10).collect(Collectors.toList());\n }\n catch (Exception e){\n e.printStackTrace();\n }\n return reducedTweetList;\n });\n\n return cfReducedTweets;\n }",
"public static List<Status> getFeed() throws TwitterException {\n\t\tTwitter twitter = TwitterFactory.getSingleton();\n\t\tPaging paging = new Paging(1,100);\n\t\tList<Status> statuses = twitter.getHomeTimeline(paging);\n\t\treturn statuses;\n\t}",
"@Override\n public int getItemCount() {\n return tweets.size();\n }",
"@SuppressWarnings(\"unused\")\r\n private void getTweetsByHashtag(String hashtag) throws TwitterException {\n System.out.println(\"100 tweets with #\" + hashtag + \":\");\r\n Query query = new Query(hashtag);\r\n query.count(100);\r\n QueryResult result = twitter.search(query);\r\n for (Status status : result.getTweets()) {\r\n printStatus(status);\r\n }\r\n }",
"@SuppressWarnings({\"SleepWhileInLoop\", \"LoggerStringConcat\"})\n public static void main(String[] args) throws TwitterException, InterruptedException {\n ConfigurationBuilder cb = new ConfigurationBuilder();\n cb.setJSONStoreEnabled(true);\n TwitterFactory twitterFactory = new TwitterFactory(cb.build()); // The factory instance is re-useable and thread safe.\n Twitter twitter = twitterFactory.getInstance();\n\n // Set Twitter API keys.\n Properties twitterApiKeysProp = getProperties(Constants.AppConstants.TWITTER_PROP_FILE_NAME);\n AccessToken accessToken = new AccessToken(\n twitterApiKeysProp.getProperty(Constants.TwitterAPIConstants.ACCESS_TOKEN_KEY),\n twitterApiKeysProp.getProperty(Constants.TwitterAPIConstants.ACCESS_TOKEN_SECRET));\n twitter.setOAuthConsumer(\n twitterApiKeysProp.getProperty(Constants.TwitterAPIConstants.CONSUMER_KEY),\n twitterApiKeysProp.getProperty(Constants.TwitterAPIConstants.CONSUMER_SECRET));\n twitter.setOAuthAccessToken(accessToken);\n\n // Connect Database\n Properties appProp = getProperties(Constants.AppConstants.APPLICATION_PROP_FILE_NAME);\n MongoClient mongo = new MongoClient(\n appProp.getProperty(Constants.AppConstants.HOST),\n Integer.parseInt(appProp.getProperty(Constants.AppConstants.PORT)));\n MongoDatabase db = mongo.getDatabase(appProp.getProperty(Constants.AppConstants.DATABASE));\n MongoCollection<Document> collection = db.getCollection(\n appProp.getProperty(Constants.AppConstants.COLLECTION));\n\n // Set query properties to pass it to Twitter Search API\n Query query = new Query(appProp.getProperty(Constants.AppConstants.QUERY));\n query.setLang(Constants.AppConstants.LANG);\n query.setSince(appProp.getProperty(Constants.AppConstants.SINCE));\n query.setUntil(appProp.getProperty(Constants.AppConstants.UNTIL));\n Long maxId = Long.parseLong(appProp.getProperty(Constants.AppConstants.MAX_ID)) - 1;\n if (maxId > 0) {\n query.setMaxId(maxId);\n LOGGER.log(Level.INFO, \"Max Id set: \" + maxId);\n }\n LOGGER.log(Level.INFO, \"Query: {0}\", query.getQuery());\n\n QueryResult result = twitter.search(query);\n\n // In one try, only limited number of tweets are retrieved. So\n // keep retrying until all tweets are received.\n while (!result.getTweets().isEmpty()) {\n Long minId = Long.MAX_VALUE;\n Document document;\n for (Status status : result.getTweets()) {\n document = Document.parse(TwitterObjectFactory.getRawJSON(status));\n collection.insertOne(document);\n if (status.getId() < minId) {\n minId = status.getId();\n }\n LOGGER.log(Level.INFO, \"Id: \" + status.getId());\n }\n query.setMaxId(minId - 1);\n try {\n result = searchWithRetry(twitter, query);\n } catch (TwitterException ex) {\n LOGGER.log(Level.SEVERE, ex.getErrorMessage(), ex);\n LOGGER.log(Level.INFO, \"Thread is sleeping for 15 minutes. \"\n + \"Application will retry to make an API call after 15 minutes.\");\n Thread.sleep(15 * 60 * 1000); // sleep for 15 minutes\n result = searchWithRetry(twitter, query);\n }\n }\n }",
"public CompletableFuture<List<Status>> getUserTimeline(String screenName){\n CompletableFuture<List<Status>> userTimeline= null;\n\n try {\n userTimeline=CompletableFuture.supplyAsync(() -> {\n List<Status> temp=null;\n try{\n temp=twitter.getUserTimeline(screenName).stream().limit(10).collect(Collectors.toList());\n }\n catch (Exception e){\n e.printStackTrace();\n }\n return temp;\n });\n return userTimeline;\n }\n catch (Exception e){\n e.printStackTrace();\n }\n\n return userTimeline;\n }",
"public List<Integer> getNewsFeed(int userId) {\n Set<Integer> friendSet = friends.computeIfAbsent(userId, e -> new HashSet<>());\n\n List<Integer> result = new ArrayList<>();\n\n result.addAll(userToTwitter.computeIfAbsent(userId, e -> new LinkedList<>()));\n for (int uid : friendSet) {\n result.addAll(userToTwitter.computeIfAbsent(uid, e -> new LinkedList<>()));\n }\n\n result.sort(Comparator.comparingInt(tweets::get).reversed());\n\n return result.size() > 10 ? result.subList(0, 10) : result;\n }",
"@PostMapping(\"/timeline\")\n\tpublic List<tweets> timelineList() {\n\n\t\tList<Tweet> timeline = twitter.timelineOperations().getHomeTimeline();\n\t\tfor (Tweet tweet : timeline) {\n\t\t\ttweets objTweets = new tweets(0, tweet.getText(), tweet.getProfileImageUrl(), tweet.getFromUser());\n\t\t\tservice.saveTweets(objTweets);\n\t\t}\n\t\tList<tweets> home = service.listAll();\n\t\treturn home;\n\t}",
"public List<Integer> getNewsFeed(int userId) {\n ArrayList<Tweet> feeds = new ArrayList<>();\n\n User user = getOrCreateUser(userId);\n feeds.addAll(user.myTweets);\n for (User followee : user.following) {\n feeds.addAll(followee.myTweets);\n }\n\n feeds.sort(new Comparator<Tweet>() {\n @Override\n public int compare(Tweet o1, Tweet o2) {\n return o2.counter - o1.counter;\n }\n });\n\n ArrayList<Integer> rlt = new ArrayList<>();\n\n for (Tweet tweet : feeds) {\n rlt.add(tweet.id);\n }\n\n if (rlt.size() > 10)\n return rlt.subList(0, 10);\n\n return rlt;\n }",
"private void getTweetsMostCommonHashTag() {\r\n final List<Entry<String, Integer>> list = \r\n getCommonList(countHashtags, countHashtags.size());\r\n list.stream()\r\n .filter(entry -> !searched.contains(entry.getKey().toLowerCase()))\r\n .limit(1)\r\n .forEach(entry -> getTweets(entry.getKey(), geocode, getAuth()));\r\n }",
"@Path(\"tweets/{query}\")\r\n @GET\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public Response getTweets(@PathParam(\"query\") final String query)\r\n {\r\n log.debug(\"GET: getTweets\");\r\n\r\n if (store == null)\r\n {\r\n initializeStore();\r\n }\r\n\r\n final List<Tweet> tweets = store.getTweets(query);\r\n final TweetList list = new TweetList();\r\n list.setTweets(tweets);\r\n return Response.ok(list).build();\r\n }",
"@Override\n public int getItemCount() {\n return tweetList.size();\n }",
"public static void main(String[] args) throws TwitterException, IOException {\n\t\tfinal long count = 10;\n\n\t\t// Twitter Conf.\n\t\tConfigurationBuilder cb = new ConfigurationBuilder();\n\t\tcb.setDebugEnabled(true).setOAuthConsumerKey(CONSUMER_KEY)\n\t\t\t\t.setOAuthConsumerSecret(CONSUMER_SECRET)\n\t\t\t\t.setOAuthAccessToken(ACCESS_KEY)\n\t\t\t\t.setOAuthAccessTokenSecret(ACCESS_SECRET);\n\n\t\tfinal TwitterStream twitterStream = new TwitterStreamFactory(cb.build())\n\t\t\t\t.getInstance();\n\n\t\tStatusListener listener = new StatusListener() {\n\t\t\tprivate long counter = 0;\n\n\t\t\t@Override\n\t\t\tpublic void onStatus(Status status) {\n//\t\t\t\tSystem.out.println(status.getUser().getName());\n//\t\t\t\twriter.println(TwitterObjectFactory.getRawJSON(status)+\",\");\n\t\t\t\tTweet tweet = new Tweet(status);\n\t\t\t\ttry {\n\t\t\t\t\tHBaseHelper.put(tweet);\n\t\t\t\t} catch (IOException | JSONException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcounter++;\n\t\t\t\tSystem.out.println(counter);\n//\t\t\t\tif (counter >= count) {\n//\t\t\t\t\ttwitterStream.shutdown();\n//\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onDeletionNotice(\n\t\t\t\t\tStatusDeletionNotice statusDeletionNotice) {\n\t\t\t\t// System.out.println(statusDeletionNotice.toString());\n\t\t\t\t// System.out.println(\"Got a status deletion notice id:\" +\n\t\t\t\t// statusDeletionNotice.getStatusId());\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onTrackLimitationNotice(int numberOfLimitedStatuses) {\n\t\t\t\tSystem.out.println(\"Got track limitation notice:\"\n\t\t\t\t\t\t+ numberOfLimitedStatuses);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onScrubGeo(long userId, long upToStatusId) {\n\t\t\t\tSystem.out.println(\"Got scrub_geo event userId:\" + userId\n\t\t\t\t\t\t+ \" upToStatusId:\" + upToStatusId);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onStallWarning(StallWarning warning) {\n\t\t\t\tSystem.out.println(\"Got stall warning:\" + warning);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onException(Exception ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t};\n\t\ttwitterStream.addListener(listener);\n\t\tFilterQuery fq = new FilterQuery();\n\t\tString keywords[] = { \"#nosql\" };\n\t\tfq.track(keywords);\n\n\t\ttwitterStream.sample();\n\t}",
"public String getRetweet() {\n\t\treturn restClient.getReTweets();\n\t}",
"public long getLastTweetId() {\n return tweetAdapter.getItem(tweetAdapter.getCount()-1).getTweetId();\n }",
"public List<Integer> getNewsFeed(int userId) {\n\t\t//minHeap the top is the old tweet, which maybe remove from the list\n\t\tPriorityQueue<Tweet> minHeap = new PriorityQueue<>(new Comparator<Tweet>(){\n\t\t\t@Override\n\t\t\tpublic int compare(Tweet t1, Tweet t2) {\n\t\t\t\treturn t1.timePosted - t2.timePosted;\n\t\t\t}\n\t\t});\n\t\t// get my followee Set\n\t\tSet<Integer> myFollowees = followees.get(userId);\n\t\tif (myFollowees != null) {\n\t\t\tfor (Integer followeeId : myFollowees) {\n\t\t\t\t//get the tweets of them\n\t\t\t\tList<Tweet> followeeTweets = tweets.get(followeeId);\n\t\t\t\tif (followeeTweets != null) {\n\t\t\t\t\tfor (Tweet tweet : followeeTweets) {\n\t\t\t\t\t\tif (minHeap.size() < feedMaxNum) {\n\t\t\t\t\t\t\tminHeap.offer(tweet);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t//if it is older than the oldest one in the heap just discard\n\t\t\t\t\t\t\tif (tweet.timePosted <= minHeap.peek().timePosted) break;\n\t\t\t\t\t\t\tminHeap.offer(tweet);\n\t\t\t\t\t\t\tminHeap.poll();\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\tList<Integer> myFeed = new LinkedList<>();\n\t\twhile (!minHeap.isEmpty()) {\n\t\t\tmyFeed.add(0, minHeap.poll().tweetId);\n\t\t}\n\t\treturn myFeed;\n\t}",
"public Tweet getTweet(int idx) {\n return tweets.get(idx);\n }",
"public void onRequestMore() {\n buildTimeline(getLastTweetId() - 1, NO_SINCE_ID);\n }",
"public static void main(String[] args) {\r\n\r\n int sID=Integer.parseInt(args[0]);\r\n\r\n ConfigurationBuilder cb = new ConfigurationBuilder();\r\n cb.setDebugEnabled(true)\r\n .setOAuthConsumerKey(\"xJBKzaqxQiiV4EEkq2kamDopn\")\r\n .setOAuthConsumerSecret(\"cubJVmCSlbSGrdDNLlSM2P2P9YZF2FtIt3mh7izZKaHcFycJVz\")\r\n .setOAuthAccessToken(\"3229045309-QXL281PQ5SwwnLq2Myf8qYjZkP2NNy6lj0ottAI\")\r\n .setOAuthAccessTokenSecret(\"tzZtMyu3RYlQFUXiBoLbNfOxhaXz0yVKSVumEqv33SMqs\")\r\n .setHttpConnectionTimeout(100000)\r\n .setDebugEnabled(true);\r\n TwitterFactory tf = new TwitterFactory(cb.build());\r\n Twitter twitter = tf.getInstance();\r\n\r\n int tweetSaved = 0;\r\n long tweetID = Long.MAX_VALUE;\r\n\r\n Scanner scanner = null;\r\n try {\r\n scanner = new Scanner(new File(\"input.txt\"));\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n int totalTweetNeed = 10000;\r\n ArrayList<Status> tweets = new ArrayList<Status>();\r\n\r\n int sourceID = 1;\r\n String line = null;\r\n\r\n for (int i = 0; i < sourceID; i++) {\r\n\r\n line = scanner.nextLine();\r\n }\r\n // process the line\r\n System.out.println(\"From: \" + line + \" lang: en\");\r\n String source = \"from:\" + line + \" lang:en\";\r\n // Query is to set the source\r\n Query query = new Query(source);\r\n // set the starting search date\r\n query.setSince(\"2020-02-21\");\r\n // set the ending search date\r\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n Date todaysDate = new Date();\r\n String testDateString = formatter.format(todaysDate);\r\n System.out.println(\"String in yyy-MM-dd format is: \" + testDateString);\r\n query.setUntil(testDateString);\r\n CSVWriter writer = null;\r\n try {\r\n File directory = new File(\".\");\r\n writer = new CSVWriter(new FileWriter(directory + \"/newlyCrawled.csv\",true));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n while (tweets.size() < totalTweetNeed) {\r\n if (totalTweetNeed - tweetSaved > 100) {\r\n //Maximum each query is 100\r\n query.setCount(100);\r\n }\r\n else{\r\n query.setCount(totalTweetNeed - tweetSaved);\r\n }\r\n\r\n\r\n// query.setCount(1);\r\n QueryResult result = null;\r\n try {\r\n result = twitter.search(query);\r\n RateLimitStatus status = result.getRateLimitStatus();\r\n if (status.getRemaining() == 0) {\r\n try {\r\n Thread.sleep(status.getSecondsUntilReset() * 1000);\r\n } catch (InterruptedException e) {\r\n // ...\r\n }\r\n } else {\r\n tweets.addAll(result.getTweets());\r\n// File file = new File(\"output.txt\");\r\n// try (FileWriter fw = new FileWriter(file, true)) {\r\n// PrintWriter pw = new PrintWriter(fw, true);\r\n //Instantiating the CSVWriter class\r\n //Writing data to a csv file\r\n// String header[] = {\"user id\",\t\"tweets\" ,\"content\",\"created on\",\"tweets id\"};\r\n //Writing data to the csv file\r\n// writer.writeNext(header);\r\n\r\n\r\n for (Status status2 : result.getTweets()) {\r\n Date date = status2.getCreatedAt();\r\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\r\n String strDate = dateFormat.format(date);\r\n String tweetsID=Long.toString(status2.getId());\r\n String data[] ={status2.getUser().getScreenName() , status2.getText(), strDate, tweetsID};\r\n //Writing data to the csv file\r\n writer.writeNext(data);\r\n writer.flush();\r\n\r\n// pw.println(\"@\" + status2.getUser().getScreenName() + \":\" + status2.getText());\r\n// pw.println(\"Create on: \" + status2.getCreatedAt() + \" - ID: \" + status2.getId());\r\n if (status2.getId() < tweetID)\r\n tweetID = status2.getId();\r\n }\r\n //Flushing data from writer to file\r\n writer.flush();\r\n System.out.println(\"Data entered\");\r\n System.out.println(\"No. of tweets stored: \" + tweets.size());\r\n System.out.println(\"remaining left: \" + status.getRemaining());\r\n// } catch (IOException e) {\r\n// e.printStackTrace();\r\n// }write\r\n query.setMaxId(tweetID-1);\r\n\r\n }\r\n } catch (TwitterException e) {\r\n\r\n e.printStackTrace();\r\n System.out.println(\"Twitter API Limit reached\");\r\n new Thread(\"App-exit\") {\r\n @Override\r\n public void run() {\r\n System.exit(0);\r\n }\r\n }.start();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n System.out.println(\"Data Crawled Successfully\");\r\n\r\n try {\r\n writer.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n new Thread(\"App-exit\") {\r\n @Override\r\n public void run() {\r\n System.exit(0);\r\n }\r\n }.start();\r\n }",
"public String[] findUserTwitterId(String name, TweetsIndexManager tim) throws IOException {\r\n // Initialize a new Tweets index builder for the index of the all tweets\r\n \r\n String[] name_ary = name.split(\" \");\r\n \r\n\r\n ArrayList<String> fieldValues = new ArrayList<String>();\r\n // Search user that match name + surname\r\n fieldValues.add((name_ary[0] + \" \" + name_ary[1]).toLowerCase());\r\n // Search user that match surname + name\r\n fieldValues.add((name_ary[1] + \" \" + name_ary[0]).toLowerCase());\r\n \r\n ArrayList<Document> results = tim.searchForField(\"name\", fieldValues, 10000);\r\n \r\n // Variable that will mantain the max number of followers among the users found\r\n int max = 0;\r\n // User id related to the max\r\n String id = \"\";\r\n \r\n // For each document found \r\n for (Document doc : results) {\r\n // check if the user that made it has the more influencer of our actual max\r\n if (Integer.parseInt(doc.get(\"followers\")) >= max) {\r\n // And in case take it as new max\r\n max = Integer.parseInt(doc.get(\"followers\"));\r\n id = doc.get(\"screenName\");\r\n }\r\n }\r\n // Return the max\r\n String[] result = {id, new Integer(max).toString()};\r\n return result;\r\n }",
"public static void getUserTimeline(String user, Classifier classifier, HttpServletResponse response, int pagenum, int countnum) throws IOException {\n\t\tresponse.setContentType(\"application/json\");\n\t\tPrintWriter out = response.getWriter();\n Twitter twitter = new TwitterFactory().getInstance();\n try {\n List<Status> statuses;\n Paging page = new Paging(pagenum, countnum);\n statuses = twitter.getUserTimeline(user, page);\n String responseObject = \"{\\\"user\\\":\\\"\"+user+\"\\\",\\\"tweets\\\":[\";\n for (Status status : statuses) {\n // System.out.println(\"@\" + status.getUser().getScreenName() + \" - \" + status.getText());\n \t\n if (status.getText().length() >= 50) {\n \tString tweet = status.getText();\n \t\ttry {\n \t\t\ttweet = \"1 personal \"+tweet;\n \t\t\tresponseObject += \"{\\\"\"+status.getId()+\"\\\": {\\\"datetime\\\":\\\"\" + status.getCreatedAt().toString() + \"\\\",\";\n \t\t\tresponseObject += \"\\\"classification\\\":\"+printLabelings(classifier, tweet, out) + \"}},\";\n \t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n \t\t\t\t\n \t\t } else {\n \t\t\t\t// out.print(\"Please enter at least 50 characters for the tweet content.\");\n \t\t \t// TWEET CONTENT NOT LONG ENOUGH\n \t\t\t}\n }\n responseObject = responseObject.substring(0, responseObject.length()-1);\n out.print(responseObject + \"]}\");\n } catch (TwitterException te) {\n te.printStackTrace();\n System.out.println(\"Failed to get timeline: \" + te.getMessage());\n System.exit(-1);\n }\n }",
"public Twitter() {\r\n\t\t\ttweet = new HashMap<Integer, List<twi>>(100);\r\n\t\t\tfollower = new HashMap<Integer, List<Integer>>(100);\r\n\t\t\ttimeStamp = 0;\r\n\t\t}",
"public List<TwitterData> getValidatedTweets() {\n return new ArrayList<>();\n }",
"public List<Integer> getNewsFeed(int userId) {\n if (!followees.containsKey(userId)) {\n followees.put(userId, new HashSet<>());\n followees.get(userId).add(userId);\n }\n List<Integer> result = new ArrayList<>();\n for (int i = tweetList.size() - 1; i >= 0; i--) {\n if (followees.get(userId).contains(tweetList.get(i).userId))\n result.add(tweetList.get(i).tweetId);\n if (result.size() == 10)\n break;\n }\n return result;\n }",
"public List<Integer> getNewsFeed(int userId) {\n List<Integer> res = new ArrayList<Integer>();\n if (!followMap.containsKey(userId)) return res;\n PriorityQueue<Tweet> pq = new PriorityQueue<Tweet>(10000, new Comparator<Tweet>() {\n @Override\n public int compare(final Tweet t1, final Tweet t2) {\n return t2.ts - t1.ts;\n }\n });\n for (int followee : followMap.get(userId)) {\n if (!tweetMap.containsKey(followee) || tweetMap.get(followee).size()==0) continue;\n for (Tweet tweet : tweetMap.get(followee)) pq.add(tweet);\n }\n while (pq.size() > 0 && res.size() < 10) res.add(pq.poll().id);\n return res;\n }",
"public static List<Tweet> getTweetList(List<TweetWithUser> tweetWithUsers) {\n List<Tweet> tweets = new ArrayList<>();\n for (int i = 0; i < tweetWithUsers.size(); i++) {\n Tweet tweet = tweetWithUsers.get(i).tweet;\n tweet.user = tweetWithUsers.get(i).user;\n tweets.add(tweet);\n }\n return tweets;\n }",
"public List<Integer> getNewsFeed(int userId) {\n List<Integer> res = new ArrayList<>();\n PriorityQueue<Tweet> queue = new PriorityQueue<Tweet>((t1, t2) -> t2.ts - t1.ts);\n User u = u_map.get(userId);\n if(u == null) return res;\n u.followed.forEach(followeeId->{\n Tweet head = u_map.get(followeeId).head;\n if(head != null){\n queue.offer(head);\n }\n });\n \n while(res.size() < 10 && !queue.isEmpty()){\n Tweet t = queue.poll();\n res.add(t.id);\n if(t.next != null) queue.offer(t.next);\n }\n return res;\n }",
"long getLastFetchTimeMs();",
"@RequestMapping(\"/comment/gettweet\")\n @CrossOrigin\n String gettweet(@RequestParam int count);",
"public List<Integer> getNewsFeed(int userId) {\n User target = null;\n for (User user : users) {\n if (user.id == userId) {\n target = user;\n }\n }\n if (target == null) {\n return null;\n }\n List<Tweet> tweets = new ArrayList<>(target.tweetList);\n for (User follower : target.followers) {\n tweets.addAll(follower.tweetList);\n }\n tweets.sort((o1, o2) -> o2.publishTime - o1.publishTime);\n while (tweets.size() > 10) {\n tweets.remove(tweets.size() - 1);\n }\n List<Integer> list = new ArrayList<>();\n for (Tweet tweet : tweets) {\n list.add(tweet.Id);\n }\n return list;\n }",
"List<Tweet> findAllByOrderByCreatedAtDesc();",
"public List<Kweet> getTopicKweets(String topic) {\n return kweetDAO.getTopicKweets(topic);\n }",
"@Path(\"clear\")\r\n @GET\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public Response clearTweets()\r\n {\r\n log.debug(\"GET: clearTweets\");\r\n if (store == null)\r\n {\r\n initializeStore();\r\n }\r\n store.empty();\r\n return Response.ok().build();\r\n }",
"TwitterResourceProvider(final IndexableTweets indexableTweets) throws IOException {\r\n tweets = new Stack<>();\r\n clones = indexableTweets.getClones();\r\n TwitterTemplate twitterTemplate = new TwitterTemplate( //\r\n indexableTweets.getConsumerKey(), //\r\n indexableTweets.getConsumerSecret(), //\r\n indexableTweets.getToken(), //\r\n indexableTweets.getTokenSecret());\r\n StreamingOperations streamingOperations = twitterTemplate.streamingOperations();\r\n StreamListener streamListener = new StreamListener() {\r\n\r\n final AtomicInteger counter = new AtomicInteger();\r\n final AtomicInteger deleted = new AtomicInteger();\r\n\r\n @Override\r\n public void onTweet(final Tweet tweet) {\r\n if (tweets.size() < 10000) {\r\n tweets.push(tweet);\r\n }\r\n if (counter.incrementAndGet() % 1000 == 0) {\r\n logger.info(\"Tweets received : \" + counter.get() + \", tweet cache : \" + tweets.size() + \", tweet : \" + ToStringBuilder.reflectionToString(tweet));\r\n }\r\n }\r\n\r\n @Override\r\n public void onDelete(final StreamDeleteEvent streamDeleteEvent) {\r\n if (deleted.incrementAndGet() % 1000 == 0) {\r\n logger.info(\"Deleted : \" + deleted.get() + \", event : \" + ToStringBuilder.reflectionToString(streamDeleteEvent));\r\n }\r\n }\r\n\r\n @Override\r\n public void onLimit(final int i) {\r\n logger.info(\"Limit : \" + i);\r\n }\r\n\r\n @Override\r\n public void onWarning(final StreamWarningEvent streamWarningEvent) {\r\n logger.info(\"Warning : \" + streamWarningEvent);\r\n }\r\n };\r\n List<StreamListener> listeners = Collections.singletonList(streamListener);\r\n stream = streamingOperations.sample(listeners);\r\n }",
"public Twitter() {\n size = 0;\n users = new ArrayList<>();\n }",
"public void loadNextDataFromApi(int offset) {\n client.getMoreMentionsTimeline(maxId, new JsonHttpResponseHandler(){\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n\n for (int i = 0; i < response.length(); i++){\n //get json object in the position index\n //create a tweet object with json object\n //add the tweet object to the arraylist of tweets\n //notify changes to adapter\n Tweet tweet = null;\n try {\n tweet = Tweet.fromJson(response.getJSONObject(i));\n tweets.add(tweet);\n adapter.notifyItemInserted(tweets.size() - 1);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if (tweet.uid < maxId){\n maxId = tweet.uid;\n Log.d(\"MaxId\", String.valueOf(maxId));\n }\n\n }\n }\n });\n\n }",
"public Twitter() {\n\t\t\ttweets = new ArrayList<>();\n\t\t\tuserTweets = new HashMap<>();\n\t\t\ttweetOwner = new HashMap<>();\n\t\t\tuserRelation = new HashMap<>();\n\t\t}",
"public List<TwitterUser> getAllUsers(String table) {\n // Lista que almacenara el resultado\n List<TwitterUser> twitterUserList = new ArrayList<TwitterUser>();\n //hacemos una query porque queremos devolver un cursor\n\n String query = (table.equals(MyDBHelper.TABLE_UNFOLLOWERS)) ? \"select * from \" + table\n : \"select * from \" + table + \" order by \" + MyDBHelper.COLUMN_ORDER + \" asc \";\n\n Cursor cursor = database.rawQuery(query, null);\n\n if (cursor.moveToFirst()) {\n while (!cursor.isAfterLast()) {\n TwitterUser user = new TwitterUser(cursor.getLong(0), cursor.getString(1),\n cursor.getString(2), cursor.getString(3));\n\n twitterUserList.add(user);\n cursor.moveToNext();\n }\n }\n\n cursor.close();\n // Una vez obtenidos todos los datos y cerrado el cursor, devolvemos la\n // lista.\n return twitterUserList;\n }",
"private void printRetweets(long statusId) throws TwitterException {\r\n List<Status> list = twitter.getRetweets(statusId);\r\n for (int i = 0; i < list.size(); i++) {\r\n System.out.println(\"##### This retweet was found over the twitter search api! #####\");\r\n printStatus(list.get(i));\r\n }\r\n }",
"public List<String> trendsAvailable() {\r\n\t\tList<String> twitterResponseList = new ArrayList<String>();\r\n\t\ttry {\r\n\t\t\tProperties properties = getProperties();\r\n\t\t\tString apiUrl = properties.getProperty(\"twitter.api.trends.available\");\r\n\r\n\t\t\tHttpResponse apiResponse = executeHttpGet(apiUrl);\r\n\r\n\t\t\tif (200 == apiResponse.getStatusLine().getStatusCode()) {\r\n\t\t\t\tJSONArray jsonArray = new JSONArray(EntityUtils.toString(apiResponse.getEntity()));\r\n\t\t\t\tfor (int i = 1; i < jsonArray.length() && i <= 10; i++) {\r\n\t\t\t\t\tJSONObject object = (JSONObject) jsonArray.get(i);\r\n\t\t\t\t\tString displayText = (String) object.get(\"country\") + \" : \" + (String) object.get(\"url\");\r\n\t\t\t\t\ttwitterResponseList.add(displayText);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn twitterResponseList;\r\n\t}",
"public static void main(String[] args) {\n Tweet tweet1 = new Tweet(\n \"@TheAdamFields\",\n \"I'm learning #spring development with @craigsdennis...\",\n new Date(1502769600000L)\n );\n\n Tweet tweet2 = new Tweet(\n \"@TheAdamFields\",\n \"I'm learning #android development with @craigsdennis...\",\n new Date(1502856000000L)\n );\n\n // Create an array of tweets in reverse order, then sort\n Tweet[] tweets = {tweet2, tweet1};\n Arrays.sort(tweets);\n\n // Save the tweets to a .ser file\n TweetList.save(tweets);\n\n // Load tweets from the file\n Tweet[] loadedTweets = TweetList.load();\n\n for (Tweet tweet : loadedTweets) {\n System.out.println(tweet);\n }\n\n Set<String> allHashTags = new HashSet<>();\n Set<String> allMentions = new HashSet<>();\n\n for (Tweet tweet : tweets) {\n allHashTags.addAll(tweet.getHashTags());\n allMentions.addAll(tweet.getMentions());\n }\n\n System.out.printf(\"Hashtags: %s %n\", allHashTags);\n System.out.printf(\"Mentions: %s %n\", allMentions);\n\n Map<String, Integer> hashTagCounts = new HashMap<>();\n\n for (Tweet tweet : tweets) {\n for (String hashTag : tweet.getHashTags()) {\n Integer count = hashTagCounts.get(hashTag);\n\n if (count == null) {\n count = 0;\n }\n\n count++;\n hashTagCounts.put(hashTag, count);\n }\n }\n\n System.out.printf(\"Hashtag Counts: %s %n\", hashTagCounts);\n\n Map<String, List<Tweet>> tweetsByAuthor = new HashMap<>();\n\n for (Tweet tweet : tweets) {\n List<Tweet> authoredTweets = tweetsByAuthor.get(tweet.getAuthor());\n\n if (authoredTweets == null) {\n authoredTweets = new ArrayList<>();\n tweetsByAuthor.put(tweet.getAuthor(), authoredTweets);\n }\n\n authoredTweets.add(tweet);\n }\n\n System.out.printf(\"Tweets by author: %s %n\", tweetsByAuthor);\n }",
"List<String> searchTweets(String keywords) throws TwitterException;",
"public List<Entry> show10MostRecentEntries() {\n\t\tList<Entry> subList;\n\t\tif (entries.isEmpty()){\n\t\t\tSystem.out.println(\"The blog doesn't have any entries yet\");\n\t\t\treturn entries.getList();\n\t\t}\n\t\telse {\n\t\t\tif (entries.getSize()>= 10){\n\t\t\t\tsubList= entries.getSubList(0,10);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubList= entries.getSubList(0,entries.getSize());\n\t\t\t}\n\t\t\tIterator<Entry> it = subList.listIterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tEntry entry = it.next();\n\t\t\t\tSystem.out.println(\"Entry Title: \" + entry.getTitle());\n\t\t\t\tSystem.out.println(\"Entry Content: \" + entry.getContent());\n\t\t\t}\n\t\t\t\n\t\t\treturn subList;\n\t\t}\n\t}",
"public static Set<String> getMentionedUsers(List<Tweet> tweets) {\n\n// throw new RuntimeException(\"not implemented\");\n Set<String> anSet = new HashSet<>();\n Pattern pattern=Pattern.compile(\"@[a-zA-Z]{1,}\");\n Matcher matcher=pattern.matcher(tweets.get(0).getText());\n\n return anSet;\n }",
"public void getFavoritesTimeline(Long uid, Long since, Long max, AsyncHttpResponseHandler handler) {\n if (uid == null) {\n Log.i(\"DEBUG\", \"Invalid user id...\");\n return;\n }\n String apiUrl = getApiUrl(\"favorites/list.json\");\n // Specify params\n RequestParams params = new RequestParams();\n params.put(\"user_id\", uid);\n params.put(\"count\", 25);\n if (since != null) {\n params.put(\"since_id\", since);\n } else if (max != null) {\n params.put(\"max_id\", max);\n }\n // Execute the request\n getClient().get(apiUrl, params, handler);\n }",
"private void updateCommon(List<Status> tweetsList) {\r\n numberOfTweets += tweetsList.size();\r\n \r\n tweetsList.stream().forEach(tweet -> {\r\n final HashtagEntity[] hashtags = tweet.getHashtagEntities();\r\n for (HashtagEntity hashtag : hashtags) {\r\n final String text = hashtag.getText().toLowerCase();\r\n if (!countHashtags.containsKey(text)) {\r\n countHashtags.put(text, 0);\r\n }\r\n countHashtags.put(text, countHashtags.get(text) + 1);\r\n }\r\n \r\n final String[] words = tweet.getText().split(\" \");\r\n for (String word : words) {\r\n word = word.toLowerCase();\r\n if (!wordsFilter.contains(word)) {\r\n if (!countWords.containsKey(word)) {\r\n countWords.put(word, 0);\r\n }\r\n countWords.put(word, countWords.get(word) + 1);\r\n }\r\n }\r\n \r\n final String location = tweet.getUser().getLocation();\r\n if (!countLocation.containsKey(location)) {\r\n countLocation.put(location, 0);\r\n }\r\n countLocation.put(location, countLocation.get(location) + 1);\r\n });\r\n }"
] |
[
"0.73136574",
"0.7174499",
"0.6952694",
"0.69507605",
"0.6927795",
"0.66479594",
"0.6558417",
"0.6537975",
"0.6509105",
"0.65012723",
"0.6477718",
"0.63433737",
"0.6334751",
"0.6312809",
"0.6294906",
"0.62884545",
"0.6267186",
"0.6266112",
"0.61599195",
"0.61501795",
"0.61394733",
"0.6104177",
"0.61032665",
"0.6100308",
"0.6094384",
"0.60928714",
"0.6077592",
"0.6065786",
"0.60654634",
"0.6058009",
"0.60076606",
"0.5988759",
"0.59875727",
"0.5972924",
"0.5950155",
"0.5924311",
"0.5915757",
"0.5899387",
"0.5895315",
"0.5864996",
"0.58581287",
"0.5856437",
"0.58535343",
"0.5824989",
"0.5814982",
"0.58135575",
"0.5805865",
"0.58024853",
"0.5785541",
"0.57794505",
"0.57304597",
"0.5714741",
"0.5712476",
"0.570419",
"0.56838185",
"0.56724787",
"0.5666633",
"0.5651977",
"0.5639714",
"0.56216323",
"0.56148434",
"0.56004304",
"0.5598999",
"0.5551584",
"0.55510855",
"0.55387706",
"0.55371374",
"0.5531843",
"0.5529292",
"0.5521319",
"0.55178297",
"0.550875",
"0.55067027",
"0.5501086",
"0.55004585",
"0.54933006",
"0.54929453",
"0.5485798",
"0.54841113",
"0.5460409",
"0.54556644",
"0.54553753",
"0.5442222",
"0.5441125",
"0.54410416",
"0.54354316",
"0.5424622",
"0.5423635",
"0.54208076",
"0.54091144",
"0.540094",
"0.5386254",
"0.5377928",
"0.5373517",
"0.53511643",
"0.53509283",
"0.53207606",
"0.52745795",
"0.5266109",
"0.5265786"
] |
0.64467126
|
11
|
This method is called timely during a day. outCollection is the same for a day, the output will be mapreduced value of tweets from the beginning of the day up to the current time (replace documents of the same date in the outCollection).
|
public void dailyMapReduce(Date date, String collectionName) {
DBCollection tweets = mongoOps.getCollection(collectionName);
Calendar today = Calendar.getInstance();
today.setTime(date);
today.set(Calendar.HOUR_OF_DAY, 0);
today.set(Calendar.MINUTE, 0);
today.set(Calendar.SECOND, 0);
long today_beginning_timestamp = today.getTimeInMillis();
System.out.println("Today beginning:" + today.getTime());
today.set(Calendar.HOUR_OF_DAY, 23);
today.set(Calendar.MINUTE, 59);
today.set(Calendar.SECOND, 59);
long today_ending_timestamp = today.getTimeInMillis();
System.out.println("Today ending:" + today.getTime());
DBObject condition = new BasicDBObject(2);
condition.put("$gte", Long.toString(today_beginning_timestamp));
condition.put("$lt", Long.toString(today_ending_timestamp));
DBObject q = new BasicDBObject("timestamp_ms", condition);
DBObject match = new BasicDBObject("$match", q);
DBObject output = new BasicDBObject("$out", "temp");
// run aggregation
List<DBObject> pipeline = Arrays.asList(match, output);
tweets.aggregate(pipeline);
DBCollection temp = mongoOps.getCollection("temp");
// map function
StringBuilder mapFunction = new StringBuilder("function() {");
for (Field field : Field.values()) {
if (field == Field.ALL) {
continue;
}
mapFunction.append("var entity = this." + field.toString() + ";");
mapFunction
.append("if ( entity ) { entity = entity.toString().toLowerCase().split(',');");
mapFunction.append("for ( var i = entity.length -1 ; i>=0 ;--i){");
if (field.toString() == Field.PERSON.toString()) {
mapFunction
.append("entity[i]=entity[i].replace(/[^a-zA-Z]/g, ' ');");
} else if (field.toString() == Field.HASHTAG.toString()) {
mapFunction
.append("entity[i]=entity[i].replace(/[`~!@$%^&*()_|+\\-=?;:\\'\".<>\\{\\}\\[\\]\\\\/]/gi, '');");
} else if (field.toString() != Field.URL.toString()) {
mapFunction
.append("entity[i]=entity[i].replace(/[`~!@#$%^&*()_|+\\-=?;:\\'\".<>\\{\\}\\[\\]\\\\/]/gi, '');");
}
mapFunction
.append("if ( entity[i] && entity[i].trim().length > 0 && entity[i] !== '[]') {");
mapFunction.append("emit( { id: entity[i].trim(), date: \""
+ counterDateFormat.format(date) + "\", type: \""
+ field.toString() + "\"}, 1);}}}");
}
mapFunction.append("};");
String map = mapFunction.toString();
System.out.println(map);
// reduce function
String reduce = "function(key, values) {" + "var sum = 0;"
+ "values.forEach( function(v) {" + "sum += v;" + "});"
+ "return sum;" + "}";
System.out.println(reduce);
// run map-reduce on the temporary collection, the output is in the file
// named outCollection
MapReduceCommand cmd = new MapReduceCommand(temp, map, reduce,
DAILY_COLLECT_NAME, MapReduceCommand.OutputType.MERGE, null);
temp.mapReduce(cmd);
// delete the temporary collection
temp.drop();
System.out.println("Finished daily mapreduce");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\tpublic List<String> getTweetsForMapsWithLimit(String collectionName, int numberOfTweetsWanted) {\n\t\t\n\t\tDBCollection collection = mongoOps.getCollection(collectionName);\n\t\tDBObject q = QueryBuilder.start().put(\"coordinates\").notEquals(null).get();\n\t\tDBCursor c = collection.find(q).sort(new BasicDBObject(\"timestamp_ms\", -1)).limit(numberOfTweetsWanted);\n\t\tList<String> results = getResults(c);\n\t\treturn results;\n\t}",
"@Override\n\tpublic List<String> getTweetsForMaps(String collectionName) {\n\t\tQuery q = new Query();\n\t\tq.addCriteria(Criteria.where(\"coordinates\").ne(null));\n\t\tList<String> results = mongoOps.find(q, String.class, collectionName);\n\t\treturn results;\n\t}",
"@Override\n public void onTimer(long timestamp, OnTimerContext context, Collector<ProcessedScore> out) throws Exception {\n flipSide();\n\n // Emit all saved processed scores. This is pretty expensive\n Iterable<ProcessedScore> savedProcessedScores = savedProcessedScoresState.get();\n for (ProcessedScore processedScore : savedProcessedScores) {\n out.collect(processedScore);\n }\n // Clear out all saved processed scores for releasing space\n savedProcessedScoresState.clear();\n }",
"public void mergingMapReduce(TimePeriod timePeriod) {\n\n\t\tSystem.out.println(\"Starting merging mapreduce...\");\n\n\t\tDBCollection dailyCollection = mongoOps\n\t\t\t\t.getCollection(DAILY_COLLECT_NAME);\n\n\t\tCalendar stDate = Calendar.getInstance();\n\t\tif (timePeriod.equals(TimePeriod.PASTWEEK)) {\n\t\t\tstDate.add(Calendar.DATE, -7);\n\t\t} else if (timePeriod.equals(TimePeriod.PASTMONTH)) {\n\t\t\tstDate.add(Calendar.DATE, -30);\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\n\t\tSystem.out.println(\"Start date: \" + stDate.getTime().toString());\n\n\t\t// create pipeline operations, first with the $match\n\t\tDBObject matchObj = new BasicDBObject(\"_id.date\", new BasicDBObject(\n\t\t\t\t\"$gte\", counterDateFormat.format(stDate.getTime())));\n\t\tDBObject match = new BasicDBObject(\"$match\", matchObj);\n\n\t\t// build the $projection operation\n\t\tDBObject fields = new BasicDBObject(\"_id.id\", 1);\n\t\tfields.put(\"_id.type\", 1);\n\t\tfields.put(\"value\", 1);\n\t\tDBObject project = new BasicDBObject(\"$project\", fields);\n\n\t\t// the $group operation\n\t\tMap<String, Object> dbObjIdMap = new HashMap<String, Object>();\n\t\tdbObjIdMap.put(\"id\", \"$_id.id\");\n\t\tdbObjIdMap.put(\"type\", \"$_id.type\");\n\t\tDBObject groupFields = new BasicDBObject(\"_id\", new BasicDBObject(\n\t\t\t\tdbObjIdMap));\n\t\tgroupFields.put(\"value\", new BasicDBObject(\"$sum\", \"$value\"));\n\t\tDBObject group = new BasicDBObject(\"$group\", groupFields);\n\n\t\t// $out operation\n\t\tDBObject out = new BasicDBObject(\"$out\",\n\t\t\t\t(timePeriod.equals(TimePeriod.PASTWEEK) ? WEEKLY_COLLECT_NAME\n\t\t\t\t\t\t: MONTHLY_COLLECT_NAME));\n\n\t\tList<DBObject> pipeline = Arrays.asList(match, project, group, out);\n\t\tdailyCollection.aggregate(pipeline);\n\n\t\tSystem.out.println(\"Finished merging mapreduce\");\n\t}",
"public static void mergingMapReduce(TimePeriod timePeriod) {\n\n\t\tSystem.out.println(\"Starting merging mapreduce...\");\n\n\t\tDBCollection dailyCollection = mongoOps\n\t\t\t\t.getCollection(DAILY_COLLECT_NAME);\n\n\t\tCalendar stDate = Calendar.getInstance();\n\t\tif (timePeriod.equals(TimePeriod.PASTWEEK)) {\n\t\t\tstDate.add(Calendar.DATE, -7);\n\t\t} else if (timePeriod.equals(TimePeriod.PASTMONTH)) {\n\t\t\tstDate.add(Calendar.DATE, -30);\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\n\t\tSystem.out.println(\"Start date: \" + stDate.getTime().toString());\n\n\t\t// create pipeline operations, first with the $match\n\t\tDBObject matchObj = new BasicDBObject(\"_id.date\", new BasicDBObject(\n\t\t\t\t\"$gte\", counterDateFormat.format(stDate.getTime())));\n\t\tDBObject match = new BasicDBObject(\"$match\", matchObj);\n\n\t\t// build the $projection operation\n\t\tDBObject fields = new BasicDBObject(\"_id.id\", 1);\n\t\tfields.put(\"_id.type\", 1);\n\t\tfields.put(\"value\", 1);\n\t\tDBObject project = new BasicDBObject(\"$project\", fields);\n\n\t\t// the $group operation\n\t\tMap<String, Object> dbObjIdMap = new HashMap<String, Object>();\n\t\tdbObjIdMap.put(\"id\", \"$_id.id\");\n\t\tdbObjIdMap.put(\"type\", \"$_id.type\");\n\t\tDBObject groupFields = new BasicDBObject(\"_id\", new BasicDBObject(\n\t\t\t\tdbObjIdMap));\n\t\tgroupFields.put(\"value\", new BasicDBObject(\"$sum\", \"$value\"));\n\t\tDBObject group = new BasicDBObject(\"$group\", groupFields);\n\n\t\t// $out operation\n\t\tDBObject out = new BasicDBObject(\"$out\",\n\t\t\t\t(timePeriod.equals(TimePeriod.PASTWEEK) ? WEEKLY_COLLECT_NAME\n\t\t\t\t\t\t: MONTHLY_COLLECT_NAME));\n\n\t\tList<DBObject> pipeline = Arrays.asList(match, project, group, out);\n\t\tdailyCollection.aggregate(pipeline);\n\n\t\tSystem.out.println(\"Finished merging mapreduce\");\n\t}",
"protected void cleanup(OutputCollector<Text, IntWritable> output) throws IOException, InterruptedException {\n\t\t\tfor (String key : countMap.keySet()) {\r\n\t\t\t\t//word.set(key);\r\n\t\t\t\t//value.set(countMap.get(key));\r\n\t\t\t\toutput.collect(new Text(key), new IntWritable(countMap.get(key)));\r\n\t\t\t}\r\n\t\t}",
"public static void aggregateWordCountsAndPrint(JavaSparkContext sc ,JavaPairDStream<String, Integer> newWordCounts,String outputDir){\n\t\t\n\t\t// Apply the inner function to each RDD in this newWordCounts DStream\n\t\tnewWordCounts.foreachRDD((rdd, time) -> {\n\n\t\n\t\t\tif (rdd.count()==0)\n\t\t\t{\n\t\t\t\t System.out.println(\"No words in this time interval: \" +time);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tJavaPairRDD<Text, IntWritable> result = rdd.mapToPair(new ConvertToWritableTypes());\n\t\t\tresult.saveAsHadoopFile(outputDir+\"/\" + time.toString(), Text.class, IntWritable.class,\n\t\t\t\t\tSequenceFileOutputFormat.class);\n\t\t\t//Print the aggregation word counts \n\t\t\tprintAllWordCounts(sc, outputDir);\n\n\t\t});\n\t\t\n\t\t\n\t\t\n\t}",
"private void collect() {\n\n System.out.println(\"Getting IndexReader...\");\n final IndexReader reader = index.reader();\n\n System.out.println(\"Calling forEachDocument()...\");\n index.forEachDocument(new DocTask() {\n\n int docsDone = 0;\n\n final int totalDocs = reader.maxDoc() - reader.numDeletedDocs();\n\n @Override\n public void perform(BlackLabIndex index, int docId) {\n Map<String, String> metadata = new HashMap<>();\n Document luceneDoc = index.luceneDoc(docId);\n for (IndexableField f: luceneDoc.getFields()) {\n // If this is a regular metadata field, not a control field\n if (!f.name().contains(\"#\")) {\n fieldNames.add(f.name());\n if (f.stringValue() != null)\n metadata.put(f.name(), f.stringValue());\n else if (f.numericValue() != null)\n metadata.put(f.name(), f.numericValue().toString());\n }\n }\n values.add(metadata);\n docsDone++;\n if (docsDone % 100 == 0) {\n int perc = docsDone * 100 / totalDocs;\n System.out.println(docsDone + \" docs exported (\" + perc + \"%)...\");\n }\n }\n });\n }",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tfor(int i = 0; i < 1000; i++) {\r\n\t\t\t\t\tfinal BasicDBObject doc = new BasicDBObject(\"_id\", i);\r\n\t\t\t\t\tdoc.put(\"ts\", new Date());\r\n\t\t\t\t\tcoll.insert(doc);\r\n\t\t\t\t}\r\n\t\t\t}",
"boolean hasNextCollectTimestampMs();",
"public void collFullScan(String databse, String collectionName) {\r\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\r\n Date date = new Date();\r\n logger.logp(Level.FINE, TAG, \"collFullScan \" + databse + collectionName + \" InitTime:\",\r\n dateFormat.format(date));\r\n DBCollection geoTags = getCollection(databse, collectionName);\r\n DBCursor cursor = geoTags.find();\r\n logger.logp(Level.FINE, TAG, \"collFullScan \" + databse + collectionName + \" Size:\",\r\n String.valueOf(cursor.count()));\r\n while(cursor.hasNext())\r\n cursor.next();\r\n Date date2 = new Date();\r\n logger.logp(Level.FINE, TAG, \"collFullScan \" + databse + collectionName + \" EndTime:\",\r\n dateFormat.format(date2));\r\n }",
"public void reduce(Text key, \n Iterator<Text> values, \n OutputCollector<Text, Text> output, \n Reporter reporter) throws IOException {\n\n\n List<Text> saved_values = new ArrayList<Text>();\n\n float lat_sum = 0.0f;\n float lon_sum = 0.0f;\n int count = 0;\n\n while (values.hasNext()) {\n Text val = values.next();\n saved_values.add(val);\n\n String line = val.toString();\n Observation obs = Observation.makeObs(line);\n if (obs == null) {\n reporter.setStatus(\"bad input line: \" + line);\n continue;\n }\n\n /// debug: log our intermediate values\n //output.collect(key, new FloatWritable(val)); \n\n lon_sum += obs.lon;\n lat_sum += obs.lat;\n count++;\n }\n\n float lon_avg = lon_sum / count;\n float lat_avg = lat_sum / count;\n Coord avg = new Coord(lon_avg, lat_avg);\n\n /// debug: log totals\n //output.collect(new Text(key.toString()+ \"-count\"), new FloatWritable(count * 1.0f));\n \n // ### remove cells with too few observations ###\n int min_observations = 4;\n if (count < min_observations) {\n output.collect(key, new Text(\"too few obs (0 / \" + count + \")\"));\n return;\n }\n\n\n List<Text> outliers = new ArrayList<Text>();\n for (Text val : saved_values) {\n String line = val.toString();\n Observation obs = Observation.makeObs(line);\n if (obs == null) continue;\n double dist = avg.distance_to(obs);\n\n // ### remove outliers\n int max_distance = 1000;\n if (dist > max_distance) {\n outliers.add(val);\n }\n\n // ### remove cells with too little uncertainty ###\n int min_uncertainty = 150;\n if (obs.uncertainty != null && dist + obs.uncertainty >= min_uncertainty) {\n if (!outliers.contains(val))\n outliers.add(val);\n }\n\n }\n\n\n // process removals\n for (Text val : outliers) {\n saved_values.remove(val);\n }\n\n // recalulate actual results\n lat_sum = 0.0f;\n lon_sum = 0.0f;\n count = 0;\n for (Text val : saved_values) {\n String line = val.toString();\n Observation obs = Observation.makeObs(line);\n if (obs == null) continue;\n lon_sum += obs.lon;\n lat_sum += obs.lat;\n count++;\n }\n\n\n // output the results \n //output.collect(key, new Text(\"CELL:\" + avg.lon +\", \"+ avg.lat \n // + \" (\" + (count + outliers.size()) + \")\"));\n output.collect(key, new Text(lon_sum/count +\", \"+ lat_sum/count\n + \" (\" + count + \" / \" + (count + outliers.size()) + \")\"));\n\n }",
"@Override\n public void flatMap(MetricTrends t, Collector<Tuple8<String, String, String, String, String, Integer, Integer,String>> out) throws Exception {\n // if(t.getGroup().equals(\"Group_1\") && t.getService().equals(\"Service_1B\") && t.getEndpoint().equals(\"Hostname_4\") && t.getMetric().equals(\"Metric_B\")){\n int criticalstatus = this.opsMgr.getIntStatus(\"CRITICAL\");\n int warningstatus = this.opsMgr.getIntStatus(\"WARNING\");\n int unknownstatus = this.opsMgr.getIntStatus(\"UNKNOWN\");\n\n Timeline timeline = t.getTimeline();\n TimelineIntegrator timelineIntegrator = new TimelineIntegrator();\n int[] criticalstatusInfo = timelineIntegrator.countStatusAppearances(timeline.getSamples(), criticalstatus);\n int[] warningstatusInfo = timelineIntegrator.countStatusAppearances(timeline.getSamples(), warningstatus);\n int[] unknownstatusInfo = timelineIntegrator.countStatusAppearances(timeline.getSamples(), unknownstatus);\n\n ArrayList<String> tags = (ArrayList)this.mtagsMgr.getTags(t.getMetric()).clone();\n String tagInfo = \"\";\n for (String tag : tags) {\n if (tags.indexOf(tag) == 0) {\n tagInfo = tagInfo + tag;\n } else {\n tagInfo = tagInfo + \",\" + tag;\n }\n }\n \n Tuple8<String, String, String, String, String, Integer, Integer, String> tupleCritical = new Tuple8< String, String, String, String, String, Integer, Integer, String>(\n t.getGroup(), t.getService(), t.getEndpoint(), t.getMetric(), \"CRITICAL\", criticalstatusInfo[0], criticalstatusInfo[1], tagInfo);\n out.collect(tupleCritical);\n\n Tuple8<String, String, String, String, String, Integer, Integer, String> tupleWarning = new Tuple8< String, String, String, String, String, Integer, Integer, String>(\n t.getGroup(), t.getService(), t.getEndpoint(), t.getMetric(), \"WARNING\", warningstatusInfo[0], warningstatusInfo[1], tagInfo);\n out.collect(tupleWarning);\n\n Tuple8<String, String, String, String, String, Integer, Integer, String> tupleUnknown = new Tuple8< String, String, String, String, String, Integer, Integer, String>(\n t.getGroup(), t.getService(), t.getEndpoint(), t.getMetric(), \"UNKNOWN\", unknownstatusInfo[0], unknownstatusInfo[1], tagInfo);\n\n out.collect(tupleUnknown);\n }",
"@Override\n public void run($ collection) {\n\n CleanupRunnable.run();\n }",
"@Override\n protected void reduce(DateWritable key, Iterable<MapWritable> values, Context context) throws IOException, InterruptedException {\n\n Counters.ReducerCounter counter = getCounter(context, CountersEnum.WEATHER_REDUCER_COUNT);\n\n // flatten the maps in values and get a list of the CrimeEntryWritables\n List<WeatherWritable> weatherReadings = iterableOfMapsToList(values, WeatherWritable.class);\n\n // get average for all daily measurements\n Map<String, Object> map = reduceToAverages(weatherReadings, counter);\n\n // create value string of <field>:<value> separated by ','\n // e.g. 2001-01-01\tdate:2001-01-01, temp:-5.8541665, weather_id:804, snow_3h:0.0, weather_description:overcast clouds, rain_1h:0.0, snow_1h:0.0, clouds_all:47, rain_3h:0.0, pressure:1028, feels_like:-11.464583, temp_max:-2.777917, weather_main:Clouds, temp_min:-8.428333, wind_deg:270, humidity:71, wind_speed:3.619583\n context.write(key, new Text(MAP_STRINGIFIER.stringify(map)));\n }",
"public void updateCache() {\n\n log.info(\"Updating solar flare cache\");\n Date fallbackStartDate = DateHelper.getFallbackDate();\n solarFlareRepository.count()\n .map(total -> {\n if (total > 0) {\n solarFlareRepository.findTopByBeginTimeIsNotNullOrderByBeginTimeDesc()\n .map(solarFlare -> {\n log.info(\"Entries exist, performing incremental update\");\n log.info(\n \"Last entry found at {}\",\n DateHelper.getPrintableString(solarFlare.getBeginTime())\n );\n collectForRange(solarFlare.getBeginTime(), null);\n return solarFlare;\n })\n .subscribe();\n } else {\n log.info(\"No entries found, performing a full import\");\n collectForRange(fallbackStartDate, null);\n }\n return total;\n })\n .subscribe();\n }",
"@Override\n\tpublic Double getMapReduceResult(DBCollection dbColl,String apiName, String serviceName,DBObject query) {\n\t\tsetMap();\n\t\tsetReduce();\n\t\tsetFinilize();\n\t\tMapReduceCommand cmd=new MapReduceCommand(dbColl,map,reduce,null, OutputType.INLINE,query);\n\t\tMapReduceOutput mapReduceOutput = dbColl.mapReduce(cmd);\n\t\tQueryBuilder queryBuilder=new QueryBuilder();\n\t\tqueryBuilder.put(\"responseTime\");\n\t\tqueryBuilder.greaterThanEquals(50);\n\t\tqueryBuilder.lessThan(200);\n\t\tquery.putAll(queryBuilder.get());\n\t\tint count=dbColl.find(query).size();\n\t\t\n//\t\tSystem.out.println(mapReduceOutput.results());\n//\t\tIterator it=mapReduceOutput.results().iterator();\n\t\t\n//\t\tdouble result=(Double) mapReduceOutput.results().iterator().next().get(\"value\");\n\t\treturn (double) count;\n\t}",
"public void getOneUserPost(String un, UserPosts up) {\n\n // see if that user have made their posts private or not\n boolean isPrivate = false;\n\n // accessing registeredUser table (collection)\n MongoCollection<Document> collRU = db.getCollection(\"registeredUser\");\n\n FindIterable<Document> docOne = collRU.find(Filters.eq(\"username\", un)); // find document by filters\n MongoCursor<Document> cursor1 = docOne.iterator(); // set up cursor to iterate rows of documents\n try {\n while (cursor1.hasNext()) {\n isPrivate = cursor1.next().getBoolean(\"hideposts\");\n }\n } finally {\n cursor1.close();\n }\n\n if (!isPrivate) {\n // accessing posts table\n MongoCollection<Document> postColl = db.getCollection(\"postsRecord\");\n\n //ArrayList<Document> userPost = new ArrayList<>(); // all posts from this user will be in here\n if (!up.postDocs.isEmpty())\n up.postDocs.clear(); // clearing out the arrayList first\n\n FindIterable<Document> postDocs = postColl\n .find(Filters.eq(\"username\", un)) // get all documents from this user\n .sort(Sorts.descending(\"date\")); // sorts by newest post first\n\n MongoCursor<Document> cursor = postDocs.iterator(); // set up cursor to iterate rows of documents\n try {\n while (cursor.hasNext()) {\n //System.out.println(cursor.next().toJson()); // print username's document in String\n up.postDocs.add(cursor.next()); // add every post Documents into allPosts\n }\n } finally {\n cursor.close();\n }\n\n // print\n for (Document post : up.postDocs) {\n System.out.println(post.toJson());\n System.out.println(\"^^^ post date: \" + new Date(post.getLong(\"date\")).toString() + \"\\n\");\n }\n }\n else {\n System.out.println(un + \" has made their posts private\");\n }\n }",
"public void readMongoSentiAnalysis(String dbName,String collectionNameSrc,int startAt, int batchSize, String csvFile){\n\t\ttry{ \n\t\t\tSentimentAnalyzer objSentimentAnalyzer = new SentimentAnalyzer(csvFile);\n\t\t\t\n\t\t\t// To connect to mongodb server\n\t\t\tMongoClient mongoClient = new MongoClient( \"localhost\" , 27017 );\n\t\t\t// Now connect to your databases\n\t\t\tDB db = mongoClient.getDB( dbName );\n//\t\t\tSystem.out.println(\"Connect to database successfully\");\n\n\t\t\t// get a collection object to work with\n\t\t\tDBCollection coll = db.getCollection(collectionNameSrc);\n\n\t\t\tBasicDBObject query = new BasicDBObject();\n\t\t\t\n\t\t\tDBCursor cursor = coll.find(query, null, startAt, 500);\n\t\t\tint count = 0;\n\t\t\ttry {\n\t\t\t\twhile(cursor.hasNext()){\n\t\t\t\t\tif(count>batchSize){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tDBObject temp = cursor.next();\n\n\t\t\t\t\tString tweet = \"\"+temp.get(\"text\");\n\t\t\t\t\tint sentiScore = objSentimentAnalyzer.analyzer(tweet);\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(tweet+\">>\"+sentiScore);\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(tweet);\n\t\t\t\t\t\n//\t\t\t\t\tBasicDBObject where = new BasicDBObject(\"id\",temp.get(\"id\"));\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.print(\" \"+temp.get(\"id\"));\n//\t\t\t\t\ttemp.put(\"sentiment\", sentiScore);\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(coll.update(where, temp));\n\t\t\t\t\t\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} finally {\n\t\t\t\tcursor.close();\n\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t}",
"void transform(Map<String, List<Map<String,String>>> data, long startTime, long endTime);",
"@Override\n public void reduce(Text key, Iterable<Text> values, Context context) throws IOException, InterruptedException {\n ArrayList<String> cache = new ArrayList<String>();\n String groupId = \"\";\n String earlist = \"\";\n int earlistTime = 999999;\n int latestTime = 0;\n for (Text e : values) {\n cache.add(e.toString());\n String[] input = e.toString().split(\",\");\n int time = Integer.parseInt(input[1]);\n //find the eaelistTime and latestTime of Typhoon\n if (time < earlistTime)\n earlistTime = time;\n if (time > latestTime)\n latestTime = time;\n }\n\n for (String e : cache) {\n String[] input1 = e.split(\",\");\n if (Integer.parseInt(input1[1]) == earlistTime) {\n String[] coordE = input1[2].trim().split(\"\\\\s+\");\n double tyLatE = Double.parseDouble(coordE[0]);\n double tyLngE = Double.parseDouble(coordE[2]);\n //if the start point of typhoon is west of 123E, then it may be group 2 or group 3\n if (tyLngE < 123) {\n for (String s : cache) {\n String[] input2 = s.split(\",\");\n if (Integer.parseInt(input2[1]) == latestTime) {\n String[] coordL = input2[2].trim().split(\"\\\\s+\");\n double tyLatL = Double.parseDouble(coordL[0]);\n double tyLngL = Double.parseDouble(coordL[2]);\n //if the end point of typhoon is west of 115E, then it belongs to group 3\n if (tyLngL < 115)\n groupId = \"3\";\n //if the end point of typhoon is east of 115E, then it belongs to group 2\n if (tyLngL > 115)\n groupId = \"2\";\n }\n }\n }\n //if the start point of typhoon is east of 123E, then it may be group 2 or group 3\n if (tyLngE > 123)\n groupId = \"1\";\n }\n }\n for (String e : cache) {\n context.write(null, new Text(groupId + \",\" + e));\n }\n\n }",
"public void indexCreate()\n {\n try{\n Directory dir = FSDirectory.open(Paths.get(\"indice/\"));\n Analyzer analyzer = new StandardAnalyzer();\n IndexWriterConfig iwc = new IndexWriterConfig(analyzer);\n iwc.setOpenMode(OpenMode.CREATE);\n IndexWriter writer = new IndexWriter(dir,iwc);\n MongoConnection mongo = MongoConnection.getMongo();\n mongo.OpenMongoClient();\n DBCursor cursor = mongo.getTweets();\n Document doc = null;\n\n while (cursor.hasNext()) {\n DBObject cur = cursor.next();\n if (cur.get(\"retweet\").toString().equals(\"false\")) {\n doc = new Document();\n doc.add(new StringField(\"id\", cur.get(\"_id\").toString(), Field.Store.YES));\n doc.add(new TextField(\"text\", cur.get(\"text\").toString(), Field.Store.YES));\n doc.add(new StringField(\"analysis\", cur.get(\"analysis\").toString(), Field.Store.YES));\n //doc.add(new StringField(\"finalCountry\",cur.get(\"finalCountry\").toString(),Field.Store.YES));\n doc.add(new StringField(\"userScreenName\", cur.get(\"userScreenName\").toString(), Field.Store.YES));\n doc.add(new StringField(\"userFollowersCount\", cur.get(\"userFollowersCount\").toString(), Field.Store.YES));\n doc.add(new StringField(\"favoriteCount\", cur.get(\"favoriteCount\").toString(), Field.Store.YES));\n\n if (writer.getConfig().getOpenMode() == OpenMode.CREATE) {\n System.out.println(\"Indexando el tweet: \" + doc.get(\"text\") + \"\\n\");\n writer.addDocument(doc);\n System.out.println(doc);\n } else {\n System.out.println(\"Actualizando el tweet: \" + doc.get(\"text\") + \"\\n\");\n writer.updateDocument(new Term(\"text\" + cur.get(\"text\")), doc);\n System.out.println(doc);\n }\n }\n }\n cursor.close();\n writer.close();\n }\n catch(IOException ioe){\n System.out.println(\" Error en \"+ ioe.getClass() + \"\\n mensaje: \" + ioe.getMessage());\n }\n }",
"public void getEveryonePosts(String myUN, UserPosts up, UserFriends uf) {\n\n // get who I'm following\n //ArrayList<String> following = getFollowList(myUN);\n //following.add(myUN); // \"add\" myself into follow list so I can see my own post in homepage\n //System.out.println(\"Follow = \" + following);\n\n // hold all posts from everyone I follow here\n //ArrayList<Document> allPosts = new ArrayList<>();\n //if (!up.postDocs.isEmpty())\n up.postDocs.clear();\n\n getFollowList(myUN, uf);\n\n // accessing posts table\n MongoCollection<Document> postColl = db.getCollection(\"postsRecord\");\n\n // get all posts in newest first order\n FindIterable<Document> everyPost = postColl.find().sort(Sorts.descending(\"date\"));\n\n MongoCursor<Document> cursor = everyPost.iterator(); // set up cursor to iterate rows of documents\n try {\n while (cursor.hasNext()) {\n Document currCursor = cursor.next(); // get current document from cursor\n String cursorUN = currCursor.getString(\"username\"); // see username of that document\n //System.out.println(\"cursorUN = \" + cursorUN);\n\n // if post by me or I follow user of current document\n if (cursorUN.equals(myUN) || uf.friendsList.contains(cursorUN))\n up.postDocs.add(currCursor); // add that post into postDocs\n }\n } finally {\n cursor.close();\n }\n\n // print\n for (Document post: up.postDocs) {\n System.out.println(post.toJson());\n }\n }",
"@Override\n public Iterator<? extends Map.Entry<Key, Value>> reduceKV(Iterator<Map.Entry<Key, Value>> iter) {\n Key keyBeforeTT = null, keyAfterTT = null;\n Value valueBeforeTT = null;\n List<Value> valuesAfterTT = new LinkedList<>();\n\n while (iter.hasNext()) {\n Map.Entry<Key, Value> next = iter.next();\n Key k = next.getKey();\n Value v = next.getValue();\n\n if (k.getTimestamp() < tt) {\n if (keyBeforeTT == null || k.getTimestamp() > keyBeforeTT.getTimestamp()) {\n keyBeforeTT = k;\n valueBeforeTT = v;\n }\n } else {\n if (keyAfterTT == null || k.getTimestamp() > keyAfterTT.getTimestamp())\n keyAfterTT = k;\n valuesAfterTT.add(v);\n }\n }\n\n // Entries with ts >= tt are summed together into one entry with the timestamp of the most recent one.\n // If no entry is seen with ts < tt and we are on scan or full majc scope, then no entries are emitted.\n if (sScope == SScope.SCAN_OR_MAJC_FULL && keyBeforeTT == null)\n return null;\n\n // All entries are emitted after applying the above rules.\n if (keyBeforeTT == null && keyAfterTT == null)\n return null;\n else if (keyAfterTT == null)\n return Iterators.singletonIterator(new AbstractMap.SimpleImmutableEntry<>(keyBeforeTT, valueBeforeTT));\n else if (keyBeforeTT == null)\n return Iterators.singletonIterator(new AbstractMap.SimpleImmutableEntry<>(keyAfterTT, summer.reduce(keyAfterTT, valuesAfterTT.iterator())));\n else {\n // emit most recent entry first\n return new PeekingIterator2<Map.Entry<Key, Value>>(\n new AbstractMap.SimpleImmutableEntry<>(keyAfterTT, summer.reduce(keyAfterTT, valuesAfterTT.iterator())),\n new AbstractMap.SimpleImmutableEntry<>(keyBeforeTT, valueBeforeTT)\n );\n }\n }",
"public static void main(String[] args) {\n\t\tArrayList<String> clist=getCode();\r\n\t\tArrayList<String> clist1=getCode1();\r\n\t\tfor(String code:clist){\r\n\t\t\tif(clist1.contains(code)){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tSystem.out.println(code);\r\n\t\t\tMongoCollection<Document> collection=mongo.getShardConn(\"ss_all_speak\");\r\n\t\t\tBasicDBObject find=new BasicDBObject();\r\n\t\t\tfind.put(\"stock_code\",code);\r\n//\t\t\tfind.put(\"website\",\"同花顺\");\r\n\t\t\tMongoCursor<Document> cursor =collection.find(find).batchSize(1000).noCursorTimeout(true).iterator();\r\n\t\t\tHashMap<String, HashMap<String, Object>> dmap=new HashMap<String, HashMap<String,Object>>();\r\n\t\t\twhile(cursor.hasNext()){\r\n\t\t\t\tDocument doc=cursor.next();\r\n\t\t\t\tObject list=doc.get(\"list\");\r\n\t\t\t\tString time=doc.getString(\"timedel\").trim();\r\n\t\t\t\tHashMap<String, Object> map=countNamesAndComments(list,time);\r\n\t\t\t\tmap.put(\"time\",time);\r\n\t\t\t\tif(dmap.containsKey(time)){\r\n\t\t\t\t\tHashMap<String, Object> tmp=dmap.get(time);\r\n\t\t\t\t\tint a1=Integer.parseInt(map.get(\"names\").toString());\r\n\t\t\t\t\tint b1=Integer.parseInt(map.get(\"comments\").toString());\r\n\t\t\t\t\tint a2=Integer.parseInt(tmp.get(\"names\").toString());\r\n\t\t\t\t\tint b2=Integer.parseInt(tmp.get(\"comments\").toString());\r\n\t\t\t\t\ttmp.put(\"names\", a1+a2);\r\n\t\t\t\t\ttmp.put(\"comments\", b1+b2);\r\n\t\t\t\t\tdmap.put(time, tmp);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdmap.put(time, map);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcursor.close();\r\n\t\t\tArrayList<HashMap<String, Object>> dlist=new ArrayList<HashMap<String,Object>>();\r\n\t\t\tfor(String key:dmap.keySet()){\r\n\t\t\t\tHashMap<String, Object> tmp=dmap.get(key);\r\n\t\t\t\tdlist.add(tmp);\r\n\t\t\t}\r\n\t\t\tCollections.sort(dlist, new Comparator<HashMap<String, Object >>() {\r\n\t public int compare(HashMap<String, Object > a, HashMap<String, Object > b) {\r\n\t \tString one =a.get(\"time\").toString();\r\n\t String two = b.get(\"time\").toString();\r\n\t int time=str2TimeMuli(one);\r\n\t int time1=str2TimeMuli(two);\r\n\t return time - time1;\r\n\t }\r\n\t });\r\n\t\t\tif(!dlist.isEmpty()){\r\n\t\t\t\tHashMap<String, Object> lastmap=new HashMap<String, Object>();\r\n\t\t\t\tlastmap.put(\"id\", code);\r\n\t\t\t\tlastmap.put(\"list\", dlist);\r\n//\t\t\t\tSystem.out.println(lastmap.toString());\r\n\t\t\t\ttry {\r\n\t\t\t\t\tmongo.upsertMapByTableName(lastmap, \"ss_data_count1\");\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"@SuppressWarnings({\"SleepWhileInLoop\", \"LoggerStringConcat\"})\n public static void main(String[] args) throws TwitterException, InterruptedException {\n ConfigurationBuilder cb = new ConfigurationBuilder();\n cb.setJSONStoreEnabled(true);\n TwitterFactory twitterFactory = new TwitterFactory(cb.build()); // The factory instance is re-useable and thread safe.\n Twitter twitter = twitterFactory.getInstance();\n\n // Set Twitter API keys.\n Properties twitterApiKeysProp = getProperties(Constants.AppConstants.TWITTER_PROP_FILE_NAME);\n AccessToken accessToken = new AccessToken(\n twitterApiKeysProp.getProperty(Constants.TwitterAPIConstants.ACCESS_TOKEN_KEY),\n twitterApiKeysProp.getProperty(Constants.TwitterAPIConstants.ACCESS_TOKEN_SECRET));\n twitter.setOAuthConsumer(\n twitterApiKeysProp.getProperty(Constants.TwitterAPIConstants.CONSUMER_KEY),\n twitterApiKeysProp.getProperty(Constants.TwitterAPIConstants.CONSUMER_SECRET));\n twitter.setOAuthAccessToken(accessToken);\n\n // Connect Database\n Properties appProp = getProperties(Constants.AppConstants.APPLICATION_PROP_FILE_NAME);\n MongoClient mongo = new MongoClient(\n appProp.getProperty(Constants.AppConstants.HOST),\n Integer.parseInt(appProp.getProperty(Constants.AppConstants.PORT)));\n MongoDatabase db = mongo.getDatabase(appProp.getProperty(Constants.AppConstants.DATABASE));\n MongoCollection<Document> collection = db.getCollection(\n appProp.getProperty(Constants.AppConstants.COLLECTION));\n\n // Set query properties to pass it to Twitter Search API\n Query query = new Query(appProp.getProperty(Constants.AppConstants.QUERY));\n query.setLang(Constants.AppConstants.LANG);\n query.setSince(appProp.getProperty(Constants.AppConstants.SINCE));\n query.setUntil(appProp.getProperty(Constants.AppConstants.UNTIL));\n Long maxId = Long.parseLong(appProp.getProperty(Constants.AppConstants.MAX_ID)) - 1;\n if (maxId > 0) {\n query.setMaxId(maxId);\n LOGGER.log(Level.INFO, \"Max Id set: \" + maxId);\n }\n LOGGER.log(Level.INFO, \"Query: {0}\", query.getQuery());\n\n QueryResult result = twitter.search(query);\n\n // In one try, only limited number of tweets are retrieved. So\n // keep retrying until all tweets are received.\n while (!result.getTweets().isEmpty()) {\n Long minId = Long.MAX_VALUE;\n Document document;\n for (Status status : result.getTweets()) {\n document = Document.parse(TwitterObjectFactory.getRawJSON(status));\n collection.insertOne(document);\n if (status.getId() < minId) {\n minId = status.getId();\n }\n LOGGER.log(Level.INFO, \"Id: \" + status.getId());\n }\n query.setMaxId(minId - 1);\n try {\n result = searchWithRetry(twitter, query);\n } catch (TwitterException ex) {\n LOGGER.log(Level.SEVERE, ex.getErrorMessage(), ex);\n LOGGER.log(Level.INFO, \"Thread is sleeping for 15 minutes. \"\n + \"Application will retry to make an API call after 15 minutes.\");\n Thread.sleep(15 * 60 * 1000); // sleep for 15 minutes\n result = searchWithRetry(twitter, query);\n }\n }\n }",
"@Override\n\tprotected void reduce(Text key, Iterable<ClusterDateVectorWritable> value, Context context)\n\t\t\tthrows IOException, InterruptedException {\n\t\tClusterDateVectorWritable result;\n\n\t\tIterator<ClusterDateVectorWritable> it = value.iterator();\n\t\tfinal ClusterDateVectorWritable vectorData = new ClusterDateVectorWritable(it.next());\n\t\t// System.out.println(key.toString());\n\t\t// System.out.println(vectorData.toString());\n\t\twhile (it.hasNext()) {\n\t\t\tfinal ClusterDateVectorWritable dateData = new ClusterDateVectorWritable(it.next());\n\t\t\tresult = mergeVectors(vectorData, dateData);\n\t\t\tSystem.out.println(vectorData.toString());\n\t\t\tSystem.out.println(dateData.toString());\n\n\t\t\tint clusterId = Integer.valueOf(result.getClusterId().toString());\n\t\t\tcontext.write(new IntWritable(clusterId), result.toDateVectorWritable());\n\n\t\t\tSystem.out.println(result.toString());\n\t\t}\n\n\t}",
"private Long getLastCollectionTime(Map<String, MetricHeaderInfo> metricHeaderInfoMap) {\n Long timeUTC = null;\n MetricHeaderInfo headerInfo = metricHeaderInfoMap.get(HEADER_KEY_DIRECTOR_BUSY);\n if (headerInfo != null) {\n // Note: this call will return 0 if 'lastSampleTime' is not found\n timeUTC = MetricsKeys.getLong(MetricsKeys.lastSampleTime, headerInfo.director.getMetrics());\n }\n return timeUTC;\n }",
"public TreeMap<GenericDocument, LinkedList<Posting>> getDocumentBasedIndex(Collection collection) { \r\n\t\tTreeMap<GenericDocument, LinkedList<Posting>> result = new TreeMap<GenericDocument, LinkedList<Posting>>();\r\n\t\t\r\n\t\tfor(java.util.Collection<Posting> bag : map.values()) {\r\n\t\t\tfor (Posting posting : bag) {\r\n\t\t\t\tGenericDocument doc = collection.findArticle(posting.getDocumentID());\r\n\t\t\t\tif (doc != null) {\r\n\t\t\t\t\tif (result.containsKey(doc))\r\n\t\t\t\t\t\tresult.get(doc).add(posting);\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tLinkedList<Posting> list = new LinkedList<Posting>();\r\n\t\t\t\t\t\tlist.add(posting);\r\n\t\t\t\t\t\tresult.put(doc, list);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t \r\n\t\t}\r\n\t\t \r\n\t\tSystem.out.println(\"Document based indexing complete.\");\r\n\t\treturn result;\r\n\t}",
"public void getTweets() {\r\n\t\t\r\n\t\tConfigurationBuilder cb = new ConfigurationBuilder();\r\n\t\tcb.setDebugEnabled(true);\r\n\t\t\r\n\t\t//provide your own keys\r\n\t cb.setOAuthConsumerKey(\"ConsumerKey\");\r\n\t cb.setOAuthConsumerSecret(\"ConsumerSecret\");\r\n\t cb.setOAuthAccessToken(\"AccessToken\");\r\n\t cb.setOAuthAccessTokenSecret(\"TokenSecret\");\r\n\r\n TwitterStream twitterStream = new TwitterStreamFactory(cb.build()).getInstance(); \r\n \r\n //Check for live status updates\r\n StatusListener listener = new StatusListener() {\r\n\r\n @Override\r\n public void onException(Exception arg0) {\r\n \tSystem.out.println(\"Exception!! Data Not Inserted Into Database\");\r\n }\r\n\r\n @Override\r\n public void onDeletionNotice(StatusDeletionNotice arg0) {\r\n \tSystem.out.println(\"Got a status deletion notice id:\" + arg0.getStatusId());\r\n }\r\n \r\n @Override\r\n public void onScrubGeo(long userId, long upToStatusId) {\r\n System.out.println(\"Got scrub_geo event userId:\" + userId + \" upToStatusId:\" + upToStatusId);\r\n }\r\n \r\n @Override\r\n public void onStatus(Status status) {\r\n \t\r\n \t User user = status.getUser();\r\n \t \r\n String username = status.getUser().getScreenName();\r\n String profileLocation = user.getLocation();\r\n long tweetId = status.getId(); \r\n String content = status.getText();\r\n \r\n \r\n //Create a model for the live data\r\n TweetModel memoryData = new TweetModel(username, profileLocation, tweetId, content);\r\n \r\n //store to MongoDB if data is correct\r\n System.out.println(++counter + \") username: \" + username + \" location: \" + profileLocation + \" tweetId \" + tweetId + \" Text: \" + content );\r\n data.save(memoryData);\r\n }\r\n \r\n\t\t\t@Override\r\n public void onTrackLimitationNotice(int arg0) {\r\n\t System.out.println(\"Got track limitation notice:\" + arg0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onStallWarning(StallWarning warning) {}\r\n };\r\n \r\n //Filter the live tweet results\r\n FilterQuery filterQuery = new FilterQuery();\r\n //Search for tweets with specific keywords\r\n String keywords[] = {\"Java\", \"Python\", \"PHP\"};\r\n //Restrict the language to English\r\n String[] lang = {\"en\"}; \r\n //Add the Filters\r\n filterQuery.language(lang);\r\n filterQuery.track(keywords);\r\n //Listen for Live Tweets\r\n twitterStream.addListener(listener);\r\n twitterStream.filter(filterQuery);\r\n\t}",
"@Override\n public void run() {\n try {\n\n try {\n mLastLocation = LocationServices.FusedLocationApi.getLastLocation(\n googleApiClient);\n } catch (SecurityException e) {\n e.printStackTrace();\n }\n\n if (mLastLocation != null) {\n\n\n Query query = new Query(\"India\"); //\n\n GeoLocation location = new GeoLocation(mLastLocation.getLatitude(), mLastLocation.getLongitude()); //latitude, longitude\n\n query.setGeoCode(location, 5, Query.MILES); //location, radius, unit\n query.setSinceId(latestTweetId);\n QueryResult result;\n\n do {\n result = twitter.search(query);\n\n for (twitter4j.Status tweet : result.getTweets()) {\n\n if (tweet.getGeoLocation() != null) {\n\n newTweets.add(tweet);\n long id = tweet.getId();\n\n if (id > latestTweetId) {\n\n latestTweetId = id;\n }\n\n }\n\n System.out.println(\"@\" + tweet.getUser().getScreenName() + \" - \" + tweet.getText());\n }\n\n } while ((query = result.nextQuery()) != null);\n\n handler.sendEmptyMessage(1);\n }\n\n }catch(TwitterException te){\n System.out.println(\"Failed to search tweets: \" + te.getMessage());\n }\n\n\n\n\n\n }",
"public final void collect(Collection<? super T> output) {\n Node n = getHead();\n while (true) {\n Node next = (Node) n.get();\n if (next != null) {\n Object v = leaveTransform(next.value);\n if (!NotificationLite.isComplete(v) && !NotificationLite.isError(v)) {\n output.add(NotificationLite.getValue(v));\n n = next;\n } else {\n return;\n }\n } else {\n return;\n }\n }\n }",
"long getNextCollectTimestampMs();",
"public void collectionProcessComplete() {\n long time = System.currentTimeMillis();\n System.out.print(\"Completed \" + entityCount + \" documents\");\n if (size > 0) {\n System.out.print(\"; \" + size + \" characters\");\n }\n System.out.println();\n long initTime = mInitCompleteTime - mStartTime;\n long processingTime = time - mInitCompleteTime;\n long elapsedTime = initTime + processingTime;\n System.out.println(\"Total Time Elapsed: \" + elapsedTime + \" ms \");\n System.out.println(\"Initialization Time: \" + initTime + \" ms\");\n System.out.println(\"Processing Time: \" + processingTime + \" ms\");\n\n System.out.println(\"\\n\\n ------------------ PERFORMANCE REPORT ------------------\\n\");\n System.out.println(cpe.getPerformanceReport().toString());\n if (docsProcessedWithException > 0) {\n System.out.println(String.format(\n \"There are %s entities that caused exceptions:\\n%s\\n\"\n + \"Check previous output for details\",\n docsProcessedWithException, docsWithException));\n }\n }",
"@Override\r\n\t\tprotected void reduce(UserLocation key, Iterable<NullWritable> values, Context context) throws IOException, InterruptedException {\r\n\r\n\t\t\tint count = 0;\r\n\t\t\tfor (NullWritable nvl : values) {\r\n\t\t\t\tcount++;\r\n\t\t\t\t// 如果是这一组key-value中的第一个元素时,直接赋值给outKey对象。基础对象\r\n\t\t\t\tif (count == 1) {\r\n\t\t\t\t\t// 复制值\r\n\t\t\t\t\toutKey.set(key);\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t// 有可能连续,有可能不连续, 连续则继续变量, 否则输出\r\n\t\t\t\t\tlong current_timestamp = 0;\r\n\t\t\t\t\tlong last_timestamp = 0;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t// 这是新遍历出来的记录的时间戳\r\n\t\t\t\t\t\tcurrent_timestamp = sdf.parse(key.getTime()).getTime();\r\n\t\t\t\t\t\t// 这是上一条记录的时间戳 和 停留时间之和\r\n\t\t\t\t\t\tlast_timestamp = sdf.parse(outKey.getTime()).getTime() + outKey.getDuration() * 60 * 1000;\r\n\t\t\t\t\t} catch (ParseException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// 如果相等,证明是连续记录,所以合并\r\n\t\t\t\t\tif (current_timestamp == last_timestamp) {\r\n\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t * 更新outKey的Duration时长\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\toutKey.setDuration(outKey.getDuration() + key.getDuration());\r\n\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t// 先输出上一条记录\r\n\t\t\t\t\t\tcontext.write(outKey, nvl);\r\n\r\n\t\t\t\t\t\t// 然后再次记录当前遍历到的这一条记录\r\n\t\t\t\t\t\toutKey.set(key);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// 最后无论如何,还得输出最后一次\r\n\t\t\tcontext.write(outKey, NullWritable.get());\r\n\t\t}",
"public static Map<Integer, Double> accumulate(DiskPositionalIndex index, int corpusSize, String query) throws IOException {\n Map<Integer, Double> accumulator = new HashMap<>();\n\n getTokens(query).forEach((token) -> {\n List<Posting> postings = index.getPostings(token);\n\n System.out.println(\"Postings size: \" + postings.size());\n \n //Calculate w(q,t) \n double wQT = 0.0, accu = 0.0, wDT = 0.0;\n \n if (!postings.isEmpty()) {\n wQT = Math.log(1.0 + ((double) corpusSize / (double) postings.size()));\n }\n\n for (Posting p : postings) {\n // Never encountered, add and initialize\n // if (!accumulator.containsKey(p.getDocumentId())) {\n // accumulator.put(p.getDocumentId(), 0.0);\n // }\n \n // Calculate weight of doc = 1 + ln(tf(t,d)) \n // wDT = 1.0 + Math.log((double) p.getPositions().size());\n wDT = p.getTermFrequency();\n \n // Acquire A(d)\n accu = accumulator.getOrDefault(p.getDocumentId(), 0.0); \n \n accumulator.put(p.getDocumentId(), accu + (wQT * wDT));\n }\n });\n \n // Divide all A(d) by L(d)\n for (Integer key : accumulator.keySet()) {\n if (accumulator.get(key) != 0.0) {\n // Accumulator = Accumulator / L(d)\n accumulator.put(key, (double) accumulator.get(key) / index.getDocWeight(key));\n }\n }\n \n return accumulator; \n }",
"@Override\n\t\tprotected void reduce(Text key, Iterable<WebLogBean> value,\n\t\t\t\tReducer<Text, WebLogBean, NullWritable, PageViewsBean>.Context context)\n\t\t\t\tthrows IOException, InterruptedException {\n\t\t\tIterator<WebLogBean> weblogs = value.iterator();\n\t\t\tList<PageViewsBean> lists = new ArrayList<PageViewsBean>();\n\t\t\tWebLogBean weblog = null;\n\t\t\twhile (weblogs.hasNext()) {\n\t\t\t\tweblog = weblogs.next();\n\t\t\t\tPageViewsBean pageView = PageViewsBean.getInstance(weblog);\n\t\t\t\tif (pageView != null) {\n\t\t\t\t\tlists.add(pageView);\n\t\t\t\t}\n\t\t\t}\n\t\t\tString session = UUID.randomUUID().toString();\n\t\t\tint step = 1;\n\t\t\tint count = lists.size();\n\t\t\tPageViewsBean pageView = new PageViewsBean() ;\n\t\t\tfor (int i = 1; i < count; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tPageViewsBean bean = lists.get(i - 1);\n\t\t\t\t\tlong startTime = df.parse(bean.getTimestr()).getTime();\n\t\t\t\t\tlong end = df.parse(lists.get(i).getTimestr()).getTime();\n\t\t\t\t\tbean.setStep(step);\n\t\t\t\t\tbean.setSession(session);\n\t\t\t\t\tbean.setStaylong(String.valueOf(end - startTime));\n\t\t\t\t\tif (end - startTime < 30 * 60 * 1000) {\n\t\t\t\t\t\tstep++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstep = 1;\n\t\t\t\t\t\tsession = UUID.randomUUID().toString();\n\t\t\t\t\t}\n\t\t\t\t\tcontext.write(k, bean);\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tsession = UUID.randomUUID().toString();\n\t\t\tpageView = lists.get(count-1);\n\t\t\tpageView.setStaylong(\"60\");\n\t\t\tpageView.setSession(session);\n\t\t\tpageView.setStep(step);\n\t\t\tcontext.write(k, pageView);\n\t\t\tsession = UUID.randomUUID().toString();\n\t\t}",
"public static ArrayList<Integer> getWorkoutMonthCount(Calendar day, Context mContext) {\n DatabaseHelper handler = new DatabaseHelper(mContext);\n SQLiteDatabase database = handler.getWritableDatabase();\n\n long dayLength = 86400000;\n\n day.set(Calendar.HOUR, 0);\n day.set(Calendar.MINUTE, 0);\n day.set(Calendar.SECOND, 0);\n day.set(Calendar.MILLISECOND, 0);\n\n long monthStart = day.getTimeInMillis();\n long monthEnd = monthStart + dayLength * 42;\n Log.i(LOG_TAG, \"Month Start: \" + monthStart + \" | Month End: \" + monthEnd);\n\n ArrayList<Integer> eventsList = new ArrayList<>(42);\n for (int i = 0; i < 42; i++) {\n eventsList.add(0);\n }\n\n //grade type\n String[] projection = {\n DatabaseContract.CalendarTrackerEntry._ID,\n DatabaseContract.CalendarTrackerEntry.COLUMN_DATE,\n DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB};\n String whereClause = DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB + \"=? AND \" + DatabaseContract.CalendarTrackerEntry.COLUMN_DATE + \" BETWEEN ? AND ?\";\n String[] whereValue = {String.valueOf(DatabaseContract.IS_WORKOUT), String.valueOf(monthStart), String.valueOf(monthEnd)};\n\n Cursor cursor = database.query(DatabaseContract.CalendarTrackerEntry.TABLE_NAME,\n projection,\n whereClause,\n whereValue,\n null,\n null,\n null);\n\n int idColumnOutput = cursor.getColumnIndex(DatabaseContract.CalendarTrackerEntry.COLUMN_DATE);\n\n int cursorCount = cursor.getCount();\n Log.i(LOG_TAG, \"idColumnOutput: \" + idColumnOutput + \" | cursorCount: \" + cursorCount);\n\n if (cursorCount != 0) {\n //cursor.moveToFirst();\n while (cursor.moveToNext()) {\n long outputDate = cursor.getLong(idColumnOutput);\n long outputDay = (outputDate - monthStart) / dayLength;\n Log.i(LOG_TAG, \"outputDate: \" + outputDate + \" | outputDay: \" + outputDay);\n eventsList.set((int) outputDay, 1);\n }\n }\n\n try {\n return eventsList;\n } finally {\n cursor.close();\n database.close();\n handler.close();\n }\n }",
"public void reduce(Text key, Iterable<IntWritable> values, Context context)\n\t\t\tthrows IOException, InterruptedException {\n\t\tMongoClient mongo = new MongoClient(\"localhost\", 27017);\n\n\t\t/**** Get database ****/\n\t\t// if database doesn't exists, MongoDB will create it for you\n\t\tDB db = mongo.getDB(\"testdb\");\n\n\t\t/**** Get collection / table from 'testdb' ****/\n\t\t// if collection doesn't exists, MongoDB will create it for you\n\t\tDBCollection table = db.getCollection(\"sentimentByDate\");\n\t\t\n\t\t\ttry {\n\n\t\t\t\tIterator<IntWritable> i = values.iterator();\n\t\t\t\tint count = 0;\n\t\t\t\t\n\t\t\t\twhile (i.hasNext())\n\t\t\t\t\tcount += i.next().get();\n\t\t\t\t\n\t\t\t\tText resultDate = new Text(\n\t\t\t\t\t\tDateConverter.monthToReadableDate(key.toString()));\n\t\t\t\t\n\t\t\t\tcontext.write(resultDate, new Text(count + \" Positives\"));\n\n\t\t\t\t/**** Insert ****/\n\t\t\t\t// create a document to store key and value\n\t\t\t\tBasicDBObject document = new BasicDBObject();\n\t\t\t\tdocument.put(\"Date\", resultDate.toString());\n\t\t\t\tdocument.put(\"Rate\", count+\"Positives\");\n\t\t\t\t\n\t\t\t\ttable.insert(document);\n\n\t\t\t} finally {\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t\n\n\t}",
"protected static PassengerQueue readTQ() {\n\n // Creating a PassengerQueue object to store trainQueue.\n PassengerQueue trainQueue = new PassengerQueue();\n\n // Connecting to a Mongo Client.\n MongoClient mongoClient = new MongoClient(\"localHost\", 27017);\n\n // Accessing the database.\n MongoDatabase mongoDatabase = mongoClient.getDatabase(\"TrainQueue\");\n // Retrieving a collection.\n MongoCollection<Document> mongoCollection = mongoDatabase.getCollection(\"DenuwaraManike\");\n\n // Getting all the Documents.\n FindIterable<Document> documents = mongoCollection.find();\n\n // Adding all documents data to trainQueue PassengerQueue object.\n // Getting today's date.\n LocalDate today = LocalDate.now();\n // Getting system's timezone.\n ZoneId defaultZoneId = ZoneId.systemDefault();\n\n for (Document document : documents) {\n // Converting stored date to LocalDate.\n Instant instant = document.getDate(\"Date\").toInstant();\n LocalDate loadedDate = instant.atZone(defaultZoneId).toLocalDate();\n\n // Comparing the stored date with today's date.\n long date = ChronoUnit.DAYS.between(today, loadedDate);\n\n // Adding to the trainQueue when the date is today's date.\n if (date == 0) {\n Passenger passenger = new Passenger(\n document.getString(\"PassengerName\"),\n document.getString(\"PassengerNIC\"),\n document.getString(\"SeatNumber\"));\n passenger.setSecondsInQueue(document.getInteger(\"SecondsInQueue\"));\n trainQueue.add(passenger, document.getInteger(\"Train\"));\n }\n }\n\n // Disconnecting form the Mongo client.\n mongoClient.close();\n\n TrainStation.setWaitingRoom();\n\n for (int train = 0; train < 2; train++) {\n for (int passenger = 0; passenger < trainQueue.getQueueLength(train); passenger++) {\n String seatNumberTQ = trainQueue.getQueueArray(train)[passenger].getSeatNumber();\n if (TrainStation.getWaitingRoom()[train][seatNumberConverter(seatNumberTQ)] != null) {\n if (TrainStation.getWaitingRoom()[train][seatNumberConverter(seatNumberTQ)].getSeatNumber().equalsIgnoreCase(seatNumberTQ)) {\n TrainStation.getWaitingRoom()[train][seatNumberConverter(seatNumberTQ)] = null;\n }\n }\n }\n }\n\n // Returning the populated trainQueue.\n return trainQueue;\n\n }",
"private void loadDataFromFirebase() {\n\n db.collection(\"users\").document(userId).collection(\"sleep\")\n .orderBy(\"dateTime\", Query.Direction.ASCENDING)\n .get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n\n for (QueryDocumentSnapshot querySnapshot : task.getResult()) {\n\n timestampToDate = querySnapshot.getTimestamp(\"dateTime\").toDate();\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\", Locale.ENGLISH);\n dayDate = sdf.format(timestampToDate);\n sensorPressure = querySnapshot.getBoolean(\"sensorPressure\");\n sleepDateTimeData.add(new SleepDateTimeData(dayDate, sensorPressure, timestampToDate));\n i++;\n }\n\n accumulateData();\n\n }\n\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(SleepActivity.this, \"Problem ---1---\", Toast.LENGTH_SHORT).show();\n Log.w(\"!---1---\", e.getMessage());\n }\n });\n }",
"@Override\n\tprotected void reduce(CompositeKey key, Iterable<Text> values,\n\t\t\tContext context) throws IOException, InterruptedException {\n\n\t\tConfiguration conf = context.getConfiguration();\n\n\t\t// System.out.println(\"Dimension from Reducer = \" + dimension);\n\t\ttry {\n\t\t\tint count = 0;\n\t\t\tString timeS = \"\";\n\t\t\tArrayList<ArrayList<Text>> editSessions = new ArrayList<ArrayList<Text>>();\n\t\t\tArrayList<Text> session = new ArrayList<Text>();\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\n\t\t\t\t\t\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\n\t\t\tsdf.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n\t\t\tDate oldDate = null, newDate;\n\t\t\tint i = 0;\n\t\t\tString times=\"\";\n\t\t\tfor (Text val : values) {\n\t\t\t\tcount++;\n\t\t\t\ttimes+=val.toString()+\" \";\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\t\t\t\n\t\t\tcontext.write(key.getUser(), new Text(count+\" : \"+times));\n\n\t\t} catch (Exception e) {\n\t\t}\n\t}",
"@Path(\"fetch/{query}/{limit}\")\r\n @GET\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public Response fetchTweets(@PathParam(\"query\") final String query, @PathParam(\"limit\") final String limit)\r\n {\r\n log.debug(\"GET: augmentTweets: \" + query + \"\\tlimit string: \" + limit);\r\n\r\n final TweetList list = new TweetList();\r\n final int limitValue = Integer.parseInt(limit);\r\n\r\n // TODO try-with-resources should be:\r\n // try(final MongoClient client = new MongoClient(host, port)){\r\n try (final MongoClient client = new MongoClient(\"74.140.208.12\", 6789))\r\n {\r\n final MongoCollection<Document> coll = client.getDatabase(\"visualdb\").getCollection(\"visualcollection\");\r\n\r\n final Document queryDoc = new Document();\r\n queryDoc.put(\"query\", query);\r\n\r\n final FindIterable<Document> results = coll.find(queryDoc);\r\n\r\n int count = 0;\r\n for (final Document doc : results)\r\n {\r\n count++;\r\n\r\n final Tweet tweet = new Tweet();\r\n tweet.setText(doc.getString(\"text\"));\r\n tweet.setTweetUrl(doc.getString(\"url\"));\r\n tweet.setId(doc.getString(\"tweetId\"));\r\n\r\n final Location loc = new Location();\r\n loc.setInitialized(true);\r\n\r\n final Document locationDoc = doc.get(\"loc\", Document.class);\r\n loc.setLatitude(locationDoc.getDouble(\"latitude\").doubleValue());\r\n loc.setLongitude(locationDoc.getDouble(\"longitude\").doubleValue());\r\n tweet.setLocation(loc);\r\n\r\n final List<String> imageUrls = new ArrayList<>();\r\n final List<?> urls = doc.get(\"images\", List.class);\r\n\r\n for (final Object object : urls)\r\n {\r\n imageUrls.add(object.toString());\r\n }\r\n tweet.setImageUrls(imageUrls);\r\n\r\n final List<String> entities = new ArrayList<>();\r\n final List<?> entityList = doc.get(\"entities\", List.class);\r\n for (final Object object : entityList)\r\n {\r\n entities.add(object.toString());\r\n }\r\n tweet.setExtractedEntities(entities);\r\n list.getTweets().add(tweet);\r\n\r\n if (count > limitValue)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return Response.ok(list).build();\r\n }",
"private static void loadResults() {\r\n\t\tint index = 5;\r\n\t\tsiteMap = new HashMap<String, Map<String, List<? extends TransactionData>>>();\r\n\t\ttry(MongoClient connection = new MongoClient(\"localhost\", 27017);){\r\n\t\t\twhile(index >= 5 && index <= 9) {\r\n\t\t\t\tString dbName = \"site\" + index + \"ResultsDB\";\r\n\t\t\t\tMongoDatabase database = connection.getDatabase(dbName);\r\n\t\t\t\tcollectionsMap = new HashMap<String, List<? extends TransactionData>>();\r\n\t\t\t\tfor (String collection : database.listCollectionNames()) {\r\n\t\t\t\t\ttry(MongoCursor<Document> iterator = database.getCollection(collection).find().iterator();) {\r\n\t\t\t\t\t\tloadCollectionData(iterator, collection);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tsiteMap.put(\"site\" + index, collectionsMap);\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public void apply(String key, TimeWindow window, Iterable<Tuple2<Point, Point>> input, Collector<Tuple2<Point, Point>> out) throws Exception {\n\n HashMap<String, Point> secondIDPointMap = new HashMap<>();\n Point firstPoint = null;\n Boolean firstPointSet = false;\n\n for (Tuple2<Point, Point> e :input) {\n\n // Setting the first pair point, if not already set\n if(!firstPointSet){\n firstPoint = e.f0;\n firstPointSet = true;\n }\n\n Point existingPoint = secondIDPointMap.get(e.f1.objID);\n if(existingPoint != null){ // If element is already in the set\n Long oldTimestamp = existingPoint.timeStampMillisec;\n if(e.f1.timeStampMillisec > oldTimestamp){ // if new timestamp is larger, replace the old element with new\n secondIDPointMap.replace(e.f1.objID, e.f1);\n }\n }\n else { // insert new element if does not exist\n secondIDPointMap.put(e.f1.objID, e.f1);\n }\n }\n\n // Collecting output\n for (Map.Entry<String, Point> entry : secondIDPointMap.entrySet()){\n out.collect(Tuple2.of(firstPoint, entry.getValue()));\n }\n }",
"@Override\n public void apply(String key, TimeWindow window, Iterable<Tuple2<Point, Point>> input, Collector<Tuple2<Point, Point>> out) throws Exception {\n\n HashMap<String, Point> secondIDPointMap = new HashMap<>();\n Point firstPoint = null;\n Boolean firstPointSet = false;\n\n for (Tuple2<Point, Point> e :input) {\n\n // Setting the first pair point, if not already set\n if(!firstPointSet){\n firstPoint = e.f0;\n firstPointSet = true;\n }\n\n Point existingPoint = secondIDPointMap.get(e.f1.objID);\n if(existingPoint != null){ // If element is already in the set\n Long oldTimestamp = existingPoint.timeStampMillisec;\n if(e.f1.timeStampMillisec > oldTimestamp){ // if new timestamp is larger, replace the old element with new\n secondIDPointMap.replace(e.f1.objID, e.f1);\n }\n }\n else { // insert new element if does not exist\n secondIDPointMap.put(e.f1.objID, e.f1);\n }\n }\n\n // Collecting output\n for (Map.Entry<String, Point> entry : secondIDPointMap.entrySet()){\n out.collect(Tuple2.of(firstPoint, entry.getValue()));\n }\n }",
"@Override\n public void apply(String key, TimeWindow window, Iterable<Tuple2<Point, Point>> input, Collector<Tuple2<Point, Point>> out) throws Exception {\n\n HashMap<String, Point> secondIDPointMap = new HashMap<>();\n Point firstPoint = null;\n Boolean firstPointSet = false;\n\n for (Tuple2<Point, Point> e :input) {\n\n // Setting the first pair point, if not already set\n if(!firstPointSet){\n firstPoint = e.f0;\n firstPointSet = true;\n }\n\n Point existingPoint = secondIDPointMap.get(e.f1.objID);\n if(existingPoint != null){ // If element is already in the set\n Long oldTimestamp = existingPoint.timeStampMillisec;\n if(e.f1.timeStampMillisec > oldTimestamp){ // if new timestamp is larger, replace the old element with new\n secondIDPointMap.replace(e.f1.objID, e.f1);\n }\n }\n else { // insert new element if does not exist\n secondIDPointMap.put(e.f1.objID, e.f1);\n }\n }\n\n // Collecting output\n for (Map.Entry<String, Point> entry : secondIDPointMap.entrySet()){\n out.collect(Tuple2.of(firstPoint, entry.getValue()));\n }\n }",
"private Map<String, List<Double>> updateWordMapForTotalCountK(\n\t\t\tMap<String, List<Double>> wordMap, double totalWordCountPerDocument) {\n\t\tIterator<Entry<String, List<Double>>> iterator = wordMap.entrySet().iterator();\n\t\twhile(iterator.hasNext()){\n\t\t\t Map.Entry<String, List<Double>> entry = (Map.Entry<String, List<Double>>) iterator.next();\n\t\t\t if(totalWordCountPerDocument> 0.0)\n\t\t\t\t entry.getValue().set(5,entry.getValue().get(0)); //store unnormized version\n\t\t\t\t entry.getValue().set(0,entry.getValue().get(0)/totalWordCountPerDocument); //add all tf for total words\n\t\t\t \t}\n\t\n\t\treturn wordMap;\n\t}",
"public void readMongo(String dbName,String collectionNameSrc,int startAt, int batchSize){\n\t\ttry{ \n\t\t\t// To connect to mongodb server\n\t\t\tMongoClient mongoClient = new MongoClient( \"localhost\" , 27017 );\n\t\t\t// Now connect to your databases\n\t\t\tDB db = mongoClient.getDB( dbName );\n//\t\t\tSystem.out.println(\"Connect to database successfully\");\n\n\t\t\t// get a collection object to work with\n\t\t\tDBCollection coll = db.getCollection(collectionNameSrc);\n\n\t\t\tBasicDBObject query = new BasicDBObject();\n\n\t\t\tDBCursor cursor = coll.find(query, null, startAt, 500);\n\t\t\tint count = 0;\n\t\t\ttry {\n\t\t\t\twhile(cursor.hasNext()){\n\t\t\t\t\tif(count>batchSize){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tDBObject temp = cursor.next();\n\t\t\t\t\tString input = temp.get(\"text\").toString();\n\t\t\t\t\tCleaning objCleaning = new Cleaning();\n\t\t\t\t\t\n\t\t\t\t\t//remove username\n\t\t\t\t\tinput = objCleaning.removeUserNameFromTweet(input);\n\t\t\t\t\t\n\t\t\t\t\t// remove RT symbol\n\t\t\t\t\tinput = objCleaning.removeRTFromTweet(input);\n\t\t\t\t\t\n\t\t\t\t\tinput= objCleaning.removeUrl(input);\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(input);\n\t\t\t\t\t\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} finally {\n\t\t\t\tcursor.close();\n\n\t\t\t}\n\t\t\t//\t\t System.out.println(\"Written to \"+fileName + \" sucessfully\");\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\t//\t\t System.err.println( e.getClass().getName() + \": \" + e.getMessage() );\n\t\t}\n\t}",
"private static void prMode(DiskIndexWriter diskWriter, DiskPositionalIndex disk_posIndex) throws ClassNotFoundException, InstantiationException, IllegalAccessException, FileNotFoundException {\n long time = 0;\n GUI.JListModel.clear();\n\n if (query.equals(\"q\")) {\n\n System.exit(0);\n }\n MAP mean_ap = new MAP(path);\n //returns qRel.keyset() i.e. queries \n Set<String> queries = mean_ap.getQueries();\n List<Long> time_per_query = new ArrayList<>();\n //run ranked retrival for each query\n for (String q : queries) {\n time = 0;\n List<String> word = new ArrayList();\n\n query = q;\n long start = System.currentTimeMillis();\n\n String[] query_array = query.split(\"\\\\s+\");\n TokenProcessor processor = new NewTokenProcessor();\n\n for (int i = 0; i < query_array.length; i++) {\n word.add(processor.processToken(query_array[i]).get(0));\n }\n long t1 = System.currentTimeMillis();\n time = t1 - start; //time to parse\n StrategyFactory sf = new StrategyFactory();\n StrategyInterface strategy = sf.execute(rankedOption);\n\n //maps postings to accumulator value\n HashMap<Integer, Doc_accum> postingMap = new HashMap<Integer, Doc_accum>();\n\n PriorityQueue<Doc_accum> queue = new PriorityQueue<>(Collections.reverseOrder());\n\n List<Posting> postings = new ArrayList<>();\n List<Doc_accum> results = new ArrayList<>();\n\n for (String term : word) {\n long t2 = System.currentTimeMillis();\n\n if (term.equals(\"\")) {\n continue;\n } else {\n\n postings = disk_posIndex.getPosting_noPos(term);\n long t3 = System.currentTimeMillis();\n time = time + (t3 - t2);\n\n for (Posting p : postings) { //for each document in the postings list\n double t_fd = p.getT_fd();\n double d_ft = p.getD_ft();\n double w_qt = strategy.calculate_wqt(N, d_ft);\n double accum = 0;\n double w_dt = strategy.get_wdt(t_fd, disk_posIndex, p.getDocumentId());\n\n //pairs (Ranked_posting, accumulator factor)\n if (postingMap.containsKey(p.getDocumentId())) {\n accum = postingMap.get(p.getDocumentId()).getAccumulator();\n accum += (w_qt * w_dt);\n postingMap.replace(p.getDocumentId(), new Doc_accum(p, accum)); //replaces old accum value\n\n } else {\n accum += (w_qt * w_dt);\n postingMap.put(p.getDocumentId(), new Doc_accum(p, accum));\n }\n }\n\n }\n }\n for (Integer p : postingMap.keySet()) {\n Doc_accum doc_temp = postingMap.get(p);\n double accum = doc_temp.getAccumulator(); //gets accum associated with doc\n\n if (accum > 0) {\n //search for each p's Ld factor in docWeights.bin\n double l_d = strategy.calculate_Ld(disk_posIndex, doc_temp.getPosting().getDocumentId());\n\n accum /= l_d;\n doc_temp.setAccumulator(accum);\n }\n\n queue.add(postingMap.get(p));\n\n }\n\n //returns top K=10 results \n int topK = 50;\n\n while ((results.size() < topK) && queue.size() > 0) {\n\n results.add(queue.poll()); //gets the posting acc pair and returns only posting\n\n }\n time_per_query.add(time);\n List<String> filenames = get_RankedResults(results);\n\n mean_ap.add_poseRel(q, filenames);\n\n }\n\n double map_result = mean_ap.mean_ap();\n String mapDisplay = \"Mean average precision: \" + map_result;\n GUI.JListModel.addElement(mapDisplay);\n System.out.println(\"\\n\" + mapDisplay);\n\n double throughput_result = mean_ap.calculate_throughput(time_per_query);\n String throughput_Display = \"Throughput of the system is: \" + throughput_result;\n GUI.JListModel.addElement(throughput_Display);\n System.out.println(throughput_Display);\n\n double mrt_result = mean_ap.calculae_mean_response_time(time_per_query);\n String mrt_Display = \"Mean Response Time of the system is: \" + mrt_result;\n GUI.JListModel.addElement(mrt_Display);\n System.out.println(mrt_Display);\n\n }",
"@Override\n public void run()\n {\n Double yearsSumArray[] = {0.0,0.0 };\n LinkedHashMap<Integer,Double > data_years = new LinkedHashMap<>();\n SortedSet<Long> keys = new TreeSet<>(data.keySet());\n for (Long key : keys)\n {\n Double value = data_years.get(key);\n Date date = new Date(key);\n int year = getYearNumber(date);\n if(data_years.get(year) == null)\n data_years.put(year,value);\n else\n data_years.put(year,data_years.get(year)+value);\n\n }\n Iterator iterator = data_years.entrySet().iterator();\n while (iterator.hasNext())\n {\n LinkedHashMap.Entry<Integer, Double>set = (LinkedHashMap.Entry<Integer, Double>) iterator.next();\n getActivity().runOnUiThread(new OneShotTask(label, datasetIndex,(long)set.getKey(),set.getValue()));\n }\n\n }",
"private void setRunStats(DocumentReference runReference) {\n runReference.get(getCacheSource())\n .addOnCompleteListener(task -> {\n try {\n DocumentSnapshot snapshot = task.getResult();\n Map<String, Object> data;\n if (snapshot != null && (data = snapshot.getData()) != null) {\n WeeklyStat weeklyStat = WeeklyStat.from(data);\n TextView distance = findViewById(R.id.runDistance);\n distance.setText(String.format(Locale.getDefault(), \"%,.01fkm\", weeklyStat.getDistance()));\n TextView time = findViewById(R.id.runTime);\n time.setText(Utils.durationToHoursMinutes(weeklyStat.getTime()));\n TextView elevation = findViewById(R.id.runElevation);\n elevation.setText(String.format(Locale.getDefault(), \"%dm\", weeklyStat.getElevation()));\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n });\n }",
"private static void sample1(ScoredDocIDs collection, int collectionSize, int[] sample, long[] times) \n throws IOException {\n ScoredDocIDsIterator it = collection.iterator();\n if (returnTimings) {\n times[0] = System.currentTimeMillis();\n }\n int sampleSize = sample.length;\n int prime = findGoodStepSize(collectionSize, sampleSize);\n int mod = prime % collectionSize;\n if (returnTimings) {\n times[1] = System.currentTimeMillis();\n }\n int sampleCount = 0;\n int index = 0;\n for (; sampleCount < sampleSize;) {\n if (index + mod < collectionSize) {\n for (int i = 0; i < mod; i++, index++) {\n it.next();\n }\n } else {\n index = index + mod - collectionSize;\n it = collection.iterator();\n for (int i = 0; i < index; i++) {\n it.next();\n }\n }\n sample[sampleCount++] = it.getDocID();\n }\n if (returnTimings) {\n times[2] = System.currentTimeMillis();\n }\n }",
"public static void main(String args[]) throws Exception\r\n {\r\n System.out.println(\"start\");\r\n final Map<String, LogData> timeInHoursMinsAndLogDataMap = new LinkedHashMap();\r\n final Scanner input = new Scanner(System.in);\r\n int totalRecords = 0;\r\n final List<String> keysToRemove = new ArrayList<>(2);\r\n Set<String> processed = new HashSet<>();\r\n\r\n while (input.hasNext())\r\n {\r\n System.out.println(\"while\");\r\n Long time = Long.parseLong(input.next());\r\n Double processingTime = Double.parseDouble(input.next());\r\n\r\n boolean process = true;\r\n final Date date = new Date(time * 1000);\r\n final String key = String.valueOf(date.getHours()) + \":\" + String.valueOf(date.getMinutes());\r\n if (processed.contains(key))\r\n continue;\r\n if (timeInHoursMinsAndLogDataMap.size() > 0)\r\n {\r\n keysToRemove.clear();\r\n for (Map.Entry<String, LogData> entry : timeInHoursMinsAndLogDataMap.entrySet())\r\n {\r\n final int diffSeconds = getDiffBetweenCurrentAndMapSeconds(key, entry.getKey(), date.getSeconds(),\r\n entry.getValue().maxSeconds);\r\n if (diffSeconds > 60)\r\n {\r\n System.out.println(entry.getValue().getResult());\r\n keysToRemove.add(entry.getKey());\r\n processed.add(entry.getKey());\r\n }\r\n else if (diffSeconds < -60)\r\n {\r\n process = false;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (!process)\r\n continue;\r\n\r\n removeKeyFromMap(timeInHoursMinsAndLogDataMap, keysToRemove);\r\n\r\n LogData logData = timeInHoursMinsAndLogDataMap.get(key);\r\n if (logData == null)\r\n {\r\n logData = new LogData();\r\n logData.setTimeStamp(time);\r\n }\r\n logData.updateBuckets(processingTime);\r\n logData.updateMaxSeconds(date.getSeconds());\r\n timeInHoursMinsAndLogDataMap.put(key, logData);\r\n\r\n }\r\n\r\n for (Map.Entry<String, LogData> entry : timeInHoursMinsAndLogDataMap.entrySet())\r\n {\r\n System.out.println(entry.getValue().getResult());\r\n }\r\n \r\n System.out.println(\"end\");\r\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tsynchronized (OnlineObjectsContainer.this.onlineObjects) {\n\t\t\t\t\tIterator<OnlineObject> iterator = OnlineObjectsContainer.this.recentlyAddedObjects.iterator();\n\t\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\t\tfinal OnlineObject anObject = iterator.next();\n\t\t\t\t\t\tif (anObject.getSeenAt().getTime() + OnlineObjectsContainer.RECENT_TIMEOUT < System.currentTimeMillis()) {\n\t\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\titerator = OnlineObjectsContainer.this.recentlyRemovedObjects.iterator();\n\t\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\t\tfinal OnlineObject anObject = iterator.next();\n\t\t\t\t\t\tif (anObject.getSeenAt().getTime() + OnlineObjectsContainer.RECENT_TIMEOUT < System.currentTimeMillis()) {\n\t\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"protected void doAWTimeSlice()\n\t\tthrows DbCompException\n\t{\n//AW:TIMESLICE\n dates.add(_timeSliceBaseTime);\n//AW:TIMESLICE_END\n\t}",
"private static void collectObjectDataModifiedSinceDate(Date collectionTime, Integer numberOfDays) {\n\t\t\n\t\tList<String> hosts = Arrays.asList(ecsHosts.split(\",\"));\n\t\t\n\t\t\n\t\t// instantiate billing BO\n\t\tBillingBO billingBO = new BillingBO( ecsMgmtAccessKey, \n\t\t\t\t\t\t\t\t\t\t\t ecsMgmtSecretKey,\n\t\t\t\t\t\t\t\t\t\t\t hosts,\n\t\t\t\t\t\t\t\t\t\t\t ecsMgmtPort,\n\t\t\t\t\t\t\t\t\t\t\t null, // dao is not required in this case\n\t\t\t\t\t\t\t\t\t\t\t objectCount ); \n\t\t\n\t\t// Instantiate DAO\n\t\tObjectDAO objectDAO = null;\n\t\tif(!elasticHosts.isEmpty()) {\n\t\t\t\n\t\t\t// Instantiate ElasticSearch DAO\n\t\t\tElasticDAOConfig daoConfig = new ElasticDAOConfig();\n\t\t\tdaoConfig.setHosts(Arrays.asList(elasticHosts.split(\",\")));\n\t\t\tdaoConfig.setPort(elasticPort);\n\t\t\tdaoConfig.setClusterName(elasticCluster);\n\t\t\tdaoConfig.setCollectionTime(collectionTime);\n\t\t\tdaoConfig.setCollectionType(EcsCollectionType.object);\n\t\t\tinitXPackConfig(daoConfig);\n\t\t\tobjectDAO = new ElasticS3ObjectDAO(daoConfig);\n\t\t\t\n\t\t\t// init indexes\n\t\t\tobjectDAO.initIndexes(collectionTime);\n\t\t} else {\n\t\t\t// Instantiate file DAO\n\t\t\tobjectDAO = new FileObjectDAO();\n\t\t}\n\t\t\n\t\t\n\t\tObjectBO objectBO = new ObjectBO(billingBO, hosts, objectDAO, threadPoolExecutor, futures, objectCount );\n\t\t\n\t\t// query criteria should look like ( LastModified >= 'since date' )\n\t\t\n\t\tDate sinceDate = new Date( (collectionTime.getTime() - (TimeUnit.MILLISECONDS.convert(numberOfDays, TimeUnit.DAYS)) ));\n\t\t\n\t\tString yesterdayDateTime = DATA_DATE_FORMAT.format( sinceDate );\n\t\tString queryCriteria = \"( \" + ECS_OBJECT_LAST_MODIFIED_MD_KEY + \" >= '\" + yesterdayDateTime + \"' )\";\n\t\t\n\t\t// Start collection\n\t\tobjectBO.collectObjectData(collectionTime, queryCriteria);\n\t\t\n\t\tobjectBO.shutdown();\n\t}",
"public String prepareOutput(ArrayList<DocTermList> doc_term_lists){\n double handling_time = (double)(System.currentTimeMillis() - start_time)/1000; \n Output output = new Output(handling_time, doc_term_lists.size());\n \n for(int i=start_index; i<Math.min(end_index,doc_term_lists.size());i++){\n int doc_id = Integer.valueOf(doc_term_lists.get(i).docID);\n String title = ServerThread.doc_titles[doc_id];\n String url = ServerThread.doc_urls[doc_id];\n double page_rank = ServerThread.page_rank[doc_id];\n double relevant_score;\n if (model.equals(\"LANGUAGE\")){\n relevant_score = doc_term_lists.get(i).final_score;\n }\n else {\n relevant_score = doc_term_lists.get(i).relevant_rank;\n }\n \n \n OutputDoc output_doc = new OutputDoc(doc_id, title, url, relevant_score, page_rank);\n output.output_doc_list.add(output_doc);\n } \n Gson gson = new Gson();\n String final_result = gson.toJson(output);\n //System.out.println(final_result);\n return final_result;\n }",
"@Override\n\t\tpublic void map(Key key, Value value, Context context)\n\t\t\t\tthrows IOException, InterruptedException {\n\t\t\tSortedMap<Key,Value> entries = WholeRowIterator.decodeRow(key, value);\n\t\t\t\n\t\t\t// If we have counts for the given ngram for both time periods, we will have 2 Entrys that look like\n\t\t\t// RowId: ngram\n\t\t\t// CQ: Date Granularity (ex. DAY, HOUR)\n\t\t\t// CF: Date Value (ex. 20120102, 2012010221)\n\t\t\t// Value: count\n\t\t\t// We know the entries are sorted by Key, so the first entry will have the earlier date value \n\t\t\tif ( entries.size() == 2 ) {\n\t\t\t\t\n\t\t\t\t// Read the Entrys and pull out the two counts\n\t\t\t\tlong [] counts = new long[2];\n\t\t\t\tint index = 0;\n\t\t\t\tfor ( Entry<Key,Value> entry : entries.entrySet() ) {\n\t\t\t\t\tcounts[index++] = LongCombiner.VAR_LEN_ENCODER.decode( entry.getValue().get());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Generate a trending score for this ngram\n\t\t\t\tint score = calculateTrendingScore( counts, context );\n\t\t\t\t\n\t\t\t\t// If we have a valid score, write out the score to Accumulo\n\t\t\t\tif ( score > 0 ) {\n\t\t\t\t\t\n\t\t\t\t\tint sortableScore = Integer.MAX_VALUE - score;\n\t\t\t\t\t\n\t\t\t\t\t// RowId is the time we are calculating trends for, i.e. DAY:20120102\n\t\t\t\t\t// CF is Integer.MAX_VALUE - trending score so that we sort the highest scores first\n\t\t\t\t\t// CQ is the ngram\n\t\t\t\t\t// Value is empty\n\t\t\t\t\tString rowId = context.getConfiguration().get(\"rowId\");\n\t\t\t\t\tMutation mutation = new Mutation( rowId );\n\t\t\t\t\tmutation.put( new Text( String.valueOf(sortableScore)), entries.firstKey().getRow(), emptyValue );\n\t\t\t\t\tcontext.write( null, mutation );\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public Map allRatedAndAverage() {\n begin();\n\n return finalRecs;\n }",
"@Async\n public void indexBlogEntriesSince(final Date date) {\n Pageable pageable = PageRequest.of(0, 100);\n\n Page<Entry> entries = entryRepository.findAll(pageable);\n for (int i = 0; i < entries.getTotalPages(); i++) {\n final ArrayList<BlogEntry> items = new ArrayList<>();\n for (final Entry entry : entries) {\n if (entry.getDate().before(date)) {\n if (!items.isEmpty()) blogEntryRepository.saveAll(items);\n // stop processing items.\n return;\n }\n\n items.add(convert(entry));\n }\n\n blogEntryRepository.saveAll(items);\n\n pageable = PageRequest.of(i + 1, 100);\n entries = entryRepository.findAll(pageable);\n }\n }",
"private void invertedToDatabase(){\r\n cleFreq = new HashMap<>();\r\n System.out.println(\"Strat collecting\");\r\n Map<String,List<Invertedindex>> collects = collecting();\r\n System.out.println(\"Ending collecting\");\r\n Database.getInstance().invertedIndex(collects);\r\n Database.getInstance().addPoids(cleFreq);\r\n }",
"@Override\n public void run() {\n final Location location = getLastBestLocation();\n\n\n location.getLatitude();\n location.getLongitude();\n\n\n\n\n\n // Create a new user with a first and last name\n Map<String, Object> user = new HashMap<>();\n user.put(\"lat\", location.getLatitude());\n user.put(\"long\", location.getLongitude());\n\n// Add a new document with a generated ID\n\n db.collection(\"gps\").document(\"QvFfCM86QQJRAIk68MQv\").update(user)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\nString locs= location.getLatitude()+\",\"+location.getLongitude();\n loc.setText(locs);\n Log.w(TAG, \"onSuccess\"+count);\n count = count+1;\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.w(TAG, \"Error adding document\", e);\n }\n });\n\n // Repeat every 2 seconds\n handler.postDelayed(runnable, 500);\n }",
"public static void fillReducedCounter(RequestCounter fromCounter, RequestCounter toCounter, long aggregatePeriodInMillis, boolean onlyCompleteBuckets) {\n\n\t if (fromCounter.getTimePeriod().equals(toCounter.getTimePeriod())) {\n\t log.debug(\"From counter and to counter time periods are not equal, might have surprising effects... FROM[{}] TO[{}]\", fromCounter, toCounter);\n }\n\n if (aggregatePeriodInMillis <= 0 ) {\n\t throw new LogRaterException(String.format(\"Invalid aggregation period in millis, should be larger than 0: %d\", aggregatePeriodInMillis));\n }\n\n\t\tTimePeriod timePeriod = fromCounter.getTimePeriod();\n\t\tlong start = timePeriod.getStartTime();\n\t\tlong end = timePeriod.getEndTime();\n\n\t\tlong totalDurationInPeriod = 0;\n\t\tint hitsInPeriod = 0;\n\t\tint period = 1;\n\t\tlong middleOfPeriod = start + (aggregatePeriodInMillis / 2);\n\t\tlong endOfPeriod = start + aggregatePeriodInMillis;\n \n\t\t// walk through all items until last, so resource connections can be closed on last hasNext call that returns false\n\t\tfor (TimeMeasurement tm : fromCounter) {\n\n // fast forward to the bucket where the first time measurement resides.\n while (hitsInPeriod == 0 && tm.getTimestamp() >= endOfPeriod) {\n period = period + 1;\n endOfPeriod = start + (period * aggregatePeriodInMillis);\n middleOfPeriod = endOfPeriod - (aggregatePeriodInMillis / 2);\n }\n\n // for all entries within current time period, calculate totals\n\t\t\tif (tm.getTimestamp() < endOfPeriod) {\n\t\t\t\thitsInPeriod++;\n\t\t\t\ttotalDurationInPeriod = totalDurationInPeriod + tm.getDurationInMillis();\n\t\t\t} else {\n\t\t\t // end of a period, save the accumulated date for the previous period\n\t\t\t toCounter.incRequests(middleOfPeriod, (int) (totalDurationInPeriod / hitsInPeriod));\n\t\t\t // start a new period\n hitsInPeriod = 1;\n totalDurationInPeriod = tm.getDurationInMillis();\n // fast forward to the bucket where the next time measurement resides.\n while (tm.getTimestamp() >= endOfPeriod) {\n period = period + 1;\n endOfPeriod = start + (period * aggregatePeriodInMillis);\n middleOfPeriod = endOfPeriod - (aggregatePeriodInMillis / 2);\n }\n\t\t\t}\n\t\t}\n\t\t\n\t\t// add last entry if at end of time period and if incomplete buckets are allowed\n\t\tif (end == endOfPeriod || (hitsInPeriod != 0 && !onlyCompleteBuckets)) {\n\t\t\ttoCounter.incRequests(middleOfPeriod, (int) (totalDurationInPeriod / hitsInPeriod));\n\t\t}\n\t}",
"private TopDocs combine(TopDocs in, HashMap<Integer, Float> resorted, QueryRescoreContext ctx) {\n for(int i=0;i<in.scoreDocs.length;i++) {\n if (resorted.size() != 0 && resorted.containsKey(in.scoreDocs[i].doc))\n {\n float score = (!ctx.normalize) ? resorted.get(in.scoreDocs[i].doc) :\n ((resorted.get(in.scoreDocs[i].doc) - bottomScore) / getDenominator());\n in.scoreDocs[i].score = ctx.scoreMode.combine(in.scoreDocs[i].score * ctx.queryWeight(), score * ctx.rescoreQueryWeight());\n }\n else\n {\n in.scoreDocs[i].score *= ctx.queryWeight();\n }\n }\n\n Arrays.sort(in.scoreDocs, SCORE_DOC_COMPARATOR);\n\n return in;\n }",
"public TreeMap<String, Integer[]> generateAppCategory(Date startDate, Date endDate) {\n\n //Total Usage Time for each appid\n TreeMap<Integer, Double> appResult = new TreeMap<Integer, Double>();\n //Total Usage Time for each category\n TreeMap<String, Double> result = new TreeMap<String, Double>();\n //Total Usage Time and Percent for each category\n TreeMap<String, Integer[]> toResult = new TreeMap<String, Integer[]>();\n\n AppUsageDAO auDAO = new AppUsageDAO();\n ArrayList<User> userList = new ArrayList<User>();\n\n userList = auDAO.retrieveUsers(startDate, endDate);\n for (int i = 0; i < userList.size(); i++) {\n\n User currUser = userList.get(i);\n ArrayList<AppUsage> userUsage = auDAO.retrieveByUser(currUser.getMacAddress(), startDate, endDate);\n Date nextDay = new Date(startDate.getTime() + 60 * 60 * 1000 * 24);\n\n Date oldTime = null;\n if (userUsage.size() > 0) {\n oldTime = userUsage.get(0).getDate();\n if (oldTime.after(nextDay)) {\n nextDay = new Date(nextDay.getTime() + 60 * 60 * 1000 * 24);\n }\n }\n\n for (int j = 1; j < userUsage.size(); j++) {\n AppUsage au = userUsage.get(j);\n Date newTime = au.getDate();\n\n //store oldTime appId\n int appId = userUsage.get(j - 1).getAppId();\n boolean beforeAppeared = false;\n if (newTime.before(nextDay)) {\n beforeAppeared = true;\n\n //difference = usage time of the oldTime appId\n double difference = Utility.secondsBetweenDates(oldTime, newTime);\n\n //If difference less than/equal 2 minutes\n if (difference <= 2 * 60) {\n // add time to the appId\n if (appResult.containsKey(appId)) {\n double value = appResult.get(appId);\n appResult.put(appId, (value + difference));\n } else {\n appResult.put(appId, difference);\n }\n\n } else {\n // add 10sec to appid if > 2 mins\n if (appResult.containsKey(appId)) {\n double value = appResult.get(appId);\n appResult.put(appId, (value + 10));\n } else {\n appResult.put(appId, 10.0);\n }\n\n }\n\n } else {\n nextDay = new Date(nextDay.getTime() + 60 * 60 * 1000 * 24);\n\n if (!beforeAppeared) {\n double diff = Utility.secondsBetweenDates(oldTime, newTime);\n //add time to the appid\n if (diff <= 2 * 60) {\n // add time to the appId\n if (appResult.containsKey(appId)) {\n double value = appResult.get(appId);\n appResult.put(appId, (value + diff));\n } else {\n appResult.put(appId, diff);\n }\n\n } else {\n // add 10sec to appid if > 2 mins\n if (appResult.containsKey(appId)) {\n double value = appResult.get(appId);\n appResult.put(appId, (value + 10));\n } else {\n appResult.put(appId, 10.0);\n }\n\n }\n }\n\n }\n\n oldTime = newTime;\n\n }\n\n //get the appId of the last user usage\n int lastAppId = userUsage.get(userUsage.size() - 1).getAppId();\n\n if (oldTime.before(nextDay)) {\n double difference = Utility.secondsBetweenDates(oldTime, nextDay);\n //add the time difference to last appId\n if (difference < 10) {\n if (appResult.containsKey(lastAppId)) {\n double value = appResult.get(lastAppId);\n appResult.put(lastAppId, (value + difference));\n } else {\n appResult.put(lastAppId, difference);\n }\n } else {\n if (appResult.containsKey(lastAppId)) {\n double value = appResult.get(lastAppId);\n appResult.put(lastAppId, (value + 10));\n } else {\n appResult.put(lastAppId, 10.0);\n }\n }\n } else {\n\n if (appResult.containsKey(lastAppId)) {\n double value = appResult.get(lastAppId);\n appResult.put(lastAppId, (value + 10));\n } else {\n appResult.put(lastAppId, 10.0);\n }\n\n }\n\n //DIVIDE TO GET INTO DAYS\n long days = Utility.daysBetweenDates(startDate, endDate);\n\n AppDAO app = new AppDAO();\n\n //Retrieve appid in each category\n TreeMap<String, ArrayList<Integer>> appCategoryList = app.retrieveByCategory();\n Iterator<String> iter = appCategoryList.keySet().iterator();\n double totTime = 0.0;\n //Sum the total time by category\n while (iter.hasNext()) {\n String key = iter.next();\n //EACH CATEGORY\n ArrayList<Integer> innerList = appCategoryList.get(key);\n double totCatTime = 0.0;\n for (int j = 0; j < innerList.size(); j++) {\n int appid = innerList.get(j);\n double timePerApp = 0.0;\n\n if (appResult.containsKey(appid)) {\n timePerApp = appResult.get(appid);\n\n }\n totCatTime += timePerApp;\n }\n\n double avgCatTime = totCatTime / days;\n\n totTime += avgCatTime;\n result.put(key, avgCatTime);\n }\n\n Iterator<String> iterator = result.keySet().iterator();\n //Calculate the percentage for each category\n while (iterator.hasNext()) {\n\n String name = iterator.next();\n double duration = result.get(name);\n double percent = (duration / totTime) * 100;\n Integer[] arrToReturn = new Integer[2];\n\n arrToReturn[0] = Integer.valueOf(Math.round(duration) + \"\");\n arrToReturn[1] = Integer.valueOf(Math.round(percent) + \"\");\n toResult.put(name, arrToReturn);\n\n }\n\n }\n ArrayList<String> catList = Utility.retrieveCategories();\n\n for (String cat : catList) {\n if (!toResult.containsKey(cat)) {\n Integer[] arrToReturn = new Integer[2];\n arrToReturn[0] = 0;\n arrToReturn[1] = 0;\n toResult.put(cat, arrToReturn);\n }\n }\n return toResult;\n }",
"@java.lang.Override\n public long getNextCollectTimestampMs() {\n return nextCollectTimestampMs_;\n }",
"@java.lang.Override\n public long getNextCollectTimestampMs() {\n return nextCollectTimestampMs_;\n }",
"public void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n word.set(value);\n String line = word.toString();\n String[] col_vals = line.split(\",\");\n\n Text total_Passenger_key = new Text(\"_Passenger\");\n Text total_Trip_key = new Text(\"_Trip\");\n\n if (!col_vals[0].trim().isEmpty()) {\n DateTimeFormatter format = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\");\n\n try {\n \n // changing the type of first column to date value\n LocalDateTime date = LocalDateTime.parse(col_vals[1], format);\n\n // getting week days\n DayOfWeek days_of_week = date.getDayOfWeek();\n\n // For weekend - mention weekend\n if (days_of_week.toString() == \"SATURDAY\" || days_of_week.toString() == \"SUNDAY\") {\n\n context.write(new Text(date.getHour() + \"Weekend_\" + total_Passenger_key),\n new IntWritable(Integer.parseInt(col_vals[3])));\n context.write(new Text(date.getHour() + \"Weekend_\" + total_Trip_key), one);\n }\n // For weekday - mention weekday\n else {\n\n context.write(new Text(date.getHour() + \"Weekday_\" + total_Passenger_key),\n new IntWritable(Integer.parseInt(col_vals[3])));\n context.write(new Text(date.getHour() + \"Weekday_\" + total_Trip_key), one);\n\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }",
"private static double timeMap(int threadCount, final OurMap<Integer, String> map) {\n final int iterations = 5_000_000, perThread = iterations / threadCount;\n final int range = 200_000;\n return exerciseMap(threadCount, perThread, range, map);\n }",
"public void run() {\n long num = numEvents.get();\n long lastnum = lastNumEvents.get();\n long evps = (num-lastnum)/App.METRICS_PER_SECOND;\n lastNumEvents.set(num);\n System.out.println(\"Consumer[\"+\n nnaammee+\"]: cursorRestarts=\"+cursorRestarts.get()\n +\" numEvents=\"+num\n +\" events/second=\"+evps\n +\" totalNumEvents=\"+totalNumEvents.get());\n }",
"public com.twc.bigdata.views.avro.viewing_info.Builder clearSecondsWatched() {\n seconds_watched = null;\n fieldSetFlags()[4] = false;\n return this;\n }",
"@Override\n\tpublic HashMap<String, Object> batchDayAttdMgtProcess(String applyDay, String dept) {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\" batchDayAttdMgtProcess 시작 \");\n\t\t}\n\n\t\tConnection con = null;\n\t\tCallableStatement cstmt = null;\n\t\tResultSet rs = null;\n\t\tResultTO resultTO = null;\n\t\tArrayList<DayAttdMgtTO> dayAttdMgtList = new ArrayList<DayAttdMgtTO>();\n\t\tHashMap<String, Object> resultMap = new HashMap<>();\n\t\ttry {\n\t\t\tcon = dataSourceTransactionManager.getConnection();\n\t\t\tStringBuffer query = new StringBuffer();\n\t\t\tquery.append(\"{call P_HR_ATTENDANCE.P_CREATE_DAY_ATTD_MANAGE(TO_DATE(?,'YYYY-MM-DD'),?,?,?,?)}\");\n\t\t\tcstmt = con.prepareCall(query.toString());\n\t\t\tcstmt.setString(1, applyDay);\n\t\t\tcstmt.setString(2, dept);\n\t\t\tcstmt.registerOutParameter(3, oracle.jdbc.OracleTypes.CURSOR);\n\t\t\tcstmt.registerOutParameter(4, java.sql.Types.VARCHAR);\n\t\t\tcstmt.registerOutParameter(5, java.sql.Types.VARCHAR);\n\t\t\tcstmt.execute();\n\n\t\t\tresultTO = new ResultTO();\n\t\t\tresultTO.setErrorCode(cstmt.getString(4));\n\t\t\tresultTO.setErrorMsg(cstmt.getString(5));\n\t\t\t\n\t\t\trs = (ResultSet)cstmt.getObject(3);\n\t\t\tDayAttdMgtTO datAttdMgt = null;\n\t\t\twhile (rs.next()) {\n\t\t\t\tdatAttdMgt = new DayAttdMgtTO();\n\t\t\t\tdatAttdMgt.setEmpCode(rs.getString(\"EMP_CODE\"));\n\t\t\t\tdatAttdMgt.setEmpName(rs.getString(\"EMP_NAME\"));\n\t\t\t\tdatAttdMgt.setApplyDays(rs.getString(\"APPLY_DAYS\"));\n\t\t\t\tdatAttdMgt.setDayAttdCode(rs.getString(\"DAY_ATTD_CODE\"));\n\t\t\t\tdatAttdMgt.setDayAttdName(rs.getString(\"DAY_ATTD_NAME\"));\n\t\t\t\tdatAttdMgt.setAttendTime(rs.getString(\"ATTEND_TIME\"));\n\t\t\t\tdatAttdMgt.setQuitTime(rs.getString(\"QUIT_TIME\"));\n\t\t\t\tdatAttdMgt.setLateWhether(rs.getString(\"LATE_WHETHER\"));\n\t\t\t\tdatAttdMgt.setLeaveHour(rs.getString(\"LEAVE_HOUR\"));\n\t\t\t\tdatAttdMgt.setWorkHour(rs.getString(\"WORK_HOUR\"));\n\t\t\t\tdatAttdMgt.setOverWorkHour(rs.getString(\"OVER_WORK_HOUR\"));\n\t\t\t\tdatAttdMgt.setNightWorkHour(rs.getString(\"NIGHT_WORK_HOUR\"));\n\t\t\t\tdatAttdMgt.setFinalizeStatus(rs.getString(\"FINALIZE_STATUS\"));\n\t\t\t\tdayAttdMgtList.add(datAttdMgt);\n\t\t\t}\n\t\t\tresultMap.put(\"dayAttdMgtList\", dayAttdMgtList);\n\t\t\tresultMap.put(\"resultTO\", resultTO);\n\t\t\t\n\t\t\tif (logger.isDebugEnabled()) {\n\t\t\t\tlogger.debug(\" batchDayAttdMgtProcess 종료 \");\n\t\t\t}\n\t\t\treturn resultMap;\n\t\t} catch (Exception sqle) {\n\t\t\tlogger.fatal(sqle.getMessage());\n\t\t\tthrow new DataAccessException(sqle.getMessage());\n\t\t} finally {\n\t\t\tdataSourceTransactionManager.close(cstmt,rs);\n\t\t}\n\t}",
"public static void docWtgArray() {\n int docCount = 0;\n\n while(docCount<totaldocument) {\n List<Double> pass = new ArrayList();\n for(Entry<String,List<Double>> entry : wtgMap.entrySet()) {\n List<Double> docList = new ArrayList();\n docList = entry.getValue();\n double temp = docList.get(docCount);\n pass.add(temp);\n }\n\n double answer = CosineSimilarity(pass,query);\n if(answer >= alpha) {\n DocID.put(docCount,answer);\n }\n docCount++;\n }\n }",
"public static ArrayList<Integer> getWorkoutClimbMonthCount(Calendar day, Context mContext) {\n DatabaseHelper handler = new DatabaseHelper(mContext);\n SQLiteDatabase database = handler.getWritableDatabase();\n\n long dayLength = 86400000;\n\n day.set(Calendar.HOUR, 0);\n day.set(Calendar.MINUTE, 0);\n day.set(Calendar.SECOND, 0);\n day.set(Calendar.MILLISECOND, 0);\n\n long monthStart = day.getTimeInMillis();\n long monthEnd = monthStart + dayLength * 42;\n Log.i(LOG_TAG, \"Month Start: \" + monthStart + \" | Month End: \" + monthEnd);\n\n ArrayList<Integer> eventsList = new ArrayList<>(42);\n for (int i = 0; i < 42; i++) {\n eventsList.add(0);\n }\n\n //grade type\n String[] projection = {\n DatabaseContract.CalendarTrackerEntry._ID,\n DatabaseContract.CalendarTrackerEntry.COLUMN_DATE,\n DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB};\n String whereClause = DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB + \"=? AND \" + DatabaseContract.CalendarTrackerEntry.COLUMN_DATE + \" BETWEEN ? AND ?\";\n String[] whereValue = {String.valueOf(DatabaseContract.IS_GYMCLIMB), String.valueOf(monthStart), String.valueOf(monthEnd)};\n Cursor cursor = database.query(DatabaseContract.CalendarTrackerEntry.TABLE_NAME,\n projection,\n whereClause,\n whereValue,\n null,\n null,\n null);\n\n int idColumnOutput = cursor.getColumnIndex(DatabaseContract.CalendarTrackerEntry.COLUMN_DATE);\n\n int cursorCount = cursor.getCount();\n Log.i(LOG_TAG, \"idColumnOutput: \" + idColumnOutput + \" | cursorCount: \" + cursorCount);\n\n if (cursorCount != 0) {\n //cursor.moveToFirst();\n while (cursor.moveToNext()) {\n long outputDate = cursor.getLong(idColumnOutput);\n long outputDay = (outputDate - monthStart) / dayLength;\n Log.i(LOG_TAG, \"outputDate: \" + outputDate + \" | outputDay: \" + outputDay);\n eventsList.set((int) outputDay, 1);\n }\n }\n\n try {\n return eventsList;\n } finally {\n cursor.close();\n database.close();\n handler.close();\n }\n }",
"public static void main(String[] args) throws FileNotFoundException, UnsupportedEncodingException {\n\t\tString \tmongoHost \t= \"localhost\";\n\t\tint \tmongoPort\t= 27017;\n\t\tString mongoDb\t\t= \"grits-net-meteor\";\n\t\tString airportsCol\t= \"airports\";\n\t\t\n\t\tList<String> countries = getUniqueCountryList(mongoHost, mongoPort, mongoDb, airportsCol );\n\t\t\n\t\tPrintWriter writer = new PrintWriter(\"./res/output.txt\", \"UTF-8\");\n\t\tfor(String country : countries) {\n\t\t\twriter.println(\" \");\n\t\t\twriter.println(\"Now analyzing country: \" + country);\n\t\t\t\n\t\t\t//Our database has a country that is \"Unknown Country\"\n\t\t\tif(!country.equals(\"Unknown Country\")) {\n\t\t\t\tCoordinates countryCenter = getCountryCenter(country);\n\t\t\t\t\n\t\t\t\tList<Airport> airports = getAirportsInCountry(mongoHost, mongoPort, mongoDb, airportsCol, country);\n\t\t\t\twriter.println(\"Number airports in country: \" + airports.size());\n\t\t\t\t\n\t\t\t\tDescriptiveStatistics stats = new DescriptiveStatistics();\n\t\t\t\tfor(Airport airport : airports){\n\t\t\t\t\tdouble lat1 = airport.getCoordinates().getLatitude();\n\t\t\t\t\tdouble lon1 = airport.getCoordinates().getLongitude();\n\t\t\t\t\tdouble lat2 = countryCenter.getLatitude();\n\t\t\t\t\tdouble lon2 = countryCenter.getLongitude();\n\t\t\t\t\tdouble distance = Haversine.haversine(lat1, lon1, lat2, lon2);\n\t\t\t\t\tstats.addValue(distance);\n\t\t\t\t}\n \n\t\t\t\t// Compute some statistics\n\t\t\t\tdouble mean = stats.getMean();\n\t\t\t\tdouble std \t= stats.getStandardDeviation();\n\t\t\t\t\n\t\t\t\t//Only remove outliers if relatively normal\n\t\t\t\tif(std > 0 && airports.size() > 5) {\n\t\t\t\t\t\n\t\t\t\t\tNormalDistribution normalDistribution = new NormalDistribution(mean, std);\n\t\t\t\t\tfor(Airport airport : airports) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tdouble lat1 = airport.getCoordinates().getLatitude();\n\t\t\t\t\t\tdouble lon1 = airport.getCoordinates().getLongitude();\n\t\t\t\t\t\tdouble lat2 = countryCenter.getLatitude();\n\t\t\t\t\t\tdouble lon2 = countryCenter.getLongitude();\n\t\t\t\t\t\tdouble distance = Haversine.haversine(lat1, lon1, lat2, lon2);\n\t\t\t\t\t\tdouble pValue = normalDistribution.cumulativeProbability(distance);\n\t\t\t\t\t\t \n\t\t\t\t\t\t//Could tighten up RIGHT HERE. TODO Add significance value maybe\n\t\t\t\t\t\tif( (pValue > 0.97) && distance > mean) \n{\n\t\t\t\t\t\t\twriter.println(\"Possible Outlier: \" + airport.getId() + \" distance to country center: \" + distance + \" pValue: \" + pValue);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\t\t\n\t\twriter.close();\n\t}",
"private int gather(QueryTargetInfo info) {\n ArrayList<TweetData> res;\n int count = 0;\n int tempCount;\n int ndx;\n boolean flag = true;\n\n info.smallestId = null;\n\n do {\n flag = true;\n res = query(info);\n\n //If there was an error getting the tweets, then don't continue.\n if (res == null) {\n flag = false;\n } else {\n //If we did not get the maximum tweets, then don't continue\n if (res.size() < (MAX_PAGES * RPP)) {\n flag = false;\n }\n\n //Save the results in the db.\n tempCount = store.insertTweets(info, res);\n\n count += tempCount;\n }\n } while (flag);\n\n return count;\n }",
"private void sampleOfTheGeneratedWindowedAggregate() {\n Iterator<Integer[]> iterator = null;\n\n // builder3\n Integer[] rows = iterator.next();\n\n int prevStart = -1;\n int prevEnd = -1;\n\n for ( int i = 0; i < rows.length; i++ ) {\n // builder4\n Integer row = rows[i];\n\n int start = 0;\n int end = 100;\n if ( start != prevStart || end != prevEnd ) {\n // builder5\n int actualStart = 0;\n if ( start != prevStart || end < prevEnd ) {\n // builder6\n // recompute\n actualStart = start;\n // implementReset\n } else { // must be start == prevStart && end > prevEnd\n actualStart = prevEnd + 1;\n }\n prevStart = start;\n prevEnd = end;\n\n if ( start != -1 ) {\n for ( int j = actualStart; j <= end; j++ ) {\n // builder7\n // implementAdd\n }\n }\n // implementResult\n // list.add(new Xxx(row.deptno, row.empid, sum, count));\n }\n }\n // multiMap.clear(); // allows gc\n // source = Linq4j.asEnumerable(list);\n }",
"protected void zoomToPast(){\n //zoom out\n int maxTimeSpread = widgg.timeorg.lastShortTimeDateInCurve - widgg.timeorg.firstShortTimeDateInCurve;\n if(xpCursor1 >=0){\n ixDataCursor1 = ixDataShown[xpCursor1];\n }\n if(xpCursor2 >=0){\n ixDataCursor2 = ixDataShown[xpCursor2];\n }\n xpCursor1New = xpCursor2New = cmdSetCursor; \n if(widgg.timeorg.timeSpread < 0x3fffffff) { widgg.timeorg.timeSpread *=2; }\n else { widgg.timeorg.timeSpread = 0x7fffffff; }\n bPaintAllCmd = true;\n widgg.redraw(100, 200);\n \n }",
"void processRecords(Vector in, SummitFileWriter out) { \n\n\t\t// Create array for storing a set of summit records\n\t\tSummitRecord[] recs = new SummitRecord[in.size()];\n\n\t\ttry {\n\t\t\t// Loop on i, j, marget segment, and inputfile \n\t\t\tfor (int iz = 1; iz <= mZones; iz++) {\n\t\t\t\tfor (int jz = 1; jz <= mZones; jz++) {\n\t\t\t\t\tfor (int sg = 1; sg <= mSegments; sg++) {\n\t\t\t\t\t\tfor (int i=0; i<in.size(); i++) {\n\t\t\t\t\t\t\trecs[i] = ((SummitFileReader)in.elementAt(i)).getSpecificRecord(iz,jz,sg);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSummitRecord mrgRec = mergeRecords(recs);\n\t\t\t\t\t\tif (mrgRec != null) {\n//\t\t\t\t\t\t\tif (iz==756 && jz==57) {\n//\t\t\t\t\t\t\t\tSystem.out.println(\"Found it\");\n//\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmrgRec.setPtaz((short)iz);\n\t\t\t\t\t\t\tmrgRec.setAtaz((short)jz);\n\t\t\t\t\t\t\tmrgRec.setMarket((short)sg);\n\t\n\t\t\t\t\t\t\tout.writeRecord(mrgRec);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\" \"+iz);\n\t\t\t\tif (iz % 19 == 18) System.out.println();\n\n\t\t\t}\n\t\t\tSystem.out.println(\"\\nDone.\");\n\n\t\t} catch (IOException ioe) {\n\t\t System.err.println(\"\\n Trouble!\\n\");\n\t\t ioe.printStackTrace();\n\t\t System.exit(1);\n\t\t}\n\t}",
"protected void clearOutEvents() {\n\t}",
"protected void clearOutEvents() {\n\t}",
"@Override\r\n\tpublic void flushAll(Date date) {\n\t\t\r\n\t}",
"private void refreshGoalData () {\n DateTime now = DateTime.now();\n if((now.getWeekOfWeekyear() > userGoals.getWeekOfYear()) || now.getWeekOfWeekyear() == 0 ) {\n userGoals.setWeekOfYear(now.getWeekOfWeekyear());\n userGoals.setRunsPerWeekActual(0);\n userGoals.setMilesPerWeekActual(0.0);\n }\n\n //Calculates weekly mileage and runs per week\n double mileage = 0.0;\n int numOfRuns = 0;\n if(runMap != null && !(runMap.isEmpty())) {\n //Get current year and current week of the year\n int year = now.getYear();\n int currWeek = now.getWeekOfWeekyear();\n Calendar c = Calendar.getInstance();\n c.clear();\n //Set calendar to beginning of week\n c.set(Calendar.YEAR, year);\n c.set(Calendar.WEEK_OF_YEAR, currWeek);\n Date beginningOfWeek = c.getTime();\n\n SimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yyyy\");\n\n for (String key : runMap.keySet()) {\n Run run = runMap.get(key);\n //Date stored as MM/dd/yyyy\n try {\n Date dateOfRun = formatter.parse(run.getDate());\n if (dateOfRun.compareTo(beginningOfWeek) >= 0) {\n mileage += run.getMileage();\n numOfRuns++;\n }\n }catch (ParseException p) {\n //idfk\n }\n\n }\n\n if(userShoes != null && !userShoes.isEmpty()) {\n //While we're here, we're going to update the mileage for each shoe\n for (String shoeKey : userShoes.keySet()) {\n Shoe currShoe = userShoes.get(shoeKey);\n currShoe.setMileage(0.0);\n for (String runKey : runMap.keySet()) {\n if (currShoe.getName().equals(runMap.get(runKey).getShoe())) {\n currShoe.addMileage(runMap.get(runKey).getMileage());\n }\n }\n }\n }\n\n }\n userGoals.setRunsPerWeekActual(numOfRuns);\n userGoals.setMilesPerWeekActual(mileage);\n\n\n goalRef.setValue(userGoals);\n shoeRef.setValue(userShoes);\n\n check = 1;\n }",
"public ArrayList<String> getCountStatics() {\n\t\tint countsPerMinute = 0;\n\t\tint countsPerHour = 0;\n\t\tint countsPerDay = 0;\n\t\tint countsPerWeek = 0;\n\t\tint countsPerMonth = 0;\n\n\t\t// get a comparison time and start comparing the times against it\n\t\tArrayList<String> myArrayString = new ArrayList<String>();\n\t\tCalendar currDate = Calendar.getInstance();\n\t\tfor (int i = 0; i < clickerCountObject.getClickerTimestamps().size(); i++) {\n\t\t\tSystem.out.println(clickerCountObject.getClickerTimestamps().get(i)\n\t\t\t\t\t.get(Calendar.MINUTE) <= currDate.get(Calendar.MINUTE));\n\t\t\tif (currDate.get(Calendar.MINUTE) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MINUTE)\n\t\t\t\t\t&& currDate.get(Calendar.MINUTE) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MINUTE)) {\n\t\t\t\tcountsPerMinute += 1;\n\t\t\t}\n\t\t\tif (currDate.get(Calendar.HOUR_OF_DAY) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.HOUR_OF_DAY)\n\t\t\t\t\t&& currDate.get(Calendar.HOUR_OF_DAY) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.HOUR_OF_DAY)) {\n\t\t\t\tcountsPerHour += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.DAY_OF_MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.DAY_OF_MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.DAY_OF_MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.DAY_OF_MONTH))) {\n\t\t\t\tcountsPerDay += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.WEEK_OF_MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.WEEK_OF_MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.WEEK_OF_MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.WEEK_OF_MONTH))) {\n\t\t\t\tcountsPerWeek += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MONTH))) {\n\t\t\t\tcountsPerMonth += 1;\n\t\t\t}\n\t\t}\n\t\tmyArrayString.add(\"Counts per Minute \"\n\t\t\t\t+ Integer.toString(countsPerMinute));\n\t\tmyArrayString.add(\"Counts per Hour \" + Integer.toString(countsPerHour));\n\t\tmyArrayString.add(\"Counts per Day \" + Integer.toString(countsPerDay));\n\t\tmyArrayString.add(\"Counts per Week \" + Integer.toString(countsPerWeek));\n\t\tmyArrayString.add(\"Counts per Month \"\n\t\t\t\t+ Integer.toString(countsPerMonth));\n\n\t\tSystem.out.println(myArrayString);\n\t\treturn myArrayString;\n\t}",
"public DBCursor exportData() {\n\t\tCalendar startDate = new GregorianCalendar(2012, 9-1, 01, 0, 0, 0);\n\t\tCalendar endDate = new GregorianCalendar(2012, 9-1, 30, 23, 59, 59);\n\n\t\t/*\t*/\n\t\tBasicDBObject query = new BasicDBObject(\"date\", new BasicDBObject(\n\t\t\t\t\"$gte\", startDate.getTime()).append(\"$lte\", endDate.getTime()));\n\t\t//query.append(\"componentName\", \"CONTROL/DV10/FrontEnd/Cryostat\");\n\t\t//query.append(\"monitorPointName\", \"GATE_VALVE_STATE\");\n\t\t//query.append(\"componentName\", \"CONTROL/DV16/LLC\");\n\t\t//query.append(\"monitorPointName\", \"POL_MON4\");\n\n\t\t// Used only when the query take more than 10 minutes.\n\t\t_collection.addOption(Bytes.QUERYOPTION_NOTIMEOUT);\n\n\t\t/*\t*/\n\n\t\t// Registros utilizados para probar la diferencia de la zona horaria \n\t\t// local con la del servidor de mongo\n\t\t//BasicDBObject query = new BasicDBObject(\"_id\", new ObjectId(\"50528be325d8b6dfbafd7ac2\"));\n\t\t//BasicDBObject query = new BasicDBObject(\"_id\", new ObjectId(\"50529496a310ecc5da59531c\"));\n\n\t\tcursor = _collection.find(query);\n\n\t\t//System.out.println(\"Collections: \"+_database.getCollectionNames());\n\t\t\n\t\t//System.out.println(\"Error: \"+_database.getLastError());\n\t\treturn cursor;\n\t}",
"public void finish()\n {\n // Save space in the document and score lists.\n docs.compact();\n docScores.compact();\n \n // Figure out a group for each document.\n docGroups = new IntList(maxDoc+1);\n docGroups.fill(-1);\n for (int i = 0; i < docs.size(); i++) \n {\n int doc = docs.get(i);\n \n // Skip docs that already have a group assigned.\n if (docGroups.get(doc) >= 0)\n continue;\n \n // Go looking...\n findGroup(doc);\n } // for i\n \n // Form the group -> doc mapping\n groupDocs = new IntMultiMap(nGroups);\n for (int i = 0; i < docs.size(); i++ ) {\n int doc = docs.get(i);\n int group = docGroups.get(doc);\n assert group >= 0 : \"group should have been assigned\";\n groupDocs.add(group, doc);\n }\n \n debugGroups(0);\n \n }",
"public static void main(String[] args) throws IOException, ParseException, JSONException, TwitterException, org.apache.lucene.queryparser.classic.ParseException, Exception {\n Boolean recalculate_general_index = false; //PAY ATTENTION, HEAVY TIME CONSUMING!!!! if you already have the tweet_index folder don't use this as true\r\n// Boolean recalculate_yesno_index = true; \r\n Boolean recalculate_yesno_index = false; // medium time consuming - not a big deal\r\n \r\n \r\n indexing.MainIndex.run_main_index(recalculate_general_index,recalculate_yesno_index);\r\n \r\n \r\n// Boolean create_temporal_yesno_plot = true;\r\n Boolean create_temporal_yesno_plot = false; //FAST!\r\n if (create_temporal_yesno_plot){\r\n TimeSeriesPlot.create_timeseries_plot();\r\n }\r\n \r\n //create SAX string and clusterize them for each of the two group (Y, N)\r\n int alphabet_size = 2; //is the number of letter to consider, basically if it's a is under the median, otherwise it's more \r\n int number_yes_cluster = 13; // n. of yes clusters\r\n int number_no_cluster = 13; // n. of no clusters\r\n// Boolean computeSAXstringAndKmeans = true;\r\n Boolean computeSAXstringAndKmeans = false; // fast enough (less than 1 minutes)\r\n if (computeSAXstringAndKmeans){\r\n SAXanalysisAndKMeans.saxStringAndKMeansComputation(alphabet_size, number_no_cluster, number_yes_cluster);\r\n }\r\n double thresholdLFT = 0.3;\r\n double thresholdTotal = 0.1;\r\n// boolean cooccurenceGraphsComputation = true;\r\n boolean cooccurenceGraphsComputation = false; // medium time consuming - not a big deal\r\n if (cooccurenceGraphsComputation){\r\n CooccurenceGraphs.getCoOccurenceGraphCCandKCore(number_no_cluster, number_yes_cluster, thresholdLFT, thresholdTotal);\r\n }\r\n \r\n// Boolean classify_user = true;\r\n Boolean classify_user = false; //HEAVY TIME CONSUMING (12 to 14 hours)\r\n if (classify_user){\r\n UsersCandidatesSupporter.UserYesNoSupporter.createUserClassification();\r\n }\r\n \r\n// Boolean extractLCCandHITS = true;\r\n Boolean extractLCCandHITS = false; //medium time consuming - not a big deal\r\n \r\n Boolean computeSpreadOfInfluence = true;\r\n// Boolean computeSpreadOfInfluence = false;\r\n if (extractLCCandHITS){\r\n GraphAnalysisUsers analysis4graph = new GraphAnalysisUsers();\r\n WeightedDirectedGraph graph = analysis4graph.saveLccHITSandTop500();\r\n if (computeSpreadOfInfluence){\r\n MainLPA.getLPA(graph);\r\n }\r\n }\r\n else{\r\n WeightedDirectedGraph graph = GraphAnalysisUsers.getGraph(); \r\n MainLPA.getLPA(graph);\r\n }\r\n\r\n \r\n \r\n }",
"void takeAfter(){\n afterTimeNs=System.nanoTime();\n lastdt=afterTimeNs-beforeTimeNs;\n samplesNs[index++]=afterTimeNs-lastAfterTime;\n lastAfterTime=afterTimeNs;\n if(index>=nSamples) index=0;\n }",
"private void outputResults()\n{\n try {\n PrintWriter pw = new PrintWriter(new FileWriter(output_file));\n pw.println(total_documents);\n for (Map.Entry<String,Integer> ent : document_counts.entrySet()) {\n String wd = ent.getKey();\n int ct = ent.getValue();\n pw.println(ct + \" \" + wd);\n }\n pw.println(START_KGRAMS);\n pw.println(total_kdocuments);\n for (Map.Entry<String,Integer> ent : kgram_counts.entrySet()) {\n String wd = ent.getKey();\n int ct = ent.getValue();\n pw.println(ct + \" \" + wd);\n } \n pw.close();\n }\n catch (IOException e) {\n IvyLog.logE(\"SWIFT\",\"Problem generating output\",e);\n }\n}",
"private void updateMean() {\r\n double tmp = 0.0;\r\n for (Tweet t : members) {\r\n tmp += t.getDateLong();\r\n }\r\n tmp = tmp / (double) members.size();\r\n this.mean = tmp;\r\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tsynchronized (OnlineObjectsContainer.this.onlineObjects) {\n\t\t\t\t\tfinal Iterator<OnlineObject> iterator = OnlineObjectsContainer.this.onlineObjects.iterator();\n\t\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\t\tfinal OnlineObject anObject = iterator.next();\n\t\t\t\t\t\tif (anObject.getSeenAt().getTime() + OnlineObjectsContainer.EXPIRATION_TIME < System.currentTimeMillis()) {\n\t\t\t\t\t\t\tOnlineObjectsContainer.this.recentlyRemovedObjects.add(anObject);\n\t\t\t\t\t\t\tOnlineObjectsContainer.this.recentlyAddedObjects.remove(anObject);\n\t\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tlong start=System.currentTimeMillis();\r\n\t\t\t\tHashSetAdd hsd=new HashSetAdd();\r\n\t\t\t\tHashSet<String> hs2=hsd.add();\r\n\t\t\t\tSystem.out.println(\"size2=:\"+hs2.size());\r\n\t\t\t\tIterator<String> iter = hs2.iterator();\r\n\t\t\t\twhile(iter.hasNext()){\r\n\t\t\t\t String result = iter.next();\r\n\t\t\t\t }\r\n\t\t\t\t\r\n\t\t\t\tlong end=System.currentTimeMillis();\r\n\t\t\t\tSystem.out.println(\"time2=: \"+(end-start));\r\n\t\t\t}",
"@Override\n public void run() {\n FirebaseFirestore.getInstance().collection(\"users/\" + companyID + \"/trips\")\n .addSnapshotListener(new EventListener<QuerySnapshot>() {\n @Override\n public void onEvent(@Nullable QuerySnapshot value, @Nullable FirebaseFirestoreException e) {\n if (e != null) {\n Log.w(TAG, \"Listen failed.\", e);\n return;\n }\n tripList.clear();//clear the ArrayList, because this method get all the document id instead of\n //the one that just created\n for (QueryDocumentSnapshot doc : value) {\n if (doc.getId() != null) {\n tripList.add(doc.getId());//store the document IDs to ArrayList\n\n Log.d(TAG, \"Retrieved data: \" + doc.getId());\n }\n }\n showTripList();//show trip name to listView\n }\n });\n }",
"public static void main(String[] args) {\n\n\t\t SimpleDateFormat sf = new SimpleDateFormat(\"yyyyMMddHHmmssSSS\");\n\t\t// for(int i=0; i<100; i++) {\n\t\t// String strDT = sf.format(new Date(System.currentTimeMillis()));\n\t\t// System.out.println(strDT);\n\t\t// }\n\n\t\t\n\t\tDate oldDate = new Date();\n\t\tCalendar gcal = new GregorianCalendar();\n\t\tgcal.setTime(oldDate);\n\t\tgcal.add(Calendar.SECOND, -4468);\n\t\tDate newDate = gcal.getTime();\n\t\tSystem.out.println(sf.format(oldDate));\n\t\tSystem.out.println(sf.format(newDate));\n\t}",
"private void ExportCSV() {\n //checks if you have given this app the permission to write to external storage\n int checkVal = context.checkCallingOrSelfPermission(\"android.permission.WRITE_EXTERNAL_STORAGE\");\n if (checkVal != PackageManager.PERMISSION_GRANTED) {\n Toast.makeText(this, \"Turn on WRITE_EXTERNAL_STORAGE permission\", Toast.LENGTH_LONG).show();\n return;\n }\n\n //makes new list for workTime\n final List<WorkTime> workTimeArrayList = new ArrayList<>();\n\n //gets the workTimes from the database\n Database.getWorkTimeRef().addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n WorkTime workTime = snapshot.getValue(WorkTime.class);\n\n //if hasCheckDates is true the workTimes will be filtered based on the dates\n if (hasCheckDate) {\n //create new date instances\n Date after = new Date();\n Date before = new Date();\n Date check = new Date(workTime.getDate() * 1000L);\n\n //tries to parse the dates\n try {\n after = sdf.parse(btnStartDate.getText().toString());\n before = sdf.parse(btnEndDate.getText().toString());\n } catch (ParseException e) {\n e.printStackTrace();\n Toast.makeText(context, \"Couldn't parse the dates\", Toast.LENGTH_SHORT).show();\n }\n\n //if the date is with in range it will be added to to list\n if (check.after(after) && check.before(before)){\n workTimeArrayList.add(workTime);\n }\n } else {\n //with no filter all will be added to the list\n workTimeArrayList.add(workTime);\n }\n }\n\n //creates the header for the CSV file\n csvFile = new StringBuilder();\n csvFile.append(FILE_HEADER);\n csvFile.append(NEW_LINE_SEPARATOR);\n\n //loops trough all the workTimes in the list\n for (final WorkTime workTime : workTimeArrayList) {\n Database.getProjectsRef().child(workTime.getProjectID()).child(\"name\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.getValue() != null) {\n\n //adds the worktime to the CSV file\n projectname = dataSnapshot.getValue().toString();\n csvFile.append(projectname)\n .append(COMMA_DELIMITER)\n .append(String.valueOf(workTime.getDescription()))\n .append(COMMA_DELIMITER)\n .append(String.valueOf(workTime.getTime()))\n .append(COMMA_DELIMITER)\n .append(sdf.format(new Date(workTime.getDate() * 1000L)))\n .append(COMMA_DELIMITER)\n .append(String.valueOf(workTime.getWorktimeID()))\n .append(COMMA_DELIMITER)\n .append(String.valueOf(workTime.getUserID()))\n .append(COMMA_DELIMITER)\n .append(NEW_LINE_SEPARATOR);\n\n //keeps track of the arraylist position\n arrayLength++;\n }\n\n //if the array is done the file will be exported\n if (arrayLength >= workTimeArrayList.size() ){\n export();\n arrayLength = 0;\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {}\n });\n }\n\n //if there are no worktimes in the filter display this message\n if (workTimeArrayList.size() == 0){\n Toast.makeText(context, \"There are no hours to be exported between these dates\", Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n }\n });\n }",
"protected void runEachDay() {\n \n }",
"public void externalTestcase() {\n\t\ttry {\n\t\t\n\t\t\tString s;\n\t\t\tDBCursor cur=null;\n\t\t\tDBCollection col;\n\t\t\tcol=mdb.getCollection(Performance.col.toString());//\n\t\t\tSystem.out.println(\"Starting Benchmark\");\n\t\t\tif (Performance.geonear){\n\t\t\t\tfor (int i = 0; i < Performance.externaliterations; i++) {\n\t\t\t\t\ts = parseToRequest(Performance.requestM);\n\t\t\t\t\tBasicDBObject cmd = new BasicDBObject();\n\t\t\t\t\tcmd =(BasicDBObject)(JSON.parse(s));\n\t\t\t\t\tmdb.requestStart();\n\t\t\t\t\tstart=Calendar.getInstance().getTimeInMillis();\n\t\t\t\t\tCommandResult r = mdb.command(cmd); \n\t\t\t\t\tstop = Calendar.getInstance().getTimeInMillis() - start;\n\t\t\t\t\tmdb.requestDone();\n\t\t\t\t\tTimer=Timer+stop;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\tPerformance.geonear=false;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor (int i = 0; i < Performance.externaliterations; i++) {\n\t\t\t\t\ts = parseToRequest(Performance.requestM);\n\t\t\t\t\tmdb.requestStart();\n\t\t\t\t\tif (Performance.limit.length()>0){\n\t\t\t\t\t\tBasicDBObject bo=new BasicDBObject(Performance.geoField.toString(),JSON.parse(s));\n\t\t\t\t\t\tint lim = Integer.parseInt(Performance.limit.toString());\n\t\t\t\t\t\tstart=Calendar.getInstance().getTimeInMillis();\n\t\t\t\t\t\tcur= col.find(bo).limit(lim);\n\t\t\t\t\t\twhile(cur.hasNext()) {\n\t\t\t\t\t\t\tcur.next();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tstop = Calendar.getInstance().getTimeInMillis() - start;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tBasicDBObject bo=new BasicDBObject(Performance.geoField.toString(),JSON.parse(s));\n\t\t\t\t\tstart=Calendar.getInstance().getTimeInMillis();\n\t\t\t\t\tcur= col.find(bo);\n\t\t\t\t\twhile(cur.hasNext()) {\n\t\t\t\t\t\tcur.next();\n\t\t\t\t\t\t}\n\t\t\t\t\tstop = Calendar.getInstance().getTimeInMillis() - start;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tmdb.requestDone();\n\t\t\t\tTimer=Timer+stop;\n\t\t\t\n\t\t\t}\n\t\t\t\tcur.close();\n\t\t\t}\n\t\t\n\t\t\n\t\t\tSystem.out.println(\"Mongo Timer \"+Long.toString(Timer));\n\t\t\tdisconnect();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}",
"public void cacheResult(SitbMoneyCollection sitbMoneyCollection);",
"public void addIndex(){\n\t\tdbCol=mdb.getCollection(\"genericCollection\");\n\t\tstart=Calendar.getInstance().getTimeInMillis();\n\t\tdbCol.ensureIndex(new BasicDBObject(\"RandomGeo\", \"2d\"));\n\t\tstop = Calendar.getInstance().getTimeInMillis() - start;\n\t\tSystem.out.println(\"Mongo Index Timer \"+Long.toString(stop));\n\t}"
] |
[
"0.53302634",
"0.5168099",
"0.51377493",
"0.51096606",
"0.5087629",
"0.5016696",
"0.49084026",
"0.4877642",
"0.48442405",
"0.47640502",
"0.47331098",
"0.47022772",
"0.46195874",
"0.46137488",
"0.45982295",
"0.4588334",
"0.45749775",
"0.45457515",
"0.45267063",
"0.45105115",
"0.45047778",
"0.44974625",
"0.44745907",
"0.44708446",
"0.4461074",
"0.44553715",
"0.4451343",
"0.44506922",
"0.44295603",
"0.44293535",
"0.44288737",
"0.44211724",
"0.44166544",
"0.4412497",
"0.4407841",
"0.44034347",
"0.4393572",
"0.43928736",
"0.43755156",
"0.4375465",
"0.43747136",
"0.43696168",
"0.4356699",
"0.43493518",
"0.43463236",
"0.43463236",
"0.43463236",
"0.4334279",
"0.43339914",
"0.4329854",
"0.43186876",
"0.4310267",
"0.4306132",
"0.42989004",
"0.42960355",
"0.42855522",
"0.42852843",
"0.4280354",
"0.4257265",
"0.4257015",
"0.4251913",
"0.42412257",
"0.4238174",
"0.42336848",
"0.42205667",
"0.42190057",
"0.42132705",
"0.4208111",
"0.4205266",
"0.41928822",
"0.41926873",
"0.41917628",
"0.41895163",
"0.41850445",
"0.41827992",
"0.41817617",
"0.41804254",
"0.41799656",
"0.41709802",
"0.41689068",
"0.41678002",
"0.41678002",
"0.4164767",
"0.4163399",
"0.4162667",
"0.41591588",
"0.41577145",
"0.415671",
"0.41521046",
"0.41496077",
"0.41453093",
"0.41439503",
"0.41381738",
"0.4120752",
"0.41199946",
"0.41191903",
"0.41063043",
"0.41043293",
"0.41036868",
"0.40984496"
] |
0.74311656
|
0
|
This method is called once a day to calculate trends for the past week/month outCollection is always the same, one for weekly collection, one for monthly collection
|
public void mergingMapReduce(TimePeriod timePeriod) {
System.out.println("Starting merging mapreduce...");
DBCollection dailyCollection = mongoOps
.getCollection(DAILY_COLLECT_NAME);
Calendar stDate = Calendar.getInstance();
if (timePeriod.equals(TimePeriod.PASTWEEK)) {
stDate.add(Calendar.DATE, -7);
} else if (timePeriod.equals(TimePeriod.PASTMONTH)) {
stDate.add(Calendar.DATE, -30);
} else {
return;
}
System.out.println("Start date: " + stDate.getTime().toString());
// create pipeline operations, first with the $match
DBObject matchObj = new BasicDBObject("_id.date", new BasicDBObject(
"$gte", counterDateFormat.format(stDate.getTime())));
DBObject match = new BasicDBObject("$match", matchObj);
// build the $projection operation
DBObject fields = new BasicDBObject("_id.id", 1);
fields.put("_id.type", 1);
fields.put("value", 1);
DBObject project = new BasicDBObject("$project", fields);
// the $group operation
Map<String, Object> dbObjIdMap = new HashMap<String, Object>();
dbObjIdMap.put("id", "$_id.id");
dbObjIdMap.put("type", "$_id.type");
DBObject groupFields = new BasicDBObject("_id", new BasicDBObject(
dbObjIdMap));
groupFields.put("value", new BasicDBObject("$sum", "$value"));
DBObject group = new BasicDBObject("$group", groupFields);
// $out operation
DBObject out = new BasicDBObject("$out",
(timePeriod.equals(TimePeriod.PASTWEEK) ? WEEKLY_COLLECT_NAME
: MONTHLY_COLLECT_NAME));
List<DBObject> pipeline = Arrays.asList(match, project, group, out);
dailyCollection.aggregate(pipeline);
System.out.println("Finished merging mapreduce");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void calculateFinalData() {\n\t\tfor(TeamPO oneTeam:teams.getAllTeams()){\r\n\t\t\toneTeam.calculateTeamDataInOneSeason();\r\n\t\t}\r\n\t}",
"private void refreshWeeklyStats() {\n TextView weekView = findViewById(R.id.weekView);\n weekView.setText(WeeklyStatistics.getWeek());\n\n String userId = Login.getUserId();\n DocumentReference cycleReference = WeeklyStatistics.getSportWeeklyStat(userId, Sport.CYCLING);\n DocumentReference runReference = WeeklyStatistics.getSportWeeklyStat(userId, Sport.RUNNING);\n DocumentReference walkReference = WeeklyStatistics.getSportWeeklyStat(userId, Sport.WALKING);\n\n setCycleStats(cycleReference);\n setRunStats(runReference);\n setWalkStats(walkReference);\n }",
"private void fillStatsRandomlyForDebug() {\n int[] numberOfPeriodsEachDay = {4, 5, 5, 4, 4, 4};\n\n GregorianCalendar dateToFillFrom = new GregorianCalendar(2016, Calendar.AUGUST, 1);\n GregorianCalendar rightNow = new GregorianCalendar();\n rightNow.add(isMonthDisplayed ? Calendar.MONTH : Calendar.WEEK_OF_YEAR, -1);\n\n //sundays are never in statistics\n if (rightNow.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {\n rightNow.add(Calendar.DAY_OF_WEEK, -1);\n }\n\n while (dateToFillFrom.get(Calendar.YEAR) != rightNow.get(Calendar.YEAR)\n || dateToFillFrom.get(Calendar.MONTH) != rightNow.get(Calendar.MONTH)\n || dateToFillFrom.get(Calendar.DATE) != rightNow.get(Calendar.DATE)) {\n\n if (dateToFillFrom.get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY) {\n ArrayList<Boolean> arr = new ArrayList<>();\n for (int j = 0; j < numberOfPeriodsEachDay[dateToFillFrom.get(Calendar.DAY_OF_WEEK) - 2]; j++) {\n arr.add((ThreadLocalRandom.current().nextInt(0, 2) == 0));\n }\n stats.attendanceHistory.add(new StatsDay(arr, StatsUtils.copyCalendarConstructor(dateToFillFrom)));\n }\n\n dateToFillFrom.add(Calendar.DATE, 1);\n }\n }",
"private void refreshGoalData () {\n DateTime now = DateTime.now();\n if((now.getWeekOfWeekyear() > userGoals.getWeekOfYear()) || now.getWeekOfWeekyear() == 0 ) {\n userGoals.setWeekOfYear(now.getWeekOfWeekyear());\n userGoals.setRunsPerWeekActual(0);\n userGoals.setMilesPerWeekActual(0.0);\n }\n\n //Calculates weekly mileage and runs per week\n double mileage = 0.0;\n int numOfRuns = 0;\n if(runMap != null && !(runMap.isEmpty())) {\n //Get current year and current week of the year\n int year = now.getYear();\n int currWeek = now.getWeekOfWeekyear();\n Calendar c = Calendar.getInstance();\n c.clear();\n //Set calendar to beginning of week\n c.set(Calendar.YEAR, year);\n c.set(Calendar.WEEK_OF_YEAR, currWeek);\n Date beginningOfWeek = c.getTime();\n\n SimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yyyy\");\n\n for (String key : runMap.keySet()) {\n Run run = runMap.get(key);\n //Date stored as MM/dd/yyyy\n try {\n Date dateOfRun = formatter.parse(run.getDate());\n if (dateOfRun.compareTo(beginningOfWeek) >= 0) {\n mileage += run.getMileage();\n numOfRuns++;\n }\n }catch (ParseException p) {\n //idfk\n }\n\n }\n\n if(userShoes != null && !userShoes.isEmpty()) {\n //While we're here, we're going to update the mileage for each shoe\n for (String shoeKey : userShoes.keySet()) {\n Shoe currShoe = userShoes.get(shoeKey);\n currShoe.setMileage(0.0);\n for (String runKey : runMap.keySet()) {\n if (currShoe.getName().equals(runMap.get(runKey).getShoe())) {\n currShoe.addMileage(runMap.get(runKey).getMileage());\n }\n }\n }\n }\n\n }\n userGoals.setRunsPerWeekActual(numOfRuns);\n userGoals.setMilesPerWeekActual(mileage);\n\n\n goalRef.setValue(userGoals);\n shoeRef.setValue(userShoes);\n\n check = 1;\n }",
"private void previousWeek() {\r\n tmp.setDay(tmp.getDay() - daysInWeek);\r\n upDMYcountDMYcount();\r\n }",
"private void expensesUpdateWaterfallChart() {\n\n waterfallData.clear();\n waterfallData = DBGetExpenses.forEachDayChallengeWasRunning(key1OfActiveChallenge, goal);\n //waterfall.data(waterfallData);\n //waterfallView.invalidate();\n }",
"public ArrayList<String> getCountStatics() {\n\t\tint countsPerMinute = 0;\n\t\tint countsPerHour = 0;\n\t\tint countsPerDay = 0;\n\t\tint countsPerWeek = 0;\n\t\tint countsPerMonth = 0;\n\n\t\t// get a comparison time and start comparing the times against it\n\t\tArrayList<String> myArrayString = new ArrayList<String>();\n\t\tCalendar currDate = Calendar.getInstance();\n\t\tfor (int i = 0; i < clickerCountObject.getClickerTimestamps().size(); i++) {\n\t\t\tSystem.out.println(clickerCountObject.getClickerTimestamps().get(i)\n\t\t\t\t\t.get(Calendar.MINUTE) <= currDate.get(Calendar.MINUTE));\n\t\t\tif (currDate.get(Calendar.MINUTE) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MINUTE)\n\t\t\t\t\t&& currDate.get(Calendar.MINUTE) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MINUTE)) {\n\t\t\t\tcountsPerMinute += 1;\n\t\t\t}\n\t\t\tif (currDate.get(Calendar.HOUR_OF_DAY) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.HOUR_OF_DAY)\n\t\t\t\t\t&& currDate.get(Calendar.HOUR_OF_DAY) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.HOUR_OF_DAY)) {\n\t\t\t\tcountsPerHour += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.DAY_OF_MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.DAY_OF_MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.DAY_OF_MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.DAY_OF_MONTH))) {\n\t\t\t\tcountsPerDay += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.WEEK_OF_MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.WEEK_OF_MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.WEEK_OF_MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.WEEK_OF_MONTH))) {\n\t\t\t\tcountsPerWeek += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MONTH))) {\n\t\t\t\tcountsPerMonth += 1;\n\t\t\t}\n\t\t}\n\t\tmyArrayString.add(\"Counts per Minute \"\n\t\t\t\t+ Integer.toString(countsPerMinute));\n\t\tmyArrayString.add(\"Counts per Hour \" + Integer.toString(countsPerHour));\n\t\tmyArrayString.add(\"Counts per Day \" + Integer.toString(countsPerDay));\n\t\tmyArrayString.add(\"Counts per Week \" + Integer.toString(countsPerWeek));\n\t\tmyArrayString.add(\"Counts per Month \"\n\t\t\t\t+ Integer.toString(countsPerMonth));\n\n\t\tSystem.out.println(myArrayString);\n\t\treturn myArrayString;\n\t}",
"public void dailyMapReduce(Date date, String collectionName) {\n\n\t\tDBCollection tweets = mongoOps.getCollection(collectionName);\n\n\t\tCalendar today = Calendar.getInstance();\n\t\ttoday.setTime(date);\n\n\t\ttoday.set(Calendar.HOUR_OF_DAY, 0);\n\t\ttoday.set(Calendar.MINUTE, 0);\n\t\ttoday.set(Calendar.SECOND, 0);\n\n\t\tlong today_beginning_timestamp = today.getTimeInMillis();\n\t\tSystem.out.println(\"Today beginning:\" + today.getTime());\n\n\t\ttoday.set(Calendar.HOUR_OF_DAY, 23);\n\t\ttoday.set(Calendar.MINUTE, 59);\n\t\ttoday.set(Calendar.SECOND, 59);\n\t\tlong today_ending_timestamp = today.getTimeInMillis();\n\t\tSystem.out.println(\"Today ending:\" + today.getTime());\n\n\t\tDBObject condition = new BasicDBObject(2);\n\t\tcondition.put(\"$gte\", Long.toString(today_beginning_timestamp));\n\t\tcondition.put(\"$lt\", Long.toString(today_ending_timestamp));\n\t\tDBObject q = new BasicDBObject(\"timestamp_ms\", condition);\n\t\tDBObject match = new BasicDBObject(\"$match\", q);\n\t\tDBObject output = new BasicDBObject(\"$out\", \"temp\");\n\n\t\t// run aggregation\n\t\tList<DBObject> pipeline = Arrays.asList(match, output);\n\t\ttweets.aggregate(pipeline);\n\n\t\tDBCollection temp = mongoOps.getCollection(\"temp\");\n\n\t\t// map function\n\t\tStringBuilder mapFunction = new StringBuilder(\"function() {\");\n\t\tfor (Field field : Field.values()) {\n\t\t\tif (field == Field.ALL) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tmapFunction.append(\"var entity = this.\" + field.toString() + \";\");\n\t\t\tmapFunction\n\t\t\t\t\t.append(\"if ( entity ) { entity = entity.toString().toLowerCase().split(',');\");\n\t\t\tmapFunction.append(\"for ( var i = entity.length -1 ; i>=0 ;--i){\");\n\n\t\t\tif (field.toString() == Field.PERSON.toString()) {\n\t\t\t\tmapFunction\n\t\t\t\t\t\t.append(\"entity[i]=entity[i].replace(/[^a-zA-Z]/g, ' ');\");\n\n\t\t\t} else if (field.toString() == Field.HASHTAG.toString()) {\n\t\t\t\tmapFunction\n\t\t\t\t\t\t.append(\"entity[i]=entity[i].replace(/[`~!@$%^&*()_|+\\\\-=?;:\\\\'\\\".<>\\\\{\\\\}\\\\[\\\\]\\\\\\\\/]/gi, '');\");\n\n\t\t\t} else if (field.toString() != Field.URL.toString()) {\n\t\t\t\tmapFunction\n\t\t\t\t\t\t.append(\"entity[i]=entity[i].replace(/[`~!@#$%^&*()_|+\\\\-=?;:\\\\'\\\".<>\\\\{\\\\}\\\\[\\\\]\\\\\\\\/]/gi, '');\");\n\t\t\t}\n\n\t\t\tmapFunction\n\t\t\t\t\t.append(\"if ( entity[i] && entity[i].trim().length > 0 && entity[i] !== '[]') {\");\n\t\t\tmapFunction.append(\"emit( { id: entity[i].trim(), date: \\\"\"\n\t\t\t\t\t+ counterDateFormat.format(date) + \"\\\", type: \\\"\"\n\t\t\t\t\t+ field.toString() + \"\\\"}, 1);}}}\");\n\n\t\t}\n\t\tmapFunction.append(\"};\");\n\t\tString map = mapFunction.toString();\n\t\tSystem.out.println(map);\n\n\t\t// reduce function\n\t\tString reduce = \"function(key, values) {\" + \"var sum = 0;\"\n\t\t\t\t+ \"values.forEach( function(v) {\" + \"sum += v;\" + \"});\"\n\t\t\t\t+ \"return sum;\" + \"}\";\n\n\t\tSystem.out.println(reduce);\n\n\t\t// run map-reduce on the temporary collection, the output is in the file\n\t\t// named outCollection\n\t\tMapReduceCommand cmd = new MapReduceCommand(temp, map, reduce,\n\t\t\t\tDAILY_COLLECT_NAME, MapReduceCommand.OutputType.MERGE, null);\n\t\ttemp.mapReduce(cmd);\n\n\t\t// delete the temporary collection\n\t\ttemp.drop();\n\t\tSystem.out.println(\"Finished daily mapreduce\");\n\t}",
"private int calculatingWeeklySavings(String accountUid, String categoryUid, String lastTimeStamp,\n String currentTimeStamp) throws Exception {\n LOGGER.debug(\"Going into Client Service Layer to get list of transactions. CategoryUid: \"+categoryUid);\n List<FeedItemSummary> feedItems =clientService.getWeeksOutGoingTransactions(accountUid, categoryUid,lastTimeStamp,\n currentTimeStamp);\n //equals feed item but minimised to amounts as thats all i want\n\n //get round up amount\n int savingsAddition=0;\n\n for (FeedItemSummary item:feedItems) {\n savingsAddition+=100-(item.getAmount()%100);\n }\n LOGGER.info(\"Calculated amount to be transfered to savings\");\n return savingsAddition;\n }",
"private static void analyse1() {\n\t\tList<String> twoYearIncomeInRateList2 = getTwoYearIncomeInRateList(BasicAnalyse.stockBasicMap.keySet(), 0, 10000, \"2016-4\", \"2015-4\");\r\n\t\tList<String> twoYearIncomeInRateList = getTwoYearIncomeInRateList(twoYearIncomeInRateList2, 0, 10000, \"2017-2\", \"2016-2\");\r\n\t\tList<String> twoYearProfitInRateList = getTwoYearProfitInRateList(twoYearIncomeInRateList, 0, 10000, \"2017-2\", \"2016-2\");\r\n\t\tList<String> twoSeasonIncomeInRateList = getTwoSeasonIncomeInRateList(twoYearProfitInRateList, 0, 10000, \"2017-2\", \"2017-1\");\r\n\t\tList<String> twoSeasonProfitInRateList = getTwoSeasonProfitInRateList(twoSeasonIncomeInRateList, 0, 10000, \"2017-2\", \"2017-1\");\r\n\t\tHashMap<String, List<HistoryDomain>> codeHisMap = HistoryAnalyse.getCodeHisMap(HistoryAnalyse.historyMap, twoSeasonProfitInRateList);\r\n\t\tHashMap<String, List<HistoryDomain>> orderDateMap = HistoryAnalyse.getOrderDateMap(codeHisMap);\r\n\t\tHashMap<String, String> dieTingTimeMap = PriceAnalyse.getDieTingLastTimeMap(orderDateMap, 5, -100, -20);\r\n\t\tHashMap<String, String> endDateMap = AnalyseUtil.getCodeDateMap(orderDateMap.keySet(), \"2017-10-13\");\r\n\t\tHashMap<String, List<HistoryDomain>> orderDateDTMap = HistoryAnalyse.getCodeHisMap(orderDateMap, dieTingTimeMap.keySet());\r\n\t\tHashMap<String, List<HistoryDomain>> afterDieTingHisMap = HistoryAnalyse.getHisMapByStartAndEndDateMap(orderDateDTMap, dieTingTimeMap, endDateMap);\r\n\t\tHashMap<String, Double> highestFlowInRate = PriceAnalyse.getHighestFlowInRate(afterDieTingHisMap, -2000, 20);\r\n\t\tHashMap<String, List<String>> conceptListMap = ConceptAnalyse.getConceptListMap(highestFlowInRate.keySet());\r\n\r\n\t\t\r\n\t\tSystem.out.println(conceptListMap);\r\n\t}",
"private void calcFinanceTotals() {\n System.out.println(\"calcFinanceTotals\");\n financeWindow.clear();\n for (int i = 0; i < clubEventList.totalSize(); i++) {\n financeWindow.calcPlus(clubEventList.getUnfiltered(i));\n }\n financeWindow.display();\n }",
"private void getActivatedWeekdays() {\n }",
"public void figure() {\r\n Currency nAdv = Currency.Zero;\r\n Currency nLow = Currency.NegativeOne;\r\n Currency nHigh = Currency.Zero;\r\n Currency nTotal = Currency.Zero;\r\n \r\n for(int i = 0; i < dayArray.size(); i++) {\r\n DayG dayG = (DayG) dayArray.get(i);\r\n Currency gross = dayG.getGross();\r\n \r\n nAdv = nAdv.add(gross);\r\n nTotal = nTotal.add(gross);\r\n if(nLow == Currency.NegativeOne || gross.lt(nLow)) {\r\n lowD = dayG;\r\n nLow = gross;\r\n }\r\n if(nHigh.lt(gross)) {\r\n highD = dayG;\r\n nHigh = gross;\r\n }\r\n }\r\n \r\n adverage = nAdv.divide(dayArray.size()).round();\r\n low = nLow.round();\r\n high = nHigh.round();\r\n \r\n //no need to round total, right?\r\n total = nTotal;\r\n }",
"private void calcDataInTable() {\n Calendar tempCal = (Calendar) cal.clone();\n\n tempCal.set(Calendar.DAY_OF_MONTH, 1);\n int dayOfWeek;\n\n if (tempCal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {\n dayOfWeek = 7;\n } else {\n dayOfWeek = tempCal.get(Calendar.DAY_OF_WEEK) - 1;\n }\n\n int dayOfMonth = tempCal.get(Calendar.DAY_OF_MONTH);\n\n for (int j = 0; j < 6; j++) {\n\n for (int i = 0; i < 7; i++) {\n\n if (j != 0) {\n if (dayOfMonth < 32) {\n parsedData[j][i] = Integer.toString(dayOfMonth);\n }\n\n if (dayOfMonth > cal.getActualMaximum(Calendar.DAY_OF_MONTH)) {\n parsedData[j][i] = \"\";\n }\n\n dayOfMonth++;\n\n } else {\n\n if ((j == 0) && (i >= dayOfWeek - 1)) {\n parsedData[j][i] = Integer.toString(dayOfMonth);\n dayOfMonth++;\n } else {\n parsedData[j][i] = \"\";\n }\n\n\n }\n\n }\n\n }\n}",
"public void calculateMetrics(){\n //precision\n precisionFinal = precision.stream().mapToDouble(f -> f).sum()/precision.size();\n System.out.print(\"Precision: \");\n System.out.println(precisionFinal);\n //recall\n recallFinal = recall.stream().mapToDouble(f -> f).sum()/recall.size();\n System.out.print(\"Recall: \");\n System.out.println(recallFinal);\n //fMeasures\n fMeausureFinal = fMeasures.stream().mapToDouble(f -> f).sum()/fMeasures.size();\n System.out.print(\"Fmeasure: \");\n System.out.println(fMeausureFinal);\n\n //MAP\n mapFinal = apRes.stream().mapToDouble(d->d).sum()/apRes.size();\n System.out.print(\"Mean Avarage Precision: \");\n System.out.println(mapFinal);\n \n mapLimitedFinal = apResRankedTopLimited.stream().mapToDouble(d->d).sum()/apResRankedTopLimited.size();\n System.out.print(\"Mean Precision at rank 10: \");\n System.out.println(mapLimitedFinal);\n \n //NDCG\n ndcgResultsFinal =0;\n ndcgResults.stream().forEach(l-> {\n //it is always true, only added to ensure that doesnt' break with another examples where some queries doens't have results.\n if(l.size()>0){\n ndcgResultsFinal= l.get(l.size()-1)+ndcgResultsFinal;\n }\n });\n ndcgResultsFinal=ndcgResultsFinal/ndcgResults.size();\n \n System.out.print(\"NDCG: \");\n System.out.println(ndcgResultsFinal);\n }",
"public void setupDays() {\n\n //if(days.isEmpty()) {\n days.clear();\n int day_number = today.getActualMaximum(Calendar.DAY_OF_MONTH);\n SimpleDateFormat sdf = new SimpleDateFormat(\"EEEE\");\n SimpleDateFormat sdfMonth = new SimpleDateFormat(\"MMM\");\n today.set(Calendar.DATE, 1);\n for (int i = 1; i <= day_number; i++) {\n OrariAttivita data = new OrariAttivita();\n data.setId_utente(mActualUser.getID());\n\n //Trasformare in sql date\n java.sql.Date sqldate = new java.sql.Date(today.getTimeInMillis());\n data.setGiorno(sqldate.toString());\n\n data.setDay(i);\n data.setMonth(today.get(Calendar.MONTH) + 1);\n\n data.setDay_of_week(today.get(Calendar.DAY_OF_WEEK));\n Date date = today.getTime();\n String day_name = sdf.format(date);\n data.setDay_name(day_name);\n data.setMonth_name(sdfMonth.format(date));\n\n int indice;\n\n if (!attivitaMensili.isEmpty()) {\n if ((indice = attivitaMensili.indexOf(data)) > -1) {\n OrariAttivita temp = attivitaMensili.get(indice);\n if (temp.getOre_totali() == 0.5) {\n int occurence = Collections.frequency(attivitaMensili, temp);\n if (occurence == 2) {\n for (OrariAttivita other : attivitaMensili) {\n if (other.equals(temp) && other.getCommessa() != temp.getCommessa()) {\n data.setOtherHalf(other);\n data.getOtherHalf().setModifica(true);\n }\n }\n\n }\n }\n data.setFromOld(temp);\n data.setModifica(true);\n }\n }\n isFerie(data);\n\n\n //Aggiungi la data alla lista\n days.add(data);\n\n //Aggiugni un giorno alla data attuale\n today.add(Calendar.DATE, 1);\n }\n\n today.setTime(actualDate);\n\n mCalendarAdapter.notifyDataSetChanged();\n mCalendarList.setAdapter(mCalendarAdapter);\n showProgress(false);\n }",
"@Override\n public void flatMap(MetricTrends t, Collector<Tuple8<String, String, String, String, String, Integer, Integer,String>> out) throws Exception {\n // if(t.getGroup().equals(\"Group_1\") && t.getService().equals(\"Service_1B\") && t.getEndpoint().equals(\"Hostname_4\") && t.getMetric().equals(\"Metric_B\")){\n int criticalstatus = this.opsMgr.getIntStatus(\"CRITICAL\");\n int warningstatus = this.opsMgr.getIntStatus(\"WARNING\");\n int unknownstatus = this.opsMgr.getIntStatus(\"UNKNOWN\");\n\n Timeline timeline = t.getTimeline();\n TimelineIntegrator timelineIntegrator = new TimelineIntegrator();\n int[] criticalstatusInfo = timelineIntegrator.countStatusAppearances(timeline.getSamples(), criticalstatus);\n int[] warningstatusInfo = timelineIntegrator.countStatusAppearances(timeline.getSamples(), warningstatus);\n int[] unknownstatusInfo = timelineIntegrator.countStatusAppearances(timeline.getSamples(), unknownstatus);\n\n ArrayList<String> tags = (ArrayList)this.mtagsMgr.getTags(t.getMetric()).clone();\n String tagInfo = \"\";\n for (String tag : tags) {\n if (tags.indexOf(tag) == 0) {\n tagInfo = tagInfo + tag;\n } else {\n tagInfo = tagInfo + \",\" + tag;\n }\n }\n \n Tuple8<String, String, String, String, String, Integer, Integer, String> tupleCritical = new Tuple8< String, String, String, String, String, Integer, Integer, String>(\n t.getGroup(), t.getService(), t.getEndpoint(), t.getMetric(), \"CRITICAL\", criticalstatusInfo[0], criticalstatusInfo[1], tagInfo);\n out.collect(tupleCritical);\n\n Tuple8<String, String, String, String, String, Integer, Integer, String> tupleWarning = new Tuple8< String, String, String, String, String, Integer, Integer, String>(\n t.getGroup(), t.getService(), t.getEndpoint(), t.getMetric(), \"WARNING\", warningstatusInfo[0], warningstatusInfo[1], tagInfo);\n out.collect(tupleWarning);\n\n Tuple8<String, String, String, String, String, Integer, Integer, String> tupleUnknown = new Tuple8< String, String, String, String, String, Integer, Integer, String>(\n t.getGroup(), t.getService(), t.getEndpoint(), t.getMetric(), \"UNKNOWN\", unknownstatusInfo[0], unknownstatusInfo[1], tagInfo);\n\n out.collect(tupleUnknown);\n }",
"private void drawChart() throws ParseException {\n Calendar cal = new GregorianCalendar();\n cal.setTime(new Date());\n cal.set(Calendar.DAY_OF_MONTH, -7);\n cal.set(Calendar.HOUR_OF_DAY, 0);\n cal.set(Calendar.MINUTE, 0);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n Date startTime = cal.getTime();\n Date dayEnd = new Date();\n\n historyChart.setBackgroundColor(Color.WHITE);\n historyChart.setDrawBorders(true);\n\n\n ArrayList<String> xAxis = new ArrayList<>();\n ArrayList<Float> calories = new ArrayList<>();\n ArrayList<Float> calcium = new ArrayList<>();\n ArrayList<Float> sodium = new ArrayList<>();\n ArrayList<Float> carbs = new ArrayList<>();\n ArrayList<Float> cholestrol = new ArrayList<>();\n ArrayList<Float> iron = new ArrayList<>();\n ArrayList<Float> protien = new ArrayList<>();\n ArrayList<Float> sugar = new ArrayList<>();\n ArrayList<Float> totalfat = new ArrayList<>();\n\n NutritionHistory instance = NutritionHistory.getInstance();\n NutritionHistory.getInstance().getNutritionInformation(startTime, dayEnd, nutritionInformation -> {\n DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();\n FirebaseUser mCurrentUser = FirebaseAuth.getInstance().getCurrentUser();\n mDatabase.child(\"account\").child(mCurrentUser.getUid()).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n\n double caloriesNeeded = 2000L;\n for (DataSnapshot data : dataSnapshot.getChildren()) {\n switch (data.getKey()) {\n case \"calories\":\n caloriesNeeded = Double.parseDouble(String.valueOf(data.getValue()));\n }\n }\n\n NutrientConverter converter = new NutrientConverter(caloriesNeeded);\n\n NutritionInformation.NutritionInformationBuilder builder = new NutritionInformation.NutritionInformationBuilder();\n NutritionInformation current = builder.build();\n\n Long[] days = nutritionInformation.keySet().stream().toArray(Long[]::new);\n Arrays.sort(days);\n\n for(Long day: days) {\n xAxis.add(sdf2.format(new Date(day)).toString());\n calories.add(converter.convert(\"Calories\", (float) nutritionInformation.get(day).getCalories()));\n calcium.add(converter.convert(\"Calcium\", (float) nutritionInformation.get(day).getCalcium()));\n sodium.add(converter.convert(\"Sodium\", (float)nutritionInformation.get(day).getSodium()));\n carbs.add(converter.convert(\"Carbohydrates\", (float) nutritionInformation.get(day).getCarbohydrates()));\n cholestrol.add(converter.convert(\"Cholesterol\", (float)nutritionInformation.get(day).getCholesterol()));\n iron.add(converter.convert(\"Iron\", (float)nutritionInformation.get(day).getIron()));\n protien.add(converter.convert(\"Protein\", (float)nutritionInformation.get(day).getProtein()));\n sugar.add(converter.convert(\"Sugar\", (float)nutritionInformation.get(day).getSugar()));\n totalfat.add(converter.convert(\"Total Fat\", (float)nutritionInformation.get(day).getTotalFat()));\n }\n Log.i(\"HERE\", xAxis.toString());\n LineDataSet dataCalories = addValues(\"Calories\", calories);\n dataCalories.setColor(Color.RED);\n dataCalories.setLineWidth(2f);\n\n LineDataSet dataCalcium = addValues(\"Calcium\",calcium);\n dataCalcium.setColor(Color.rgb(181, 126\t, 220));\n dataCalcium.setLineWidth(2f);\n\n LineDataSet dataSodium = addValues(\"Sodium\", sodium);\n dataSodium.setColor(Color.BLUE);\n dataSodium.setLineWidth(2f);\n\n LineDataSet dataCarbs = addValues(\"Carbohydrates\",carbs);\n dataCarbs.setColor(Color.GREEN);\n dataCarbs.setLineWidth(2f);\n\n LineDataSet dataCholesterol = addValues(\"Cholesterol\", cholestrol);\n dataCholesterol.setColor(Color.YELLOW);\n dataCholesterol.setLineWidth(2f);\n\n LineDataSet dataIron = addValues(\"Iron\",iron);\n dataIron.setColor(Color.BLACK);\n dataIron.setLineWidth(2f);\n\n LineDataSet dataProtein = addValues(\"Protein\", protien);\n dataProtein.setColor(Color.CYAN);\n dataProtein.setLineWidth(2f);\n\n LineDataSet dataSugar = addValues(\"Sugar\",sugar);\n dataSugar.setColor(Color.MAGENTA);\n dataSugar.setLineWidth(2f);\n\n LineDataSet dataTotalFat = addValues(\"Total Fat\", totalfat);\n dataTotalFat.setColor(Color.rgb(248\t,131, 121));\n dataTotalFat.setLineWidth(2f);\n\n LineData lineData = new LineData(dataCalories, dataCalcium ,dataSodium, dataCarbs, dataIron, dataSugar, dataProtein, dataTotalFat, dataCholesterol);\n historyChart.setData(lineData);\n historyChart.getXAxis().setDrawAxisLine(true);\n historyChart.setVisibleXRange(0, xAxis.size() - 1);\n historyChart.getXAxis().setValueFormatter(new MyXAxisValueFormatter(xAxis));\n historyChart.getXAxis().setPosition(XAxis.XAxisPosition.BOTTOM);\n historyChart.enableScroll();\n historyChart.getDescription().setEnabled(false);\n historyChart.getXAxis().setLabelCount(7, true);\n historyChart.setExtraBottomOffset(20f);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n });\n\n designChart(xAxis);\n historyChart.invalidate();\n }",
"public Breakdown generateReport(Date startDate, Date endDate, ArrayList<User> userList, double total) {\n\n //INTIATING VARIABLES\n Breakdown result = new Breakdown();\n\n HashMap<String, Breakdown> intenseMap = new HashMap<String, Breakdown>();\n HashMap<String, Breakdown> normalMap = new HashMap<String, Breakdown>();\n HashMap<String, Breakdown> mildMap = new HashMap<String, Breakdown>();\n\n int intenseCount = 0;\n int normalCount = 0;\n int mildCount = 0;\n\n result.addInList(intenseMap);\n result.addInList(normalMap);\n result.addInList(mildMap);\n\n AppUsageDAO auDAO = new AppUsageDAO();\n\n //If it is without demographic, userList is null\n if (userList == null) {\n userList = auDAO.retrieveUsers(startDate, endDate);\n }\n for (int i = 0; i < userList.size(); i++) {\n User currUser = userList.get(i);\n\n //get current user's app usge\n ArrayList<AppUsage> userUsage = auDAO.retrieveByUser(currUser.getMacAddress(), startDate, endDate);\n double totalSeconds = 0;\n\n Date nextDay = new Date(startDate.getTime() + 60 * 60 * 1000 * 24);\n\n Date oldTime = null;\n if (userUsage.size() > 0) {\n oldTime = userUsage.get(0).getDate();\n if (oldTime.after(nextDay)) {\n nextDay = new Date(nextDay.getTime() + 60 * 60 * 1000 * 24);\n }\n }\n\n for (int j = 1; j < userUsage.size(); j++) {\n AppUsage au = userUsage.get(j);\n Date newTime = au.getDate();\n boolean beforeAppeared = false;\n if (newTime.before(nextDay)) {\n beforeAppeared = true;\n //difference between app usage timing\n long difference = Utility.secondsBetweenDates(oldTime, newTime);\n\n //If difference less than/equal 2 minutes\n if (difference <= 2 * 60) {\n // add difference to totalSeconds if <= 2 mins\n totalSeconds += difference;\n } else {\n // add 10sec to totalSeconds if > 2 mins\n totalSeconds += 10;\n }\n\n } else { // NEW TIMING AFTER NEXT DAY\n nextDay = new Date(nextDay.getTime() + 60 * 60 * 1000 * 24);\n\n if (!beforeAppeared) {\n long difference = Utility.secondsBetweenDates(oldTime, newTime);\n if (difference <= 2 * 60) {\n // add difference to totalSeconds if <= 2 mins\n totalSeconds += difference;\n } else {\n // add 10sec to totalSeconds if > 2 mins\n totalSeconds += 10;\n }\n }\n }\n\n oldTime = newTime;\n\n }\n\n if (oldTime.before(nextDay)) {\n long difference = Utility.secondsBetweenDates(oldTime, nextDay);\n if (difference < 10) {\n totalSeconds += difference;\n } else {\n totalSeconds += 10;\n }\n } else {\n totalSeconds += 10;\n }\n\n //DIVIDE TO GET INTO DAYS\n long days = (endDate.getTime() - startDate.getTime()) / (1000 * 60 * 60 * 24) + 1;\n totalSeconds /= days;\n\n //FILTER USER'S USAGE INTO CATEGORIES\n double totalHours = totalSeconds / (60 * 60);\n\n if (totalHours > 0) {\n if (totalHours < 1.0) {\n //MILD\n mildCount++;\n\n } else if (totalHours < 5.0) {\n //NORMAL\n normalCount++;\n\n } else {\n //INTENSE\n intenseCount++;\n\n }\n }\n\n }\n //Calculate percentage\n if (total == -1) {\n total = mildCount + normalCount + intenseCount;\n\n }\n\n int mildPercent = (int) Math.round(mildCount / total * 100);\n int normalPercent = (int) Math.round(normalCount / total * 100);\n int intensePercent = (int) Math.round(intenseCount / total * 100);\n\n //Put in maps\n intenseMap.put(\"intense-count\", new Breakdown(\"\" + intenseCount));\n intenseMap.put(\"intense-percent\", new Breakdown(\"\" + intensePercent));\n\n normalMap.put(\"normal-count\", new Breakdown(\"\" + normalCount));\n normalMap.put(\"normal-percent\", new Breakdown(\"\" + normalPercent));\n\n mildMap.put(\"mild-count\", new Breakdown(\"\" + mildCount));\n mildMap.put(\"mild-percent\", new Breakdown(\"\" + mildPercent));\n\n return result;\n }",
"private void summarizeTimeslot ()\n {\n if (null == brokers) {\n // first time through\n brokers = new ArrayList<>();\n stats = new HashMap<>();\n\n data.print(\"Broker Name,\");\n data.print(\"Power Type,\");\n data.print(\"Customers,\");\n data.print(\"Usage (kWh),\");\n data.println(\"Income Gained\");\n\n // set up the maps of brokers, and stats by power type\n for (Broker broker : brokerRepo.findRetailBrokers())\n {\n brokers.add(broker);\n stats.put(broker, new HashMap<>());\n for (PowerType type : powerTypes)\n {\n StatsTracked theseStats = new StatsTracked();\n HashMap<PowerType, StatsTracked> map = stats.get(broker);\n map.put(type, theseStats);\n stats.put(broker, map);\n }\n }\n\n // store customer statistics\n\n }\n\n if (ttx.size() > 0) {\n // there are some signups and withdraws here\n for (TariffTransaction tx : ttx) {\n Broker broker = tx.getBroker();\n PowerType type = tx.getTariffSpec().getPowerType();\n HashMap<PowerType, StatsTracked> brokerMap = stats.get(broker);\n StatsTracked theseStats = brokerMap.get(type);\n if (tx.getTxType() == TariffTransaction.Type.CONSUME ||\n tx.getTxType() == TariffTransaction.Type.PRODUCE) {\n theseStats.updateUsage(tx.getKWh());\n theseStats.updateProfit(tx.getCharge());\n }\n else if (tx.getTxType() == TariffTransaction.Type.SIGNUP)\n theseStats.updateCustomers(tx.getCustomerCount());\n\n // reupdate the tracking...\n brokerMap.put(type, theseStats);\n stats.put(broker, brokerMap);\n }\n }\n ttx.clear();\n }",
"public void getData() {\n\t\tcurrentDate = model.getCurrentDate();\n\t\tLocalDate firstDateOfMonth = LocalDate.of(currentDate.getYear(), currentDate.getMonthValue(), 1);\n\t\tevents = EventProcessor.filterEvents(model.getEvents(), firstDateOfMonth, firstDateOfMonth.plusMonths(1).minusDays(1));\n\t}",
"private void populateWeeks(YearlySchedule yearlySchedule) {\n\t\tMap<Integer, Set<DailySchedule>> weeksMap = yearlySchedule.getWeeks();\n\t\t\n\t\tfor (Iterator<MonthlySchedule> iterator = yearlySchedule.getMonthlySchedule().values().iterator(); iterator.hasNext();) {\n\t\t\tMonthlySchedule monthSchedule = (MonthlySchedule) iterator.next();\n\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.set(Calendar.YEAR, yearlySchedule.getYearValue());\n\t\t\tcalendar.set(Calendar.MONTH, monthSchedule.getMonthValue());\n\t\t\tcalendar.set(Calendar.DATE, 1);\n\t\t\tint numDays = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\t\n\t\t\tfor(int day=1;day<=numDays;day++){ // ITERATE THROUGH THE MONTH\n\t\t\t\tcalendar.set(Calendar.DATE, day);\n\t\t\t\tint dayofweek = calendar.get(Calendar.DAY_OF_WEEK);\n\t\t\t\tint weekofyear = calendar.get(Calendar.WEEK_OF_YEAR);\n\n\t\t\t\tSet<DailySchedule> week = null;\n\t\t\t\tif(monthSchedule.getMonthValue() == 11 && weekofyear == 1){ // HANDLE 1st WEEK OF NEXT YEAR\n\t\t\t\t\tYearlySchedule nextyear = getYearlySchedule(yearlySchedule.getYearValue()+1);\n\t\t\t\t\tif(nextyear == null){\n\t\t\t\t\t\t// dont generate anything \n\t\t\t\t\t\t// advance iterator to end\n\t\t\t\t\t\tday = numDays;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tweek = nextyear.getWeeks().get(weekofyear);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tweek = weeksMap.get(weekofyear);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(week == null){\n\t\t\t\t\tweek = new HashSet<DailySchedule>();\n\t\t\t\t\tweeksMap.put(weekofyear, week);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(dayofweek == 1 && day+6 <= numDays){ // FULL 7 DAYS\n\t\t\t\t\tfor(int z=day; z<=day+6;z++){\n\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(z));\n\t\t\t\t\t}\n\t\t\t\t\tday += 6; // Increment to the next week\n\t\t\t\t}else if (dayofweek == 1 && day+6 > numDays){ // WEEK EXTENDS INTO NEXT MONTH\n\t\t\t\t\tint daysInNextMonth = (day+6) - numDays;\n\t\t\t\t\t\n\t\t\t\t\t// GET DAYS IN NEXT MONTH\n\t\t\t\t\tif(monthSchedule.getMonthValue()+1 <= 11){ // IF EXCEEDS CURRENT CALENDAR HANDLE IN ESLE BLOCK \n\t\t\t\t\t\tMonthlySchedule nextMonthSchedule = getScheduleForMonth(monthSchedule.getMonthValue()+1, yearlySchedule.getYearValue()); // GET NEXT MONTH\n\t\t\t\t\t\tfor(int n = 1; n<=daysInNextMonth; n++){\n\t\t\t\t\t\t\tweek.add(nextMonthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\tfor(int n = day; n<=numDays; n++){\n\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t// TODO HANDLE ROLL OVER INTO NEXT YEAR\n\t\t\t\t\t\t// TODO SHOULD SCHEDULE CONSIDER ROLLING OVER INTO NEXT AND PREVIOUS YEARS???\n\t\t\t\t\t\tif(!exceedRange(yearlySchedule.getYearValue()-1)){\n\t\t\t\t\t\t\tMonthlySchedule nextMonthScheudle = getScheduleForMonth(0, yearlySchedule.getYearValue()+1); // GET JANUARY MONTH OF NEXT YEAR\n\t\t\t\t\t\t\tfor(int n = 1; n<=daysInNextMonth; n++){\n\t\t\t\t\t\t\t\tweek.add(nextMonthScheudle.getDailySchedule().get(n));\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 DAYS IN CURRENT MONTH\n\t\t\t\t\t\t\tfor(int n = day; n<=numDays; n++){\n\t\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\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\tbreak; // DONE WITH CURRENT MONTH NO NEED TO CONTINUE LOOPING OVER MONTH\n\t\t\t\t}else if(day-dayofweek < 0){ // WEEK EXTENDS INTO PREVIOUS MONTH\n\t\t\t\t\tint daysInPreviousMonth = dayofweek-day;\n\t\t\t\t\tint daysInCurrentMonth = 7-daysInPreviousMonth;\n\t\t\t\t\t\n\t\t\t\t\t// GET DAYS IN PREVIOUS MONTH\n\t\t\t\t\tif(monthSchedule.getMonthValue()-1 >= 0){ // IF PRECEEDS CURRENT CALENDAR HANDLE IN ESLE BLOCK\n\t\t\t\t\t\tMonthlySchedule previousMonthSchedule = getScheduleForMonth(monthSchedule.getMonthValue()-1, yearlySchedule.getYearValue()); // GET PREVIOUS MONTH\n\t\t\t\t\t\tcalendar.set(Calendar.MONTH, previousMonthSchedule.getMonthValue());\n\t\t\t\t\t\tint numDaysInPreviousMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int n = numDaysInPreviousMonth-(daysInPreviousMonth-1); n<=numDaysInPreviousMonth; n++){ // WHICH DAY TO START ON IN PREVIOUS MONTH\n\t\t\t\t\t\t\tweek.add(previousMonthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcalendar.set(Calendar.MONTH, monthSchedule.getMonthValue()); // RESET CALENDAR MONTH BACK TO CURRENT\n\t\t\t\t\t\t\n\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\tfor(int n = day; n<day+daysInCurrentMonth; n++){\n\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t// TODO HANDLE ROLL OVER INTO PREVIOUS YEAR **DONE**\n\t\t\t\t\t\tif(!exceedRange(yearlySchedule.getYearValue()-1)){\n\t\t\t\t\t\t\tMonthlySchedule previousMonthSchedule = getScheduleForMonth(11, yearlySchedule.getYearValue()-1); // GET DECEMEBER MONTH OF PREVIOUS YEAR\n\t\t\t\t\t\t\tcalendar.set(Calendar.MONTH, previousMonthSchedule.getMonthValue());\n\t\t\t\t\t\t\tcalendar.set(Calendar.YEAR, previousMonthSchedule.getYearValue());\n\t\t\t\t\t\t\tint numDaysInPreviousMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(int n = numDaysInPreviousMonth-(daysInPreviousMonth-1); n<=numDaysInPreviousMonth; n++){ // WHICH DAY TO START ON IN PREVIOUS MONTH\n\t\t\t\t\t\t\t\tweek.add(previousMonthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcalendar.set(Calendar.MONTH, monthSchedule.getMonthValue()); // RESET CALENDAR MONTH BACK TO CURRENT\n\t\t\t\t\t\t\tcalendar.set(Calendar.YEAR, monthSchedule.getYearValue()); // RESET CALENDAR YEAR BACK TO CURRENT\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\t\tfor(int n = day; n<day+daysInCurrentMonth; n++){\n\t\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\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\tday += (daysInCurrentMonth-1); // Increment to the next week (-1 because ITERATION WITH DO A ++ )\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static void checkForScoreReset() {\n\t\tif (mActivityScoreDate != null) {\n\t\t\tTime now = new Time();\n\t\t\tnow.setToNow();\n\n\t\t\t// this is the easiest way to check for a day being different, there\n\t\t\t// is a downfall\n\t\t\t// in that when a new year starts, the previous week's data will be\n\t\t\t// cleared.\n\t\t\tif (now.yearDay != mActivityScoreDate.yearDay) {\n\t\t\t\tshiftScores(now.yearDay - mActivityScoreDate.yearDay);\n\t\t\t}\n\t\t} else {\n\t\t\tmActivityScoreDate = new Time();\n\t\t}\n\t\tmActivityScoreDate.setToNow();\n\t\tsaveScore();\n\n\t}",
"private void last30DaysReport() {\n\t\tListSeries dollarEarning = new ListSeries();\n//\t\tString[] dates = controler.getLast30DaysTransactionsDates();\n\t\tString[] dates = getLast30Dates();\n\t\t\n\t\tvReportDisplayLayout.removeAllComponents();\n\t\t\n\t\tdollarEarning = getLast30DaysData();\n\t\tdisplayChart chart = new displayChart();\n\t\t\n\t\tdReportPanel.setContent(chart.getDisplayChart(dates, dollarEarning));\n\t\tvReportDisplayLayout.addComponent(dReportPanel);\n\t}",
"public void dailyStats(){\n\t\tString outputString = \"\\nTotal Money Made Today: $\" + (float)Math.round(dailyMoneyMade * 100.0) / 100.0 + \" \\n\";\n\t\toutputString = outputString + \"Catering Sales: $\" + (float)Math.round(cateringDailyMade * 100.0) / 100.0 + \" Business Sales: $\" \n\t\t+ (float)Math.round(businessDailyMade * 100.0) / 100.0 +\" Casual Sales: $\" + (float)Math.round(casualDailyMade * 100.0) / 100.0 +\"\\n\";\n\t\t\n\n\t\toutputString = outputString + \"\\nTotal Outages Today: \" + dailyDisruptions + \" \\n\";\n\t\toutputString = outputString + \"Catering Outages: \" + cateringOuttages + \" Business Outages: \" + businessOuttages +\" Casual Outages: \" + casualOuttages +\"\\n\";\n\n\t\tSystem.out.println(outputString);\n\t\tthis.status = outputString;\n\t\tsetChanged();\n notifyObservers();\n\t}",
"private void getWeekCalorieData(String accessToken, boolean getGoal) {\r\n ArrayList<String> taskParamsList = new ArrayList<>();\r\n taskParamsList.add(accessToken);\r\n\r\n Calendar startDate = getFirstMondayInWeek(endDate);\r\n\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(getString(R.string.fitbit_date_format));\r\n String formattedStartDate = dateFormat.format(startDate.getTime());\r\n String formattedEndDate = dateFormat.format(endDate.getTime());\r\n\r\n taskParamsList.add(\"https://api.fitbit.com/1/user/-/activities/calories/date/\" +\r\n formattedStartDate + \"/\" + formattedEndDate + \".json\");\r\n\r\n if(getGoal) {\r\n taskParamsList.add(\"https://api.fitbit.com/1/user/-/activities/date/\" +\r\n formattedEndDate + \".json\");\r\n }\r\n\r\n String[] taskParams = new String[taskParamsList.size()];\r\n taskParams = taskParamsList.toArray(taskParams);\r\n\r\n updateRequestCount(taskParams.length - 1);\r\n\r\n new FitbitGetRequestTask(this).execute(taskParams);\r\n }",
"public static ArrayList<Integer> getWorkoutMonthCount(Calendar day, Context mContext) {\n DatabaseHelper handler = new DatabaseHelper(mContext);\n SQLiteDatabase database = handler.getWritableDatabase();\n\n long dayLength = 86400000;\n\n day.set(Calendar.HOUR, 0);\n day.set(Calendar.MINUTE, 0);\n day.set(Calendar.SECOND, 0);\n day.set(Calendar.MILLISECOND, 0);\n\n long monthStart = day.getTimeInMillis();\n long monthEnd = monthStart + dayLength * 42;\n Log.i(LOG_TAG, \"Month Start: \" + monthStart + \" | Month End: \" + monthEnd);\n\n ArrayList<Integer> eventsList = new ArrayList<>(42);\n for (int i = 0; i < 42; i++) {\n eventsList.add(0);\n }\n\n //grade type\n String[] projection = {\n DatabaseContract.CalendarTrackerEntry._ID,\n DatabaseContract.CalendarTrackerEntry.COLUMN_DATE,\n DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB};\n String whereClause = DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB + \"=? AND \" + DatabaseContract.CalendarTrackerEntry.COLUMN_DATE + \" BETWEEN ? AND ?\";\n String[] whereValue = {String.valueOf(DatabaseContract.IS_WORKOUT), String.valueOf(monthStart), String.valueOf(monthEnd)};\n\n Cursor cursor = database.query(DatabaseContract.CalendarTrackerEntry.TABLE_NAME,\n projection,\n whereClause,\n whereValue,\n null,\n null,\n null);\n\n int idColumnOutput = cursor.getColumnIndex(DatabaseContract.CalendarTrackerEntry.COLUMN_DATE);\n\n int cursorCount = cursor.getCount();\n Log.i(LOG_TAG, \"idColumnOutput: \" + idColumnOutput + \" | cursorCount: \" + cursorCount);\n\n if (cursorCount != 0) {\n //cursor.moveToFirst();\n while (cursor.moveToNext()) {\n long outputDate = cursor.getLong(idColumnOutput);\n long outputDay = (outputDate - monthStart) / dayLength;\n Log.i(LOG_TAG, \"outputDate: \" + outputDate + \" | outputDay: \" + outputDay);\n eventsList.set((int) outputDay, 1);\n }\n }\n\n try {\n return eventsList;\n } finally {\n cursor.close();\n database.close();\n handler.close();\n }\n }",
"public void createWeeklyList(){\n\t\tArrayList<T> days=new ArrayList<T>();\n\t\tArrayList<ArrayList<T>> weeks=new ArrayList<ArrayList<T>> ();\n\t\tList<ArrayList<ArrayList<T>>> years=new ArrayList<ArrayList<ArrayList<T>>> ();\n\t\tif(models.size()!=0) days.add(models.get(models.size()-1));\n\t\telse return;\n\t\tfor(int i=modelNames.size()-2;i>=0;i--){\n\t\t\t//check the new entry\n\t\t\tCalendar pre=DateManager.getCalendar(DateManager.convert2DisplayDate(modelNames.get(i+1)));\n\t\t\tCalendar cur=DateManager.getCalendar(DateManager.convert2DisplayDate(modelNames.get(i)));\n\t\t\tif (pre.get(Calendar.YEAR)==cur.get(Calendar.YEAR)){\n\t\t\t\tif(pre.get(Calendar.WEEK_OF_YEAR)==cur.get(Calendar.WEEK_OF_YEAR)){\n\t\t\t\t\tdays.add(models.get(i));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tweeks.add(days);\n\t\t\t\t\tdays=new ArrayList<T>();\n\t\t\t\t\tdays.add(models.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tweeks.add(days);\n\t\t\t\tyears.add(weeks);\n\t\t\t\tdays=new ArrayList<T>();\n\t\t\t\tdays.add(models.get(i));\n\t\t\t\tweeks=new ArrayList<ArrayList<T>> ();\n\t\t\t}\n\t\t}\n\t\tweeks.add(days);\n\t\tyears.add(weeks);\n\t\tweeklyModels=years;\n\n\t}",
"private void getData(int day){\n try {\n String today = DateUtilities.getCurrentDateInString();\n DateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date currentDate = dateFormat.parse(today);\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(currentDate);\n calendar.add(Calendar.DAY_OF_YEAR,-day);\n Date datebefore = calendar.getTime();\n String dateBeforeStr = dateFormat.format(datebefore);\n\n stepsTakenModels = db.stepsTakenDao().getStepsTakenInrange(dateBeforeStr,today);\n// stepsTakenModels.addAll(db.stepsTakenDao().getStepsTakenInrange(\"01-10-2019\",today));\n\n for(int i = 0 ; i < 7 ; i++){\n stepsTakenModelsLastWeek.add(stepsTakenModels.get(i));\n }\n\n for(int i = 7 ; i<stepsTakenModels.size() ; i++){\n stepsTakenModelsThisWeek.add(stepsTakenModels.get(i));\n }\n// if(stepsTakenModelsThisWeek.size()==0){\n// StepsTakenModel stepsTakenModel = new StepsTakenModel();\n// stepsTakenModel.setSteps(659);\n// stepsTakenModel.setDate(today);\n// stepsTakenModelsThisWeek.add(stepsTakenModel);\n// }\n\n }catch (Exception e){\n Log.d(\"TAG\",e.getMessage());\n }\n }",
"public void checkBlackOutPeriod(){\n\n\n // loop through all filings and output filing date value in milli seconds\n System.out.println(\"checking black out period status for filings : \"+blackOutPeriodDuration);\n\n BaseTradeMarkApplicationService baseTradeMarkApplicationService = serviceBeanFactory.getBaseTradeMarkApplicationService();\n\n\n for(Iterator<BaseTrademarkApplication> iter = baseTradeMarkApplicationService.findAll().iterator(); iter.hasNext(); ) {\n BaseTrademarkApplication current = iter.next();\n\n if((current.getApplicationFilingDate() != null && current.getFilingStatus().equals(\"TEAS RF New Application\") )|| (current.getApplicationFilingDate() != null && current.getFilingStatus().equals(\"New Application\") ) ){\n // check that date + duration against current time\n if((current.getApplicationFilingDate().getTime() + current.getBlackOutPeriod()) < new Date().getTime()){\n\n System.out.println(\"Filing has expired from the black out period\");\n\n //baseTradeMarkApplicationService.save(current);\n\n // we need to check current filings to make sure there are no active office action\n\n if(current.hasActiveOfficeAction() == false){\n\n OfficeActions officeActions = new OfficeActions();\n officeActions.setParentMarkImagePath(current.getTradeMark().getTrademarkImagePath());\n officeActions.setStandardCharacterMark(current.isStandardTextMark());\n officeActions.setStandardCharacterText(current.getTradeMark().getTrademarkStandardCharacterText());\n officeActions.setParentMarkOwnerName(current.getPrimaryOwner().getOwnerDisplayname());\n officeActions.setParentSerialNumber(current.getTrademarkName());\n officeActions.setParentRegistrationNumber(current.getRegistrationID());\n officeActions.setActiveAction(true);\n long dueDate = new Date().getTime()+current.getBlackOutPeriod()+current.getOfficeActionResponsePeriod();\n officeActions.setDueDate(new Date(dueDate));\n //officeActions.setOfficeActionCode(\"Missing transliteration\");\n\n\n // create office action event here\n // filing document is only created if an office action is created with required actions\n\n\n\n\n // required actions section\n\n\n // required action Translation\n if (current.getTradeMark().isStandardCharacterMark() || current.getTradeMark().getTrademarkDesignType().equals(\"Design with Text\")) {\n if (current.getTradeMark().getForeignLanguageTranslationUSText() == null || current.getTradeMark().getForeignLanguageTranslationUSText() == null || current.getTradeMark().getForeignLanguageType_translation() == null ){\n\n // create required action here\n RequiredActions requiredActions = new RequiredActions();\n requiredActions.setRequiredActionType(\"Translation of Foreign Wording\");\n requiredActions.setTranslationTextForeign(current.getTradeMark().getForeignLanguageTranslationOriginalText());\n requiredActions.setTranslationTextEnglish(current.getTradeMark().getForeignLanguageTranslationUSText());\n requiredActions.setTranslationTextLanguage(current.getTradeMark().getForeignLanguageType_translation());\n\n\n\n officeActions.addRequiredActions(requiredActions);\n\n\n\n }\n\n\n }\n\n // required action disclaimer\n\n if(current.getTradeMark().getDisclaimerDeclarationList().size() == 0){\n // you have to provide at least one disclaimer\n RequiredActions requiredActions = new RequiredActions();\n requiredActions.setRequiredActionType(\"Disclaimer Required\");\n\n officeActions.addRequiredActions(requiredActions);\n\n }\n\n\n // office action is created only if there are required actions\n if(officeActions.getRequiredActions().size() > 0){\n current.setFilingStatus(\"Non-Final Action Mailed\");\n officeActions.setOfficeActionCode(\"Non-Final Action Mailed\");\n\n\n // create an default office action object and attach it to filing\n current.addOfficeAction(officeActions);\n officeActions.setTrademarkApplication(current);\n\n FilingDocumentEvent filingDocumentEvent = new FilingDocumentEvent();\n filingDocumentEvent.setEventDescription(\"Office Action Outgoing\");\n\n filingDocumentEvent.setDocumentType(\"XML\");\n Date date = new Date();\n filingDocumentEvent.setEventDate(date);\n\n current.addFilingDocumentEvent(filingDocumentEvent);\n }\n\n baseTradeMarkApplicationService.save(current);\n\n\n\n\n }\n\n\n\n\n // also check for number of required actions.\n // if there are none. office action is not saved\n\n\n\n\n\n // set relevant office actions\n\n\n\n }\n else{\n System.out.println(\"filing is still in the black out period\");\n\n }\n }\n else{\n System.out.println(\"Filing is not Submitted yet.\");\n }\n }\n\n\n }",
"private void projectWeekAnxiety() {\n increaseStat(Stat.ANXIETY, 10);\n }",
"private void setUp() {\r\n Calendar calendar1 = Calendar.getInstance();\r\n calendar1.set((endDate.get(Calendar.YEAR)), \r\n (endDate.get(Calendar.MONTH)), (endDate.get(Calendar.DAY_OF_MONTH)));\r\n calendar1.roll(Calendar.DAY_OF_YEAR, -6);\r\n \r\n Calendar calendar2 = Calendar.getInstance();\r\n calendar2.set((endDate.get(Calendar.YEAR)), \r\n (endDate.get(Calendar.MONTH)), (endDate.get(Calendar.DAY_OF_MONTH)));\r\n \r\n acceptedDatesRange[0] = calendar1.get(Calendar.DAY_OF_YEAR);\r\n acceptedDatesRange[1] = calendar2.get(Calendar.DAY_OF_YEAR); \r\n \r\n if(acceptedDatesRange[1] < 7) {\r\n acceptedDatesRange[0] = 1; \r\n }\r\n \r\n //MiscStuff.writeToLog(\"Ranges set \" + calendar1.get\r\n // (Calendar.DAY_OF_YEAR) + \" \" + calendar2.get(Calendar.DAY_OF_YEAR));\r\n }",
"private void calculateFitness() {\n\t\tint day1=this.getNumberOfHours()*this.getNumberOfClasses();\n\t\tint day2=2*day1;\n\t\tint day3=3*day1;\n\t\tint day4=4*day1;\n\t\tint day5=5*day1;\n\t\tTeacher_lesson temp=null;\n\t\t//day 1//\n\t\tHashSet<Integer> closedSet=new HashSet<Integer>();\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=0;i<day1;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day1;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t}\n\t\t\t\n\t\t}\n\t\n\t\t\n\t\t\n\t\t\n\t\t//day2//\n\t\tclosedSet.clear();;\n\t\t\n\t\tfor(int i=day1;i<day2;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day2;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t}\n\t\t\t\n\t\t}\n\t\t//day3//\n\t\tclosedSet.clear();;\n\t\tfor(int i=day2;i<day3;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day3;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//day4//\n\t\tclosedSet.clear();;\n\t\tfor(int i=day3;i<day4;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day4;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\t\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t}\n\t\t\t\n\t\t}\n\t\t//day5//\n\t\tclosedSet.clear();;\n\t\tfor(int i=day4;i<day5;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day5;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t\t\t\n\t\t}\n\t\t\t/*if(temp.get_td_hour()<0){this.fitness=this.fitness-100;}//adunato na ginei giati o ka8igitis exei parapanw wres apo oti mporei na kanei//\n\t\t\t\telse if (temp.get_td_hour()==0){this.fitness=this.fitness-2;}//meiwnoume giati o ka8igitis 8a epivarin8ei oles tou tis wres thn idia mera//\n\t\t\t\telse{++this.fitness;}//kalh prosegisi*/\n\t\t}\n\t\t//*********************END OF DAILY EVALUATION*****************************//\n\t\t\n\t\t//**********************START OF WEEKLY EVALUATION************************//\n\t\t\n\t\tclosedSet.clear();\n\t\t\n\t int \t_weeklyhours = 1;\n\t \n\t\tfor(int i=0;i<day5;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp!=null){\n\t\t\tif(!closedSet.contains(this.genes[i])){\n\t\t\t\t\n\t\t\t\n\t\t\tfor(int j=i+1;j<day5;j++){\n\t\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\t\t++_weeklyhours; }\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t/*if(_weeklyhours>temp.get_tw_hour()){\n\t\t\t\tthis.fitness=this.fitness-100 ; //adunato na kanei parapanw wres ma8hma//\n\t\t\t}else\n\t\t\t\t{++this.fitness;}*/\n\t\t\tif(_weeklyhours<temp.get_tw_hour()){++this.fitness;}\n\t\t\tclosedSet.add(this.genes[i]);}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//*************END OF WEEKLY EVALUATION**********//\n\t\n\t\t//**START OF LESSON EVALUATION***//\n\t\tArraylistLesson set=new ArraylistLesson();\n\t\tclass_lid templ=null;\n\t\tTeacher_lesson tempj=null;\n\t\tint lid=0;\n\t\tString _class;\n\t\tint _classhours=1;\n\t\tfor(int i=0;i<day5;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp!=null){\n\t\t\tlid=temp.get_lid();\n\t\t\t_class=temp.get_class();\n\t\t\ttempl=new class_lid(lid,_class);\n\t\t\tif(!set.contains(templ)){\n\t\t\t\t\n\t\t\t\tfor(int j=i+1;j<day5;j++){\n\t\t\t\t\ttempj=getdata(this.genes[j]);{\n\t\t\t\t\t\tif(tempj!=null){\n\t\t\t\t\t\t\tif(temp.get_tid()==tempj.get_tid()){\n\t\t\t\t\t\t\t\tif(temp.get_lid()==tempj.get_lid()&&temp.get_class().equalsIgnoreCase(tempj.get_class())){\n\t\t\t\t\t\t\t\t\t++_classhours;\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}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tint hours;\n\t\t\t\thours=temp.get_lhours();\n\t\t\t\n\t\tif(_classhours==hours){\n\t\t\t++this.fitness;\n\t\t}\n\t\tset.add(templ);\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t}",
"private void updatePerformanceGraph(boolean isUpdate, PortfolioRecord portRecord) {\n XYChart.Series<String, Double> series = new XYChart.Series<>();\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"M/d/yy\");\n List<DataPoint> history = portRecord.getHistory();\n boolean lowerBoundFound = false;\n\n for (int i = 0; i < history.size(); i++) {\n DataPoint dataPoint = history.get(i);\n LocalDate date = dataPoint.getDate();\n double moneyMade = dataPoint.getMarketCloseValue() - dataPoint.getMoneyInvested();\n double percentReturn = (dataPoint.getMarketCloseValue() - dataPoint.getMoneyInvested()) / dataPoint.getMoneyInvested() * 100;\n\n if (date.compareTo(toDateBound) > 0) {\n toDateBound = history.get(i - 1).getDate();\n\n break;\n } else if (date.equals(toDateBound)) {\n series.getData().add(new XYChart.Data<>(date.format(formatter), currMode == Mode.GROSS_PROFITS ? moneyMade : percentReturn));\n\n break;\n } else if (date.compareTo(fromDateBound) > 0 && !lowerBoundFound) {\n series.getData().add(new XYChart.Data<>(date.format(formatter), currMode == Mode.GROSS_PROFITS ? moneyMade : percentReturn));\n lowerBoundFound = true;\n fromDateBound = date;\n\n } else if (date.equals(fromDateBound)) {\n series.getData().add(new XYChart.Data<>(date.format(formatter), currMode == Mode.GROSS_PROFITS ? moneyMade : percentReturn));\n lowerBoundFound = true;\n } else if (date.compareTo(fromDateBound) > 0 && date.compareTo(toDateBound) < 0) {\n series.getData().add(new XYChart.Data<>(date.format(formatter), currMode == Mode.GROSS_PROFITS ? moneyMade : percentReturn));\n }\n }\n\n if (series.getData().size() > MAX_DATA_POINTS) {\n series = resizeDataSeries(series);\n }\n\n formatYAxis();\n\n performanceGraph.getData().clear();\n performanceGraph.getData().add(series);\n overviewController.performanceManagerFinished(isUpdate, fromDateBound, toDateBound);\n }",
"private void previousDay() {\r\n tmp.setDay(tmp.getDay() - 1);\r\n int nd = tmp.getDayOfWeek();\r\n nd--;\r\n if (nd == 0) nd = daysInWeek;\r\n tmp.setDayOfWeek(nd);\r\n upDMYcountDMYcount();\r\n }",
"public void clearWeeklyView(){\n\t\tthis.weeklyView=false;\n\t\tnotifyDataSetChanged();\n\t\tnotifyDataSetInvalidated();\n\t}",
"private Set calculateTimeSet() {\n List choices = getDataChoices();\n if (choices.isEmpty()) {\n return null;\n }\n Set newSet = null;\n for (int i = 0; i < choices.size(); i++) {\n try {\n VerticalProfileInfo info = getVPInfo(i);\n GridDataInstance dataInstance = info.getDataInstance();\n Set set = GridUtil.getTimeSet(dataInstance.getGrid());\n //System.out.println(\"di.timeset[\"+i+\"] = \" + set);\n if (set != null) {\n if (newSet == null) {\n newSet = set;\n } else {\n newSet = newSet.merge1DSets(set);\n }\n }\n } catch (Exception e) {\n logger.error(\"Problem calculating TimeSet\", e);\n }\n }\n //System.out.println(\"merged time set = \" + newSet);\n return newSet;\n }",
"public void calculateEarnings(){\n if (wages.size() > expenses.size()){\n //check size difference\n int sizeUp = wages.size() - expenses.size();\n for(int i = 0; i < sizeUp; i++){\n //add zero(s) to expenses to match up(this assumes no expenses for the week(s))\n expenses.add(BigDecimal.ZERO);\n }\n }\n\n if(expenses.size() > wages.size()){\n //check size difference\n int sizeUp = expenses.size() - wages.size();\n for(int i = 0; i < sizeUp; i++){\n //add zero(s) to expenses to match up(this assumes no income for the week(s))\n wages.add(BigDecimal.ZERO);\n }\n }\n for(int i=0; i < wages.size(); i++){\n BigDecimal profits;\n profits = wages.get(i).subtract(expenses.get(i));\n BigDecimal roundUp = profits.setScale(2, RoundingMode.HALF_UP);\n earningsList.add(roundUp);\n }\n }",
"@Override\r\n\tpublic List<SalesAnalysis> getSalesAnalysis(Date fromDate, Date toDate) {\r\n\t\t\r\n\t\tList<SalesAnalysis> salesAnalysisDetails=new ArrayList<>();\r\n\t\tSalesAnalysis salesAnalysis=new SalesAnalysis();\r\n\t\t\r\n\t\t//get orders placed in the given period\r\n\t\tList<Order> orderDetails=orderService.getOrdersBetween(fromDate, toDate);\r\n\t\t\r\n\t\tHashMap<String, Double> purchasePriceDetails=new HashMap<>();\r\n\t\tHashMap<String, Double> salesPriceDetails=new HashMap<>();\r\n\t\tint qty=0;\r\n\t\tdouble salesPrice=0;\r\n\t\tdouble purchasePrice=0;\r\n\t\t\r\n\t\t//get total revenue for period\r\n\t\tdouble totalRevenue=getTotalRevenueBetween(fromDate, toDate);\r\n\t\t\r\n\t\t//get best seller details for the products, category-wise(from PRODUCT table)\r\n\t\tList<Object[]> bestSellerDetails=productService.getBestSellerId();\r\n\t\tSystem.out.println(bestSellerDetails);\r\n\t\t\r\n\t\t\r\n\t\t//for each product category, check sales details\r\n\t\tfor(Object[] object:bestSellerDetails)\t{\r\n\t\t\tString productCategory=(String)object[0];\r\n\t\t\tsalesPrice=0;\r\n\t\t\tpurchasePrice=0;\r\n\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\r\n\t\t\t//for each order, check product category and add details to maps\r\n\t\t\tfor(Order order:orderDetails)\t{\r\n\t\t\t\t\r\n\t\t\t\t//get products in this order\r\n\t\t\t\tList<CartProduct> products=order.getCart().getCartProducts();\r\n\t\t\t\t\r\n\t\t\t\t//getting purchase price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tpurchasePrice=purchasePriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(product.getProduct().getQuantity()*product.getProduct().getProductPrice());\r\n\t\t\t\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//getting sales price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tqty=product.getQuantity();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tsalesPrice=salesPriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(qty*(100-product.getProduct().getDiscount())*product.getProduct().getProductPrice())/100;\r\n\t\t\t\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//make SalesAnalysis object using obtained data\r\n\t\t\tsalesAnalysis.setProductCategory(productCategory);\r\n\t\t\tsalesAnalysis.setMerchant(merchantService.getMerchantName((Integer)object[1]));\r\n\t\t\tsalesAnalysis.setProductQuantity(purchasePriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setProductSales(salesPriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setSalesPercent((salesAnalysis.getProductSales()*100)/salesAnalysis.getProductQuantity());\r\n\t\t\tsalesAnalysis.setTotalRevenue(totalRevenue);\r\n\t\t\t\r\n\t\t\t//make a list of sales analysis performed\r\n\t\t\tsalesAnalysisDetails.add(salesAnalysis);\r\n\t\t}\r\n\t\t\r\n\t\treturn salesAnalysisDetails;\r\n\t}",
"public void updateData() {\n\t\tcal = eventsData.getCalendar();\n\t\tfirstDayOfWeek = eventsData.getFirstDayOfWeek();\n\t\tcurrentDayOfMonth = eventsData.getDayNumber();\n\t\tnumberOfDays = eventsData.getNumberOfDays();\n\t\tnumberOfWeeks = eventsData.getNumberOfWeeks();\n\t\tyear = eventsData.getYearNumber();\n\t\tmonth = eventsData.getMonthNumber();\n\t\tday = eventsData.getDayNumber();\n\t\tweek = eventsData.getDayOfWeek();\n\t}",
"private TaskSeriesCollection createCollection3() {\n Task sub1 = new Task(\"Sub1\", new Date(11), new Date(111));\n Task sub2 = new Task(\"Sub2\", new Date(22), new Date(222));\n Task sub3 = new Task(\"Sub3\", new Date(33), new Date(333));\n Task sub4 = new Task(\"Sub4\", new Date(44), new Date(444));\n Task sub5 = new Task(\"Sub5\", new Date(55), new Date(555));\n Task sub6 = new Task(\"Sub6\", new Date(66), new Date(666));\n sub1.setPercentComplete(0.111);\n sub2.setPercentComplete(0.222);\n sub3.setPercentComplete(0.333);\n sub4.setPercentComplete(0.444);\n sub5.setPercentComplete(0.555);\n sub6.setPercentComplete(0.666);\n TaskSeries seriesA = new TaskSeries(\"Series A\");\n Task taskA1 = new Task(\"Task 1\", new SimpleTimePeriod(new Date(100), new Date(200)));\n taskA1.setPercentComplete(0.1);\n taskA1.addSubtask(sub1);\n Task taskA2 = new Task(\"Task 2\", new SimpleTimePeriod(new Date(220), new Date(350)));\n taskA2.setPercentComplete(0.2);\n taskA2.addSubtask(sub2);\n taskA2.addSubtask(sub3);\n seriesA.add(taskA1);\n seriesA.add(taskA2);\n TaskSeries seriesB = new TaskSeries(\"Series B\");\n Task taskB2 = new Task(\"Task 2\", new SimpleTimePeriod(new Date(2220), new Date(3350)));\n taskB2.setPercentComplete(0.3);\n taskB2.addSubtask(sub4);\n taskB2.addSubtask(sub5);\n taskB2.addSubtask(sub6);\n seriesB.add(taskB2);\n TaskSeriesCollection tsc = new TaskSeriesCollection();\n tsc.add(seriesA);\n tsc.add(seriesB);\n return tsc;\n }",
"public ArrayList<Integer> getUsedUDays() {\n return pastUDays;\n }",
"public TreeMap<String, Integer[]> generateAppCategory(Date startDate, Date endDate) {\n\n //Total Usage Time for each appid\n TreeMap<Integer, Double> appResult = new TreeMap<Integer, Double>();\n //Total Usage Time for each category\n TreeMap<String, Double> result = new TreeMap<String, Double>();\n //Total Usage Time and Percent for each category\n TreeMap<String, Integer[]> toResult = new TreeMap<String, Integer[]>();\n\n AppUsageDAO auDAO = new AppUsageDAO();\n ArrayList<User> userList = new ArrayList<User>();\n\n userList = auDAO.retrieveUsers(startDate, endDate);\n for (int i = 0; i < userList.size(); i++) {\n\n User currUser = userList.get(i);\n ArrayList<AppUsage> userUsage = auDAO.retrieveByUser(currUser.getMacAddress(), startDate, endDate);\n Date nextDay = new Date(startDate.getTime() + 60 * 60 * 1000 * 24);\n\n Date oldTime = null;\n if (userUsage.size() > 0) {\n oldTime = userUsage.get(0).getDate();\n if (oldTime.after(nextDay)) {\n nextDay = new Date(nextDay.getTime() + 60 * 60 * 1000 * 24);\n }\n }\n\n for (int j = 1; j < userUsage.size(); j++) {\n AppUsage au = userUsage.get(j);\n Date newTime = au.getDate();\n\n //store oldTime appId\n int appId = userUsage.get(j - 1).getAppId();\n boolean beforeAppeared = false;\n if (newTime.before(nextDay)) {\n beforeAppeared = true;\n\n //difference = usage time of the oldTime appId\n double difference = Utility.secondsBetweenDates(oldTime, newTime);\n\n //If difference less than/equal 2 minutes\n if (difference <= 2 * 60) {\n // add time to the appId\n if (appResult.containsKey(appId)) {\n double value = appResult.get(appId);\n appResult.put(appId, (value + difference));\n } else {\n appResult.put(appId, difference);\n }\n\n } else {\n // add 10sec to appid if > 2 mins\n if (appResult.containsKey(appId)) {\n double value = appResult.get(appId);\n appResult.put(appId, (value + 10));\n } else {\n appResult.put(appId, 10.0);\n }\n\n }\n\n } else {\n nextDay = new Date(nextDay.getTime() + 60 * 60 * 1000 * 24);\n\n if (!beforeAppeared) {\n double diff = Utility.secondsBetweenDates(oldTime, newTime);\n //add time to the appid\n if (diff <= 2 * 60) {\n // add time to the appId\n if (appResult.containsKey(appId)) {\n double value = appResult.get(appId);\n appResult.put(appId, (value + diff));\n } else {\n appResult.put(appId, diff);\n }\n\n } else {\n // add 10sec to appid if > 2 mins\n if (appResult.containsKey(appId)) {\n double value = appResult.get(appId);\n appResult.put(appId, (value + 10));\n } else {\n appResult.put(appId, 10.0);\n }\n\n }\n }\n\n }\n\n oldTime = newTime;\n\n }\n\n //get the appId of the last user usage\n int lastAppId = userUsage.get(userUsage.size() - 1).getAppId();\n\n if (oldTime.before(nextDay)) {\n double difference = Utility.secondsBetweenDates(oldTime, nextDay);\n //add the time difference to last appId\n if (difference < 10) {\n if (appResult.containsKey(lastAppId)) {\n double value = appResult.get(lastAppId);\n appResult.put(lastAppId, (value + difference));\n } else {\n appResult.put(lastAppId, difference);\n }\n } else {\n if (appResult.containsKey(lastAppId)) {\n double value = appResult.get(lastAppId);\n appResult.put(lastAppId, (value + 10));\n } else {\n appResult.put(lastAppId, 10.0);\n }\n }\n } else {\n\n if (appResult.containsKey(lastAppId)) {\n double value = appResult.get(lastAppId);\n appResult.put(lastAppId, (value + 10));\n } else {\n appResult.put(lastAppId, 10.0);\n }\n\n }\n\n //DIVIDE TO GET INTO DAYS\n long days = Utility.daysBetweenDates(startDate, endDate);\n\n AppDAO app = new AppDAO();\n\n //Retrieve appid in each category\n TreeMap<String, ArrayList<Integer>> appCategoryList = app.retrieveByCategory();\n Iterator<String> iter = appCategoryList.keySet().iterator();\n double totTime = 0.0;\n //Sum the total time by category\n while (iter.hasNext()) {\n String key = iter.next();\n //EACH CATEGORY\n ArrayList<Integer> innerList = appCategoryList.get(key);\n double totCatTime = 0.0;\n for (int j = 0; j < innerList.size(); j++) {\n int appid = innerList.get(j);\n double timePerApp = 0.0;\n\n if (appResult.containsKey(appid)) {\n timePerApp = appResult.get(appid);\n\n }\n totCatTime += timePerApp;\n }\n\n double avgCatTime = totCatTime / days;\n\n totTime += avgCatTime;\n result.put(key, avgCatTime);\n }\n\n Iterator<String> iterator = result.keySet().iterator();\n //Calculate the percentage for each category\n while (iterator.hasNext()) {\n\n String name = iterator.next();\n double duration = result.get(name);\n double percent = (duration / totTime) * 100;\n Integer[] arrToReturn = new Integer[2];\n\n arrToReturn[0] = Integer.valueOf(Math.round(duration) + \"\");\n arrToReturn[1] = Integer.valueOf(Math.round(percent) + \"\");\n toResult.put(name, arrToReturn);\n\n }\n\n }\n ArrayList<String> catList = Utility.retrieveCategories();\n\n for (String cat : catList) {\n if (!toResult.containsKey(cat)) {\n Integer[] arrToReturn = new Integer[2];\n arrToReturn[0] = 0;\n arrToReturn[1] = 0;\n toResult.put(cat, arrToReturn);\n }\n }\n return toResult;\n }",
"public void trackRevenue() {\n track(\"_revenue\");\n }",
"protected DataSetDefinition careAndTreatmentDataSet() {\n\t\tCohortIndicatorDataSetDefinition cohortDsd = new CohortIndicatorDataSetDefinition();\n\t\tcohortDsd.setName(\"WeeklySurge\");\n\t\tcohortDsd.addParameter(new Parameter(\"startDate\", \"Start Date\", Date.class));\n\t\tcohortDsd.addParameter(new Parameter(\"endDate\", \"End Date\", Date.class));\n\t\tcohortDsd.addDimension(\"age\", ReportUtils.map(commonDimensions.datimFineAgeGroups(), \"onDate=${endDate}\"));\n\t\tcohortDsd.addDimension(\"gender\", ReportUtils.map(commonDimensions.gender()));\n\t\t\n\t\tColumnParameters colTotal = new ColumnParameters(null, \"Total\", \"\");\n\t\t\n\t\tList<ColumnParameters> disaggregation = Arrays.asList(colTotal);\n\t\t\n\t\tString indParams = \"startDate=${startDate},endDate=${endDate}\";\n\t\t\n\t\tEmrReportingUtils.addRow(cohortDsd, \"TX_New\", \"Newly Started ART\",\n\t\t ReportUtils.map(datimIndicators.newOnArt(), indParams), disaggregation, Arrays.asList(\"25\"));\n\t\t\n\t\t//Number of Adults and Children with HIV infection receiving ART By Age/Sex Disagreggation\n\t\tEmrReportingUtils.addRow(cohortDsd, \"TX_CURR\", \"Adults and Children with HIV infection receiving ART\",\n\t\t ReportUtils.map(datimIndicators.currentlyOnArt(), indParams), disaggregation, Arrays.asList(\"25\"));\n\t\t\n\t\tEmrReportingUtils.addRow(cohortDsd, \"LTFU_RECENT\", \"LTFU within the reporting period\",\n\t\t ReportUtils.map(datimIndicators.ltfuRecent(), indParams), disaggregation, Arrays.asList(\"01\"));\n\t\t\n\t\tEmrReportingUtils.addRow(cohortDsd, \"LTFU_RTC\", \"LTFU returned to care during the reporting period\",\n\t\t ReportUtils.map(datimIndicators.ltfuRTC(), indParams), disaggregation, Arrays.asList(\"01\"));\n\t\t\n\t\treturn cohortDsd;\n\t\t\n\t}",
"public void recomendarTemposEM() {\n ArrayList iTXCH = new ArrayList(); /// Instancias pre fusion\n ArrayList iTYCH = new ArrayList();\n ArrayList iTZCH = new ArrayList();\n\n ArrayList cenTXCH = new ArrayList(); /// Centroides Tempos tempos ch\n ArrayList cenTYCH = new ArrayList();\n ArrayList cenTZCH = new ArrayList();\n\n ArrayList cenTXDB = new ArrayList(); /// centroide tempos db\n ArrayList cenTYDB = new ArrayList();\n ArrayList cenTZDB = new ArrayList();\n\n ArrayList insTXCH = new ArrayList(); /// Instancias fusion\n ArrayList insTYCH = new ArrayList();\n ArrayList insTZCH = new ArrayList();\n\n ArrayList ppTXCH = new ArrayList(); /// centroide promedio ponderado tempos\n ArrayList ppTYCH = new ArrayList();\n ArrayList ppTZCH = new ArrayList();\n\n ArrayList ppTXDB = new ArrayList(); /// centroide promedio ponderado duracion\n ArrayList ppTYDB = new ArrayList();\n ArrayList ppTZDB = new ArrayList();\n\n ArrayList paTXCH = new ArrayList(); /// centroide promedio aritmetico tempos ch\n ArrayList paTYCH = new ArrayList();\n ArrayList paTZCH = new ArrayList();\n\n ArrayList paTXDB = new ArrayList(); /// centroide promedio artimetico tempos db\n ArrayList paTYDB = new ArrayList();\n ArrayList paTZDB = new ArrayList();\n\n////////////////// TEMPO EN X ////////////////////////////// \n ////////// calinsky - harabaz /////////\n if (txchsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTXCH = CExtraer.arrayTempoXCpruebaEM;\n iTXCH = CExtraer.arrayTempoXIpruebaEM;\n res = Double.parseDouble((String) iTXCH.get(0));\n for (int i = 0; i < iTXCH.size(); i++) {\n if (Double.parseDouble((String) iTXCH.get(i)) > res) {\n System.out.println(iTXCH.get(i));\n res = Double.parseDouble((String) iTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXCH2.setText(cenTXCH.get(iposision).toString());\n }\n\n if (txchsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionarEM.arregloInstanciasTX1EM;\n ppTXCH = CFusionarEM.arregloPPTX1EM;\n\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n System.out.println(insTXCH.get(i));\n\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n\n System.out.println(iposision);\n\n }\n }\n valorTXCH2.setText(ppTXCH.get(iposision).toString());\n }\n\n if (txchsEM == \"Fusion PA\") {\n\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionarEM.arregloInstanciasTX1EM;\n paTXCH = CFusionarEM.arregloPATX1EM;\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n }\n }\n valorTXCH2.setText(paTXCH.get(iposision).toString());\n\n }\n\n //////////// davies bouldin //////////////\n if (txdbsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTXDB = CExtraer.arrayTempoXCpruebaEM;\n iTXCH = CExtraer.arrayTempoXIpruebaEM;\n res = Double.parseDouble((String) iTXCH.get(0));\n for (int i = 0; i < iTXCH.size(); i++) {\n if (Double.parseDouble((String) iTXCH.get(i)) > res) {\n System.out.println(iTXCH.get(i));\n res = Double.parseDouble((String) iTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXDB2.setText(cenTXDB.get(iposision).toString());\n }\n\n if (txdbsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionarEM.arregloInstanciasTX1EM;\n ppTXDB = CFusionarEM.arregloPPTX1EM;\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n System.out.println(insTXCH.get(i));\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXDB2.setText(ppTXDB.get(iposision).toString());\n }\n if (txdbsEM == \"Fusion PA\") {\n\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionarEM.arregloInstanciasTX1EM;\n paTXDB = CFusionarEM.arregloPATX1EM;\n\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n }\n }\n valorTXDB2.setText(paTXDB.get(iposision).toString());\n\n }\n\n ///////////// TEMPO EN Y //////////// \n //////////// calinsky - harabaz /////////////\n if (tychsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTYCH = CExtraer.arrayTempoYCpruebaEM;\n iTYCH = CExtraer.arrayTempoYIpruebaEM;\n res = Double.parseDouble((String) iTYCH.get(0));\n for (int i = 0; i < iTYCH.size(); i++) {\n if (Double.parseDouble((String) iTYCH.get(i)) > res) {\n System.out.println(iTYCH.get(i));\n res = Double.parseDouble((String) iTYCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTYCH2.setText(cenTYCH.get(iposision).toString());\n }\n\n if (tychsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionarEM.arregloInstanciasTY1EM;\n ppTYCH = CFusionarEM.arregloPPTY1EM;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYCH2.setText(ppTYCH.get(iposision).toString());\n\n }\n\n if (tychsEM == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionarEM.arregloInstanciasTY1EM;\n paTYCH = CFusionarEM.arregloPATY1EM;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYCH2.setText(paTYCH.get(iposision).toString());\n }\n /////////// davies - bouldin /////////////\n if (tydbsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTYDB = CExtraer.arrayTempoYCpruebaEM;\n iTYCH = CExtraer.arrayTempoYIpruebaEM;\n res = Double.parseDouble((String) iTYCH.get(0));\n for (int i = 0; i < iTYCH.size(); i++) {\n if (Double.parseDouble((String) iTYCH.get(i)) > res) {\n System.out.println(iTYCH.get(i));\n res = Double.parseDouble((String) iTYCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTYDB2.setText(cenTYDB.get(iposision).toString());\n }\n\n if (tydbsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionarEM.arregloInstanciasTY1EM;\n ppTYDB = CFusionarEM.arregloPPTY1EM;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYDB2.setText(ppTYDB.get(iposision).toString());\n }\n if (tydbsEM == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionarEM.arregloInstanciasTY1EM;\n paTYDB = CFusionarEM.arregloPATY1EM;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYDB2.setText(paTYDB.get(iposision).toString());\n }\n\n ///////////// TEMPO EN Z //////////// \n ///////////// calinsky harabaz ///////////////////\n if (tzchsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTZCH = CExtraer.arrayTempoZCpruebaEM;\n iTZCH = CExtraer.arrayTempoZIpruebaEM;\n res = Double.parseDouble((String) iTZCH.get(0));\n for (int i = 0; i < iTZCH.size(); i++) {\n if (Double.parseDouble((String) iTZCH.get(i)) > res) {\n System.out.println(iTZCH.get(i));\n res = Double.parseDouble((String) iTZCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTZCH2.setText(cenTZCH.get(iposision).toString());\n }\n\n if (tzchsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionarEM.arregloInstanciasTZ1EM;\n ppTZCH = CFusionarEM.arregloPPTZ1EM;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZCH2.setText(ppTZCH.get(iposision).toString());\n }\n if (tzchsEM == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionarEM.arregloInstanciasTZ1EM;\n paTZCH = CFusionarEM.arregloPATZ1EM;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZCH2.setText(paTZCH.get(iposision).toString());\n }\n\n ///////////// davies bouldin /////////////////// \n if (tzdbsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTZDB = CExtraer.arrayTempoZCpruebaEM;\n iTZCH = CExtraer.arrayTempoZIpruebaEM;\n res = Double.parseDouble((String) iTZCH.get(0));\n for (int i = 0; i < iTZCH.size(); i++) {\n if (Double.parseDouble((String) iTZCH.get(i)) > res) {\n System.out.println(iTZCH.get(i));\n res = Double.parseDouble((String) iTZCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTZDB2.setText(cenTZDB.get(iposision).toString());\n }\n\n if (tzdbsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionarEM.arregloInstanciasTZ1EM;\n ppTZDB = CFusionarEM.arregloPPTZ1EM;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZDB2.setText(ppTZDB.get(iposision).toString());\n }\n //////////\n if (tzdbsEM == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionarEM.arregloInstanciasTZ1EM;\n paTZDB = CFusionarEM.arregloPATZ1EM;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZDB2.setText(paTZDB.get(iposision).toString());\n }\n\n }",
"private void buildMonthly(int year, int month, int numdays, int dataIndex, Bundle bundle) {\n\n double[] raw_xdata = new double[numdays + 2];\n double[] raw_ydata1 = new double[numdays + 2];\n double[] raw_ydata2 = new double[numdays + 2];\n double[] raw_ydata3 = null;\n if (dataIndex == Constants.DATA_MONTHLY_TEMPERATURE) {\n raw_ydata3 = new double[numdays + 2];\n Arrays.fill(raw_ydata1, Constants.DATA_INVALID);\n Arrays.fill(raw_ydata2, Constants.DATA_INVALID);\n Arrays.fill(raw_ydata3, Constants.DATA_INVALID);\n }\n\n // set the first y1 and y2 values\n int xstart = bundle.getInt(\"xorigin1\", 0);\n raw_xdata[0] = xstart;\n\n // set the y1 and y2 values for the month\n for (int i = 1; i < numdays + 1; i++) {\n raw_xdata[i] = i;\n String filename = UtilsMisc.getDecimalFormat(year, 4) + \"-\" +\n UtilsMisc.getDecimalFormat(month + 1, 2) + \"-\" +\n UtilsMisc.getDecimalFormat(i, 2);\n if (summaryDB.isInSummaryTable(context, filename)) {\n int log_id = summaryDB.getMonitorID(context, filename);\n SummaryProvider.Summary summary = summaryDB.getSummary(context, log_id);\n switch (dataIndex) {\n case Constants.DATA_PEAKWATTS:\n raw_ydata1[i] = summary.getPeak_watts();\n raw_ydata2[i] = summary.getGenerated_watts();\n break;\n case Constants.DATA_PEAKTIME:\n long midnight = UtilsDate.get_midNightTimestamp(summary.getStart_time(), lat, lon);\n raw_ydata1[i] = UtilsDate.getTimeSeconds(summary.getPeak_time() - midnight);\n raw_ydata2[i] = summary.getGenerated_watts();\n break;\n case Constants.DATA_SUNLIGHT:\n raw_ydata1[i] = UtilsDate.getTimeSeconds(summary.getEnd_time() - summary.getStart_time());\n raw_ydata2[i] = summary.getGenerated_watts();\n break;\n case Constants.DATA_READINGS:\n raw_ydata1[i] = summaryDB.getDetailCount(context, log_id);\n raw_ydata2[i] = summary.getGenerated_watts();\n break;\n case Constants.DATA_MONTHLY_TEMPERATURE:\n raw_ydata1[i] = summary.getMinTemperature();\n raw_ydata2[i] = summary.getMaxTemperature();\n raw_ydata3[i] = summary.getGenerated_watts();\n break;\n case Constants.DATA_MONTHLY_CLOUDS:\n raw_ydata1[i] = summary.getAvgClouds();\n raw_ydata2[i] = summary.getGenerated_watts();\n break;\n default:\n break;\n }\n } else {\n if (dataIndex != Constants.DATA_MONTHLY_TEMPERATURE) {\n raw_ydata1[i] = 0.0;\n raw_ydata2[i] = 0.0;\n }\n }\n }\n\n // set the first and last y1 and y2 values\n int xend = numdays;\n raw_xdata[numdays+1] = xend + 1;\n switch (dataIndex) {\n case Constants.DATA_PEAKWATTS :\n raw_ydata1[numdays+1] = raw_ydata1[numdays]; raw_ydata2[numdays+1] = raw_ydata2[numdays];\n raw_ydata1[0] = raw_ydata1[1]; raw_ydata2[0] = raw_ydata2[1]; break;\n case Constants.DATA_PEAKTIME :\n raw_ydata1[numdays+1] = raw_ydata1[numdays]; raw_ydata2[numdays+1] = raw_ydata2[numdays];\n raw_ydata1[0] = raw_ydata1[1]; raw_ydata2[0] = raw_ydata2[1]; break;\n case Constants.DATA_SUNLIGHT :\n raw_ydata1[numdays+1] = raw_ydata1[numdays]; raw_ydata2[numdays+1] = raw_ydata2[numdays];\n raw_ydata1[0] = raw_ydata1[1]; raw_ydata2[0] = raw_ydata2[1]; break;\n case Constants.DATA_READINGS :\n raw_ydata1[numdays+1] = raw_ydata1[numdays]; raw_ydata2[numdays+1] = raw_ydata2[numdays];\n raw_ydata1[0] = raw_ydata1[1]; raw_ydata2[0] = raw_ydata2[1]; break;\n case Constants.DATA_MONTHLY_CLOUDS :\n raw_ydata1[numdays+1] = raw_ydata1[numdays]; raw_ydata2[numdays+1] = raw_ydata2[numdays];\n raw_ydata1[0] = raw_ydata1[1]; raw_ydata2[0] = raw_ydata2[1]; break;\n case Constants.DATA_MONTHLY_TEMPERATURE :\n Number[] numbers = UtilsMisc.toNumber(raw_ydata1, -273); // convert from kelvin to centigrade\n numbers = UtilsMisc.fix_end_numbers(numbers, true);\n numbers = UtilsMisc.fix_mid_numbers(numbers);\n raw_ydata1 = UtilsMisc.toDouble(numbers);\n\n numbers = UtilsMisc.toNumber(raw_ydata2, -273);\n numbers = UtilsMisc.fix_end_numbers(numbers, true);\n numbers = UtilsMisc.fix_mid_numbers(numbers);\n raw_ydata2 = UtilsMisc.toDouble(numbers);\n\n numbers = UtilsMisc.toNumber(raw_ydata3);\n numbers = UtilsMisc.fix_end_numbers(numbers, true);\n numbers = UtilsMisc.fix_mid_numbers(numbers);\n raw_ydata3 = UtilsMisc.toDouble(numbers);\n default :\n break;\n }\n\n LinearInterpolation lp1 = new LinearInterpolation(raw_xdata, raw_ydata1);\n LinearInterpolation lp2 = new LinearInterpolation(raw_xdata, raw_ydata2);\n LinearInterpolation lp3 = (raw_ydata3 != null)? new LinearInterpolation(raw_xdata, raw_ydata3): null;\n int time = xstart;\n ArrayList<Integer> xList = new ArrayList<>();\n ArrayList<Float> yList1 = new ArrayList<>();\n ArrayList<Float> yList2 = new ArrayList<>();\n ArrayList<Float> yList3 = new ArrayList<>();\n while (time < (xend+1)) {\n xList.add(time);\n yList1.add((float) lp1.interpolate(time));\n yList2.add((float) lp2.interpolate(time));\n if (lp3 != null)\n yList3.add((float) lp3.interpolate(time));\n time += 1;\n }\n\n int[] xdata = Ints.toArray(xList);\n float[] ydata1 = Floats.toArray(yList1);\n float[] ydata2 = Floats.toArray(yList2);\n float[] ydata3 = Floats.toArray(yList3);\n bundle.putIntArray(\"xdata1\", xdata);\n bundle.putIntArray(\"xdata2\", xdata);\n bundle.putIntArray(\"xdata3\", xdata);\n bundle.putFloatArray(\"ydata1\", ydata1);\n bundle.putFloatArray(\"ydata2\", ydata2);\n bundle.putFloatArray(\"ydata3\", ydata3.length > 0? ydata3: null);\n\n switch (dataIndex) {\n case Constants.DATA_MONTHLY_TEMPERATURE:\n smooth_plot(bundle, true, \"1\");\n smooth_plot(bundle, true, \"2\");\n break;\n case Constants.DATA_MONTHLY_CLOUDS:\n smooth_plot(bundle, true, \"1\");\n break;\n }\n\n }",
"private void todayReport() {\n\t\tListSeries dollarEarning = new ListSeries();\n\t\tString[] dates = new String[1];\n\t\t/* Create a DateField with the default style. */\n Calendar calendar=Calendar.getInstance();\n\t\t\n\t\tvReportDisplayLayout.removeAllComponents();\n\t\tdates[0] = String.valueOf(calendar.get(Calendar.MONTH)+1) + \"/\" + \n\t\t\t\tString.valueOf(calendar.get(Calendar.DATE)) + \"/\" + \n\t\t\t\tString.valueOf(calendar.get(Calendar.YEAR));\n\t\tdollarEarning = getTodayData();\n\t\t\n\t\tdisplayChart chart = new displayChart();\n\t\t\n\t\tdReportPanel.setContent(chart.getDisplayChart(dates, dollarEarning));\n\t\tvReportDisplayLayout.addComponent(dReportPanel);\n\t}",
"private void initChart() {\n Cartesian cartesian = AnyChart.line();\n\n cartesian.animation(true);\n\n cartesian.padding(10d, 20d, 5d, 20d);\n\n cartesian.crosshair().enabled(true);\n cartesian.crosshair()\n .yLabel(true)\n // TODO ystroke\n .yStroke((Stroke) null, null, null, (String) null, (String) null);\n\n cartesian.tooltip().positionMode(TooltipPositionMode.POINT);\n\n cartesian.title(\"Steps taken in this week and last week\");\n\n cartesian.yAxis(0).title(\"Steps\");\n cartesian.xAxis(0).labels().padding(5d, 5d, 5d, 5d);\n\n List<DataEntry> seriesData = new ArrayList<>();\n Log.d(\"Size This Week\",stepsTakenModelsThisWeek.size()+\"\");\n for(int i = 0 ; i<7 ; i++){\n CustomDataEntry c = new CustomDataEntry(days[i],stepsTakenModelsLastWeek.get(i).getSteps());\n if(i<stepsTakenModelsThisWeek.size()){\n c.setValue(\"value2\",stepsTakenModelsThisWeek.get(i).getSteps());\n }else{\n if(DateUtilities.getDayInAbbBySelectedDate(stepsTakenModelsLastWeek.get(i).getDate()).equals(\n DateUtilities.getCurrentDayInAbb()))\n {\n c.setValue(\"value2\",stepsToday);\n }else{\n c.setValue(\"value2\",0);\n }\n }\n seriesData.add(c);\n }\n\n Set set = Set.instantiate();\n set.data(seriesData);\n Mapping series1Mapping = set.mapAs(\"{ x: 'x', value: 'value' }\");\n Mapping series2Mapping = set.mapAs(\"{ x: 'x', value: 'value2' }\");\n\n Line series1 = cartesian.line(series1Mapping);\n series1.name(\"Last Week\");\n series1.hovered().markers().enabled(true);\n series1.hovered().markers()\n .type(MarkerType.CIRCLE)\n .size(4d);\n series1.tooltip()\n .position(\"right\")\n .anchor(Anchor.LEFT_CENTER)\n .offsetX(5d)\n .offsetY(5d);\n\n Line series2 = cartesian.line(series2Mapping);\n series2.name(\"This Week\");\n series2.hovered().markers().enabled(true);\n series2.hovered().markers()\n .type(MarkerType.CIRCLE)\n .size(4d);\n series2.tooltip()\n .position(\"right\")\n .anchor(Anchor.LEFT_CENTER)\n .offsetX(5d)\n .offsetY(5d);\n\n\n cartesian.legend().enabled(true);\n cartesian.legend().fontSize(13d);\n cartesian.legend().padding(0d, 0d, 10d, 0d);\n\n chart.setChart(cartesian);\n }",
"private void setupSoldTicketsByEventTypeChart() {\n chartCreator.createPieChart(soldTicketsByEventTypeChart, soldTicketsByEventTypeData);\n }",
"public void toPunish() {\n\n //// TODO: 24/03/2017 delete the following lines\n// dalDynamic.addRowToTable2(\"23/03/2017\",\"Thursday\",4,walkingLength,deviation)\n\n\n\n int dev,sum=0;\n long id;\n id=dalDynamic.getRecordIdAccordingToRecordName(\"minutesWalkTillEvening\");\n Calendar now = Calendar.getInstance();//today\n Calendar calendar = Calendar.getInstance();\n SimpleDateFormat dateFormat=new SimpleDateFormat(\"dd/MM/yyyy\");\n String date;\n for (int i = 0; i <DAYS_DEVIATION ; i++) {\n date=dateFormat.format(calendar.getTime());\n Log.v(\"Statistic\",\"date \"+date);\n dev = dalDynamic.getDeviationAccordingToeventTypeIdAnddate(id,date);\n sum+=dev;\n calendar.add(Calendar.DATE,-1);//// TODO: -1-i????\n }\n if(sum==DAYS_DEVIATION){\n Intent intent = new Intent(context,BlankActivity.class);\n context.startActivity(intent);\n //todo:punishment\n }\n\n }",
"public void adjustSettlementDatesAndPopulateMap() {\r\n\t\tfor (TradeEntity ee : entityArrayList) {\r\n\t\t\tif (!isWorkingDay(ee.getCurrency(), ee.getSettlementDate().getDayOfWeek())) {\r\n\t\t\t\tee.setEffectiveSettlementDate(getNextWorkingDay(ee));\r\n\t\t\t} else {\r\n\t\t\t\tee.setEffectiveSettlementDate(ee.getSettlementDate());\r\n\t\t\t}\r\n\t\t\tpopulateDateEntityMap(ee);\r\n\t\t}\r\n\r\n\t}",
"@Test(priority=2,groups = {\"smoke\"},\r\n\t\t\tdescription =\"Verify Zoom Functionality\")\r\n\tpublic void gethighchartsdate() throws Exception{\r\n\t\tdata = new CA_Visibility_Page(CurrentState.getDriver());\r\n\t\t\t\t\r\n\t\tString OneMonth =\"1m\";\r\n\t\tdata.clickHighchartCriteria(OneMonth);\r\n\t\taddEvidence(CurrentState.getDriver(), \"one Month Zoom functionality\", \"yes\");\r\n\t\tThread.sleep(5000);\r\n\t\t\r\n\t\tString ThreeMonth =\"3m\";\r\n\t\tdata.clickHighchartCriteria(ThreeMonth);\r\n\t\taddEvidence(CurrentState.getDriver(), \"one Month Zoom functionality\", \"yes\");\r\n\t\tThread.sleep(5000);\r\n\t\t\r\n\t\tString SixMonth =\"6m\";\r\n\t\tdata.clickHighchartCriteria(SixMonth);\r\n\t\taddEvidence(CurrentState.getDriver(), \"one Month Zoom functionality\", \"yes\");\r\n\t\tThread.sleep(5000);\r\n\t\t\r\n\t\tString OneYear =\"1y\";\r\n\t\tdata.clickHighchartCriteria(OneYear);\r\n\t\taddEvidence(CurrentState.getDriver(), \"one Month Zoom functionality\", \"yes\");\r\n\t\tThread.sleep(5000);\r\n\t\t\r\n\t\tString YearToDate =\"ytd\";\r\n\t\tdata.clickHighchartCriteria(YearToDate);\r\n\t\taddEvidence(CurrentState.getDriver(), \"one Month Zoom functionality\", \"yes\");\r\n\t\tThread.sleep(5000);\r\n\t\t\r\n\t\tString ALLDATA =\"all\";\r\n\t\tdata.clickHighchartCriteria(ALLDATA);\r\n\t\taddEvidence(CurrentState.getDriver(), \"one Month Zoom functionality\", \"yes\");\r\n\t\tThread.sleep(5000);\r\n\t}",
"public static ArrayList<Integer> getWorkoutClimbMonthCount(Calendar day, Context mContext) {\n DatabaseHelper handler = new DatabaseHelper(mContext);\n SQLiteDatabase database = handler.getWritableDatabase();\n\n long dayLength = 86400000;\n\n day.set(Calendar.HOUR, 0);\n day.set(Calendar.MINUTE, 0);\n day.set(Calendar.SECOND, 0);\n day.set(Calendar.MILLISECOND, 0);\n\n long monthStart = day.getTimeInMillis();\n long monthEnd = monthStart + dayLength * 42;\n Log.i(LOG_TAG, \"Month Start: \" + monthStart + \" | Month End: \" + monthEnd);\n\n ArrayList<Integer> eventsList = new ArrayList<>(42);\n for (int i = 0; i < 42; i++) {\n eventsList.add(0);\n }\n\n //grade type\n String[] projection = {\n DatabaseContract.CalendarTrackerEntry._ID,\n DatabaseContract.CalendarTrackerEntry.COLUMN_DATE,\n DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB};\n String whereClause = DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB + \"=? AND \" + DatabaseContract.CalendarTrackerEntry.COLUMN_DATE + \" BETWEEN ? AND ?\";\n String[] whereValue = {String.valueOf(DatabaseContract.IS_GYMCLIMB), String.valueOf(monthStart), String.valueOf(monthEnd)};\n Cursor cursor = database.query(DatabaseContract.CalendarTrackerEntry.TABLE_NAME,\n projection,\n whereClause,\n whereValue,\n null,\n null,\n null);\n\n int idColumnOutput = cursor.getColumnIndex(DatabaseContract.CalendarTrackerEntry.COLUMN_DATE);\n\n int cursorCount = cursor.getCount();\n Log.i(LOG_TAG, \"idColumnOutput: \" + idColumnOutput + \" | cursorCount: \" + cursorCount);\n\n if (cursorCount != 0) {\n //cursor.moveToFirst();\n while (cursor.moveToNext()) {\n long outputDate = cursor.getLong(idColumnOutput);\n long outputDay = (outputDate - monthStart) / dayLength;\n Log.i(LOG_TAG, \"outputDate: \" + outputDate + \" | outputDay: \" + outputDay);\n eventsList.set((int) outputDay, 1);\n }\n }\n\n try {\n return eventsList;\n } finally {\n cursor.close();\n database.close();\n handler.close();\n }\n }",
"public void setWeeklyView(){\n\t\tthis.weeklyView=true;\n\t\tnotifyDataSetChanged();\n\t\tnotifyDataSetInvalidated();\n\t}",
"public ArrayList<Integer> getUsedEDays() {\n return pastEDays;\n }",
"public void fetchData(View view){\n if (lastSelectedCategoryId != categoryId){\n // If the user has chosen a new category, then save its value\n lastSelectedCategoryId = categoryId;\n } else {\n Log.d(\"ANALYZE \", \" ANTI SPAM :(\");\n // If it's the old category, then do not do anything\n return;\n }\n\n // clear all old data!\n monthsValuesMap.clear();\n // put all months with ZERO values for sum\n for (int i = 0; i < 12; i++ ){\n monthsValuesMap.put(i, 0F);\n }\n\n final Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n // get today and clear time of day - 0h : 00m : 00s\n calendar.set(Calendar.HOUR_OF_DAY, 0); // ! clear would not reset the hour of day !\n calendar.clear(Calendar.MINUTE);\n calendar.clear(Calendar.SECOND);\n calendar.set(Calendar.MILLISECOND, 250);\n // get start of the month\n calendar.set(Calendar.DAY_OF_MONTH, 1);\n // get start of the year\n calendar.set(Calendar.MONTH, 0);\n\n long startOfYearInMs = calendar.getTimeInMillis();\n\n // get last month in the year\n calendar.set(Calendar.MONTH, 11);\n\n long endOfYearInMs = calendar.getTimeInMillis();\n\n DatabaseReference reference = firebaseDatabase.getReference(Constants.FIREBASE_LOCATION_USER_TRANSACTIONS + \"/\"\n + PreferenceManager.getDefaultSharedPreferences(context).getString(Constants.KEY_PREF_EMAIL_PARSED, null) + \"/\"\n + \"0\" + \"/\"\n + Constants.EXPENSE_TRANSACTION_TYPE + \"/\"\n + categoryId + \"/\");\n\n fetchDataQuery = reference.orderByKey().startAt(Long.toString(startOfYearInMs)).endAt(Long.toString(endOfYearInMs));\n if (fetchDataQuery != null){\n fetchDataQuery.keepSynced(true);\n }\n\n\n fetchDataQuery.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n // for every month TIMESTAMP\n for (DataSnapshot timestamp : dataSnapshot.getChildren()){\n Float sumOfChildes = 0f;\n\n // for every TRANSACTION in this TIMESTAMP\n for (DataSnapshot transaction : timestamp.getChildren() ){\n // add the transactions VALUE to the sum\n sumOfChildes = sumOfChildes + (float) transaction.getValue(Transaction.class).getTrAmount();\n }\n\n Log.d(\"ANALYZE\", \"onDataChange -> timestamp.getKey : \" + timestamp.getKey() + \"\\t sumOfChildes : \" + sumOfChildes + \"\\t calendar.getTimeInMillis : \" + calendar.getTimeInMillis());\n\n // set calendars time to be == TIMESTAMPs key (e.g. beginning of the month)\n calendar.setTimeInMillis(Long.valueOf(timestamp.getKey()));\n // put the sum of transactions amounts in the HashMap with KEY = MONTH of the year\n monthsValuesMap.put( calendar.get(Calendar.MONTH), sumOfChildes);\n monthBeginMap.put(calendar.get(Calendar.MONTH), calendar.getTimeInMillis());\n\n Log.d(\"ANALYZE\", \"onDataChange -> monthsValuesMap.size \" + monthsValuesMap.size() + \"\\t monthBeginMap.size : \" + monthBeginMap.size());\n }\n\n // pass all months data to setupBarChart()\n setupBarChart(monthsValuesMap, false);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }",
"@Override\r\n protected void calculateValues(DataContext ctx)\r\n {\r\n\t//Common MTF Inputs\r\n\tint mtfPeriod = getSettings().getInteger(MTF_MULTIPLIER);\r\n Object mtfInput = getSettings().getInput(SMI_INPUT, Enums.BarInput.CLOSE);\r\n \r\n int mtfSmooth = getSettings().getInteger(SMI_SMOOTH);\r\n int mtfSignal = getSettings().getInteger(SMI_SIGNAL);\r\n int mtfHLinc = getSettings().getInteger(SMI_HL_MTF_INC);\r\n int mtfMAinc = getSettings().getInteger(SMI_MA_MTF_INC);\r\n \r\n\tint mtfHL = getSettings().getInteger(SMI_HL1_MTF);\r\n\tint mtfMA = getSettings().getInteger(SMI_MA1_MTF);\r\n \r\n /* MTF Bar sizing */\r\n BarSize barSize = ctx.getChartBarSize(); //Gets the barsize off the chart\r\n int mtfbarint = barSize.getInterval(); //Gets the interval of the chart\r\n int barSizeint = mtfbarint * mtfPeriod; //Multiply the interval by the mtf multiplier\r\n \r\n //Calculates a longer period interval based upon the mtfPeriod\r\n BarSize barSizeNew = barSize.getBarSize(barSize.getType(), barSizeint); \r\n //Assembes the longer period timeframe series\r\n DataSeries series2 = ctx.getDataSeries(barSizeNew);\r\n\r\n String valStringOut; //variables for the return results\r\n String valStringD;\r\n String valStringHL;\r\n String valStringD_MA;\r\n String valStringHL_MA;\r\n int hlPeriodmtf;\r\n int maPeriodmtf;\r\n \r\n StudyHeader header = getHeader();\r\n boolean updates = getSettings().isBarUpdates() || (header != null && header.requiresBarUpdates());\r\n\r\n // Calculates Moving Average for the Secondary Data Series\r\n for(int i = 1; i < series2.size(); i++) {\r\n if (series2.isComplete(i)) continue;\r\n if (!updates && !series2.isBarComplete(i)) continue;\r\n //Double sma = series2.ma(MAMethod.SMA, i, mtfPeriod, mtfInput);\r\n \r\n //insert smi logic\r\n for(int j = 1; j <= 4; j++) {\r\n \t \r\n switch (j) {\r\n case 1:\r\n \t valStringOut \t = \"Values.MTF1\"; //D1, HL1, D_MA1, HL_MA1 mtfHLinc\r\n \t valStringD \t = \"Values.D1\";\r\n \t valStringHL \t = \"Values.HL1\";\r\n \t valStringD_MA\t = \"Values.D_MA1\";\r\n \t valStringHL_MA = \"Values.HL_MA1\";\r\n \t hlPeriodmtf = mtfHL; //Base HL\r\n \t maPeriodMA = mtfMA; //Base MA\r\n \t break;\r\n case 2:\r\n \t valStringOut = \"Values.MTF2\";\r\n \t valStringD \t = \"Values.D2\";\r\n \t valStringHL \t = \"Values.HL2\";\r\n \t valStringD_MA\t = \"Values.D_MA2\";\r\n \t valStringHL_MA = \"Values.HL_MA2\";\r\n \t hlPeriodmtf = mtfHL + mtfHLinc; //Base HL + Increment\r\n \t maPeriodMA = mtfMA + mtfMAinc; //Base MA + Increment \t \r\n \t break;\r\n case 3:\r\n \t valStringOut = \"Values.MTF3\";\r\n \t valStringD \t = \"Values.D3\";\r\n \t valStringHL \t = \"Values.HL3\";\r\n \t valStringD_MA\t = \"Values.D_MA3\";\r\n \t valStringHL_MA = \"Values.HL_MA3\";\r\n \t hlPeriodmtf = mtfHL + (mtfHLinc*2); //Base HL + Increment*2\r\n \t maPeriodMA = mtfMA + (mtfMAinc*2); //Base MA + Increment*2 \t \r\n \t break;\r\n case 4:\r\n \t valStringOut = \"Values.MTF4\";\r\n \t valStringD \t = \"Values.D4\";\r\n \t valStringHL \t = \"Values.HL4\";\r\n \t valStringD_MA\t = \"Values.D_MA4\";\r\n \t valStringHL_MA = \"Values.HL_MA4\";\r\n \t hlPeriodmtf = mtfHL + (mtfHLinc*3); //Base HL + Increment\r\n \t maPeriodMA = mtfMA + (mtfMAinc*3); //Base MA + Increment\r\n \t break;\r\n default:\r\n \t break;\t \r\n } //end switch\r\n \r\n //base HL period is mtfHL\r\n if (i < mtfHL) return;\r\n\r\n double HH = series2.highest(i, hlPeriodmtf, Enums.BarInput.HIGH);\r\n double LL = series2.lowest(i, hlPeriodmtf, Enums.BarInput.LOW);\r\n double M = (HH + LL)/2.0;\r\n double D = series2.getClose(i) - M;\r\n \r\n series.setDouble(i, valStringD, D);\r\n series.setDouble(i, valStringHL, HH - LL);\r\n \r\n int maPeriod = getSettings().getInteger(MA_PERIOD);\r\n if (index < hlPeriod + maPeriod) return;\r\n \r\n Enums.MAMethod method = getSettings().getMAMethod(Inputs.METHOD);\r\n series.setDouble(index, Values.D_MA, series.ma(method, index, maPeriod, Values.D));\r\n series.setDouble(index, Values.HL_MA, series.ma(method, index, maPeriod, Values.HL));\r\n \r\n int smoothPeriod= getSettings().getInteger(SMOOTH_PERIOD);\r\n if (index < hlPeriod + maPeriod + smoothPeriod) return;\r\n \r\n Double D_SMOOTH = series.ma(method, index, smoothPeriod, Values.D_MA);\r\n Double HL_SMOOTH = series.ma(method, index, smoothPeriod, Values.HL_MA);\r\n \r\n if (D_SMOOTH == null || HL_SMOOTH == null) return;\r\n double HL2 = HL_SMOOTH/2;\r\n double SMI = 0;\r\n if (HL2 != 0) SMI = 100 * (D_SMOOTH/HL2);\r\n\r\n series.setDouble(index, Values.SMI, SMI);\r\n\r\n int signalPeriod= getSettings().getInteger(Inputs.SIGNAL_PERIOD);\r\n if (index < hlPeriod + maPeriod + smoothPeriod + signalPeriod) return;\r\n\r\n Double signal = series.ma(method, index, signalPeriod, Values.SMI);\r\n if (signal == null) return;\r\n series.setDouble(index, Values.SMI_SIGNAL, signal);\r\n\r\n \r\n \r\n } //end j bracket\r\n \r\n \r\n \r\n \r\n \r\n series2.setDouble(i, Values.MTF, sma);\r\n }\r\n\r\n // Invoke the parent method to run the \"calculate\" method below for the primary (chart) data series\r\n super.calculateValues(ctx);\r\n }",
"public void testApply() {\n \t\tCalendar dateTime = new GregorianCalendar();\n \t\tdateTime.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);\t\t// Monday\n \t\tSystem.out.println(dateTime.toString());\n\t\tForecastData data = new ForecastData(dateTime, 35.0, 0.0, 0.0, 0.0, 0.0, 0.0, 37.0, 0.0, 0.0);\n \t\t\n \t\tFilter shouldPass = new Filter(\"pass\");\n \t\tFilter shouldFail = new Filter(\"fail\");\n \t\tFilter emptyFilter = new Filter(\"empty\");\n \t\tFilter multipleDays = new Filter(\"multipleDays\");\n \t\tFilter wrongDay = new Filter(\"wrongDay\");\n \t\tFilter noConditions = new Filter(\"noConditions\");\n \t\tFilter noTimes = new Filter(\"noTimes\");\n \t\t\n \t\tConditionRule cR = new ConditionRule(ConditionRule.conditions[0], 30, 45);\t\t// Temperature 30 -> 45\n \t\tTimeRule tR = new TimeRule(TimeRule.days[0]);\t\t\t// Monday\n \t\tTimeRule tR2 = new TimeRule(TimeRule.days[1]);\t\t\t// Tuesday\n \t\tConditionRule cR2 = new ConditionRule(ConditionRule.conditions[4], 35, 45);\t\t// Cloud Cover 35 -> 45\n \t\tConditionRule bad = new ConditionRule(ConditionRule.conditions[0], 0, 5);\t\t// Temperature 0 -> 5\n \t\t\n \t\tshouldPass.addRule(cR);\n \t\tshouldPass.addRule(cR2);\n \t\tshouldPass.addRule(tR);\n \t\t\n \t\tshouldFail.addRule(cR2);\n \t\tshouldFail.addRule(bad);\n \t\tshouldFail.addRule(tR2);\n \t\t\n \t\tmultipleDays.addRule(cR);\n \t\tmultipleDays.addRule(tR);\n \t\tmultipleDays.addRule(tR2);\n \t\t\n \t\twrongDay.addRule(cR);\n \t\twrongDay.addRule(cR2);\n \t\twrongDay.addRule(tR2);\n \t\t\n \t\tnoConditions.addRule(tR);\n \t\tnoConditions.addRule(tR2);\n \t\t\n \t\tnoTimes.addRule(cR);\n \t\tnoTimes.addRule(cR2);\n \t\t\n \t\tassertTrue(shouldPass.apply(data));\n \t\tassertFalse(emptyFilter.apply(data));\n \t\tassertFalse(shouldFail.apply(data));\n \t\tassertTrue(multipleDays.apply(data));\n \t\tassertFalse(wrongDay.apply(data));\n \t\tassertFalse(noConditions.apply(data));\n \t\tassertFalse(noTimes.apply(data));\t\n \t}",
"public void notifyShutdown(ShutdownEvent event) {\n\t\tXYLineChart chart = new XYLineChart(\"Average travel times per iteration\",\r\n\t\t\t\t\"Iterations\", \"ttimes\");\r\n\t\tchart.addMatsimLogo();\r\n\t\t//create the arrays needed for chart creation\r\n\t\tdouble[] iters = new double[this.timePerIterationMap.size()];\r\n\t\tdouble[] times = new double[this.timePerIterationMap.size()];\r\n\t\tint decrement = 1;\r\n\t\tif (this.timePerIterationMap.containsKey(Integer.valueOf(0))) {\r\n\t\t\tdecrement = 0;\r\n\t\t}\r\n\t\t//unfortunately we have to do this as...\r\n\t\tfor (Integer k : this.timePerIterationMap.keySet()) {\r\n\t\t\titers[k - decrement] = k;\r\n\t\t\ttimes[k - decrement] = this.timePerIterationMap.get(k);\r\n\t\t}\r\n\t\t//write to file doing this not in the loop above is cause we\r\n\t\t//would like to have a sorted output.\r\n\t\tStringBuilder buffer = new StringBuilder();\r\n\t\tfor (int i = 0; i < iters.length; i++) {\r\n\t\t\tbuffer.append(iters[i]);\r\n\t\t\tbuffer.append(\"\\t\");\r\n\t\t\tbuffer.append(times[i]);\r\n\t\t\tbuffer.append(\"\\n\");\r\n\t\t}\r\n\t\t//write the chart\r\n\t\tchart.addSeries(\"tt\", iters, times);\r\n\t\tchart.saveAsPng(\"./output/travelTimes.png\", 800, 600);\r\n\t\ttry {\r\n\t\t\tBufferedWriter writer = IOUtils.getBufferedWriter(\"./output/travelTimes.txt\");\r\n\t\t\twriter.write(buffer.toString());\r\n\t\t\twriter.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private void calculateOverall()\n {\n ArrayList<Integer> average = new ArrayList<Integer>(1);\n ArrayList<Integer> median = new ArrayList<Integer>(1);\n ArrayList<Integer> mode = new ArrayList<Integer>();\n ArrayList<Integer> stdDev = new ArrayList<Integer>(1);\n \n int avg = 0;\n int med = 90;\n int mod = 90;\n int dev = 0;\n \n int[] modeArray = new int[100];\n \n for (int i = 0; i < 100; i++) {\n \tmodeArray[i] = 0;\n }\n \n for (Integer score : allScores) {\n \tavg += score;\n \tmodeArray[score]++;\n }\n \n for (int i = 0; i < 100; i++) {\n \tif (modeArray[i] > mod) {\n \t\tmod = modeArray[i];\n \t}\n }\n \n avg = avg / allScores.size();\n \n Collections.sort(allScores);\n med = allScores.get(allScores.size() / 2);\n \n for (Integer score : allScores) {\n \tdev += Math.pow(score - avg, 2);\n }\n dev = (int)Math.floor(Math.sqrt(dev / allScores.size()));\n\n // TODO: Perform the actual calculations here\n average.add(avg);\n median.add(med);\n mode.add(mod);\n stdDev.add(dev);\n\n this.overallAnalytics.put(\"Average\", average);\n this.overallAnalytics.put(\"Median\", median);\n this.overallAnalytics.put(\"Mode\", mode);\n this.overallAnalytics.put(\"Standard Deviation\", stdDev);\n }",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n Log.i(\"*********\", \"Here the adapter be created and set\");\n //CalendarAdapter adapter = new CalendarAdapter(getApplicationContext(), drawMonth2(), workingDays, holidays, requestedHolidays, generalCalendar);\n //calendarGrid.setAdapter(adapter);\n drawMonth(workingDays, holidays, requestedHolidays, generalCalendar);//problably will need to add to workingDays the dates read from the database\n\n }",
"private void setupButtonListeners() {\r\n final SharedPreferences sharedPref = getSharedPreferences(getString(R.string.pref_file_key),\r\n Context.MODE_PRIVATE);\r\n final String accessToken = sharedPref.getString(getString(R.string.access_token_key), null);\r\n\r\n final BarChart chart = findViewById(R.id.chart);\r\n\r\n final Button btnNext = findViewById(R.id.btn_next);\r\n btnNext.setVisibility(View.GONE); // current week is displayed on create, so no next week\r\n btnNext.setOnClickListener(new View.OnClickListener() {\r\n\r\n public void onClick(View v) {\r\n // Clear old data\r\n chart.invalidate();\r\n chart.clear();\r\n\r\n offsetFromToday--;\r\n\r\n // Calculate new endDate used to keep track of which day or week is displayed\r\n // and update the date heading\r\n if(dataType.equals(\"NON-SED\")) {\r\n endDate.add(Calendar.DATE, 1);\r\n updateDateHeading(null);\r\n } else {\r\n Calendar startDate = endDate;\r\n startDate.add(Calendar.DATE, 1);\r\n endDate = calcEndDateFromStart(startDate);\r\n updateDateHeading(startDate);\r\n }\r\n\r\n // Request new data\r\n getActivityData(accessToken, false);\r\n }\r\n });\r\n\r\n final Button btnPrev = findViewById(R.id.btn_prev);\r\n btnPrev.setOnClickListener(new View.OnClickListener() {\r\n\r\n public void onClick(View v) {\r\n // Clear old data\r\n chart.invalidate();\r\n chart.clear();\r\n\r\n offsetFromToday++;\r\n\r\n // Calculate new endDate used to keep track of which day or week is displayed\r\n // and update the date heading\r\n if(dataType.equals(\"NON-SED\")) {\r\n endDate.add(Calendar.DATE, -1);\r\n updateDateHeading(null);\r\n } else {\r\n endDate = calcPrevEndDate(endDate);\r\n Calendar startDate = getFirstMondayInWeek(endDate);\r\n updateDateHeading(startDate);\r\n }\r\n\r\n // Request new data\r\n getActivityData(accessToken, false);\r\n }\r\n });\r\n }",
"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 }",
"protected void runEachDay() {\n \n }",
"public void setCalDay() {\n\t\tfloat goal_bmr;\n\t\tif(gender==\"male\") {\n\t\t\tgoal_bmr= (float) (10 * (weight+loseGainPerWeek) + 6.25 * height - 5 * age + 5);\n\t\t}\n\t\telse {\n\t\t\tgoal_bmr=(float) (10 * (weight+loseGainPerWeek) + 6.25 * height - 5 * age - 161);\n\t\t}\n\t\tswitch (gymFrequency) {\n\t\tcase 0:calDay = goal_bmr*1.2;\n\t\t\t\tbreak;\n\t\tcase 1:\n\t\tcase 2:\n\t\tcase 3:calDay = goal_bmr*1.375;\n\t\t\t\tbreak;\n\t\tcase 4:\n\t\tcase 5:calDay = goal_bmr*1.55;\n\t\t\n\t\t\t\tbreak;\n\t\tcase 6:\n\t\tcase 7:calDay = goal_bmr*1.725;\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public SummaryDailyVisitation() {\n departmentName = \"\";\n totalNonNightVisits = 0;\n totalNightVisits = 0;\n numVisits = 0;\n }",
"private void setDayCountDown() {\n dayCountDown = getMaxHunger();\n }",
"private RepeatWeekdays() {}",
"private void nextWeek() {\r\n tmp.setDay(tmp.getDay() + daysInWeek);\r\n upDMYcountDMYcount();\r\n }",
"public void updateChart(){\n for(Pair<Number,Number> p : sss.getPopulationQueue()){\n this.population.getData().add(new XYChart.Data<>(p.getKey(),p.getValue()));\n }\n for(Pair<Number,Number> p : sss.getDeathsQueue()){\n this.deaths.getData().add(new XYChart.Data<>(p.getKey(),p.getValue()));\n }\n for(Pair<Number,Number> p : sss.getInfectionsQueue()){\n this.infections.getData().add(new XYChart.Data<>(p.getKey(),p.getValue()));\n }\n for(Pair<Number,Number> p : sss.getHealsQueue()){\n this.heals.getData().add(new XYChart.Data<>(p.getKey(),p.getValue()));\n }\n sss.clearPopulationQueue();\n sss.clearDeathsQueue();\n sss.clearInfectionsQueue();\n sss.clearHealsQueue();\n }",
"public void recomendarTempos() {\n ArrayList iTXCH = new ArrayList(); /// Instancias pre fusion\n ArrayList iTYCH = new ArrayList();\n ArrayList iTZCH = new ArrayList();\n\n ArrayList cenTXCH = new ArrayList(); /// Centroides Tempos tempos ch\n ArrayList cenTYCH = new ArrayList();\n ArrayList cenTZCH = new ArrayList();\n\n ArrayList cenTXDB = new ArrayList(); /// centroide tempos db\n ArrayList cenTYDB = new ArrayList();\n ArrayList cenTZDB = new ArrayList();\n\n ArrayList insTXCH = new ArrayList(); /// Instancias fusion\n ArrayList insTYCH = new ArrayList();\n ArrayList insTZCH = new ArrayList();\n\n ArrayList ppTXCH = new ArrayList(); /// centroide promedio ponderado tempos\n ArrayList ppTYCH = new ArrayList();\n ArrayList ppTZCH = new ArrayList();\n\n ArrayList ppTXDB = new ArrayList(); /// centroide promedio ponderado duracion\n ArrayList ppTYDB = new ArrayList();\n ArrayList ppTZDB = new ArrayList();\n\n ArrayList paTXCH = new ArrayList(); /// centroide promedio aritmetico tempos ch\n ArrayList paTYCH = new ArrayList();\n ArrayList paTZCH = new ArrayList();\n\n ArrayList paTXDB = new ArrayList(); /// centroide promedio artimetico tempos db\n ArrayList paTYDB = new ArrayList();\n ArrayList paTZDB = new ArrayList();\n\n////////////////// TEMPO EN X ////////////////////////////// \n ////////// calinsky - harabaz /////////\n if (txchs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTXCH = CExtraer.arrayTempoXCprueba;\n iTXCH = CExtraer.arrayTempoXIprueba;\n res = Double.parseDouble((String) iTXCH.get(0));\n for (int i = 0; i < iTXCH.size(); i++) {\n if (Double.parseDouble((String) iTXCH.get(i)) > res) {\n System.out.println(iTXCH.get(i));\n res = Double.parseDouble((String) iTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXCH.setText(cenTXCH.get(iposision).toString());\n }\n\n if (txchs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionar.arregloInstanciasTX1;\n ppTXCH = CFusionar.arregloPPTX1;\n\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n System.out.println(insTXCH.get(i));\n\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n\n System.out.println(iposision);\n\n }\n }\n valorTXCH.setText(ppTXCH.get(iposision).toString());\n }\n\n if (txchs == \"Fusion PA\") {\n\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionar.arregloInstanciasTX1;\n paTXCH = CFusionar.arregloPATX1;\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n }\n }\n valorTXCH.setText(paTXCH.get(iposision).toString());\n\n }\n\n //////////// davies bouldin //////////////\n if (txdbs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTXDB = CExtraer.arrayTempoXCprueba;\n iTXCH = CExtraer.arrayTempoXIprueba;\n res = Double.parseDouble((String) iTXCH.get(0));\n for (int i = 0; i < iTXCH.size(); i++) {\n if (Double.parseDouble((String) iTXCH.get(i)) > res) {\n System.out.println(iTXCH.get(i));\n res = Double.parseDouble((String) iTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXDB.setText(cenTXDB.get(iposision).toString());\n }\n\n if (txdbs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionar.arregloInstanciasTX1;\n ppTXDB = CFusionar.arregloPPTX1;\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n System.out.println(insTXCH.get(i));\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXDB.setText(ppTXDB.get(iposision).toString());\n }\n if (txdbs == \"Fusion PA\") {\n\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionar.arregloInstanciasTX1;\n paTXDB = CFusionar.arregloPATX1;\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n }\n }\n valorTXDB.setText(paTXDB.get(iposision).toString());\n\n }\n\n ///////////// TEMPO EN Y //////////// \n //////////// calinsky - harabaz /////////////\n if (tychs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTYCH = CExtraer.arrayTempoYCprueba;\n iTYCH = CExtraer.arrayTempoYIprueba;\n res = Double.parseDouble((String) iTYCH.get(0));\n for (int i = 0; i < iTYCH.size(); i++) {\n if (Double.parseDouble((String) iTYCH.get(i)) > res) {\n System.out.println(iTYCH.get(i));\n res = Double.parseDouble((String) iTYCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTYCH.setText(cenTYCH.get(iposision).toString());\n }\n\n if (tychs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionar.arregloInstanciasTY1;\n ppTYCH = CFusionar.arregloPPTY1;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYCH.setText(ppTYCH.get(iposision).toString());\n\n }\n\n if (tychs == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionar.arregloInstanciasTY1;\n paTYCH = CFusionar.arregloPATY1;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYCH.setText(paTYCH.get(iposision).toString());\n }\n /////////// davies - bouldin /////////////\n if (tydbs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTYDB = CExtraer.arrayTempoYCprueba;\n iTYCH = CExtraer.arrayTempoYIprueba;\n res = Double.parseDouble((String) iTYCH.get(0));\n for (int i = 0; i < iTYCH.size(); i++) {\n if (Double.parseDouble((String) iTYCH.get(i)) > res) {\n System.out.println(iTYCH.get(i));\n res = Double.parseDouble((String) iTYCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTYDB.setText(cenTYDB.get(iposision).toString());\n }\n\n if (tydbs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionar.arregloInstanciasTY1;\n ppTYDB = CFusionar.arregloPPTY1;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYDB.setText(ppTYDB.get(iposision).toString());\n }\n if (tydbs == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionar.arregloInstanciasTY1;\n paTYDB = CFusionar.arregloPATY1;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYDB.setText(paTYDB.get(iposision).toString());\n }\n\n ///////////// TEMPO EN Z //////////// \n ///////////// calinsky harabaz ///////////////////\n if (tzchs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTZCH = CExtraer.arrayTempoZCprueba;\n iTZCH = CExtraer.arrayTempoZIprueba;\n res = Double.parseDouble((String) iTZCH.get(0));\n for (int i = 0; i < iTZCH.size(); i++) {\n if (Double.parseDouble((String) iTZCH.get(i)) > res) {\n System.out.println(iTZCH.get(i));\n res = Double.parseDouble((String) iTZCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTZCH.setText(cenTZCH.get(iposision).toString());\n }\n\n if (tzchs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionar.arregloInstanciasTZ1;\n ppTZCH = CFusionar.arregloPPTZ1;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZCH.setText(ppTZCH.get(iposision).toString());\n }\n if (tzchs == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionar.arregloInstanciasTZ1;\n paTZCH = CFusionar.arregloPATZ1;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZCH.setText(paTZCH.get(iposision).toString());\n }\n\n ///////////// davies bouldin /////////////////// \n if (tzdbs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTZDB = CExtraer.arrayTempoZCprueba;\n iTZCH = CExtraer.arrayTempoZIprueba;\n res = Double.parseDouble((String) iTZCH.get(0));\n for (int i = 0; i < iTZCH.size(); i++) {\n if (Double.parseDouble((String) iTZCH.get(i)) > res) {\n System.out.println(iTZCH.get(i));\n res = Double.parseDouble((String) iTZCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTZDB.setText(cenTZDB.get(iposision).toString());\n }\n\n if (tzdbs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionar.arregloInstanciasTZ1;\n ppTZDB = CFusionar.arregloPPTZ1;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZDB.setText(ppTZDB.get(iposision).toString());\n }\n //////////\n if (tzdbs == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionar.arregloInstanciasTZ1;\n paTZDB = CFusionar.arregloPATZ1;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZDB.setText(paTZDB.get(iposision).toString());\n }\n\n }",
"public boolean getRunOnWeekends();",
"public Breakdown generateDiurnalReport(Date startDate, String[] demoArr) {\n\n Breakdown result = new Breakdown();\n AppUsageDAO auDAO = new AppUsageDAO();\n Date startHour = startDate;\n SimpleDateFormat sdf = new SimpleDateFormat(\"HH:00\");\n //for each hour (for 24 loop)\n for (int i = 0; i < 24; i++) {\n\n HashMap<String, Breakdown> miniMap = new HashMap<String, Breakdown>();\n result.addInList(miniMap);\n\n Date endHour = new Date(startHour.getTime() + 1000 * 60 * 60);\n miniMap.put(\"period\", new Breakdown(sdf.format(startHour) + \"-\" + sdf.format(endHour)));\n\n //get number of targetted users\n Date endDate = new Date(startDate.getTime() + 1000 * 60 * 60 * 24);\n ArrayList<User> targetList = auDAO.retrieveUserByDemo(startDate, endDate, demoArr);\n int targetCount = targetList.size();\n //get userList for this hour, filtered by demo\n ArrayList<User> userList = auDAO.retrieveUserByDemo(startHour, endHour, demoArr);\n double secondsThisHour = 0;\n\n //for each user\n for (User user : userList) {\n\n //retrieve appUsageList\n ArrayList<AppUsage> auList = auDAO.retrieveByUserHourly(user.getMacAddress(), startHour, endHour);\n\n Date oldTime = null;\n if (auList.size() > 0) {\n oldTime = auList.get(0).getDate();\n }\n\n //For each appusage in appUsageList\n for (int j = 1; j < auList.size(); j++) {\n Date newTime = auList.get(j).getDate();\n\n //calculate usageTime and add to secondsThisHour\n //difference between app usage timing\n long difference = Utility.secondsBetweenDates(oldTime, newTime);\n\n //If difference less than/equal 2 minutes\n if (difference <= 2 * 60) {\n // add difference to totalSeconds if <= 2 mins\n secondsThisHour += difference;\n } else {\n // add 10sec to totalSeconds if > 2 mins\n secondsThisHour += 10;\n }\n\n oldTime = newTime;\n\n }\n //Add 10 seconds for the last appusage in the list\n if (auList.size() > 0) {\n Date lastTime = auList.get(auList.size() - 1).getDate();\n\n long difference = Utility.secondsBetweenDates(lastTime, endHour);\n\n if (difference > 10) {\n difference = 10;\n }\n secondsThisHour += difference;\n\n }\n\n }\n //divide by all users in this hour to get average usage time in this hour\n if (targetCount > 0) {\n secondsThisHour /= targetCount;\n\n }\n\n //store in breakdown\n long time = Math.round(secondsThisHour);\n miniMap.put(\"duration\", new Breakdown(\"\" + time));\n\n startHour = endHour;\n }\n\n return result;\n }",
"public List<Pair<Integer>> getTrend(String collectionId, String analysisId, String query, String beginDate, String endDate,\r\n String interval) {\r\n List<Pair<Integer>> toReturn = new ArrayList<Pair<Integer>>();\r\n if (null == collectionId || null == analysisId || null == query || null == beginDate || null == endDate\r\n || 0 == collectionId.length() || 0 == analysisId.length() || 0 == beginDate.length() || 0 == endDate.length()) {\r\n setError(\"APIL_0100\", \"argument's not valid.\");\r\n return toReturn;\r\n }\r\n\r\n if (!IntervalType.DAY.equals(interval) && !IntervalType.MONTH.equals(interval) && !IntervalType.YEAR.equals(interval)) {\r\n setError(\"APIL_0165\", \"interval type's not valid: \" + interval);\r\n return toReturn;\r\n }\r\n\r\n String[] paramFields = {\"collection_id\", \"analysis_id\", \"query\", \"date_begin\", \"date_end\", \"interval\", \"item_delimiter\",\r\n \"freq_delimiter\"};\r\n SocketMessage request = new SocketMessage(\"retriever\", \"time_series\", SocketMessage.PriorityType.EMERGENCY, SocketMessage.TransferType.BI_WAY, \"\",\r\n paramFields);\r\n request.setValue(\"collection_id\", collectionId);\r\n request.setValue(\"analysis_id\", analysisId);\r\n request.setValue(\"query\", query);\r\n request.setValue(\"date_begin\", beginDate);\r\n request.setValue(\"date_end\", endDate);\r\n request.setValue(\"interval\", interval);\r\n request.setValue(\"item_delimiter\", ITEM_DELIMITER);\r\n request.setValue(\"freq_delimiter\", FREQ_DELIMITER);\r\n\r\n SocketMessage response = handleMessage(request);\r\n if (!isSuccessful(response)) {\r\n if (\"\".equals(response.getErrorCode())) {\r\n setError(\"APIL_0501\", \"getting trend wasn't successful: coll_id=\" + collectionId + \"/analysis_id=\" + analysisId\r\n + \"/query=\" + query);\r\n } else {\r\n wrapError(\"APIL_0501\", \"getting trend wasn't successful: coll_id=\" + collectionId + \"/analysis_id=\" + analysisId\r\n + \"/query=\" + query);\r\n }\r\n } else {\r\n toReturn = Tools.getPairListInt(response.getValue(\"time_series\"), ITEM_DELIMITER, FREQ_DELIMITER);\r\n }\r\n return toReturn;\r\n }",
"@Override\r\n\tpublic Map<String, double[]> getHallAttendance() {\n\t\tMap<String, double[]> result = new HashMap<String, double[]>();\r\n\t\tdouble[] hall1 = new double[7];\r\n\t\tdouble[] hall2 = new double[7];\r\n\t\tdouble[] hall3 = new double[7];\r\n\t\tDate date = DateUtil.getCurrentDate();\r\n\t\tCinemaCondition cinemaCondition = cinemaConditionDao.getByDate(date);\r\n\t\tif (cinemaCondition!=null) {\r\n\t\t\thall1[0] = (double)cinemaCondition.getHall1UsedCount()/cinemaCondition.getHall1()*100;\r\n\t\t\thall2[0] = (double)cinemaCondition.getHall2UsedCount()/cinemaCondition.getHall2()*100;\r\n\t\t\thall3[0] = (double)cinemaCondition.getHall3UsedCount()/cinemaCondition.getHall3()*100;\t\t\r\n\t\t}\r\n\r\n\t\tfor(int i=0;i<6;i++){\r\n\t\t\tdate = DateUtil.getDayBefore(date);\r\n\t\t\tcinemaCondition = cinemaConditionDao.getByDate(date);\r\n\t\t\tif (cinemaCondition!=null) {\r\n\t\t\t\thall1[i+1] = (double)cinemaCondition.getHall1UsedCount()/cinemaCondition.getHall1()*100;\r\n\t\t\t\thall2[i+1] = (double)cinemaCondition.getHall2UsedCount()/cinemaCondition.getHall2()*100;\r\n\t\t\t\thall3[i+1] = (double)cinemaCondition.getHall3UsedCount()/cinemaCondition.getHall3()*100;\r\n\t\t\t}\r\n\t\t}\r\n\t\tresult.put(\"一号影厅\", hall1);\r\n\t\tresult.put(\"二号影厅\", hall2);\r\n\t\tresult.put(\"三号影厅\", hall3);\r\n\t\t\r\n\t\treturn result;\r\n\t}",
"private ListSeries getTodayData() {\n\t\tListSeries dollarEarning = new ListSeries();\n\t\tdouble number = 0;\n\t\tnumber = controler.getTodaysTransactionSummary();\n\t\tdollarEarning.addData(number);\n\t\t\n\t\treturn dollarEarning;\n\t}",
"public static void calcSpecificWeeks(JavaSparkContext context, SparkSession session, String input_batch, String input_assessment, String input_grade, String output) {\n\t\tStructField batch_id = DataTypes.createStructField(\"batch_id\", DataTypes.DoubleType, true);\n StructField borderline_grade_threshold = DataTypes.createStructField(\"borderline_grade_threshold\", DataTypes.DoubleType, true);\n\t\tStructField end_date = DataTypes.createStructField(\"end_date\", DataTypes.StringType, true);\n StructField good_grade_threshold = DataTypes.createStructField(\"good_grade_threshold\", DataTypes.DoubleType, true);\n\t\tStructField location = DataTypes.createStructField(\"location\", DataTypes.StringType, true);\n StructField skill_type = DataTypes.createStructField(\"skill_type\", DataTypes.StringType, true);\n\t\tStructField start_date = DataTypes.createStructField(\"start_date\", DataTypes.StringType, true);\n StructField training_name = DataTypes.createStructField(\"training_name\", DataTypes.StringType, true);\n\t\tStructField training_type = DataTypes.createStructField(\"training_type\", DataTypes.StringType, true);\n StructField number_of_weeks = DataTypes.createStructField(\"number_of_weeks\", DataTypes.DoubleType, true);\n StructField co_trainer_id = DataTypes.createStructField(\"co_trainer_id\", DataTypes.DoubleType, true);\n StructField trainer_id = DataTypes.createStructField(\"trainer_id\", DataTypes.DoubleType, true);\n StructField resource_id = DataTypes.createStructField(\"resource_id\", DataTypes.StringType, true);\n StructField address_id = DataTypes.createStructField(\"address_id\", DataTypes.DoubleType, true);\n StructField graded_weeks = DataTypes.createStructField(\"graded_weeks\", DataTypes.DoubleType, true);\n List<StructField> fields = new ArrayList<StructField>();\n fields.add(batch_id);\n fields.add(borderline_grade_threshold);\n fields.add(end_date);\n fields.add(good_grade_threshold);\n fields.add(location);\n fields.add(skill_type);\n fields.add(start_date);\n fields.add(training_name);\n fields.add(training_type);\n fields.add(number_of_weeks);\n fields.add(co_trainer_id);\n fields.add(trainer_id);\n fields.add(resource_id);\n fields.add(address_id);\n fields.add(graded_weeks);\n StructType schema = DataTypes.createStructType(fields);\t\t\n\t\tDataset<Row> data_batch = session.sqlContext().read().format(\"csv\").option(\"delimiter\", \"~\").option(\"header\", \"false\").schema(schema).load(input_batch);\n\t\tdata_batch.createOrReplaceTempView(\"caliber_batch\");\n\t\t\n\t\tStructField assessment_id = DataTypes.createStructField(\"assessment_id\", DataTypes.DoubleType, true);\n StructField raw_score = DataTypes.createStructField(\"raw_score\", DataTypes.DoubleType, true);\n\t\tStructField assessment_title = DataTypes.createStructField(\"assessment_title\", DataTypes.StringType, true);\n StructField assessment_type = DataTypes.createStructField(\"assessment_type\", DataTypes.StringType, true);\n\t\tStructField week_number = DataTypes.createStructField(\"week_number\", DataTypes.DoubleType, true);\n StructField batch_id2 = DataTypes.createStructField(\"batch_id\", DataTypes.DoubleType, true);\n\t\tStructField assessment_category = DataTypes.createStructField(\"assessment_category\", DataTypes.StringType, true);\n fields = new ArrayList<StructField>();\n fields.add(assessment_id);\n fields.add(raw_score);\n fields.add(assessment_title);\n fields.add(assessment_type);\n fields.add(week_number);\n fields.add(batch_id2);\n fields.add(assessment_category);\n schema = DataTypes.createStructType(fields);\n\t\tDataset<Row> data_assessment = session.sqlContext().read().format(\"csv\").option(\"delimiter\", \"~\").option(\"header\", \"false\").schema(schema).load(input_assessment);\n\t\tdata_assessment.createOrReplaceTempView(\"caliber_assessment\");\n\t\t\n\t\tStructField grade_id = DataTypes.createStructField(\"assessment_id\", DataTypes.DoubleType, true);\n StructField date_received = DataTypes.createStructField(\"raw_score\", DataTypes.StringType, true);\n\t\tStructField score = DataTypes.createStructField(\"assessment_title\", DataTypes.DoubleType, true);\n StructField assessment_id2 = DataTypes.createStructField(\"assessment_type\", DataTypes.StringType, true);\n\t\tStructField trainee_id = DataTypes.createStructField(\"week_number\", DataTypes.DoubleType, true);\n fields = new ArrayList<StructField>();\n fields.add(grade_id);\n fields.add(date_received);\n fields.add(score);\n fields.add(assessment_id2);\n fields.add(trainee_id);\n schema = DataTypes.createStructType(fields);\t\t\n\t\tDataset<Row> data_grade = session.sqlContext().read().format(\"csv\").option(\"delimiter\", \"~\").option(\"header\", \"false\").schema(schema).load(input_grade);\n\t\tdata_grade.createOrReplaceTempView(\"caliber_grade\");\n\t\t\n //Executes SQL query to aggregate data\n\t\t\n\t\tDataset<Row> SpecificWeeksSubmittedTable = session.sqlContext().sql(\n\t\t \"SELECT temp.week_number_exam, temp2.week_number_verbal, caliber_batch.batch_id, caliber_batch.trainer_id FROM caliber_batch JOIN (SELECT caliber_assessment.week_number AS week_number_exam, caliber_assessment.batch_id AS batch_id FROM caliber_assessment JOIN caliber_grade ON caliber_assessment.assessment_id=caliber_grade.assessment_id WHERE caliber_assessment.assessment_type = 'Exam' GROUP BY caliber_assessment.batch_id, caliber_assessment.week_number) AS temp ON caliber_batch.batch_id = temp.batch_id FULL JOIN (SELECT caliber_assessment.week_number AS week_number_verbal, caliber_assessment.batch_id AS batch_id FROM caliber_assessment JOIN caliber_grade ON caliber_assessment.assessment_id=caliber_grade.assessment_id WHERE caliber_assessment.assessment_type = 'Verbal' GROUP BY caliber_assessment.batch_id, caliber_assessment.week_number) AS temp2 ON (caliber_batch.batch_id = temp2.batch_id and week_number_verbal = week_number_exam)\");\n\t\t\n\t\t//Write query results to S3\n\t\t\n\t\tSpecificWeeksSubmittedTable.coalesce(1).write().format(\"csv\").option(\"header\", \"true\").option(\"delimiter\", \"~\").mode(\"Overwrite\").save(output);\n\t}",
"private void generateMarkedDates() {\n this.markedDates = new HashMap<>();\n for (Task t : logic.getAddressBook().getTaskList()) {\n\n if (markedDates.containsKey(t.getStartDate().getDate())) {\n if (t.getPriority().getPriorityLevel() > markedDates.get(t.getStartDate().getDate())) {\n markedDates.put(t.getStartDate().getDate(), t.getPriority().getPriorityLevel());\n }\n } else {\n markedDates.put(t.getStartDate().getDate(), t.getPriority().getPriorityLevel());\n }\n\n if (markedDates.containsKey(t.getEndDate().getDate())) {\n if (t.getPriority().getPriorityLevel() > markedDates.get(t.getEndDate().getDate())) {\n markedDates.put(t.getEndDate().getDate(), t.getPriority().getPriorityLevel());\n }\n } else {\n markedDates.put(t.getEndDate().getDate(), t.getPriority().getPriorityLevel());\n }\n }\n }",
"public boolean hasTrend() {\n\t\treturn getLatestResults() != null;\n\t}",
"public void createOnce(){\n\n //Entry\n entries = new ArrayList<Entry>();\n\n //ArrayList of LineData\n lineDatas = new ArrayList<LineData>();\n\n //LineDataSet :\n dataSets = new ArrayList<LineDataSet>();\n\n\n for (int x=0; x<graphsData.size(); x++){\n\n dataSets.add(new LineDataSet(new ArrayList<Entry>(),\"Data in \" + graphsData.get(x).getMonth()));\n\n for(int i=0; i<graphsData.get(x).getMonthList().size(); i++){\n dataSets.get(x).addEntry(new Entry(i, graphsData.get(x).getMonthList().get(i).getAverage()));\n dataSets.get(x).getEntryForIndex(i).setIcon(ContextCompat.getDrawable(context,R.drawable.screen));\n }\n\n dataSets.get(x).setColor(Color.rgb(0,187,207));\n\n lineDatas.add(new LineData(dataSets.get(x)));\n\n chart.notifyDataSetChanged();\n chart.invalidate();\n\n }\n\n }",
"public void refreshWeek() {\n\t\tthis.showWeek(this.currentMonday);\n\t}",
"@PostConstruct\n public void init() {\n\n areaChartByDate = displayerLocator.lookupDisplayer(\n DisplayerSettingsFactory.newAreaChartSettings()\n .dataset(SALES_OPPS)\n .group(CREATION_DATE).dynamic(80, DAY, true)\n .column(CREATION_DATE, \"Creation date\")\n .column(EXPECTED_AMOUNT, SUM).format(AppConstants.INSTANCE.sales_bydate_area_column1(), \"$ #,###\")\n .title(AppConstants.INSTANCE.sales_bydate_area_title())\n .titleVisible(true)\n .width(700).height(200)\n .margins(10, 100, 80, 100)\n .filterOn(true, true, true)\n .buildSettings());\n\n pieChartYears = displayerLocator.lookupDisplayer(\n DisplayerSettingsFactory.newPieChartSettings()\n .dataset(SALES_OPPS)\n .group(CREATION_DATE).dynamic(YEAR, true)\n .column(CREATION_DATE, \"Year\")\n .column(COUNT, \"#occs\").format(AppConstants.INSTANCE.sales_bydate_pie_years_column1(), \"#,###\")\n .title(AppConstants.INSTANCE.sales_bydate_pie_years_title())\n .titleVisible(true)\n .width(200).height(150)\n .margins(0, 0, 0, 0)\n .filterOn(false, true, false)\n .buildSettings());\n\n pieChartQuarters = displayerLocator.lookupDisplayer(\n DisplayerSettingsFactory.newPieChartSettings()\n .dataset(SALES_OPPS)\n .group(CREATION_DATE).fixed(QUARTER, true)\n .column(CREATION_DATE, \"Creation date\")\n .column(COUNT, \"#occs\").format(AppConstants.INSTANCE.sales_bydate_pie_quarters_column1(), \"#,###\")\n .title(AppConstants.INSTANCE.sales_bydate_pie_quarters_title())\n .titleVisible(true)\n .width(200).height(150)\n .margins(0, 0, 0, 0)\n .filterOn(false, true, false)\n .buildSettings());\n\n barChartDayOfWeek = displayerLocator.lookupDisplayer(\n DisplayerSettingsFactory.newBarChartSettings()\n .subType_Bar()\n .dataset(SALES_OPPS)\n .group(CREATION_DATE).fixed(DAY_OF_WEEK, true).firstDay(SUNDAY)\n .column(CREATION_DATE, \"Creation date\")\n .column(COUNT, \"#occs\").format(AppConstants.INSTANCE.sales_bydate_bar_weekday_column1(), \"#,###\")\n .title(AppConstants.INSTANCE.sales_bydate_bar_weekday_title())\n .titleVisible(true)\n .width(200).height(150)\n .margins(0, 20, 80, 0)\n .filterOn(false, true, true)\n .buildSettings());\n\n\n pieChartByPipeline = displayerLocator.lookupDisplayer(\n DisplayerSettingsFactory.newPieChartSettings()\n .dataset(SALES_OPPS)\n .group(PIPELINE)\n .column(PIPELINE, \"Pipeline\")\n .column(COUNT, \"#opps\").format(AppConstants.INSTANCE.sales_bydate_pie_pipe_column1(), \"#,###\")\n .title(AppConstants.INSTANCE.sales_bydate_pie_pipe_title())\n .titleVisible(true)\n .width(200).height(150)\n .margins(0, 0, 0, 0)\n .filterOn(false, true, true)\n .buildSettings());\n\n tableAll = displayerLocator.lookupDisplayer(\n DisplayerSettingsFactory.newTableSettings()\n .dataset(SALES_OPPS)\n .title(AppConstants.INSTANCE.sales_bydate_title())\n .titleVisible(false)\n .tablePageSize(5)\n .tableWidth(800)\n .tableOrderEnabled(true)\n .tableOrderDefault(AMOUNT, DESCENDING)\n .renderer(DefaultRenderer.UUID)\n .column(COUNTRY, AppConstants.INSTANCE.sales_bydate_table_column1())\n .column(CUSTOMER, AppConstants.INSTANCE.sales_bydate_table_column2())\n .column(PRODUCT, AppConstants.INSTANCE.sales_bydate_table_column3())\n .column(SALES_PERSON, AppConstants.INSTANCE.sales_bydate_table_column4())\n .column(STATUS, AppConstants.INSTANCE.sales_bydate_table_column5())\n .column(AMOUNT).format(AppConstants.INSTANCE.sales_bydate_table_column6(), \"$ #,###\")\n .column(EXPECTED_AMOUNT).format(AppConstants.INSTANCE.sales_bydate_table_column7(), \"$ #,###\")\n .column(CREATION_DATE).format(AppConstants.INSTANCE.sales_bydate_table_column8(), \"MMM dd, yyyy\")\n .column(CLOSING_DATE).format(AppConstants.INSTANCE.sales_bydate_table_column9(), \"MMM dd, yyyy\")\n .filterOn(false, true, true)\n .buildSettings());\n\n // Create the selectors\n\n countrySelector = displayerLocator.lookupDisplayer(\n DisplayerSettingsFactory.newSelectorSettings()\n .dataset(SALES_OPPS)\n .group(COUNTRY)\n .column(COUNTRY, \"Country\")\n .column(COUNT, \"#Opps\").format(\"#Opps\", \"#,###\")\n .column(AMOUNT, SUM).format(AppConstants.INSTANCE.sales_bydate_selector_total(), \"$ #,##0.00\")\n .sort(COUNTRY, ASCENDING)\n .filterOn(false, true, true)\n .buildSettings());\n\n salesmanSelector = displayerLocator.lookupDisplayer(\n DisplayerSettingsFactory.newSelectorSettings()\n .dataset(SALES_OPPS)\n .group(SALES_PERSON)\n .column(SALES_PERSON, \"Employee\")\n .column(COUNT, \"#Opps\").format(\"#Opps\", \"#,###\")\n .column(AMOUNT, SUM).format(AppConstants.INSTANCE.sales_bydate_selector_total(), \"$ #,##0.00\")\n .sort(SALES_PERSON, ASCENDING)\n .filterOn(false, true, true)\n .buildSettings());\n\n customerSelector = displayerLocator.lookupDisplayer(\n DisplayerSettingsFactory.newSelectorSettings()\n .dataset(SALES_OPPS)\n .group(CUSTOMER)\n .column(CUSTOMER, \"Customer\")\n .column(COUNT, \"#Opps\").format(\"#Opps\", \"#,###\")\n .column(AMOUNT, SUM).format(AppConstants.INSTANCE.sales_bydate_selector_total(), \"$ #,##0.00\")\n .sort(CUSTOMER, ASCENDING)\n .filterOn(false, true, true)\n .buildSettings());\n\n // Make the displayers interact among them\n displayerCoordinator.addDisplayer(areaChartByDate);\n displayerCoordinator.addDisplayer(pieChartYears);\n displayerCoordinator.addDisplayer(pieChartQuarters);\n displayerCoordinator.addDisplayer(barChartDayOfWeek);\n displayerCoordinator.addDisplayer(pieChartByPipeline);\n displayerCoordinator.addDisplayer(tableAll);\n displayerCoordinator.addDisplayer(countrySelector);\n displayerCoordinator.addDisplayer(salesmanSelector);\n displayerCoordinator.addDisplayer(customerSelector);\n\n // Init the dashboard from the UI Binder template\n initWidget(uiBinder.createAndBindUi(this));\n\n // Draw the charts\n displayerCoordinator.drawAll();\n }",
"public List<Pair<Integer>> getCustomTrend(String collectionId, String analysisId, String fieldValue, String query,\r\n String beginDate, String endDate, String interval) {\r\n List<Pair<Integer>> toReturn = new ArrayList<Pair<Integer>>();\r\n // query can be length of 0 (in the case of \"DOCUMENT\" as Frequency Type), so it's not included in wrong argument condition\r\n if (null == collectionId || null == analysisId || null == fieldValue || null == query || null == beginDate\r\n || null == endDate || 0 == collectionId.length() || 0 == analysisId.length() || 0 == fieldValue.length()\r\n || 0 == beginDate.length() || 0 == endDate.length()) {\r\n setError(\"APIL_0100\", \"argument's not valid.\");\r\n return toReturn;\r\n }\r\n\r\n if (!IntervalType.DAY.equals(interval) && !IntervalType.MONTH.equals(interval) && !IntervalType.YEAR.equals(interval)) {\r\n setError(\"APIL_0165\", \"interval type's not valid: \" + interval);\r\n return toReturn;\r\n }\r\n\r\n String[] paramFields = {\"collection_id\", \"analysis_id\", \"field_value\", \"query\", \"date_begin\", \"date_end\", \"interval\",\r\n \"item_delimiter\", \"freq_delimiter\"};\r\n SocketMessage request = new SocketMessage(\"retriever\", \"custom_time_series\", SocketMessage.PriorityType.EMERGENCY, SocketMessage.TransferType.BI_WAY,\r\n \"\", paramFields);\r\n request.setValue(\"collection_id\", collectionId);\r\n request.setValue(\"analysis_id\", analysisId);\r\n request.setValue(\"field_value\", fieldValue);\r\n request.setValue(\"query\", query);\r\n request.setValue(\"date_begin\", beginDate);\r\n request.setValue(\"date_end\", endDate);\r\n request.setValue(\"interval\", interval);\r\n request.setValue(\"item_delimiter\", ITEM_DELIMITER);\r\n request.setValue(\"freq_delimiter\", FREQ_DELIMITER);\r\n\r\n SocketMessage response = handleMessage(request);\r\n if (!isSuccessful(response)) {\r\n if (\"\".equals(response.getErrorCode())) {\r\n setError(\"APIL_0491\", \"getting custom trend wasn't successful: coll_id=\" + collectionId + \"/analysis_id=\"\r\n + analysisId + \"/field_value=\" + fieldValue + \"/query=\" + query);\r\n } else {\r\n wrapError(\"APIL_0491\", \"getting custom trend wasn't successful: coll_id=\" + collectionId + \"/analysis_id=\"\r\n + analysisId + \"/field_value=\" + fieldValue + \"/query=\" + query);\r\n }\r\n } else {\r\n toReturn = Tools.getPairListInt(response.getValue(\"time_series\"), ITEM_DELIMITER, FREQ_DELIMITER);\r\n }\r\n\r\n return toReturn;\r\n }",
"private void givenExchangeRatesExistsForEightMonths() {\n }",
"private XYDataset createDataset(int a, List<ExtractedMZ> extracteddata, List<ExtractedMZ> extracteddata2) {\r\n final XYSeriesCollection dataset = new XYSeriesCollection();\r\n \r\n \r\n for (int i = 0; i<extracteddata.size(); i++) {\r\n \r\n final XYSeries series = new XYSeries(extracteddata.get(i).getName());\r\n float max = 0;\r\n \r\n for (int j = 0; j< extracteddata.get(i).retentionTimeList.get(a).size(); j++) {\r\n max = extracteddata.get(i).intensityList.get(a).get(j);\r\n while (j<extracteddata.get(i).retentionTimeList.get(a).size()-1 && Math.abs(extracteddata.get(i).retentionTimeList.get(a).get(j) - extracteddata.get(i).retentionTimeList.get(a).get(j+1)) < 0.01) {\r\n if (extracteddata.get(i).intensityList.get(a).get(j) > max) {\r\n max = extracteddata.get(i).intensityList.get(a).get(j+1);\r\n }\r\n j++;\r\n \r\n }\r\n \r\n series.add(extracteddata.get(i).retentionTimeList.get(a).get(j)/60,max);\r\n }\r\n dataset.addSeries(series);\r\n }\r\n \r\n for (int i = 0; i<extracteddata2.size(); i++) {\r\n \r\n final XYSeries series = new XYSeries(extracteddata2.get(i).getName());\r\n float max = 0;\r\n \r\n for (int j = 0; j< extracteddata2.get(i).retentionTimeList.get(a).size(); j++) {\r\n max = extracteddata2.get(i).intensityList.get(a).get(j);\r\n while (j<extracteddata2.get(i).retentionTimeList.get(a).size()-1 && Math.abs(extracteddata2.get(i).retentionTimeList.get(a).get(j) - extracteddata2.get(i).retentionTimeList.get(a).get(j+1)) < 0.01) {\r\n if (extracteddata2.get(i).intensityList.get(a).get(j) > max) {\r\n max = extracteddata2.get(i).intensityList.get(a).get(j+1);\r\n }\r\n j++;\r\n \r\n }\r\n \r\n series.add(extracteddata2.get(i).retentionTimeList.get(a).get(j)/60,max);\r\n }\r\n dataset.addSeries(series);\r\n }\r\n\r\n \r\n \r\n \r\n \r\n return dataset;\r\n \r\n }",
"@Test\n public void testPrediction1() throws Exception {\n\n final CalUtils.InstantGenerator instantGenerator =\n new LocalTimeMinutes(5);\n \n final double coreDailyVols[][] = new double[][] {\n new double[] {55219 , 262256 , 202661 , 218359 , 178244 , 99610 , 92348 , 124795 , 214370 , 153854 , 204116 , 173501 , 85390 , 156835 , 108070 , 23755 , 118573 , 70117 , 55768 , 52643 , 71485 , 407645 , 442909 , 129109 , 188896 , 79590 , 422121 , 290067 , 227955 , 69257 , 41634 , 446002 , 579188 , 86237 , 1606794 , 83676 , 166393 , 84987 , 875905 , 117013 , 399084 , 116190 , 149507 , 207221 , 60857 , 155612 , 448006 , 198637 , 67695 , 65423 , 180038 , 88774 , 80273 , 86065 , 85231 , 38867 , 29330 , 116353 , 26887 , 34170 , 102518 , 72246 , 21274 , 70752 , 37912 , 49367 , 100472 , 49461 , 41735 , 45795 , 36578 , 311945 , 249039 , 70487 , 121906 , 136424 , 195136 , 166308 , 331734 , 343180 , 419616 , 104613 , 1354058 , 162678 , 141067 , 147039 , 149115 , 271162 , 543989 , 184421 , 340679 , 201939 , 293860 , 171035 , 263964 , 260198 , 428087 , 565126 , 385874 , 547890 , 384416 , 256696 , 0 , 4738359},\n new double[] {1298630 , 678084 , 488607 , 224766 , 434263 , 356933 , 576571 , 219236 , 252805 , 414776 , 166828 , 174665 , 146281 , 110944 , 145234 , 179739 , 253111 , 175685 , 64925 , 216682 , 494507 , 100205 , 67371 , 101019 , 158026 , 316281 , 334067 , 954850 , 115547 , 163051 , 130303 , 107600 , 1407996 , 90357 , 110452 , 451866 , 238004 , 3096215 , 2672803 , 190170 , 111282 , 107135 , 453389 , 60821 , 98292 , 1310864 , 1132267 , 241907 , 89915 , 175676 , 61621 , 521553 , 212388 , 288651 , 193578 , 272161 , 256777 , 236382 , 802159 , 230248 , 387068 , 160647 , 106999 , 391933 , 465080 , 374577 , 340378 , 330708 , 416320 , 200347 , 251986 , 336664 , 311970 , 600559 , 508011 , 922379 , 311581 , 352459 , 508727 , 159316 , 1355635 , 246541 , 389672 , 805957 , 370754 , 382556 , 316971 , 564228 , 437166 , 277733 , 1284505 , 1763095 , 169661 , 280682 , 969102 , 540315 , 451895 , 308036 , 715130 , 642966 , 981563 , 900778 , 0 , 7155528},\n new double[] {679280 , 229518 , 346536 , 347215 , 316025 , 313890 , 235844 , 199995 , 1920617 , 129356 , 172084 , 207860 , 317578 , 10369008 , 480990 , 1403537 , 1021730 , 156125 , 94833 , 366987 , 145687 , 322957 , 328120 , 66657 , 176001 , 271003 , 133121 , 558624 , 264638 , 638663 , 165080 , 129439 , 5126344 , 5438632 , 248806 , 250616 , 112716 , 54523 , 198097 , 67772 , 1414565 , 244509 , 246205 , 151540 , 98584 , 51217 , 94193 , 111763 , 104726 , 45880 , 64242 , 78893 , 60706 , 48117 , 133085 , 101941 , 5103803 , 5084823 , 168230 , 75537 , 815036 , 73409 , 422412 , 437127 , 115802 , 326536 , 54707 , 81759 , 94420 , 208637 , 50361 , 1458556 , 84257 , 129114 , 54632 , 105873 , 57165 , 77578 , 233302 , 195560 , 134194 , 180928 , 140433 , 123154 , 221422 , 339866 , 1343886 , 114699 , 170052 , 150679 , 181731 , 160943 , 192590 , 125556 , 132656 , 154740 , 320932 , 140929 , 117889 , 381656 , 393635 , 306177 , 0 , 21629250},\n new double[] {526909 , 167180 , 199570 , 149154 , 142141 , 320881 , 223750 , 102275 , 258400 , 202197 , 120202 , 93404 , 178631 , 106401 , 346186 , 231729 , 163656 , 1622531 , 125689 , 2656587 , 5336032 , 2385985 , 335692 , 86118 , 130551 , 99047 , 81695 , 98846 , 238413 , 4831684 , 293262 , 124652 , 106642 , 112048 , 14284646 , 111209 , 2204635 , 128940 , 83395 , 134816 , 116320 , 65412 , 165020 , 126511 , 92217 , 111751 , 47320 , 82219 , 19044177 , 70827 , 21676 , 211214 , 103108 , 22771 , 61629 , 4816563 , 63806 , 33989 , 130104 , 146897 , 15046441 , 44977 , 40889 , 54584 , 54591 , 76634 , 238536 , 68583 , 110591 , 75012 , 503760 , 209479 , 217929 , 86397 , 102284 , 81878 , 252785 , 135884 , 129149 , 112760 , 266851 , 110863 , 67866 , 55205 , 150165 , 699438 , 184450 , 270270 , 4270036 , 345303 , 895116 , 217142 , 145398 , 301231 , 10260595 , 136317 , 442910 , 371357 , 189023 , 538928 , 438973 , 926728 , 9137 , 8879481},\n new double[] {1318228 , 1391326 , 574558 , 441739 , 719144 , 522626 , 404351 , 383602 , 490710 , 284952 , 2984474 , 216339 , 10220195 , 247067 , 166223 , 224310 , 10181837 , 126161 , 9764418 , 692337 , 25907353 , 1518741 , 1179929 , 120730 , 10173292 , 290045 , 19824327 , 402527 , 277859 , 3116841 , 7164061 , 332021 , 10560006 , 2334129 , 121753 , 200177 , 246402 , 10106648 , 1137272 , 2084673 , 461849 , 125108 , 465907 , 156972 , 139083 , 127389 , 237263 , 311691 , 156536 , 155322 , 133368 , 329715 , 256088 , 116835 , 5192615 , 823762 , 183836 , 1110239 , 2414836 , 385072 , 599637 , 387285 , 291580 , 2796924 , 12977051 , 338582 , 884415 , 525622 , 322587 , 223348 , 668858 , 143039 , 627590 , 239797 , 232788 , 256503 , 209425 , 375474 , 558106 , 290991 , 1176648 , 286550 , 149539 , 297435 , 602136 , 152733 , 212363 , 178992 , 179644 , 295428 , 933636 , 349405 , 660749 , 226061 , 868852 , 318539 , 469303 , 538061 , 273643 , 444084 , 347730 , 825808 , 12011 , 7792372}};\n\n final SimpleDateFormat dateBuilder = new SimpleDateFormat(\"yyyy-MM-dd\");\n final Calendar moments[] = new Calendar[] { Calendar.getInstance(), \n Calendar.getInstance(), Calendar.getInstance(), \n Calendar.getInstance(), Calendar.getInstance(),\n Calendar.getInstance() };\n\n moments[0].setTime(dateBuilder.parse(\"2011-10-26\"));\n moments[1].setTime(dateBuilder.parse(\"2011-10-27\"));\n moments[2].setTime(dateBuilder.parse(\"2011-10-28\"));\n moments[3].setTime(dateBuilder.parse(\"2011-10-30\"));\n moments[4].setTime(dateBuilder.parse(\"2011-11-01\"));\n moments[5].setTime(dateBuilder.parse(\"2011-11-02\"));\n\n // Nomralize data to sum 100 (i.e., have an expectance of 100/104)\n for(int i=0; i<5; i++) {\n double sum = 0;\n for(int j=0; j<104; j++) sum += coreDailyVols[i][j];\n for(int j=0; j<104; j++) {\n coreDailyVols[i][j] = coreDailyVols[i][j]*100 / sum;\n }\n }\n\n final double[][] synthesizedDailyVols = new double[\n coreDailyVols.length][instantGenerator.maxInstantValue()];\n final Calendar openTime = Calendar.getInstance();\n final int n = 9*60 / 5;\n final int m = n + coreDailyVols[0].length;\n for(int i=0; i<5; i++) {\n for(int j=0; j<n; j++) {\n synthesizedDailyVols[i][j] = Double.NaN;\n }\n for(int j=0; j<coreDailyVols[i].length; j++) {\n synthesizedDailyVols[i][j+n] = coreDailyVols[i][j];\n }\n for(int j=m; j<instantGenerator.maxInstantValue(); j++) {\n synthesizedDailyVols[i][j] = Double.NaN;\n }\n }\n\n\n final Predictor predictor = new PCAPredictorTransposed(\n instantGenerator, 5);\n for(int i=0; i<5; i++) {\n predictor.learnVector(moments[i], synthesizedDailyVols[i]);\n }\n final double prediction[] = predictor.predictVector(moments[5]);\n final double coreExpectedPrediction[] = new double[] {\n0.21383323, -0.08665493, -0.28527934, -0.45293966, -0.35525111, -0.49117788,\n-0.38114565, -0.60141152, -0.09029406, -0.44815719, -0.45152723, -0.58079146,\n-0.29110153, 1.54262599, -0.59900211, -0.48107804, -0.03280398, -0.59369964,\n-0.44886852, -0.43868587, 0.88745208, -0.10900099, -0.26251035, -0.71557572,\n-0.20051598, -0.57674404, 0.53793693, 0.15857465, -0.53212067, -0.13529962,\n-0.49171709, -0.32334222, 2.16101856, 0.46824882, 2.13337330, -0.48802957,\n-0.40084079, 1.62077396, 1.93080019, -0.59114756, -0.09429057, -0.68952951,\n-0.39819841, -0.63019599, -0.78762027, 0.12458423, 0.34847712, -0.52481068,\n0.69730449, -0.74290105, -0.68866588, -0.45964670, -0.69174165, -0.64825389,\n-0.49908622, -0.30049621, 0.35726449, 0.47210113, -0.25058065, -0.72112704,\n0.79345044, -0.73245678, -0.75581875, -0.40885896, -0.08033429, -0.56030291,\n-0.54967743, -0.63571829, -0.58889882, -0.71099478, -0.67055922, -0.03850658,\n-0.40339282, -0.43003588, -0.44813762, -0.14347007, -0.48441216, -0.48851502,\n-0.15427010, -0.39484463, 0.52701151, -0.61335693, 0.89776479, -0.18821502,\n-0.46457371, -0.39850394, -0.26234640, -0.21535441, 0.33669589, -0.48879971,\n0.43892192, 0.52101182, -0.42851659, -0.51364225, 0.85831207, -0.24052028,\n-0.04192086, -0.02287821, 0.01522206, 0.24307671, 0.27369478, 0.11058009,\n-0.95575786, 14.90733910 };\n final double synthesizedExpectedPrediction[] = new double[\n instantGenerator.maxInstantValue()];\n for(int j=0; j<n; j++) {\n synthesizedExpectedPrediction[j] = Double.NaN;\n }\n for(int j=0; j<coreExpectedPrediction.length; j++) {\n synthesizedExpectedPrediction[j+n] = coreExpectedPrediction[j];\n }\n for(int j=m; j<instantGenerator.maxInstantValue(); j++) {\n synthesizedExpectedPrediction[j] = Double.NaN;\n }\n\n assertEquals(prediction.length, synthesizedExpectedPrediction.length);\n\n for(int i=0; i<prediction.length; i++) {\n assertEquals(prediction[i], synthesizedExpectedPrediction[i], \n 0.0001d);\n }\n System.out.println(\"Ok\");\n }",
"public TimeSeriesTally() {\n\tsuper();\n\tfPrevTime = 0.0;\n }",
"private void setUpCalRecyclerView() {\n dates = new ArrayList<>();\n\n\n Query query = calTaskRef.whereEqualTo(\"m_Privacy\", \"Private\");\n\n tasks = new FirestoreRecyclerOptions.Builder<Task>()\n .setQuery(query, Task.class)\n .build();\n\n db.collection(\"Task\").whereEqualTo(\"m_Privacy\", \"Private\")\n .get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull com.google.android.gms.tasks.Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\n if (task.getResult() != null) {\n List<Task> tasks = task.getResult().toObjects(Task.class);\n for (Task dbDate : tasks) {\n //Get date from firebase\n //Set date to CalendarDay\n dates.add(CalendarDay.from(dbDate.getM_DueDate().getTime()));\n calendarView.addDecorator(new DayViewDecorator() {\n @Override\n public boolean shouldDecorate(CalendarDay day) {\n return dates.contains(day);\n }\n @Override\n public void decorate(DayViewFacade view) {\n view.setBackgroundDrawable(ContextCompat.getDrawable(getContext(),R.drawable.logo));\n }\n });\n }\n }\n }else {\n Toast.makeText(getActivity(), \"Error getting documents.\" + task.getException(), Toast.LENGTH_SHORT).show();\n }\n }\n });\n }",
"public void getPaedCommodSTKA(final String mUid,final String mYear, final String mWeekNo){\n mCombComdtySTKC = new CombComdtySTKC() {\n @Override\n protected void onPostExecute(String results) {\n // dialog.dismiss();\n if (!results.equalsIgnoreCase(\"error\")) {\n try {\n JSONObject objAdults = new JSONObject(results);\n if(objAdults.getString(\"status\").equalsIgnoreCase(\"ok\")) {\n Log.e(\"here CombData\", \"\"+results);\n JSONArray mRes = objAdults.getJSONArray(\"results\");\n\n String[] weeks = new String[mRes.length()];\n\n for(int i= 0; i< mRes.length();i++){\n JSONArray array = mRes.getJSONArray(i);\n ClientRisk.add(new BarEntry(i+1, array.getInt(2)));\n StockoutRates.add(new Entry(i+1,(float) array.getDouble(1)));\n ReportingRates.add(new Entry(i+1, (float) array.getDouble(3)));\n weeks[i] = array.getString(0);\n\n }\n Collections.sort(ClientRisk, new EntryXComparator());\n Collections.sort(StockoutRates, new EntryXComparator());\n Collections.sort(ReportingRates, new EntryXComparator());\n mChart.setDrawGridBackground(true);\n mChart.setDrawBarShadow(false);\n mChart.setClickable(false);\n mChart.setHighlightFullBarEnabled(false);\n // draw bars behind lines\n mChart.setDrawOrder(new CombinedChart.DrawOrder[]{\n CombinedChart.DrawOrder.BAR, CombinedChart.DrawOrder.LINE\n });\n\n mChart.setOnTouchListener(new View.OnTouchListener(){\n @Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n return false;\n }\n });\n //Set the Legends Orientation\n Legend l = mChart.getLegend();\n l.setWordWrapEnabled(true);\n l.setVerticalAlignment(Legend.LegendVerticalAlignment.BOTTOM);\n l.setHorizontalAlignment(Legend.LegendHorizontalAlignment.CENTER);\n l.setOrientation(Legend.LegendOrientation.HORIZONTAL);\n\n //Set Right And Left Axis\n YAxis rightAxis = mChart.getAxisRight();\n rightAxis.setDrawGridLines(false);\n rightAxis.setAxisMinimum(0f); // this replaces setStartAtZero(true)\n //rightAxis.setAxisMaximum(80000f);\n\n YAxis leftAxis = mChart.getAxisLeft();\n leftAxis.setDrawGridLines(false);\n leftAxis.setAxisMinimum(0f); // this replaces setStartAtZero(true)\n leftAxis.setAxisMaximum(80f);\n\n //Set X-Axis Lables\n XAxis xAxis = mChart.getXAxis();\n xAxis.setAxisMinimum(0f);\n xAxis.setGranularity(1f);\n xAxis.setValueFormatter(new IndexAxisValueFormatter(weeks));\n xAxis.setLabelRotationAngle(45);\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n xAxis.setGranularityEnabled(true);\n xAxis.setLabelCount(12);\n\n\n\n CombinedData combdata = new CombinedData();\n combdata.setData(generateLineData());\n combdata.setData(generateLineData2());\n combdata.setData(generateBarData());\n xAxis.setAxisMaximum(combdata.getXMax() + 0.25f);\n mChart.setData(combdata);\n mChart.invalidate();\n\n\n\n }else{\n Toast.makeText(getActivity(), \"message failed!\", Toast.LENGTH_SHORT).show();\n if(dialog.isShowing()){\n dialog.dismiss();\n }\n }\n } catch (JSONException localJSONException) {\n Log.e(\"gettingjson\", localJSONException.toString());\n localJSONException.printStackTrace();\n if(dialog.isShowing()){\n dialog.dismiss();\n }\n }\n }\n }\n @Override\n protected void onPreExecute()\n {\n //dialog = ProgressDialog.show(getActivity(), \"\", \"Loading Data...\", true);\n //dialog.setCancelable(true);\n }\n\n };\n mCombComdtySTKC.execute(mUid,mYear,mWeekNo);\n\n }",
"public static double getGraidentBasedOnTradingDays(IGraphLine aLine, TreeSet<AbstractGraphPoint> listOfTradingDays) {\r\n double result = 0;\r\n if (null != aLine && null != listOfTradingDays) {\r\n AbstractGraphPoint myCurrStart = aLine.getCurrentC();\r\n AbstractGraphPoint myCurrEnd = aLine.getCurrentE();\r\n if (myCurrStart.getDateAsNumber() != myCurrEnd.getDateAsNumber()) {\r\n// TreeSet<AbstractGraphPoint> tDay = new TreeSet<AbstractGraphPoint>(AbstractGraphPoint.TimeComparator);\r\n// tDay.addAll(listOfTradingDays);\r\n //Calc P1\r\n //Get Market close time on start day\r\n Calendar endTrading = DTUtil.deepCopyCalendar(myCurrStart.getCalDate());\r\n endTrading.setTimeZone(DTConstants.EXCH_TIME_ZONE);\r\n endTrading.set(Calendar.HOUR_OF_DAY, DTConstants.EXCH_CLOSING_HOUR);\r\n endTrading.set(Calendar.MINUTE, DTConstants.EXCH_CLOSING_MIN);\r\n endTrading.set(Calendar.SECOND, DTConstants.EXCH_CLOSING_SEC);\r\n double p1 = endTrading.getTimeInMillis() - myCurrStart.getCalDate().getTimeInMillis();\r\n //double p1 = endTrading.getTimeInMillis() - (myCurrStart.getCalDate().getTimeInMillis() - DTConstants.MILLSECS_PER_HOUR);\r\n //Now calculate P2\r\n //Get Market open time on end day\r\n Calendar startTrading = DTUtil.deepCopyCalendar(myCurrEnd.getCalDate());\r\n startTrading.setTimeZone(DTConstants.EXCH_TIME_ZONE);\r\n startTrading.set(Calendar.HOUR_OF_DAY, DTConstants.EXCH_OPENING_HOUR);\r\n startTrading.set(Calendar.MINUTE, DTConstants.EXCH_OPENING_MIN);\r\n startTrading.set(Calendar.SECOND, DTConstants.EXCH_OPENING_SEC);\r\n double p2 = (myCurrEnd.getCalDate().getTimeInMillis() - startTrading.getTimeInMillis());\r\n //double p2 = (myCurrEnd.getCalDate().getTimeInMillis() - DTConstants.MILLSECS_PER_HOUR) - startTrading.getTimeInMillis();\r\n //Now calc P3\r\n //Get count of trading days from list\r\n// int currStartDay = myCurrStart.getDateAsNumber();\r\n// int currEndDay = myCurrEnd.getDateAsNumber();\r\n// NavigableSet<AbstractGraphPoint> subSet = new TreeSet<AbstractGraphPoint>();\r\n// for(AbstractGraphPoint currPoint : tDay){\r\n// int currDay = currPoint.getDateAsNumber();\r\n// if(currDay > currStartDay && currDay < currEndDay){\r\n// subSet.add(currPoint);\r\n// }\r\n// }\r\n NavigableSet<AbstractGraphPoint> subSet = listOfTradingDays.subSet(myCurrStart, false, myCurrEnd, false);\r\n ArrayList<AbstractGraphPoint> theSet = new ArrayList<AbstractGraphPoint>();\r\n theSet.addAll(subSet);\r\n for (AbstractGraphPoint currPoint : theSet) {\r\n if (currPoint.getDateAsNumber() == myCurrStart.getDateAsNumber() || currPoint.getDateAsNumber() == myCurrEnd.getDateAsNumber()) {\r\n subSet.remove(currPoint);\r\n }\r\n }\r\n double dayCount = subSet.size();\r\n double p3 = dayCount * DTUtil.msPerTradingDay();\r\n\r\n //Sum all three parts as deltaX\r\n double deltaX = p1 + p2 + p3;\r\n double deltaY = myCurrEnd.getLastPrice() - myCurrStart.getLastPrice();\r\n\r\n //Gradient is deltaY / deltaX\r\n result = deltaY / deltaX;\r\n\r\n System.out.println(\"Delta Y = \" + deltaY);\r\n System.out.println(\"Delta X = \" + deltaX);\r\n System.out.println(aLine.toString());\r\n } else {\r\n result = aLine.getGradient();\r\n System.out.println(aLine.toString());\r\n }\r\n }\r\n return result;\r\n }",
"public void generateWeeklySchedule(){\r\n for (int i = 0; i < numDayWorkWeek; i++)\r\n weeklySchedule.get(i).clear();\r\n\r\n int day = 0;\r\n int workHrs = 0;\r\n\r\n for (Task unfinishedTask: unfinished){\r\n if (day > numDayWorkWeek - 1) break;\r\n\r\n //if there is room for this task --> add it. Else, move to the next day\r\n if (workHrs + unfinishedTask.getHrsLeft() <= dailyWorkload){\r\n weeklySchedule.get(day).add(unfinishedTask);\r\n workHrs += unfinishedTask.getHrsLeft();\r\n }\r\n else{\r\n day++;\r\n weeklySchedule.get(day).add(unfinishedTask);\r\n workHrs = unfinishedTask.getHrsLeft();\r\n }\r\n }\r\n }",
"@FXML\n private void updateDates() {\n WeekFields weekFields = WeekFields.of(Locale.ENGLISH);\n weekNumber = date.get(weekFields.weekOfWeekBasedYear());\n weekNr.setText(\"\" + weekNumber);\n\n /* Update drawn events when changing week */\n drawEventsForWeek();\n \n\t\t/* Set current month/year */\n month_Year.setText(date.getMonth() + \" \" + date.getYear());\n\t\t\n\t\t/* Set date of weekday_labels */\n for (int i = 0; i < weekday_labels.size(); i++) {\n int date_value = date.with(DayOfWeek.MONDAY).plusDays(i).getDayOfMonth();\n weekday_labels.get(i).setText(\"\" + date_value + \".\");\n }\n }",
"public int computeFine(int today);",
"public boolean scheduleAlg1(int currBoolReset, int maxGuidesPerTourInt, int maxToursPerGuideInt, int minGuidesPerTourInt, int minToursPerGuideInt){\n\t\t\r\n\t\tint numberOfWeeks = findNumWeeks();\r\n\t\tfor(int x = 0; x < numberOfWeeks; x++){\r\n\t\t\tfor(int y = 0; y < personList.size(); y++){\r\n\t\t\t\t//System.out.println(\"a\");\r\n\t\t\t\tpersonList.get(y).weeks.add(false);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//System.out.println(\"here it's \" + personList.get(0).weeks.size());\r\n\t\t\r\n\t\tint currentAvailabilityBool; //This is the index in the availability boolean array list that is currently relevant. \r\n\t\tint week = 0;\r\n\t\tboolean innerWhile, outerWhile;\r\n\t\tint currentAvailabilityInt, currentToursGivenInt; \r\n\t\tcurrentHighestTourCount = 0;\r\n\t\tif(currBoolReset >= toursInTheWeek){\r\n\t\t\tcurrBoolReset = 0;\t\t\t\r\n\t\t}\r\n\t\tfor(int i = 0; i < maxGuidesPerTourInt; i++){\r\n\t\t\t//System.out.println(\"guide: \" + i);\r\n\t\t\t//System.out.println(\"Adding guide \" + i);\r\n\t\t\tcurrentAvailabilityBool = currBoolReset; //Have to reset it each time we loop through. \r\n\t\t\t//System.out.println(\"OUTERMOST LOOP IS \" + i);\r\n\t\t\tfor(int j = 0; j < dayList.size(); j++){\r\n\t\t\t\tweek = getWeekFromDay(j);\r\n\t\t\t\t//System.out.println(\"Day: \" + j + \" Week: \" + week);\r\n\t\t\t\tif(!dayList.get(j).holiday){ //If the current day isn't a holiday.\r\n\t\t\t\t\t//Go through all the tours on the current day.\r\n\t\t\t\t\t//System.out.println(dayList.get(j).numberOfTours + \" tours today\");\r\n\t\t\t\t\tfor(int k = 0; k < dayList.get(j).numberOfTours; k++){\r\n\t\t\t\t\t\t//System.out.println(\"Looking at tour \" + k);\r\n\t\t\t\t\t\touterWhile = true;\r\n\t\t\t\t\t\tcurrentToursGivenInt = 0;\r\n\t\t\t\t\t\twhile(outerWhile){\r\n\t\t\t\t\t\t\tinnerWhile = true;\r\n\t\t\t\t\t\t\t//System.out.println(\"OUTER WHILE - Looking at guides who have given \" + currentToursGivenInt + \" tours\");\r\n\t\t\t\t\t\t\tcurrentAvailabilityInt = 0;\r\n\t\t\t\t\t\t\twhile(innerWhile){\r\n\t\t\t\t\t\t\t\t//System.out.println(\"INNER WHILE - Availability of \" + currentAvailabilityInt);\r\n\t\t\t\t\t\t\t\t//numOfAvailableSlots\r\n\t\t\t\t\t\t\t\t//Go through guides and find one with an availability matching the currentAvailabilityInt and a true value \r\n\t\t\t\t\t\t\t\t//at the currentAvailabilityBool. Set lookingForAGuide to true and add that guide to the current tour's list,\r\n\t\t\t\t\t\t\t\t//as long as all the requirements are met. \r\n\t\t\t\t\t\t\t\t//Remember to check if currentHighestTourCount needs to be incremented.\r\n\t\t\t\t\t\t\t\tfor(int m = 0; m < personList.size(); m++){\r\n\t\t\t\t\t\t\t\t\t//System.out.println(\"m is \" + m + \" and currentAvailabilityBool is \" + currentAvailabilityBool);\r\n\t\t\t\t\t\t\t\t\tif(personList.get(m).toursThisMonth == currentToursGivenInt && personList.get(m).numOfAvailableSlots == currentAvailabilityInt && personList.get(m).availabilityBooleans.get(currentAvailabilityBool))\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t//Then we've found a guide that's got the minimum availability and is available at this time.\r\n\t\t\t\t\t\t\t\t\t\t//Check requirements, then add them if they're met. \r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tif(personList.get(m).toursThisMonth < maxToursPerGuideInt){\r\n\t\t\t\t\t\t\t\t\t\t\t//Have to check if they've already given a tour that day. \r\n\t\t\t\t\t\t\t\t\t\t\tif(personList.get(m).checkIfScheduled(j) && personList.get(m).weeks.get(week) == false){ //Make sure they haven't been given a tour on this day before.\r\n\t\t\t\t\t\t\t\t\t\t\t\tpersonList.get(m).toursThisMonth++;\r\n\t\t\t\t\t\t\t\t\t\t\t\tpersonList.get(m).scheduledDays.add(j); //Add this day to the list. \r\n\t\t\t\t\t\t\t\t\t\t\t\tif(personList.get(m).toursThisMonth > currentHighestTourCount){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tcurrentHighestTourCount = personList.get(m).toursThisMonth;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t//System.out.println(\"Current highest tour count is \" + currentHighestTourCount);\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\tdayList.get(j).tourList.get(k).addGuide(personList.get(m));\r\n\t\t\t\t\t\t\t\t\t\t\t\tpersonList.get(m).tourList.add(dayList.get(j).tourList.get(k)); //Add the tour to that guide's list of tours.\r\n\t\t\t\t\t\t\t\t\t\t\t\t//System.out.println(\"We just added \" + personList.get(m).name);\r\n\t\t\t\t\t\t\t\t\t\t\t\tinnerWhile = false;\r\n\t\t\t\t\t\t\t\t\t\t\t\touterWhile = false;\r\n\t\t\t\t\t\t\t\t\t\t\t\tpersonList.get(m).weeks.set(week, true);\r\n\t\t\t\t\t\t\t\t\t\t\t\tm = personList.size();\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}//For m\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tcurrentAvailabilityInt++;\r\n\t\t\t\t\t\t\t\tif(currentAvailabilityInt > toursInTheWeek){\r\n\t\t\t\t\t\t\t\t\tinnerWhile = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} //inner while\r\n\t\t\t\t\t\t\tcurrentToursGivenInt++;\r\n\t\t\t\t\t\t\tif(currentToursGivenInt > currentHighestTourCount){\r\n\t\t\t\t\t\t\t\t//We couldn't find a tour guide. Do we break somehow?\r\n\t\t\t\t\t\t\t\tif(i < minGuidesPerTourInt){\r\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Returned here\");\r\n\t\t\t\t\t\t\t\t\treturn false; //Because we never reached the minimum guides per tour number.\r\n\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t//Otherwise we can just skip this tour. \r\n\t\t\t\t\t\t\t\touterWhile = false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} //outer while\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Here's where we update the counter for which availability bool we're looking at.\r\n\t\t\t\t\t\tcurrentAvailabilityBool++;\r\n\t\t\t\t\t\tif(currentAvailabilityBool >= toursInTheWeek){\r\n\t\t\t\t\t\t\tcurrentAvailabilityBool = 0; //Time to reset it.\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//For k\r\n\t\t\t\t}//If not a holiday.\r\n\t\t\t\telse{\r\n\t\t\t\t\tfor(int k = 0; k < dayList.get(j).numberOfTours; k++){\r\n\t\t\t\t\t\tcurrentAvailabilityBool++;\r\n\t\t\t\t\t\tif(currentAvailabilityBool >= toursInTheWeek){\r\n\t\t\t\t\t\t\tcurrentAvailabilityBool = 0; //Time to reset it.\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}//For j\r\n\t\t}//For i\r\n\t\t//Check if minToursPerGuide has been met.\r\n\t\tif(!checkMinToursPerGuide(minToursPerGuideInt)){\r\n\t\t\tSystem.out.println(\"Min tours per guide not met\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true; //It worked!\r\n\t}",
"public void visitHardTotals( DevCat devCat ) {}",
"private void getSchedules() {\n //Clearing List Items Before Adding it\n schedulesArrayList.clear();\n // Create a reference to the Schedules collection\n CollectionReference schedulesRef = db.collection(\"schedules\");\n\n // Create a query against the collection.\n Query query = schedulesRef;\n if (getArguments() != null) {\n if (dataBundle.getString(\"from\").equals(\"league Features\")) {\n query = schedulesRef.whereEqualTo(\"league_id\", dataBundle.getString(\"league_id\"));\n }\n }\n\n //Fetching data and assigning it to Recycler View to Display On Screen\n query.get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\n Calendar c = Calendar.getInstance();\n int yy = c.get(Calendar.YEAR);\n int mm = c.get(Calendar.MONTH) + 1;\n int dd = c.get(Calendar.DAY_OF_MONTH);\n QuerySnapshot documentSnapshots = task.getResult();\n if(documentSnapshots.size()==0){\n Toast.makeText(context,\"Match Schedule Is Not Created Yet!\",Toast.LENGTH_LONG).show();\n }\n progressDialog.dismiss();\n for (QueryDocumentSnapshot document : task.getResult()) {\n try {\n JSONObject Team1object = (JSONObject) teamsObject.get(document.get(\"team1_id\").toString());\n JSONObject Team2object = (JSONObject) teamsObject.get(document.get(\"team2_id\").toString());\n\n if (getArguments() == null) {\n String[] date = document.get(\"match_date\").toString().split(\"-\");\n if (Integer.parseInt(date[0]) > yy) {\n schedulesArrayList.add(new Schedules_List_model(document.getId(),\n document.get(\"match_location\").toString(),\n document.get(\"match_date\").toString(),\n document.get(\"match_time\").toString(),\n document.get(\"league_id\").toString(),\n document.get(\"team1_id\").toString(),\n Team1object.getString(\"team_name\"),\n Team1object.getString(\"team_icon\"),\n document.get(\"team2_id\").toString(),\n Team2object.getString(\"team_name\"),\n Team2object.getString(\"team_icon\")));\n }\n else if(Integer.parseInt(date[0]) == yy){\n\n if (Integer.parseInt(date[1]) > mm) {\n schedulesArrayList.add(new Schedules_List_model(document.getId(),\n document.get(\"match_location\").toString(),\n document.get(\"match_date\").toString(),\n document.get(\"match_time\").toString(),\n document.get(\"league_id\").toString(),\n document.get(\"team1_id\").toString(),\n Team1object.getString(\"team_name\"),\n Team1object.getString(\"team_icon\"),\n document.get(\"team2_id\").toString(),\n Team2object.getString(\"team_name\"),\n Team2object.getString(\"team_icon\")));\n }\n else if(Integer.parseInt(date[1]) == mm){\n if (Integer.parseInt(date[2]) >= dd) {\n schedulesArrayList.add(new Schedules_List_model(document.getId(),\n document.get(\"match_location\").toString(),\n document.get(\"match_date\").toString(),\n document.get(\"match_time\").toString(),\n document.get(\"league_id\").toString(),\n document.get(\"team1_id\").toString(),\n Team1object.getString(\"team_name\"),\n Team1object.getString(\"team_icon\"),\n document.get(\"team2_id\").toString(),\n Team2object.getString(\"team_name\"),\n Team2object.getString(\"team_icon\")));\n }\n }\n }\n } else {\n schedulesArrayList.add(new Schedules_List_model(document.getId(),\n document.get(\"match_location\").toString(),\n document.get(\"match_date\").toString(),\n document.get(\"match_time\").toString(),\n document.get(\"league_id\").toString(),\n document.get(\"team1_id\").toString(),\n Team1object.getString(\"team_name\"),\n Team1object.getString(\"team_icon\"),\n document.get(\"team2_id\").toString(),\n Team2object.getString(\"team_name\"),\n Team2object.getString(\"team_icon\")));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n schedules_rec_adapter.notifyDataSetChanged();\n schedules_rec_adapter.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n RecyclerView.ViewHolder viewHolder = (RecyclerView.ViewHolder) view.getTag();\n int position = viewHolder.getAdapterPosition();\n Bundle dataBundle = new Bundle();\n dataBundle.putString(\"match_id\",schedulesArrayList.get(position).getMatch_id());\n dataBundle.putString(\"match_date\",schedulesArrayList.get(position).getMatch_date());\n dataBundle.putString(\"match_time\",schedulesArrayList.get(position).getMatch_time());\n dataBundle.putString(\"match_location\",schedulesArrayList.get(position).getMatch_location());\n dataBundle.putString(\"team1_id\",schedulesArrayList.get(position).getTeam1_id());\n dataBundle.putString(\"team1_name\",schedulesArrayList.get(position).getTeam1_name());\n dataBundle.putString(\"team1_icon\",schedulesArrayList.get(position).getTeam1_icon());\n dataBundle.putString(\"team2_id\",schedulesArrayList.get(position).getTeam2_id());\n dataBundle.putString(\"team2_name\",schedulesArrayList.get(position).getTeam2_name());\n dataBundle.putString(\"team2_icon\",schedulesArrayList.get(position).getTeam2_icon());\n dataBundle.putString(\"league_id\",schedulesArrayList.get(position).getLeague_id());\n if (getArguments() != null) {\n if (getArguments().getString(\"from\") != null && getArguments().getString(\"from\").equals(\"league Features\")) {\n dataBundle.putString(\"from\", \"league Features\");\n HomeNavController.navigate(R.id.matchScheduleInfoFragment, dataBundle);\n }\n } else {\n HomeNavController.navigate(R.id.matchScheduleInfoFragment,dataBundle);\n }\n }\n });\n } else {\n Toast.makeText(context, task.getException().getLocalizedMessage(), Toast.LENGTH_LONG).show();\n }\n }\n });\n }",
"private void setCycleStats(DocumentReference cycleReference) {\n cycleReference.get(getCacheSource())\n .addOnCompleteListener(task -> {\n try {\n DocumentSnapshot snapshot = task.getResult();\n Map<String, Object> data;\n if (snapshot != null && (data = snapshot.getData()) != null) {\n WeeklyStat weeklyStat = WeeklyStat.from(data);\n TextView distance = findViewById(R.id.cycleDistance);\n distance.setText(String.format(Locale.getDefault(), \"%,.01fkm\", weeklyStat.getDistance()));\n TextView time = findViewById(R.id.cycleTime);\n time.setText(Utils.durationToHoursMinutes(weeklyStat.getTime()));\n TextView elevation = findViewById(R.id.cycleElevation);\n elevation.setText(String.format(Locale.getDefault(), \"%dm\", weeklyStat.getElevation()));\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n });\n }",
"@Override\r\n public void onSensorChanged(SensorEvent event) {\r\n /*final DocumentReference dr = nFirestore.collection(\"User\").document(mAuth.getCurrentUser().getUid());*/\r\n if (running){\r\n steps = findViewById(R.id.steps);\r\n final Map<String,Object> userMap = new HashMap<>();\r\n Fitness.getHistoryClient(this, GoogleSignIn.getLastSignedInAccount(this))\r\n .readDailyTotal(DataType.TYPE_STEP_COUNT_DELTA)\r\n .addOnSuccessListener(\r\n new OnSuccessListener<DataSet>() {\r\n @Override\r\n public void onSuccess(DataSet dataSet) {\r\n long total =\r\n dataSet.isEmpty()\r\n ? 0\r\n : dataSet.getDataPoints().get(0).getValue(Field.FIELD_STEPS).asInt();\r\n getGroup();\r\n u.setSteps(String.valueOf(total));\r\n u.setTop(\"10\");\r\n u.setUid(mAuth.getCurrentUser().getUid());\r\n getTopPos();\r\n\r\n //u.setGroup(\"group\");\r\n /*userMap.get(\"group\") = getGroup().get(\"group\");*/\r\n //userMap.put(\"group\",getGroup().get(\"group\"));\r\n //userMap.put(\"steps\",String.valueOf(total));\r\n /*batch.update(dr,\"steps\",String.valueOf(total));*/\r\n //calculateTop();\r\n //top = calculateTop();\r\n //userMap.put(\"top\",String.valueOf(top));\r\n nFirestore.collection(\"user\").document(mAuth.getCurrentUser().getUid()).set(u);\r\n //nFirestore.collection(\"User\").document(mAuth.getCurrentUser().getUid()).set(getGroup().get(\"group\"));\r\n steps.setText(String.valueOf(total));\r\n\r\n }\r\n })\r\n .addOnFailureListener(\r\n new OnFailureListener() {\r\n @Override\r\n public void onFailure(@NonNull Exception e) {\r\n Log.w(TAGFit, \"There was a problem getting the step count.\", e);\r\n }\r\n });\r\n }\r\n }",
"public void AllWeekAppointmentReport(int weeks)\r\n {\r\n for (int i = 0; i < weeks; i++)\r\n {\r\n for (int j = 0; j < daysPerWeek; j++)\r\n {\r\n for (int k = 0; k < totalSlots; k++)\r\n {\r\n LessonClass a = weekArray[(i)].dayArray[j].dayMap.get(roomNtime[k]);\r\n \r\n // if appointment exists and is parent appointment\r\n if (a != null && a.subject == subjects.PARENT)\r\n {\r\n System.out.println(\"\\n| WEEK: \" + (i+1) + \" | \" + \"DAY: \" + days[j] \r\n + \" | \" + \"TIME: \" + a.time + \"pm | \" + a.room + \" |\");\r\n System.out.println(a.toReport());\r\n System.out.println(\"Visitor offspring ID: \");\r\n \r\n // track if anybody has booked this slot\r\n boolean visitor = false;\r\n \r\n // for each entry in register\r\n for (String s : a.register)\r\n {\r\n if (s != null)\r\n {\r\n System.out.print(s + \"\\n\");\r\n visitor = true;\r\n }\r\n }\r\n // feedback for nobody booked this slot\r\n if (visitor == false)\r\n {\r\n System.out.println(\"No visits booked\");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }",
"public static void viewBy() {\n\t\tMONTHS[] arrayOfMonths = MONTHS.values();\n\t\tLONGDAYS[] arrayOfLongDays = LONGDAYS.values();\n\t\tSystem.out.println(\"[D]ay view or [M]onth view ? \");\n\t\tScanner sc = new Scanner(System.in);\n\t\tString input;\n\t\tif (sc.hasNextLine()) {\n\t\t\tinput = sc.nextLine().toLowerCase();\n\n\t\t\tif (input.equals(\"d\")) { //day view\t\t\t\t\n\t\t\t\tGregorianCalendar cal1 = new GregorianCalendar();\n\t\t\t\tGregorianCalendar cal = new GregorianCalendar(cal1.get(Calendar.YEAR), cal1.get(Calendar.MONTH)+1, cal1.get(Calendar.DAY_OF_MONTH));\n\t\t\t\tSystem.out.print(arrayOfLongDays[cal1.get(Calendar.DAY_OF_WEEK) - 1]);\n\t\t\t\tSystem.out.print(\", \");\n\t\t\t\tSystem.out.print(arrayOfMonths[cal.get(Calendar.MONTH)-1]);\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t\tSystem.out.print(cal.get(Calendar.DAY_OF_MONTH));\n\t\t\t\tSystem.out.print(\", \");\n\t\t\t\tSystem.out.print(cal.get(Calendar.YEAR));\n\t\t\t\tString values = getValues(cal);\n\t\t\t\tif (values != \"\") {\n\t\t\t\t\tSystem.out.println(\"\\n\" + values);\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"\\nThere are no events scheduled for this day\");\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"\\n[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\tinput = sc.nextLine().toLowerCase();\n\t\t\t\twhile (input.equals(\"n\") || input.equals(\"p\")) {\n\t\t\t\t\tif (input.equals(\"p\")) { // previous\n\t\t\t\t\t\tcal.add(Calendar.DAY_OF_MONTH, -1);\n\t\t\t\t\t\tcal1.add(Calendar.DAY_OF_MONTH, -1);\n\t\t\t\t\t\tSystem.out.print(arrayOfLongDays[cal1.get(Calendar.DAY_OF_WEEK) - 1]);\n\t\t\t\t\t\tSystem.out.print(\", \");\n\t\t\t\t\t\tSystem.out.print(arrayOfMonths[cal.get(Calendar.MONTH)-1]);\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t\tSystem.out.print(cal.get(Calendar.DAY_OF_MONTH));\n\t\t\t\t\t\tSystem.out.print(\", \");\n\t\t\t\t\t\tSystem.out.print(cal.get(Calendar.YEAR) + \"\\n\");\n\t\t\t\t\t\tString value = getValues(cal);\n\t\t\t\t\t\tif (value != \"\") {\n\t\t\t\t\t\t\tSystem.out.println(value);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\"\\nThere are no events scheduled for this day\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"\\n[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\t\t\tinput = sc.nextLine().toLowerCase();\n\t\t\t\t\t} else if (input.equals(\"n\")) { // next\n\t\t\t\t\t\tcal.add(Calendar.DAY_OF_MONTH, 1);\n\t\t\t\t\t\tcal1.add(Calendar.DAY_OF_MONTH, 1);\n\t\t\t\t\t\tSystem.out.print(arrayOfLongDays[cal1.get(Calendar.DAY_OF_WEEK) - 1]);\n\t\t\t\t\t\tSystem.out.print(\", \");\n\t\t\t\t\t\tSystem.out.print(arrayOfMonths[cal.get(Calendar.MONTH)-1]);\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t\tSystem.out.print(cal.get(Calendar.DAY_OF_MONTH));\n\t\t\t\t\t\tSystem.out.print(\", \");\n\t\t\t\t\t\tSystem.out.print(cal.get(Calendar.YEAR) + \"\\n\");\n\t\t\t\t\t\tString values1 = getValues(cal);\n\t\t\t\t\t\tif (values1 != \"\") {\n\t\t\t\t\t\t\tSystem.out.println(values1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\"\\nThere are no events scheduled for this day\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"\\n[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\t\t\tinput = sc.nextLine().toLowerCase();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (input.equals(\"m\")) { // main menu\n\t\t\t\t\tSystem.out.println(\"main menu\");\n\t\t\t\t} else { // user didn't input a valid option\n\t\t\t\t\tSystem.out.println(\"\\n[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\t}\n\n\t\t\t} else if (input.equals(\"m\")) { // month view\n\t\t\t\tGregorianCalendar cal = new GregorianCalendar();\n\t\t\t\tdisplayMainMenuWithEvents(cal);\n\t\t\t\tSystem.out.println(\"[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\tinput = sc.nextLine().toLowerCase();\n\t\t\t\twhile (input.equals(\"p\") || input.equals(\"n\")) {\n\t\t\t\t\tif (input.equals(\"p\")) { // previous\n\t\t\t\t\t\tcal.add(Calendar.MONTH, -1);\n\t\t\t\t\t\tdisplayMainMenuWithEvents(cal);\n\t\t\t\t\t\tSystem.out.println(\"\\n[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\t\t\tinput = sc.nextLine().toLowerCase();\n\t\t\t\t\t} else if (input.equals(\"n\")) { // next\n\t\t\t\t\t\tcal.add(Calendar.MONTH, 1);\n\t\t\t\t\t\tdisplayMainMenuWithEvents(cal);\n\t\t\t\t\t\tSystem.out.println(\"\\n[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\t\t\tinput = sc.nextLine().toLowerCase();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (input.equals(\"m\")) { // main menu\n\t\t\t\t\tSystem.out.println(\"main menu\");\n\t\t\t\t} else { // user didn't input a valid option\n\t\t\t\t\tSystem.out.println(\"\\n[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}"
] |
[
"0.5666071",
"0.5572565",
"0.55444705",
"0.55368674",
"0.5402027",
"0.5400183",
"0.53737056",
"0.53050536",
"0.52338743",
"0.5226111",
"0.52181864",
"0.52168465",
"0.5167598",
"0.51623434",
"0.5137425",
"0.50964135",
"0.5055697",
"0.5047333",
"0.50373495",
"0.50328493",
"0.5032632",
"0.50296617",
"0.5023483",
"0.5015532",
"0.5015141",
"0.5011115",
"0.4982966",
"0.49762508",
"0.4964124",
"0.49604097",
"0.49602553",
"0.495751",
"0.4934484",
"0.491967",
"0.4913453",
"0.49035332",
"0.4901417",
"0.49013606",
"0.4895801",
"0.48867804",
"0.48797983",
"0.48792207",
"0.48738003",
"0.4860513",
"0.48584965",
"0.48532656",
"0.48495683",
"0.48392302",
"0.48376146",
"0.48300478",
"0.48260292",
"0.4818001",
"0.48140222",
"0.48138475",
"0.48126727",
"0.48069438",
"0.4804396",
"0.47951362",
"0.47942084",
"0.47915572",
"0.47898093",
"0.47892538",
"0.4782969",
"0.47818315",
"0.47805053",
"0.47783798",
"0.4778101",
"0.4764399",
"0.47553876",
"0.47513038",
"0.4750743",
"0.47487554",
"0.47449845",
"0.47448152",
"0.47254258",
"0.47233063",
"0.47121856",
"0.47096765",
"0.4707834",
"0.4704316",
"0.46938232",
"0.4689847",
"0.46878472",
"0.46818754",
"0.4680231",
"0.4680059",
"0.46753576",
"0.46750653",
"0.46747002",
"0.4673894",
"0.4666817",
"0.46640146",
"0.46608284",
"0.46606702",
"0.46602473",
"0.46599334",
"0.46524748",
"0.46515012",
"0.4641209",
"0.46402228",
"0.4636298"
] |
0.0
|
-1
|
User cancelled the dialog
|
public void onClick(DialogInterface dialog, int id) {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void cancelDialog() {dispose();}",
"public void cancel() { Common.exitWindow(cancelBtn); }",
"@Override\n public void onCancel(DialogInterface dialog) {\n cancel(true);\n }",
"@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t\tcancel(true);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}",
"@Override\n public void onClick(DialogInterface dialog, int arg1) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n }",
"@Override\n\t\t\t\t\t\tpublic void doCancel() {\n\t\t\t\t\t\t\tcommonDialog.dismiss();\n\t\t\t\t\t\t}",
"@Override\n public void onClick(DialogInterface dialog,\n int which)\n {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog,\n int which)\n {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.cancel();\n }",
"void cancelButton_actionPerformed(ActionEvent e)\n\t{\n\t\tcloseDlg();\n }",
"private void cancel(){\n\t\tSPSSDialog.instance = null;\n\t\thide();\n\t}",
"@Override\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t}",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tdialog.dismiss();\n\t\t}",
"@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tdialog.dismiss();\n\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\r\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t}",
"public void onCancelClicked() {\n close();\n }",
"@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(\r\n\t\t\t\t\t\t\t\t\t\t\t\tDialogInterface dialog,\r\n\t\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\t\t\tdialog.cancel();\r\n\t\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\n\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\n\t\t\t\t\tfinish();\n\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}",
"@Override\n public void onClick(DialogInterface dialog, int which)\n {\n dialog.cancel();\n }",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t}",
"@Override\r\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\r\n\r\n }",
"@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.cancel();\r\n\t\t\t\t\t}",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"public void handleCancel() {\n\t\tdialogStage.close();\n\t}",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which)\n\t\t\t{\n\t\t\t\tdialog.cancel();\n\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t}",
"@Override\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void dialogCancelled(int dialogId) {\n\t\t\r\n\t}",
"@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t}",
"public void onClick(DialogInterface dialog, int which) {\n\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int which) {\n\n dialog.cancel();\n }",
"private void cancel() {\n\t\tfinish();\n\t}",
"public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\r\n\tpublic void dialogControyCancel() {\n\r\n\t}",
"@Override\n public void onCancel(DialogInterface arg0) {\n\n }",
"@Override\n public void onClick(View v) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n finish();\n }",
"@Override\n public void onCancel(DialogInterface dialog) {\n finish();\n }",
"@Override\n\tpublic void onCancel(DialogInterface dialog) {\n\t\tBase.car_v.wzQueryDlg = null;\n\t}",
"private void cancel(){\n if(isFormEmpty()){\n finish();\n }else{\n // Confirmation dialog\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setTitle(getString(R.string.cancel_booking_creation_confirmation));\n // When users confirms dialog, end activity\n builder.setPositiveButton(android.R.string.ok, (dialog, which) -> {\n finish();\n });\n\n // Do nothing if cancel\n builder.setNegativeButton(android.R.string.cancel, null);\n\n AlertDialog dialog = builder.create();\n dialog.show();\n\n // Change button colors\n Button positiveButton = dialog.getButton(AlertDialog.BUTTON_POSITIVE);\n positiveButton.setTextColor(getColor(R.color.colorPrimary));\n Button negativeButton = dialog.getButton(AlertDialog.BUTTON_NEGATIVE);\n negativeButton.setTextColor(getColor(R.color.colorPrimary));\n }\n }",
"public void onClick(DialogInterface dialog,\n int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(View v) {\n\n dialog.cancel();\n }",
"@Override\n public void onClick(View v) {\n\n dialog.cancel();\n }",
"public boolean cancel();",
"@Override\n public void onCancel(DialogInterface dialog) {\n }",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"@Override\n\tpublic void onCancel(DialogInterface arg0) {\n\t\t\n\t}",
"@Override\n public void onClick(DialogInterface dialog, int whichButton) {\n \tdialog.cancel(); //Close this dialog box\n }",
"public void onCancelButtonClick() {\n close();\n }",
"public void onClick(DialogInterface dialog, int which) {\n\n dialog.cancel();\n }",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t\ttoastMessage(\"Confirmation cancelled\");\n\t\t\t}",
"public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"public void cancel() {\r\n\t\tthis.cancel = true;\r\n\t}",
"public void cancel() throws Exception {\n\t\tgetControl(\"cancelButton\").click();\n\t}",
"public void onDialogCancelled(DialogActivity dialog)\n {\n cancel();\n }",
"void onCancelClicked();",
"void cancelButton_actionPerformed(ActionEvent e) {\n setUserAction(CANCELLED);\n setVisible(false);\n }",
"public void onClick(DialogInterface dialog, int which) {\n\t\t\t dialog.cancel();\n\t\t\t }",
"public void onClick(DialogInterface dialog, int arg1) {\n dialog.cancel();\n }",
"@Override\r\n public void onCancel(DialogInterface dialogInterface) {\n finish();\r\n }",
"protected void closeDialogCancel() {\n dispose();\n }",
"@Override\n public void cancel() {\n super.cancel();\n\n /** Flag cancel user request\n */\n printingCanceled.set(true);\n\n /** Show a warning message\n */\n JOptionPane.showMessageDialog( MainDemo.this , \"Lorem Ipsum printing task canceled\", \"Task canceled\" , JOptionPane.WARNING_MESSAGE );\n }",
"@Override\n public void onCancel(DialogInterface dialog) {\n Log.v(LOG_TAG, \"onCancel\");\n dismiss();\n }",
"public void cancel()\n\t{\n\t}",
"@Override\n public void onClick(View v)\n {\n begindialog.cancel();\n }",
"public void cancel(){\n cancelled = true;\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n finish();\n }",
"@Override\n public void onCancel(DialogInterface dialog) {\n\n }",
"public void cancel() {\n if (alert != null) {\n alert.cancel();\n isShowing = false;\n } else\n TLog.e(TAG + \" cancel\", \"alert is null\");\n }",
"public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), \"Pressed Cancel\",\n Toast.LENGTH_SHORT).show();\n }",
"public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n finish();\n }",
"public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n finish();\n }",
"public void onCancel();",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog,int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog,int id)\n {\n dialog.cancel();\n }",
"@Override\r\n\tpublic void onCancel(DialogInterface dialog) {\n\r\n\t}",
"@Override\r\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\r\n\t\t}",
"@Override\r\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\r\n\t\t}",
"public void onClick(DialogInterface dialog,\n int id) {\n dialog.cancel();\n }",
"@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\t\n\t\t}"
] |
[
"0.84252524",
"0.81816214",
"0.81397384",
"0.80922073",
"0.7927849",
"0.79160905",
"0.78777075",
"0.78763556",
"0.7856008",
"0.7849157",
"0.7848072",
"0.7838308",
"0.7804249",
"0.77992254",
"0.7796975",
"0.7796975",
"0.77921396",
"0.7792013",
"0.77904165",
"0.77860636",
"0.7785849",
"0.7781991",
"0.7781991",
"0.7781991",
"0.7775402",
"0.7774749",
"0.7774749",
"0.77683115",
"0.77681756",
"0.77668333",
"0.7761063",
"0.7761063",
"0.7761063",
"0.7761063",
"0.7761063",
"0.7759365",
"0.7731582",
"0.7724297",
"0.7720925",
"0.7720103",
"0.76955104",
"0.7678485",
"0.7654357",
"0.7654357",
"0.764555",
"0.76443124",
"0.7634409",
"0.7633464",
"0.7621916",
"0.7621163",
"0.7603697",
"0.7603203",
"0.7600248",
"0.7598492",
"0.7591874",
"0.7591874",
"0.7591339",
"0.7590508",
"0.7589548",
"0.7589548",
"0.7589548",
"0.7589548",
"0.7589548",
"0.7589548",
"0.7588744",
"0.75886345",
"0.7560806",
"0.7550736",
"0.7540379",
"0.7539729",
"0.7539729",
"0.7534361",
"0.7531358",
"0.75296545",
"0.7524118",
"0.7523424",
"0.75232726",
"0.752038",
"0.75199866",
"0.7512266",
"0.75083005",
"0.7500499",
"0.7497863",
"0.7495073",
"0.7493796",
"0.7492944",
"0.74797153",
"0.74698204",
"0.7465173",
"0.74630636",
"0.7460028",
"0.7460028",
"0.7458466",
"0.7455514",
"0.74514836",
"0.7442903",
"0.74414104",
"0.7436282",
"0.7436282",
"0.74358857",
"0.74198526"
] |
0.0
|
-1
|
Created by Admin on 2017/3/13.
|
public interface BaseView {
void onRequestError();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n public void memoria() {\n \n }",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void create () {\n\n\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n public void init() {\n\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"public void mo38117a() {\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"Petunia() {\r\n\t\t}",
"@Override\n\tpublic void create() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void getExras() {\n }",
"public void designBasement() {\n\t\t\r\n\t}",
"public void autoDetails() {\n\t\t\r\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"public contrustor(){\r\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"public void mo4359a() {\n }",
"private TMCourse() {\n\t}",
"@Override\n void init() {\n }",
"private Singletion3() {}",
"@Override\n\tpublic void create() {\n\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n public void init() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void verarbeite() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void create() {\n\r\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"private UsineJoueur() {}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"public void create() {\n\t\t\n\t}",
"@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}",
"@Override\n\tpublic void afterInit() {\n\t\t\n\t}",
"@Override\n\tpublic void afterInit() {\n\t\t\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public int describeContents() { return 0; }",
"Consumable() {\n\t}",
"@Override\r\n\tpublic void create() {\n\t\t\r\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n protected void init() {\n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"protected void onFirstUse() {}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n public void init() {}",
"public static void created() {\n\t\t// TODO\n\t}",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"public void gored() {\n\t\t\n\t}",
"private void init() {\n\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}"
] |
[
"0.6197314",
"0.6150779",
"0.58690417",
"0.5822133",
"0.58148414",
"0.5776922",
"0.5717138",
"0.56939745",
"0.5667726",
"0.5651427",
"0.56426895",
"0.5642246",
"0.56350553",
"0.56337124",
"0.5617193",
"0.5617073",
"0.5605596",
"0.5605596",
"0.5595463",
"0.5595463",
"0.5566597",
"0.5553402",
"0.5553287",
"0.5553167",
"0.5552792",
"0.55277175",
"0.55272883",
"0.5527062",
"0.5504353",
"0.5501209",
"0.5499084",
"0.5494783",
"0.5494783",
"0.5494783",
"0.5494783",
"0.5494783",
"0.5494783",
"0.54938316",
"0.54933137",
"0.5483995",
"0.5481614",
"0.54749686",
"0.54641175",
"0.54616606",
"0.54554",
"0.5441776",
"0.54414034",
"0.54190415",
"0.54122454",
"0.5409047",
"0.5400608",
"0.5400608",
"0.5400608",
"0.5400608",
"0.5400608",
"0.5400608",
"0.5400608",
"0.5396528",
"0.53877014",
"0.5374349",
"0.5373234",
"0.5364361",
"0.53639454",
"0.53633654",
"0.53604406",
"0.53604406",
"0.53561735",
"0.5354022",
"0.5354022",
"0.53509176",
"0.53509176",
"0.53509176",
"0.53509176",
"0.53509176",
"0.53471625",
"0.53471625",
"0.53471524",
"0.53471047",
"0.5345705",
"0.5343168",
"0.53400743",
"0.53398293",
"0.53385967",
"0.5336008",
"0.5334685",
"0.5333192",
"0.532802",
"0.53205264",
"0.53187954",
"0.5318247",
"0.53163767",
"0.5313125",
"0.5307351",
"0.53073347",
"0.53073347",
"0.53073347",
"0.53051484",
"0.53051484",
"0.53051484",
"0.53038996",
"0.53038996"
] |
0.0
|
-1
|
Compress a byte array.
|
private static @Nonnull byte[] compress(@Nonnull final byte[] repBytes) {
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
try (OutputStream compos = new GZIPOutputStream(baos)) {
compos.write(repBytes);
} catch (final IOException e) {
log.error("can not construct compressed representation: {}", e);
}
return baos.toByteArray();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static byte[] compress(byte[] value) {\n return compress(value, 0, value.length, Deflater.BEST_COMPRESSION);\n }",
"public static byte[] compressBytes(byte[] data) {\n\t\t\tDeflater deflater = new Deflater();\n\t\t\tdeflater.setInput(data);\n\t\t\tdeflater.finish();\n\t\t\tByteArrayOutputStream outputStream = new ByteArrayOutputStream(data.length);\n\t\t\tbyte[] buffer = new byte[1024];\n\t\t\twhile (!deflater.finished()) {\n\t\t\t\tint count = deflater.deflate(buffer);\n\t\t\t\toutputStream.write(buffer, 0, count);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\toutputStream.close();\n\t\t\t} catch (IOException e) {\n\t\t\t}\n\t\t\tSystem.out.println(\"Compressed Image Byte Size - \" + outputStream.toByteArray().length);\n\t\t\treturn outputStream.toByteArray();\n\t\t}",
"public static byte[] compress(byte[] value, int offset, int length) {\n return compress(value, offset, length, Deflater.BEST_COMPRESSION);\n }",
"public static byte[] encode(byte[] arr) {\n checkValues(arr);\n\n int capacity =\n arr.length / 8 +\n (arr.length % 8 != 0 ? 1 : 0);\n\n byte[] compressed = new byte[capacity];\n\n for (int i = 0; i < compressed.length; i++) {\n byte currentByte = 0;\n\n for (int j = 0; j < 8 && j + i * 8 < arr.length; j++) {\n int index = i * 8 + j;\n byte value = (byte) (arr[index] << j);\n\n currentByte |= value;\n }\n\n compressed[i] = currentByte;\n }\n\n ByteBuffer buffer = ByteBuffer.allocate(4 + compressed.length);\n\n buffer.putInt(arr.length);\n buffer.put(compressed);\n\n return buffer.array();\n }",
"static byte[] compressData(byte data[]) {\n\t\tif (data.length < 8) {\n\t\t\treturn (data);\n\t\t} // Too short to compress effectively...\n\t\ttry {\n\t\t\t// Make a buffer; data expansion is unusual except for short inputs.\n\t\t\tfinal ByteArrayOutputStream baos = new ByteArrayOutputStream(\n\t\t\t\t\tMath.max(data.length, 32));\n\t\t\tfinal DefOutputStream cos = new DefOutputStream(baos);\n\t\t\t// Write uncompressed data to stream.\n\t\t\tcos.write(data);\n\t\t\t// Force everything out...\n\t\t\tcos.finish();\n\t\t\tcos.flush();\n\t\t\t// Maybe we should strip some other headers too?\n\t\t\treturn (baos.toByteArray());\n\t\t} catch (IOException e) {\n\t\t\t// Should never happen...\n\t\t\tthrow new Error(\"unexpected internal error\");\n\t\t}\n\t}",
"@Override\n public byte[] compress(byte[] bytes) throws IOException\n {\n try (BinaryIO io = new BinaryIO())\n {\n io.write32Bits(LZW_TAG);\n\n LZWDictionary dict = new LZWDictionary();\n int bitsize = 9, index = -1, newIndex;\n\n for (byte b : bytes)\n {\n newIndex = dict.get(index, b);\n\n if (newIndex > 0)\n index = newIndex;\n else\n {\n io.writeBits(index, bitsize);\n bitsize = dict.put(index, b);\n index = dict.get(-1, b);\n }\n if (dict.isFull())\n dict.reset();\n }\n io\n .writeBits(index, bitsize)\n .write32Bits(0); // EoF marker\n\n return io.getBytesOut();\n }\n }",
"public static byte[] compress(byte[] value, int offset, int length, int compressionLevel) {\n\n /* Create an expandable byte array to hold the compressed data.\n * You cannot use an array that's the same size as the orginal because\n * there is no guarantee that the compressed data will be smaller than\n * the uncompressed data. */\n ByteArrayOutputStream bos = new ByteArrayOutputStream(length);\n\n Deflater compressor = new Deflater();\n\n try {\n compressor.setLevel(compressionLevel);\n compressor.setInput(value, offset, length);\n compressor.finish();\n\n // Compress the data\n final byte[] buf = new byte[1024];\n while (!compressor.finished()) {\n int count = compressor.deflate(buf);\n bos.write(buf, 0, count);\n }\n } finally {\n compressor.end();\n }\n\n return bos.toByteArray();\n }",
"@Override\n public void writeCompressed(DataOutput out) throws IOException {\n out.writeInt(length);\n out.write(array);\n }",
"public static int compress(byte[] b, int boffset, int len, byte[] o, int ooffset) throws IOException {\n\t\ttry{\n\t\t\treturn lz4Compressor.compress(b, boffset, len, o, ooffset);\n\t\t} catch (LZ4Exception e) {\n\t\t\treturn -lz4Compressor.maxCompressedLength(b.length);\n\t\t}\n\t}",
"@Override\n public byte[] compress(byte[] imagen) {\n ResetVarC();\n /*\n Declaraciones de variables\n */\n char[] imagenaux = new char[imagen.length];\n for (int j = 0; j < imagen.length; j++) {\n imagenaux[j] = (char) (imagen[j] & 0xFF);\n }\n\n getWidthandHeight(imagenaux);\n\n imagenYCbCr = new int[height][width][3];\n for (int i = 0; i < height; ++i) {\n for (int j = 0; j < width; ++j) {\n int[] RGB = {(int) imagenaux[iterator], (int) imagenaux[iterator + 1], (int) imagenaux[iterator + 2]};\n imagenYCbCr[i][j] = RGBtoYCbCr(RGB);\n iterator += 3;\n }\n }\n\n CreateCompression();\n\n\n Huffman comprimirY = new Huffman();\n Huffman comprimirCB = new Huffman();\n Huffman comprimirCR = new Huffman();\n\n String Yen = comprimirY.compressHuffman(Yencoding);\n String Cben = comprimirCB.compressHuffman(Cbencoding);\n String Cren = comprimirCR.compressHuffman(Crencoding);\n\n\n Map<Integer, Integer> freqY = comprimirY.getFrequencies();\n Map<Integer, Integer> freqCb = comprimirCB.getFrequencies();\n Map<Integer, Integer> freqCr = comprimirCR.getFrequencies();\n\n\n CreateFreq(freqY, freqCb, freqCr);\n\n return JPEGFile(freqY, freqCb, freqCr, Yen, Cben, Cren);\n }",
"void writeByteArray(ByteArray array);",
"@Override\n public void write(byte[] b) throws IOException {\n byte lastByte = 0;\n int count = 0;\n List compressedBytes = new ArrayList();\n out.write(Arrays.copyOfRange(b, 0, metaData));\n for(int i=metaData; i < b.length; i++){\n if(b[i] == lastByte)\n count++;\n else{\n while(count>256){\n compressedBytes.add((byte)255);\n compressedBytes.add((byte)0);\n //out.write(255);\n //out.write(0);\n count = count - 255;\n }\n compressedBytes.add((byte)count);\n //out.write(count);\n count = 1;\n if (lastByte == 0)\n lastByte = 1;\n else\n lastByte = 0;\n }\n }\n compressedBytes.add((byte)count);\n //out.write(count);\n out.write(toByteArray(compressedBytes));\n\n System.out.println ((compressedBytes.size()/b.length)*100);\n }",
"public static byte[] a(byte[] bArr) throws IOException {\n Throwable th;\n ByteArrayOutputStream byteArrayOutputStream = null;\n if (bArr == null || bArr.length <= 0) {\n return null;\n }\n Deflater deflater = new Deflater();\n deflater.setInput(bArr);\n deflater.finish();\n byte[] bArr2 = new byte[8192];\n a = 0;\n try {\n ByteArrayOutputStream byteArrayOutputStream2 = new ByteArrayOutputStream();\n while (!deflater.finished()) {\n try {\n int deflate = deflater.deflate(bArr2);\n a += deflate;\n byteArrayOutputStream2.write(bArr2, 0, deflate);\n } catch (Throwable th2) {\n th = th2;\n byteArrayOutputStream = byteArrayOutputStream2;\n if (byteArrayOutputStream != null) {\n byteArrayOutputStream.close();\n }\n throw th;\n }\n }\n deflater.end();\n byteArrayOutputStream2.close();\n return byteArrayOutputStream2.toByteArray();\n } catch (Throwable th3) {\n th = th3;\n if (byteArrayOutputStream != null) {\n }\n throw th;\n }\n }",
"byte[] inflate(byte[] data) throws IOException;",
"@Override\n\tpublic void Compress() {\n\t\t\n\t}",
"byte[] deflate(byte[] data) throws IOException;",
"@Test\n public void compressTest() {\n char[] chars1 = new char[]{'a', 'a', 'b', 'b', 'c', 'c', 'c'};\n assertEquals(6, compress(chars1));\n char[] expected1 = new char[]{'a', '2', 'b', '2', 'c', '3'};\n for(int i = 0; i < expected1.length; i++) {\n assertEquals(expected1[i], chars1[i]);\n }\n /**\n * Input:\n * [\"a\"]\n *\n * Output:\n * Return 1, and the first 1 characters of the input array should be: [\"a\"]\n *\n * Explanation:\n * Nothing is replaced.\n */\n char[] chars2 = new char[]{'a'};\n assertEquals(1, compress(chars2));\n char[] expected2 = new char[]{'a'};\n for(int i = 0; i < expected2.length; i++) {\n assertEquals(expected2[i], chars2[i]);\n }\n /**\n * Input:\n * [\"a\",\"b\",\"b\",\"b\",\"b\",\"b\",\"b\",\"b\",\"b\",\"b\",\"b\",\"b\",\"b\"]\n *\n * Output:\n * Return 4, and the first 4 characters of the input array should be: [\"a\",\"b\",\"1\",\"2\"].\n *\n * Explanation:\n * Since the character \"a\" does not repeat, it is not compressed. \"bbbbbbbbbbbb\" is replaced by \"b12\".\n * Notice each digit has it's own entry in the array.\n */\n char[] chars3 = new char[]{'a', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b'};\n assertEquals(4, compress(chars3));\n char[] expected3 = new char[]{'a', 'b', '1', '2'};\n for(int i = 0; i < expected3.length; i++) {\n assertEquals(expected3[i], chars3[i]);\n }\n\n }",
"@Test\n public void compress() throws IOException {\n byte[] compressed = Utils.compress(\"\");\n Assert.assertEquals(compressed.length, 0);\n }",
"public void write(byte b[]) throws IOException;",
"@Test\n public void compress1() throws IOException {\n byte[] compressed = Utils.compress(null);\n Assert.assertEquals(compressed.length, 0);\n }",
"public static byte[] decompressBytes(byte[] data) {\n\t\t\tInflater inflater = new Inflater();\n\t\t\tinflater.setInput(data);\n\t\t\tByteArrayOutputStream outputStream = new ByteArrayOutputStream(data.length);\n\t\t\tbyte[] buffer = new byte[1024];\n\t\t\ttry {\n\t\t\t\twhile (!inflater.finished()) {\n\t\t\t\t\tint count = inflater.inflate(buffer);\n\t\t\t\t\toutputStream.write(buffer, 0, count);\n\t\t\t\t}\n\t\t\t\toutputStream.close();\n\t\t\t} catch (IOException ioe) {\n\t\t\t} catch (DataFormatException e) {\n\t\t\t}\n\t\t\treturn outputStream.toByteArray();\n\t\t}",
"public static byte[] compressString(String value) {\n return compressString(value, Deflater.BEST_COMPRESSION);\n }",
"private static byte[] intArray2ByteArray (int[] src)\n\t{\n\t\tbyte[] dst = new byte [src.length];\n\t\tfor (int i = 0; i < src.length; ++ i)\n\t\t\tdst[i] = (byte) src[i];\n\t\treturn dst;\n\t}",
"public void compress() {\r\n fCharBuffer.compress();\r\n fStyleBuffer.compress();\r\n fParagraphBuffer.compress();\r\n }",
"private static byte[] toByteArray(int[] array) {\n final byte[] res = new byte[array.length];\n for (int i = 0; i < array.length; ++i) {\n final int value = array[i];\n res[i] = (byte) value;\n }\n return res;\n }",
"private static byte[] compress(final String str) throws IOException {\n if (str == null) {\n return null;\n }\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n try (GZIPOutputStream gzip = new GZIPOutputStream(outputStream)) {\n gzip.write(str.getBytes(StandardCharsets.UTF_8));\n }\n return outputStream.toByteArray();\n }",
"public abstract byte[] toByteArray();",
"public abstract byte[] toByteArray();",
"public static byte[] compress(final String text) throws IOException {\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n GZIPOutputStream gzipOutputStream = null;\n\n try {\n gzipOutputStream = new GZIPOutputStream(outputStream);\n gzipOutputStream.write(text.getBytes());\n gzipOutputStream.close();\n\n return outputStream.toByteArray();\n }\n finally {\n IOUtils.closeQuietly(gzipOutputStream);\n IOUtils.closeQuietly(outputStream);\n }\n }",
"public abstract byte[] encode () throws IOException;",
"public static char[] encode(byte[] in) {\r\n \t\treturn encode(in, in.length);\r\n \t}",
"public void write(byte[] buffer);",
"void writeBytes(byte[] value);",
"void write(byte b[]) throws IOException;",
"protected static byte[] m5338a(byte[] bArr) {\n byte[] bArr2 = null;\n try {\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n GZIPOutputStream gZIPOutputStream = new GZIPOutputStream(byteArrayOutputStream);\n gZIPOutputStream.write(bArr);\n gZIPOutputStream.finish();\n gZIPOutputStream.close();\n bArr2 = byteArrayOutputStream.toByteArray();\n byteArrayOutputStream.close();\n return bArr2;\n } catch (Exception e) {\n return bArr2;\n }\n }",
"public static byte[] encode(byte[] bytes){\n\t\treturn encode(bytes, false);\n\t}",
"public static byte[] compressFile(File inFile) throws IOException, CompressorException {\n if(inFile==null) {\n throw new IllegalArgumentException(\"Null value for inFile\");\n }\n if( FileUtils.verifyFile(inFile.getAbsolutePath()) ) {\n throw new IllegalArgumentException(\"Unable to access file=\"+inFile.getAbsolutePath());\n }\n SyncCompressInMemory compress = SyncCompressInMemory.newCompression();\n compress.write(org.apache.commons.io.FileUtils.readFileToString(inFile, Charset.defaultCharset()));\n compress.close();\n return compress.getByteArray();\n }",
"public final static byte[] _encode(byte[] byteData) {\n\tif (byteData == null) {\n\t throw new IllegalArgumentException(\"byteData cannot be null\");\n\t}\n\n\t/*\n\t * Declare working variables including an array of bytes that will contain the encoded data to be returned to the caller. Note that the encoded array is about 1/3 larger than the input. This\n\t * is because every group of 3 bytes is being encoded into 4 bytes.\n\t */\n\tint iSrcIdx; // index into source (byteData)\n\tint iDestIdx; // index into destination (byteDest)\n\t// byte[] byteData = (byte[])byteData_in.clone();\n\t// byte[] byteData = byteData_in;\n\tbyte[] byteDest = new byte[((byteData.length + 2) / 3) * 4];\n\n\t/*\n\t * Walk through the input array, 24 bits at a time, converting them from 3 groups of 8 to 4 groups of 6 with two unset bits between. as per Base64 spec see\n\t * http://www.javaworld.com/javaworld/javatips/jw-javatip36-p2.html for example explanation\n\t */\n\tfor (iSrcIdx = 0, iDestIdx = 0; iSrcIdx < byteData.length - 2; iSrcIdx += 3) {\n\t byteDest[iDestIdx++] = (byte) ((byteData[iSrcIdx] >>> 2) & 077);\n\t byteDest[iDestIdx++] = (byte) ((byteData[iSrcIdx + 1] >>> 4) & 017 | (byteData[iSrcIdx] << 4) & 077);\n\t byteDest[iDestIdx++] = (byte) ((byteData[iSrcIdx + 2] >>> 6) & 003 | (byteData[iSrcIdx + 1] << 2) & 077);\n\t byteDest[iDestIdx++] = (byte) (byteData[iSrcIdx + 2] & 077);\n\t}\n\n\t/*\n\t * If the number of bytes we received in the input array was not an even multiple of 3, convert the remaining 1 or 2 bytes.\n\t */\n\tif (iSrcIdx < byteData.length) {\n\t byteDest[iDestIdx++] = (byte) ((byteData[iSrcIdx] >>> 2) & 077);\n\t if (iSrcIdx < byteData.length - 1) {\n\t\tbyteDest[iDestIdx++] = (byte) ((byteData[iSrcIdx + 1] >>> 4) & 017 | (byteData[iSrcIdx] << 4) & 077);\n\t\tbyteDest[iDestIdx++] = (byte) ((byteData[iSrcIdx + 1] << 2) & 077);\n\t } else\n\t\tbyteDest[iDestIdx++] = (byte) ((byteData[iSrcIdx] << 4) & 077);\n\t}\n\n\t/*\n\t * Use the encoded data as indexes into the Base64 alphabet. (The Base64 alphabet is completely documented in RFC 1521.)\n\t */\n\tfor (iSrcIdx = 0; iSrcIdx < iDestIdx; iSrcIdx++) {\n\t if (byteDest[iSrcIdx] < 26)\n\t\tbyteDest[iSrcIdx] = (byte) (byteDest[iSrcIdx] + 'A');\n\t else if (byteDest[iSrcIdx] < 52)\n\t\tbyteDest[iSrcIdx] = (byte) (byteDest[iSrcIdx] + 'a' - 26);\n\t else if (byteDest[iSrcIdx] < 62)\n\t\tbyteDest[iSrcIdx] = (byte) (byteDest[iSrcIdx] + '0' - 52);\n\t else if (byteDest[iSrcIdx] < 63)\n\t\tbyteDest[iSrcIdx] = '+';\n\t else\n\t\tbyteDest[iSrcIdx] = '/';\n\t}\n\n\t/* Pad any unused bytes in the destination string with '=' characters. */\n\tfor (; iSrcIdx < byteDest.length; iSrcIdx++)\n\t byteDest[iSrcIdx] = '=';\n\n\treturn byteDest;\n }",
"public abstract void write(byte[] b);",
"public InputStreamToByteArray(byte buf[]) {\n this(buf, 0, buf.length);\n }",
"public byte[] marshall();",
"public native byte[] __byteArrayMethod( long __swiftObject, byte[] arg );",
"public void writeSmall(byte[] b) {\n if (b.length<12)\n try {\n throw new IOException();\n } catch (IOException e) {\n e.printStackTrace();\n }\n //Write compressed array//\n int i=0;\n for (; i< 12 ; i++) //maze dimensions + start/goal\n write(b[i]);\n while (i<b.length){\n byte cell=b[i++];\n for (int j =0 ; j<7; j++){\n if (i<b.length)\n cell=(byte)((cell<<1)|b[i++]);\n else\n cell=(byte)((cell << 1));\n }\n write(cell);\n }\n }",
"public static void main(String[] args) {\n char[] ch={'a','a','b','b','c','c','d'};\n System.out.println(compress(ch));\n }",
"public static byte[] bytesToZipBytes(final List<Pair<String, byte[]>> contents) throws IOException {\n\n if (contents == null || contents.isEmpty()) {\n throw new IllegalArgumentException(\"Bytes must not be null\");\n }\n\n // Non zip file, needs to be zipped\n final ByteArrayOutputStream baos = new ByteArrayOutputStream();\n final ZipOutputStream zos = new ZipOutputStream(baos);\n for (final Pair<String, byte[]> content : contents) {\n appendBytes(zos, null, content.getFirst(), content.getSecond());\n }\n zos.close();\n\n return baos.toByteArray();\n\n }",
"public void write( byte[] array, int firstIndex,\n\t\t\tint count );",
"public static byte[] b(int... array) {\n if (array == null) {\n return null;\n }\n byte[] ret = new byte[array.length];\n for (int i = 0; i < ret.length; i++) {\n ret[i] = (byte) array[i];\n }\n return ret;\n }",
"public byte[] resizeScanBytes(byte[] byteScan) throws IOException {\n try (FileOutputStream fos = new FileOutputStream(\"E:\\\\EVENTREMAINDER\\\\temp.jpg\")) {\r\n fos.write(byteScan);\r\n fos.close();\r\n }\r\n File input = new File(\"E:\\\\EVENTREMAINDER\\\\temp.jpg\");\r\n BufferedImage image = ImageIO.read(input);\r\n\r\n File compressedImageFile = new File(\"compress.jpg\");\r\n OutputStream os = new FileOutputStream(compressedImageFile);\r\n\r\n Iterator<ImageWriter> writers = ImageIO.getImageWritersByFormatName(\"jpg\");\r\n ImageWriter writer = (ImageWriter) writers.next();\r\n\r\n ImageOutputStream ios = ImageIO.createImageOutputStream(os);\r\n writer.setOutput(ios);\r\n\r\n ImageWriteParam param = writer.getDefaultWriteParam();\r\n\r\n // ustawienie stopnia kompresji\r\n param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);\r\n param.setCompressionQuality(0.1f);\r\n writer.write(null, new IIOImage(image, null, null), param);\r\n os.close();\r\n ios.close();\r\n writer.dispose();\r\n\r\n // zamieniam na byte\r\n Path path = Paths.get(\"E:\\\\EVENTREMAINDER\\\\temp.jpg\");\r\n byte[] data = Files.readAllBytes(path);\r\n\r\n return data;\r\n }",
"protected abstract byte[] encode(Object o) throws EncoderException;",
"public byte[] toCompressedBytes() {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tDataOutputStream dos = new DataOutputStream(baos);\n \ttry {\n \t\t// write the type string first\n \t\tdos.writeUTF(Types.GPS);\n \t\tdos.writeLong(this.getTimestamp());\n \t\t// JWS - using flongs to compress\n \t\tdos.writeLong(FixedPointLong.stringToFlong(loc.getLatitudeAsString()));\n \t\tdos.writeLong(FixedPointLong.stringToFlong(loc.getLongitudeAsString()));\n \t\tfor(int i=0;i<gpsTypes.length;i++) {\n \t\t\tString s = (String) entries.get(gpsTypes[i]);\n \t\t\tdos.writeUTF(s);\n \t\t}\n \t\n \tdos.close();\n \t} catch(IOException ioe) {\n \t\t//ioe.printStackTrace();\n \t\treturn null; \n \t} catch(FixedPointLongException fple) {\n \t return null;\n \t}\n \treturn baos.toByteArray();\n }",
"public static int compress(char[] chars) {\n int anchor = 0, write = 0;\n for (int read = 0; read < chars.length; read++){\n if (read + 1 == chars.length || chars[read + 1] != chars[read]){\n chars[write++] = chars[anchor];\n if (read > anchor) {\n// Integer.toString(read-anchor + 1)\n for (char c: (\"\" + (read - anchor + 1)).toCharArray()){\n chars[write++] = c;\n }\n }\n anchor = read + 1;\n }\n }\n return write;\n }",
"public static byte[] compress_jpeg(BufferedImage image,float quality) throws IOException\n {\n ByteArrayOutputStream compressed = new ByteArrayOutputStream();\n ImageOutputStream outputStream = ImageIO.createImageOutputStream(compressed);\n\n // NOTE: The rest of the code is just a cleaned up version of your code\n\n // Obtain writer for JPEG format\n ImageIO.setUseCache(false);\n ImageWriter jpgWriter = ImageIO.getImageWritersByFormatName(\"jpg\").next();\n\n // Configure JPEG compression: 70% quality\n ImageWriteParam jpgWriteParam = jpgWriter.getDefaultWriteParam();\n jpgWriteParam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);\n jpgWriteParam.setCompressionQuality(quality);\n\n // Set your in-memory stream as the output\n jpgWriter.setOutput(outputStream);\n\n // Write image as JPEG w/configured settings to the in-memory stream\n // (the IIOImage is just an aggregator object, allowing you to associate\n // thumbnails and metadata to the image, it \"does\" nothing)\n jpgWriter.write(null, new IIOImage(image, null, null), jpgWriteParam);\n\n // Dispose the writer to free resources\n jpgWriter.dispose();\n\n // Get data for further processing...\n byte[] jpegData = compressed.toByteArray();\n return jpegData;\n }",
"public void write_to_buffer(byte[] buffer) throws IOException {\r\n ByteArrayOutputStream byte_out = new ByteArrayOutputStream(buffer.length);\r\n DataOutputStream out = new DataOutputStream(byte_out);\r\n\r\n write_to_buffer(out);\r\n\r\n byte[] bytes = byte_out.toByteArray();\r\n for (int i = 0; i < buffer.length; ++i) {\r\n buffer[i] = bytes[i];\r\n }\r\n\r\n out.close();\r\n byte_out.close();\r\n }",
"public void writeBig (byte[] b) {\n if (b.length<12)\n try {\n throw new IOException();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n Map<String,Integer> codes = new LinkedHashMap<>();\n ArrayList<Pair<Integer,Integer>> array = new ArrayList<>();\n int arrIndex=0;\n array.add(arrIndex++,new Pair<>(0,0));\n int k=12;\n codes.put(String.valueOf(b[k]),arrIndex);\n array.add(arrIndex++,new Pair((int)b[k++],0));\n\n for (; k<b.length; k++){\n int pointer=0;\n String current = String.valueOf(b[k]);\n while (codes.containsKey(current) && k<b.length-1){\n pointer=codes.get(current);\n k++;\n current+=String.valueOf(b[k]);\n }\n if (codes.containsKey(current) && k==b.length-1) {\n array.add(arrIndex, new Pair(2, codes.get(current)));\n codes.put(current,arrIndex);\n }\n else{\n array.add(arrIndex,new Pair((int)b[k],pointer));\n codes.put(current,arrIndex++);\n }\n }\n\n //Write compressed array//\n for (int i=0; i< 12 ; i++) //maze dimensions + start/goal\n write(b[i]);\n int pointerSize= array.size()>128 ? (array.size()>32768 ? 3 : 2) : 1; // how many bytes to represent the pointer\n write(pointerSize);\n// System.out.println(\"DEBUG : array size:\" + array.size()+\" unit size: \"+(pointerSize+1)); //DEBUGGING\n for (Pair<Integer, Integer> Pair : array) { //send array\n byte cell = (byte) (Pair.getKey()<<7);\n cell = (byte) (cell | (Pair.getValue()>>(8*(pointerSize-1))));\n write(cell);\n for (int j = pointerSize - 2; j >= 0; j--) {\n cell=(byte) (Pair.getValue() >> 8 * j);\n write(cell);\n }\n }\n write(array.get(array.size()-1).getKey()); //last cell key (0/1/2)\n //Finish writing compressed array//\n }",
"public byte[] doEncoding(byte[] bArr) {\r\n return bArr == null ? null : Base64.encodeBase64(bArr);\r\n }",
"public void write(byte b[], int off, int len) throws IOException;",
"private void compressArchive() throws Exception {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"Compressing archive: \" + path);\n\t\t}\n\n\t\tFileOutputStream fout = new FileOutputStream(path + \".gz\");\n\t\tGZIPOutputStream gout = new GZIPOutputStream(fout);\n\t\tFileInputStream fin = new FileInputStream(path);\n\t\tbyte[] buf = new byte[blockSize];\n\t\tint len;\n\t\twhile ((len = fin.read(buf)) > 0) {\n\t\t\tgout.write(buf, 0, len);\n\t\t}\n\t\tfin.close();\n\n\t\t// flush and close gzip file\n\t\tgout.finish();\n\t\tgout.close();\n\n\t\t// unlink original archive\n\t\tFile file = new File(path);\n\t\tfile.delete();\n\t}",
"public static byte[] toCompressedByteArray(Bitmap bitmap, int quality) {\n return toCompressedByteArray(bitmap, quality, Bitmap.CompressFormat.JPEG);\n }",
"private byte[] decompress(byte[] content) throws IOException {\n ByteArrayInputStream bais = new ByteArrayInputStream(content);\n try (GZIPInputStream is = new GZIPInputStream(bais)) {\n return IOUtils.toByteArray(is);\n }\n }",
"byte[] serialize(Serializable object);",
"public abstract byte[] toBytes() throws Exception;",
"public abstract byte[] getEncoded();",
"public static byte[] encode(ArrayList<Integer> nums)\n {\n //ArrayList<Byte> byteStream = new ArrayList<Byte>();\n int totalSize = 0;\n for(int i=0;i<nums.size();i++)\n {\n int n = nums.get(i);\n int sizeReq = 1;\n if(n < Math.pow(2, 7))\n sizeReq = 1;\n else if(n < Math.pow(2, 14))\n sizeReq = 2;\n else if(n < Math.pow(2, 21))\n sizeReq = 3;\n else if(n < Math.pow(2, 28))\n sizeReq = 4;\n totalSize += sizeReq;\n }\n byte totalArray[] = new byte[totalSize];\n int c = 0;\n for(int i=0;i<nums.size();i++)\n {\n byte array[] = encode(nums.get(i));\n //byteStream.addAll(array);\n for(int j=0;j<array.length;j++)\n totalArray[c++] = array[j];\n }\n return totalArray;\n }",
"List<File> compress(File directory, int size);",
"void mo12206a(byte[] bArr);",
"List<CompressResult> compress(Path input, Path output, int maxSizeInMB) throws IOException;",
"byte[] encrypt(final byte[] dataToEncrypt) throws RegBaseCheckedException;",
"@Override\r\n public void write(byte[] b) throws IOException {\r\n int rows = (Byte.toUnsignedInt(b[0])*255) + Byte.toUnsignedInt(b[1]);\r\n int cols = (Byte.toUnsignedInt(b[2])*255) + Byte.toUnsignedInt(b[3]);\r\n int compressed_size = 12 + (((rows*cols)) / 8);\r\n if ((rows*cols) % 8 != 0)\r\n compressed_size++;\r\n\r\n byte[] to_return = new byte[compressed_size];\r\n System.arraycopy(b,0,to_return,0,12);\r\n String s1=\"\";\r\n int j=0;\r\n int index=12;\r\n //go through the body of the maze\r\n for(int i=12; i<b.length; i++){\r\n //reached end of chunk\r\n if(j==8){\r\n byte temp=(byte)Integer.parseInt(s1,2);\r\n to_return[index]=temp;\r\n index++;\r\n s1=Integer.toString(b[i]);\r\n j=1;\r\n if(i==b.length-1){\r\n //s1+=Integer.toString(b[i]);\r\n byte temp1=(byte)Integer.parseInt(s1,2);\r\n to_return[index]=temp1;\r\n }\r\n }\r\n else if(j != 8 && i==b.length-1){ //remaining in case doesn't divide in 7 completely\r\n s1+=Integer.toString(b[i]);\r\n byte temp=(byte)Integer.parseInt(s1,2); //turns from binary string to byte(0-127)\r\n to_return[index]=temp;\r\n }\r\n else{\r\n s1+=Integer.toString(b[i]);\r\n j++;\r\n }\r\n }\r\n try{\r\n if(this.out instanceof ObjectOutputStream){\r\n ObjectOutputStream o=(ObjectOutputStream)this.out;\r\n o.writeObject(to_return);\r\n }\r\n else {\r\n out.write(to_return);\r\n }\r\n }\r\n catch(Exception e){\r\n e.printStackTrace();\r\n }\r\n\r\n }",
"@Test\n public void compressAndDecompress() throws IOException {\n byte[] compressed = Utils.compress(\"123a\");\n String decompressed = Utils.decompress(compressed);\n Assert.assertEquals(\"123a\", decompressed);\n }",
"private String compressString(String input) throws IOException {\n\t\tByteArrayOutputStream output = new ByteArrayOutputStream();\n\t\tGZIPOutputStream gzip = new GZIPOutputStream(output);\n\n\t\tgzip.write(input.getBytes(\"UTF-8\"));\n\t\tgzip.close();\n\t\toutput.close();\n\n\t\treturn Base64.encodeBase64String(output.toByteArray());\n\t}",
"public static byte[] concatBytes(byte[] ...bytes) throws IOException\n {\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n for(byte[] b : bytes){\n output.write(b);\n }\n return output.toByteArray();\n \n }",
"public void write(byte b[]) throws IOException\n {\n checkThreshold(b.length);\n getStream().write(b);\n written += b.length;\n }",
"@Test\r\n\tpublic void testCompressing() throws ClassNotFoundException,\r\n\t\t\tInstantiationException, IllegalAccessException {\n\r\n\t\tAbstractStream abstractStream = Factory\r\n\t\t\t\t.getStream(\"by.bsu.decorator.bean.FileStream\");\r\n\t\tCompressingStream stream = (CompressingStream) Factory\r\n\t\t\t\t.getStream(\"by.bsu.decorator.bean.CompressingStream\");\r\n\t\tstream.setAbstractStream(abstractStream);\r\n\t\tString str = stream.handleBufferFull();\r\n\r\n\t\tbyte[] b = new byte[10];\r\n\t\tfor (int i = 0; i < 10; i++)\r\n\t\t\tb[i] = (byte) i;\r\n\t\tstream.putByte(b);\r\n\t\tSystem.out.println(str);\r\n\t\tassertEquals(\"Compressing Stream. File Stream. \", str);\r\n\t}",
"private void compress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tZipOutputStream rfoFile = new ZipOutputStream(new FileOutputStream(path + fileName)); \n\t\t\tFile dirToZip = new File(rfoDir); \n\t\t\tString[] fileList = dirToZip.list(); \n\t\t\tbyte[] buffer = new byte[4096]; \n\t\t\tint bytesIn = 0; \n\n\t\t\tfor(int i=0; i<fileList.length; i++) \n\t\t\t{ \n\t\t\t\tFile f = new File(dirToZip, fileList[i]); \n\t\t\t\tFileInputStream fis = new FileInputStream(f); \n\t\t\t\tString zEntry = f.getPath();\n\t\t\t\t//System.out.println(\"\\n\" + zEntry);\n\t\t\t\tint start = zEntry.indexOf(uniqueName);\n\t\t\t\tzEntry = zEntry.substring(start + uniqueName.length() + 1, zEntry.length());\n\t\t\t\t//System.out.println(tempDir);\n\t\t\t\t//System.out.println(zEntry + \"\\n\");\n\t\t\t\tZipEntry entry = new ZipEntry(zEntry); \n\t\t\t\trfoFile.putNextEntry(entry); \n\t\t\t\twhile((bytesIn = fis.read(buffer)) != -1) \n\t\t\t\t\trfoFile.write(buffer, 0, bytesIn); \n\t\t\t\tfis.close();\n\t\t\t}\n\t\t\trfoFile.close();\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.compress(): \" + e);\n\t\t}\n\t}",
"private byte[] encode(byte[] msg) {\r\n\t\treturn Base64.encode(msg);\r\n\t}",
"private byte[] concateByteArray(byte[] firstarray, byte[] secondarray){\r\n\tbyte[] output = new byte[firstarray.length + secondarray.length];\r\n\tint i=0;\r\n\tfor(i=0;i<firstarray.length;i++){\r\n\t output[i] = firstarray[i];\r\n\t}\r\n\tint index=i;\r\n\tfor(i=0;i<secondarray.length;i++){\r\n\t output[index] = secondarray[i];\r\n\t index++;\r\n\t}\r\n\treturn output;\r\n}",
"public abstract void writeBytes(byte[] b, int offset, int length) throws IOException;",
"public BigInteger[] encrypt(byte[] bytes) {\n BigInteger[] biResults = new BigInteger[bytes.length];\n for (int i = 0; i < bytes.length; i++) {\n byte b = bytes[i];\n biResults[i] = encrypt(BigInteger.valueOf(b));\n }\n return biResults;\n }",
"@Override\n public void write(final byte[] data) throws IOException {\n write(data, 0, data.length);\n }",
"ByteArray(byte []a) {\n\tdata = a;\n }",
"@Override\n public void write (byte[] b) throws IOException {\n byte currByte = b[b[0] + 1];\n int counter = 0;\n for (int i = 0; i < b[0] + 1; i++) {\n out.write(b[i]);\n }\n for (int i = b[0] + 1; i < b.length; i++) {\n if (currByte == 0 && b[i] == 1 || currByte == 1 && b[i] == 0) {\n if (counter <= 255) {\n out.write((byte) counter);\n } else {\n OutOfByteSize(counter);\n }\n counter = 1;\n currByte = b[i];\n } else {\n counter++;\n }\n }\n\n }",
"public static byte[] toCompressedByteArray(Bitmap bitmap, int quality, Bitmap.CompressFormat format) {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n bitmap.compress(format, quality, stream);\n return stream.toByteArray();\n }",
"public void write(byte[] data, long offset);",
"void write(byte[] buffer, int bufferOffset, int length) throws IOException;",
"public void write(byte[] b) throws IOException {\n\t\tbaos.writeBytes(b);\n\t}",
"@Override\n public void write(byte[] b_array) throws IOException {\n int i;\n int flag = 1;\n int my_decimal1=0;\n for (i = 0; i < 12; i++) {\n out.write(b_array[i]);\n }\n //write to output stream the rest of the bytearray's size - division 8\n int rest = (b_array.length - 12) % 8;\n out.write((byte) rest);\n\n\n while (i < b_array.length) {\n //start to count the number of 0\n if (i < b_array.length - rest) {\n for (int j = 0; j < 8; j++) {\n //check if we not in the rest part of the byte array\n if (i < b_array.length - rest) {\n //my_str = String.valueOf((int)b_array[i]);\n my_decimal1 += (int)b_array[i]*(Math.pow(2, j));\n i++;\n }\n else {\n flag = 0;\n break;\n }\n }\n }\n else{\n flag=0;\n }\n //if the for loop finish without break;\n if (flag == 1) {\n out.write((byte) my_decimal1);\n my_decimal1 = 0;\n }\n else {\n out.write(b_array[i]);\n i++;\n }\n }\n\n //>>\n\n\n }",
"private byte[] increment(byte[] array) {\n for (int i = array.length - 1; i >= 0; --i) {\n byte elem = array[i];\n ++elem;\n array[i] = elem;\n if (elem != 0) { // Did not overflow: 0xFF -> 0x00\n return array;\n }\n }\n return null;\n }",
"public byte[] serialize();",
"@Override\n\t public synchronized int write(ByteBuffer src) throws IOException {\n assert src.hasArray();\n\n int len = src.remaining();\n if (len > 0) {\n int pos = src.position();\n out.write(src.array(), src.arrayOffset() + pos, len);\n ((Buffer)src).position(pos + len);\n }\n return len;\n }",
"public byte[] toByteArray() {\n/* 510 */ ByteBuffer buff = ByteBuffer.allocate(40).order(ByteOrder.LITTLE_ENDIAN);\n/* 511 */ writeTo(buff);\n/* 512 */ return buff.array();\n/* */ }",
"@Override\n public void write(byte[] data) throws IOException {\n for (int i = 0; i < data.length; i++) {\n write(data[i]);\n }\n }",
"public static final byte[] encryptData(final byte data[]) {\n\n for (int j = 0; j < 6; j++) {\n byte remember = 0;\n byte dataLength = (byte) (data.length & 0xFF);\n // printByteArray(data);\n if (j % 2 == 0) {\n for (int i = 0; i < data.length; i++) {\n byte cur = data[i];\n cur = BitTools.rollLeft(cur, 3);\n cur += dataLength;\n cur ^= remember;\n remember = cur;\n cur = BitTools.rollRight(cur, (int) dataLength & 0xFF);\n cur = ((byte) ((~cur) & 0xFF));\n cur += 0x48;\n dataLength--;\n data[i] = cur;\n }\n } else {\n for (int i = data.length - 1; i >= 0; i--) {\n byte cur = data[i];\n cur = BitTools.rollLeft(cur, 4);\n cur += dataLength;\n cur ^= remember;\n remember = cur;\n cur ^= 0x13;\n cur = BitTools.rollRight(cur, 3);\n dataLength--;\n data[i] = cur;\n }\n }\n //System.out.println(\"enc after iteration \" + j + \": \" + HexTool.toString(data) + \" al: \" + al);\n }\n return data;\n }",
"@Override\n public void write(byte[] buf, int offset, int size) throws IOException;",
"private void serviceGZipCompressed(Connection conn) \n throws IOException {\n conn.getResponse().setContentType(getContnentType().getMimeType());\n conn.getResponse().setHeader(\"Content-Encoding\", \"gzip\");\n conn.getOutputStream().write(gzipContent);\n }",
"public static final byte[] uncompress(final byte[] compressed) throws IOException {\n\n ByteArrayInputStream bais = new ByteArrayInputStream(compressed);\n GZIPInputStream gunzip = new GZIPInputStream(bais);\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n int len = 0;\n byte[] tempBytes = new byte[DEFAULT_BUFFER_SIZE];\n while ((len = gunzip.read(tempBytes, 0, tempBytes.length)) != -1) {\n baos.write(tempBytes, 0, len);\n }\n\n return baos.toByteArray();\n }",
"public void write(final byte[] b) throws IOException {\n\t\twrite(b, 0, b.length);\n\t}",
"public static byte[] compressReference(Reference dto) {\r\n\t\ttry {\r\n\t\t\treturn JDOSecondaryPropertyUtils.compressObject(X_STREAM, dto);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new IllegalArgumentException(e);\r\n\t\t}\r\n\t}",
"public void writeBinaryArr(byte[] bytes, String filename, String dest) throws IOException {\n\t\tConfiguration conf = this.getConfig();\r\n\r\n\t\tFileSystem fileSystem = FileSystem.get(conf);\r\n\t\t// Create the destination path including the filename.\r\n\t\tif (dest.charAt(dest.length() - 1) != '/') {\r\n\t\t\tdest = dest + \"/\" + filename;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdest = dest + filename;\r\n\t\t}\r\n\r\n\t\t// Check if the file already exists\r\n\t\tPath path = new Path(dest);\r\n\t\tif (fileSystem.exists(path)) {\r\n\t\t\tSystem.out.println(\"File \" + dest + \" already exists\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Create a new file and write data to it.\r\n\t\tFSDataOutputStream out = fileSystem.create(path);\r\n\r\n\t\tout.write(bytes);\r\n\t\tout.close();\r\n\t}",
"public FastBytesOutputStream(int size) \r\n {\r\n \tbuf = new byte[size];\r\n }",
"byte[] getBytes();"
] |
[
"0.75386703",
"0.75070834",
"0.6864196",
"0.6785783",
"0.66676646",
"0.6352923",
"0.5977097",
"0.59370357",
"0.58528614",
"0.584832",
"0.5806848",
"0.5788821",
"0.57337445",
"0.56762",
"0.560887",
"0.55941725",
"0.55817115",
"0.5496655",
"0.5495921",
"0.5490827",
"0.5468545",
"0.5436811",
"0.54049414",
"0.5394203",
"0.5364056",
"0.5335359",
"0.53222847",
"0.53222847",
"0.5319083",
"0.53162986",
"0.527136",
"0.5239376",
"0.52153164",
"0.5208262",
"0.52074283",
"0.51992875",
"0.5187301",
"0.51725864",
"0.5154916",
"0.5153181",
"0.5140384",
"0.51356405",
"0.5132803",
"0.5132408",
"0.5088971",
"0.5062268",
"0.5043302",
"0.5042719",
"0.50382024",
"0.5029502",
"0.49988386",
"0.49851853",
"0.4962758",
"0.4960447",
"0.49588063",
"0.49567524",
"0.49428722",
"0.4942795",
"0.4942759",
"0.49403247",
"0.49390936",
"0.49291906",
"0.49273193",
"0.4901266",
"0.48999447",
"0.4899362",
"0.48968154",
"0.4892886",
"0.4889009",
"0.4884612",
"0.48715585",
"0.48695377",
"0.48692462",
"0.48534653",
"0.48498395",
"0.48447526",
"0.48380727",
"0.4832418",
"0.48292914",
"0.48191336",
"0.47934625",
"0.47737253",
"0.47657156",
"0.47480345",
"0.47472855",
"0.4741567",
"0.474103",
"0.47397596",
"0.47334465",
"0.47260818",
"0.4721534",
"0.47140315",
"0.47096166",
"0.46976405",
"0.46966255",
"0.46962154",
"0.4695752",
"0.4686914",
"0.46827003",
"0.46772015"
] |
0.65223116
|
5
|
WHEN THIS METHOD IS CALLED THE 'MAIN MENU' LABEL WILL CHANGE COLOR WHEN THE MOUSE IS HOVERING OVER IT
|
@FXML
public void highlightMainMenu()
{
mainMenuButton.setOnMouseEntered(mouseEvent -> mainMenuButton.setTextFill(Color.valueOf("#FFD700")));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n if(type == \"close\"){//if the close button is being edited\n button.setBackground(new Color(237,64,64));//colour chosen for the \n }\n if(type == \"scale\"){//if the fullscreen button is being edited\n button.setBackground(coloursObject.getMenuPanelColour());\n }\n }",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t}",
"@Override\n public void mouseEntered(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.BLUE);\n levelPanel.setCursor(new Cursor(Cursor.HAND_CURSOR));\n }",
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n }",
"@Override\n\tpublic void mouseEntered(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.orange);\n\t\t\n\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.blue);\n\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(new Color(150,190,200));//蓝色\n\t}",
"@FXML\n public void resetMainMenu()\n {\n mainMenuButton.setOnMouseExited(mouseEvent -> mainMenuButton.setTextFill(Color.WHITE));\n }",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t}",
"@Override\n public void mouseExited(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.black);\n levelPanel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.RED);\n\t}",
"@FXML\n public void subMenuButtonDarkenColor(Event mouseEvent){\n Button thisButton = (Button) mouseEvent.getSource();\n thisButton.setStyle(\"-fx-background-color: #\" + darkenSubMenuButtonColor);\n }",
"@Override\n\tpublic void mouseExited(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.black);\n\t}",
"public void mouseExited(MouseEvent e) {\n\t\t\tJLabel button = (JLabel)e.getSource();\n\t\t\tif(hovered != null && button != activeButton){\n\t\t\t\tbutton.setBackground(MENU_COLOR);\n\t\t\t\thovered = null;\n\t\t\t}\n\t\t\t\n\t\t}",
"@FXML\n public void subMenuButtonResetColor(Event mouseEvent){\n Button thisButton = (Button) mouseEvent.getSource();\n thisButton.setStyle(\"-fx-background-color: #\" + standardSubMenuButtonColor);\n }",
"@Override\r\n\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.black);\n\t}",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.BLACK);\n\t}",
"@Override\n\tpublic void mouseExited(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.BLACK);\n\t\t\n\t}",
"@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\t\t\n\t\tview.highlightMenu(SwingUtilities.convertPoint(this, e.getPoint(), view));\n\t\t\n\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n Play.setForeground(Color.blue);\r\n\t\t\t\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n button.setBackground(coloursObject.getTitlePanelColour());\n }",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\tsetPanelColor(homePanel);\n\t\t\t\tsidePanelInterface.setPanel(\"homePanel\");\n\t\t\t}",
"@Override\n public void menuSelected(MenuEvent e) {\n \n }",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.blue);\r\n\t\t\t\t}",
"private void btn_HomeMousePressed(java.awt.event.MouseEvent evt) {\n setcolor(btn_Home);\n ind1.setOpaque(true);\n resetcolor(new JPanel[]{btn_anak,btn_transaksi}, new JPanel[]{ind2,ind3});\n \n \n MainParent Mp = new MainParent();\n MainParent.txt_auto.setText(anakP.txt_auto.getText());\n Mp.setVisible(true);\n hide();\n\n }",
"@Override\n public void mouseEntered(MouseEvent e) {\n setBorderPainted(true);\n setForeground(Color.RED);\n }",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tif(e.getSource() == start)\n\t\t\tstart.setForeground(new Color(206, 124, 24));\n\t}",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n }",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tif(e.getSource() == start)\n\t\t\tstart.setForeground(Color.red);\n\t}",
"@Override\r\n\t\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.DARK_GRAY);\r\n\t\t\t\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jLabel = (JLabel)e.getSource() ;\n\t\tjLabel.setForeground(Color.black) ;\n\t\tjLabel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)) ;\n\t}",
"@Override\r\n public void mousePressed(MouseEvent e) {\n setBackground(Color.BLUE);\r\n \r\n \r\n }",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent me)\n\t{\n\t\tif (me.getSource() == help1)\n\t\t{\n\t\t\tusernameSelect.setForeground(Color.BLACK);\n\t\t\tfullnameSelect.setForeground(Color.BLACK);\n\t\t\tfirstNameSelect.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help2)\n\t\t{\n\t\t\ttitleInput.setBackground(Color.WHITE);\n\t\t\twfurlInput.setBackground(Color.WHITE);\n\t\t}\n\t\telse if (me.getSource() == help3)\n\t\t{\n\t\t\ttypeLabel.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help4)\n\t\t{\n\t\t\tintroLabel.setForeground(Color.BLACK);\n\t\t\tloadIntroImg.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help5)\n\t\t{\n\t\t\tloadMainImg.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help6)\n\t\t{\n\t\t\tinstructions6.setForeground(Settings.SITE_GREEN);\n\t\t}\n\t}",
"@FXML\n public void highlightMultiplayer()\n {\n multiplayerButton.setOnMouseEntered(mouseEvent -> multiplayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@Override\n\tpublic void itemStateChanged(ItemEvent evt) {\n\t\tColor levelColor = null;\n\t\tCardLayout cl = (CardLayout) pnlLevelSwitch.getLayout();\n\t\tcl.show(pnlLevelSwitch, (String) evt.getItem());\n\t\t\n\t\tString string = (String) evt.getItem();\n\t\t\n\t\tif(string.equals(\"Puzzle\")){\n\t\t\tlevelColor = new Color(102,255,102);\n\t\t}\n\t\telse if(string.equals(\"Lightning\")){\n\t\t\tlevelColor = Color.ORANGE;\n\t\t}\n\t\telse if(string.equals(\"Theme\")){\n\t\t\tlevelColor = Color.PINK;\n\t\t}\n\t\tthis.setBackground(levelColor);\n\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(final ActionEvent evt) {\n\t\t\t\tif (evt.getSource() == jMenuItem9) {\n\t\t\t\t\tSystem.out.println(\"Selected: \"\n\t\t\t\t+ evt.getActionCommand());\n\t\t\t\t\t/*\n\t\t\t\t\t((Echiquier) panelChess\n\t\t\t\t\t.getComponents()[0])\n\t\t\t\t\t.setLightColor(Color.black);*/\n\t\t\t\t}\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t\t\tPlay.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent me) \n\t{\n\t\tif (me.getSource() == help1)\n\t\t{\n\t\t\tusernameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfullnameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfirstNameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help2)\n\t\t{\n\t\t\ttitleInput.setBackground(Settings.SITE_ORANGE);\n\t\t\twfurlInput.setBackground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help3)\n\t\t{\n\t\t\ttypeLabel.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help4)\n\t\t{\n\t\t\tintroLabel.setForeground(Settings.SITE_ORANGE);\n\t\t\tloadIntroImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help5)\n\t\t{\n\t\t\tloadMainImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help6)\n\t\t{\n\t\t\tinstructions6.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.red);\r\n\t\t\t\t}",
"@Override\r\n\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\tComponent com = (Component)e.getSource(); //마우스가 올라간 컴포넌트 알아냄.\r\n\t\t\tcom.setBackground(Color.GRAY);\r\n\t\t}",
"private void applyStyle() {\n\t\tmenu.getStyleClass().add(menuColor);\n\t}",
"public void setupHoverMainMenuButtons(){\n ingredBtn.hoverProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observableValue, Boolean notHover, Boolean hover) {\n if (hover){\n //increase the drop shadow effect if the mouse is hovering over the button\n InterfaceStyling.dropShadowSelect(ingredBtn);\n } else {\n //decrease the drop shadow effect if the mouse is no longer hovering over the button\n InterfaceStyling.dropShadowDeselect(ingredBtn);\n }\n }\n });\n\n mealsBtn.hoverProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observableValue, Boolean notHover, Boolean hover) {\n if (hover){\n InterfaceStyling.dropShadowSelect(mealsBtn);\n } else {\n InterfaceStyling.dropShadowDeselect(mealsBtn);\n }\n }\n });\n\n plannerBtn.hoverProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observableValue, Boolean notHover, Boolean hover) {\n if (hover){\n InterfaceStyling.dropShadowSelect(plannerBtn);\n } else {\n InterfaceStyling.dropShadowDeselect(plannerBtn);\n }\n }\n });\n\n }",
"@Override\n protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {\n }",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"@Override\n\tpublic void menuSelected(MenuEvent e) {\n\n\t}",
"@Override\r\npublic void menuSelected(MenuEvent arg0) {\n\t\r\n}",
"@Override\n\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\tContainer c=(Container)e.getSource();\n\t\t\tc.setBackground(Color.blue);\n\t\t}",
"@Override\r\npublic void mouseExited(MouseEvent arg0) {\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"@Override\r\npublic void mouseEntered(MouseEvent arg0) {\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"@Override\n\t\t\tpublic boolean onHover(View v, MotionEvent event) {\n\t\t\t\tswitch(event.getAction())\n\t\t\t\t{\n\t\t\t\tcase MotionEvent.ACTION_HOVER_ENTER:\n\t\t\t\t\tv.setBackgroundColor(Color.LTGRAY);\n\t\t\t\t\tbreak;\n\t\t\t\tcase MotionEvent.ACTION_HOVER_EXIT:\n\t\t\t\t\tv.setBackgroundColor(Color.TRANSPARENT);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}",
"@FXML\n public void highlightAboutUs()\n {\n aboutUsButton.setOnMouseEntered(mouseEvent -> aboutUsButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@Override\r\n\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\tComponent com = (Component)e.getSource(); //마우스가 올라간 컴포넌트 알아냄.\r\n\t\t\tcom.setBackground(Color.GRAY);\r\n\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.orange);\n\t\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.orange);\n\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t\t\t\t\t\t}",
"private void changeMenu()\n {\n if (_menuMode)\n {\n menuLayout.getChildAt(0).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(1).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(2).setVisibility(View.GONE);\n menuLayout.getChildAt(3).setVisibility(View.GONE);\n menuLayout.getChildAt(4).setVisibility(View.VISIBLE);\n _switchMode.setText(\"Watch Mode\");\n\n }\n else\n {\n menuLayout.getChildAt(0).setVisibility(View.GONE);\n menuLayout.getChildAt(1).setVisibility(View.VISIBLE);\n _switchMode.setText(\"Paint Mode\");\n menuLayout.getChildAt(2).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(3).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(4).setVisibility(View.GONE);\n _timeBar.setProgress((int) (_paintArea.getPercent() * 100f));\n }\n _paintArea.setPaintMode(_menuMode);\n _menuMode = !_menuMode;\n }",
"public void mouseEntered(MouseEvent e) {\n JLabel source = (JLabel)e.getSource();\n view.highlightLabel(source);\n }",
"@FXML\n public void plannerBtnClicked(){\n plannerPlanBtnClicked();\n //style the main menu pane to the planner color\n styleApp(\"-fx-background-color: #\" + plannerColor);\n }",
"public abstract void setForegroundHover(final int rgba);",
"@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tl1.setText(\"You entered the mouse\");\r\n\t}",
"@FXML\n public void highlightSinglePlayer()\n {\n singlePlayerButton.setOnMouseEntered(mouseEvent -> singlePlayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@Override\n public void mouseExited(MouseEvent e) {\n setBorderPainted(false);\n setForeground(Color.BLACK);\n }",
"private void jLabelSearchMouseEntered(java.awt.event.MouseEvent evt) {\n setColor(jPanel1);\n }",
"public void handle(MouseEvent arg0) {\n\t\t\t\tMainMenu.mainStage.setTitle(\"Pacman\");\n\t\t\t\tMainMenu.setScene(MainMenu.getScene());\n\t\t\t}",
"private void updateMenu() {\n if(customMenu || !menuDirty) {\n return;\n }\n \n // otherwise, reset up the menu.\n menuDirty = false;\n menu.removeAll();\n Icon emptyIcon = null; \n for(Action action : actions) {\n if(action.getValue(Action.SMALL_ICON) != null) {\n emptyIcon = new EmptyIcon(16, 16);\n break;\n }\n }\n \n selectedComponent = null;\n selectedLabel = null;\n \n for (Action action : actions) {\n \n // We create the label ourselves (instead of using JMenuItem),\n // because JMenuItem adds lots of bulky insets.\n\n ActionLabel menuItem = new ActionLabel(action);\n JComponent panel = wrapItemForSelection(menuItem);\n \n if (action != selectedAction) {\n panel.setOpaque(false);\n menuItem.setForeground(UIManager.getColor(\"MenuItem.foreground\"));\n } else {\n selectedComponent = panel;\n selectedLabel = menuItem;\n selectedComponent.setOpaque(true);\n selectedLabel.setForeground(UIManager.getColor(\"MenuItem.selectionForeground\"));\n }\n \n if(menuItem.getIcon() == null) {\n menuItem.setIcon(emptyIcon);\n }\n attachListeners(menuItem);\n decorateMenuComponent(menuItem);\n menuItem.setBorder(BorderFactory.createEmptyBorder(0, 6, 2, 6));\n\n menu.add(panel);\n }\n \n if (getText() == null) {\n menu.add(Box.createHorizontalStrut(getWidth()-4));\n } \n \n for(MenuCreationListener listener : menuCreationListeners) {\n listener.menuCreated(this, menu);\n }\n }",
"private static void mainMenuLines(){\n setMenuLines(\"\",4,6,7,8,9,10,11,12,13,14,15,16,17,18,19);\n setMenuLines(\"Welcome to Ben's CMR program.\",1);\n setMenuLines(\"Enter \" + HIGHLIGHT_COLOR + \"help\" + ANSI_RESET + \" for a list of valid commands!\",20);\n setMenuLines(\"Enter \" + HIGHLIGHT_COLOR + \"exit\" + ANSI_RESET + \" to close the application!\",21);\n }",
"private void selectColor(JLabel label, Client client){\n label.setForeground(client.getStatus().getColor());\n }",
"private void displayColourMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"------------- Colour Menu ---------------\");\r\n System.out.println(\"(1) To edit Colour1\");\r\n System.out.println(\"(2) To edit Colour2\");\r\n System.out.println(\"(3) To edit Colour3\");\r\n }",
"@Override\r\n public void mouseClicked(MouseEvent e) {\n if(currentState == Common.GAME_STATE.MENU || currentState == Common.GAME_STATE.LOSE){\r\n Rectangle r1 = new Rectangle(Common.WIDTH/3, Common.HEIGHT/3, Common.WIDTH/3, Common.HEIGHT/6);\r\n Rectangle r2 = new Rectangle (Common.WIDTH/3, (Common.HEIGHT/3)* 2, Common.WIDTH/3, Common.HEIGHT/6);\r\n \r\n Rectangle mouseRect = new Rectangle(e.getX(),e.getY(),1,1);\r\n \r\n if(r1.contains(mouseRect))\r\n currentState = Common.GAME_STATE.INGAME;\r\n if (r2.contains(mouseRect))\r\n System.exit(0);\r\n }\r\n }",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\tsetPanelColor(employeePanel);\n\t\t\t\tsidePanelInterface.setPanel(\"employeePanel\");\n\t\t\t}",
"public void colorSelectionChange(ColorSelectionEvent cse) {\n\t\t finalCenterLabel.setForeground(cse.getColor());\n\t\t}",
"private void homenMouseClicked(java.awt.event.MouseEvent evt) {\n home.setVisible(true);\n homen.setBackground(Color.decode(\"#FFCC00\"));\n product.setVisible(false);\n prdtn.setBackground(Color.decode(\"#00CC66\"));\n stock.setVisible(false);\n stckn.setBackground(Color.decode(\"#00CC66\"));\n report.setVisible(false);\n rprt.setBackground(Color.decode(\"#00CC66\"));\n sales.setVisible(false);\n slsn.setBackground(Color.decode(\"#00CC66\"));\n bill.setVisible(false);\n cusln.setBackground(Color.decode(\"#00CC66\"));\n mng_emp.setVisible(false);\n mngen.setBackground(Color.decode(\"#00CC66\"));\n Update.setVisible(false);\n UPD_PRO.setBackground(Color.decode(\"#00CC66\"));\n }",
"@FXML\n public void highlightLogout()\n {\n logoutButton.setOnMouseEntered(mouseEvent -> logoutButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t\t\t\t\t\t}",
"@Override\r\n\tpublic void mousePressed(MouseEvent e) {\n\t\tl1.setText(\"You pressed the mouse\");\r\n\t}",
"private void closeLabelMouseEntered(java.awt.event.MouseEvent evt) {\n Border labelBorder = BorderFactory.createMatteBorder(1, 1, 1, 1, Color.MAGENTA);\n closeLabel.setBorder(labelBorder);\n closeLabel.setForeground(Color.red);\n }",
"@Override\r\n\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\tTile t=(Tile)arg0.getSource();\r\n\t\t\t\r\n\t\t\t//upon leaving a hover turns green background of tile back to the default\r\n\t\t\tif(t.getBackground().equals(Color.GREEN)) {\r\n\t\t\t\tt.setBackground(null);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\tsetPanelColor(kitchenPanel);\n\t\t\t\tsidePanelInterface.setPanel(\"kitchen\");\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(final ActionEvent evt) {\n\t\t\t\tif (evt.getSource() == jMenuItem8) {\n\t\t\t\t\tSystem.out.println(\"Selected: \"\n\t\t\t\t+ evt.getActionCommand());\n\t\t\t\t\t/*\n\t\t\t\t\t((Echiquier) panelChess\n\t\t\t\t\t.getComponents()[0])\n\t\t\t\t\t.setLightColor(Color.lightGray);\n\t\t\t\t\t((Echiquier) panelChess\n\t\t\t\t\t.getComponents()[0])\n\t\t\t\t\t.setDarkColor(Color.darkGray);\n\t\t\t\t\t((Echiquier) panelChess\n\t\t\t\t\t\t.getComponents()[0]).repaint();\n\t\t\t\t\t((Echiquier) panelChess\n\t\t\t\t\t.getComponents()[0]).revalidate();*/\n\t\t\t\t}\n\t\t\t}",
"private void handleMouseExit(MouseEvent mouseEvent) {\n if (simulator.isEditable()) {\n setColor();\n }\n }",
"@Override\r\npublic void mousePressed(MouseEvent arg0) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tmenu.setMouseClick(true);\n\t\t\t}",
"@Override\r\n\tpublic void update(GameContainer gc, StateBasedGame sbgame, int delta)\r\n\t\t\tthrows SlickException {\r\n\t\tInput input = gc.getInput();\r\n\t\t\r\n\t\t//get mouse location\r\n\t\tint mouseX = input.getMouseX();\r\n\t\tint mouseY = input.getMouseY();\r\n\t\t\r\n\t\tboolean insideMenuButton = false;\r\n\t\t\r\n\t\t//if mouse is within bounds of mainMenu button\r\n\t\tif ((mouseX >= MENUX && mouseX <= MENUX + mainMenuButton.getWidth()) &&\r\n ( mouseY >= MENUY && mouseY <= MENUY + mainMenuButton.getHeight())){\r\n\t\t\tinsideMenuButton = true;\r\n\t\t}\r\n\t\t\r\n\t\t//enter main menu state when clicked\r\n\t\tif(insideMenuButton){\r\n\t\t\tif(input.isMousePressed(Input.MOUSE_LEFT_BUTTON)){\r\n\t\t\t\tsbgame.enterState(WarVesselsGame.MAINMENUSTATE);\r\n\t\t\t\tlogger.info(\"entering main menu state\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"public void pressMainMenu() {\n }"
] |
[
"0.7070657",
"0.6976949",
"0.6976949",
"0.6976949",
"0.6976949",
"0.6966293",
"0.68612677",
"0.6836607",
"0.68303484",
"0.6813698",
"0.6789987",
"0.6749973",
"0.6749386",
"0.6749386",
"0.6749386",
"0.6749386",
"0.6741178",
"0.668672",
"0.6686132",
"0.66432816",
"0.6604458",
"0.6568732",
"0.6503666",
"0.6495862",
"0.64918363",
"0.6491045",
"0.6441385",
"0.64256835",
"0.636412",
"0.63368136",
"0.6321724",
"0.6320549",
"0.6318274",
"0.6314577",
"0.6312221",
"0.6308476",
"0.6267048",
"0.62644625",
"0.6256099",
"0.621243",
"0.62004215",
"0.61999416",
"0.6194604",
"0.6194175",
"0.61829466",
"0.61825037",
"0.6171074",
"0.61652863",
"0.61261123",
"0.61255926",
"0.61125743",
"0.61107105",
"0.61083156",
"0.61048824",
"0.6091887",
"0.606853",
"0.6050619",
"0.60386986",
"0.6037507",
"0.60280603",
"0.5996586",
"0.5982903",
"0.59771305",
"0.59767914",
"0.5969147",
"0.5966582",
"0.59611595",
"0.59468997",
"0.58819616",
"0.5856271",
"0.5855842",
"0.58497155",
"0.5812744",
"0.5812534",
"0.5809157",
"0.57783353",
"0.57779855",
"0.5775328",
"0.577117",
"0.5764555",
"0.5763899",
"0.5743728",
"0.5741644",
"0.5738524",
"0.57299185",
"0.5726558",
"0.572485",
"0.57235795",
"0.57231283",
"0.57146865",
"0.57058",
"0.57014954",
"0.56959647",
"0.5674532",
"0.5665937",
"0.5665745",
"0.5663826",
"0.56502706",
"0.5649738",
"0.56453466"
] |
0.7721617
|
0
|
WHEN THIS METHOD IS CALLED THE 'MAIN MENU' LABEL WILL CHANGE BACK TO THE DEFAULT TEXT COLOR WHEN THE MOUSE IS NO LONGER HOVERING OVER IT
|
@FXML
public void resetMainMenu()
{
mainMenuButton.setOnMouseExited(mouseEvent -> mainMenuButton.setTextFill(Color.WHITE));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@FXML\n public void highlightMainMenu()\n {\n mainMenuButton.setOnMouseEntered(mouseEvent -> mainMenuButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n if(type == \"close\"){//if the close button is being edited\n button.setBackground(new Color(237,64,64));//colour chosen for the \n }\n if(type == \"scale\"){//if the fullscreen button is being edited\n button.setBackground(coloursObject.getMenuPanelColour());\n }\n }",
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n }",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n public void mouseExited(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.black);\n levelPanel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t}",
"private void btn_HomeMousePressed(java.awt.event.MouseEvent evt) {\n setcolor(btn_Home);\n ind1.setOpaque(true);\n resetcolor(new JPanel[]{btn_anak,btn_transaksi}, new JPanel[]{ind2,ind3});\n \n \n MainParent Mp = new MainParent();\n MainParent.txt_auto.setText(anakP.txt_auto.getText());\n Mp.setVisible(true);\n hide();\n\n }",
"@Override\n\tpublic void mouseEntered(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.orange);\n\t\t\n\t}",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n button.setBackground(coloursObject.getTitlePanelColour());\n }",
"@Override\n public void mouseEntered(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.BLUE);\n levelPanel.setCursor(new Cursor(Cursor.HAND_CURSOR));\n }",
"public void mouseExited(MouseEvent e) {\n\t\t\tJLabel button = (JLabel)e.getSource();\n\t\t\tif(hovered != null && button != activeButton){\n\t\t\t\tbutton.setBackground(MENU_COLOR);\n\t\t\t\thovered = null;\n\t\t\t}\n\t\t\t\n\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.black);\n\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(new Color(150,190,200));//蓝色\n\t}",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n }",
"@Override\n\tpublic void mouseEntered(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.blue);\n\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.black);\n\t}",
"@Override\n\tpublic void mouseExited(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.BLACK);\n\t\t\n\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.BLACK);\n\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n Play.setForeground(Color.blue);\r\n\t\t\t\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.RED);\n\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jLabel = (JLabel)e.getSource() ;\n\t\tjLabel.setForeground(Color.black) ;\n\t\tjLabel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)) ;\n\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\n public void menuSelected(MenuEvent e) {\n \n }",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"private static void mainMenuLines(){\n setMenuLines(\"\",4,6,7,8,9,10,11,12,13,14,15,16,17,18,19);\n setMenuLines(\"Welcome to Ben's CMR program.\",1);\n setMenuLines(\"Enter \" + HIGHLIGHT_COLOR + \"help\" + ANSI_RESET + \" for a list of valid commands!\",20);\n setMenuLines(\"Enter \" + HIGHLIGHT_COLOR + \"exit\" + ANSI_RESET + \" to close the application!\",21);\n }",
"@FXML\n public void subMenuButtonResetColor(Event mouseEvent){\n Button thisButton = (Button) mouseEvent.getSource();\n thisButton.setStyle(\"-fx-background-color: #\" + standardSubMenuButtonColor);\n }",
"private void changeMenu()\n {\n if (_menuMode)\n {\n menuLayout.getChildAt(0).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(1).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(2).setVisibility(View.GONE);\n menuLayout.getChildAt(3).setVisibility(View.GONE);\n menuLayout.getChildAt(4).setVisibility(View.VISIBLE);\n _switchMode.setText(\"Watch Mode\");\n\n }\n else\n {\n menuLayout.getChildAt(0).setVisibility(View.GONE);\n menuLayout.getChildAt(1).setVisibility(View.VISIBLE);\n _switchMode.setText(\"Paint Mode\");\n menuLayout.getChildAt(2).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(3).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(4).setVisibility(View.GONE);\n _timeBar.setProgress((int) (_paintArea.getPercent() * 100f));\n }\n _paintArea.setPaintMode(_menuMode);\n _menuMode = !_menuMode;\n }",
"@Override\n protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {\n }",
"@Override\n\tpublic void mouseExited(MouseEvent me)\n\t{\n\t\tif (me.getSource() == help1)\n\t\t{\n\t\t\tusernameSelect.setForeground(Color.BLACK);\n\t\t\tfullnameSelect.setForeground(Color.BLACK);\n\t\t\tfirstNameSelect.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help2)\n\t\t{\n\t\t\ttitleInput.setBackground(Color.WHITE);\n\t\t\twfurlInput.setBackground(Color.WHITE);\n\t\t}\n\t\telse if (me.getSource() == help3)\n\t\t{\n\t\t\ttypeLabel.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help4)\n\t\t{\n\t\t\tintroLabel.setForeground(Color.BLACK);\n\t\t\tloadIntroImg.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help5)\n\t\t{\n\t\t\tloadMainImg.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help6)\n\t\t{\n\t\t\tinstructions6.setForeground(Settings.SITE_GREEN);\n\t\t}\n\t}",
"@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\t\t\n\t\tview.highlightMenu(SwingUtilities.convertPoint(this, e.getPoint(), view));\n\t\t\n\t}",
"@Override\r\n\t\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.DARK_GRAY);\r\n\t\t\t\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tif(e.getSource() == start)\n\t\t\tstart.setForeground(new Color(206, 124, 24));\n\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\tsetPanelColor(homePanel);\n\t\t\t\tsidePanelInterface.setPanel(\"homePanel\");\n\t\t\t}",
"public void setMenuLabel(java.lang.String value);",
"private void updateMenu() {\n if(customMenu || !menuDirty) {\n return;\n }\n \n // otherwise, reset up the menu.\n menuDirty = false;\n menu.removeAll();\n Icon emptyIcon = null; \n for(Action action : actions) {\n if(action.getValue(Action.SMALL_ICON) != null) {\n emptyIcon = new EmptyIcon(16, 16);\n break;\n }\n }\n \n selectedComponent = null;\n selectedLabel = null;\n \n for (Action action : actions) {\n \n // We create the label ourselves (instead of using JMenuItem),\n // because JMenuItem adds lots of bulky insets.\n\n ActionLabel menuItem = new ActionLabel(action);\n JComponent panel = wrapItemForSelection(menuItem);\n \n if (action != selectedAction) {\n panel.setOpaque(false);\n menuItem.setForeground(UIManager.getColor(\"MenuItem.foreground\"));\n } else {\n selectedComponent = panel;\n selectedLabel = menuItem;\n selectedComponent.setOpaque(true);\n selectedLabel.setForeground(UIManager.getColor(\"MenuItem.selectionForeground\"));\n }\n \n if(menuItem.getIcon() == null) {\n menuItem.setIcon(emptyIcon);\n }\n attachListeners(menuItem);\n decorateMenuComponent(menuItem);\n menuItem.setBorder(BorderFactory.createEmptyBorder(0, 6, 2, 6));\n\n menu.add(panel);\n }\n \n if (getText() == null) {\n menu.add(Box.createHorizontalStrut(getWidth()-4));\n } \n \n for(MenuCreationListener listener : menuCreationListeners) {\n listener.menuCreated(this, menu);\n }\n }",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t\t\tPlay.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent me) \n\t{\n\t\tif (me.getSource() == help1)\n\t\t{\n\t\t\tusernameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfullnameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfirstNameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help2)\n\t\t{\n\t\t\ttitleInput.setBackground(Settings.SITE_ORANGE);\n\t\t\twfurlInput.setBackground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help3)\n\t\t{\n\t\t\ttypeLabel.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help4)\n\t\t{\n\t\t\tintroLabel.setForeground(Settings.SITE_ORANGE);\n\t\t\tloadIntroImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help5)\n\t\t{\n\t\t\tloadMainImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help6)\n\t\t{\n\t\t\tinstructions6.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t}",
"private void renderMenu() {\n StdDraw.setCanvasSize(START_WIDTH * TILE_SIZE, START_HEIGHT * TILE_SIZE);\n Font font = new Font(\"Monaco\", Font.BOLD, 20);\n StdDraw.setFont(font);\n StdDraw.setXscale(0, START_WIDTH );\n StdDraw.setYscale(0, START_HEIGHT );\n StdDraw.clear(Color.BLACK);\n StdDraw.setPenColor(Color.WHITE);\n StdDraw.enableDoubleBuffering();\n StdDraw.text(START_WIDTH / 2, START_HEIGHT * 2 / 3, \"CS61B The Game\");\n StdDraw.text(START_WIDTH / 2, START_HEIGHT / 2 + 2, \"New Game (N)\");\n StdDraw.text(START_WIDTH / 2, START_HEIGHT / 2, \"Load Game (L)\");\n StdDraw.text(START_WIDTH / 2, START_HEIGHT / 2 - 2 , \"Quit (Q)\");\n StdDraw.show();\n }",
"@FXML\n public void subMenuButtonDarkenColor(Event mouseEvent){\n Button thisButton = (Button) mouseEvent.getSource();\n thisButton.setStyle(\"-fx-background-color: #\" + darkenSubMenuButtonColor);\n }",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.blue);\r\n\t\t\t\t}",
"@Override\n public void mouseEntered(MouseEvent e) {\n setBorderPainted(true);\n setForeground(Color.RED);\n }",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"@FXML\n public void highlightMultiplayer()\n {\n multiplayerButton.setOnMouseEntered(mouseEvent -> multiplayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"private static void helpMenuLines(){\n setMenuLines(\"\",7,9,11,13,15,16,18,20);\n setMenuLines(\"Welcome to Ben's CMR program. Here are the main commands:\",1);\n setMenuLines(HIGHLIGHT_COLOR + \"new lead\" + ANSI_RESET + \" - Creates a new Lead\",4);\n setMenuLines(HIGHLIGHT_COLOR + \"convert <ID>\" + ANSI_RESET + \" - Converts a Lead into an Opportunity\",6);\n setMenuLines(HIGHLIGHT_COLOR + \"close-won <ID>\" + ANSI_RESET + \" - Close Won Opportunity\",8);\n setMenuLines(HIGHLIGHT_COLOR + \"close-lost <ID>\" + ANSI_RESET + \" - Close Lost Opportunity\",10);\n setMenuLines(HIGHLIGHT_COLOR + \"lookup <OBJECT> <ID>\" + ANSI_RESET + \" - Search for specific Lead, Opportunity, Account or Contact\",12);\n setMenuLines(HIGHLIGHT_COLOR + \"show <OBJECT PLURAL>\" + ANSI_RESET + \" - List all Leads, Opportunities, Accounts or Contacts\",14);\n setMenuLines(HIGHLIGHT_COLOR + \"help\" + ANSI_RESET + \" - Explains usage of available commands\",17);\n setMenuLines(HIGHLIGHT_COLOR + \"save\" + ANSI_RESET + \" - Saves the changed data\",19);\n setMenuLines(HIGHLIGHT_COLOR + \"exit\" + ANSI_RESET + \" - Saves and exits the program\",21);\n }",
"@Override\n public void mouseExited(MouseEvent e) {\n setBorderPainted(false);\n setForeground(Color.BLACK);\n }",
"@Override\r\npublic void menuSelected(MenuEvent arg0) {\n\t\r\n}",
"public void pressMainMenu() {\n }",
"public void displayHover() {\n if (textColour == null) {\r\n displayEmptyHover();\r\n return;\r\n }\r\n stroke(0, 0, 0);\r\n strokeWeight(strokeWeight);\r\n hoverFill(boxColour);\r\n if (strokeWeight != 0 && text != null) {\r\n rect(x, y, w, h, 7);\r\n }\r\n fill(textColour);\r\n textSize(textSize);\r\n text(text, x + xTextOffset, y + yTextOffset);\r\n }",
"@Override\n\t\t\tpublic void mouseMove(MouseEvent e) {\n\t\t\t\tint x = e.x;\n\t\t\t\tint y = e.y;\n\t\t\t\t\n\t\t\t\tgc.setFont(new Font(mainFrame.getDisplay(),\"楷体\",40,SWT.BOLD));\n\t\t\t\tgc.setAlpha(255);\n\t\t\t\tgc.setForeground(new Color(mainFrame.getDisplay(),255,255,255));\n\t\t\t\t\n\t\t\t\tif(settingRect.contains(x,y)) {\n\t\t\t\t\t gc.drawString(\"设置选项\", 342, 285,true);\n\t\t\t\t\t changeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(helpRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"帮助信息\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(aboutRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"关于游戏\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(exitRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"退出游戏\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\telse if(onButton(classicP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"经典模式\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse if(onButton(timeP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"时间模式\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(onButton(levelP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"冒险闯关\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse if(onButton(onlineP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"联网对战\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcanvas.redraw();\n\t\t\t\t\tchangeCursor(false);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}",
"public void handle(MouseEvent arg0) {\n\t\t\t\tMainMenu.mainStage.setTitle(\"Pacman\");\n\t\t\t\tMainMenu.setScene(MainMenu.getScene());\n\t\t\t}",
"public MainMenu() {\n\t\t\t fs = new Font [3];\n\t\t\t fs[0] = new Font(\"Lato\", Font.BOLD, 36);\n\t\t\t fs[1] = new Font(\"Open Sans\", 0 , 20);\n\t\t\t fs[2] = new Font(\"Open Sans\", 0 , 12);\n\t\t\t searchB = new JButton(\"Search\");\n\t\t\t sortB = new JButton(\"Sort\");\n\t\t\t graphB = new JButton(\"Graph\");\n\t\t\t backB = new JButton(\"Return\");\n\t\t\t menuL = new JLabel (\"Main Menu\");\n\t\t\t tA = new JTextArea ();\n\t\t\t searchB.setFont(fs[1]);\n\t\t\t sortB.setFont(fs[1]);\n\t\t\t graphB.setFont(fs[1]);\n\t\t\t backB.setFont(fs[2]);\n\t\t\t menuL.setFont(fs[0]);\n\t\t\t backB.setVisible(false);\n\t\t\t \n\t\t\t // UI elements to load in view\n\t\t\t add(menuL, BorderLayout.PAGE_START);\n\t\t\t add(searchB, BorderLayout.LINE_START);\n\t\t\t add(sortB, BorderLayout.CENTER);\n\t\t\t add(graphB, BorderLayout.LINE_END);\n\t\t\t add(backB, BorderLayout.PAGE_END);\n\t\t\t \n\t\t\t // listens to buttons pressed\n\t\t\t searchB.addActionListener( new ActionListener()\n\t\t\t {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent e)\n\t\t\t {\n\t\t\t mainGui.paneSwitch(1);\n\t\t\t }\n\t\t\t });\n\t\t\t sortB.addActionListener( new ActionListener()\n\t\t\t {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent e)\n\t\t\t {\n\t\t\t mainGui.paneSwitch(2);\n\t\t\t }\n\t\t\t });\n\t\t\t graphB.addActionListener( new ActionListener()\n\t\t\t {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent e)\n\t\t\t {\n\t\t\t mainGui.paneSwitch(3);\n\t\t\t }\n\t\t\t });\n\t\t\t backB.addActionListener( new ActionListener()\n\t\t\t {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent e)\n\t\t\t {\n\t\t\t mainGui.paneSwitch(0);\n\t\t\t }\n\t\t\t });\n\t\t }",
"private void applyStyle() {\n\t\tmenu.getStyleClass().add(menuColor);\n\t}",
"@Override\n\tpublic void menuSelected(MenuEvent e) {\n\n\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tif(e.getSource() == start)\n\t\t\tstart.setForeground(Color.red);\n\t}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.red);\r\n\t\t\t\t}",
"public void initMenu() {\n\t\t\r\n\t\treturnToGame = new JButton(\"Return to Game\");\r\n\t\treturnToGame.setBounds(900, 900, 0, 0);\r\n\t\treturnToGame.setBackground(Color.BLACK);\r\n\t\treturnToGame.setForeground(Color.WHITE);\r\n\t\treturnToGame.setVisible(false);\r\n\t\treturnToGame.addActionListener(this);\r\n\t\t\r\n\t\treturnToStart = new JButton(\"Main Menu\");\r\n\t\treturnToStart.setBounds(900, 900, 0, 0);\r\n\t\treturnToStart.setBackground(Color.BLACK);\r\n\t\treturnToStart.setForeground(Color.WHITE);\r\n\t\treturnToStart.setVisible(false);\r\n\t\treturnToStart.addActionListener(this);\r\n\t\t\r\n\t\t//add(menubackground);\r\n\t\tadd(returnToGame);\r\n\t\tadd(returnToStart);\r\n\t}",
"@FXML\n public void highlightAboutUs()\n {\n aboutUsButton.setOnMouseEntered(mouseEvent -> aboutUsButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"private void restoreFromOverlay() {\n \t\tString descriptorsString = getOverlayStore().getString(EditorPreferenceNames.EDITOR_TEXT_HOVER_MODIFIERS);\n \t\tfTextHovers = getTextHoverManager().generateTextHoverDescriptors(descriptorsString);\n \t}",
"@Override\r\n\tpublic void mousePressed(MouseEvent e) {\n\t\tl1.setText(\"You pressed the mouse\");\r\n\t}",
"private void displayColourMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"------------- Colour Menu ---------------\");\r\n System.out.println(\"(1) To edit Colour1\");\r\n System.out.println(\"(2) To edit Colour2\");\r\n System.out.println(\"(3) To edit Colour3\");\r\n }",
"public static void mainMenu() {\n\t\tStdDraw.setCanvasSize(600, 600);\n\t\tStdDraw.setScale(0, 1000);\n\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\tStdDraw.filledRectangle(500, 500, 1000, 1000);\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tFont font = new Font(\"Sans Serif\", 20, 20);\n\t\tStdDraw.setFont(font);\n\t\tStdDraw.text(500, 850, \"Six Men Morris Game\");\n\t\tStdDraw.text(500, 750, \"Game Created By: \");\n\t\tStdDraw.text(500, 700, \"Phillip Pavlich, Prakhar Jalan, Dinesh Balakrishnan\");\n\t\tStdDraw.filledRectangle(500, 500, 205, 75);\n\t\tStdDraw.filledRectangle(500, 300, 205, 75);\n\t\tStdDraw.filledRectangle(500, 100, 205, 75);\n\t\t\n\t\tStdDraw.setFont();\n\t\tStdDraw.setPenColor(StdDraw.ORANGE);\n\t\tStdDraw.setPenRadius(0.05);\n\n\t\tStdDraw.filledRectangle(500, 500, 200, 70);\n\t\tStdDraw.filledRectangle(500, 300, 200, 70);\n\t\tStdDraw.filledRectangle(500, 100, 200, 70);\n\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tStdDraw.text(500, 500, \"Start New Game\");\n\t\tStdDraw.text(500, 300, \"Continue Game\");\n\t\tStdDraw.text(500, 100, \"Load Saved Game\");\n\t}",
"public void menu() {\n\t\tstate.menu();\n\t}",
"@Override\r\n public void mousePressed(MouseEvent e) {\n setBackground(Color.BLUE);\r\n \r\n \r\n }",
"public void onMenuNew() {\n handleMenuOpen(null);\n }",
"public static void mainMenu() {\r\n\t\tSystem.out.println(\"============= Text-Werkzeuge =============\");\r\n\t\tSystem.out.println(\"Bitte Aktion auswählen:\");\r\n\t\tSystem.out.println(\"1: Text umkehren\");\r\n\t\tSystem.out.println(\"2: Palindrom-Test\");\r\n\t\tSystem.out.println(\"3: Wörter zählen\");\r\n\t\tSystem.out.println(\"4: Caesar-Chiffre\");\r\n\t\tSystem.out.println(\"5: Längstes Wort ermitteln\");\r\n\t\tSystem.out.println(\"0: Programm beenden\");\r\n\t\tSystem.out.println(\"==========================================\");\r\n\t}",
"public abstract void setForegroundHover(final int rgba);",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tl1.setText(\"You cliked the mouse\");\r\n\t}",
"public void actionPerformed(ActionEvent ae) {\n\tjava.awt.Color newColor = JColorChooser.showDialog(this, \"Choose a new Label Color\", centerLabel.getForeground());\n\tif (newColor != null) {\n\t centerLabel.setForeground(newColor);\n\t}\n }",
"private void initStyles(){\n Shadow shadowEffect = new Shadow();\n shadowEffect.setBlurType(BlurType.GAUSSIAN);\n shadowEffect.setHeight(0);\n shadowEffect.setWidth(5.93);\n shadowEffect.setColor(Color.color(0.5, 0, 1.0));\n openAboutText.setOnMouseEntered(mouseEvent -> openAboutText.setEffect(shadowEffect));//#2f00ff\n openAboutText.setOnMouseExited(mouseEvent -> openAboutText.setEffect(null) );//#9277ff\n\n openSetingsText.setOnMouseEntered(mouseEvent -> {openSetingsText.setEffect(shadowEffect);});\n openSetingsText.setOnMouseExited(mouseEvent -> {openSetingsText.setEffect(null);});\n\n openAlarmsText.setOnMouseEntered(mouseEvent -> {openAlarmsText.setEffect(shadowEffect);});\n openAlarmsText.setOnMouseExited(mouseEvent -> {openAlarmsText.setEffect(null);});\n\n exitText.setOnMouseEntered(mouseEvent ->{\n shadowEffect.setColor(Color.color(1,0,0));\n exitText.setEffect(shadowEffect); });\n exitText.setOnMouseExited(mouseEvent -> {\n shadowEffect.setColor(Color.color(0.5, 0, 1.0));\n exitText.setEffect(null);\n } );\n }",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\tpublic boolean onHover(View v, MotionEvent event) {\n\t\t\t\tswitch(event.getAction())\n\t\t\t\t{\n\t\t\t\tcase MotionEvent.ACTION_HOVER_ENTER:\n\t\t\t\t\tv.setBackgroundColor(Color.LTGRAY);\n\t\t\t\t\tbreak;\n\t\t\t\tcase MotionEvent.ACTION_HOVER_EXIT:\n\t\t\t\t\tv.setBackgroundColor(Color.TRANSPARENT);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t\t\t\t\t\t}",
"private void closeLabelMouseEntered(java.awt.event.MouseEvent evt) {\n Border labelBorder = BorderFactory.createMatteBorder(1, 1, 1, 1, Color.MAGENTA);\n closeLabel.setBorder(labelBorder);\n closeLabel.setForeground(Color.red);\n }",
"@Override\n\tpublic void itemStateChanged(ItemEvent evt) {\n\t\tColor levelColor = null;\n\t\tCardLayout cl = (CardLayout) pnlLevelSwitch.getLayout();\n\t\tcl.show(pnlLevelSwitch, (String) evt.getItem());\n\t\t\n\t\tString string = (String) evt.getItem();\n\t\t\n\t\tif(string.equals(\"Puzzle\")){\n\t\t\tlevelColor = new Color(102,255,102);\n\t\t}\n\t\telse if(string.equals(\"Lightning\")){\n\t\t\tlevelColor = Color.ORANGE;\n\t\t}\n\t\telse if(string.equals(\"Theme\")){\n\t\t\tlevelColor = Color.PINK;\n\t\t}\n\t\tthis.setBackground(levelColor);\n\n\t}",
"@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tl1.setText(\"You entered the mouse\");\r\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(final ActionEvent evt) {\n\t\t\t\tif (evt.getSource() == jMenuItem9) {\n\t\t\t\t\tSystem.out.println(\"Selected: \"\n\t\t\t\t+ evt.getActionCommand());\n\t\t\t\t\t/*\n\t\t\t\t\t((Echiquier) panelChess\n\t\t\t\t\t.getComponents()[0])\n\t\t\t\t\t.setLightColor(Color.black);*/\n\t\t\t\t}\n\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.orange);\n\t\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t\t\t\t\t\t\t}",
"@Override\r\n\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\tTile t=(Tile)arg0.getSource();\r\n\t\t\t\r\n\t\t\t//upon leaving a hover turns green background of tile back to the default\r\n\t\t\tif(t.getBackground().equals(Color.GREEN)) {\r\n\t\t\t\tt.setBackground(null);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}",
"private void finalScreen() {\r\n\t\tdisplay.setLegend(GAME_OVER);\r\n\t\tdisplay.removeKeyListener(this);\r\n\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.orange);\n\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t\t\t\t\t\t}",
"@Override\r\npublic void menuDeselected(MenuEvent arg0) {\n\t\r\n}",
"@Override\n protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)\n {\n this.fontRenderer.drawString(this.toolboxInv.getDisplayName().getUnformattedText(), 8, 6, 4210752);\n this.fontRenderer.drawString(this.playerInv.getDisplayName().getUnformattedText(), 8, this.ySize - 96 + 2, 4210752);\n }",
"public void menuActiviated() {\n\t\t\t((LinearLayout) PieMenu.getParent()).removeView(PieMenu);\n\t\t\tadd_shangpin.setVisibility(View.VISIBLE);\n\t\t\tif(text_details != null){\n\t\t\t\ttext_details.setText(\"\");\n\t\t\t}\n\t\t\t\n\t\t}",
"private void handleMouseExit(MouseEvent mouseEvent) {\n if (simulator.isEditable()) {\n setColor();\n }\n }",
"public void colorSelectionChange(ColorSelectionEvent cse) {\n\t\t finalCenterLabel.setForeground(cse.getColor());\n\t\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tmenu.setMouseClick(true);\n\t\t\t}"
] |
[
"0.74602145",
"0.6626836",
"0.6531539",
"0.6378797",
"0.6378797",
"0.6378797",
"0.6378797",
"0.6371857",
"0.63590103",
"0.6344005",
"0.6344005",
"0.6344005",
"0.6344005",
"0.633006",
"0.629345",
"0.62917614",
"0.6267323",
"0.62528664",
"0.6243272",
"0.6233858",
"0.62244314",
"0.6213351",
"0.6179663",
"0.614398",
"0.6129561",
"0.6111391",
"0.60906297",
"0.60749805",
"0.60676557",
"0.6067103",
"0.60520905",
"0.6045301",
"0.6028613",
"0.602284",
"0.6020463",
"0.6016693",
"0.6012399",
"0.6008426",
"0.6000646",
"0.5980298",
"0.5972508",
"0.5929876",
"0.5926425",
"0.5925953",
"0.59105545",
"0.58965653",
"0.58825237",
"0.58575475",
"0.5835222",
"0.5832947",
"0.5822045",
"0.582151",
"0.58209807",
"0.58139324",
"0.5813239",
"0.5803621",
"0.57831097",
"0.57577574",
"0.5751046",
"0.57463855",
"0.5745794",
"0.5745539",
"0.57317907",
"0.57000047",
"0.56987476",
"0.5697801",
"0.56964725",
"0.56841516",
"0.567898",
"0.5678735",
"0.5653922",
"0.5649371",
"0.564315",
"0.56380266",
"0.562921",
"0.56238043",
"0.5623613",
"0.5619556",
"0.5612264",
"0.55997235",
"0.5576876",
"0.55698997",
"0.55585194",
"0.55570745",
"0.5548173",
"0.55460906",
"0.5544751",
"0.5543872",
"0.5538348",
"0.5524982",
"0.5519312",
"0.55129856",
"0.5504261",
"0.5503581",
"0.54996616",
"0.54845405",
"0.5481988",
"0.54686326",
"0.5464507",
"0.54501075"
] |
0.7101342
|
1
|
WHEN THIS METHOD IS CALLED THE 'SINGLE PLAYER' LABEL WILL CHANGE COLOR WHEN THE MOUSE IS HOVERING OVER IT
|
@FXML
public void highlightSinglePlayer()
{
singlePlayerButton.setOnMouseEntered(mouseEvent -> singlePlayerButton.setTextFill(Color.valueOf("#FFD700")));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t\t\tPlay.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n Play.setForeground(Color.blue);\r\n\t\t\t\t}",
"@FXML\n public void highlightMultiplayer()\n {\n multiplayerButton.setOnMouseEntered(mouseEvent -> multiplayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.blue);\r\n\t\t\t\t}",
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n }",
"@Override\r\n\tpublic void update(GameContainer gc, float dt) {\n\t\tclip.setVolume(gc.getWindow().getSettings().getSfxVol());\r\n\t\thover = (gc.getInput().getMouseX() >= posX && gc.getInput().getMouseX() <= posX + width)\r\n\t\t\t\t&& (gc.getInput().getMouseY() >= posY && gc.getInput().getMouseY() <= posY + height);\r\n\t\tif ((hover && gc.getInput().isButtonUp(MouseEvent.BUTTON1))) {\r\n\t\t\tsetClicked(true);\r\n\t\t\tclip.play();\r\n\t\t}\r\n\t\tif (hover) {\r\n\t\t\tthis.color1=color2;\r\n\t\t} else\r\n\t\t\tcolor1 = temp;\r\n\t}",
"@Override\n public void mouseEntered(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.BLUE);\n levelPanel.setCursor(new Cursor(Cursor.HAND_CURSOR));\n }",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.RED);\n\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t\t}",
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n if(type == \"close\"){//if the close button is being edited\n button.setBackground(new Color(237,64,64));//colour chosen for the \n }\n if(type == \"scale\"){//if the fullscreen button is being edited\n button.setBackground(coloursObject.getMenuPanelColour());\n }\n }",
"public void mousePressed(MouseEvent e){\r\n\t //reset the label\r\n\t if(isBlack) label.setText(\"\t\tWhite's Turn\");\r\n\t else label.setText(\"\t\tBlack's Turn\");\r\n\t \r\n //Do nothing when game is over\r\n if(gameOver) return;\r\n \r\n String colorName=isBlack?\"Black\":\"White\";\r\n\r\n //Convert coordinate to index \r\n xIndex=(e.getX()-MARGIN+GRID_SPAN/2)/GRID_SPAN;\r\n yIndex=(e.getY()-MARGIN+GRID_SPAN/2)/GRID_SPAN;\r\n\r\n //Do nothing when outside the board\r\n if(xIndex<0||xIndex>ROWS||yIndex<0||yIndex>COLS)\r\n return;\r\n\r\n //Do nothing when current position already occupied\r\n if(findChess(xIndex,yIndex))return;\r\n\r\n //if valid, Draw a new chess at current position and add index to the chessList \r\n Point ch=new Point(xIndex,yIndex,isBlack?Color.black:Color.white);\r\n chessList[chessCount++]=ch;\r\n repaint();//run paintComponent\r\n\r\n\r\n //if someone wins, give a message\r\n if(isWin()){\r\n String msg=String.format(\"Congratulations��%s won��\", colorName); \r\n JOptionPane.showMessageDialog(this, msg);\r\n gameOver=true;\r\n }\r\n isBlack=!isBlack;\r\n }",
"@Override\n\tpublic void mouseEntered(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.orange);\n\t\t\n\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(new Color(150,190,200));//蓝色\n\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.blue);\n\t}",
"public void changePlayer(int index) {\n currentPlayer.setText(\"Aktueller Spieler: \" + index);\n if(index == 1){\n pointsPlayer2.setOpaque(false);\n pointsPlayer1.setBackground(Color.green);\n pointsPlayer1.setOpaque(true);\n this.repaint();\n }\n else{\n pointsPlayer1.setOpaque(false);\n pointsPlayer2.setBackground(Color.green);\n pointsPlayer2.setOpaque(true);\n this.repaint();\n }\n }",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@FXML\n public void resetSinglePlayer()\n {\n singlePlayerButton.setOnMouseExited(mouseEvent -> singlePlayerButton.setTextFill(Color.WHITE));\n }",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.red);\r\n\t\t\t\t}",
"public void toggle() {\n if (currentPlayer.equals(\"red\")) {\n currentColor = BLUE_COLOUR;\n currentPlayer = \"blue\";\n } else {\n currentColor = RED_COLOUR;\n currentPlayer = \"red\";\n }\n //change color of grid\n changeColor();\n }",
"@Override\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\tif(match.getMatchStatus() != MatchStatus.ENDED) {\r\n\t\t\t\t\t\t\tmatch.simMatch(); \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (p1==match.getWinner()) { \r\n\t\t\t\t\t\t\t\tPlayer1.setForeground(Color.GREEN);\r\n\t\t\t\t\t\t\t\tPlayer2.setForeground(Color.red); \r\n\t\t\t\t\t\t\t}else { \r\n\t\t\t\t\t\t\t\tPlayer2.setForeground(Color.green);\r\n\t\t\t\t\t\t\t\tPlayer1.setForeground(Color.red); \r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\tmatchStatus.setText(\" Ended\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\tif(match.getMatchStatus() != MatchStatus.ENDED) {\r\n\t\t\t\tmatch.simMatch(); \r\n\t\t\t\t\r\n\t\t\t\tif (p1==match.getWinner()) { \r\n\t\t\t\t\tPlayer1.setForeground(Color.GREEN);\r\n\t\t\t\t\tPlayer2.setForeground(Color.red); \r\n\t\t\t\t}else { \r\n\t\t\t\t\tPlayer2.setForeground(Color.green);\r\n\t\t\t\t\tPlayer1.setForeground(Color.red); \r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tmatchStatus.setText(\" Ended\");\r\n\t\t\t\t}\r\n\t\t\t\t}",
"protected void setPlayerBackground() { Console.setBackground(Console.YELLOW); }",
"@Override\r\npublic void mouseEntered(MouseEvent arg0) {\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"public void play(MouseEvent e) {\n\t\tLogic.curComp = (JLabel) e.getComponent();\n\t\tString name = Logic.curComp.getName();\n\t\tSystem.out.println(name);\n\t\tint posx = (int) name.charAt(0) - 48;\n\t\tint posy = (int) name.charAt(1) - 48;\n\t\tint piece = Logic.arr[posx][posy]; \n\t\t\n\t\tif (moveRed(piece)) { // Checks turn && target piece is pawn or king\n\t\t\tjumping = false;\n\t\t\tprepare(posx, posy, piece, null);\n\t\t} else if (moveBlack(piece)) { // Checks turn && target piece is pawn or king\n\t\t\tjumping = false;\n\t\t\tprepare(posx, posy, piece, \"black\");\n\t\t} else if (validate(posx, posy, Playboard.red, Playboard.rKing , Playboard.redSanta, Playboard.redSKing) && finishRedMoves(piece)){ // Checks that previous component was pawn or king and that it's a legal move\n\t\t\tapplyMove(name, posx, posy, piece);\n\t\t\tnext();\n\t\t} else if (validate(posx, posy, Playboard.black, Playboard.bKing, Playboard.blackSanta, Playboard.blackSKing) && finishBlackMoves(piece)){ // Checks that previous component was pawn or king and that it's a legal move\n\t\t\tapplyMove(name, posx, posy, piece);\n\t\t\tnext();\n\t\t} else {\n\t\t\tSystem.out.println(\"Invalid move\");\n\t\t}\n\t}",
"@Override\r\npublic void mousePressed(MouseEvent arg0) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"@Override\r\n\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\tComponent com = (Component)e.getSource(); //마우스가 올라간 컴포넌트 알아냄.\r\n\t\t\tcom.setBackground(Color.GRAY);\r\n\t\t}",
"@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) \r\n\t\t\t{\n\t\t\t\tpaintComponent(getGraphics(), player);\r\n\t\t\t}",
"@Override\n public void mouseExited(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.black);\n levelPanel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }",
"Color playerOnMove() {\n return _playerOnMove;\n }",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.BLACK);\n\t}",
"@Override\n\tpublic void mouseMoved(MouseEvent e) \n\t{\n\t\tobj = program.getElementAt(e.getX(), e.getY());\n\t\tif (obj == Play) \n\t\t{\n\t\t\tPlay.setImage(\"Button/Play1.png\");\n\t\t}\n\t\telse if (obj == Settings) \n\t\t{\n\t\t\tSettings.setImage(\"Button/Settings1.png\");\n\t\t}\n\t\telse if (obj == Credits) \n\t\t{\n\t\t\tCredits.setImage(\"Button/credits1.png\");\n\t\t}\n\t\telse if (obj == Exit) \n\t\t{\n\t\t\tExit.setImage(\"Button/Exit1.png\");\n\t\t}\n\t\telse \n\t\t{\n\t\t\tPlay.setImage(\"Button/Play0.png\");\n\t\t\tSettings.setImage(\"Button/Settings0.png\");\n\t\t\tCredits.setImage(\"Button/credits0.png\");\n\t\t\tExit.setImage(\"Button/exit0.png\");\n\t\t}\n\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@FXML\n public void resetMultiplayer()\n {\n multiplayerButton.setOnMouseExited(mouseEvent -> multiplayerButton.setTextFill(Color.WHITE));\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t}",
"public static void GameOverEffect(ArrayList<JButton> myGameButton){\n enableButtons(myGameButton);\n for(int i=0; i<myGameButton.size(); ++i){\n myGameButton.get(i).setBackground(Color.red); // set buttons back-ground color\n myGameButton.get(i).setForeground(Color.white); // set buttons fore-ground color\n } \n }",
"private void updateStatusText() {\n Piece.Color playerColor = board.getTurnColor();\n\n if(board.isGameOver()) {\n if(board.isDraw()) {\n tvShowStatus.setTextColor(Color.BLUE);\n tvShowStatus.setText(\"DRAW\");\n }\n else if (board.getWinnerColor() == Piece.Color.Black) {\n tvShowStatus.setTextColor(Color.BLACK);\n tvShowStatus.setText(\"BLACK WINS\");\n }\n else {\n tvShowStatus.setTextColor(Color.WHITE);\n tvShowStatus.setText(\"WHITE WINS\");\n }\n }\n else if(playerColor == Piece.Color.Black) {\n tvShowStatus.setTextColor(Color.BLACK);\n tvShowStatus.setText(\"BLACK\");\n }\n else {\n tvShowStatus.setTextColor(Color.WHITE);\n tvShowStatus.setText(\"WHITE\");\n }\n }",
"private void onHoverHandler(MouseEvent e) {\n Circle source = (Circle) e.getSource();\n\n int selectRowIndex = GridPane.getRowIndex(source);\n int selectColumnIndex = GridPane.getColumnIndex(source);\n\n // Increment both Column and Row by 1 to display for player correctly.\n // Normally, we start at 1, not 0\n selectRowIndex++;\n selectColumnIndex++;\n coordinate.setText(\"ROW: \" + selectRowIndex + \" COL: \" + selectColumnIndex);\n\n // Reset Column back to correct order (Start counting at 0)\n selectColumnIndex--;\n checkPotentialCircle(selectColumnIndex);\n }",
"@Override\r\n\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\tComponent com = (Component)e.getSource(); //마우스가 올라간 컴포넌트 알아냄.\r\n\t\t\tcom.setBackground(Color.GRAY);\r\n\t\t}",
"@Override\r\n public void mousePressed(MouseEvent e) {\n setBackground(Color.BLUE);\r\n \r\n \r\n }",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tif(e.getSource() == start)\n\t\t\tstart.setForeground(Color.red);\n\t}",
"@Override\n\tpublic void mousePressed(MouseEvent me) {\n\t\tint x = me.getX();\n\t\tint y = me.getY();\n\t\tx = (int)( (x-mrg_x+spc_x/2) / spc_x) + nWALL;\n\t\ty = (int)( (y-mrg_y+spc_y/2) / spc_y) + nWALL;\n\t\t\n\t\tif (isPlaying && arr[x][y] == NONE) {\n\t\t// TODO Auto-generated method stub\n\t\t\t\n\t\t\t\n\t\t\tint t = (n+isWhiteWin+1) %2 ;\n\t\t\t\n\t\t\tif ( is33(x, y, (t%2==0)? WHITE:BLACK) ) {\n\t\t\t\t\n\t\t\t\tGraphics g = cvBoard.getGraphics();\n\t\t\t\tg.setColor(Color.red);\n\t\t\t\tg.drawOval((int) (mrg_x + (x-nWALL) * spc_x - spc_x/2) ,\n\t\t\t\t\t\t(int) (mrg_y + (y-nWALL) * spc_y -spc_y/2),\n\t\t\t\t\t\t(int) spc_x-1, (int) spc_y-1);\n\t\t\t\tg.fillOval((int) (mrg_x + (x-nWALL) * spc_x - spc_x/2) ,\n\t\t\t\t\t\t(int) (mrg_y + (y-nWALL) * spc_y -spc_y/2),\n\t\t\t\t\t\t(int) spc_x, (int) spc_y);\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}",
"void nextToPlay(StoneColor _nextToPlay);",
"@Override\n\tpublic void mouseExited(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.black);\n\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"public String getPlayer1Color() {\r\n return this.player1Color;\r\n }",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.orange);\n\t\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.black);\n\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\n\tpublic void mouseExited(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.BLACK);\n\t\t\n\t}",
"public void displayName(){\n player1.setText(p1.getName());\n player2.setText(p2.getName());\n }",
"@Override\n\tpublic Color getColor() {\n\t\treturn playerColor;\n\t}",
"public void hitButtonClicked()\r\n {\r\n Card hit = game.hit(\"Player\");\r\n playerCardList.get(nextPlayerIndex).setImage(hit.toGraphic());\r\n nextPlayerIndex++;\r\n if(game.checkLose())\r\n {\r\n playerLost();\r\n }\r\n }",
"@Override\r\npublic void mouseExited(MouseEvent arg0) {\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.orange);\n\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\r\n\tpublic void mousePressed(MouseEvent e) {\n\t\tl1.setText(\"You pressed the mouse\");\r\n\t}",
"@Override\n\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\tContainer c=(Container)e.getSource();\n\t\t\tc.setBackground(Color.blue);\n\t\t}",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n }",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n button.setBackground(coloursObject.getTitlePanelColour());\n }",
"private void handleMouseHover(MouseEvent mouseEvent) {\n if (simulator.isEditable()) {\n if (!alive) {\n cell.setFill(Color.LIGHTGRAY);\n } else {\n cell.setFill(Color.DARKGRAY);\n }\n }\n }",
"public void mouseClicked(MouseEvent e) {\n //The source will always be a JLabel\n JLabel source = (JLabel)e.getSource();\n if(source == view.statusText){\n model.initGame();\n return;\n }\n for(int playerHand = 0; playerHand < view.playerHands.length; playerHand++){\n for(int card = 0; card < model.highCardGame.getHand(playerHand).getNumCards(); card++){\n if(view.playerHands[playerHand][card].getIcon() == View.GUICard.getBackCardIcon())\n continue;\n if(view.playerHands[playerHand][card] == source){\n //A card was clicked.\n Model.playCard(playerHand, card);\n return;\n }\n }\n }\n }",
"@Override\r\n\t\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.DARK_GRAY);\r\n\t\t\t\t\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent me) \n\t{\n\t\tif (me.getSource() == help1)\n\t\t{\n\t\t\tusernameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfullnameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfirstNameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help2)\n\t\t{\n\t\t\ttitleInput.setBackground(Settings.SITE_ORANGE);\n\t\t\twfurlInput.setBackground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help3)\n\t\t{\n\t\t\ttypeLabel.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help4)\n\t\t{\n\t\t\tintroLabel.setForeground(Settings.SITE_ORANGE);\n\t\t\tloadIntroImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help5)\n\t\t{\n\t\t\tloadMainImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help6)\n\t\t{\n\t\t\tinstructions6.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t}",
"public void mouseOver() {\n}",
"public void pickColor(Player player, ColorPicker picker) {\n picker.setPlayer(player);\n background(0xffE3E3E3);\n\n if (player.getColor() != color(0, 0, 0)) {\n TextBox nameInput = new TextBox(player);\n if (keyPressed) {\n nameInput.keyPressed();\n }\n nameInput.draw();\n } else {\n picker.draw();\n picker.keyPressed();\n }\n\n key = 0;\n}",
"public void setLabel()\r\n {\r\n int i = Converter(Input);\r\n \r\n if(j<i && label.getText().equals(\"Player 1\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n \r\n }else if(j<i && label.getText().equals(\"Player 2\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n }else if(j<i && label.getText().equals(\"Player 3\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n }else if(j==i && label.getText().equals(\"Player \"+j))\r\n {\r\n j=1;\r\n label.setText(\"Player \"+j);\r\n }\r\n \r\n \r\n }",
"@Override\n\tpublic void currentPlayerChanged(Player player) {\n\t\tcurrentPlayerLabel.setText(player.name());\n\t}",
"private void win() {\r\n Player winner = board.win();\r\n if (winner == null)\r\n return;\r\n\r\n int winner_number;\r\n Label winner_info;\r\n Label loser_info;\r\n if (winner.getId() == 'U') {\r\n winner_info = player1info;\r\n loser_info = player2info;\r\n winner_number = 1;\r\n }\r\n else {\r\n winner_info = player2info;\r\n loser_info = player1info;\r\n winner_number = 2;\r\n }\r\n\r\n winner_info.setFont(new Font(\"Segoe UI Semibold\", 20));\r\n winner_info.setText(\"You Won!!\");\r\n loser_info.setFont(new Font(\"Segoe UI Semibold\", 20));\r\n loser_info.setText(\"You Lost :)\");\r\n\r\n for (int i = 0; i < 17; ++i)\r\n for (int j = 0; j < 17; j++) {\r\n String id = \"#cell\" + ((i < 10) ? \"0\" + i : i) + ((j < 10) ? \"0\" + j : j);\r\n AnchorPane cell = (AnchorPane) (play.getScene().lookup(id));\r\n // remove functionality\r\n cell.setOnMouseClicked(null);\r\n cell.setOnMouseEntered(null);\r\n cell.setOnMouseExited(null);\r\n if (!cup_is_on) {\r\n if (i == 6) {\r\n if (j == 6) {\r\n cell.setStyle(\"-fx-background-color: mediumaquamarine\");\r\n Label label = new Label(\"try\");\r\n label.setTextFill(Color.BLACK);\r\n label.setFont(new Font(\"Arial Rounded MT Bold\", 12));\r\n label.setAlignment(Pos.CENTER);\r\n label.setPrefSize(40, 40);\r\n cell.getChildren().add(label);\r\n if (bead1.getLayoutX() == cell.getLayoutX() && bead1.getLayoutY() == cell.getLayoutY())\r\n bead1.setVisible(false);\r\n if (bead2.getLayoutX() == cell.getLayoutX() && bead2.getLayoutY() == cell.getLayoutY())\r\n bead2.setVisible(false);\r\n }\r\n else if (j == 8) {\r\n cell.setStyle(\"-fx-background-color: mediumaquamarine\");\r\n Label label = new Label(\"again?\");\r\n label.setTextFill(Color.BLACK);\r\n label.setFont(new Font(\"Arial Rounded MT Bold\", 12));\r\n label.setAlignment(Pos.CENTER);\r\n label.setPrefSize(40, 40);\r\n cell.getChildren().add(label);\r\n if (bead1.getLayoutX() == cell.getLayoutX() && bead1.getLayoutY() == cell.getLayoutY())\r\n bead1.setVisible(false);\r\n if (bead2.getLayoutX() == cell.getLayoutX() && bead2.getLayoutY() == cell.getLayoutY())\r\n bead2.setVisible(false);\r\n }\r\n }\r\n else if(i == 8) {\r\n if (j == 6) {\r\n cell.setStyle(\"-fx-background-color: limegreen\");\r\n Label label = new Label(\"YES\");\r\n label.setTextFill(Color.BLACK);\r\n label.setFont(new Font(\"Arial Rounded MT Bold\", 12));\r\n label.setAlignment(Pos.CENTER);\r\n label.setPrefSize(40, 40);\r\n label.setOnMouseClicked(event -> {\r\n try {\r\n gotoNewGame(new Player(board.getPlayer1().getName(), 'U', 10),\r\n new Player(board.getPlayer2().getName(), 'D', 10));\r\n } catch (IOException ioException) { ioException.printStackTrace(); }\r\n });\r\n cell.getChildren().add(label);\r\n if (bead1.getLayoutX() == cell.getLayoutX() && bead1.getLayoutY() == cell.getLayoutY())\r\n bead1.setVisible(false);\r\n if (bead2.getLayoutX() == cell.getLayoutX() && bead2.getLayoutY() == cell.getLayoutY())\r\n bead2.setVisible(false);\r\n }\r\n else if (j == 8) {\r\n cell.setStyle(\"-fx-background-color: red\");\r\n Label label = new Label(\"NO\");\r\n label.setTextFill(Color.BLACK);\r\n label.setFont(new Font(\"Arial Rounded MT Bold\", 12));\r\n label.setAlignment(Pos.CENTER);\r\n label.setPrefSize(40, 40);\r\n label.setOnMouseClicked(event -> {\r\n try { gotoGameModes(); } catch (IOException ioException) {\r\n ioException.printStackTrace();\r\n }\r\n });\r\n cell.getChildren().add(label);\r\n if (bead1.getLayoutX() == cell.getLayoutX() && bead1.getLayoutY() == cell.getLayoutY())\r\n bead1.setVisible(false);\r\n if (bead2.getLayoutX() == cell.getLayoutX() && bead2.getLayoutY() == cell.getLayoutY())\r\n bead2.setVisible(false);\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (cup_is_on)\r\n cupOptimizer(winner_number);\r\n }",
"@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\tif (arg0.getSource() instanceof ChessPiece && status.getStatus().equals(GameStatus.GAME_STATUS_EDIT) && arg0.getButton() == MouseEvent.BUTTON3) {\r\n\t\t\tChessPiece p = (ChessPiece)arg0.getSource();\r\n\t\t\tif (p.chessPlayer.equals(\"black\") && p.position.charAt(1) != '1') {\r\n\t\t\t\tif (p.getText() == null) {\r\n\t\t\t\t\tp.setText(\"<html><font color=\\\"white\\\">K</font></html>\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tp.setText(null);\r\n\t\t\t\t}\r\n\t\t\t} else if (p.chessPlayer.equals(\"white\") && p.position.charAt(1) != '8'){\r\n\t\t\t\tif (p.getText() == null) {\r\n\t\t\t\t\tp.setText(\"<html><font color=\\\"black\\\">K</font></html>\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tp.setText(null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void lightPause() {\n stopPawn.setStyle(\"-fx-background-color: RED;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n movePawn.setStyle(\"-fx-background-color: null\");\n buildPawn.setStyle(\"-fx-background-color: null\");\n }",
"protected String playerListColor() {\n return cfg.getString(\"Colors.player\").toUpperCase();\n }",
"private void gameOver(Graphics g) {\n Color saved = g.getColor();\n g.setColor(new Color(0, 0, 0));\n g.setFont(new Font(\"Arial\", 20, 20));\n FontMetrics fm = g.getFontMetrics();\n centreString(OVER, g, fm, PBG.DIMENSION2 / 2);\n centreString(REPLAY, g, fm, PBG.DIMENSION2 / 2 + 50);\n g.setColor(saved);\n }",
"@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tmsg=\"\";\r\n\t\tmsg+=\" You Entered the frame\";\r\n\t\t\r\n\t\tlabel.setText(msg);\r\n\t\t\r\n\t}",
"public void notifyGameOver() {\n this.myStatusString.setText(\"Game Over\");\n final LineBorder line = new LineBorder(Color.RED, 2, true);\n this.myStatusString.setBorder(line);\n this.myStatusString.setForeground(Color.RED);\n this.myStatusString.setFont(new Font(FONT_TIMES, Font.BOLD, NUM_FONT_SIZE_BIG));\n \n }",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jLabel = (JLabel)e.getSource() ;\n\t\tjLabel.setForeground(Color.black) ;\n\t\tjLabel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)) ;\n\t}",
"private void setPlayer(BoardSquaresState player){\n\t\tif(player == BoardSquaresState.CROSS){\n\t\t\tselectedPlayer = BoardSquaresState.CROSS;\n\t\t\tplayerSelectionButton.setText(R.id.button_title, \"Cross\");\n\t\t\tplayerSelectionButton.setText(R.id.button_subtitle, \"You go first!\");\n\t\t\tplayerSelectionButton.setImageResource(R.id.selector_button_image, R.drawable.cross_1);\n\t\t\tplayerSelectionButton.setImageResource(R.id.item_set_image, R.drawable.btn_check_on_focused_holo_light);\n\t\t}\n\t\telse{\n\t\t\tselectedPlayer = BoardSquaresState.NOUGHT;\n\t\t\tplayerSelectionButton.setText(R.id.button_title, \"Nought\");\n\t\t\tplayerSelectionButton.setText(R.id.button_subtitle, \"Computer goes first!\");\n\t\t\tplayerSelectionButton.setImageResource(R.id.selector_button_image, R.drawable.nought_1);\n\t\t\tplayerSelectionButton.setImageResource(R.id.item_set_image, R.drawable.btn_check_on_focused_holo_light);\n\t\t}\n\n\t}",
"public boolean isHovered();",
"@Override\n\t\t\tpublic void mouseMove(MouseEvent e) {\n\t\t\t\tint x = e.x;\n\t\t\t\tint y = e.y;\n\t\t\t\t\n\t\t\t\tgc.setFont(new Font(mainFrame.getDisplay(),\"楷体\",40,SWT.BOLD));\n\t\t\t\tgc.setAlpha(255);\n\t\t\t\tgc.setForeground(new Color(mainFrame.getDisplay(),255,255,255));\n\t\t\t\t\n\t\t\t\tif(settingRect.contains(x,y)) {\n\t\t\t\t\t gc.drawString(\"设置选项\", 342, 285,true);\n\t\t\t\t\t changeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(helpRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"帮助信息\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(aboutRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"关于游戏\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(exitRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"退出游戏\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\telse if(onButton(classicP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"经典模式\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse if(onButton(timeP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"时间模式\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(onButton(levelP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"冒险闯关\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse if(onButton(onlineP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"联网对战\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcanvas.redraw();\n\t\t\t\t\tchangeCursor(false);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}",
"public void setCurrent(boolean isCurrent)\n {\n if(isCurrent)\n {\n playerLabel.setForeground(GUIConstants.CURRENT_COLOR);\n }\n else\n {\n playerLabel.setForeground(GUIConstants.STANDARD_COLOR);\n }\n }",
"public void mousePressed()\n{\n if(!welcomeFading)\n {\n welcomeFading = true;\n cp5.show();\n }\n if(!cp5.isMouseOver()) // check if were pressing a button\n {\n flock.AddAnimal(10, mouseX, mouseY);\n }\n}",
"public abstract void setForegroundHover(final int rgba);",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\tfor (int i = 0; i < favorites.size(); i++) {\r\n\t\t\t\t\t\tif (e.getSource().equals(jPanels.get(i)))\r\n\t\t\t\t\t\t\tjPanels.get(i).setBackground(\r\n\t\t\t\t\t\t\t\t\tnew Color(173, 175, 173, 80));\r\n\t\t\t\t\t}\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\tfor (int i = 0; i < favorites.size(); i++) {\r\n\t\t\t\t\t\tif (e.getSource().equals(jPanels.get(i)))\r\n\t\t\t\t\t\t\tjPanels.get(i).setBackground(\r\n\t\t\t\t\t\t\t\t\tnew Color(173, 175, 173, 80));\r\n\t\t\t\t\t}\r\n\t\t\t\t}",
"public void hover();",
"public PlayerColor getFirstPlayer() {\r\n return this.firstPlayer;\r\n }",
"@Override\n public void mousePressed(MouseEvent arg0) {\n yourBoardPanel[xx][yy].setBackground(new Color(175, 175, 0));\n }",
"public void nameAccepted(String name) {\n\n String c = null;\n for(PlayerInterface p : onlinePlayers){\n if(p.getNickname().equals(name)){\n c = p.getWorkerRef().get(0).getColor();\n break;\n }\n\n }\n notifyPlayerAdded(name, c);\n\n }",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"@Override\r\npublic void mouseClicked(MouseEvent e) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}"
] |
[
"0.74457985",
"0.7068642",
"0.6918731",
"0.6799224",
"0.6624195",
"0.6560291",
"0.64805484",
"0.64746594",
"0.64746594",
"0.64746594",
"0.64746594",
"0.64620256",
"0.6460264",
"0.64529353",
"0.64443904",
"0.6410446",
"0.6387461",
"0.6369308",
"0.6368521",
"0.6307471",
"0.62994957",
"0.6263433",
"0.62598324",
"0.6259024",
"0.62292033",
"0.62116146",
"0.6204758",
"0.6200775",
"0.6185985",
"0.6170007",
"0.61476934",
"0.6079266",
"0.6066208",
"0.60632676",
"0.605211",
"0.60373914",
"0.595631",
"0.5954261",
"0.59440136",
"0.59411246",
"0.59411246",
"0.59411246",
"0.59411246",
"0.5934254",
"0.5930191",
"0.5919962",
"0.5909318",
"0.59051",
"0.5890892",
"0.5867271",
"0.58613145",
"0.5816431",
"0.58098984",
"0.5806085",
"0.58032775",
"0.57968366",
"0.5795969",
"0.57900876",
"0.57783026",
"0.57762825",
"0.5772186",
"0.57721853",
"0.5766689",
"0.576494",
"0.57601273",
"0.5747552",
"0.5724811",
"0.5722601",
"0.57190156",
"0.57165277",
"0.57156545",
"0.5699127",
"0.56964976",
"0.5690549",
"0.5681575",
"0.56802166",
"0.5674863",
"0.56560636",
"0.565561",
"0.5646799",
"0.5641298",
"0.5638027",
"0.5637423",
"0.5628649",
"0.5626697",
"0.5616945",
"0.56056315",
"0.560231",
"0.5598001",
"0.5593724",
"0.55937004",
"0.5592543",
"0.5587299",
"0.5587299",
"0.5582719",
"0.55760753",
"0.5575207",
"0.55714846",
"0.55672306",
"0.5563856"
] |
0.7173504
|
1
|
WHEN THIS METHOD IS CALLED THE 'SINGLE PLAYER' LABEL WILL CHANGE BACK TO THE DEFAULT TEXT COLOR WHEN THE MOUSE IS NO LONGER HOVERING OVER IT
|
@FXML
public void resetSinglePlayer()
{
singlePlayerButton.setOnMouseExited(mouseEvent -> singlePlayerButton.setTextFill(Color.WHITE));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t\t\tPlay.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n Play.setForeground(Color.blue);\r\n\t\t\t\t}",
"@FXML\n public void highlightSinglePlayer()\n {\n singlePlayerButton.setOnMouseEntered(mouseEvent -> singlePlayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@FXML\n public void highlightMultiplayer()\n {\n multiplayerButton.setOnMouseEntered(mouseEvent -> multiplayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.blue);\r\n\t\t\t\t}",
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n }",
"protected void setPlayerBackground() { Console.setBackground(Console.YELLOW); }",
"private void setScoreText(){\n if(color != BLACK && color != WHITE){\n scoreLabel.setText(\"Score: Black - \" + calScore(BLACK) + \" White - \" + calScore(WHITE));\n }else {\n scoreLabel.setText(\"Score: \" + calScore(this.color));\n }\n }",
"@FXML\n public void resetMultiplayer()\n {\n multiplayerButton.setOnMouseExited(mouseEvent -> multiplayerButton.setTextFill(Color.WHITE));\n }",
"public void display_game_over_text () {\n\n fill(150, 100);\n rect(0, 0, displayW, displayH);\n\n textFont(myFont);\n textAlign(CENTER);\n textSize(displayH/20);\n fill(255);\n text(\"Game Over\", displayW/2, 3*displayH/7);\n\n if (score.winnerName == \"Pacmax\") {\n text(\"Winner is Pacmax! Your score is \" + score.score, displayW/2, 4*displayH/7);\n } else {\n text(\"Winner is Blinky!\", displayW/2, 4*displayH/7);\n }\n\n mySound.play_game_over_song();\n\n isKeyInputAllowed = false;\n }",
"private void updateStatusText() {\n Piece.Color playerColor = board.getTurnColor();\n\n if(board.isGameOver()) {\n if(board.isDraw()) {\n tvShowStatus.setTextColor(Color.BLUE);\n tvShowStatus.setText(\"DRAW\");\n }\n else if (board.getWinnerColor() == Piece.Color.Black) {\n tvShowStatus.setTextColor(Color.BLACK);\n tvShowStatus.setText(\"BLACK WINS\");\n }\n else {\n tvShowStatus.setTextColor(Color.WHITE);\n tvShowStatus.setText(\"WHITE WINS\");\n }\n }\n else if(playerColor == Piece.Color.Black) {\n tvShowStatus.setTextColor(Color.BLACK);\n tvShowStatus.setText(\"BLACK\");\n }\n else {\n tvShowStatus.setTextColor(Color.WHITE);\n tvShowStatus.setText(\"WHITE\");\n }\n }",
"public void changePlayer(int index) {\n currentPlayer.setText(\"Aktueller Spieler: \" + index);\n if(index == 1){\n pointsPlayer2.setOpaque(false);\n pointsPlayer1.setBackground(Color.green);\n pointsPlayer1.setOpaque(true);\n this.repaint();\n }\n else{\n pointsPlayer1.setOpaque(false);\n pointsPlayer2.setBackground(Color.green);\n pointsPlayer2.setOpaque(true);\n this.repaint();\n }\n }",
"private void changeCurrentPlayerText() {\n\t\tString currentPlayer = textFieldCurrentPlayer.getText();\n\t\tif (currentPlayer.equals(\"Player1\")) {\n\t\t\ttextFieldCurrentPlayer.setText(\"Player2\");\n\t\t} else {\n\t\t\ttextFieldCurrentPlayer.setText(\"Player1\");\n\t\t} \n\t}",
"private Label createGameOverLabel(){\n Label text;\n Label.LabelStyle textStyle;\n BitmapFont font = new BitmapFont();\n\n textStyle = new Label.LabelStyle();\n textStyle.font = font;\n\n text = new Label(\"GAME OVER\",textStyle);\n text.setAlignment(Align.center);\n text.setFontScale(4f*scale,4f*scale);\n text.setPosition(stage.getViewport().getCamera().viewportWidth * 0.5f,\n stage.getViewport().getCamera().viewportHeight * 0.80f);\n return text;\n }",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"public void displayName(){\n player1.setText(p1.getName());\n player2.setText(p2.getName());\n }",
"@Override\r\n\tpublic void update(GameContainer gc, float dt) {\n\t\tclip.setVolume(gc.getWindow().getSettings().getSfxVol());\r\n\t\thover = (gc.getInput().getMouseX() >= posX && gc.getInput().getMouseX() <= posX + width)\r\n\t\t\t\t&& (gc.getInput().getMouseY() >= posY && gc.getInput().getMouseY() <= posY + height);\r\n\t\tif ((hover && gc.getInput().isButtonUp(MouseEvent.BUTTON1))) {\r\n\t\t\tsetClicked(true);\r\n\t\t\tclip.play();\r\n\t\t}\r\n\t\tif (hover) {\r\n\t\t\tthis.color1=color2;\r\n\t\t} else\r\n\t\t\tcolor1 = temp;\r\n\t}",
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n if(type == \"close\"){//if the close button is being edited\n button.setBackground(new Color(237,64,64));//colour chosen for the \n }\n if(type == \"scale\"){//if the fullscreen button is being edited\n button.setBackground(coloursObject.getMenuPanelColour());\n }\n }",
"@Override\r\n\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t\t}",
"public void setLabel()\r\n {\r\n int i = Converter(Input);\r\n \r\n if(j<i && label.getText().equals(\"Player 1\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n \r\n }else if(j<i && label.getText().equals(\"Player 2\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n }else if(j<i && label.getText().equals(\"Player 3\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n }else if(j==i && label.getText().equals(\"Player \"+j))\r\n {\r\n j=1;\r\n label.setText(\"Player \"+j);\r\n }\r\n \r\n \r\n }",
"public void mousePressed(MouseEvent e){\r\n\t //reset the label\r\n\t if(isBlack) label.setText(\"\t\tWhite's Turn\");\r\n\t else label.setText(\"\t\tBlack's Turn\");\r\n\t \r\n //Do nothing when game is over\r\n if(gameOver) return;\r\n \r\n String colorName=isBlack?\"Black\":\"White\";\r\n\r\n //Convert coordinate to index \r\n xIndex=(e.getX()-MARGIN+GRID_SPAN/2)/GRID_SPAN;\r\n yIndex=(e.getY()-MARGIN+GRID_SPAN/2)/GRID_SPAN;\r\n\r\n //Do nothing when outside the board\r\n if(xIndex<0||xIndex>ROWS||yIndex<0||yIndex>COLS)\r\n return;\r\n\r\n //Do nothing when current position already occupied\r\n if(findChess(xIndex,yIndex))return;\r\n\r\n //if valid, Draw a new chess at current position and add index to the chessList \r\n Point ch=new Point(xIndex,yIndex,isBlack?Color.black:Color.white);\r\n chessList[chessCount++]=ch;\r\n repaint();//run paintComponent\r\n\r\n\r\n //if someone wins, give a message\r\n if(isWin()){\r\n String msg=String.format(\"Congratulations��%s won��\", colorName); \r\n JOptionPane.showMessageDialog(this, msg);\r\n gameOver=true;\r\n }\r\n isBlack=!isBlack;\r\n }",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\n public void mouseEntered(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.BLUE);\n levelPanel.setCursor(new Cursor(Cursor.HAND_CURSOR));\n }",
"private void gameOver(Graphics g) {\n Color saved = g.getColor();\n g.setColor(new Color(0, 0, 0));\n g.setFont(new Font(\"Arial\", 20, 20));\n FontMetrics fm = g.getFontMetrics();\n centreString(OVER, g, fm, PBG.DIMENSION2 / 2);\n centreString(REPLAY, g, fm, PBG.DIMENSION2 / 2 + 50);\n g.setColor(saved);\n }",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\tpublic void mouseEntered(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.orange);\n\t\t\n\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.RED);\n\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(new Color(150,190,200));//蓝色\n\t}",
"private void renderGuiGameOverMessage(SpriteBatch batch)\n {\n float x = cameraGui.viewportWidth / 2;\n float y = cameraGui.viewportHeight / 2;\n if (worldController.isGameOver())\n {\n BitmapFont fontGameOver = Assets.instance.fonts.defaultBig;\n fontGameOver.setColor(1, 0.75f, 0.25f, 1);\n fontGameOver.draw(batch, \"GAME OVER\", x, y, 0, Align.center, false);\n fontGameOver.setColor(1, 1, 1, 1);\n }\n }",
"public void setCurrent(boolean isCurrent)\n {\n if(isCurrent)\n {\n playerLabel.setForeground(GUIConstants.CURRENT_COLOR);\n }\n else\n {\n playerLabel.setForeground(GUIConstants.STANDARD_COLOR);\n }\n }",
"public void toggle() {\n if (currentPlayer.equals(\"red\")) {\n currentColor = BLUE_COLOUR;\n currentPlayer = \"blue\";\n } else {\n currentColor = RED_COLOUR;\n currentPlayer = \"red\";\n }\n //change color of grid\n changeColor();\n }",
"@Override\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\tif(match.getMatchStatus() != MatchStatus.ENDED) {\r\n\t\t\t\t\t\t\tmatch.simMatch(); \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (p1==match.getWinner()) { \r\n\t\t\t\t\t\t\t\tPlayer1.setForeground(Color.GREEN);\r\n\t\t\t\t\t\t\t\tPlayer2.setForeground(Color.red); \r\n\t\t\t\t\t\t\t}else { \r\n\t\t\t\t\t\t\t\tPlayer2.setForeground(Color.green);\r\n\t\t\t\t\t\t\t\tPlayer1.setForeground(Color.red); \r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\tmatchStatus.setText(\" Ended\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}",
"private void setHoverDisplay(String text, Vector3 coords) {\n\t\tfloat scaleFactor = 1920 / (Gdx.graphics.getWidth() * 1.0f);\n\t\tfloat x = coords.x * scaleFactor + 50;\n\t\tfloat y = coords.y * scaleFactor - 125;\n\t\tx = Math.min(Math.max(x, 0), 1920 - hoverImage.getWidth());\n\t\ty = Math.min(Math.max(y, 200), 1080 - hoverImage.getHeight());\n\t\thoverLabel.setText(text);\n\t\thoverLabel.setPosition(x + 75, y + 155);\n\t\tif (!text.equals(\"\")) {\n\t\t\thoverImage.setVisible(true);\n\t\t\thoverImage.setPosition(x, y);\n\t\t}\n\t}",
"@Override\n\t\t\tpublic void mouseMove(MouseEvent e) {\n\t\t\t\tint x = e.x;\n\t\t\t\tint y = e.y;\n\t\t\t\t\n\t\t\t\tgc.setFont(new Font(mainFrame.getDisplay(),\"楷体\",40,SWT.BOLD));\n\t\t\t\tgc.setAlpha(255);\n\t\t\t\tgc.setForeground(new Color(mainFrame.getDisplay(),255,255,255));\n\t\t\t\t\n\t\t\t\tif(settingRect.contains(x,y)) {\n\t\t\t\t\t gc.drawString(\"设置选项\", 342, 285,true);\n\t\t\t\t\t changeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(helpRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"帮助信息\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(aboutRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"关于游戏\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(exitRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"退出游戏\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\telse if(onButton(classicP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"经典模式\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse if(onButton(timeP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"时间模式\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(onButton(levelP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"冒险闯关\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse if(onButton(onlineP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"联网对战\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcanvas.redraw();\n\t\t\t\t\tchangeCursor(false);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.red);\r\n\t\t\t\t}",
"@Override\n\tpublic void currentPlayerChanged(Player player) {\n\t\tcurrentPlayerLabel.setText(player.name());\n\t}",
"@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\tif(match.getMatchStatus() != MatchStatus.ENDED) {\r\n\t\t\t\tmatch.simMatch(); \r\n\t\t\t\t\r\n\t\t\t\tif (p1==match.getWinner()) { \r\n\t\t\t\t\tPlayer1.setForeground(Color.GREEN);\r\n\t\t\t\t\tPlayer2.setForeground(Color.red); \r\n\t\t\t\t}else { \r\n\t\t\t\t\tPlayer2.setForeground(Color.green);\r\n\t\t\t\t\tPlayer1.setForeground(Color.red); \r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tmatchStatus.setText(\" Ended\");\r\n\t\t\t\t}\r\n\t\t\t\t}",
"@Override\n public void mouseExited(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.black);\n levelPanel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }",
"private void renderGuiGameOverMessage (SpriteBatch batch)\n\t{\n\t\tfloat x = cameraGUI.viewportWidth / 2;\n\t\tfloat y = cameraGUI.viewportHeight / 2;\n\t\t\n\t\tif (worldController.isGameOver())\n\t\t{\n\t\t\tBitmapFont fontGameOver = Assets.instance.fonts.defaultBig;\n\t\t\tfontGameOver.setColor(1, 0.75f, 0.25f, 1);\n\t\t\t\n\n\t\t\tfontGameOver.draw(batch, \"GAME OVER\", x, y, 1, Align.center, false);\n\t\t\t\n\t\t\tfontGameOver.setColor(1, 1, 1, 1);\n\t\t}\n\t}",
"@Override\n public void gameOver() {\n messagePanel.showMessage(image);\n setEnabled(false);\n }",
"public static void showPreviousPlayerNames() {\r\n\t\tGameSetup.choiceBoxPlayer1.select(Main.player1);\r\n\t\tGameSetup.choiceBoxPlayer2.select(Main.player2);\r\n\t\tGameSetup.choiceBoxPlayer3.select(Main.player3);\r\n\t\t\r\n\t\t//Don't show fourth player if playing 3 handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tGameSetup.choiceBoxPlayer4.select(Main.player4);\r\n\t\t}\r\n\t}",
"public void displayHover() {\n if (textColour == null) {\r\n displayEmptyHover();\r\n return;\r\n }\r\n stroke(0, 0, 0);\r\n strokeWeight(strokeWeight);\r\n hoverFill(boxColour);\r\n if (strokeWeight != 0 && text != null) {\r\n rect(x, y, w, h, 7);\r\n }\r\n fill(textColour);\r\n textSize(textSize);\r\n text(text, x + xTextOffset, y + yTextOffset);\r\n }",
"@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\tif (arg0.getSource() instanceof ChessPiece && status.getStatus().equals(GameStatus.GAME_STATUS_EDIT) && arg0.getButton() == MouseEvent.BUTTON3) {\r\n\t\t\tChessPiece p = (ChessPiece)arg0.getSource();\r\n\t\t\tif (p.chessPlayer.equals(\"black\") && p.position.charAt(1) != '1') {\r\n\t\t\t\tif (p.getText() == null) {\r\n\t\t\t\t\tp.setText(\"<html><font color=\\\"white\\\">K</font></html>\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tp.setText(null);\r\n\t\t\t\t}\r\n\t\t\t} else if (p.chessPlayer.equals(\"white\") && p.position.charAt(1) != '8'){\r\n\t\t\t\tif (p.getText() == null) {\r\n\t\t\t\t\tp.setText(\"<html><font color=\\\"black\\\">K</font></html>\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tp.setText(null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void gameOver() {\n\t\tframe.setTitle(frame.getTitle() + \" - Game Over\");\n\t}",
"public void displayGameOver() {\n\t\tthis.theScreen.setFont(Preferences.GAME_OVER_FONT);\n\t\tthis.theScreen.setColor(Preferences.GAME_OVER_COLOR);\n\t\tthis.theScreen.drawString(Preferences.GAME_OVER_TEXT,\n\t\t\t\tPreferences.GAME_OVER_X, Preferences.GAME_OVER_Y);\n\t}",
"@Override\r\n\tpublic void mousePressed(MouseEvent e) {\n\t\tl1.setText(\"You pressed the mouse\");\r\n\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.blue);\n\t}",
"public void gameOver()\r\n {\n addObject(new Text(\"Game Over\"), 550, 300);\r\n backgroundMusic.pause();\r\n Greenfoot.stop();\r\n }",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n }",
"@Override\n\tpublic void mouseMoved(MouseEvent e) \n\t{\n\t\tobj = program.getElementAt(e.getX(), e.getY());\n\t\tif (obj == Play) \n\t\t{\n\t\t\tPlay.setImage(\"Button/Play1.png\");\n\t\t}\n\t\telse if (obj == Settings) \n\t\t{\n\t\t\tSettings.setImage(\"Button/Settings1.png\");\n\t\t}\n\t\telse if (obj == Credits) \n\t\t{\n\t\t\tCredits.setImage(\"Button/credits1.png\");\n\t\t}\n\t\telse if (obj == Exit) \n\t\t{\n\t\t\tExit.setImage(\"Button/Exit1.png\");\n\t\t}\n\t\telse \n\t\t{\n\t\t\tPlay.setImage(\"Button/Play0.png\");\n\t\t\tSettings.setImage(\"Button/Settings0.png\");\n\t\t\tCredits.setImage(\"Button/credits0.png\");\n\t\t\tExit.setImage(\"Button/exit0.png\");\n\t\t}\n\t}",
"public void play(MouseEvent e) {\n\t\tLogic.curComp = (JLabel) e.getComponent();\n\t\tString name = Logic.curComp.getName();\n\t\tSystem.out.println(name);\n\t\tint posx = (int) name.charAt(0) - 48;\n\t\tint posy = (int) name.charAt(1) - 48;\n\t\tint piece = Logic.arr[posx][posy]; \n\t\t\n\t\tif (moveRed(piece)) { // Checks turn && target piece is pawn or king\n\t\t\tjumping = false;\n\t\t\tprepare(posx, posy, piece, null);\n\t\t} else if (moveBlack(piece)) { // Checks turn && target piece is pawn or king\n\t\t\tjumping = false;\n\t\t\tprepare(posx, posy, piece, \"black\");\n\t\t} else if (validate(posx, posy, Playboard.red, Playboard.rKing , Playboard.redSanta, Playboard.redSKing) && finishRedMoves(piece)){ // Checks that previous component was pawn or king and that it's a legal move\n\t\t\tapplyMove(name, posx, posy, piece);\n\t\t\tnext();\n\t\t} else if (validate(posx, posy, Playboard.black, Playboard.bKing, Playboard.blackSanta, Playboard.blackSKing) && finishBlackMoves(piece)){ // Checks that previous component was pawn or king and that it's a legal move\n\t\t\tapplyMove(name, posx, posy, piece);\n\t\t\tnext();\n\t\t} else {\n\t\t\tSystem.out.println(\"Invalid move\");\n\t\t}\n\t}",
"public void notifyGameOver() {\n this.myStatusString.setText(\"Game Over\");\n final LineBorder line = new LineBorder(Color.RED, 2, true);\n this.myStatusString.setBorder(line);\n this.myStatusString.setForeground(Color.RED);\n this.myStatusString.setFont(new Font(FONT_TIMES, Font.BOLD, NUM_FONT_SIZE_BIG));\n \n }",
"@Override\n public void setDefaultTarget() {\n hovered = AbstractDungeon.player;\n }",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n button.setBackground(coloursObject.getTitlePanelColour());\n }",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tmsg=\"\";\r\n\t\tmsg+=\" You Entered the frame\";\r\n\t\t\r\n\t\tlabel.setText(msg);\r\n\t\t\r\n\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.BLACK);\n\t}",
"public void changeLableText(int playerScore,int computerScore);",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tif(isRecognition) {\n\t\t\t\t\t\t\talpha *= 0.95f;\n//\t\t\t\t\t\t\tsetBackgroundColor((int) (255 * (1 - label) * alpha));\n\t\t\t\t\t\t\ttxtHandParts.setTextColor(Color.argb((int) (alpha * 255), 255,\n\t\t\t\t\t\t\t\t\t255, 255));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(alpha > 0.1f) {\n\t\t\t\t\t\t\t\tLog.d(LOGTAG, (int) (255 * (1 - label) * alpha)+\"\");\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}\n\t\t\t\t});\n\t\t\t}",
"@Override\n protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)\n {\n this.fontRenderer.drawString(this.toolboxInv.getDisplayName().getUnformattedText(), 8, 6, 4210752);\n this.fontRenderer.drawString(this.playerInv.getDisplayName().getUnformattedText(), 8, this.ySize - 96 + 2, 4210752);\n }",
"public void screenText(Canvas canvas){\n Paint paint = new Paint();\n paint.setColor(Color.WHITE);\n paint.setTextSize(30);\n paint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));\n canvas.drawText(\"Score: \"+ (newPlayer.getScore()), 10, height-10, paint);\n canvas.drawText(\"Best Score: \"+ getRecord(), width-215, height-10, paint);\n canvas.drawText(\"Level: \" + level, 10, height-550, paint);\n\n //If the game is reset will run a seperate screen text\n if (!newPlayer.getRunning()&&gamenew&&reset){\n Paint newPaint = new Paint();\n newPaint.setTextSize(40);\n newPaint.setColor(Color.WHITE);\n newPaint.setTypeface(Typeface.create(Typeface.DEFAULT,Typeface.BOLD));\n canvas.drawText(\"Click to start!\", width/2-50, height/2, newPaint);\n\n newPaint.setTextSize(20);\n canvas.drawText(\"Press and hold for the ship to hover up\", width/2-50,height/2+20,newPaint);\n canvas.drawText(\"Release to let the ship go down!\", width/2-50,height/2+40,newPaint);\n }\n\n }",
"public void setCurrentPlayer(String nick) {\n\n for (int i = 0; i < nicknames.size(); i++)\n if (nicknames.get(i).getText().equals(nick)) {\n nicknames.get(i).setForeground(new Color(199, 0, 0));\n nicknames.get(i).setFont(currentPlayerFont);\n }else{\n\n nicknames.get(i).setForeground(Color.BLACK);\n nicknames.get(i).setFont(notCurrentPlayerFont);\n }\n\n }",
"@Override\r\n\tpublic void mouseMoved(MouseEvent e) {\n\t\tl1.setText(\"You moved the mouse\"+e.getX()+\",\"+e.getY());\r\n\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t}",
"private void updateTurnLabel()\r\n\t{\r\n\t\tPlayer currPlayer = cantStop.getGameBoard().getCurrentPlayer();\r\n\t\tpTurnLabel.setText( currPlayer.getName() + \"'s turn.\");\r\n\t}",
"@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) \r\n\t\t\t{\n\t\t\t\tpaintComponent(getGraphics(), player);\r\n\t\t\t}",
"void start() {\n myGameOver = false;\n myDisplay.setCurrent(this);\n repaint();\n }",
"private void setPlayer(BoardSquaresState player){\n\t\tif(player == BoardSquaresState.CROSS){\n\t\t\tselectedPlayer = BoardSquaresState.CROSS;\n\t\t\tplayerSelectionButton.setText(R.id.button_title, \"Cross\");\n\t\t\tplayerSelectionButton.setText(R.id.button_subtitle, \"You go first!\");\n\t\t\tplayerSelectionButton.setImageResource(R.id.selector_button_image, R.drawable.cross_1);\n\t\t\tplayerSelectionButton.setImageResource(R.id.item_set_image, R.drawable.btn_check_on_focused_holo_light);\n\t\t}\n\t\telse{\n\t\t\tselectedPlayer = BoardSquaresState.NOUGHT;\n\t\t\tplayerSelectionButton.setText(R.id.button_title, \"Nought\");\n\t\t\tplayerSelectionButton.setText(R.id.button_subtitle, \"Computer goes first!\");\n\t\t\tplayerSelectionButton.setImageResource(R.id.selector_button_image, R.drawable.nought_1);\n\t\t\tplayerSelectionButton.setImageResource(R.id.item_set_image, R.drawable.btn_check_on_focused_holo_light);\n\t\t}\n\n\t}",
"@Override\r\n\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\tComponent com = (Component)e.getSource(); //마우스가 올라간 컴포넌트 알아냄.\r\n\t\t\tcom.setBackground(Color.GRAY);\r\n\t\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent me) \n\t{\n\t\tif (me.getSource() == help1)\n\t\t{\n\t\t\tusernameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfullnameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfirstNameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help2)\n\t\t{\n\t\t\ttitleInput.setBackground(Settings.SITE_ORANGE);\n\t\t\twfurlInput.setBackground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help3)\n\t\t{\n\t\t\ttypeLabel.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help4)\n\t\t{\n\t\t\tintroLabel.setForeground(Settings.SITE_ORANGE);\n\t\t\tloadIntroImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help5)\n\t\t{\n\t\t\tloadMainImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help6)\n\t\t{\n\t\t\tinstructions6.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t}",
"public void update(){\n y -= 1; // Making the text float up\n // Making the text more transparent\n color = new Color(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha() - 2);\n }",
"public void changeLivesDisplay()\r\n {\r\n removeObject(text);\r\n //Add the lives text\r\n text = new Text(\"Lives: \" + health);\r\n addObject(text, 60, 15);\r\n }",
"private void drawCurrentCodeBlockLabelBg(Canvas canvas) {\n if(mCursor.isSelected() || !mPaintLabel) {\n return;\n }\n int pos = mCursorPosition;\n if(pos == -1) {\n return;\n }\n List<BlockLine> blocks = mSpanner == null ? null : mSpanner.getColors().getBlocks();\n BlockLine block = (blocks != null && blocks.size() > pos) ? blocks.get(pos) : null;\n if(block != null) {\n int left = mCursor.getLeftLine();\n int color = mColors.getColor(ColorScheme.LINE_BLOCK_LABEL);\n if(block.startLine != left) {\n drawLineBackground(canvas,color,block.startLine);\n }\n if(block.endLine != left) {\n drawLineBackground(canvas,color,block.endLine);\n }\n }\n }",
"Player getSelectedPlayer();",
"public void lightPause() {\n stopPawn.setStyle(\"-fx-background-color: RED;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n movePawn.setStyle(\"-fx-background-color: null\");\n buildPawn.setStyle(\"-fx-background-color: null\");\n }",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.orange);\n\t\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\tpublic void mouseExited(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.BLACK);\n\t\t\n\t}",
"protected String playerListColor() {\n return cfg.getString(\"Colors.player\").toUpperCase();\n }",
"private void startGame(){\n try {\n String playersName = fromServer.readUTF();\n lbPl1.setText(playersName.split(POINTS_DELIMITER)[0]);\n lbPl2.setText(playersName.split(POINTS_DELIMITER)[1]);\n lbWhiteStone.setIcon(whiteIcon);\n// lbWhiteStone.setText(playersName.split(POINTS_DELIMITER)[1]);\n lbBlackStone.setIcon(blackIcon);\n// lbBlackStone.setText(playersName.split(POINTS_DELIMITER)[0]);\n\n boardComponent.initiate();\n boardComponent.repaint();\n setScoreText();\n if(this.color == 0) {\n setMsgText(\"\");\n colorLabel.setText(\"You are a viewer.\");\n setButtons(false);\n btnNewGame.setEnabled(false);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\r\npublic void mouseEntered(MouseEvent arg0) {\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jLabel = (JLabel)e.getSource() ;\n\t\tjLabel.setForeground(Color.black) ;\n\t\tjLabel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)) ;\n\t}",
"private void highlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.RED, new TicksTiming(0), new TicksTiming(0));\r\n\t }",
"public abstract String getGameOverText();",
"@Override\r\npublic void mousePressed(MouseEvent arg0) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"public String getPlayer1Color() {\r\n return this.player1Color;\r\n }",
"private void win() {\r\n Player winner = board.win();\r\n if (winner == null)\r\n return;\r\n\r\n int winner_number;\r\n Label winner_info;\r\n Label loser_info;\r\n if (winner.getId() == 'U') {\r\n winner_info = player1info;\r\n loser_info = player2info;\r\n winner_number = 1;\r\n }\r\n else {\r\n winner_info = player2info;\r\n loser_info = player1info;\r\n winner_number = 2;\r\n }\r\n\r\n winner_info.setFont(new Font(\"Segoe UI Semibold\", 20));\r\n winner_info.setText(\"You Won!!\");\r\n loser_info.setFont(new Font(\"Segoe UI Semibold\", 20));\r\n loser_info.setText(\"You Lost :)\");\r\n\r\n for (int i = 0; i < 17; ++i)\r\n for (int j = 0; j < 17; j++) {\r\n String id = \"#cell\" + ((i < 10) ? \"0\" + i : i) + ((j < 10) ? \"0\" + j : j);\r\n AnchorPane cell = (AnchorPane) (play.getScene().lookup(id));\r\n // remove functionality\r\n cell.setOnMouseClicked(null);\r\n cell.setOnMouseEntered(null);\r\n cell.setOnMouseExited(null);\r\n if (!cup_is_on) {\r\n if (i == 6) {\r\n if (j == 6) {\r\n cell.setStyle(\"-fx-background-color: mediumaquamarine\");\r\n Label label = new Label(\"try\");\r\n label.setTextFill(Color.BLACK);\r\n label.setFont(new Font(\"Arial Rounded MT Bold\", 12));\r\n label.setAlignment(Pos.CENTER);\r\n label.setPrefSize(40, 40);\r\n cell.getChildren().add(label);\r\n if (bead1.getLayoutX() == cell.getLayoutX() && bead1.getLayoutY() == cell.getLayoutY())\r\n bead1.setVisible(false);\r\n if (bead2.getLayoutX() == cell.getLayoutX() && bead2.getLayoutY() == cell.getLayoutY())\r\n bead2.setVisible(false);\r\n }\r\n else if (j == 8) {\r\n cell.setStyle(\"-fx-background-color: mediumaquamarine\");\r\n Label label = new Label(\"again?\");\r\n label.setTextFill(Color.BLACK);\r\n label.setFont(new Font(\"Arial Rounded MT Bold\", 12));\r\n label.setAlignment(Pos.CENTER);\r\n label.setPrefSize(40, 40);\r\n cell.getChildren().add(label);\r\n if (bead1.getLayoutX() == cell.getLayoutX() && bead1.getLayoutY() == cell.getLayoutY())\r\n bead1.setVisible(false);\r\n if (bead2.getLayoutX() == cell.getLayoutX() && bead2.getLayoutY() == cell.getLayoutY())\r\n bead2.setVisible(false);\r\n }\r\n }\r\n else if(i == 8) {\r\n if (j == 6) {\r\n cell.setStyle(\"-fx-background-color: limegreen\");\r\n Label label = new Label(\"YES\");\r\n label.setTextFill(Color.BLACK);\r\n label.setFont(new Font(\"Arial Rounded MT Bold\", 12));\r\n label.setAlignment(Pos.CENTER);\r\n label.setPrefSize(40, 40);\r\n label.setOnMouseClicked(event -> {\r\n try {\r\n gotoNewGame(new Player(board.getPlayer1().getName(), 'U', 10),\r\n new Player(board.getPlayer2().getName(), 'D', 10));\r\n } catch (IOException ioException) { ioException.printStackTrace(); }\r\n });\r\n cell.getChildren().add(label);\r\n if (bead1.getLayoutX() == cell.getLayoutX() && bead1.getLayoutY() == cell.getLayoutY())\r\n bead1.setVisible(false);\r\n if (bead2.getLayoutX() == cell.getLayoutX() && bead2.getLayoutY() == cell.getLayoutY())\r\n bead2.setVisible(false);\r\n }\r\n else if (j == 8) {\r\n cell.setStyle(\"-fx-background-color: red\");\r\n Label label = new Label(\"NO\");\r\n label.setTextFill(Color.BLACK);\r\n label.setFont(new Font(\"Arial Rounded MT Bold\", 12));\r\n label.setAlignment(Pos.CENTER);\r\n label.setPrefSize(40, 40);\r\n label.setOnMouseClicked(event -> {\r\n try { gotoGameModes(); } catch (IOException ioException) {\r\n ioException.printStackTrace();\r\n }\r\n });\r\n cell.getChildren().add(label);\r\n if (bead1.getLayoutX() == cell.getLayoutX() && bead1.getLayoutY() == cell.getLayoutY())\r\n bead1.setVisible(false);\r\n if (bead2.getLayoutX() == cell.getLayoutX() && bead2.getLayoutY() == cell.getLayoutY())\r\n bead2.setVisible(false);\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (cup_is_on)\r\n cupOptimizer(winner_number);\r\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.orange);\n\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t\t\t\t\t\t}",
"private void pauseAndPlay(Label textId) {\n textId.setVisible(false);\n textId.setText(\"O\");\n PauseTransition pause = new PauseTransition(Duration.seconds(1));\n pause.setOnFinished(event -> enableAll(textId));\n pause.play();\n\n }"
] |
[
"0.72617406",
"0.68760914",
"0.68516254",
"0.6602688",
"0.6366173",
"0.63638675",
"0.624103",
"0.623306",
"0.620269",
"0.6202467",
"0.61554384",
"0.6143652",
"0.6123331",
"0.60854894",
"0.60361004",
"0.60292155",
"0.6028257",
"0.60253423",
"0.6018459",
"0.6009734",
"0.60021216",
"0.59876704",
"0.5983697",
"0.5979643",
"0.5966825",
"0.59217197",
"0.5897892",
"0.5897892",
"0.5897892",
"0.5897892",
"0.58919716",
"0.58794",
"0.58746165",
"0.5871288",
"0.58579916",
"0.58541405",
"0.58311296",
"0.58257985",
"0.58247066",
"0.5812041",
"0.57880414",
"0.57852423",
"0.57844514",
"0.577564",
"0.57744807",
"0.57633156",
"0.5762366",
"0.57602936",
"0.57493937",
"0.57443535",
"0.5734601",
"0.5729519",
"0.57271814",
"0.5703544",
"0.5698575",
"0.56935686",
"0.5690457",
"0.5690007",
"0.5684236",
"0.56802696",
"0.565079",
"0.56504554",
"0.5623764",
"0.5623308",
"0.56210595",
"0.56210554",
"0.5588411",
"0.5588411",
"0.5588411",
"0.5588411",
"0.55858505",
"0.5585819",
"0.55845684",
"0.5572932",
"0.55718404",
"0.55682397",
"0.555461",
"0.55418986",
"0.553136",
"0.55243784",
"0.5521726",
"0.5509893",
"0.55087626",
"0.5506967",
"0.5499322",
"0.54956585",
"0.54938006",
"0.54934984",
"0.54899246",
"0.5489253",
"0.5482938",
"0.5482408",
"0.5481896",
"0.5474337",
"0.54734945",
"0.5471803",
"0.5470452",
"0.5469546",
"0.5466918",
"0.5460794"
] |
0.64958143
|
4
|
WHEN THIS METHOD IS CALLED THE 'MULTIPLAYER' LABEL WILL CHANGE COLOR WHEN THE MOUSE IS HOVERING OVER IT
|
@FXML
public void highlightMultiplayer()
{
multiplayerButton.setOnMouseEntered(mouseEvent -> multiplayerButton.setTextFill(Color.valueOf("#FFD700")));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t\t\tPlay.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n Play.setForeground(Color.blue);\r\n\t\t\t\t}",
"@FXML\n public void highlightSinglePlayer()\n {\n singlePlayerButton.setOnMouseEntered(mouseEvent -> singlePlayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n }",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.blue);\r\n\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.RED);\n\t}",
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n if(type == \"close\"){//if the close button is being edited\n button.setBackground(new Color(237,64,64));//colour chosen for the \n }\n if(type == \"scale\"){//if the fullscreen button is being edited\n button.setBackground(coloursObject.getMenuPanelColour());\n }\n }",
"@Override\r\n\tpublic void update(GameContainer gc, float dt) {\n\t\tclip.setVolume(gc.getWindow().getSettings().getSfxVol());\r\n\t\thover = (gc.getInput().getMouseX() >= posX && gc.getInput().getMouseX() <= posX + width)\r\n\t\t\t\t&& (gc.getInput().getMouseY() >= posY && gc.getInput().getMouseY() <= posY + height);\r\n\t\tif ((hover && gc.getInput().isButtonUp(MouseEvent.BUTTON1))) {\r\n\t\t\tsetClicked(true);\r\n\t\t\tclip.play();\r\n\t\t}\r\n\t\tif (hover) {\r\n\t\t\tthis.color1=color2;\r\n\t\t} else\r\n\t\t\tcolor1 = temp;\r\n\t}",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t}",
"@Override\n\tpublic void mouseEntered(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.orange);\n\t\t\n\t}",
"@Override\r\n\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t\t}",
"@Override\n public void mouseEntered(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.BLUE);\n levelPanel.setCursor(new Cursor(Cursor.HAND_CURSOR));\n }",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(new Color(150,190,200));//蓝色\n\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.blue);\n\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\r\npublic void mouseEntered(MouseEvent arg0) {\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.red);\r\n\t\t\t\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\n public void mouseExited(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.black);\n levelPanel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.BLACK);\n\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"public void mousePressed(MouseEvent e){\r\n\t //reset the label\r\n\t if(isBlack) label.setText(\"\t\tWhite's Turn\");\r\n\t else label.setText(\"\t\tBlack's Turn\");\r\n\t \r\n //Do nothing when game is over\r\n if(gameOver) return;\r\n \r\n String colorName=isBlack?\"Black\":\"White\";\r\n\r\n //Convert coordinate to index \r\n xIndex=(e.getX()-MARGIN+GRID_SPAN/2)/GRID_SPAN;\r\n yIndex=(e.getY()-MARGIN+GRID_SPAN/2)/GRID_SPAN;\r\n\r\n //Do nothing when outside the board\r\n if(xIndex<0||xIndex>ROWS||yIndex<0||yIndex>COLS)\r\n return;\r\n\r\n //Do nothing when current position already occupied\r\n if(findChess(xIndex,yIndex))return;\r\n\r\n //if valid, Draw a new chess at current position and add index to the chessList \r\n Point ch=new Point(xIndex,yIndex,isBlack?Color.black:Color.white);\r\n chessList[chessCount++]=ch;\r\n repaint();//run paintComponent\r\n\r\n\r\n //if someone wins, give a message\r\n if(isWin()){\r\n String msg=String.format(\"Congratulations��%s won��\", colorName); \r\n JOptionPane.showMessageDialog(this, msg);\r\n gameOver=true;\r\n }\r\n isBlack=!isBlack;\r\n }",
"@Override\n\tpublic void mouseExited(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.black);\n\t}",
"@Override\r\npublic void mouseExited(MouseEvent arg0) {\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"@Override\r\npublic void mousePressed(MouseEvent arg0) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.black);\n\t}",
"@Override\n\tpublic void mouseExited(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.BLACK);\n\t\t\n\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"public abstract void setForegroundHover(final int rgba);",
"public void toggle() {\n if (currentPlayer.equals(\"red\")) {\n currentColor = BLUE_COLOUR;\n currentPlayer = \"blue\";\n } else {\n currentColor = RED_COLOUR;\n currentPlayer = \"red\";\n }\n //change color of grid\n changeColor();\n }",
"@Override\r\n\t\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.DARK_GRAY);\r\n\t\t\t\t\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\tif(match.getMatchStatus() != MatchStatus.ENDED) {\r\n\t\t\t\tmatch.simMatch(); \r\n\t\t\t\t\r\n\t\t\t\tif (p1==match.getWinner()) { \r\n\t\t\t\t\tPlayer1.setForeground(Color.GREEN);\r\n\t\t\t\t\tPlayer2.setForeground(Color.red); \r\n\t\t\t\t}else { \r\n\t\t\t\t\tPlayer2.setForeground(Color.green);\r\n\t\t\t\t\tPlayer1.setForeground(Color.red); \r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tmatchStatus.setText(\" Ended\");\r\n\t\t\t\t}\r\n\t\t\t\t}",
"@Override\r\n public void mousePressed(MouseEvent e) {\n setBackground(Color.BLUE);\r\n \r\n \r\n }",
"protected void setPlayerBackground() { Console.setBackground(Console.YELLOW); }",
"@Override\r\n\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\tComponent com = (Component)e.getSource(); //마우스가 올라간 컴포넌트 알아냄.\r\n\t\t\tcom.setBackground(Color.GRAY);\r\n\t\t}",
"@Override\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\tif(match.getMatchStatus() != MatchStatus.ENDED) {\r\n\t\t\t\t\t\t\tmatch.simMatch(); \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (p1==match.getWinner()) { \r\n\t\t\t\t\t\t\t\tPlayer1.setForeground(Color.GREEN);\r\n\t\t\t\t\t\t\t\tPlayer2.setForeground(Color.red); \r\n\t\t\t\t\t\t\t}else { \r\n\t\t\t\t\t\t\t\tPlayer2.setForeground(Color.green);\r\n\t\t\t\t\t\t\t\tPlayer1.setForeground(Color.red); \r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\tmatchStatus.setText(\" Ended\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"public static void GameOverEffect(ArrayList<JButton> myGameButton){\n enableButtons(myGameButton);\n for(int i=0; i<myGameButton.size(); ++i){\n myGameButton.get(i).setBackground(Color.red); // set buttons back-ground color\n myGameButton.get(i).setForeground(Color.white); // set buttons fore-ground color\n } \n }",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n }",
"@Override\r\n\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\tComponent com = (Component)e.getSource(); //마우스가 올라간 컴포넌트 알아냄.\r\n\t\t\tcom.setBackground(Color.GRAY);\r\n\t\t}",
"@FXML\n public void resetMultiplayer()\n {\n multiplayerButton.setOnMouseExited(mouseEvent -> multiplayerButton.setTextFill(Color.WHITE));\n }",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n button.setBackground(coloursObject.getTitlePanelColour());\n }",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tif(e.getSource() == start)\n\t\t\tstart.setForeground(Color.red);\n\t}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jLabel = (JLabel)e.getSource() ;\n\t\tjLabel.setForeground(Color.black) ;\n\t\tjLabel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)) ;\n\t}",
"public void changePlayer(int index) {\n currentPlayer.setText(\"Aktueller Spieler: \" + index);\n if(index == 1){\n pointsPlayer2.setOpaque(false);\n pointsPlayer1.setBackground(Color.green);\n pointsPlayer1.setOpaque(true);\n this.repaint();\n }\n else{\n pointsPlayer1.setOpaque(false);\n pointsPlayer2.setBackground(Color.green);\n pointsPlayer2.setOpaque(true);\n this.repaint();\n }\n }",
"@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) \r\n\t\t\t{\n\t\t\t\tpaintComponent(getGraphics(), player);\r\n\t\t\t}",
"@Override\n\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\tContainer c=(Container)e.getSource();\n\t\t\tc.setBackground(Color.blue);\n\t\t}",
"@Override\n protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {\n }",
"public void mouseOver() {\n}",
"private void onHoverHandler(MouseEvent e) {\n Circle source = (Circle) e.getSource();\n\n int selectRowIndex = GridPane.getRowIndex(source);\n int selectColumnIndex = GridPane.getColumnIndex(source);\n\n // Increment both Column and Row by 1 to display for player correctly.\n // Normally, we start at 1, not 0\n selectRowIndex++;\n selectColumnIndex++;\n coordinate.setText(\"ROW: \" + selectRowIndex + \" COL: \" + selectColumnIndex);\n\n // Reset Column back to correct order (Start counting at 0)\n selectColumnIndex--;\n checkPotentialCircle(selectColumnIndex);\n }",
"@FXML\n public void resetSinglePlayer()\n {\n singlePlayerButton.setOnMouseExited(mouseEvent -> singlePlayerButton.setTextFill(Color.WHITE));\n }",
"@Override\n public void touchAction() {\n if (!isDisabled()) {\n if (colorAction != null)\n opponentLabel.removeAction(colorAction);\n colorAction = MyActions.getTouchAction(LightBlocksGame.COLOR_FOCUSSED_ACTOR, getColor());\n opponentLabel.addAction(colorAction);\n }\n }",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tif(e.getSource() == start)\n\t\t\tstart.setForeground(new Color(206, 124, 24));\n\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent me) \n\t{\n\t\tif (me.getSource() == help1)\n\t\t{\n\t\t\tusernameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfullnameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfirstNameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help2)\n\t\t{\n\t\t\ttitleInput.setBackground(Settings.SITE_ORANGE);\n\t\t\twfurlInput.setBackground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help3)\n\t\t{\n\t\t\ttypeLabel.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help4)\n\t\t{\n\t\t\tintroLabel.setForeground(Settings.SITE_ORANGE);\n\t\t\tloadIntroImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help5)\n\t\t{\n\t\t\tloadMainImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help6)\n\t\t{\n\t\t\tinstructions6.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t}",
"private void handleMouseHover(MouseEvent mouseEvent) {\n if (simulator.isEditable()) {\n if (!alive) {\n cell.setFill(Color.LIGHTGRAY);\n } else {\n cell.setFill(Color.DARKGRAY);\n }\n }\n }",
"@Override\r\npublic void mouseClicked(MouseEvent e) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"@Override\n\t\t\tpublic void mouseMove(MouseEvent e) {\n\t\t\t\tint x = e.x;\n\t\t\t\tint y = e.y;\n\t\t\t\t\n\t\t\t\tgc.setFont(new Font(mainFrame.getDisplay(),\"楷体\",40,SWT.BOLD));\n\t\t\t\tgc.setAlpha(255);\n\t\t\t\tgc.setForeground(new Color(mainFrame.getDisplay(),255,255,255));\n\t\t\t\t\n\t\t\t\tif(settingRect.contains(x,y)) {\n\t\t\t\t\t gc.drawString(\"设置选项\", 342, 285,true);\n\t\t\t\t\t changeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(helpRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"帮助信息\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(aboutRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"关于游戏\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(exitRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"退出游戏\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\telse if(onButton(classicP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"经典模式\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse if(onButton(timeP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"时间模式\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(onButton(levelP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"冒险闯关\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse if(onButton(onlineP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"联网对战\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcanvas.redraw();\n\t\t\t\t\tchangeCursor(false);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}",
"public void lightPause() {\n stopPawn.setStyle(\"-fx-background-color: RED;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n movePawn.setStyle(\"-fx-background-color: null\");\n buildPawn.setStyle(\"-fx-background-color: null\");\n }",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.orange);\n\t\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t\t\t\t\t\t\t}",
"@Override\n public void mouseEntered(MouseEvent e) {\n setBorderPainted(true);\n setForeground(Color.RED);\n }",
"@Override\n\tpublic void mouseExited(MouseEvent me)\n\t{\n\t\tif (me.getSource() == help1)\n\t\t{\n\t\t\tusernameSelect.setForeground(Color.BLACK);\n\t\t\tfullnameSelect.setForeground(Color.BLACK);\n\t\t\tfirstNameSelect.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help2)\n\t\t{\n\t\t\ttitleInput.setBackground(Color.WHITE);\n\t\t\twfurlInput.setBackground(Color.WHITE);\n\t\t}\n\t\telse if (me.getSource() == help3)\n\t\t{\n\t\t\ttypeLabel.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help4)\n\t\t{\n\t\t\tintroLabel.setForeground(Color.BLACK);\n\t\t\tloadIntroImg.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help5)\n\t\t{\n\t\t\tloadMainImg.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help6)\n\t\t{\n\t\t\tinstructions6.setForeground(Settings.SITE_GREEN);\n\t\t}\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawColor = Color.RED;\n\t\t\t}",
"@Override\n public void changeColor(ColorEvent ce) {\n \n txtRed.setText(\"\"+ ce.getColor().getRed());\n txtGreen.setText(\"\"+ ce.getColor().getGreen());\n txtBlue.setText(\"\"+ ce.getColor().getBlue());\n \n \n }",
"public void play(MouseEvent e) {\n\t\tLogic.curComp = (JLabel) e.getComponent();\n\t\tString name = Logic.curComp.getName();\n\t\tSystem.out.println(name);\n\t\tint posx = (int) name.charAt(0) - 48;\n\t\tint posy = (int) name.charAt(1) - 48;\n\t\tint piece = Logic.arr[posx][posy]; \n\t\t\n\t\tif (moveRed(piece)) { // Checks turn && target piece is pawn or king\n\t\t\tjumping = false;\n\t\t\tprepare(posx, posy, piece, null);\n\t\t} else if (moveBlack(piece)) { // Checks turn && target piece is pawn or king\n\t\t\tjumping = false;\n\t\t\tprepare(posx, posy, piece, \"black\");\n\t\t} else if (validate(posx, posy, Playboard.red, Playboard.rKing , Playboard.redSanta, Playboard.redSKing) && finishRedMoves(piece)){ // Checks that previous component was pawn or king and that it's a legal move\n\t\t\tapplyMove(name, posx, posy, piece);\n\t\t\tnext();\n\t\t} else if (validate(posx, posy, Playboard.black, Playboard.bKing, Playboard.blackSanta, Playboard.blackSKing) && finishBlackMoves(piece)){ // Checks that previous component was pawn or king and that it's a legal move\n\t\t\tapplyMove(name, posx, posy, piece);\n\t\t\tnext();\n\t\t} else {\n\t\t\tSystem.out.println(\"Invalid move\");\n\t\t}\n\t}",
"public void notifyGameOver() {\n this.myStatusString.setText(\"Game Over\");\n final LineBorder line = new LineBorder(Color.RED, 2, true);\n this.myStatusString.setBorder(line);\n this.myStatusString.setForeground(Color.RED);\n this.myStatusString.setFont(new Font(FONT_TIMES, Font.BOLD, NUM_FONT_SIZE_BIG));\n \n }",
"private void updateStatusText() {\n Piece.Color playerColor = board.getTurnColor();\n\n if(board.isGameOver()) {\n if(board.isDraw()) {\n tvShowStatus.setTextColor(Color.BLUE);\n tvShowStatus.setText(\"DRAW\");\n }\n else if (board.getWinnerColor() == Piece.Color.Black) {\n tvShowStatus.setTextColor(Color.BLACK);\n tvShowStatus.setText(\"BLACK WINS\");\n }\n else {\n tvShowStatus.setTextColor(Color.WHITE);\n tvShowStatus.setText(\"WHITE WINS\");\n }\n }\n else if(playerColor == Piece.Color.Black) {\n tvShowStatus.setTextColor(Color.BLACK);\n tvShowStatus.setText(\"BLACK\");\n }\n else {\n tvShowStatus.setTextColor(Color.WHITE);\n tvShowStatus.setText(\"WHITE\");\n }\n }",
"public void updateColorLabel(Color currColor) {\n switch (currColor){\n case GREEN:\n colorLabel2.setBackground(java.awt.Color.green);\n break;\n case YELLOW:\n colorLabel2.setBackground(java.awt.Color.yellow);\n break;\n case RED:\n colorLabel2.setBackground(java.awt.Color.red);\n break;\n case BLUE:\n colorLabel2.setBackground(java.awt.Color.blue);\n break;\n case NONE:\n colorLabel2.setBackground(java.awt.Color.black);\n break;\n }\n }",
"@Override\n protected void paintForeground(Graphics2D g) {\n g.setColor(Color.MAGENTA);\n g.setFont(new Font(\"Calibri\", Font.BOLD,20));\n g.drawString(\"Villain Carnage\",5,30);\n g.setFont(new Font(\"Calibri\", Font.BOLD, 15));\n g.drawString((\"Level 1\"),20,60);\n \n \n \n //g.drawImage(ballIcon, 2,2, this);\n \n g.drawString(\"Ball Count :\" + villain.getBallCount(), 20,120 );\n \n //g.drawImage(heartIcon, 20,40, this);\n g.drawString(\"Lives left : \" + villain.getLives(),20,150);\n \n // Sets all the appropriate GUI components for this level, including ball count and \n // lives count which will be incremented/decremented as the player collides with it's\n // respective object\n \n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.orange);\n\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t\t\t\t\t\t}",
"@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tmsg=\"\";\r\n\t\tmsg+=\" You Entered the frame\";\r\n\t\t\r\n\t\tlabel.setText(msg);\r\n\t\t\r\n\t}",
"private void renderGuiGameOverMessage(SpriteBatch batch)\n {\n float x = cameraGui.viewportWidth / 2;\n float y = cameraGui.viewportHeight / 2;\n if (worldController.isGameOver())\n {\n BitmapFont fontGameOver = Assets.instance.fonts.defaultBig;\n fontGameOver.setColor(1, 0.75f, 0.25f, 1);\n fontGameOver.draw(batch, \"GAME OVER\", x, y, 0, Align.center, false);\n fontGameOver.setColor(1, 1, 1, 1);\n }\n }",
"@Override\n\tpublic void mouseMoved(MouseEvent e) \n\t{\n\t\tobj = program.getElementAt(e.getX(), e.getY());\n\t\tif (obj == Play) \n\t\t{\n\t\t\tPlay.setImage(\"Button/Play1.png\");\n\t\t}\n\t\telse if (obj == Settings) \n\t\t{\n\t\t\tSettings.setImage(\"Button/Settings1.png\");\n\t\t}\n\t\telse if (obj == Credits) \n\t\t{\n\t\t\tCredits.setImage(\"Button/credits1.png\");\n\t\t}\n\t\telse if (obj == Exit) \n\t\t{\n\t\t\tExit.setImage(\"Button/Exit1.png\");\n\t\t}\n\t\telse \n\t\t{\n\t\t\tPlay.setImage(\"Button/Play0.png\");\n\t\t\tSettings.setImage(\"Button/Settings0.png\");\n\t\t\tCredits.setImage(\"Button/credits0.png\");\n\t\t\tExit.setImage(\"Button/exit0.png\");\n\t\t}\n\t}",
"@Override\r\n\tpublic void mousePressed(MouseEvent e) {\n\t\tl1.setText(\"You pressed the mouse\");\r\n\t}",
"Color playerOnMove() {\n return _playerOnMove;\n }",
"@Override\n public void update(Observable observable) {\n Client c = (Client)observable;\n JLabel l = labels.get(c.getID());\n selectColor(l, c);\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawColor = Color.BLACK;\n\t\t\t}",
"public void mousePressed()\n{\n if(!welcomeFading)\n {\n welcomeFading = true;\n cp5.show();\n }\n if(!cp5.isMouseOver()) // check if were pressing a button\n {\n flock.AddAnimal(10, mouseX, mouseY);\n }\n}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawColor = Color.BLUE;\n\t\t\t}",
"private void highlightNodes(MouseEvent e) {\r\n\tNodeComponent node = (NodeComponent)e.getComponent();\r\n\tlabel.setText( node.getCoord().toString() );\r\n\tselectedNode = node.getNode();\r\n\tselectedNode.setHighLight(true);\r\n\tMoves[] tmp = selectedNode.getDamsteen().getMoveToArray();\r\n\tfor (Moves m : tmp) {\r\n\t m.getTargetNode().setHighLight(true);\r\n\t}\r\n }",
"private void BotaoBrilhoMultiplicativoMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_BotaoBrilhoMultiplicativoMouseEntered\n BotaoBrilhoMultiplicativo.setBackground(entered);\n }",
"private void selectColor(JLabel label, Client client){\n label.setForeground(client.getStatus().getColor());\n }",
"public void hover() {\n\t}",
"@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tl1.setText(\"You entered the mouse\");\r\n\t}",
"public abstract void setForegroundPressed(final int rgba);",
"public void hover();",
"private void renderGuiGameOverMessage (SpriteBatch batch)\n\t{\n\t\tfloat x = cameraGUI.viewportWidth / 2;\n\t\tfloat y = cameraGUI.viewportHeight / 2;\n\t\t\n\t\tif (worldController.isGameOver())\n\t\t{\n\t\t\tBitmapFont fontGameOver = Assets.instance.fonts.defaultBig;\n\t\t\tfontGameOver.setColor(1, 0.75f, 0.25f, 1);\n\t\t\t\n\n\t\t\tfontGameOver.draw(batch, \"GAME OVER\", x, y, 1, Align.center, false);\n\t\t\t\n\t\t\tfontGameOver.setColor(1, 1, 1, 1);\n\t\t}\n\t}",
"@Override\r\n\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\tTile t=(Tile)arg0.getSource();\r\n\t\t\t\r\n\t\t\t//upon leaving a hover turns green background of tile back to the default\r\n\t\t\tif(t.getBackground().equals(Color.GREEN)) {\r\n\t\t\t\tt.setBackground(null);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}",
"public void mouseEntered(MouseEvent e) {\n JLabel source = (JLabel)e.getSource();\n view.highlightLabel(source);\n }"
] |
[
"0.72880036",
"0.72213817",
"0.6917842",
"0.6740541",
"0.6682677",
"0.6673845",
"0.6673845",
"0.6673845",
"0.6673845",
"0.6655611",
"0.660408",
"0.6599581",
"0.6588155",
"0.6583062",
"0.6574559",
"0.65659744",
"0.65592706",
"0.6558226",
"0.64592534",
"0.63860106",
"0.6363133",
"0.6363133",
"0.6363133",
"0.6363133",
"0.63578165",
"0.63517827",
"0.6348657",
"0.6325374",
"0.6321384",
"0.62674576",
"0.62606454",
"0.621182",
"0.6195015",
"0.6182141",
"0.6178526",
"0.617558",
"0.614765",
"0.61316186",
"0.6085514",
"0.6060896",
"0.6057486",
"0.6049629",
"0.60372484",
"0.6036457",
"0.6033374",
"0.6033211",
"0.603055",
"0.602655",
"0.60155493",
"0.6006357",
"0.5967015",
"0.5958586",
"0.59456533",
"0.59330076",
"0.59206474",
"0.58954495",
"0.586572",
"0.58598155",
"0.5851565",
"0.5849909",
"0.58322966",
"0.5822584",
"0.57953286",
"0.5773961",
"0.5771514",
"0.5766989",
"0.5762419",
"0.5757946",
"0.5756364",
"0.5745908",
"0.5741583",
"0.5741004",
"0.5737761",
"0.57365614",
"0.57362133",
"0.5734849",
"0.57322234",
"0.57250357",
"0.5724022",
"0.5720245",
"0.5717648",
"0.5701912",
"0.57013613",
"0.5686037",
"0.5681609",
"0.56711185",
"0.5667036",
"0.56669325",
"0.5655333",
"0.5653712",
"0.5653692",
"0.5651361",
"0.56451696",
"0.56433153",
"0.56411016",
"0.563872",
"0.5637987",
"0.5629896",
"0.5627085",
"0.56260306"
] |
0.71188664
|
2
|
WHEN THIS METHOD IS CALLED THE 'MULTIPLAYER' LABEL WILL CHANGE BACK TO THE DEFAULT TEXT COLOR WHEN THE MOUSE IS NO LONGER HOVERING OVER IT
|
@FXML
public void resetMultiplayer()
{
multiplayerButton.setOnMouseExited(mouseEvent -> multiplayerButton.setTextFill(Color.WHITE));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t\t\tPlay.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n Play.setForeground(Color.blue);\r\n\t\t\t\t}",
"@FXML\n public void highlightMultiplayer()\n {\n multiplayerButton.setOnMouseEntered(mouseEvent -> multiplayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@FXML\n public void highlightSinglePlayer()\n {\n singlePlayerButton.setOnMouseEntered(mouseEvent -> singlePlayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n }",
"private void setScoreText(){\n if(color != BLACK && color != WHITE){\n scoreLabel.setText(\"Score: Black - \" + calScore(BLACK) + \" White - \" + calScore(WHITE));\n }else {\n scoreLabel.setText(\"Score: \" + calScore(this.color));\n }\n }",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.blue);\r\n\t\t\t\t}",
"public void display_game_over_text () {\n\n fill(150, 100);\n rect(0, 0, displayW, displayH);\n\n textFont(myFont);\n textAlign(CENTER);\n textSize(displayH/20);\n fill(255);\n text(\"Game Over\", displayW/2, 3*displayH/7);\n\n if (score.winnerName == \"Pacmax\") {\n text(\"Winner is Pacmax! Your score is \" + score.score, displayW/2, 4*displayH/7);\n } else {\n text(\"Winner is Blinky!\", displayW/2, 4*displayH/7);\n }\n\n mySound.play_game_over_song();\n\n isKeyInputAllowed = false;\n }",
"private Label createGameOverLabel(){\n Label text;\n Label.LabelStyle textStyle;\n BitmapFont font = new BitmapFont();\n\n textStyle = new Label.LabelStyle();\n textStyle.font = font;\n\n text = new Label(\"GAME OVER\",textStyle);\n text.setAlignment(Align.center);\n text.setFontScale(4f*scale,4f*scale);\n text.setPosition(stage.getViewport().getCamera().viewportWidth * 0.5f,\n stage.getViewport().getCamera().viewportHeight * 0.80f);\n return text;\n }",
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n if(type == \"close\"){//if the close button is being edited\n button.setBackground(new Color(237,64,64));//colour chosen for the \n }\n if(type == \"scale\"){//if the fullscreen button is being edited\n button.setBackground(coloursObject.getMenuPanelColour());\n }\n }",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t}",
"private void renderGuiGameOverMessage(SpriteBatch batch)\n {\n float x = cameraGui.viewportWidth / 2;\n float y = cameraGui.viewportHeight / 2;\n if (worldController.isGameOver())\n {\n BitmapFont fontGameOver = Assets.instance.fonts.defaultBig;\n fontGameOver.setColor(1, 0.75f, 0.25f, 1);\n fontGameOver.draw(batch, \"GAME OVER\", x, y, 0, Align.center, false);\n fontGameOver.setColor(1, 1, 1, 1);\n }\n }",
"@Override\r\n\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t\t}",
"protected void setPlayerBackground() { Console.setBackground(Console.YELLOW); }",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@FXML\n public void resetSinglePlayer()\n {\n singlePlayerButton.setOnMouseExited(mouseEvent -> singlePlayerButton.setTextFill(Color.WHITE));\n }",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\tpublic void mouseEntered(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.orange);\n\t\t\n\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(new Color(150,190,200));//蓝色\n\t}",
"private void renderGuiGameOverMessage (SpriteBatch batch)\n\t{\n\t\tfloat x = cameraGUI.viewportWidth / 2;\n\t\tfloat y = cameraGUI.viewportHeight / 2;\n\t\t\n\t\tif (worldController.isGameOver())\n\t\t{\n\t\t\tBitmapFont fontGameOver = Assets.instance.fonts.defaultBig;\n\t\t\tfontGameOver.setColor(1, 0.75f, 0.25f, 1);\n\t\t\t\n\n\t\t\tfontGameOver.draw(batch, \"GAME OVER\", x, y, 1, Align.center, false);\n\t\t\t\n\t\t\tfontGameOver.setColor(1, 1, 1, 1);\n\t\t}\n\t}",
"private void updateStatusText() {\n Piece.Color playerColor = board.getTurnColor();\n\n if(board.isGameOver()) {\n if(board.isDraw()) {\n tvShowStatus.setTextColor(Color.BLUE);\n tvShowStatus.setText(\"DRAW\");\n }\n else if (board.getWinnerColor() == Piece.Color.Black) {\n tvShowStatus.setTextColor(Color.BLACK);\n tvShowStatus.setText(\"BLACK WINS\");\n }\n else {\n tvShowStatus.setTextColor(Color.WHITE);\n tvShowStatus.setText(\"WHITE WINS\");\n }\n }\n else if(playerColor == Piece.Color.Black) {\n tvShowStatus.setTextColor(Color.BLACK);\n tvShowStatus.setText(\"BLACK\");\n }\n else {\n tvShowStatus.setTextColor(Color.WHITE);\n tvShowStatus.setText(\"WHITE\");\n }\n }",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n }",
"@Override\n public void mouseExited(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.black);\n levelPanel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.RED);\n\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\n public void mouseEntered(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.BLUE);\n levelPanel.setCursor(new Cursor(Cursor.HAND_CURSOR));\n }",
"@Override\r\n\tpublic void update(GameContainer gc, float dt) {\n\t\tclip.setVolume(gc.getWindow().getSettings().getSfxVol());\r\n\t\thover = (gc.getInput().getMouseX() >= posX && gc.getInput().getMouseX() <= posX + width)\r\n\t\t\t\t&& (gc.getInput().getMouseY() >= posY && gc.getInput().getMouseY() <= posY + height);\r\n\t\tif ((hover && gc.getInput().isButtonUp(MouseEvent.BUTTON1))) {\r\n\t\t\tsetClicked(true);\r\n\t\t\tclip.play();\r\n\t\t}\r\n\t\tif (hover) {\r\n\t\t\tthis.color1=color2;\r\n\t\t} else\r\n\t\t\tcolor1 = temp;\r\n\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"private void highlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.RED, new TicksTiming(0), new TicksTiming(0));\r\n\t }",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t}",
"public void displayHover() {\n if (textColour == null) {\r\n displayEmptyHover();\r\n return;\r\n }\r\n stroke(0, 0, 0);\r\n strokeWeight(strokeWeight);\r\n hoverFill(boxColour);\r\n if (strokeWeight != 0 && text != null) {\r\n rect(x, y, w, h, 7);\r\n }\r\n fill(textColour);\r\n textSize(textSize);\r\n text(text, x + xTextOffset, y + yTextOffset);\r\n }",
"@Override\n\t\t\tpublic void mouseMove(MouseEvent e) {\n\t\t\t\tint x = e.x;\n\t\t\t\tint y = e.y;\n\t\t\t\t\n\t\t\t\tgc.setFont(new Font(mainFrame.getDisplay(),\"楷体\",40,SWT.BOLD));\n\t\t\t\tgc.setAlpha(255);\n\t\t\t\tgc.setForeground(new Color(mainFrame.getDisplay(),255,255,255));\n\t\t\t\t\n\t\t\t\tif(settingRect.contains(x,y)) {\n\t\t\t\t\t gc.drawString(\"设置选项\", 342, 285,true);\n\t\t\t\t\t changeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(helpRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"帮助信息\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(aboutRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"关于游戏\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(exitRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"退出游戏\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\telse if(onButton(classicP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"经典模式\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse if(onButton(timeP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"时间模式\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(onButton(levelP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"冒险闯关\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse if(onButton(onlineP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"联网对战\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcanvas.redraw();\n\t\t\t\t\tchangeCursor(false);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.red);\r\n\t\t\t\t}",
"private void gameOver(Graphics g) {\n Color saved = g.getColor();\n g.setColor(new Color(0, 0, 0));\n g.setFont(new Font(\"Arial\", 20, 20));\n FontMetrics fm = g.getFontMetrics();\n centreString(OVER, g, fm, PBG.DIMENSION2 / 2);\n centreString(REPLAY, g, fm, PBG.DIMENSION2 / 2 + 50);\n g.setColor(saved);\n }",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.BLACK);\n\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"public abstract void setForegroundHover(final int rgba);",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n button.setBackground(coloursObject.getTitlePanelColour());\n }",
"@Override\n\tpublic void mouseEntered(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.blue);\n\t}",
"private void setHoverDisplay(String text, Vector3 coords) {\n\t\tfloat scaleFactor = 1920 / (Gdx.graphics.getWidth() * 1.0f);\n\t\tfloat x = coords.x * scaleFactor + 50;\n\t\tfloat y = coords.y * scaleFactor - 125;\n\t\tx = Math.min(Math.max(x, 0), 1920 - hoverImage.getWidth());\n\t\ty = Math.min(Math.max(y, 200), 1080 - hoverImage.getHeight());\n\t\thoverLabel.setText(text);\n\t\thoverLabel.setPosition(x + 75, y + 155);\n\t\tif (!text.equals(\"\")) {\n\t\t\thoverImage.setVisible(true);\n\t\t\thoverImage.setPosition(x, y);\n\t\t}\n\t}",
"public void update(){\n y -= 1; // Making the text float up\n // Making the text more transparent\n color = new Color(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha() - 2);\n }",
"@Override\n public void gameOver() {\n messagePanel.showMessage(image);\n setEnabled(false);\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tif(isRecognition) {\n\t\t\t\t\t\t\talpha *= 0.95f;\n//\t\t\t\t\t\t\tsetBackgroundColor((int) (255 * (1 - label) * alpha));\n\t\t\t\t\t\t\ttxtHandParts.setTextColor(Color.argb((int) (alpha * 255), 255,\n\t\t\t\t\t\t\t\t\t255, 255));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(alpha > 0.1f) {\n\t\t\t\t\t\t\t\tLog.d(LOGTAG, (int) (255 * (1 - label) * alpha)+\"\");\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}\n\t\t\t\t});\n\t\t\t}",
"@Override\n protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)\n {\n this.fontRenderer.drawString(this.toolboxInv.getDisplayName().getUnformattedText(), 8, 6, 4210752);\n this.fontRenderer.drawString(this.playerInv.getDisplayName().getUnformattedText(), 8, this.ySize - 96 + 2, 4210752);\n }",
"@Override\n\tpublic void mouseExited(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.BLACK);\n\t\t\n\t}",
"private void unhighlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.BLACK, new TicksTiming(0), new TicksTiming(0));\r\n\r\n\t }",
"public void setLabel()\r\n {\r\n int i = Converter(Input);\r\n \r\n if(j<i && label.getText().equals(\"Player 1\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n \r\n }else if(j<i && label.getText().equals(\"Player 2\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n }else if(j<i && label.getText().equals(\"Player 3\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n }else if(j==i && label.getText().equals(\"Player \"+j))\r\n {\r\n j=1;\r\n label.setText(\"Player \"+j);\r\n }\r\n \r\n \r\n }",
"public void changeLableText(int playerScore,int computerScore);",
"public void notifyGameOver() {\n this.myStatusString.setText(\"Game Over\");\n final LineBorder line = new LineBorder(Color.RED, 2, true);\n this.myStatusString.setBorder(line);\n this.myStatusString.setForeground(Color.RED);\n this.myStatusString.setFont(new Font(FONT_TIMES, Font.BOLD, NUM_FONT_SIZE_BIG));\n \n }",
"@Override\n\tpublic void mouseExited(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.black);\n\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.black);\n\t}",
"public void mousePressed(MouseEvent e){\r\n\t //reset the label\r\n\t if(isBlack) label.setText(\"\t\tWhite's Turn\");\r\n\t else label.setText(\"\t\tBlack's Turn\");\r\n\t \r\n //Do nothing when game is over\r\n if(gameOver) return;\r\n \r\n String colorName=isBlack?\"Black\":\"White\";\r\n\r\n //Convert coordinate to index \r\n xIndex=(e.getX()-MARGIN+GRID_SPAN/2)/GRID_SPAN;\r\n yIndex=(e.getY()-MARGIN+GRID_SPAN/2)/GRID_SPAN;\r\n\r\n //Do nothing when outside the board\r\n if(xIndex<0||xIndex>ROWS||yIndex<0||yIndex>COLS)\r\n return;\r\n\r\n //Do nothing when current position already occupied\r\n if(findChess(xIndex,yIndex))return;\r\n\r\n //if valid, Draw a new chess at current position and add index to the chessList \r\n Point ch=new Point(xIndex,yIndex,isBlack?Color.black:Color.white);\r\n chessList[chessCount++]=ch;\r\n repaint();//run paintComponent\r\n\r\n\r\n //if someone wins, give a message\r\n if(isWin()){\r\n String msg=String.format(\"Congratulations��%s won��\", colorName); \r\n JOptionPane.showMessageDialog(this, msg);\r\n gameOver=true;\r\n }\r\n isBlack=!isBlack;\r\n }",
"@Override\n public void touchAction() {\n if (!isDisabled()) {\n if (colorAction != null)\n opponentLabel.removeAction(colorAction);\n colorAction = MyActions.getTouchAction(LightBlocksGame.COLOR_FOCUSSED_ACTOR, getColor());\n opponentLabel.addAction(colorAction);\n }\n }",
"private void changeCurrentPlayerText() {\n\t\tString currentPlayer = textFieldCurrentPlayer.getText();\n\t\tif (currentPlayer.equals(\"Player1\")) {\n\t\t\ttextFieldCurrentPlayer.setText(\"Player2\");\n\t\t} else {\n\t\t\ttextFieldCurrentPlayer.setText(\"Player1\");\n\t\t} \n\t}",
"@Override\r\n\t\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.DARK_GRAY);\r\n\t\t\t\t\t}",
"public void gameOver()\r\n {\n addObject(new Text(\"Game Over\"), 550, 300);\r\n backgroundMusic.pause();\r\n Greenfoot.stop();\r\n }",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jLabel = (JLabel)e.getSource() ;\n\t\tjLabel.setForeground(Color.black) ;\n\t\tjLabel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)) ;\n\t}",
"@Override\n protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {\n }",
"public void changePlayer(int index) {\n currentPlayer.setText(\"Aktueller Spieler: \" + index);\n if(index == 1){\n pointsPlayer2.setOpaque(false);\n pointsPlayer1.setBackground(Color.green);\n pointsPlayer1.setOpaque(true);\n this.repaint();\n }\n else{\n pointsPlayer1.setOpaque(false);\n pointsPlayer2.setBackground(Color.green);\n pointsPlayer2.setOpaque(true);\n this.repaint();\n }\n }",
"public void setCurrent(boolean isCurrent)\n {\n if(isCurrent)\n {\n playerLabel.setForeground(GUIConstants.CURRENT_COLOR);\n }\n else\n {\n playerLabel.setForeground(GUIConstants.STANDARD_COLOR);\n }\n }",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"public void modeColor(Graphics2D g2d) { g2d.setColor(RTColorManager.getColor(\"label\", \"default\")); }",
"public void displayGameOver() {\n\t\tthis.theScreen.setFont(Preferences.GAME_OVER_FONT);\n\t\tthis.theScreen.setColor(Preferences.GAME_OVER_COLOR);\n\t\tthis.theScreen.drawString(Preferences.GAME_OVER_TEXT,\n\t\t\t\tPreferences.GAME_OVER_X, Preferences.GAME_OVER_Y);\n\t}",
"public void toggle() {\n if (currentPlayer.equals(\"red\")) {\n currentColor = BLUE_COLOUR;\n currentPlayer = \"blue\";\n } else {\n currentColor = RED_COLOUR;\n currentPlayer = \"red\";\n }\n //change color of grid\n changeColor();\n }",
"@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tmsg=\"\";\r\n\t\tmsg+=\" You Entered the frame\";\r\n\t\t\r\n\t\tlabel.setText(msg);\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mousePressed(MouseEvent e) {\n\t\tl1.setText(\"You pressed the mouse\");\r\n\t}",
"@Override\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\tif(match.getMatchStatus() != MatchStatus.ENDED) {\r\n\t\t\t\t\t\t\tmatch.simMatch(); \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (p1==match.getWinner()) { \r\n\t\t\t\t\t\t\t\tPlayer1.setForeground(Color.GREEN);\r\n\t\t\t\t\t\t\t\tPlayer2.setForeground(Color.red); \r\n\t\t\t\t\t\t\t}else { \r\n\t\t\t\t\t\t\t\tPlayer2.setForeground(Color.green);\r\n\t\t\t\t\t\t\t\tPlayer1.setForeground(Color.red); \r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\tmatchStatus.setText(\" Ended\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}",
"@Override\r\npublic void mouseEntered(MouseEvent arg0) {\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"@Override\n protected void paintForeground(Graphics2D g) {\n g.setColor(Color.MAGENTA);\n g.setFont(new Font(\"Calibri\", Font.BOLD,20));\n g.drawString(\"Villain Carnage\",5,30);\n g.setFont(new Font(\"Calibri\", Font.BOLD, 15));\n g.drawString((\"Level 1\"),20,60);\n \n \n \n //g.drawImage(ballIcon, 2,2, this);\n \n g.drawString(\"Ball Count :\" + villain.getBallCount(), 20,120 );\n \n //g.drawImage(heartIcon, 20,40, this);\n g.drawString(\"Lives left : \" + villain.getLives(),20,150);\n \n // Sets all the appropriate GUI components for this level, including ball count and \n // lives count which will be incremented/decremented as the player collides with it's\n // respective object\n \n }",
"@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\tif(match.getMatchStatus() != MatchStatus.ENDED) {\r\n\t\t\t\tmatch.simMatch(); \r\n\t\t\t\t\r\n\t\t\t\tif (p1==match.getWinner()) { \r\n\t\t\t\t\tPlayer1.setForeground(Color.GREEN);\r\n\t\t\t\t\tPlayer2.setForeground(Color.red); \r\n\t\t\t\t}else { \r\n\t\t\t\t\tPlayer2.setForeground(Color.green);\r\n\t\t\t\t\tPlayer1.setForeground(Color.red); \r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tmatchStatus.setText(\" Ended\");\r\n\t\t\t\t}\r\n\t\t\t\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\tif (arg0.getSource() instanceof ChessPiece && status.getStatus().equals(GameStatus.GAME_STATUS_EDIT) && arg0.getButton() == MouseEvent.BUTTON3) {\r\n\t\t\tChessPiece p = (ChessPiece)arg0.getSource();\r\n\t\t\tif (p.chessPlayer.equals(\"black\") && p.position.charAt(1) != '1') {\r\n\t\t\t\tif (p.getText() == null) {\r\n\t\t\t\t\tp.setText(\"<html><font color=\\\"white\\\">K</font></html>\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tp.setText(null);\r\n\t\t\t\t}\r\n\t\t\t} else if (p.chessPlayer.equals(\"white\") && p.position.charAt(1) != '8'){\r\n\t\t\t\tif (p.getText() == null) {\r\n\t\t\t\t\tp.setText(\"<html><font color=\\\"black\\\">K</font></html>\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tp.setText(null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void changeLivesDisplay()\r\n {\r\n removeObject(text);\r\n //Add the lives text\r\n text = new Text(\"Lives: \" + health);\r\n addObject(text, 60, 15);\r\n }",
"public void screenText(Canvas canvas){\n Paint paint = new Paint();\n paint.setColor(Color.WHITE);\n paint.setTextSize(30);\n paint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));\n canvas.drawText(\"Score: \"+ (newPlayer.getScore()), 10, height-10, paint);\n canvas.drawText(\"Best Score: \"+ getRecord(), width-215, height-10, paint);\n canvas.drawText(\"Level: \" + level, 10, height-550, paint);\n\n //If the game is reset will run a seperate screen text\n if (!newPlayer.getRunning()&&gamenew&&reset){\n Paint newPaint = new Paint();\n newPaint.setTextSize(40);\n newPaint.setColor(Color.WHITE);\n newPaint.setTypeface(Typeface.create(Typeface.DEFAULT,Typeface.BOLD));\n canvas.drawText(\"Click to start!\", width/2-50, height/2, newPaint);\n\n newPaint.setTextSize(20);\n canvas.drawText(\"Press and hold for the ship to hover up\", width/2-50,height/2+20,newPaint);\n canvas.drawText(\"Release to let the ship go down!\", width/2-50,height/2+40,newPaint);\n }\n\n }",
"@Override\r\n\tpublic void mouseMoved(MouseEvent e) {\n\t\tl1.setText(\"You moved the mouse\"+e.getX()+\",\"+e.getY());\r\n\t}",
"@Override\n\tpublic void mouseExited(MouseEvent me)\n\t{\n\t\tif (me.getSource() == help1)\n\t\t{\n\t\t\tusernameSelect.setForeground(Color.BLACK);\n\t\t\tfullnameSelect.setForeground(Color.BLACK);\n\t\t\tfirstNameSelect.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help2)\n\t\t{\n\t\t\ttitleInput.setBackground(Color.WHITE);\n\t\t\twfurlInput.setBackground(Color.WHITE);\n\t\t}\n\t\telse if (me.getSource() == help3)\n\t\t{\n\t\t\ttypeLabel.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help4)\n\t\t{\n\t\t\tintroLabel.setForeground(Color.BLACK);\n\t\t\tloadIntroImg.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help5)\n\t\t{\n\t\t\tloadMainImg.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help6)\n\t\t{\n\t\t\tinstructions6.setForeground(Settings.SITE_GREEN);\n\t\t}\n\t}",
"public void gameOver() {\n\t\tframe.setTitle(frame.getTitle() + \" - Game Over\");\n\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent me) \n\t{\n\t\tif (me.getSource() == help1)\n\t\t{\n\t\t\tusernameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfullnameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfirstNameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help2)\n\t\t{\n\t\t\ttitleInput.setBackground(Settings.SITE_ORANGE);\n\t\t\twfurlInput.setBackground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help3)\n\t\t{\n\t\t\ttypeLabel.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help4)\n\t\t{\n\t\t\tintroLabel.setForeground(Settings.SITE_ORANGE);\n\t\t\tloadIntroImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help5)\n\t\t{\n\t\t\tloadMainImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help6)\n\t\t{\n\t\t\tinstructions6.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t}",
"@Override\r\npublic void mouseExited(MouseEvent arg0) {\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"public void displayName(){\n player1.setText(p1.getName());\n player2.setText(p2.getName());\n }",
"@Override\r\npublic void mousePressed(MouseEvent arg0) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"public void lightPause() {\n stopPawn.setStyle(\"-fx-background-color: RED;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n movePawn.setStyle(\"-fx-background-color: null\");\n buildPawn.setStyle(\"-fx-background-color: null\");\n }",
"public void addGameOverText(Pane root) throws FileNotFoundException {\n\t\tgameOver=new Text(level.columnX(10)-15,level.rowX(17)+5,\"Game Over\");\n\t\tif(GameLoop.getLevelSelector()==1)\n\t\t\tgameOver=new Text(level.columnX(10),level.rowX(17+1)+5,\"Game Over\");\n\t\tgameOver.setFont(Font.loadFont(\"file:recources\\\\Font\\\\PressStart2P-Regular.ttf\", 20));\n\t\tif(Level.getHieght()==720) {\n\t\t\tgameOver=new Text(level.columnX(10)+5,level.rowX(17)+5,\"Game Over\");\n\t\t\tgameOver.setFont(Font.loadFont(\"file:recources\\\\Font\\\\PressStart2P-Regular.ttf\", 10));\n\t\t}\n\t\tif(GameLoop.getLevelSelector()==1)\n\t\t\tgameOver.relocate(level.columnX(10)+5, level.rowX(17)+10);\n\t\tgameOver.setFill(Color.RED);\n\t\tgameOver.setVisible(false); //gets visible when the game is over\n\t\troot.getChildren().add(gameOver);\n\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tif(e.getSource() == start)\n\t\t\tstart.setForeground(new Color(206, 124, 24));\n\t}",
"public void gameOver() {\n // if (ENABLE_SOUND) {\n // sfx.endGame();\n // }\n doLeaderboard = true;\n frameRate(10);\n //this.state = GameState.MENU;\n //If line 151 runs, it bypasses the gameover leaderboard screen for some reason\n //redraw();\n}",
"private void changeTextstr(int currentPoints){\n\n\n switch(currentPoints){\n case 1:\n str.setText(\" very weak\");\n str.setTextColor(Color.RED);\n break;\n case 2:\n str.setText(\" weak\");\n str.setTextColor(Color.parseColor(\"#FF6600\"));\n break;\n case 3:\n str.setText(\" fair\");\n str.setTextColor(Color.parseColor(\"#FFFF66\"));\n break;\n case 4:\n str.setText(\" strong\");\n str.setTextColor(Color.GREEN);\n break;\n case 5:\n str.setText(\" very strong\");\n str.setTextColor(Color.parseColor(\"#2C6700\"));\n }\n\n\n }",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tif(e.getSource() == start)\n\t\t\tstart.setForeground(Color.red);\n\t}",
"public static void GameOverEffect(ArrayList<JButton> myGameButton){\n enableButtons(myGameButton);\n for(int i=0; i<myGameButton.size(); ++i){\n myGameButton.get(i).setBackground(Color.red); // set buttons back-ground color\n myGameButton.get(i).setForeground(Color.white); // set buttons fore-ground color\n } \n }",
"private void drawCurrentCodeBlockLabelBg(Canvas canvas) {\n if(mCursor.isSelected() || !mPaintLabel) {\n return;\n }\n int pos = mCursorPosition;\n if(pos == -1) {\n return;\n }\n List<BlockLine> blocks = mSpanner == null ? null : mSpanner.getColors().getBlocks();\n BlockLine block = (blocks != null && blocks.size() > pos) ? blocks.get(pos) : null;\n if(block != null) {\n int left = mCursor.getLeftLine();\n int color = mColors.getColor(ColorScheme.LINE_BLOCK_LABEL);\n if(block.startLine != left) {\n drawLineBackground(canvas,color,block.startLine);\n }\n if(block.endLine != left) {\n drawLineBackground(canvas,color,block.endLine);\n }\n }\n }",
"@Override\r\n\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\tComponent com = (Component)e.getSource(); //마우스가 올라간 컴포넌트 알아냄.\r\n\t\t\tcom.setBackground(Color.GRAY);\r\n\t\t}",
"@Override\n\tpublic void mousePressed(MouseEvent e) {\n\n\t\tLabel_Selected((JLabel) e.getComponent());\n\t\t\n\t\tnow_x = e.getXOnScreen() - e.getComponent().getX();\n\t\tnow_y = e.getYOnScreen() - e.getComponent().getY();\n\t\tnow_w = e.getComponent().getWidth();\n\t\tnow_h = e.getComponent().getHeight();\n\t\tnow_L = e.getComponent().getX()+e.getComponent().getWidth();\n\t\tnow_D = e.getComponent().getY()+e.getComponent().getHeight();\n\t\t\n\t\tif(e.getX() > e.getComponent().getWidth()-5 && e.getX() < e.getComponent().getWidth() + 5) {\n\t\t\tnow_X = 'R';\n\t\t} else if(e.getX() > -5 && e.getX() < 5) {\n\t\t\tnow_X = 'L';\n\t\t}\n\t\tif(e.getY() > e.getComponent().getHeight()-5 && e.getY() < e.getComponent().getHeight() + 5) {\n\t\t\tnow_Y = 'D';\n\t\t} else if(e.getY() > -5 && e.getY() < 5) {\n\t\t\tnow_Y = 'U';\n\t\t}\n\t\t\n\t\tText_Set();\n\t}"
] |
[
"0.7084677",
"0.7008625",
"0.67963105",
"0.66276056",
"0.65209264",
"0.64366204",
"0.6285756",
"0.62551576",
"0.622657",
"0.61962",
"0.61689365",
"0.615505",
"0.61409605",
"0.6129943",
"0.611427",
"0.6110282",
"0.6093854",
"0.6093854",
"0.6093854",
"0.6093854",
"0.6092148",
"0.6072062",
"0.60612273",
"0.6057708",
"0.60542625",
"0.60445726",
"0.60440445",
"0.60438836",
"0.6035778",
"0.60297465",
"0.6023736",
"0.60176337",
"0.60045546",
"0.60045546",
"0.60045546",
"0.60045546",
"0.5995625",
"0.59882987",
"0.59814626",
"0.5968946",
"0.5954757",
"0.59519076",
"0.594688",
"0.5945685",
"0.5937368",
"0.59330106",
"0.59224063",
"0.5922002",
"0.58890945",
"0.5887667",
"0.5884683",
"0.5884336",
"0.5878436",
"0.58727354",
"0.58599925",
"0.5858788",
"0.58543104",
"0.5848688",
"0.58478564",
"0.5844775",
"0.58353513",
"0.5829193",
"0.5815477",
"0.5813083",
"0.5802571",
"0.5800458",
"0.57715386",
"0.57626915",
"0.57602835",
"0.5730018",
"0.57168424",
"0.57135534",
"0.5700039",
"0.56946963",
"0.5694668",
"0.56897026",
"0.5687598",
"0.5681769",
"0.56672174",
"0.56649274",
"0.56637436",
"0.5652419",
"0.562533",
"0.56117874",
"0.5611146",
"0.5606039",
"0.5604225",
"0.55750763",
"0.5573475",
"0.55734473",
"0.5550107",
"0.5535838",
"0.5532237",
"0.5519924",
"0.55122745",
"0.5509796",
"0.55081373",
"0.5507373",
"0.5503619",
"0.5501948"
] |
0.62423337
|
8
|
WHEN THIS METHOD IS CALLED THE 'VIEW PROFILE' LABEL WILL CHANGE COLOR WHEN THE MOUSE IS HOVERING OVER IT
|
@FXML
public void highlightProfile()
{
profileButton.setOnMouseEntered(mouseEvent -> profileButton.setTextFill(Color.valueOf("#FFD700")));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\tpublic void mouseEntered(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.orange);\n\t\t\n\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.blue);\n\t}",
"@FXML\n public void highlightAboutUs()\n {\n aboutUsButton.setOnMouseEntered(mouseEvent -> aboutUsButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n }",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.RED);\n\t}",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.blue);\r\n\t\t\t\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(new Color(150,190,200));//蓝色\n\t}",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t}",
"@Override\n public void mouseEntered(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.BLUE);\n levelPanel.setCursor(new Cursor(Cursor.HAND_CURSOR));\n }",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n if(type == \"close\"){//if the close button is being edited\n button.setBackground(new Color(237,64,64));//colour chosen for the \n }\n if(type == \"scale\"){//if the fullscreen button is being edited\n button.setBackground(coloursObject.getMenuPanelColour());\n }\n }",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@FXML\n public void highlightMultiplayer()\n {\n multiplayerButton.setOnMouseEntered(mouseEvent -> multiplayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\r\n public void mousePressed(MouseEvent e) {\n setBackground(Color.BLUE);\r\n \r\n \r\n }",
"@Override\n\tpublic void mouseExited(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.black);\n\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\tsetPanelColor(studentPanel);\n\t\t\t\tsidePanelInterface.setPanel(\"studentPanel\");\n\t\t\t}",
"@FXML\n public void highlightSinglePlayer()\n {\n singlePlayerButton.setOnMouseEntered(mouseEvent -> singlePlayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n Play.setForeground(Color.blue);\r\n\t\t\t\t}",
"@Override\n public void mouseExited(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.black);\n levelPanel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.black);\n\t}",
"@Override\r\npublic void mouseEntered(MouseEvent arg0) {\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"@Override\n\t\t\tpublic boolean onHover(View v, MotionEvent event) {\n\t\t\t\tswitch(event.getAction())\n\t\t\t\t{\n\t\t\t\tcase MotionEvent.ACTION_HOVER_ENTER:\n\t\t\t\t\tv.setBackgroundColor(Color.LTGRAY);\n\t\t\t\t\tbreak;\n\t\t\t\tcase MotionEvent.ACTION_HOVER_EXIT:\n\t\t\t\t\tv.setBackgroundColor(Color.TRANSPARENT);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.red);\r\n\t\t\t\t}",
"@Override\n public void highlightLabel(ObjLabel objLabel) {\n selectXmin = objLabel.getXmin();\n selectYmin = objLabel.getYmin();\n selectXmax = objLabel.getXmax();\n selectYmax = objLabel.getYmax();\n\n //make sure we keep track of this current ObjLabel \n //in the history timeline one object in the past\n if (curObjLabel != objLabel) {\n preObjLabel = curObjLabel;\n }\n curObjLabel = objLabel;\n treeView.getSelectionModel().select(objLabel.getTreeItem());\n\n// oldStroke = curObjLabel.getStroke();\n status(\"Current label: \" + curObjLabel.getName());\n\n repaintCanvas();\n }",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t\t\tPlay.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"@Override\r\n\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\tComponent com = (Component)e.getSource(); //마우스가 올라간 컴포넌트 알아냄.\r\n\t\t\tcom.setBackground(Color.GRAY);\r\n\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.BLACK);\n\t}",
"@FXML\n public void highlightLogout()\n {\n logoutButton.setOnMouseEntered(mouseEvent -> logoutButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"private void handleMouseHover(MouseEvent mouseEvent) {\n if (simulator.isEditable()) {\n if (!alive) {\n cell.setFill(Color.LIGHTGRAY);\n } else {\n cell.setFill(Color.DARKGRAY);\n }\n }\n }",
"public void mouseEntered(MouseEvent e) {\n JLabel source = (JLabel)e.getSource();\n view.highlightLabel(source);\n }",
"@Override\n\tpublic void mouseExited(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.BLACK);\n\t\t\n\t}",
"@Override\n\t\tpublic void handle(MouseEvent event) {\n\t\t\tif(event.getEventType().equals(MouseEvent.MOUSE_CLICKED)){\n\t\t\ttab_01.setTextFill(Color.RED);\n\t\t\ttab_02.setTextFill(Color.BLACK);\n\t\t\ttab_03.setTextFill(Color.BLACK);\n\t\t\ttab_04.setTextFill(Color.BLACK);\n\t\t\ttab_05.setTextFill(Color.BLACK);\n\t\t\t\n\t\t\t\n\t\t\t}\n\t\t}",
"@Override\n public void touchAction() {\n if (!isDisabled()) {\n if (colorAction != null)\n opponentLabel.removeAction(colorAction);\n colorAction = MyActions.getTouchAction(LightBlocksGame.COLOR_FOCUSSED_ACTOR, getColor());\n opponentLabel.addAction(colorAction);\n }\n }",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jLabel = (JLabel)e.getSource() ;\n\t\tjLabel.setForeground(Color.black) ;\n\t\tjLabel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)) ;\n\t}",
"@Override\r\npublic void mousePressed(MouseEvent arg0) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"@FXML\n public void resetProfile()\n {\n profileButton.setOnMouseExited(mouseEvent -> profileButton.setTextFill(Color.WHITE));\n }",
"private void selectColor(JLabel label, Client client){\n label.setForeground(client.getStatus().getColor());\n }",
"@Override\n public void mouseEntered(MouseEvent e) {\n setBorderPainted(true);\n setForeground(Color.RED);\n }",
"public void hover();",
"public void mousePressed(MouseEvent me) {\n\t\t\tfigure.setBackgroundColor(ColorConstants.yellow);\n\t\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.orange);\n\t\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\tsetPanelColor(employeePanel);\n\t\t\t\tsidePanelInterface.setPanel(\"employeePanel\");\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\r\npublic void mouseExited(MouseEvent arg0) {\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"@Override\n\t\tpublic void handle(MouseEvent event) {\n\t\t\tif(event.getEventType().equals(MouseEvent.MOUSE_CLICKED)){\n\t\t\t\ttab_01.setTextFill(Color.BLACK);\n\t\t\t\ttab_02.setTextFill(Color.RED);\n\t\t\t\ttab_03.setTextFill(Color.BLACK);\n\t\t\t\ttab_04.setTextFill(Color.BLACK);\n\t\t\t\ttab_05.setTextFill(Color.BLACK);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawColor = Color.BLUE;\n\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.orange);\n\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t\t\t\t\t\t}",
"@Override\n\t\tpublic void handle(MouseEvent event) {\n\t\t\tif(event.getEventType().equals(MouseEvent.MOUSE_CLICKED)){\n\t\t\t\ttab_01.setTextFill(Color.BLACK);\n\t\t\t\ttab_02.setTextFill(Color.BLACK);\n\t\t\t\ttab_03.setTextFill(Color.BLACK);\n\t\t\t\ttab_04.setTextFill(Color.BLACK);\n\t\t\t\ttab_05.setTextFill(Color.RED);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}",
"@Override\n\t\tpublic void handle(MouseEvent event) {\n\t\t\tif(event.getEventType().equals(MouseEvent.MOUSE_CLICKED)){\n\t\t\t\ttab_01.setTextFill(Color.BLACK);\n\t\t\t\ttab_02.setTextFill(Color.BLACK);\n\t\t\t\ttab_03.setTextFill(Color.RED);\n\t\t\t\ttab_04.setTextFill(Color.BLACK);\n\t\t\t\ttab_05.setTextFill(Color.BLACK);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawColor = Color.RED;\n\t\t\t}",
"@Override\n\t\tpublic void handle(MouseEvent event) {\n\t\t\tif(event.getEventType().equals(MouseEvent.MOUSE_CLICKED)){\n\t\t\t\n\t\t\t\ttab_01.setTextFill(Color.BLACK);\n\t\t\t\ttab_02.setTextFill(Color.BLACK);\n\t\t\t\ttab_03.setTextFill(Color.BLACK);\n\t\t\t\ttab_04.setTextFill(Color.RED);\n\t\t\t\ttab_05.setTextFill(Color.BLACK);\n\t\t\t\t\n\t\t\t}\n\t\t}",
"public void mouseOver() {\n}",
"public void hover() {\n\t}",
"private void jLabelSearchMouseEntered(java.awt.event.MouseEvent evt) {\n setColor(jPanel1);\n }",
"@Override\r\n\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\tComponent com = (Component)e.getSource(); //마우스가 올라간 컴포넌트 알아냄.\r\n\t\t\tcom.setBackground(Color.GRAY);\r\n\t\t}",
"@Override\r\npublic void mouseClicked(MouseEvent e) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"@Override\r\n\t\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.DARK_GRAY);\r\n\t\t\t\t\t}",
"@Override\n\t\t\tpublic boolean onHover(View but_view, MotionEvent arg1) {\n\t\t\t\tint what = arg1.getAction(); \n switch(what){ \n case MotionEvent.ACTION_HOVER_ENTER: //������view \n \t but_view.setBackgroundColor(getResources().getColor(R.color.blue));\n break; \n case MotionEvent.ACTION_HOVER_MOVE: //�����view�� \n System.out.println(\"bottom ACTION_HOVER_MOVE\"); \n break; \n case MotionEvent.ACTION_HOVER_EXIT: //����뿪view \n \t but_view.setBackground(getResources().getDrawable(R.drawable.button_style)); \n break; \n } \n return false; \n\t\t\t}",
"@FXML\n public void highlightMainMenu()\n {\n mainMenuButton.setOnMouseEntered(mouseEvent -> mainMenuButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\tsetPanelColor(homePanel);\n\t\t\t\tsidePanelInterface.setPanel(\"homePanel\");\n\t\t\t}",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n button.setBackground(coloursObject.getTitlePanelColour());\n }",
"public void paletteUserOver(PaletteButton button, boolean inside) {\n if (inside)\n showStatus(((ToolButton) button).name());\n else\n showStatus(fSelectedToolButton.name());\n }",
"@Override\n public void changeColor(ColorEvent ce) {\n \n txtRed.setText(\"\"+ ce.getColor().getRed());\n txtGreen.setText(\"\"+ ce.getColor().getGreen());\n txtBlue.setText(\"\"+ ce.getColor().getBlue());\n \n \n }",
"void setHoverDetail(String detail);",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawColor = Color.BLACK;\n\t\t\t}",
"@Override\n protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {\n }",
"@Override\n\tpublic void mouseExited(MouseEvent me)\n\t{\n\t\tif (me.getSource() == help1)\n\t\t{\n\t\t\tusernameSelect.setForeground(Color.BLACK);\n\t\t\tfullnameSelect.setForeground(Color.BLACK);\n\t\t\tfirstNameSelect.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help2)\n\t\t{\n\t\t\ttitleInput.setBackground(Color.WHITE);\n\t\t\twfurlInput.setBackground(Color.WHITE);\n\t\t}\n\t\telse if (me.getSource() == help3)\n\t\t{\n\t\t\ttypeLabel.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help4)\n\t\t{\n\t\t\tintroLabel.setForeground(Color.BLACK);\n\t\t\tloadIntroImg.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help5)\n\t\t{\n\t\t\tloadMainImg.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help6)\n\t\t{\n\t\t\tinstructions6.setForeground(Settings.SITE_GREEN);\n\t\t}\n\t}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"public void mouseClicked(MouseEvent e) {\n\t\tthis.setColor(colorHolder.getColor());\n\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent me) \n\t{\n\t\tif (me.getSource() == help1)\n\t\t{\n\t\t\tusernameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfullnameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfirstNameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help2)\n\t\t{\n\t\t\ttitleInput.setBackground(Settings.SITE_ORANGE);\n\t\t\twfurlInput.setBackground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help3)\n\t\t{\n\t\t\ttypeLabel.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help4)\n\t\t{\n\t\t\tintroLabel.setForeground(Settings.SITE_ORANGE);\n\t\t\tloadIntroImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help5)\n\t\t{\n\t\t\tloadMainImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help6)\n\t\t{\n\t\t\tinstructions6.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t}",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n }",
"@Override\n\tprotected void onHover() {\n\n\t}",
"public void stateChanged(ChangeEvent changeEvent) {\n Color newForegroundColor = colorChooser.getColor();\n label.setForeground(newForegroundColor);\n }",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\tsetPanelColor(notificationsPanel);\n\t\t\t\tsidePanelInterface.setPanel(\"notificationsPanel\");\n\n\t\t\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tif(e.getSource() == start)\n\t\t\tstart.setForeground(Color.red);\n\t}",
"public boolean isHovered();",
"@Override\n public void mousePressed(MouseEvent arg0) {\n yourBoardPanel[xx][yy].setBackground(new Color(175, 175, 0));\n }",
"@Override\n\t\t\tpublic void handle(MouseEvent event) {\n\t\t\t\tdrawHoverIndicator(canvas,buttonName);\n\t\t\t}",
"@Override\n public void update(Observable observable) {\n Client c = (Client)observable;\n JLabel l = labels.get(c.getID());\n selectColor(l, c);\n }",
"public void widgetSelected(SelectionEvent arg0) {\n\t\t ColorDialog dlg = new ColorDialog(shell);\r\n\r\n\t\t // Set the selected color in the dialog from\r\n\t\t // user's selected color\r\n\t\t Color shpColor = viewer.getShpReader().getForeColor();\r\n\t\t dlg.setRGB(shpColor.getRGB());\r\n\r\n\t\t // Change the title bar text\r\n\t\t dlg.setText(Messages.getMessage(\"SHPLayersScreen_ColorDialog\"));\r\n\r\n\t\t // Open the dialog and retrieve the selected color\r\n\t\t RGB rgb = dlg.open();\r\n\t\t if (rgb != null && !rgb.equals(shpColor.getRGB())) {\r\n\t\t // Dispose the old color, create the\r\n\t\t // new one, and set into the label\r\n\t\t \tnewColor = new Color(shell.getDisplay(), rgb);\r\n\t\t\t\t\tlabelColor.setBackground(newColor);\r\n\t\t }\r\n\t\t\t}",
"@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\tswitch(event.getAction())\n\t\t\t\t{\n\t\t\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t\t\tv.setBackgroundColor(hovercolor);\n\t\t\t\t\tbreak;\n\t\t\t\tcase MotionEvent.ACTION_UP:\n\t\t\t\t\tv.setBackgroundColor(Color.TRANSPARENT);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}",
"public void displayHover() {\n if (textColour == null) {\r\n displayEmptyHover();\r\n return;\r\n }\r\n stroke(0, 0, 0);\r\n strokeWeight(strokeWeight);\r\n hoverFill(boxColour);\r\n if (strokeWeight != 0 && text != null) {\r\n rect(x, y, w, h, 7);\r\n }\r\n fill(textColour);\r\n textSize(textSize);\r\n text(text, x + xTextOffset, y + yTextOffset);\r\n }",
"public void modeColor(Graphics2D g2d) { g2d.setColor(RTColorManager.getColor(\"label\", \"default\")); }",
"public abstract void setForegroundHover(final int rgba);",
"public void createPurplePickHiglight() {\n\t\tpurplePickHighlight = new JLabel() {\n \t\tprotected void paintComponent(Graphics g) {\n\t \t g.setColor(getBackground());\n \t \tg.fillRect(0, 0, getWidth(), getHeight());\n \t\t\tsuper.paintComponent(g);\n\t\t }\n\t\t};\n\t\tpurplePickHighlight.setBackground(new Color(218, 116, 32, 120));\n\t\trightPanel.add(purplePickHighlight, new Integer(1));\n\t\tpurplePickHighlight.setBounds(45, 10, 210, 88);\n\t\tpurplePickHighlight.setVisible(false);\n\t}",
"public void createBluePickHiglight() {\n\t\tbluePickHighlight = new JLabel() {\n \t\tprotected void paintComponent(Graphics g) {\n\t \t g.setColor(getBackground());\n \t \tg.fillRect(0, 0, getWidth(), getHeight());\n \t\t\tsuper.paintComponent(g);\n\t\t }\n\t\t};\n\t\tbluePickHighlight.setBackground(new Color(218, 116, 32, 120));\n\t\tleftPanel.add(bluePickHighlight, new Integer(1));\n\t\tbluePickHighlight.setBounds(18, 10, 210, 88);\n\t}"
] |
[
"0.67789614",
"0.67727536",
"0.67727536",
"0.67727536",
"0.67727536",
"0.65867376",
"0.6570135",
"0.65028375",
"0.6466315",
"0.6438101",
"0.6423861",
"0.641214",
"0.641018",
"0.63795894",
"0.6371793",
"0.63684404",
"0.6359702",
"0.6359702",
"0.6359702",
"0.6359702",
"0.6292751",
"0.62912977",
"0.6285112",
"0.6278725",
"0.62557894",
"0.62211335",
"0.61795765",
"0.61241746",
"0.6120899",
"0.6091202",
"0.6089388",
"0.6074199",
"0.60728025",
"0.6070774",
"0.6048284",
"0.6027041",
"0.60235924",
"0.6012905",
"0.60103375",
"0.6006608",
"0.5988802",
"0.5987731",
"0.5953363",
"0.59477293",
"0.59317327",
"0.59272414",
"0.592386",
"0.59226733",
"0.5921868",
"0.591234",
"0.59064436",
"0.5902232",
"0.58988726",
"0.5894203",
"0.58906",
"0.5890293",
"0.5887958",
"0.5884274",
"0.58751786",
"0.58715737",
"0.58697283",
"0.5858795",
"0.58547014",
"0.5854374",
"0.5849169",
"0.58448434",
"0.5834623",
"0.58304495",
"0.58186126",
"0.581716",
"0.5815426",
"0.5805089",
"0.5782567",
"0.5774718",
"0.57546633",
"0.5746804",
"0.5745108",
"0.5717349",
"0.56888014",
"0.5687243",
"0.56849766",
"0.56849754",
"0.5683053",
"0.56788784",
"0.56766564",
"0.5669383",
"0.56659424",
"0.5659831",
"0.5641721",
"0.5632481",
"0.5613662",
"0.55987996",
"0.55961436",
"0.5596138",
"0.5592308",
"0.5591782",
"0.5579964",
"0.55746394",
"0.5563575",
"0.5561672"
] |
0.71056974
|
0
|
WHEN THIS METHOD IS CALLED THE 'VIEW PROFILE' LABEL WILL CHANGE BACK TO THE DEFAULT TEXT COLOR WHEN THE MOUSE IS NO LONGER HOVERING OVER IT
|
@FXML
public void resetProfile()
{
profileButton.setOnMouseExited(mouseEvent -> profileButton.setTextFill(Color.WHITE));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@FXML\n public void highlightProfile()\n {\n profileButton.setOnMouseEntered(mouseEvent -> profileButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@FXML\n public void highlightAboutUs()\n {\n aboutUsButton.setOnMouseEntered(mouseEvent -> aboutUsButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\tpublic void mouseEntered(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.orange);\n\t\t\n\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.blue);\r\n\t\t\t\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\n public void touchAction() {\n if (!isDisabled()) {\n if (colorAction != null)\n opponentLabel.removeAction(colorAction);\n colorAction = MyActions.getTouchAction(LightBlocksGame.COLOR_FOCUSSED_ACTOR, getColor());\n opponentLabel.addAction(colorAction);\n }\n }",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@FXML\n public void highlightMultiplayer()\n {\n multiplayerButton.setOnMouseEntered(mouseEvent -> multiplayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@Override\n\tpublic void mouseEntered(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.blue);\n\t}",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t}",
"public void displayHover() {\n if (textColour == null) {\r\n displayEmptyHover();\r\n return;\r\n }\r\n stroke(0, 0, 0);\r\n strokeWeight(strokeWeight);\r\n hoverFill(boxColour);\r\n if (strokeWeight != 0 && text != null) {\r\n rect(x, y, w, h, 7);\r\n }\r\n fill(textColour);\r\n textSize(textSize);\r\n text(text, x + xTextOffset, y + yTextOffset);\r\n }",
"@Override\r\n\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t\t}",
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n if(type == \"close\"){//if the close button is being edited\n button.setBackground(new Color(237,64,64));//colour chosen for the \n }\n if(type == \"scale\"){//if the fullscreen button is being edited\n button.setBackground(coloursObject.getMenuPanelColour());\n }\n }",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(new Color(150,190,200));//蓝色\n\t}",
"@Override\n public void highlightLabel(ObjLabel objLabel) {\n selectXmin = objLabel.getXmin();\n selectYmin = objLabel.getYmin();\n selectXmax = objLabel.getXmax();\n selectYmax = objLabel.getYmax();\n\n //make sure we keep track of this current ObjLabel \n //in the history timeline one object in the past\n if (curObjLabel != objLabel) {\n preObjLabel = curObjLabel;\n }\n curObjLabel = objLabel;\n treeView.getSelectionModel().select(objLabel.getTreeItem());\n\n// oldStroke = curObjLabel.getStroke();\n status(\"Current label: \" + curObjLabel.getName());\n\n repaintCanvas();\n }",
"@FXML\n public void highlightLogout()\n {\n logoutButton.setOnMouseEntered(mouseEvent -> logoutButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n Play.setForeground(Color.blue);\r\n\t\t\t\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.RED);\n\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@FXML\n public void highlightSinglePlayer()\n {\n singlePlayerButton.setOnMouseEntered(mouseEvent -> singlePlayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@FXML\n public void resetAboutUs()\n {\n aboutUsButton.setOnMouseExited(mouseEvent -> aboutUsButton.setTextFill(Color.WHITE));\n }",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.black);\n\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\n public void mouseExited(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.black);\n levelPanel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }",
"@Override\n public void mouseEntered(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.BLUE);\n levelPanel.setCursor(new Cursor(Cursor.HAND_CURSOR));\n }",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jLabel = (JLabel)e.getSource() ;\n\t\tjLabel.setForeground(Color.black) ;\n\t\tjLabel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)) ;\n\t}",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t\t\tPlay.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"private void updateStatusText() {\n Piece.Color playerColor = board.getTurnColor();\n\n if(board.isGameOver()) {\n if(board.isDraw()) {\n tvShowStatus.setTextColor(Color.BLUE);\n tvShowStatus.setText(\"DRAW\");\n }\n else if (board.getWinnerColor() == Piece.Color.Black) {\n tvShowStatus.setTextColor(Color.BLACK);\n tvShowStatus.setText(\"BLACK WINS\");\n }\n else {\n tvShowStatus.setTextColor(Color.WHITE);\n tvShowStatus.setText(\"WHITE WINS\");\n }\n }\n else if(playerColor == Piece.Color.Black) {\n tvShowStatus.setTextColor(Color.BLACK);\n tvShowStatus.setText(\"BLACK\");\n }\n else {\n tvShowStatus.setTextColor(Color.WHITE);\n tvShowStatus.setText(\"WHITE\");\n }\n }",
"public void modeColor(Graphics2D g2d) { g2d.setColor(RTColorManager.getColor(\"label\", \"default\")); }",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.black);\n\t}",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n button.setBackground(coloursObject.getTitlePanelColour());\n }",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n }",
"private void setScoreText(){\n if(color != BLACK && color != WHITE){\n scoreLabel.setText(\"Score: Black - \" + calScore(BLACK) + \" White - \" + calScore(WHITE));\n }else {\n scoreLabel.setText(\"Score: \" + calScore(this.color));\n }\n }",
"@FXML\n public void highlightMainMenu()\n {\n mainMenuButton.setOnMouseEntered(mouseEvent -> mainMenuButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@Override\n public void onConnect(Myo myo, long timestamp) {\n // Set the text color of the text view to cyan when a Myo connects.\n }",
"@Override\n\t\t\tpublic boolean onHover(View v, MotionEvent event) {\n\t\t\t\tswitch(event.getAction())\n\t\t\t\t{\n\t\t\t\tcase MotionEvent.ACTION_HOVER_ENTER:\n\t\t\t\t\tv.setBackgroundColor(Color.LTGRAY);\n\t\t\t\t\tbreak;\n\t\t\t\tcase MotionEvent.ACTION_HOVER_EXIT:\n\t\t\t\t\tv.setBackgroundColor(Color.TRANSPARENT);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}",
"@Override\n\t\tpublic void onPageSelected(int arg0) {\n\t\t\tsetTextViewBG(arg0);\n\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.BLACK);\n\t}",
"@Override\n\tpublic void mouseExited(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.BLACK);\n\t\t\n\t}",
"@Override\n\t\tpublic void handle(MouseEvent event) {\n\t\t\tif(event.getEventType().equals(MouseEvent.MOUSE_CLICKED)){\n\t\t\ttab_01.setTextFill(Color.RED);\n\t\t\ttab_02.setTextFill(Color.BLACK);\n\t\t\ttab_03.setTextFill(Color.BLACK);\n\t\t\ttab_04.setTextFill(Color.BLACK);\n\t\t\ttab_05.setTextFill(Color.BLACK);\n\t\t\t\n\t\t\t\n\t\t\t}\n\t\t}",
"@Override\r\n public void mousePressed(MouseEvent e) {\n setBackground(Color.BLUE);\r\n \r\n \r\n }",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.red);\r\n\t\t\t\t}",
"@Override\n\t\tpublic void handle(MouseEvent event) {\n\t\t\tif(event.getEventType().equals(MouseEvent.MOUSE_CLICKED)){\n\t\t\t\ttab_01.setTextFill(Color.BLACK);\n\t\t\t\ttab_02.setTextFill(Color.BLACK);\n\t\t\t\ttab_03.setTextFill(Color.BLACK);\n\t\t\t\ttab_04.setTextFill(Color.BLACK);\n\t\t\t\ttab_05.setTextFill(Color.RED);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}",
"private void selectColor(JLabel label, Client client){\n label.setForeground(client.getStatus().getColor());\n }",
"@Override\n\t\tpublic void handle(MouseEvent event) {\n\t\t\tif(event.getEventType().equals(MouseEvent.MOUSE_CLICKED)){\n\t\t\t\ttab_01.setTextFill(Color.BLACK);\n\t\t\t\ttab_02.setTextFill(Color.RED);\n\t\t\t\ttab_03.setTextFill(Color.BLACK);\n\t\t\t\ttab_04.setTextFill(Color.BLACK);\n\t\t\t\ttab_05.setTextFill(Color.BLACK);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}",
"void setHoverDetail(String detail);",
"@Override\n\t\tpublic void handle(MouseEvent event) {\n\t\t\tif(event.getEventType().equals(MouseEvent.MOUSE_CLICKED)){\n\t\t\t\n\t\t\t\ttab_01.setTextFill(Color.BLACK);\n\t\t\t\ttab_02.setTextFill(Color.BLACK);\n\t\t\t\ttab_03.setTextFill(Color.BLACK);\n\t\t\t\ttab_04.setTextFill(Color.RED);\n\t\t\t\ttab_05.setTextFill(Color.BLACK);\n\t\t\t\t\n\t\t\t}\n\t\t}",
"@Override\n\t\tpublic void handle(MouseEvent event) {\n\t\t\tif(event.getEventType().equals(MouseEvent.MOUSE_CLICKED)){\n\t\t\t\ttab_01.setTextFill(Color.BLACK);\n\t\t\t\ttab_02.setTextFill(Color.BLACK);\n\t\t\t\ttab_03.setTextFill(Color.RED);\n\t\t\t\ttab_04.setTextFill(Color.BLACK);\n\t\t\t\ttab_05.setTextFill(Color.BLACK);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}",
"@Override\n protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {\n }",
"@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> parent) {\n\t\t\t\timage.setBackground(userlist.get(userlist.size() - 1).getUser_head());\n\t\t\t\tdescription = userlist.get(userlist.size() - 1).getDescription();\n\t\t\t\tif (!description.equals(\"\"))\n\t\t\t\t\tscreen_name.setText(\"个人描述: \" + description);\n\t\t\t\telse\n\t\t\t\t\tscreen_name.setText(\"个人描述: 我的微博,我做主!\");\n\t\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent me)\n\t{\n\t\tif (me.getSource() == help1)\n\t\t{\n\t\t\tusernameSelect.setForeground(Color.BLACK);\n\t\t\tfullnameSelect.setForeground(Color.BLACK);\n\t\t\tfirstNameSelect.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help2)\n\t\t{\n\t\t\ttitleInput.setBackground(Color.WHITE);\n\t\t\twfurlInput.setBackground(Color.WHITE);\n\t\t}\n\t\telse if (me.getSource() == help3)\n\t\t{\n\t\t\ttypeLabel.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help4)\n\t\t{\n\t\t\tintroLabel.setForeground(Color.BLACK);\n\t\t\tloadIntroImg.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help5)\n\t\t{\n\t\t\tloadMainImg.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help6)\n\t\t{\n\t\t\tinstructions6.setForeground(Settings.SITE_GREEN);\n\t\t}\n\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.orange);\n\t\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.orange);\n\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t\t\t\t\t\t}",
"@Override\n public void setFocused()\n {\n setImage(\"MinusFocused.png\");\n }",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\tsetPanelColor(studentPanel);\n\t\t\t\tsidePanelInterface.setPanel(\"studentPanel\");\n\t\t\t}",
"@Override\n public void onClick(View v) {\n ((TextView) findViewById(R.id.text)).setTextColor(getResources().getColor(R.color.orange));\n }",
"void setAvatarClickText(String title);",
"@Override\r\n\t\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.DARK_GRAY);\r\n\t\t\t\t\t}",
"private void btn_HomeMousePressed(java.awt.event.MouseEvent evt) {\n setcolor(btn_Home);\n ind1.setOpaque(true);\n resetcolor(new JPanel[]{btn_anak,btn_transaksi}, new JPanel[]{ind2,ind3});\n \n \n MainParent Mp = new MainParent();\n MainParent.txt_auto.setText(anakP.txt_auto.getText());\n Mp.setVisible(true);\n hide();\n\n }",
"@Override\n\tpublic void mouseEntered(MouseEvent me) \n\t{\n\t\tif (me.getSource() == help1)\n\t\t{\n\t\t\tusernameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfullnameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfirstNameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help2)\n\t\t{\n\t\t\ttitleInput.setBackground(Settings.SITE_ORANGE);\n\t\t\twfurlInput.setBackground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help3)\n\t\t{\n\t\t\ttypeLabel.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help4)\n\t\t{\n\t\t\tintroLabel.setForeground(Settings.SITE_ORANGE);\n\t\t\tloadIntroImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help5)\n\t\t{\n\t\t\tloadMainImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help6)\n\t\t{\n\t\t\tinstructions6.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t}",
"public void mouseEntered(MouseEvent e) {\n JLabel source = (JLabel)e.getSource();\n view.highlightLabel(source);\n }",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tl1.setText(\"You cliked the mouse\");\r\n\t}",
"public void hover() {\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawColor = Color.BLACK;\n\t\t\t}",
"@Override\n protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)\n {\n this.fontRenderer.drawString(this.toolboxInv.getDisplayName().getUnformattedText(), 8, 6, 4210752);\n this.fontRenderer.drawString(this.playerInv.getDisplayName().getUnformattedText(), 8, this.ySize - 96 + 2, 4210752);\n }",
"@Override\n public void mouseEntered(MouseEvent e) {\n setBorderPainted(true);\n setForeground(Color.RED);\n }",
"public void stateChanged(ChangeEvent changeEvent) {\n Color newForegroundColor = colorChooser.getColor();\n label.setForeground(newForegroundColor);\n }",
"@Override\n public void onClick(View v) {\n ((TextView) findViewById(R.id.text)).setTextColor(getResources().getColor(R.color.darkGreen));\n //background color to original\n findViewById(R.id.parent).setBackgroundColor(getResources().getColor(R.color.whiteGreen));\n //text content to original\n ((TextView) findViewById(R.id.text)).setText(\"Hello from Shiying!\");\n\n }",
"private void drawCurrentCodeBlockLabelBg(Canvas canvas) {\n if(mCursor.isSelected() || !mPaintLabel) {\n return;\n }\n int pos = mCursorPosition;\n if(pos == -1) {\n return;\n }\n List<BlockLine> blocks = mSpanner == null ? null : mSpanner.getColors().getBlocks();\n BlockLine block = (blocks != null && blocks.size() > pos) ? blocks.get(pos) : null;\n if(block != null) {\n int left = mCursor.getLeftLine();\n int color = mColors.getColor(ColorScheme.LINE_BLOCK_LABEL);\n if(block.startLine != left) {\n drawLineBackground(canvas,color,block.startLine);\n }\n if(block.endLine != left) {\n drawLineBackground(canvas,color,block.endLine);\n }\n }\n }",
"private void handleMouseHover(MouseEvent mouseEvent) {\n if (simulator.isEditable()) {\n if (!alive) {\n cell.setFill(Color.LIGHTGRAY);\n } else {\n cell.setFill(Color.DARKGRAY);\n }\n }\n }",
"private void updateTextColor() {\n if (mLauncher == null) {\n return;\n }\n ItemInfo info = (ItemInfo) getTag();\n if (info == null || mSupportCard) {\n return;\n }\n int color = getDyncTitleColor(info);\n mIconTitleColor = color;\n setPaintShadowLayer(color);\n if (getPaint().getColor() != color) {\n setTextColor(color);\n }\n\n }",
"public void displayGameOver() {\n\t\tthis.theScreen.setFont(Preferences.GAME_OVER_FONT);\n\t\tthis.theScreen.setColor(Preferences.GAME_OVER_COLOR);\n\t\tthis.theScreen.drawString(Preferences.GAME_OVER_TEXT,\n\t\t\t\tPreferences.GAME_OVER_X, Preferences.GAME_OVER_Y);\n\t}",
"public void hover();",
"@Override\n\tprotected void onHover() {\n\n\t}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"public void resetUsername(MouseEvent e){\n\t\tUsername.setStyle(\"-fx-text-box-border: white; -fx-focus-color: #008ED6;\");\n\t\tuserwrong.setStyle(\"-fx-opacity: 0;\");\n\t}",
"@Override\r\n\tpublic void mousePressed(MouseEvent e) {\n\t\tl1.setText(\"You pressed the mouse\");\r\n\t}",
"public abstract void setForegroundHover(final int rgba);",
"@Override\r\n\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\tComponent com = (Component)e.getSource(); //마우스가 올라간 컴포넌트 알아냄.\r\n\t\t\tcom.setBackground(Color.GRAY);\r\n\t\t}",
"private void highlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.RED, new TicksTiming(0), new TicksTiming(0));\r\n\t }",
"@Override\n public void changeColor(ColorEvent ce) {\n \n txtRed.setText(\"\"+ ce.getColor().getRed());\n txtGreen.setText(\"\"+ ce.getColor().getGreen());\n txtBlue.setText(\"\"+ ce.getColor().getBlue());\n \n \n }",
"private void update() {\n\t\tColor fColor = fgColorProvider.getCurrentColor();\n\t\tColor bColor = bgColorProvider.getCurrentColor();\n\t\tsetText(String.format(\"Foreground color: (%d, %d, %d), background color: (%d, %d, %d).\", \n\t\t\t\tfColor.getRed(), fColor.getGreen(), fColor.getBlue(),\n\t\t\t\tbColor.getRed(), bColor.getGreen(), bColor.getBlue()));\n\t}",
"private void restoreFromOverlay() {\n \t\tString descriptorsString = getOverlayStore().getString(EditorPreferenceNames.EDITOR_TEXT_HOVER_MODIFIERS);\n \t\tfTextHovers = getTextHoverManager().generateTextHoverDescriptors(descriptorsString);\n \t}",
"String getHoverDetail();",
"private void displayName(String name) {\n\t\tGLabel profileName = new GLabel(name);\n\t\tprofileName.setFont(PROFILE_NAME_FONT);\n\t\tprofileName.setColor(Color.BLUE);\n\t\tadd(profileName, LEFT_MARGIN, TOP_MARGIN + profileName.getHeight());\n\t\tnameY = profileName.getY();\n\t}",
"@Override\n\t\t\tpublic boolean onHover(View but_view, MotionEvent arg1) {\n\t\t\t\tint what = arg1.getAction(); \n switch(what){ \n case MotionEvent.ACTION_HOVER_ENTER: //������view \n \t but_view.setBackgroundColor(getResources().getColor(R.color.blue));\n break; \n case MotionEvent.ACTION_HOVER_MOVE: //�����view�� \n System.out.println(\"bottom ACTION_HOVER_MOVE\"); \n break; \n case MotionEvent.ACTION_HOVER_EXIT: //����뿪view \n \t but_view.setBackground(getResources().getDrawable(R.drawable.button_style)); \n break; \n } \n return false; \n\t\t\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\tsetPanelColor(homePanel);\n\t\t\t\tsidePanelInterface.setPanel(\"homePanel\");\n\t\t\t}"
] |
[
"0.68333024",
"0.6317564",
"0.62320006",
"0.6191193",
"0.6187908",
"0.6187908",
"0.6187908",
"0.6187908",
"0.6118015",
"0.6050775",
"0.604278",
"0.60401356",
"0.60360074",
"0.6019747",
"0.6015371",
"0.60147345",
"0.60147345",
"0.60147345",
"0.60147345",
"0.59952927",
"0.59845835",
"0.5983677",
"0.5962794",
"0.5941496",
"0.591013",
"0.5907478",
"0.59035444",
"0.58882976",
"0.58742326",
"0.5873046",
"0.5861788",
"0.58559984",
"0.5841279",
"0.58352613",
"0.5834657",
"0.5833393",
"0.583337",
"0.5832457",
"0.5826492",
"0.58048934",
"0.57981753",
"0.5763394",
"0.5755103",
"0.57494134",
"0.57353956",
"0.5730025",
"0.5722343",
"0.57204026",
"0.5718821",
"0.5713639",
"0.57094467",
"0.56906253",
"0.5689926",
"0.5678024",
"0.56712675",
"0.5670845",
"0.56619114",
"0.5656762",
"0.56549025",
"0.5651425",
"0.56507313",
"0.5637014",
"0.56357086",
"0.56111586",
"0.5600312",
"0.55896467",
"0.5589196",
"0.5579811",
"0.55791473",
"0.55749744",
"0.5557738",
"0.5555186",
"0.5552887",
"0.55465645",
"0.55456835",
"0.5545321",
"0.5534399",
"0.5532759",
"0.55326974",
"0.5512756",
"0.5504761",
"0.54941887",
"0.5492648",
"0.54908824",
"0.5490489",
"0.5485666",
"0.547911",
"0.5478255",
"0.5474161",
"0.5463689",
"0.54560274",
"0.54553354",
"0.5455068",
"0.54489064",
"0.5447249",
"0.54458416",
"0.5445385",
"0.54439455",
"0.5442592",
"0.5438995"
] |
0.6354126
|
1
|
WHEN THIS METHOD IS CALLED THE 'ABOUT US' LABEL WILL CHANGE COLOR WHEN THE MOUSE IS HOVERING OVER IT
|
@FXML
public void highlightAboutUs()
{
aboutUsButton.setOnMouseEntered(mouseEvent -> aboutUsButton.setTextFill(Color.valueOf("#FFD700")));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n }",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t}",
"@Override\n\tpublic void mouseEntered(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.orange);\n\t\t\n\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(new Color(150,190,200));//蓝色\n\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.blue);\n\t}",
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n if(type == \"close\"){//if the close button is being edited\n button.setBackground(new Color(237,64,64));//colour chosen for the \n }\n if(type == \"scale\"){//if the fullscreen button is being edited\n button.setBackground(coloursObject.getMenuPanelColour());\n }\n }",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.RED);\n\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.blue);\r\n\t\t\t\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.black);\n\t}",
"@Override\n public void mouseEntered(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.BLUE);\n levelPanel.setCursor(new Cursor(Cursor.HAND_CURSOR));\n }",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.black);\n\t}",
"@FXML\n public void highlightProfile()\n {\n profileButton.setOnMouseEntered(mouseEvent -> profileButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jLabel = (JLabel)e.getSource() ;\n\t\tjLabel.setForeground(Color.black) ;\n\t\tjLabel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)) ;\n\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.BLACK);\n\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent me)\n\t{\n\t\tif (me.getSource() == help1)\n\t\t{\n\t\t\tusernameSelect.setForeground(Color.BLACK);\n\t\t\tfullnameSelect.setForeground(Color.BLACK);\n\t\t\tfirstNameSelect.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help2)\n\t\t{\n\t\t\ttitleInput.setBackground(Color.WHITE);\n\t\t\twfurlInput.setBackground(Color.WHITE);\n\t\t}\n\t\telse if (me.getSource() == help3)\n\t\t{\n\t\t\ttypeLabel.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help4)\n\t\t{\n\t\t\tintroLabel.setForeground(Color.BLACK);\n\t\t\tloadIntroImg.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help5)\n\t\t{\n\t\t\tloadMainImg.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help6)\n\t\t{\n\t\t\tinstructions6.setForeground(Settings.SITE_GREEN);\n\t\t}\n\t}",
"@FXML\n public void resetAboutUs()\n {\n aboutUsButton.setOnMouseExited(mouseEvent -> aboutUsButton.setTextFill(Color.WHITE));\n }",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\n\tpublic void mouseExited(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.BLACK);\n\t\t\n\t}",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n button.setBackground(coloursObject.getTitlePanelColour());\n }",
"@Override\n\tpublic void mouseEntered(MouseEvent me) \n\t{\n\t\tif (me.getSource() == help1)\n\t\t{\n\t\t\tusernameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfullnameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfirstNameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help2)\n\t\t{\n\t\t\ttitleInput.setBackground(Settings.SITE_ORANGE);\n\t\t\twfurlInput.setBackground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help3)\n\t\t{\n\t\t\ttypeLabel.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help4)\n\t\t{\n\t\t\tintroLabel.setForeground(Settings.SITE_ORANGE);\n\t\t\tloadIntroImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help5)\n\t\t{\n\t\t\tloadMainImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help6)\n\t\t{\n\t\t\tinstructions6.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@FXML\n public void highlightMultiplayer()\n {\n multiplayerButton.setOnMouseEntered(mouseEvent -> multiplayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@Override\n public void mouseExited(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.black);\n levelPanel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n }",
"@FXML\n public void highlightMainMenu()\n {\n mainMenuButton.setOnMouseEntered(mouseEvent -> mainMenuButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.red);\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n Play.setForeground(Color.blue);\r\n\t\t\t\t}",
"public void mouseEntered(MouseEvent e) {\n JLabel source = (JLabel)e.getSource();\n view.highlightLabel(source);\n }",
"private void jLabelSearchMouseEntered(java.awt.event.MouseEvent evt) {\n setColor(jPanel1);\n }",
"public void hover();",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.orange);\n\t\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t\t\t\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t\t\tPlay.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.DARK_GRAY);\r\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.orange);\n\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t\t\t\t\t\t}",
"@FXML\n public void highlightSinglePlayer()\n {\n singlePlayerButton.setOnMouseEntered(mouseEvent -> singlePlayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"public void displayHover() {\n if (textColour == null) {\r\n displayEmptyHover();\r\n return;\r\n }\r\n stroke(0, 0, 0);\r\n strokeWeight(strokeWeight);\r\n hoverFill(boxColour);\r\n if (strokeWeight != 0 && text != null) {\r\n rect(x, y, w, h, 7);\r\n }\r\n fill(textColour);\r\n textSize(textSize);\r\n text(text, x + xTextOffset, y + yTextOffset);\r\n }",
"private void closeLabelMouseEntered(java.awt.event.MouseEvent evt) {\n Border labelBorder = BorderFactory.createMatteBorder(1, 1, 1, 1, Color.MAGENTA);\n closeLabel.setBorder(labelBorder);\n closeLabel.setForeground(Color.red);\n }",
"public void actionPerformed(ActionEvent ae) {\n\tjava.awt.Color newColor = JColorChooser.showDialog(this, \"Choose a new Label Color\", centerLabel.getForeground());\n\tif (newColor != null) {\n\t centerLabel.setForeground(newColor);\n\t}\n }",
"public void hover() {\n\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\tsetPanelColor(homePanel);\n\t\t\t\tsidePanelInterface.setPanel(\"homePanel\");\n\t\t\t}",
"public void mousePressed(MouseEvent me) {\n\t\t\tfigure.setBackgroundColor(ColorConstants.yellow);\n\t\t}",
"private void btn_HomeMousePressed(java.awt.event.MouseEvent evt) {\n setcolor(btn_Home);\n ind1.setOpaque(true);\n resetcolor(new JPanel[]{btn_anak,btn_transaksi}, new JPanel[]{ind2,ind3});\n \n \n MainParent Mp = new MainParent();\n MainParent.txt_auto.setText(anakP.txt_auto.getText());\n Mp.setVisible(true);\n hide();\n\n }",
"@Override\r\n public void mousePressed(MouseEvent e) {\n setBackground(Color.BLUE);\r\n \r\n \r\n }",
"@Override\r\n\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\tComponent com = (Component)e.getSource(); //마우스가 올라간 컴포넌트 알아냄.\r\n\t\t\tcom.setBackground(Color.GRAY);\r\n\t\t}",
"private void handleMouseHover(MouseEvent mouseEvent) {\n if (simulator.isEditable()) {\n if (!alive) {\n cell.setFill(Color.LIGHTGRAY);\n } else {\n cell.setFill(Color.DARKGRAY);\n }\n }\n }",
"@Override\n public void mouseEntered(MouseEvent e) {\n setBorderPainted(true);\n setForeground(Color.RED);\n }",
"@Override\r\npublic void mouseEntered(MouseEvent arg0) {\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"@Override\r\n\tpublic void mousePressed(MouseEvent e) {\n\t\tl1.setText(\"You pressed the mouse\");\r\n\t}",
"@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tl1.setText(\"You entered the mouse\");\r\n\t}",
"public void mouseOver() {\n}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tl1.setText(\"You cliked the mouse\");\r\n\t}",
"public void stateChanged(ChangeEvent changeEvent) {\n Color newForegroundColor = colorChooser.getColor();\n label.setForeground(newForegroundColor);\n }",
"public void updateColorLabel(Color currColor) {\n switch (currColor){\n case GREEN:\n colorLabel2.setBackground(java.awt.Color.green);\n break;\n case YELLOW:\n colorLabel2.setBackground(java.awt.Color.yellow);\n break;\n case RED:\n colorLabel2.setBackground(java.awt.Color.red);\n break;\n case BLUE:\n colorLabel2.setBackground(java.awt.Color.blue);\n break;\n case NONE:\n colorLabel2.setBackground(java.awt.Color.black);\n break;\n }\n }",
"@Override\n\tprotected void onHover() {\n\n\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t\t\t\t\t\t\t}",
"private void selectColor(JLabel label, Client client){\n label.setForeground(client.getStatus().getColor());\n }",
"@Override\r\npublic void mouseExited(MouseEvent arg0) {\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"@Override\r\n\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\tComponent com = (Component)e.getSource(); //마우스가 올라간 컴포넌트 알아냄.\r\n\t\t\tcom.setBackground(Color.GRAY);\r\n\t\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t\t\t\t\t\t}",
"@FXML\n public void highlightLogout()\n {\n logoutButton.setOnMouseEntered(mouseEvent -> logoutButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@Override\n\t\t\tpublic boolean onHover(View v, MotionEvent event) {\n\t\t\t\tswitch(event.getAction())\n\t\t\t\t{\n\t\t\t\tcase MotionEvent.ACTION_HOVER_ENTER:\n\t\t\t\t\tv.setBackgroundColor(Color.LTGRAY);\n\t\t\t\t\tbreak;\n\t\t\t\tcase MotionEvent.ACTION_HOVER_EXIT:\n\t\t\t\t\tv.setBackgroundColor(Color.TRANSPARENT);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}",
"@Override\n\t\t\tpublic boolean onHover(View but_view, MotionEvent arg1) {\n\t\t\t\tint what = arg1.getAction(); \n switch(what){ \n case MotionEvent.ACTION_HOVER_ENTER: //������view \n \t but_view.setBackgroundColor(getResources().getColor(R.color.blue));\n break; \n case MotionEvent.ACTION_HOVER_MOVE: //�����view�� \n System.out.println(\"bottom ACTION_HOVER_MOVE\"); \n break; \n case MotionEvent.ACTION_HOVER_EXIT: //����뿪view \n \t but_view.setBackground(getResources().getDrawable(R.drawable.button_style)); \n break; \n } \n return false; \n\t\t\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tif(e.getSource() == start)\n\t\t\tstart.setForeground(Color.red);\n\t}",
"@Override\n public void onConnect(Myo myo, long timestamp) {\n // Set the text color of the text view to cyan when a Myo connects.\n }",
"@Override\n public void update(Observable observable) {\n Client c = (Client)observable;\n JLabel l = labels.get(c.getID());\n selectColor(l, c);\n }",
"@Override\n public void highlightLabel(ObjLabel objLabel) {\n selectXmin = objLabel.getXmin();\n selectYmin = objLabel.getYmin();\n selectXmax = objLabel.getXmax();\n selectYmax = objLabel.getYmax();\n\n //make sure we keep track of this current ObjLabel \n //in the history timeline one object in the past\n if (curObjLabel != objLabel) {\n preObjLabel = curObjLabel;\n }\n curObjLabel = objLabel;\n treeView.getSelectionModel().select(objLabel.getTreeItem());\n\n// oldStroke = curObjLabel.getStroke();\n status(\"Current label: \" + curObjLabel.getName());\n\n repaintCanvas();\n }",
"@Override\n public void changeColor(ColorEvent ce) {\n \n txtRed.setText(\"\"+ ce.getColor().getRed());\n txtGreen.setText(\"\"+ ce.getColor().getGreen());\n txtBlue.setText(\"\"+ ce.getColor().getBlue());\n \n \n }",
"@Override\r\npublic void mousePressed(MouseEvent arg0) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"public void mousePressed(MouseEvent e){\r\n\t //reset the label\r\n\t if(isBlack) label.setText(\"\t\tWhite's Turn\");\r\n\t else label.setText(\"\t\tBlack's Turn\");\r\n\t \r\n //Do nothing when game is over\r\n if(gameOver) return;\r\n \r\n String colorName=isBlack?\"Black\":\"White\";\r\n\r\n //Convert coordinate to index \r\n xIndex=(e.getX()-MARGIN+GRID_SPAN/2)/GRID_SPAN;\r\n yIndex=(e.getY()-MARGIN+GRID_SPAN/2)/GRID_SPAN;\r\n\r\n //Do nothing when outside the board\r\n if(xIndex<0||xIndex>ROWS||yIndex<0||yIndex>COLS)\r\n return;\r\n\r\n //Do nothing when current position already occupied\r\n if(findChess(xIndex,yIndex))return;\r\n\r\n //if valid, Draw a new chess at current position and add index to the chessList \r\n Point ch=new Point(xIndex,yIndex,isBlack?Color.black:Color.white);\r\n chessList[chessCount++]=ch;\r\n repaint();//run paintComponent\r\n\r\n\r\n //if someone wins, give a message\r\n if(isWin()){\r\n String msg=String.format(\"Congratulations��%s won��\", colorName); \r\n JOptionPane.showMessageDialog(this, msg);\r\n gameOver=true;\r\n }\r\n isBlack=!isBlack;\r\n }",
"public boolean isHovered();",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tif(e.getSource() == start)\n\t\t\tstart.setForeground(new Color(206, 124, 24));\n\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\tsetPanelColor(employeePanel);\n\t\t\t\tsidePanelInterface.setPanel(\"employeePanel\");\n\t\t\t}",
"public void mouseClicked(MouseEvent e) {\n\t\tthis.setColor(colorHolder.getColor());\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawColor = Color.BLUE;\n\t\t\t}",
"private void labelEdit2MouseClicked(MouseEvent e) {\n }",
"@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tString name = d.getName(e.getX(),e.getY());\r\n\t\t\t\tGraphics g = w.getGraphics();\r\n\t\t\t\tg.setColor(Color.RED);\r\n\t\t\t\tg.setFont(new Font(\"Arial\", Font.BOLD, 12));\r\n\t\t\t\tg.drawString(name, e.getX(), e.getY());\r\n\t\t\t}",
"@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tmsg=\"\";\r\n\t\tmsg+=\" You Entered the frame\";\r\n\t\t\r\n\t\tlabel.setText(msg);\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mouseReleased(MouseEvent e) {\n\t\tl1.setText(\"You released the mouse\");\r\n\t}",
"private void homenMouseClicked(java.awt.event.MouseEvent evt) {\n home.setVisible(true);\n homen.setBackground(Color.decode(\"#FFCC00\"));\n product.setVisible(false);\n prdtn.setBackground(Color.decode(\"#00CC66\"));\n stock.setVisible(false);\n stckn.setBackground(Color.decode(\"#00CC66\"));\n report.setVisible(false);\n rprt.setBackground(Color.decode(\"#00CC66\"));\n sales.setVisible(false);\n slsn.setBackground(Color.decode(\"#00CC66\"));\n bill.setVisible(false);\n cusln.setBackground(Color.decode(\"#00CC66\"));\n mng_emp.setVisible(false);\n mngen.setBackground(Color.decode(\"#00CC66\"));\n Update.setVisible(false);\n UPD_PRO.setBackground(Color.decode(\"#00CC66\"));\n }",
"public abstract void clickHelp2(FloodItWorld w, Color chosenColor);",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\tsetPanelColor(studentPanel);\n\t\t\t\tsidePanelInterface.setPanel(\"studentPanel\");\n\t\t\t}",
"public void paletteUserOver(PaletteButton button, boolean inside) {\n if (inside)\n showStatus(((ToolButton) button).name());\n else\n showStatus(fSelectedToolButton.name());\n }",
"public abstract void setForegroundHover(final int rgba);",
"public abstract boolean mouseOver( int x, int y );"
] |
[
"0.69527006",
"0.6785854",
"0.6785854",
"0.6785854",
"0.6785854",
"0.6767963",
"0.67108166",
"0.66657805",
"0.6625409",
"0.654829",
"0.652651",
"0.64756185",
"0.64756185",
"0.64756185",
"0.64756185",
"0.6464127",
"0.63815314",
"0.6378437",
"0.6360437",
"0.63600576",
"0.6352434",
"0.632768",
"0.6323223",
"0.63089615",
"0.6272169",
"0.6255118",
"0.6253277",
"0.6233839",
"0.6227131",
"0.6220589",
"0.62043786",
"0.6198936",
"0.61762077",
"0.6175644",
"0.61537015",
"0.6145298",
"0.6132088",
"0.6110361",
"0.6109103",
"0.610506",
"0.60977656",
"0.6096025",
"0.60564417",
"0.6002401",
"0.5999872",
"0.5995177",
"0.597713",
"0.5970727",
"0.59459174",
"0.59426343",
"0.59264183",
"0.59195244",
"0.5918052",
"0.5905153",
"0.59003943",
"0.5882016",
"0.5873849",
"0.5872242",
"0.58626163",
"0.58591044",
"0.5850515",
"0.58494973",
"0.58404934",
"0.58278745",
"0.5825653",
"0.5825441",
"0.5823141",
"0.5822936",
"0.580385",
"0.57993704",
"0.5798604",
"0.5793684",
"0.5778005",
"0.5773949",
"0.5770705",
"0.57445896",
"0.57390225",
"0.57260895",
"0.5695656",
"0.5694341",
"0.5692378",
"0.56904596",
"0.5682642",
"0.56792724",
"0.5656678",
"0.5651447",
"0.5639181",
"0.5628024",
"0.56249464",
"0.56219745",
"0.5621791",
"0.5621047",
"0.56185454",
"0.5615865",
"0.56027555",
"0.5595572",
"0.5592509",
"0.55791676",
"0.5570887",
"0.5566869"
] |
0.73939544
|
0
|
WHEN THIS METHOD IS CALLED THE 'ABOUT US' LABEL WILL CHANGE BACK TO THE DEFAULT TEXT COLOR WHEN THE MOUSE IS NO LONGER HOVERING OVER IT
|
@FXML
public void resetAboutUs()
{
aboutUsButton.setOnMouseExited(mouseEvent -> aboutUsButton.setTextFill(Color.WHITE));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@FXML\n public void highlightAboutUs()\n {\n aboutUsButton.setOnMouseEntered(mouseEvent -> aboutUsButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n }",
"public void displayHover() {\n if (textColour == null) {\r\n displayEmptyHover();\r\n return;\r\n }\r\n stroke(0, 0, 0);\r\n strokeWeight(strokeWeight);\r\n hoverFill(boxColour);\r\n if (strokeWeight != 0 && text != null) {\r\n rect(x, y, w, h, 7);\r\n }\r\n fill(textColour);\r\n textSize(textSize);\r\n text(text, x + xTextOffset, y + yTextOffset);\r\n }",
"@Override\n\tpublic void mouseEntered(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.orange);\n\t\t\n\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n button.setBackground(coloursObject.getTitlePanelColour());\n }",
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n if(type == \"close\"){//if the close button is being edited\n button.setBackground(new Color(237,64,64));//colour chosen for the \n }\n if(type == \"scale\"){//if the fullscreen button is being edited\n button.setBackground(coloursObject.getMenuPanelColour());\n }\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t}",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n }",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(new Color(150,190,200));//蓝色\n\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jLabel = (JLabel)e.getSource() ;\n\t\tjLabel.setForeground(Color.black) ;\n\t\tjLabel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)) ;\n\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent me)\n\t{\n\t\tif (me.getSource() == help1)\n\t\t{\n\t\t\tusernameSelect.setForeground(Color.BLACK);\n\t\t\tfullnameSelect.setForeground(Color.BLACK);\n\t\t\tfirstNameSelect.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help2)\n\t\t{\n\t\t\ttitleInput.setBackground(Color.WHITE);\n\t\t\twfurlInput.setBackground(Color.WHITE);\n\t\t}\n\t\telse if (me.getSource() == help3)\n\t\t{\n\t\t\ttypeLabel.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help4)\n\t\t{\n\t\t\tintroLabel.setForeground(Color.BLACK);\n\t\t\tloadIntroImg.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help5)\n\t\t{\n\t\t\tloadMainImg.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help6)\n\t\t{\n\t\t\tinstructions6.setForeground(Settings.SITE_GREEN);\n\t\t}\n\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.blue);\n\t}",
"@FXML\n public void highlightMainMenu()\n {\n mainMenuButton.setOnMouseEntered(mouseEvent -> mainMenuButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@Override\n\tpublic void mouseExited(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.black);\n\t}",
"private void btn_HomeMousePressed(java.awt.event.MouseEvent evt) {\n setcolor(btn_Home);\n ind1.setOpaque(true);\n resetcolor(new JPanel[]{btn_anak,btn_transaksi}, new JPanel[]{ind2,ind3});\n \n \n MainParent Mp = new MainParent();\n MainParent.txt_auto.setText(anakP.txt_auto.getText());\n Mp.setVisible(true);\n hide();\n\n }",
"@Override\n\tpublic void mouseEntered(MouseEvent me) \n\t{\n\t\tif (me.getSource() == help1)\n\t\t{\n\t\t\tusernameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfullnameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfirstNameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help2)\n\t\t{\n\t\t\ttitleInput.setBackground(Settings.SITE_ORANGE);\n\t\t\twfurlInput.setBackground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help3)\n\t\t{\n\t\t\ttypeLabel.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help4)\n\t\t{\n\t\t\tintroLabel.setForeground(Settings.SITE_ORANGE);\n\t\t\tloadIntroImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help5)\n\t\t{\n\t\t\tloadMainImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help6)\n\t\t{\n\t\t\tinstructions6.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.RED);\n\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.black);\n\t}",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.blue);\r\n\t\t\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.BLACK);\n\t}",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t}",
"@Override\n public void onConnect(Myo myo, long timestamp) {\n // Set the text color of the text view to cyan when a Myo connects.\n }",
"@Override\r\n\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t\t}",
"@Override\n\tpublic void mouseExited(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.BLACK);\n\t\t\n\t}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n Play.setForeground(Color.blue);\r\n\t\t\t\t}",
"public void actionPerformed(ActionEvent ae) {\n\tjava.awt.Color newColor = JColorChooser.showDialog(this, \"Choose a new Label Color\", centerLabel.getForeground());\n\tif (newColor != null) {\n\t centerLabel.setForeground(newColor);\n\t}\n }",
"@FXML\n public void highlightProfile()\n {\n profileButton.setOnMouseEntered(mouseEvent -> profileButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"private void highlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.RED, new TicksTiming(0), new TicksTiming(0));\r\n\t }",
"@Override\n public void mouseExited(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.black);\n levelPanel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }",
"@FXML\n public void highlightMultiplayer()\n {\n multiplayerButton.setOnMouseEntered(mouseEvent -> multiplayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"private void setHoverDisplay(String text, Vector3 coords) {\n\t\tfloat scaleFactor = 1920 / (Gdx.graphics.getWidth() * 1.0f);\n\t\tfloat x = coords.x * scaleFactor + 50;\n\t\tfloat y = coords.y * scaleFactor - 125;\n\t\tx = Math.min(Math.max(x, 0), 1920 - hoverImage.getWidth());\n\t\ty = Math.min(Math.max(y, 200), 1080 - hoverImage.getHeight());\n\t\thoverLabel.setText(text);\n\t\thoverLabel.setPosition(x + 75, y + 155);\n\t\tif (!text.equals(\"\")) {\n\t\t\thoverImage.setVisible(true);\n\t\t\thoverImage.setPosition(x, y);\n\t\t}\n\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tl1.setText(\"You cliked the mouse\");\r\n\t}",
"public void display_game_over_text () {\n\n fill(150, 100);\n rect(0, 0, displayW, displayH);\n\n textFont(myFont);\n textAlign(CENTER);\n textSize(displayH/20);\n fill(255);\n text(\"Game Over\", displayW/2, 3*displayH/7);\n\n if (score.winnerName == \"Pacmax\") {\n text(\"Winner is Pacmax! Your score is \" + score.score, displayW/2, 4*displayH/7);\n } else {\n text(\"Winner is Blinky!\", displayW/2, 4*displayH/7);\n }\n\n mySound.play_game_over_song();\n\n isKeyInputAllowed = false;\n }",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t\t\tPlay.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"@Override\n public void mouseEntered(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.BLUE);\n levelPanel.setCursor(new Cursor(Cursor.HAND_CURSOR));\n }",
"@Override \n\tpublic void focusGained(FocusEvent e){\n\t\tif(this.getText().equals(this.texto)){\n\t\t\tthis.setText(\"\");\n\t\t\tthis.setForeground(Color.BLACK);\n\t\t}\n\t}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.red);\r\n\t\t\t\t}",
"@Override\r\n\tpublic void mousePressed(MouseEvent e) {\n\t\tl1.setText(\"You pressed the mouse\");\r\n\t}",
"@Override\r\n\t\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.DARK_GRAY);\r\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.orange);\n\t\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t\t\t\t\t\t\t}",
"private void closeLabelMouseEntered(java.awt.event.MouseEvent evt) {\n Border labelBorder = BorderFactory.createMatteBorder(1, 1, 1, 1, Color.MAGENTA);\n closeLabel.setBorder(labelBorder);\n closeLabel.setForeground(Color.red);\n }",
"public void handleOutsourcedButton() {\n machineIdOrCompanyLabel.setText(\"Company Name\");\n\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t\t\t\t\t\t}",
"public void displayGameOver() {\n\t\tthis.theScreen.setFont(Preferences.GAME_OVER_FONT);\n\t\tthis.theScreen.setColor(Preferences.GAME_OVER_COLOR);\n\t\tthis.theScreen.drawString(Preferences.GAME_OVER_TEXT,\n\t\t\t\tPreferences.GAME_OVER_X, Preferences.GAME_OVER_Y);\n\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.orange);\n\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t\t\t\t\t\t}",
"private Label createGameOverLabel(){\n Label text;\n Label.LabelStyle textStyle;\n BitmapFont font = new BitmapFont();\n\n textStyle = new Label.LabelStyle();\n textStyle.font = font;\n\n text = new Label(\"GAME OVER\",textStyle);\n text.setAlignment(Align.center);\n text.setFontScale(4f*scale,4f*scale);\n text.setPosition(stage.getViewport().getCamera().viewportWidth * 0.5f,\n stage.getViewport().getCamera().viewportHeight * 0.80f);\n return text;\n }",
"@FXML\n public void highlightSinglePlayer()\n {\n singlePlayerButton.setOnMouseEntered(mouseEvent -> singlePlayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"private void setScoreText(){\n if(color != BLACK && color != WHITE){\n scoreLabel.setText(\"Score: Black - \" + calScore(BLACK) + \" White - \" + calScore(WHITE));\n }else {\n scoreLabel.setText(\"Score: \" + calScore(this.color));\n }\n }",
"public void hover() {\n\t}",
"public void mouseEntered(MouseEvent e) {\n JLabel source = (JLabel)e.getSource();\n view.highlightLabel(source);\n }",
"public void stateChanged(ChangeEvent changeEvent) {\n Color newForegroundColor = colorChooser.getColor();\n label.setForeground(newForegroundColor);\n }",
"@Override\n\tprotected void onHover() {\n\n\t}",
"@Override\n\t\t\tpublic void mouseMove(MouseEvent e) {\n\t\t\t\tint x = e.x;\n\t\t\t\tint y = e.y;\n\t\t\t\t\n\t\t\t\tgc.setFont(new Font(mainFrame.getDisplay(),\"楷体\",40,SWT.BOLD));\n\t\t\t\tgc.setAlpha(255);\n\t\t\t\tgc.setForeground(new Color(mainFrame.getDisplay(),255,255,255));\n\t\t\t\t\n\t\t\t\tif(settingRect.contains(x,y)) {\n\t\t\t\t\t gc.drawString(\"设置选项\", 342, 285,true);\n\t\t\t\t\t changeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(helpRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"帮助信息\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(aboutRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"关于游戏\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(exitRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"退出游戏\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\telse if(onButton(classicP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"经典模式\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse if(onButton(timeP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"时间模式\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(onButton(levelP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"冒险闯关\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse if(onButton(onlineP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"联网对战\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcanvas.redraw();\n\t\t\t\t\tchangeCursor(false);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}",
"public void hover();",
"@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tl1.setText(\"You entered the mouse\");\r\n\t}",
"public void updateColorLabel(Color currColor) {\n switch (currColor){\n case GREEN:\n colorLabel2.setBackground(java.awt.Color.green);\n break;\n case YELLOW:\n colorLabel2.setBackground(java.awt.Color.yellow);\n break;\n case RED:\n colorLabel2.setBackground(java.awt.Color.red);\n break;\n case BLUE:\n colorLabel2.setBackground(java.awt.Color.blue);\n break;\n case NONE:\n colorLabel2.setBackground(java.awt.Color.black);\n break;\n }\n }",
"@Override\n public void highlightLabel(ObjLabel objLabel) {\n selectXmin = objLabel.getXmin();\n selectYmin = objLabel.getYmin();\n selectXmax = objLabel.getXmax();\n selectYmax = objLabel.getYmax();\n\n //make sure we keep track of this current ObjLabel \n //in the history timeline one object in the past\n if (curObjLabel != objLabel) {\n preObjLabel = curObjLabel;\n }\n curObjLabel = objLabel;\n treeView.getSelectionModel().select(objLabel.getTreeItem());\n\n// oldStroke = curObjLabel.getStroke();\n status(\"Current label: \" + curObjLabel.getName());\n\n repaintCanvas();\n }",
"@Override\n public void onClick(View v) {\n ((TextView) findViewById(R.id.text)).setTextColor(getResources().getColor(R.color.darkGreen));\n //background color to original\n findViewById(R.id.parent).setBackgroundColor(getResources().getColor(R.color.whiteGreen));\n //text content to original\n ((TextView) findViewById(R.id.text)).setText(\"Hello from Shiying!\");\n\n }",
"@Override\r\n\tpublic void mouseReleased(MouseEvent e) {\n\t\tl1.setText(\"You released the mouse\");\r\n\t}",
"private void gameOver(Graphics g) {\n Color saved = g.getColor();\n g.setColor(new Color(0, 0, 0));\n g.setFont(new Font(\"Arial\", 20, 20));\n FontMetrics fm = g.getFontMetrics();\n centreString(OVER, g, fm, PBG.DIMENSION2 / 2);\n centreString(REPLAY, g, fm, PBG.DIMENSION2 / 2 + 50);\n g.setColor(saved);\n }",
"@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tif(\"colorButton\".equals(e.getActionCommand())){//使颜色按钮\r\n\t\t\t\tString ct = tt.resultTextPane.getSelectedText();\r\n\t\t\t\tif(ct != null&&!\"\".equals(ct.trim())){//判断是否已经选取了文字\r\n\t\t\t\t\tFontColor fc = new FontColor(\"0\",this.tt);\r\n\t\t\t\t\tfc.setResizable(false);\r\n\t\t\t\t\tfc.setTitle(\"颜色编辑器\");\r\n\t\t\t\t\tint end = tt.resultTextPane.getSelectionEnd();\r\n\t\t\t\t\tint begin = tt.resultTextPane.getSelectionStart();\r\n\t\t\t\t\tMap<Integer,Integer> map = tt.numberIndex;\r\n\t\t\t\t\tfc.setBegin(map.get(begin));//选中区域的开始位置\r\n\t\t\t\t\tfc.setEnd(map.get(end));//选中区域的结束位置\r\n\t\t\t\t\tfc.setBounds(250, 200, 255, 265);\r\n\t\t\t\t\t\r\n\t\t\t\t\tDimension d=fc.getSize();\r\n\t\t\t\t\tPoint loc = basePanel.getLocationOnScreen();\r\n\t\t \tloc.translate(d.width/3,0);\r\n\t\t \tfc.setLocation(loc);\r\n\t\t \t\r\n\t\t\t\t\t\r\n\t\t\t\t\tfc.setModal(true);\r\n\t\t\t\t\tfc.setVisible(true);\r\n\t\t\t\t\t\r\n\t\t\t\t} else {//没有选取文字\r\n\t\t\t\t\t\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"请选择要编辑的文字\",\"提示\",1);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(\"linkButton\".equals(e.getActionCommand())){//是超链接按钮\r\n\t\t\t\tString ct = tt.resultTextPane.getSelectedText();\r\n\t\t\t\tif(ct != null&&!\"\".equals(ct.trim())){//判断是否已经选取了文字\r\n\t\t\t\t\tint end = tt.resultTextPane.getSelectionEnd();\r\n\t\t\t\t\tint begin = tt.resultTextPane.getSelectionStart();\r\n\t\t\t\t\tMap<Integer,Integer> map = tt.numberIndex;\r\n\t\r\n\t\t\t\t\tUnderLine ul = new UnderLine(map.get(begin),map.get(end),tt);\r\n\t\t\t\t\tul.setResizable(false);\r\n\t\t\t\t\tul.setTitle(\"超链接编辑\");\r\n\t\t\t\t\tul.setContentPane(ul.getTotalPanel());\r\n\t\t\t\t\tul.setBounds(250, 200, 255, 265);\r\n\t\t\t\t\t\r\n\t\t\t\t\tDimension d=ul.getSize();\r\n\t\t\t\t\tPoint loc = basePanel.getLocationOnScreen();\r\n\t\t \tloc.translate(d.width/3,0);\r\n\t\t \tul.setLocation(loc);\r\n\t\t\t\t\t\r\n\t\t\t\t\tul.setModal(true);\r\n\t\t\t\t\tul.setVisible(true);\r\n\t\t\t\t\t\r\n\t\t\t\t} else {//没有选择编辑的文字\r\n\t\t\t\t\t\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"请选择要编辑的文字\",\"提示\",1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(\"icoButton\".equals(e.getActionCommand())){//点击了图片选择按钮\r\n//\t\t\t\tSystem.out.println(resultTextPane.get);\r\n\t\t\t\t\r\n\t\t\t\tint end = tt.resultTextPane.getSelectionEnd();\r\n\t\t\t\tint begin = tt.resultTextPane.getSelectionStart();\r\n\t\t\t\tMap<Integer,Integer> map = tt.numberIndex;\r\n\t\t\t\t\r\n\t\t\t\tIco ico = new Ico(tt,map.get(begin));\r\n\t\t\t\tico.setTitle(\"图标编辑\");\r\n\t\t\t\tico.setResizable(false);\r\n\t\t\t\tico.setContentPane(ico.getTotalPanel());\r\n\t\t\t\tico.setBounds(250, 200, 255, 265);\r\n\r\n\t\t\t\tDimension d=ico.getSize();\r\n\t\t\t\tPoint loc = basePanel.getLocationOnScreen();\r\n\t \tloc.translate(d.width/3,0);\r\n\t \tico.setLocation(loc);\r\n\t \t\r\n\t \tico.setModal(true);\r\n\t\t\t\tico.setVisible(true);\r\n\t\t\t}\r\n\r\n\t\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\tsetPanelColor(homePanel);\n\t\t\t\tsidePanelInterface.setPanel(\"homePanel\");\n\t\t\t}",
"private void unhighlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.BLACK, new TicksTiming(0), new TicksTiming(0));\r\n\r\n\t }",
"private void updateTextColor() {\n if (mLauncher == null) {\n return;\n }\n ItemInfo info = (ItemInfo) getTag();\n if (info == null || mSupportCard) {\n return;\n }\n int color = getDyncTitleColor(info);\n mIconTitleColor = color;\n setPaintShadowLayer(color);\n if (getPaint().getColor() != color) {\n setTextColor(color);\n }\n\n }",
"private void changeTextstr(int currentPoints){\n\n\n switch(currentPoints){\n case 1:\n str.setText(\" very weak\");\n str.setTextColor(Color.RED);\n break;\n case 2:\n str.setText(\" weak\");\n str.setTextColor(Color.parseColor(\"#FF6600\"));\n break;\n case 3:\n str.setText(\" fair\");\n str.setTextColor(Color.parseColor(\"#FFFF66\"));\n break;\n case 4:\n str.setText(\" strong\");\n str.setTextColor(Color.GREEN);\n break;\n case 5:\n str.setText(\" very strong\");\n str.setTextColor(Color.parseColor(\"#2C6700\"));\n }\n\n\n }",
"private void updateStatusText() {\n Piece.Color playerColor = board.getTurnColor();\n\n if(board.isGameOver()) {\n if(board.isDraw()) {\n tvShowStatus.setTextColor(Color.BLUE);\n tvShowStatus.setText(\"DRAW\");\n }\n else if (board.getWinnerColor() == Piece.Color.Black) {\n tvShowStatus.setTextColor(Color.BLACK);\n tvShowStatus.setText(\"BLACK WINS\");\n }\n else {\n tvShowStatus.setTextColor(Color.WHITE);\n tvShowStatus.setText(\"WHITE WINS\");\n }\n }\n else if(playerColor == Piece.Color.Black) {\n tvShowStatus.setTextColor(Color.BLACK);\n tvShowStatus.setText(\"BLACK\");\n }\n else {\n tvShowStatus.setTextColor(Color.WHITE);\n tvShowStatus.setText(\"WHITE\");\n }\n }",
"@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tmsg=\"\";\r\n\t\tmsg+=\" You Entered the frame\";\r\n\t\t\r\n\t\tlabel.setText(msg);\r\n\t\t\r\n\t}",
"@FXML\n public void highlightLogout()\n {\n logoutButton.setOnMouseEntered(mouseEvent -> logoutButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"private void showTitleConnected( String name ) {\n\t\tshowTitle( getTitleConnected( name ) );\t\n\t}",
"private void selectColor(JLabel label, Client client){\n label.setForeground(client.getStatus().getColor());\n }",
"private void setupSpellHereLabel(){\n\t\tJLabel spell_here_text = new JLabel(\"SPELL HERE\");\n\t\tspell_here_text.setFont(new Font(\"Arial\", Font.BOLD, 45));\n\t\tspell_here_text.setForeground(new Color(254, 157, 79));\n\t\tadd(spell_here_text);\n\t\tspell_here_text.setBounds(32, 484, 332, 74);\n\t\tspell_here_text.setOpaque(false);\n\t}",
"public void notifyGameOver() {\n this.myStatusString.setText(\"Game Over\");\n final LineBorder line = new LineBorder(Color.RED, 2, true);\n this.myStatusString.setBorder(line);\n this.myStatusString.setForeground(Color.RED);\n this.myStatusString.setFont(new Font(FONT_TIMES, Font.BOLD, NUM_FONT_SIZE_BIG));\n \n }",
"@Override\n public void onClick(View v) {\n ((TextView) findViewById(R.id.text)).setTextColor(getResources().getColor(R.color.orange));\n }",
"@Override\n public void mouseEntered(MouseEvent e) {\n setBorderPainted(true);\n setForeground(Color.RED);\n }",
"public void gameOver() {\n\t\tframe.setTitle(frame.getTitle() + \" - Game Over\");\n\t}",
"public abstract void setForegroundHover(final int rgba);",
"@Override\n\t\t\tpublic boolean onHover(View v, MotionEvent event) {\n\t\t\t\tswitch(event.getAction())\n\t\t\t\t{\n\t\t\t\tcase MotionEvent.ACTION_HOVER_ENTER:\n\t\t\t\t\tv.setBackgroundColor(Color.LTGRAY);\n\t\t\t\t\tbreak;\n\t\t\t\tcase MotionEvent.ACTION_HOVER_EXIT:\n\t\t\t\t\tv.setBackgroundColor(Color.TRANSPARENT);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}",
"public abstract void clickHelp2(FloodItWorld w, Color chosenColor);",
"@Override\r\n\tpublic void mouseExited(MouseEvent e) {\n\t\tmsg=\"\";\r\n\t\tmsg+=\"You Exited the frame\";\r\n\t\t\r\n\t\tlabel.setText(msg);\r\n\t}",
"public void mouseExited(MouseEvent e) {\n JLabel source = (JLabel)e.getSource();\n view.deHighlightLabel(source);\n }",
"public abstract void setCurForeground(Color colr);",
"@Override\n public void processLowLevelEvent(String action, String[] values) {\n contentLabel.setText(values[0].toUpperCase());\n }",
"@Override\n\t\t\tpublic boolean onHover(View but_view, MotionEvent arg1) {\n\t\t\t\tint what = arg1.getAction(); \n switch(what){ \n case MotionEvent.ACTION_HOVER_ENTER: //������view \n \t but_view.setBackgroundColor(getResources().getColor(R.color.blue));\n break; \n case MotionEvent.ACTION_HOVER_MOVE: //�����view�� \n System.out.println(\"bottom ACTION_HOVER_MOVE\"); \n break; \n case MotionEvent.ACTION_HOVER_EXIT: //����뿪view \n \t but_view.setBackground(getResources().getDrawable(R.drawable.button_style)); \n break; \n } \n return false; \n\t\t\t}"
] |
[
"0.7041606",
"0.6608928",
"0.61784875",
"0.61373746",
"0.6113497",
"0.6113497",
"0.6113497",
"0.6113497",
"0.60962427",
"0.6093891",
"0.6089243",
"0.60782456",
"0.6074856",
"0.60688275",
"0.60688275",
"0.60688275",
"0.60688275",
"0.60611594",
"0.60589355",
"0.6053076",
"0.6043226",
"0.60393995",
"0.6037778",
"0.60253525",
"0.599863",
"0.59852606",
"0.5961096",
"0.5939942",
"0.5924414",
"0.59045404",
"0.5901982",
"0.5888534",
"0.5887645",
"0.58852327",
"0.58821946",
"0.5877251",
"0.58697534",
"0.584786",
"0.5847123",
"0.5842077",
"0.5827154",
"0.58111316",
"0.5784674",
"0.5773622",
"0.57712454",
"0.5758479",
"0.5749824",
"0.57496965",
"0.56921405",
"0.567755",
"0.56767803",
"0.56718373",
"0.5669866",
"0.566903",
"0.5646744",
"0.5641563",
"0.5640975",
"0.56210476",
"0.56165934",
"0.56135297",
"0.5605488",
"0.5602097",
"0.5588931",
"0.55879414",
"0.556959",
"0.5562556",
"0.55589706",
"0.55578613",
"0.55543673",
"0.5548929",
"0.55292183",
"0.5523706",
"0.55182076",
"0.5517032",
"0.5505995",
"0.5501627",
"0.5487283",
"0.54854345",
"0.548385",
"0.5481901",
"0.5480836",
"0.54748404",
"0.54736525",
"0.54642",
"0.54573566",
"0.5455724",
"0.5440947",
"0.54389703",
"0.5430736",
"0.5429904",
"0.542862",
"0.5424807",
"0.5415705",
"0.5413503",
"0.54130393",
"0.54058856",
"0.5396612",
"0.53820205",
"0.53774595",
"0.5376759"
] |
0.65548956
|
2
|
WHEN THIS METHOD IS CALLED THE 'ABOUT US' LABEL WILL CHANGE COLOR WHEN THE MOUSE IS HOVERING OVER IT
|
@FXML
public void highlightLogout()
{
logoutButton.setOnMouseEntered(mouseEvent -> logoutButton.setTextFill(Color.valueOf("#FFD700")));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@FXML\n public void highlightAboutUs()\n {\n aboutUsButton.setOnMouseEntered(mouseEvent -> aboutUsButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n }",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t}",
"@Override\n\tpublic void mouseEntered(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.orange);\n\t\t\n\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(new Color(150,190,200));//蓝色\n\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.blue);\n\t}",
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n if(type == \"close\"){//if the close button is being edited\n button.setBackground(new Color(237,64,64));//colour chosen for the \n }\n if(type == \"scale\"){//if the fullscreen button is being edited\n button.setBackground(coloursObject.getMenuPanelColour());\n }\n }",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.RED);\n\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.blue);\r\n\t\t\t\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.black);\n\t}",
"@Override\n public void mouseEntered(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.BLUE);\n levelPanel.setCursor(new Cursor(Cursor.HAND_CURSOR));\n }",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.black);\n\t}",
"@FXML\n public void highlightProfile()\n {\n profileButton.setOnMouseEntered(mouseEvent -> profileButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jLabel = (JLabel)e.getSource() ;\n\t\tjLabel.setForeground(Color.black) ;\n\t\tjLabel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)) ;\n\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.BLACK);\n\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent me)\n\t{\n\t\tif (me.getSource() == help1)\n\t\t{\n\t\t\tusernameSelect.setForeground(Color.BLACK);\n\t\t\tfullnameSelect.setForeground(Color.BLACK);\n\t\t\tfirstNameSelect.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help2)\n\t\t{\n\t\t\ttitleInput.setBackground(Color.WHITE);\n\t\t\twfurlInput.setBackground(Color.WHITE);\n\t\t}\n\t\telse if (me.getSource() == help3)\n\t\t{\n\t\t\ttypeLabel.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help4)\n\t\t{\n\t\t\tintroLabel.setForeground(Color.BLACK);\n\t\t\tloadIntroImg.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help5)\n\t\t{\n\t\t\tloadMainImg.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help6)\n\t\t{\n\t\t\tinstructions6.setForeground(Settings.SITE_GREEN);\n\t\t}\n\t}",
"@FXML\n public void resetAboutUs()\n {\n aboutUsButton.setOnMouseExited(mouseEvent -> aboutUsButton.setTextFill(Color.WHITE));\n }",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\n\tpublic void mouseExited(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.BLACK);\n\t\t\n\t}",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n button.setBackground(coloursObject.getTitlePanelColour());\n }",
"@Override\n\tpublic void mouseEntered(MouseEvent me) \n\t{\n\t\tif (me.getSource() == help1)\n\t\t{\n\t\t\tusernameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfullnameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfirstNameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help2)\n\t\t{\n\t\t\ttitleInput.setBackground(Settings.SITE_ORANGE);\n\t\t\twfurlInput.setBackground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help3)\n\t\t{\n\t\t\ttypeLabel.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help4)\n\t\t{\n\t\t\tintroLabel.setForeground(Settings.SITE_ORANGE);\n\t\t\tloadIntroImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help5)\n\t\t{\n\t\t\tloadMainImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help6)\n\t\t{\n\t\t\tinstructions6.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@FXML\n public void highlightMultiplayer()\n {\n multiplayerButton.setOnMouseEntered(mouseEvent -> multiplayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@Override\n public void mouseExited(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.black);\n levelPanel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n }",
"@FXML\n public void highlightMainMenu()\n {\n mainMenuButton.setOnMouseEntered(mouseEvent -> mainMenuButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.red);\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n Play.setForeground(Color.blue);\r\n\t\t\t\t}",
"public void mouseEntered(MouseEvent e) {\n JLabel source = (JLabel)e.getSource();\n view.highlightLabel(source);\n }",
"private void jLabelSearchMouseEntered(java.awt.event.MouseEvent evt) {\n setColor(jPanel1);\n }",
"public void hover();",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.orange);\n\t\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t\t\t\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t\t\tPlay.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.DARK_GRAY);\r\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.orange);\n\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t\t\t\t\t\t}",
"@FXML\n public void highlightSinglePlayer()\n {\n singlePlayerButton.setOnMouseEntered(mouseEvent -> singlePlayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"public void displayHover() {\n if (textColour == null) {\r\n displayEmptyHover();\r\n return;\r\n }\r\n stroke(0, 0, 0);\r\n strokeWeight(strokeWeight);\r\n hoverFill(boxColour);\r\n if (strokeWeight != 0 && text != null) {\r\n rect(x, y, w, h, 7);\r\n }\r\n fill(textColour);\r\n textSize(textSize);\r\n text(text, x + xTextOffset, y + yTextOffset);\r\n }",
"private void closeLabelMouseEntered(java.awt.event.MouseEvent evt) {\n Border labelBorder = BorderFactory.createMatteBorder(1, 1, 1, 1, Color.MAGENTA);\n closeLabel.setBorder(labelBorder);\n closeLabel.setForeground(Color.red);\n }",
"public void actionPerformed(ActionEvent ae) {\n\tjava.awt.Color newColor = JColorChooser.showDialog(this, \"Choose a new Label Color\", centerLabel.getForeground());\n\tif (newColor != null) {\n\t centerLabel.setForeground(newColor);\n\t}\n }",
"public void hover() {\n\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\tsetPanelColor(homePanel);\n\t\t\t\tsidePanelInterface.setPanel(\"homePanel\");\n\t\t\t}",
"public void mousePressed(MouseEvent me) {\n\t\t\tfigure.setBackgroundColor(ColorConstants.yellow);\n\t\t}",
"private void btn_HomeMousePressed(java.awt.event.MouseEvent evt) {\n setcolor(btn_Home);\n ind1.setOpaque(true);\n resetcolor(new JPanel[]{btn_anak,btn_transaksi}, new JPanel[]{ind2,ind3});\n \n \n MainParent Mp = new MainParent();\n MainParent.txt_auto.setText(anakP.txt_auto.getText());\n Mp.setVisible(true);\n hide();\n\n }",
"@Override\r\n public void mousePressed(MouseEvent e) {\n setBackground(Color.BLUE);\r\n \r\n \r\n }",
"@Override\r\n\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\tComponent com = (Component)e.getSource(); //마우스가 올라간 컴포넌트 알아냄.\r\n\t\t\tcom.setBackground(Color.GRAY);\r\n\t\t}",
"private void handleMouseHover(MouseEvent mouseEvent) {\n if (simulator.isEditable()) {\n if (!alive) {\n cell.setFill(Color.LIGHTGRAY);\n } else {\n cell.setFill(Color.DARKGRAY);\n }\n }\n }",
"@Override\n public void mouseEntered(MouseEvent e) {\n setBorderPainted(true);\n setForeground(Color.RED);\n }",
"@Override\r\npublic void mouseEntered(MouseEvent arg0) {\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"@Override\r\n\tpublic void mousePressed(MouseEvent e) {\n\t\tl1.setText(\"You pressed the mouse\");\r\n\t}",
"@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tl1.setText(\"You entered the mouse\");\r\n\t}",
"public void mouseOver() {\n}",
"public void stateChanged(ChangeEvent changeEvent) {\n Color newForegroundColor = colorChooser.getColor();\n label.setForeground(newForegroundColor);\n }",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tl1.setText(\"You cliked the mouse\");\r\n\t}",
"public void updateColorLabel(Color currColor) {\n switch (currColor){\n case GREEN:\n colorLabel2.setBackground(java.awt.Color.green);\n break;\n case YELLOW:\n colorLabel2.setBackground(java.awt.Color.yellow);\n break;\n case RED:\n colorLabel2.setBackground(java.awt.Color.red);\n break;\n case BLUE:\n colorLabel2.setBackground(java.awt.Color.blue);\n break;\n case NONE:\n colorLabel2.setBackground(java.awt.Color.black);\n break;\n }\n }",
"@Override\n\tprotected void onHover() {\n\n\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t\t\t\t\t\t\t}",
"private void selectColor(JLabel label, Client client){\n label.setForeground(client.getStatus().getColor());\n }",
"@Override\r\npublic void mouseExited(MouseEvent arg0) {\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"@Override\r\n\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\tComponent com = (Component)e.getSource(); //마우스가 올라간 컴포넌트 알아냄.\r\n\t\t\tcom.setBackground(Color.GRAY);\r\n\t\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\tpublic boolean onHover(View v, MotionEvent event) {\n\t\t\t\tswitch(event.getAction())\n\t\t\t\t{\n\t\t\t\tcase MotionEvent.ACTION_HOVER_ENTER:\n\t\t\t\t\tv.setBackgroundColor(Color.LTGRAY);\n\t\t\t\t\tbreak;\n\t\t\t\tcase MotionEvent.ACTION_HOVER_EXIT:\n\t\t\t\t\tv.setBackgroundColor(Color.TRANSPARENT);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}",
"@Override\n\t\t\tpublic boolean onHover(View but_view, MotionEvent arg1) {\n\t\t\t\tint what = arg1.getAction(); \n switch(what){ \n case MotionEvent.ACTION_HOVER_ENTER: //������view \n \t but_view.setBackgroundColor(getResources().getColor(R.color.blue));\n break; \n case MotionEvent.ACTION_HOVER_MOVE: //�����view�� \n System.out.println(\"bottom ACTION_HOVER_MOVE\"); \n break; \n case MotionEvent.ACTION_HOVER_EXIT: //����뿪view \n \t but_view.setBackground(getResources().getDrawable(R.drawable.button_style)); \n break; \n } \n return false; \n\t\t\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tif(e.getSource() == start)\n\t\t\tstart.setForeground(Color.red);\n\t}",
"@Override\n public void onConnect(Myo myo, long timestamp) {\n // Set the text color of the text view to cyan when a Myo connects.\n }",
"@Override\n public void update(Observable observable) {\n Client c = (Client)observable;\n JLabel l = labels.get(c.getID());\n selectColor(l, c);\n }",
"@Override\n public void highlightLabel(ObjLabel objLabel) {\n selectXmin = objLabel.getXmin();\n selectYmin = objLabel.getYmin();\n selectXmax = objLabel.getXmax();\n selectYmax = objLabel.getYmax();\n\n //make sure we keep track of this current ObjLabel \n //in the history timeline one object in the past\n if (curObjLabel != objLabel) {\n preObjLabel = curObjLabel;\n }\n curObjLabel = objLabel;\n treeView.getSelectionModel().select(objLabel.getTreeItem());\n\n// oldStroke = curObjLabel.getStroke();\n status(\"Current label: \" + curObjLabel.getName());\n\n repaintCanvas();\n }",
"@Override\n public void changeColor(ColorEvent ce) {\n \n txtRed.setText(\"\"+ ce.getColor().getRed());\n txtGreen.setText(\"\"+ ce.getColor().getGreen());\n txtBlue.setText(\"\"+ ce.getColor().getBlue());\n \n \n }",
"@Override\r\npublic void mousePressed(MouseEvent arg0) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}",
"public void mousePressed(MouseEvent e){\r\n\t //reset the label\r\n\t if(isBlack) label.setText(\"\t\tWhite's Turn\");\r\n\t else label.setText(\"\t\tBlack's Turn\");\r\n\t \r\n //Do nothing when game is over\r\n if(gameOver) return;\r\n \r\n String colorName=isBlack?\"Black\":\"White\";\r\n\r\n //Convert coordinate to index \r\n xIndex=(e.getX()-MARGIN+GRID_SPAN/2)/GRID_SPAN;\r\n yIndex=(e.getY()-MARGIN+GRID_SPAN/2)/GRID_SPAN;\r\n\r\n //Do nothing when outside the board\r\n if(xIndex<0||xIndex>ROWS||yIndex<0||yIndex>COLS)\r\n return;\r\n\r\n //Do nothing when current position already occupied\r\n if(findChess(xIndex,yIndex))return;\r\n\r\n //if valid, Draw a new chess at current position and add index to the chessList \r\n Point ch=new Point(xIndex,yIndex,isBlack?Color.black:Color.white);\r\n chessList[chessCount++]=ch;\r\n repaint();//run paintComponent\r\n\r\n\r\n //if someone wins, give a message\r\n if(isWin()){\r\n String msg=String.format(\"Congratulations��%s won��\", colorName); \r\n JOptionPane.showMessageDialog(this, msg);\r\n gameOver=true;\r\n }\r\n isBlack=!isBlack;\r\n }",
"public boolean isHovered();",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tif(e.getSource() == start)\n\t\t\tstart.setForeground(new Color(206, 124, 24));\n\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\tsetPanelColor(employeePanel);\n\t\t\t\tsidePanelInterface.setPanel(\"employeePanel\");\n\t\t\t}",
"public void mouseClicked(MouseEvent e) {\n\t\tthis.setColor(colorHolder.getColor());\n\t}",
"private void labelEdit2MouseClicked(MouseEvent e) {\n }",
"@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tString name = d.getName(e.getX(),e.getY());\r\n\t\t\t\tGraphics g = w.getGraphics();\r\n\t\t\t\tg.setColor(Color.RED);\r\n\t\t\t\tg.setFont(new Font(\"Arial\", Font.BOLD, 12));\r\n\t\t\t\tg.drawString(name, e.getX(), e.getY());\r\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawColor = Color.BLUE;\n\t\t\t}",
"@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tmsg=\"\";\r\n\t\tmsg+=\" You Entered the frame\";\r\n\t\t\r\n\t\tlabel.setText(msg);\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mouseReleased(MouseEvent e) {\n\t\tl1.setText(\"You released the mouse\");\r\n\t}",
"private void homenMouseClicked(java.awt.event.MouseEvent evt) {\n home.setVisible(true);\n homen.setBackground(Color.decode(\"#FFCC00\"));\n product.setVisible(false);\n prdtn.setBackground(Color.decode(\"#00CC66\"));\n stock.setVisible(false);\n stckn.setBackground(Color.decode(\"#00CC66\"));\n report.setVisible(false);\n rprt.setBackground(Color.decode(\"#00CC66\"));\n sales.setVisible(false);\n slsn.setBackground(Color.decode(\"#00CC66\"));\n bill.setVisible(false);\n cusln.setBackground(Color.decode(\"#00CC66\"));\n mng_emp.setVisible(false);\n mngen.setBackground(Color.decode(\"#00CC66\"));\n Update.setVisible(false);\n UPD_PRO.setBackground(Color.decode(\"#00CC66\"));\n }",
"public abstract void clickHelp2(FloodItWorld w, Color chosenColor);",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\tsetPanelColor(studentPanel);\n\t\t\t\tsidePanelInterface.setPanel(\"studentPanel\");\n\t\t\t}",
"public void paletteUserOver(PaletteButton button, boolean inside) {\n if (inside)\n showStatus(((ToolButton) button).name());\n else\n showStatus(fSelectedToolButton.name());\n }",
"public abstract void setForegroundHover(final int rgba);",
"public abstract boolean mouseOver( int x, int y );"
] |
[
"0.7393359",
"0.6952964",
"0.67861086",
"0.67861086",
"0.67861086",
"0.67861086",
"0.6768276",
"0.67112446",
"0.6666458",
"0.66255057",
"0.65485084",
"0.65272474",
"0.6475323",
"0.6475323",
"0.6475323",
"0.6475323",
"0.64639133",
"0.6382166",
"0.63785195",
"0.63609356",
"0.6360082",
"0.6352366",
"0.63284683",
"0.63228303",
"0.6308973",
"0.6272092",
"0.6255415",
"0.62531126",
"0.6233911",
"0.62274706",
"0.6221227",
"0.62036926",
"0.6199187",
"0.61760896",
"0.61752987",
"0.6154485",
"0.6145778",
"0.6131597",
"0.61099553",
"0.6108953",
"0.61043787",
"0.609737",
"0.60954815",
"0.605562",
"0.6003868",
"0.59989613",
"0.5995285",
"0.59766394",
"0.59703094",
"0.59460944",
"0.59421444",
"0.59267884",
"0.592044",
"0.5918532",
"0.5904429",
"0.5898209",
"0.58807087",
"0.58726275",
"0.5871992",
"0.5862516",
"0.58593476",
"0.5850524",
"0.58497375",
"0.58399993",
"0.5827308",
"0.5825258",
"0.58247924",
"0.5823533",
"0.58223516",
"0.58049",
"0.57989246",
"0.5798271",
"0.57954895",
"0.57779115",
"0.57738274",
"0.57704395",
"0.5738075",
"0.57251203",
"0.5695766",
"0.5694229",
"0.5692268",
"0.5690747",
"0.56840086",
"0.5679589",
"0.5657089",
"0.5650762",
"0.5638889",
"0.5627723",
"0.5624447",
"0.56224465",
"0.56224304",
"0.5622052",
"0.56182003",
"0.5615395",
"0.5602819",
"0.5595176",
"0.5592117",
"0.55779225",
"0.55709994",
"0.5566308"
] |
0.5744584
|
76
|
WHEN THIS METHOD IS CALLED THE 'ABOUT US' LABEL WILL CHANGE BACK TO THE DEFAULT TEXT COLOR WHEN THE MOUSE IS NO LONGER HOVERING OVER IT
|
@FXML
public void resetLogout()
{
logoutButton.setOnMouseExited(mouseEvent -> logoutButton.setTextFill(Color.WHITE));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@FXML\n public void highlightAboutUs()\n {\n aboutUsButton.setOnMouseEntered(mouseEvent -> aboutUsButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n }",
"@FXML\n public void resetAboutUs()\n {\n aboutUsButton.setOnMouseExited(mouseEvent -> aboutUsButton.setTextFill(Color.WHITE));\n }",
"public void displayHover() {\n if (textColour == null) {\r\n displayEmptyHover();\r\n return;\r\n }\r\n stroke(0, 0, 0);\r\n strokeWeight(strokeWeight);\r\n hoverFill(boxColour);\r\n if (strokeWeight != 0 && text != null) {\r\n rect(x, y, w, h, 7);\r\n }\r\n fill(textColour);\r\n textSize(textSize);\r\n text(text, x + xTextOffset, y + yTextOffset);\r\n }",
"@Override\n\tpublic void mouseEntered(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.orange);\n\t\t\n\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n button.setBackground(coloursObject.getTitlePanelColour());\n }",
"public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n if(type == \"close\"){//if the close button is being edited\n button.setBackground(new Color(237,64,64));//colour chosen for the \n }\n if(type == \"scale\"){//if the fullscreen button is being edited\n button.setBackground(coloursObject.getMenuPanelColour());\n }\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t}",
"public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n }",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(new Color(150,190,200));//蓝色\n\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jLabel = (JLabel)e.getSource() ;\n\t\tjLabel.setForeground(Color.black) ;\n\t\tjLabel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)) ;\n\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent me)\n\t{\n\t\tif (me.getSource() == help1)\n\t\t{\n\t\t\tusernameSelect.setForeground(Color.BLACK);\n\t\t\tfullnameSelect.setForeground(Color.BLACK);\n\t\t\tfirstNameSelect.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help2)\n\t\t{\n\t\t\ttitleInput.setBackground(Color.WHITE);\n\t\t\twfurlInput.setBackground(Color.WHITE);\n\t\t}\n\t\telse if (me.getSource() == help3)\n\t\t{\n\t\t\ttypeLabel.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help4)\n\t\t{\n\t\t\tintroLabel.setForeground(Color.BLACK);\n\t\t\tloadIntroImg.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help5)\n\t\t{\n\t\t\tloadMainImg.setForeground(Color.BLACK);\n\t\t}\n\t\telse if (me.getSource() == help6)\n\t\t{\n\t\t\tinstructions6.setForeground(Settings.SITE_GREEN);\n\t\t}\n\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.blue);\n\t}",
"@FXML\n public void highlightMainMenu()\n {\n mainMenuButton.setOnMouseEntered(mouseEvent -> mainMenuButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"@Override\n\tpublic void mouseExited(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.black);\n\t}",
"private void btn_HomeMousePressed(java.awt.event.MouseEvent evt) {\n setcolor(btn_Home);\n ind1.setOpaque(true);\n resetcolor(new JPanel[]{btn_anak,btn_transaksi}, new JPanel[]{ind2,ind3});\n \n \n MainParent Mp = new MainParent();\n MainParent.txt_auto.setText(anakP.txt_auto.getText());\n Mp.setVisible(true);\n hide();\n\n }",
"@Override\n\tpublic void mouseEntered(MouseEvent me) \n\t{\n\t\tif (me.getSource() == help1)\n\t\t{\n\t\t\tusernameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfullnameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t\tfirstNameSelect.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help2)\n\t\t{\n\t\t\ttitleInput.setBackground(Settings.SITE_ORANGE);\n\t\t\twfurlInput.setBackground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help3)\n\t\t{\n\t\t\ttypeLabel.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help4)\n\t\t{\n\t\t\tintroLabel.setForeground(Settings.SITE_ORANGE);\n\t\t\tloadIntroImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help5)\n\t\t{\n\t\t\tloadMainImg.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t\telse if (me.getSource() == help6)\n\t\t{\n\t\t\tinstructions6.setForeground(Settings.SITE_ORANGE);\n\t\t}\n\t}",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.RED);\n\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.black);\n\t}",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.blue);\r\n\t\t\t\t}",
"@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.BLACK);\n\t}",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t}",
"@Override\n public void onConnect(Myo myo, long timestamp) {\n // Set the text color of the text view to cyan when a Myo connects.\n }",
"@Override\r\n\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.blue);\r\n\t\t\t\t\t}",
"@Override\n\tpublic void mouseExited(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.BLACK);\n\t\t\n\t}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n Play.setForeground(Color.blue);\r\n\t\t\t\t}",
"public void actionPerformed(ActionEvent ae) {\n\tjava.awt.Color newColor = JColorChooser.showDialog(this, \"Choose a new Label Color\", centerLabel.getForeground());\n\tif (newColor != null) {\n\t centerLabel.setForeground(newColor);\n\t}\n }",
"@FXML\n public void highlightProfile()\n {\n profileButton.setOnMouseEntered(mouseEvent -> profileButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"private void highlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.RED, new TicksTiming(0), new TicksTiming(0));\r\n\t }",
"@Override\n public void mouseExited(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.black);\n levelPanel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }",
"@FXML\n public void highlightMultiplayer()\n {\n multiplayerButton.setOnMouseEntered(mouseEvent -> multiplayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"private void setHoverDisplay(String text, Vector3 coords) {\n\t\tfloat scaleFactor = 1920 / (Gdx.graphics.getWidth() * 1.0f);\n\t\tfloat x = coords.x * scaleFactor + 50;\n\t\tfloat y = coords.y * scaleFactor - 125;\n\t\tx = Math.min(Math.max(x, 0), 1920 - hoverImage.getWidth());\n\t\ty = Math.min(Math.max(y, 200), 1080 - hoverImage.getHeight());\n\t\thoverLabel.setText(text);\n\t\thoverLabel.setPosition(x + 75, y + 155);\n\t\tif (!text.equals(\"\")) {\n\t\t\thoverImage.setVisible(true);\n\t\t\thoverImage.setPosition(x, y);\n\t\t}\n\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tl1.setText(\"You cliked the mouse\");\r\n\t}",
"public void display_game_over_text () {\n\n fill(150, 100);\n rect(0, 0, displayW, displayH);\n\n textFont(myFont);\n textAlign(CENTER);\n textSize(displayH/20);\n fill(255);\n text(\"Game Over\", displayW/2, 3*displayH/7);\n\n if (score.winnerName == \"Pacmax\") {\n text(\"Winner is Pacmax! Your score is \" + score.score, displayW/2, 4*displayH/7);\n } else {\n text(\"Winner is Blinky!\", displayW/2, 4*displayH/7);\n }\n\n mySound.play_game_over_song();\n\n isKeyInputAllowed = false;\n }",
"@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t\t\tPlay.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"@Override\n public void mouseEntered(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.BLUE);\n levelPanel.setCursor(new Cursor(Cursor.HAND_CURSOR));\n }",
"@Override \n\tpublic void focusGained(FocusEvent e){\n\t\tif(this.getText().equals(this.texto)){\n\t\t\tthis.setText(\"\");\n\t\t\tthis.setForeground(Color.BLACK);\n\t\t}\n\t}",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\tRestartTournament.setForeground(Color.red);\r\n\t\t\t\t}",
"@Override\r\n\tpublic void mousePressed(MouseEvent e) {\n\t\tl1.setText(\"You pressed the mouse\");\r\n\t}",
"@Override\r\n\t\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\t\tSim.setForeground(Color.DARK_GRAY);\r\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.orange);\n\t\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t\t\t\t\t\t\t}",
"private void closeLabelMouseEntered(java.awt.event.MouseEvent evt) {\n Border labelBorder = BorderFactory.createMatteBorder(1, 1, 1, 1, Color.MAGENTA);\n closeLabel.setBorder(labelBorder);\n closeLabel.setForeground(Color.red);\n }",
"public void handleOutsourcedButton() {\n machineIdOrCompanyLabel.setText(\"Company Name\");\n\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t\t\t\t\t\t}",
"public void displayGameOver() {\n\t\tthis.theScreen.setFont(Preferences.GAME_OVER_FONT);\n\t\tthis.theScreen.setColor(Preferences.GAME_OVER_COLOR);\n\t\tthis.theScreen.drawString(Preferences.GAME_OVER_TEXT,\n\t\t\t\tPreferences.GAME_OVER_X, Preferences.GAME_OVER_Y);\n\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tcourse.setForeground(Color.orange);\n\t\t\t\t\t\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t\t\t\t\t\t}",
"private Label createGameOverLabel(){\n Label text;\n Label.LabelStyle textStyle;\n BitmapFont font = new BitmapFont();\n\n textStyle = new Label.LabelStyle();\n textStyle.font = font;\n\n text = new Label(\"GAME OVER\",textStyle);\n text.setAlignment(Align.center);\n text.setFontScale(4f*scale,4f*scale);\n text.setPosition(stage.getViewport().getCamera().viewportWidth * 0.5f,\n stage.getViewport().getCamera().viewportHeight * 0.80f);\n return text;\n }",
"@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\tSim.setForeground(Color.darkGray);\r\n\t\t\t\t}",
"@FXML\n public void highlightSinglePlayer()\n {\n singlePlayerButton.setOnMouseEntered(mouseEvent -> singlePlayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"private void setScoreText(){\n if(color != BLACK && color != WHITE){\n scoreLabel.setText(\"Score: Black - \" + calScore(BLACK) + \" White - \" + calScore(WHITE));\n }else {\n scoreLabel.setText(\"Score: \" + calScore(this.color));\n }\n }",
"public void hover() {\n\t}",
"public void mouseEntered(MouseEvent e) {\n JLabel source = (JLabel)e.getSource();\n view.highlightLabel(source);\n }",
"public void stateChanged(ChangeEvent changeEvent) {\n Color newForegroundColor = colorChooser.getColor();\n label.setForeground(newForegroundColor);\n }",
"@Override\n\tprotected void onHover() {\n\n\t}",
"@Override\n\t\t\tpublic void mouseMove(MouseEvent e) {\n\t\t\t\tint x = e.x;\n\t\t\t\tint y = e.y;\n\t\t\t\t\n\t\t\t\tgc.setFont(new Font(mainFrame.getDisplay(),\"楷体\",40,SWT.BOLD));\n\t\t\t\tgc.setAlpha(255);\n\t\t\t\tgc.setForeground(new Color(mainFrame.getDisplay(),255,255,255));\n\t\t\t\t\n\t\t\t\tif(settingRect.contains(x,y)) {\n\t\t\t\t\t gc.drawString(\"设置选项\", 342, 285,true);\n\t\t\t\t\t changeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(helpRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"帮助信息\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(aboutRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"关于游戏\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(exitRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"退出游戏\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\telse if(onButton(classicP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"经典模式\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse if(onButton(timeP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"时间模式\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(onButton(levelP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"冒险闯关\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse if(onButton(onlineP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"联网对战\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcanvas.redraw();\n\t\t\t\t\tchangeCursor(false);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}",
"public void hover();",
"@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tl1.setText(\"You entered the mouse\");\r\n\t}",
"public void updateColorLabel(Color currColor) {\n switch (currColor){\n case GREEN:\n colorLabel2.setBackground(java.awt.Color.green);\n break;\n case YELLOW:\n colorLabel2.setBackground(java.awt.Color.yellow);\n break;\n case RED:\n colorLabel2.setBackground(java.awt.Color.red);\n break;\n case BLUE:\n colorLabel2.setBackground(java.awt.Color.blue);\n break;\n case NONE:\n colorLabel2.setBackground(java.awt.Color.black);\n break;\n }\n }",
"@Override\n public void highlightLabel(ObjLabel objLabel) {\n selectXmin = objLabel.getXmin();\n selectYmin = objLabel.getYmin();\n selectXmax = objLabel.getXmax();\n selectYmax = objLabel.getYmax();\n\n //make sure we keep track of this current ObjLabel \n //in the history timeline one object in the past\n if (curObjLabel != objLabel) {\n preObjLabel = curObjLabel;\n }\n curObjLabel = objLabel;\n treeView.getSelectionModel().select(objLabel.getTreeItem());\n\n// oldStroke = curObjLabel.getStroke();\n status(\"Current label: \" + curObjLabel.getName());\n\n repaintCanvas();\n }",
"@Override\n public void onClick(View v) {\n ((TextView) findViewById(R.id.text)).setTextColor(getResources().getColor(R.color.darkGreen));\n //background color to original\n findViewById(R.id.parent).setBackgroundColor(getResources().getColor(R.color.whiteGreen));\n //text content to original\n ((TextView) findViewById(R.id.text)).setText(\"Hello from Shiying!\");\n\n }",
"@Override\r\n\tpublic void mouseReleased(MouseEvent e) {\n\t\tl1.setText(\"You released the mouse\");\r\n\t}",
"private void gameOver(Graphics g) {\n Color saved = g.getColor();\n g.setColor(new Color(0, 0, 0));\n g.setFont(new Font(\"Arial\", 20, 20));\n FontMetrics fm = g.getFontMetrics();\n centreString(OVER, g, fm, PBG.DIMENSION2 / 2);\n centreString(REPLAY, g, fm, PBG.DIMENSION2 / 2 + 50);\n g.setColor(saved);\n }",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\tsetPanelColor(homePanel);\n\t\t\t\tsidePanelInterface.setPanel(\"homePanel\");\n\t\t\t}",
"@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tif(\"colorButton\".equals(e.getActionCommand())){//使颜色按钮\r\n\t\t\t\tString ct = tt.resultTextPane.getSelectedText();\r\n\t\t\t\tif(ct != null&&!\"\".equals(ct.trim())){//判断是否已经选取了文字\r\n\t\t\t\t\tFontColor fc = new FontColor(\"0\",this.tt);\r\n\t\t\t\t\tfc.setResizable(false);\r\n\t\t\t\t\tfc.setTitle(\"颜色编辑器\");\r\n\t\t\t\t\tint end = tt.resultTextPane.getSelectionEnd();\r\n\t\t\t\t\tint begin = tt.resultTextPane.getSelectionStart();\r\n\t\t\t\t\tMap<Integer,Integer> map = tt.numberIndex;\r\n\t\t\t\t\tfc.setBegin(map.get(begin));//选中区域的开始位置\r\n\t\t\t\t\tfc.setEnd(map.get(end));//选中区域的结束位置\r\n\t\t\t\t\tfc.setBounds(250, 200, 255, 265);\r\n\t\t\t\t\t\r\n\t\t\t\t\tDimension d=fc.getSize();\r\n\t\t\t\t\tPoint loc = basePanel.getLocationOnScreen();\r\n\t\t \tloc.translate(d.width/3,0);\r\n\t\t \tfc.setLocation(loc);\r\n\t\t \t\r\n\t\t\t\t\t\r\n\t\t\t\t\tfc.setModal(true);\r\n\t\t\t\t\tfc.setVisible(true);\r\n\t\t\t\t\t\r\n\t\t\t\t} else {//没有选取文字\r\n\t\t\t\t\t\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"请选择要编辑的文字\",\"提示\",1);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(\"linkButton\".equals(e.getActionCommand())){//是超链接按钮\r\n\t\t\t\tString ct = tt.resultTextPane.getSelectedText();\r\n\t\t\t\tif(ct != null&&!\"\".equals(ct.trim())){//判断是否已经选取了文字\r\n\t\t\t\t\tint end = tt.resultTextPane.getSelectionEnd();\r\n\t\t\t\t\tint begin = tt.resultTextPane.getSelectionStart();\r\n\t\t\t\t\tMap<Integer,Integer> map = tt.numberIndex;\r\n\t\r\n\t\t\t\t\tUnderLine ul = new UnderLine(map.get(begin),map.get(end),tt);\r\n\t\t\t\t\tul.setResizable(false);\r\n\t\t\t\t\tul.setTitle(\"超链接编辑\");\r\n\t\t\t\t\tul.setContentPane(ul.getTotalPanel());\r\n\t\t\t\t\tul.setBounds(250, 200, 255, 265);\r\n\t\t\t\t\t\r\n\t\t\t\t\tDimension d=ul.getSize();\r\n\t\t\t\t\tPoint loc = basePanel.getLocationOnScreen();\r\n\t\t \tloc.translate(d.width/3,0);\r\n\t\t \tul.setLocation(loc);\r\n\t\t\t\t\t\r\n\t\t\t\t\tul.setModal(true);\r\n\t\t\t\t\tul.setVisible(true);\r\n\t\t\t\t\t\r\n\t\t\t\t} else {//没有选择编辑的文字\r\n\t\t\t\t\t\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"请选择要编辑的文字\",\"提示\",1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(\"icoButton\".equals(e.getActionCommand())){//点击了图片选择按钮\r\n//\t\t\t\tSystem.out.println(resultTextPane.get);\r\n\t\t\t\t\r\n\t\t\t\tint end = tt.resultTextPane.getSelectionEnd();\r\n\t\t\t\tint begin = tt.resultTextPane.getSelectionStart();\r\n\t\t\t\tMap<Integer,Integer> map = tt.numberIndex;\r\n\t\t\t\t\r\n\t\t\t\tIco ico = new Ico(tt,map.get(begin));\r\n\t\t\t\tico.setTitle(\"图标编辑\");\r\n\t\t\t\tico.setResizable(false);\r\n\t\t\t\tico.setContentPane(ico.getTotalPanel());\r\n\t\t\t\tico.setBounds(250, 200, 255, 265);\r\n\r\n\t\t\t\tDimension d=ico.getSize();\r\n\t\t\t\tPoint loc = basePanel.getLocationOnScreen();\r\n\t \tloc.translate(d.width/3,0);\r\n\t \tico.setLocation(loc);\r\n\t \t\r\n\t \tico.setModal(true);\r\n\t\t\t\tico.setVisible(true);\r\n\t\t\t}\r\n\r\n\t\t}",
"private void unhighlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.BLACK, new TicksTiming(0), new TicksTiming(0));\r\n\r\n\t }",
"private void updateTextColor() {\n if (mLauncher == null) {\n return;\n }\n ItemInfo info = (ItemInfo) getTag();\n if (info == null || mSupportCard) {\n return;\n }\n int color = getDyncTitleColor(info);\n mIconTitleColor = color;\n setPaintShadowLayer(color);\n if (getPaint().getColor() != color) {\n setTextColor(color);\n }\n\n }",
"private void changeTextstr(int currentPoints){\n\n\n switch(currentPoints){\n case 1:\n str.setText(\" very weak\");\n str.setTextColor(Color.RED);\n break;\n case 2:\n str.setText(\" weak\");\n str.setTextColor(Color.parseColor(\"#FF6600\"));\n break;\n case 3:\n str.setText(\" fair\");\n str.setTextColor(Color.parseColor(\"#FFFF66\"));\n break;\n case 4:\n str.setText(\" strong\");\n str.setTextColor(Color.GREEN);\n break;\n case 5:\n str.setText(\" very strong\");\n str.setTextColor(Color.parseColor(\"#2C6700\"));\n }\n\n\n }",
"private void updateStatusText() {\n Piece.Color playerColor = board.getTurnColor();\n\n if(board.isGameOver()) {\n if(board.isDraw()) {\n tvShowStatus.setTextColor(Color.BLUE);\n tvShowStatus.setText(\"DRAW\");\n }\n else if (board.getWinnerColor() == Piece.Color.Black) {\n tvShowStatus.setTextColor(Color.BLACK);\n tvShowStatus.setText(\"BLACK WINS\");\n }\n else {\n tvShowStatus.setTextColor(Color.WHITE);\n tvShowStatus.setText(\"WHITE WINS\");\n }\n }\n else if(playerColor == Piece.Color.Black) {\n tvShowStatus.setTextColor(Color.BLACK);\n tvShowStatus.setText(\"BLACK\");\n }\n else {\n tvShowStatus.setTextColor(Color.WHITE);\n tvShowStatus.setText(\"WHITE\");\n }\n }",
"@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tmsg=\"\";\r\n\t\tmsg+=\" You Entered the frame\";\r\n\t\t\r\n\t\tlabel.setText(msg);\r\n\t\t\r\n\t}",
"@FXML\n public void highlightLogout()\n {\n logoutButton.setOnMouseEntered(mouseEvent -> logoutButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }",
"private void showTitleConnected( String name ) {\n\t\tshowTitle( getTitleConnected( name ) );\t\n\t}",
"private void selectColor(JLabel label, Client client){\n label.setForeground(client.getStatus().getColor());\n }",
"private void setupSpellHereLabel(){\n\t\tJLabel spell_here_text = new JLabel(\"SPELL HERE\");\n\t\tspell_here_text.setFont(new Font(\"Arial\", Font.BOLD, 45));\n\t\tspell_here_text.setForeground(new Color(254, 157, 79));\n\t\tadd(spell_here_text);\n\t\tspell_here_text.setBounds(32, 484, 332, 74);\n\t\tspell_here_text.setOpaque(false);\n\t}",
"public void notifyGameOver() {\n this.myStatusString.setText(\"Game Over\");\n final LineBorder line = new LineBorder(Color.RED, 2, true);\n this.myStatusString.setBorder(line);\n this.myStatusString.setForeground(Color.RED);\n this.myStatusString.setFont(new Font(FONT_TIMES, Font.BOLD, NUM_FONT_SIZE_BIG));\n \n }",
"@Override\n public void onClick(View v) {\n ((TextView) findViewById(R.id.text)).setTextColor(getResources().getColor(R.color.orange));\n }",
"@Override\n public void mouseEntered(MouseEvent e) {\n setBorderPainted(true);\n setForeground(Color.RED);\n }",
"public void gameOver() {\n\t\tframe.setTitle(frame.getTitle() + \" - Game Over\");\n\t}",
"public abstract void setForegroundHover(final int rgba);",
"@Override\n\t\t\tpublic boolean onHover(View v, MotionEvent event) {\n\t\t\t\tswitch(event.getAction())\n\t\t\t\t{\n\t\t\t\tcase MotionEvent.ACTION_HOVER_ENTER:\n\t\t\t\t\tv.setBackgroundColor(Color.LTGRAY);\n\t\t\t\t\tbreak;\n\t\t\t\tcase MotionEvent.ACTION_HOVER_EXIT:\n\t\t\t\t\tv.setBackgroundColor(Color.TRANSPARENT);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}",
"public abstract void clickHelp2(FloodItWorld w, Color chosenColor);",
"@Override\r\n\tpublic void mouseExited(MouseEvent e) {\n\t\tmsg=\"\";\r\n\t\tmsg+=\"You Exited the frame\";\r\n\t\t\r\n\t\tlabel.setText(msg);\r\n\t}",
"public void mouseExited(MouseEvent e) {\n JLabel source = (JLabel)e.getSource();\n view.deHighlightLabel(source);\n }",
"public abstract void setCurForeground(Color colr);",
"@Override\n public void processLowLevelEvent(String action, String[] values) {\n contentLabel.setText(values[0].toUpperCase());\n }",
"@Override\n\t\t\tpublic boolean onHover(View but_view, MotionEvent arg1) {\n\t\t\t\tint what = arg1.getAction(); \n switch(what){ \n case MotionEvent.ACTION_HOVER_ENTER: //������view \n \t but_view.setBackgroundColor(getResources().getColor(R.color.blue));\n break; \n case MotionEvent.ACTION_HOVER_MOVE: //�����view�� \n System.out.println(\"bottom ACTION_HOVER_MOVE\"); \n break; \n case MotionEvent.ACTION_HOVER_EXIT: //����뿪view \n \t but_view.setBackground(getResources().getDrawable(R.drawable.button_style)); \n break; \n } \n return false; \n\t\t\t}"
] |
[
"0.70407087",
"0.660858",
"0.6554531",
"0.61788124",
"0.61373335",
"0.6113147",
"0.6113147",
"0.6113147",
"0.6113147",
"0.60964584",
"0.6093723",
"0.608885",
"0.6078542",
"0.6074614",
"0.6068882",
"0.6068882",
"0.6068882",
"0.6068882",
"0.60611856",
"0.6058631",
"0.6053163",
"0.6043243",
"0.6039734",
"0.60375214",
"0.602542",
"0.5998393",
"0.59850025",
"0.5960831",
"0.5939904",
"0.5924548",
"0.5903906",
"0.59022504",
"0.58880633",
"0.58879113",
"0.58854634",
"0.5882435",
"0.58779687",
"0.58699167",
"0.5848541",
"0.5847627",
"0.5843228",
"0.5825668",
"0.5809934",
"0.57844275",
"0.5774033",
"0.5770557",
"0.57590085",
"0.5750521",
"0.57498586",
"0.5693205",
"0.5677558",
"0.5676918",
"0.5672133",
"0.56712973",
"0.5669879",
"0.5647116",
"0.56419563",
"0.5640136",
"0.56212205",
"0.561695",
"0.5613714",
"0.5605827",
"0.5601208",
"0.558883",
"0.5588584",
"0.5568383",
"0.55640006",
"0.55584776",
"0.55565333",
"0.55556065",
"0.55498564",
"0.5530264",
"0.55246854",
"0.55169797",
"0.5516625",
"0.55054134",
"0.55032974",
"0.54872006",
"0.5485308",
"0.5483726",
"0.5482692",
"0.5481189",
"0.5474353",
"0.54732114",
"0.5464078",
"0.54566115",
"0.54564154",
"0.5439771",
"0.54383504",
"0.54307246",
"0.5429558",
"0.5428997",
"0.54245263",
"0.54154456",
"0.5414231",
"0.5413202",
"0.5405878",
"0.5396893",
"0.5381455",
"0.5377611",
"0.53773874"
] |
0.0
|
-1
|
Step 1: sum elements in the array, and return 1 if the sum % len(array) is not 0 Step 2: set target = sum / len(array) Step 3: Declare parameter gap, Loop n in array, set gap = gap + n target Step 4: The result is the max value of abs(gap) and n target and the result itself.
|
public static int findMinMoves(int[] machines) {
int sum = Arrays.stream(machines).sum();
if (sum % machines.length > 0) {
return -1;
}
int target = sum / machines.length;
int steps = 0, gap = 0;
for (int m : machines) {
gap += m - target;
steps = Math.max(steps, Math.max(Math.abs(gap), m - target));
}
return steps;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private int go(int a[]) {\n int n = a.length;\n int maxsofar = Integer.MIN_VALUE;\n int minsofar = Integer.MAX_VALUE;\n int curmin = 0, curmax = 0, total = 0;\n int ans = 0;\n\n for (int i = 0; i < n; i++) {\n curmax = Math.max(curmax + a[i], a[i]);\n curmin = Math.min(curmin + a[i], a[i]);\n maxsofar = Math.max(maxsofar, curmax);\n minsofar = Math.min(minsofar, curmin);\n total += a[i];\n }\n\n if (maxsofar > 0) {\n ans = Math.max(maxsofar, total - minsofar);\n } else {\n ans = maxsofar;\n }\n return ans;\n }",
"private static int arrayDpHopper(int[] array) {\n\t\tint[] jumps = new int[array.length];\n\t\tif(array[0]==0||array.length==0){\n\t\t\treturn Integer.MAX_VALUE;\n\t\t}\n\t\tjumps[0]=0;\n\t\tfor(int i=1;i<array.length;i++){\n\t\t\tjumps[i]=Integer.MAX_VALUE;\n\t\t\tfor(int j=0;j<i;j++){\n\t\t\t\tif(i<=j + array[j] && jumps[j]!=Integer.MAX_VALUE){\n\t\t\t\t\tjumps[i] = arrayHopper.getMin(jumps[i],jumps[j]+1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn jumps[array.length-1];\n\t}",
"public static int sumCheck(int target, int... numberArr) {\n\t\tint sum = 0;\n\t\tfor (int number : numberArr) {\n\t\t\tsum += number;\n\t\t}\n\t\treturn target == sum ? 0 : ((target < sum) ? -1 : 1);\n\t}",
"public static int solution(int[] arr) {\n int[] dp = new int[arr.length];\n dp[0] = arr[0];\n int max = Integer.MIN_VALUE;\n \n for(int i = 1; i < arr.length; i++){\n if(dp[i - 1] > 0) dp[i] = arr[i] + dp[i - 1];\n else dp[i] = arr[i];\n max = Math.max(max, dp[i]);\n }\n \n return max;\n }",
"int absoluteValuesSumMinimization(int[] a) {\n return a[(a.length-1)/2];\n }",
"public int solution(int[] A) {\n int sum = 0;\n int max = 0;\n Map<Integer, Integer> countMap = new HashMap<>();\n for (int i = 0; i < A.length; i++) {\n int val = Math.abs(A[i]);\n sum += val;\n A[i] = val;\n max = Math.max(val, max);\n countMap.put(val, countMap.getOrDefault(val, 0) + 1);\n }\n int[] dp = new int[sum + 1];\n for (int i = 1; i < dp.length; i++) {\n dp[i] = -1;\n }\n int[] count = new int[max + 1];\n for (Map.Entry<Integer, Integer> countMapEntry : countMap.entrySet()) {\n count[countMapEntry.getKey()] = countMapEntry.getValue();\n }\n for (int i = 1; i < max + 1; i++) {\n if (count[i] > 0) {\n for (int j = 0; j < dp.length; j++) {\n if (dp[j] >= 0) {\n dp[j] = count[i];\n } else if (j >= i && dp[j - i] > 0) {\n dp[j] = dp[j - i] - 1;\n }\n }\n }\n }\n int half = sum / 2;\n for (int i = half; i >= 0; i--) {\n if (dp[i] >= 0) {\n return Math.abs((sum - i) - i);\n }\n }\n return -1;\n }",
"private static int maxSum(int arr[]) {\n int sum = 0;\n Arrays.sort(arr);\n\n // Subtracting a1, a2, a3,....., a(n/2)-1,\n // an/2 twice and adding a(n/2)+1, a(n/2)+2,\n // a(n/2)+3,....., an - 1, an twice.\n for (int i = 0; i < arr.length / 2; i++) {\n sum -= (2 * arr[i]);\n sum += (2 * arr[arr.length - i - 1]);\n }\n\n return sum;\n }",
"public static int count(int[] array, int targetSum) {\n int quantityOfCounts = 0;\n Set<Integer> set = new HashSet<>();\n\n Arrays.stream(array).forEach(set::add);\n\n for (int j : set) {\n if (set.contains(targetSum - j)) {\n quantityOfCounts++;\n }\n }\n\n return quantityOfCounts / 2;\n }",
"public static void findSumArrayWithGivenSum(int[] arr, int target) {\n\n\t\tint sum = 0;\n\t\tint start = 0;\n\t\tfor (int end = 0; end < arr.length; end++) {\n\t\t\tint val = arr[end];\n\t\t\tsum += val;\n\t\t\tif (sum == target) {\n\t\t\t\tSystem.out.println(start + \",\" + end);\n\t\t\t\treturn;\n\t\t\t} else if (sum < target) {\n\t\t\t\t// do nothing\n\t\t\t} else {\n\n\t\t\t\twhile (start <= end && sum > target) {\n\n\t\t\t\t\tsum -= arr[start];\n\t\t\t\t\tstart++;\n\n\t\t\t\t\tif (sum == target) {\n\t\t\t\t\t\tSystem.out.println(start + \",\" + end);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"static int findMissingUsingSummation(int[] arr) {\n\t\tint expectedSum = (arr.length + 1) * (arr.length + 1 + 1) / 2;\n\t\tint actualSum = 0;\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tactualSum = actualSum + arr[i];\n\t\t}\n\n\t\treturn expectedSum - actualSum;\n\t}",
"public static int searchTriplet(int[] arr, int targetSum) {\n\n Arrays.sort(arr); // need to make fiding number easier n * log(n) with qsort\n // we fix one value\n\n // internal array would have: value, left, right, target\n // when sum value+left+right.\n // if exactly target => return result\n // if > than target sum: move right pointer. Calculate absolute difference.\n // if < than target sum: move left pointers. Calculate absolute difference.\n // if at any point absolute difference becomes larger -> there is no point to continue iteratig\n // (^ how true if that?)\n // at the end of one cycle return absolute difference. If it is zero -> early exist,\n // if not, try again with different fixed number\n\n int smallestDifference = Integer.MAX_VALUE;\n for (int i = 0; i < arr.length - 2; i++) {\n int left = i + 1;\n int right = arr.length - 1;\n\n while (left < right) {\n int diffWithTarget = targetSum - arr[i] - arr[left] - arr[right];\n if (diffWithTarget == 0) {\n return diffWithTarget;\n }\n\n if (Math.abs(diffWithTarget) < Math.abs(smallestDifference)) {\n smallestDifference = diffWithTarget;\n }\n\n if (diffWithTarget > 0) {\n left++;\n } else {\n right--;\n }\n }\n }\n return targetSum - smallestDifference;\n }",
"public int solution(int[] A) {\n int sumRange = 0;\n for (int i = 1; i <= A.length+1; i++){\n sumRange+=i;\n }\n \n int sumArray = 0;\n for(int a : A) {\n sumArray+=a;\n }\n\n\t//Take the total without the missing number, and subtract the total with the missing number\n return sumRange-sumArray;\n }",
"private int FindMaxSum(int[] arr, int length) {\r\n\t\t\r\n\t\tint incl = arr[0];\r\n\t\tint excl = 0;\r\n\t\tint excl_new = 0;\r\n\t\t\r\n\t\tfor(int i = 1;i<arr.length;i++)\r\n\t\t{\r\n\t\t\texcl_new = (incl > excl) ? incl : excl;\r\n\t\t\t \r\n /* current max including i */\r\n incl = excl + arr[i];\r\n excl = excl_new;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn excl>incl?excl:incl;\r\n\t}",
"public static void main(String[] args) {\n\t\tint array[] = { 5, 2, 3, 6, 1 };\n\t\tint total = ((array.length + 1) * (array.length + 2)) / 2;\n\t\tSystem.out.println(total);\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\ttotal -= array[i];\n\t\t}\n\t\tSystem.out.println(\"Missing number=\" + total);\n\t}",
"public int findMissingNumber(int[] array){\r\n int n = array.length + 1; \r\n\t\treturn (n * (n+1)/2) - ((n-1) * n/2); \r\n\t}",
"public int trap(int[] arr) {\n int n = arr.length;\n \n if(n < 3)\n return 0;\n \n int[] rb = new int[n]; // for right boundary \n int[] lb = new int[n]; // for left boundary\n \n rb[n - 1] = arr[n - 1];\n int rightMax = arr[n - 1];\n for(int i = n - 2; i >= 0; i--) {\n rightMax = Math.max(rightMax, arr[i]);\n rb[i] = rightMax;\n }\n \n lb[0] = arr[0];\n int leftMax = arr[0];\n for(int i = 1; i < n; i++) {\n leftMax = Math.max(leftMax, arr[i]);\n lb[i] = leftMax;\n }\n \n \n int res = 0;\n for(int i = 0; i < n; i++) \n res += Math.min(lb[i], rb[i]) - arr[i];\n \n return res;\n }",
"static int maxSum()\n {\n // Find array sum and i*arr[i] with no rotation\n int arrSum = 0; // Stores sum of arr[i]\n int currVal = 0; // Stores sum of i*arr[i]\n for (int i=0; i<arr.length; i++)\n {\n arrSum = arrSum + arr[i];\n currVal = currVal+(i*arr[i]);\n }\n\n // Initialize result as 0 rotation sum\n int maxVal = currVal;\n\n // Try all rotations one by one and find\n // the maximum rotation sum.\n for (int j=1; j<arr.length; j++)\n {\n currVal = currVal + arrSum-arr.length*arr[arr.length-j];\n if (currVal > maxVal)\n maxVal = currVal;\n }\n\n // Return result\n return maxVal;\n }",
"public int sumSubarrayMins(int[] arr) {\n final int n = arr.length;\n final int[] lengths = new int[n];\n final LinkedList<Integer> monoStack = new LinkedList<>(); // storing index info.\n\n int p = 0;\n while (p < n) {\n if (monoStack.isEmpty()) {\n monoStack.addLast(p++);\n continue;\n }\n\n final int num = arr[p];\n while (!monoStack.isEmpty() && arr[monoStack.peekLast()] > num) {\n final int idx = monoStack.pollLast();\n lengths[idx] = p - idx;\n }\n monoStack.addLast(p++);\n }\n\n while (!monoStack.isEmpty()) {\n final int idx = monoStack.poll();\n lengths[idx] = p - idx;\n }\n\n long result = 0L;\n final long modulo = 1_000_000_007L;\n \n final int[] times = new int[n];\n Arrays.fill(times, 1);\n for (int i = 0; i < n; i++) {\n final long time = times[i];\n final int len = lengths[i];\n final long num = arr[i];\n\n result = (result + num * time * len) % modulo;\n if (i + len < n) {\n times[i + len] += time;\n }\n }\n\n return (int)(result % modulo);\n }",
"public List<List<Integer>> fourSum_1(int[] nums, int target) \n {\n \tList<List<Integer>> result = new ArrayList<List<Integer>>();\n \tif(nums==null || nums.length<4) return result;\n \tArrays.sort(nums);\n \tfor(int i=0; i<nums.length-3; i++)\n \t{\n \t\tif(i!=0 && nums[i]==nums[i-1]) continue;\n \t\t//if(nums[i]>target) break; \n \t\t//Revisit!!! Why you cannot do this break here\n \t\tfor(int j=i+1; j<nums.length-2;j++)\n \t\t{\n \t\t\tif(j!=(i+1) && nums[j]==nums[j-1]) continue;\n \t\t\tint cur = nums[i]+nums[j];\n \t\t\t//if(cur>target) break;\n \t\t\t//Revisit!!! Why you cannot do this break here\n \t\t\t\n \t\t\tint k=j+1;\n \t\t\tint l = nums.length-1;\n \t\t\twhile(k<l)\n \t\t\t{\n \t\t\t\tif((cur+nums[k]+nums[l])==target)\n \t\t\t\t{\n \t\t\t\t\tList<Integer> newRes = new ArrayList<Integer>();\n \t\t\t\t\tnewRes.add(nums[i]);\n \t\t\t\t\tnewRes.add(nums[j]);\n \t\t\t\t\tnewRes.add(nums[k]);\n \t\t\t\t\tnewRes.add(nums[l]);\n \t\t\t\t\tresult.add(newRes);\n \t\t\t\t\tk++;\n \t\t\t\t\tl--;\n \t\t\t\t\twhile(k<l && nums[k]==nums[k-1]) k++;\n \t\t\t\t\twhile(k<l && nums[l]==nums[l+1]) l--;\n \t\t\t\t}\n \t\t\t\telse if((cur+nums[k]+nums[l])>target)\n \t\t\t\t{\n \t\t\t\t\tl--;\n \t\t\t\t\twhile(k<l && nums[l]==nums[l+1]) l--;\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t{\n \t\t\t\t\tk++;\n \t\t\t\t\twhile(k<l && nums[k]==nums[k-1]) k++;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n \treturn result;\n }",
"int maxSum(int[] arr){\n\t\tint sum=0;\n\t\tint arrayMin = findMin(arr);\n\t\tfor (int i=0; i<arr.length; i++) {\n\t\t\tif (arr[i] != arrayMin) {\n\t\t\t\tsum += arr[i];\n\t\t\t}\n\t\t}\n\t\treturn sum;\n\t}",
"public static void calculate(int[] array) {\n\tfor (int i = 0; i > array.length - 1; i++) {\n\t\t// i will be second number\n\t\tfor (int j = i + 1; j < array.length; j++) {\n\n\t\t\t// take a number from array\n\t\t\t// add it to the next\n\t\t\tint sum = array[i] + array[j];\n\n\t\t\tif (sum == 100) {\n\t\t\t\t// i will print those two numbers\n\t\t\t\tSystem.out.println(array[i] + \", \" + array[j]);\n\t\t\t}\n\t\t}\n\n\t}\n}",
"public static int getMaxSum(int[] arr) {\n int maxSum = 0;\n int sum = 0;\n for (int i : arr) {\n sum += i;\n if (maxSum < sum) maxSum = sum;\n else if (sum < 0) sum = 0;\n }\n return maxSum;\n }",
"private static Integer findMissingValue_UseMath(int[] arrayInteger) {\n int sum = arrayInteger.length * ((arrayInteger.length + 1 )/2);\n // then for each item in the source array\n for(int val : arrayInteger)\n {\n sum -= val;\n }\n return sum;\n }",
"int maxSubarraySum(int arr[], int n){\n \n // Your code here\n int max = Integer.MIN_VALUE, curr = 0; \n \n for (int i = 0; i < n; i++) { \n curr = curr + arr[i]; \n if (max < curr) \n max = curr; \n if (curr < 0) \n curr = 0; \n } \n return max;\n }",
"public int f7(int[] array, int start, int end) {\n if (array.length <= 1 || end <= start) {\n return 1;\n } else if (array[start] <= array[end]) {\n return f7(array, start + 1, end - 1);\n } else {\n int tmp = array[start];\n array[start] = array[end];\n array[end] = tmp;\n return f7(array, start + 1, end) + f7(array, start, end - 1)\n + f7(array, start + 1, end - 1);\n }\n }",
"private static void subarraysum(int[] a, int target) {\n\t\t\n\t\t\tint cursum=0;\n\t\t\tfor(int i=0;i<a.length;i++)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tcursum=0;\n\t\t\t\tfor(int j=i;j<a.length;j++)\n\t\t\t\t{\n\t\t\t\t\tcursum+=a[j];\n\t\t\t\t\t//System.out.println(i+\" \"+(j));\n\t\t\t\t\t\n\t\t\t\t\t\tif(cursum==target)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(i+\" \"+(j));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(cursum>target)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//System.out.println(i+\" \"+j+\" \");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(cursum);\n\t\t\t}\n\t\t}",
"public int threeSumSmaller(int[] nums, int target) {\n Arrays.sort(nums);\n int len = nums.length;\n int count = 0;\n for (int i = 0; i < len; i++) {\n int start = i + 1, end = len - 1;\n int tar = target - nums[i];\n while (start < end) {\n if (nums[start] + nums[end] < tar) {\n count += end - start;\n start++;\n } else {\n end--;\n }\n }\n }\n return count;\n }",
"public int solution(int[] A) {\n int sum = sum(A);\n int stackingSum = 0;\n int diff = Integer.MAX_VALUE;\n\n for (int i = 0; i < A.length; i++) {\n stackingSum = stackingSum + A[i];\n sum = sum - A[i];\n System.out.println(Math.abs(stackingSum - sum));\n int expr = Math.abs(stackingSum - sum);\n\n if (diff > expr) {\n diff = expr;\n }\n }\n\n return diff;\n }",
"private static int missingNumber(int[] nums) {\n\t\t// TODO Auto-generated method stub\n\t\tint sum = 0; \n\t\tint end = nums.length; \n\t\t\n for(int i=0; i<end; i++){\n sum += i;\n sum = sum - nums[i];\n }\n \n sum = sum + end; \n\t\t\t\t\n\t\treturn sum;\n\t}",
"public static int completeSum(int [] array){\n int sum = 0;\n for(int i = 0; i < array.length; i++){\n sum+= array[i];\n }\n return sum;\n }",
"int minSum(int[] arr){\n\t\tint sum=0;\n\t\tint arrayMax = findMax(arr);\n\t\tfor (int i=0; i<arr.length; i++) {\n\t\t\tif (arr[i] != arrayMax) {\n\t\t\t\tsum += arr[i];\n\t\t\t}\n\t\t}\n\t\treturn sum;\n\t}",
"public static int maxSubsetSumNoAdjacent(int[] array) {\n\t\tint[] solution = array.clone();\n\t\t\n\t\t//edge cases\n\t\tif(array.length ==0){\n\t\t\treturn 0;\n\t\t}else if(array.length==1){\n\t\t\treturn array[0];\n\t\t}\n\t\t//base case\t\t\n\t\tsolution[1] = Math.max(array[0], array[1]);\n\t\t//Dynamic programming implemntation\n\t\tfor(int i=2; i< array.length; i++){\n\t\t\tsolution[i] = Math.max((solution[i-2] + array[i]), solution[i-1]);\n\t\t\t\n\t\t}\n return solution[array.length-1];\n }",
"public int findTargetSumWays(int[] nums, int tar) {\n int n = nums.length;\n if(n == 0) return 0;\n int sum=0;\n for(int val:nums) sum+=val;\n if(tar > sum || tar < -sum) return 0;\n int dp[][]=new int[n+1][2*sum+1];\n for(int arr[]:dp) Arrays.fill(arr,-1);\n return findTargetSumWays(nums,n,tar+sum,sum,dp);\n }",
"public int twoSumSmaller(int[] array, int target) {\n if (array == null || array.length == 0) {\n return 0;\n }\n Arrays.sort(array);\n int left = 0;\n int right = array.length - 1;\n int count = 0;\n\n while (left < right) {\n int sum = array[left] + array[right];\n if (sum < target) {\n // all the pair that right in the range (left, right]\n // will be smaller than target\n count += right - left;\n left++;\n } else {\n right--;\n }\n }\n return count;\n }",
"private static int maxConti(int[] arr) {\n\t\tint sum=0;\n\t\tint maxValue=arr[0];\n\t\tint start=0;int end=0;\n\t\tfor(int i=0;i<arr.length;i++)\n\t\t{ \n\t\t\tsum=Math.max(sum+arr[i], arr[i]);\n\t\t\t\n\t\t\t\n\t\t\tmaxValue=Math.max(maxValue,sum);\n\t\t\t\n\t\t}\n\t\tSystem.out.println(start+\" \"+end);\n\t\treturn maxValue;\n\t}",
"public int jump(int[] A) {\n if (A==null || A.length==0) return 0;\n int N = A.length;\n int[] dp = new int[N+1];\n dp[0] = 0;\n dp[1] = 0;\n for (int i=1; i<N; i++){\n int range = A[i];\n for (int j=1; j<=range && ((i+j)<N); j++){ \n if (dp[i+j] == 0) dp[i+j] = dp[i] + 1;\n else dp[i+j] = Math.min(dp[i+j], dp[i]+1);\n }\n }\n return dp[N];\n }",
"static int maxSubArraySum(int a[], int size)\n {\n int Cur_Max = a[0];\n int Prev_Max = a[0];\n \n for (int i = 1; i < size; i++)\n {\n //we want to know if the summition is increassing or not\n Prev_Max = Math.max(a[i], Prev_Max+a[i]);\n //Take Decision to change the value of the largest sum or not\n Cur_Max = Math.max(Cur_Max, Prev_Max);\n }\n return Cur_Max;\n }",
"public int solution(int[] A) {\n\t\tfinal int N = A.length;\n\t\tassert (N >= 2);\n\t\tfinal double[] minAvg = new double[N - 1];\n\t\tfinal double[] lenMinAvg = new double[N - 1];\n\t\tminAvg[N - 2] = (A[N - 1] + A[N - 2]) / 2;\n\t\tlenMinAvg[N - 2] = 2;\n\t\tfor (int i = N - 3; i >= 0; i--) {\n\t\t\tfinal double a = (minAvg[i + 1] * lenMinAvg[i + 1] + A[i]) / (lenMinAvg[i + 1] + 1);\n\t\t\tfinal double b = ((double) A[i] + (double) A[i + 1]) / 2;\n\t\t\tif (b <= a) {\n\t\t\t\t// crucial: for a==b we need to prioritize the slice with lesser length because it is \"more minimizable\"\n\t\t\t\tminAvg[i] = b;\n\t\t\t\tlenMinAvg[i] = 2;\n\t\t\t} else {\n\t\t\t\tminAvg[i] = a;\n\t\t\t\tlenMinAvg[i] = lenMinAvg[i + 1] + 1;\n\t\t\t}\n\t\t\t//System.out.printf(\"minAvg=[%s], lenMinAvg=[%s]%n\", Arrays.toString(minAvg), Arrays.toString(lenMinAvg));\n\t\t}\n\t\treturn minIndex(minAvg);\n\t}",
"int maxSubarraySum(int arr[], int n){\n \n // Your code here\n int cursum = arr[0];\n int osum = arr[0];\n \n for(int i=1;i<n;i++){\n if(cursum>=0){\n cursum+=arr[i];\n }else{\n cursum=arr[i];\n }\n if(cursum>osum){\n osum=cursum;\n }\n }\n return osum;\n \n }",
"public static int maxSubsetSumNoAdjacent( int[] array ) {\n\t\tassertThat( array ).isNotNull();\n\n\t\tif( array.length == 0 )\n\t\t\treturn 0;\n\t\tif( array.length == 1 )\n\t\t\treturn array[0];\n\n\t\tarray[1] = array[0] > array[1] ? array[0] : array[1];\n\n\t\tfor( int i = 2; i < array.length; i++ ) {\n\t\t\tint prevIndexSum = array[i - 1];\n\t\t\tint currentIdxSum = array[i - 2] + array[i];\n\n\t\t\tarray[i] = prevIndexSum > currentIdxSum ? prevIndexSum : currentIdxSum;\n\t\t}\n\n\t\treturn array[array.length - 1];\n\t}",
"public static void main(String[] args) {\n\t\tint[] a = { -2, -3, 4, -1, -2, 1, 5, -3 }; \n\t\t int size = a.length; \n\t int max_so_far = Integer.MIN_VALUE, max_ending_here=0;\n\t for (int i = 0; i < size; i++) { \n\t max_ending_here = max_ending_here + a[i]; \n\t if (max_so_far < max_ending_here) \n\t max_so_far = max_ending_here; \n\t if (max_ending_here < 0) \n\t max_ending_here = 0; \n\t } \n\t // System.out.println(max_so_far);\n\t int product=1,max=0;\n\t for (int i = 0; i < size; i++) {\n\t \t\n\t \tproduct=product*a[i];\n\t \tif(product>max)\n\t \t\tmax=product;\n\t \t if (product < 0) \n\t \t\t product = 1; \n\t \t\n\t }\n\t // System.out.println(max);\n\t \n\t Arrays.sort(a);\n\t int i=0,j=a.length-1;\n\t while(i<a.length &&j<a.length)\n\t {\n\t \t if(a[i]+a[j]==3)\n\t \t {\n\t \t\t System.out.println(a[i]+\" \"+a[j]);\n\t \t\t i++;j--;\n\t \t }\n\t \t else if(a[i]+a[j]>3)\n\t \t\t j--;\n\t \t else if(a[i]+a[j]<3)\n\t \t\t i++;\n\t }\n\t \n\t \n\t }",
"private static int MaxSubarraySum(int[] a) {\n\t\t\n\t\tint max_so_for =Integer.MIN_VALUE;\n\t\tint max_ending_here = 0;;\n\t\t\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\tmax_ending_here = max_ending_here + a[i];\n\t\t\t\n\t\t\tif(max_so_for < max_ending_here )\n\t\t\t\tmax_so_for = max_ending_here;\n\t\t\tif(max_ending_here < 0)\n\t\t\t\tmax_ending_here = 0;\n\t\t}\n\t\t\n\t\treturn max_so_for;\n\t}",
"private int bepaalByes(int[] arr, int n) {\r\n\t\tint tot = 0;\r\n\t\tfor (int v : arr)\r\n\t\t\ttot += v;\r\n\t\treturn (tot - n);\r\n\t}",
"public static void main(String[] args) {\n System.out.println(\"Enter the number of elements in the array\");\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int[] array = new int[n];\n for (int i = 0; i < n; i++) {\n array[i] = scanner.nextInt();\n }\n System.out.println(\"Enter the sum to be found\");\n int sum = scanner.nextInt();\n\n Arrays.sort(array);\n int forwardPointer = 0;\n int backwardPointer = array.length - 1;\n int tempSum = array[forwardPointer] + array[backwardPointer];\n while (! isEqual(sum, tempSum)) {\n //System.out.println(array[forwardPointer]);\n //System.out.println(array[backwardPointer]);\n if (sum > tempSum) {\n // means we need to add bigger numbers\n forwardPointer++;\n } else {\n // means we have to add smaller numbers\n backwardPointer--;\n }\n\n if (forwardPointer >= backwardPointer) {\n // means we couldnt find anything\n System.out.println(\"Couldnt find the numbers in the given array\");\n break;\n }\n tempSum = array[forwardPointer] + array[backwardPointer];\n }\n\n if (forwardPointer < backwardPointer) {\n System.out.printf(\"The numbers are %d and %d\\n\", array[forwardPointer], array[backwardPointer]);\n }\n\n }",
"private static int maxValue(int[] a) {\n\t\tint max_value =0;\r\n\t\tint current_max=0;\r\n\t\t\r\n\t\tfor(int i=0;i<a.length;i++)\r\n\t\t{\r\n\t\t\tcurrent_max += a[i];\r\n\t\t\tmax_value= Math.max(max_value, current_max);\r\n\t\t\tif(a[i]<0)\r\n\t\t\t\tcurrent_max=0;\r\n\t\t}\r\n\t\t\r\n\t\treturn max_value;\r\n\t}",
"public static int solution(int[] A) {\n\n int min = Integer.MAX_VALUE;\n int total = 0;\n int size = A.length;\n int pSum = 0;\n int nSum = 0;\n for (int j : A) {\n total += j;\n }\n\n for (int i = 1; i < size; i++) {\n pSum += A[i-1];\n nSum = total - pSum;\n min = Math.min(min, Math.abs(pSum-nSum));\n }\n return min;\n }",
"public int maxSubArraySum(int[] nums) {\n int maxSoFar = 0;\n int maxEndingHere = 0;\n\n for (int i = 0; i < nums.length; i++) {\n maxEndingHere = maxEndingHere + nums[i];\n if (maxEndingHere > maxSoFar)\n maxSoFar = maxEndingHere;\n if (maxEndingHere < 0)\n maxEndingHere = 0;\n }\n return maxSoFar;\n }",
"public int combinationSum4A(int[] nums, int target) {\r\n if (nums == null || nums.length == 0) return 0;\r\n int n = nums.length;\r\n Arrays.sort(nums);\r\n int[] dp = new int[target+1];\r\n\r\n for (int i=1; i<=target; i++) {\r\n for (int j=0; j<n; j++) {\r\n if (nums[j] > i) {\r\n break;\r\n } else if (nums[j] == i) {\r\n dp[i] += 1;\r\n } else {\r\n dp[i] += dp[i-nums[j]];\r\n }\r\n }\r\n }\r\n \r\n return dp[target];\r\n }",
"static void miniMaxSum(int[] arr) {\n Arrays.sort(arr);\n long sum = 0;\n for (int i : arr) {\n sum += i;\n }\n System.out.println((sum - arr[4]) + \" \" + (sum - arr[0]));\n }",
"public int jump(int[] nums) {\n if(nums.length==0) return 0;\n int n=nums.length;\n int jumps=0;\n int maxEnding=0;\n int maxDist=0;\n for(int i=0;i<n-1;i++){\n maxDist=Math.max(maxDist,nums[i]+i);\n if(i==maxEnding){\n maxEnding=maxDist;\n jumps++;\n }\n }\n return jumps;\n }",
"public static int example3(int[] arr) { // O(n)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n^2)\r\n\t\t\tfor (int k = 0; k <= j; k++) // loop from 0 to j\r\n\t\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Since we have nested for loop which dominates here and it is\r\n\t\t * O(n^2) and we always take the maximum. so the answer is quadratic time O(n^2)\r\n\t\t * \r\n\t\t */\r\n\t}",
"public int firstMissing(int[] array) {\n if (array == null || array.length == 0) {\n return 1;\n }\n int sum = 0;\n for (int i : array) {\n if (sum < i - 1) {\n return i - 1;\n }\n sum += i;\n }\n return sum + 1;\n }",
"public static void targetSumPair(int[] arr, int target){\n //write your code here\n Arrays.sort(arr); // O(nlogn)\n int i=0, j=arr.length-1;\n while(i < j) {\n if(arr[i]+arr[j] < target) {\n i++;\n }\n else if(arr[i] + arr[j] > target)\n j--;\n else {\n System.out.println(arr[i] + \", \" + arr[j]);\n i++; j--;\n }\n }\n }",
"public static int maxSumOfAdjancentElementsSubArray( int[] array ) {\n\t\tassertThat( array ).isNotNull();\n\n\t\tint arrLength = array.length;\n\n\t\tif( arrLength == 0 )\n\t\t\treturn 0;\n\t\tif( arrLength == 1 )\n\t\t\treturn array[0];\n\n\t\tint maximumSum = array[0];\n\t\tfor( int i = 1; i < arrLength; i++ ) {\n\n\t\t\tarray[i] = Math.max( array[i - 1] + array[i], array[i] );\n\t\t\tmaximumSum = maximumSum > array[i] ? maximumSum : array[i];\n\t\t}\n\n\t\treturn maximumSum;\n\t}",
"public static ArrayList<Integer[]> slower(int[] array, int targetSum)\n {\n ArrayList<Integer[]> solution = new ArrayList<Integer[]>();\n\n Arrays.sort(array);\n for (int i = 0; i < array.length - 1; ++i)\n {\n for (int j = i+1; j < array.length; ++j)\n {\n int first = array[i];\n int second = array[j];\n int newTarget = targetSum - first - second;\n\n int front = j + 1;\n int back = array.length - 1;\n while (front < back)\n {\n if (array[front] + array[back] == newTarget)\n {\n Integer [] fourNums = {first, second, array[front], array[back]};\n solution.add(fourNums);\n front += 1;\n back -= 1;\n }\n else if (array[front] + array[back] < newTarget)\n {\n front += 1;\n }\n else\n {\n back -= 1;\n }\n }\n }\n }\n return solution;\n }",
"public static int findMissingNumber(int[] arr) {\n\t\tint foundSum = 0;\n\t\tif (arr == null) {\n\t\t\tthrow new IllegalArgumentException(\"Null array\");\n\t\t}\n\t\tfor (int i : arr) {\n\t\t\tfoundSum += i;\n\t\t}\n\t\treturn (arr.length + 1) * (arr.length + 2) / 2 - foundSum;\n\t}",
"public static int solution(int[] arr) {\n int n = arr.length;\n for (int i = 0; i < n; i++) {\n while (arr[i] != i + 1 && arr[i] < n && arr[i] > 0) {\n int temp = arr[i];\n if (temp == arr[temp - 1])\n break;\n arr[i] = arr[temp - 1];\n arr[temp - 1] = temp;\n }\n }\n for (int i = 0; i < n; i++)\n if (arr[i] != i + 1)\n return i + 1;\n return n + 1;\n }",
"public int solve1(int[] array, int from, int to) {\n HashSet<Integer> seen = new HashSet<>();\n\n for (int e : array) {\n seen.add(e);\n }\n\n for (int i = from; i <= to; i++) {\n if (!seen.contains(i)) {\n return i;\n }\n }\n\n return Integer.MAX_VALUE;\n }",
"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 }",
"private static int LargestSubArraySum(int[] array) {\n\t\tint maximumSum=0;\n\t\tfor(int i=0; i< array.length; i++) {\n\t\t\tfor(int j=i; j < array.length; j++) {\n\t\t\t\t\n\t\t\t\tint sum=0;\n\t\t\t\tfor(int k=i; k<= j; k++) \n\t\t\t\t\tsum += array[k];\n\t\t\t\t\n\t\t\t\tmaximumSum=Math.max(maximumSum, sum);\n\t\t\t} \n\t\t}\n\t\treturn maximumSum;\n\t}",
"public int dp_os(int[] arr) {\n\n\t\tint[][] dp = new int[arr.length][arr.length];\n\t\t\n\t\tfor (int gap=0; gap<arr.length; gap++) {\n\t\t\n\t\t\tfor (int i=0,j=gap; j<arr.length; i++, j++) {\n\t\t\t\n\t\t\t\tint x = (i+2 <= j) ? dp[i+2][j] : 0;\n\t\t\t\tint y = (i+1 <= j-1) ? dp[i+1][j-1] : 0;\n\t\t\t\tint z = (i <= j-2) ? dp[i][j-2] : 0;\n\n\t\t\t\tdp[i][j] = Math.max(arr[i] + Math.min(x,y), arr[j] + Math.min(y,z));\n\t\t\t}\n\t\t}\n\n\t\treturn dp[0][arr.length-1];\n\t}",
"static void plusMinus(int[] arr) \r\n {\r\n \tint positive=0, negative=0, zeroes=0;\r\n \tList<String> list = new ArrayList<>();\r\n \tfor(int a: arr)\r\n \t{\r\n \t\tif(a>0)\r\n \t\t{\r\n \t\t\tpositive = positive+1;\r\n \t\t}\r\n \t\t\r\n \t\tif(a<0)\r\n \t\t{\r\n \t\t\tnegative = negative+1;\r\n \t\t}\r\n \t\t\r\n \t\telse if(a==0)\r\n \t\t{\r\n \t\t\tzeroes = zeroes+1;\r\n \t\t}\r\n \t}\r\n \t\r\n \tdouble answer = (double)positive/arr.length;\r\n \tlist.add(findResult(answer));\r\n \t\r\n \tanswer = (double)negative/arr.length;\r\n \tlist.add(findResult(answer));\r\n \t\r\n \tanswer = (double)zeroes/arr.length;\r\n \tlist.add(findResult(answer));\r\n \t\r\n \t\r\n \tfor(String d: list)\r\n \t{\r\n \t\tSystem.out.println(d);\r\n \t}\r\n }",
"private static int maximumSubarray(int[] array) {\n\t\tint max = array[0];\n for (int i = 0; i < array.length; i++)\n {\n int sum = 0;\n for (int j = i; j < array.length; j++)\n {\n sum += array[j];\n if (sum > max)\n max = sum;\n }\n }\n return max; \n\t}",
"public int solution(int[] A) {\n int minLocation = 0;\n double minSlice = (A[0] + A[1]) / 2;\n double currentSlice;\n\n // This solution has more to do with math than using prefix sums\n // as you dont need to check slices larger than two or three \n // members. This checks all those slices except the last two \n // member one to avoid trying to access out of bounds memory\n for (int iter=0; iter<A.length-2; iter++) {\n \n currentSlice = ( (double) (A[iter] + A[iter+1]) ) / 2;\n if (currentSlice < minSlice) {\n minSlice = currentSlice;\n minLocation = i;\n }\n \n currentSlice = ( (double) (A[i] + A[i+1] + A[i+2]) ) / 3;\n if (currentSlice < minSlice) {\n minSlice = currentSlice;\n minLocation = i;\n }\n }\n\n // Check the last two member slice\n currentSlice = ( (double) (A[A.length-2] + A[A.length-1]) ) / 2;\n if (currentSlice < minSlice) {\n minSlice = currentSlice;\n minLocation = A.length - 2;\n }\n\n // Return the starting index of the slice with the minimum average\n return minLocation;\n }",
"private int minJumps(int[] arr) {\n int n = arr.length;\n if (n == 1) {\n return 0;\n }\n\n //map to hold the values in the array and the indexes where they are located in\n Map<Integer, List<Integer>> map = new HashMap<>();\n\n for (int i = 0; i < arr.length; i++) {\n /*\n method checks if arr[i] exists in the map, if so, we add the current index to the list of indexes where\n arr[i] is present, otherwise we make a new entry for arr[i]\n */\n map.computeIfAbsent(arr[i], v -> new ArrayList<>()).add(i);\n }\n\n //Queue to hold the indexes j we can jump to starting from 0\n Queue<Integer> queue = new LinkedList<>();\n queue.add(0); //add the first index into the queue\n int steps = 0;\n\n while (!queue.isEmpty()) {\n steps++;\n int size = queue.size();\n\n for (int i = 0; i < size; i++) {\n int j = queue.remove(); //the current index\n\n //jump to j + 1\n if (j + 1 < n && map.containsKey(arr[j + 1])) {\n if (j + 1 == n - 1) {\n return steps;\n }\n queue.add(j + 1);\n }\n\n //jump to j - 1\n if (j - 1 >= 0 && map.containsKey(arr[j - 1])) {\n queue.add(j - 1);\n }\n\n //jump to index k --> arr[j] == arr[k]\n if (map.containsKey(arr[j])) {\n //search through the list of indexes where arr[j] is present\n for (int k : map.get(arr[j])) {\n if (k != j) {\n //if one of the indexes is the last index, we've gotten to the end, otherwise we add the index to the queue\n if (k == n - 1) {\n return steps;\n }\n queue.add(k);\n }\n }\n }\n //remove the value of arr[j] from the map to avoid overlap\n map.remove(arr[j]);\n }\n }\n return steps;\n }",
"public int jump(int[] nums) {\n int[] dp = new int[nums.length];\n for(int i=1;i<nums.length;i++) {\n dp[i] = Integer.MAX_VALUE;\n }\n for(int start =0 ; start < nums.length-1 ;start++){\n for(int end=start+1; end<=start+nums[start] && end<nums.length; end++){\n dp[end] = Math.min(dp[end], dp[start]+1);\n }\n }\n return dp[nums.length-1];\n }",
"private static int findMissingNumber(int[] nums) {\n int n = nums.length;\n int sum = n;\n for (int i = 0; i < n; i++) {\n sum += i - nums[i];\n }\n return sum;\n }",
"private static int maxSubSumN(int[] a) {\n int maxSum = 0;\n int thisSum = 0;\n\n for (int i = 0; i < a.length; i++) {\n thisSum += a[i];\n\n if (thisSum > maxSum) {\n maxSum = thisSum;\n } else if (thisSum < 0) {\n thisSum = 0;\n }\n }\n\n return maxSum;\n }",
"static void maxSubArraySum1(int a[], int size)\n {\n int max_so_far = Integer.MIN_VALUE,\n max_ending_here = 0,start = 0,\n end = 0, s = 0;\n\n for (int i = 0; i < size; i++)\n {\n max_ending_here += a[i];\n\n if (max_so_far < max_ending_here)\n {\n max_so_far = max_ending_here;\n start = s;\n end = i;\n }\n\n if (max_ending_here < 0)\n {\n max_ending_here = 0;\n s = i + 1;\n }\n }\n System.out.println(\"Maximum contiguous sum is \" + max_so_far);\n System.out.println(\"Starting index \" + start);\n System.out.println(\"Ending index \" + end);\n }",
"private static int[] threeSumUsingSort(int[] arr, int target) {\n int l, r;\n int[] three = new int[3];\n int size = arr.length;\n\n // Sort the array\n Arrays.sort(arr);\n\n // 1. Algo for smallest solvable problem unit\n // 2. Extend the algo to the entire problem space\n // 3. Check for edge/error cases\n // 4. Test\n // 5. Optimize\n\n for (int i = 0; i < arr.length; i++) {\n boolean found = false;\n l = i + 1;\n r = size - 1;\n three[0] = arr[i];\n while (l < r) {\n if (arr[i] + arr[l] + arr[r] == target) {\n three[1] = arr[l];\n three[2] = arr[r];\n found = true;\n break;\n }\n else if (arr[i] + arr[l] + arr[r] < target) {\n l++;\n }\n else {\n r--;\n }\n }\n if (found) {\n break;\n }\n }\n return three;\n }",
"static int LCS(int arr[])\n {\n int size = arr.length;\n int max_so_far = Integer.MIN_VALUE, max_ending_here = 0;\n\n for (int i = 0; i < size; i++)\n {\n max_ending_here = max_ending_here + arr[i];\n if (max_so_far < max_ending_here)\n max_so_far = max_ending_here;\n if (max_ending_here < 0)\n max_ending_here = 0;\n }\n return max_so_far;\n }",
"public static int maxSumForConsecutiveElements(int[] array, int k) {\r\n int length = array.length;\r\n\r\n // O(n)\r\n for (int i = 0; i < length - 1; i++) {\r\n array[i + 1] += array[i];\r\n }\r\n\r\n int maxSum = 0;\r\n int startIndex = k - 1;\r\n // O(n)\r\n for (int i = startIndex; i < length; i++) {\r\n int firstElementIndex = i - startIndex;\r\n int currentSum;\r\n\r\n if (firstElementIndex == 0) {\r\n maxSum = array[i];\r\n continue;\r\n } else {\r\n currentSum = array[i] - array[firstElementIndex - 1];\r\n }\r\n\r\n if (currentSum > maxSum) {\r\n maxSum = currentSum;\r\n }\r\n }\r\n\r\n return maxSum;\r\n }",
"private static int subarraySum(int[] nums, int target) {\n\n\t\tint count = 0;\n\n\t\tfor (int start = 0; start < nums.length; start++) {\n\n\t\t\tint sum = 0;\n\n\t\t\tfor (int end = start; end < nums.length; end++) {\n\t\t\t\tsum += nums[end];\n\t\t\t\t\n\t\t\t\tif(sum == target) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\n\t}",
"public int missingNumber(int[] nums) {\n int sum = 0, n = 0;\n for (int i = 0; i < nums.length; i++) {\n n += i;\n sum += nums[i];\n }\n return (n + nums.length) - sum;\n }",
"public boolean existSum(int[] array, int target) {\n Set<Integer> set = new HashSet<>();\n for (int num : array) {\n \tif (set.contains(target - num)) {\n \treturn true;\n }\n set.add(num);\n }\n return false;\n }",
"int backTrack(int[] nums, int targetSum, int startIndex, int computedSum, int[][] dp) {\n if (startIndex == nums.length) {\n if (targetSum == computedSum) {\n return 1;\n\n }\n return 0;\n } else {\n\n int add = backTrack(nums, targetSum, startIndex + 1, computedSum + nums[startIndex], dp);\n\n int subtract = backTrack(nums, targetSum, startIndex + 1, computedSum - nums[startIndex], dp);\n dp[startIndex][computedSum] = add + subtract;\n return dp[startIndex][computedSum];\n }\n\n }",
"public int solution(int[] A) {\n\n\t\tif (A == null || A.length == 1) {\n\t\t\treturn -1;\n\t\t}\n\n\t\tint indexResult = -1;\n\t\tdouble minResult = Double.MAX_VALUE, result = 0;\n\n\t\tfor (int i = 0; i < A.length - 1; i++) {\n\t\t\tif(i + 2 < A.length) {\n\t\t\t\tresult = (A[i] + A[i + 1] + A[i + 2]) / 3.0;\n\t\t\t\tif(result < minResult) {\n\t\t\t\t\tminResult = result;\n\t\t\t\t\tindexResult = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tresult = (A[i] + A[i + 1]) / 2.0;\n\t\t\tif(result < minResult) {\n\t\t\t\tminResult = result;\n\t\t\t\tindexResult = i;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\treturn indexResult;\n\t}",
"public static int kadaneMaxSum(int[] nums) {\n if(nums == null || nums.length == 0) return -1;\n\n int maxSoFar = 0, maxEndingHere = 0;\n for(int i = 0; i < nums.length; i++) {\n maxEndingHere += nums[i];\n\n if(maxEndingHere < 0) {\n maxEndingHere = 0;\n } else if(maxSoFar < maxEndingHere) {\n maxSoFar = maxEndingHere;\n }\n }\n\n System.out.println(\"kadane the maxsum is \" + maxSoFar);\n return maxSoFar;\n }",
"private static int f(int n, int complete, int other, int[] arr) {\n if(n<=0)\n return 0;\n int res=0;\n ArrayList<Integer>list=new ArrayList<Integer>();\n for(int a:arr)\n if(a>0)\n list.add(a);\n int brr[]=new int[list.size()];\n for(int i=0;i<brr.length;i++)\n brr[i]=list.get(i);\n while(brr.length!=0){\n int index=0;\n for(int i=1;i<brr.length;i++)\n if(brr[index]<brr[i])\n index=i;\n for(int i=0;i<brr.length;i++){\n if(index==i)\n brr[i]-=complete;\n else\n brr[i]-=other;\n }\n list=new ArrayList<Integer>();\n for(int a:brr)\n if(a>0)\n list.add(a);\n brr=new int[list.size()];\n for(int i=0;i<brr.length;i++)\n brr[i]=list.get(i);\n res++;\n }\n return res;\n }",
"static void miniMaxSum(int[] arr) {\n int min=arr[0];\n int max=0;\n long maxsum=0,minsum=0;\n for(int i:arr)\n {\n if(i<min)\n {\n min=i;\n }\n if(i>max)\n {\n max=i;\n }\n }\n for(int i:arr)\n {\n if(i==max)\n {\n max=0;\n continue;\n }\n else\n {\n minsum+=i;\n }\n }\n for(int i:arr)\n {\n if(i==min)\n {\n min=0;\n continue;\n }\n else\n {\n maxsum+=i;\n }\n }\n System.out.println(minsum+\" \"+maxsum);\n }",
"public int solution(int[] A) {\n // write your code in Java SE 8\n List<Integer> a = new ArrayList<>();\n for(int i = 0 ; i < A.length ; i++) {\n if(A[i] > 0) a.add(A[i]);\n }\n\n if(a.size() == 0) {\n return 1;\n }\n\n Collections.sort(a);\n int result = 1;\n for(Integer number : a) {\n if(number == result)\n result++;\n }\n return result;\n }",
"public int deleteAndEarn(int[] nums) {\n \n if(nums==null || nums.length==0) return 0;\n int max = 0;\n //find max number\n for(int num : nums){\n max = Math.max(max, num);\n }\n \n int[] completeArray = new int[max+1];\n \n for(int i=0; i< nums.length; i++)\n {\n completeArray[nums[i]] += nums[i];\n }\n \n int skip = 0, take = completeArray[0];\n \n for(int i=1; i<completeArray.length; i++){\n int tempSkip = skip;\n skip = Math.max(skip,take);\n take = tempSkip + completeArray[i];\n }\n return Math.max(skip, take);\n }",
"private static long countSummations(int target, int currSum, int lastVal){\n if (currSum == target){\n return 1;\n }\n\n long numSummations = 0;\n\n for (int i = 1; i <= lastVal; i++){\n if (i + currSum > target){\n return numSummations;\n }\n currSum += i;\n numSummations += countSummations(target, currSum, i);\n currSum -= i;\n }\n return numSummations;\n }",
"public static int circularArrayMaxSubarraySum(int[] arr) {\n\t\tint ceNotWrapping = kadane(arr);\n\n\t\t// Case 2 : CE are wrapping\n\t\tint totalSum = 0;\n\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\ttotalSum += arr[i];\n\t\t\tarr[i] = -arr[i];\n\t\t}\n\n\t\tint nonContributingElementSum = kadane(arr);\n\n\t\tint ceWrapping = totalSum + nonContributingElementSum;\n\n\t\treturn Math.max(ceNotWrapping, ceWrapping);\n\n\t}",
"public int findMedian(int[] array) {\r\n\t\tint i;\r\n\t\tint sumRight = 0;\r\n\t\tint sumLeft = 0;\r\n\t\tfloat differenceBetweenTheTwoSums = sum(array, 0, array.length);\r\n\t\tint index = 0;\r\n\t\tint medianIndex = 0;\r\n\t\tfloat absSubtraction = 0;\r\n\r\n\t\tfor (i = 0; i < array.length - 1; i++) {\r\n\t\t\tsumRight = sum(array, 0, index);\r\n\t\t\tsumLeft = sum(array, index + 1, array.length);\r\n\t\t\tabsSubtraction = Math.abs(sumLeft - sumRight);\r\n\t\t\tif (absSubtraction <= differenceBetweenTheTwoSums) {\r\n\t\t\t\tdifferenceBetweenTheTwoSums = absSubtraction;\r\n\t\t\t\tmedianIndex = index;\r\n\t\t\t}\r\n\t\t\tindex++;\r\n\t\t}\r\n\t\treturn medianIndex++;\r\n\t}",
"public static int[] maxSumInSubArray(int array[]) {\n int maxSoFar = array[0];\n int maxEndingHere = array[0];\n int startIndex = 0;\n int endIndex = 0;\n int j = 1;\n for (; j < array.length; j++) {\n int val = array[j];\n if (val >= val + maxEndingHere) {\n maxEndingHere = val;\n startIndex = j;\n } else {\n maxEndingHere += val;\n }\n if (maxSoFar < maxEndingHere) {\n maxSoFar = maxEndingHere;\n endIndex = j;\n }\n }\n return Arrays.copyOfRange(array, startIndex, endIndex + 1);// Make copyofRange to copy new max subsequence array\n }",
"public int numberOfArithmeticSlices(int[] A) {\n int res = 0;\n int[] dp = new int[A.length];\n for (int i = 2; i < A.length; i++) {\n if (A[i] + A[i - 2] == 2 * A[i - 1]) {\n dp[i] = 1 + dp[i - 1];\n }\n res += dp[i];\n }\n return res;\n }",
"public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}",
"public ArrayList<ArrayList<Integer>> fourSum(int[] num, int target) {\n int temp = 0;\n Arrays.sort(num);\n\n ArrayList<ArrayList<Integer>> a = new ArrayList<ArrayList<Integer>>();\n int [] s = new int [4];\n int total = 0;\n int current = -1;\n int i = 0;\n Arrays.fill(s, 0);\n HashMap<Long, Integer> m = new HashMap<Long, Integer>();\n \n \n if (num.length < 4) return a;\n \n while (i!=-1) {\n //increase the current pointer\n ++current;\n if (current > num.length-1) {\n --i;\n if (i >= 0) \n {\n current = s[i];\n total -= num[current];\n }\n }\n else if (total + num[current] > target || total + (4-i)*num[num.length-1] < target) {\n --i;\n if (i >= 0) \n {\n current = s[i];\n total -= num[current];\n }\n }\n else {\n //check if current number will work\n /*if (current == 0)\n {\n */\n if (i < 3) {s[i] = current; total += num[current]; ++i;}\n else if (num[current] + total == target) {\n //bingo one answer\n ArrayList<Integer> b = new ArrayList<Integer>();\n long c = num[s[0]]*num[s[1]]*num[s[2]]*num[current];\n long d = Math.abs((long)num[s[0]]*1000000000) \n + Math.abs((long)num[s[1]]*1000000)\n + Math.abs((long)num[s[2]]*1000)\n + Math.abs((long)num[current]);\n if (c < 0) d *= -1;\n if (!m.containsKey(d))\n {\n b.add(num[s[0]]);\n b.add(num[s[1]]);\n b.add(num[s[2]]);\n b.add(num[current]);\n a.add(b);\n m.put(d, 1);\n }\n }\n /*\n } \n else if (num[current] != num[current-1])\n {\n if (i < 2) {s[i] = current; total += num[current]; ++i;}\n else if (num[current] + total == 0) {\n //bingo one answer\n ArrayList<Integer> b = new ArrayList<Integer>();\n b.add(num[s[0]]);\n b.add(num[s[1]]);\n b.add(num[s[2]]);\n a.add(b);\n }\n }\n */\n }\n }\n return a;\n }",
"public static void maxSubArray(Integer[] arr){\n\n int maxSum = arr[0]; // start with smallest number\n int i =0;\n int j =1;\n\n while (j< arr.length){\n if((maxSum + arr[j] > maxSum) ){\n maxSum = arr[j];\n i++;\n j++;\n }\n\n }\n\n }",
"public int sum(int[] array) {\n if (array == null || array.length == 0){\n return 0;\n }\n int sum = 0;\n for (int i = 0; i < array.length; i++){\n sum += array[i];\n }\n return sum;\n }",
"public static int total(int []array)\r\n\t{\r\n\t\tint ttl = 0;\r\n\t\t\r\n\t\tint n = array.length;\r\n\t\t\r\n\t\tfor (int i=0; i < n; i++)\r\n\t\t\tttl += array[i];\r\n\t\t\r\n\t\treturn ttl;\r\n\t}",
"static int getMissingByAvoidingOverflow(int a[], int n)\n\t {\n\t int total = 2;\n\t for (int i = 3; i <= (n + 1); i++)\n\t {\n\t total =total+ i -a[i - 2];\n\t //total =total- a[i - 2];\n\t }\n\t return total;\n\t }",
"static int findInteger(int arr[], int n) \n { \n int neg = 0, pos = 0; \n int sum = 0; \n \n for (int i = 0; i < n; i++) \n { \n sum += arr[i]; \n \n // If negative, then increment \n // neg count. \n if (arr[i] < 0) \n neg++; \n \n // Else increment pos count.. \n else\n pos++; \n } \n \n return (sum / Math.abs(neg - pos)); \n }",
"int maxSubarraySum(int arr[], int n)\r\n {\r\n int maxSoFar = Integer.MIN_VALUE;\r\n int currMax = 0;\r\n for(int i = 0; i < n; i++) {\r\n currMax = Math.max(arr[i], currMax+arr[i]);\r\n maxSoFar = Math.max(currMax, maxSoFar);\r\n }\r\n return maxSoFar;\r\n }",
"static int trappingWater(int arr[], int n) { \n // initialize output\n int result = 0;\n\n // maximum element on left and right\n int left_max = 0, right_max = 0;\n\n // indices to traverse the array\n int lo = 0, hi = n - 1;\n\n while (lo <= hi) {\n if (arr[lo] < arr[hi]) {\n if (arr[lo] > left_max)\n // update max in left\n left_max = arr[lo];\n else\n // water on curr element = max - curr\n result += left_max - arr[lo];\n lo++;\n }\n else {\n if (arr[hi] > right_max)\n // update right maximum\n right_max = arr[hi];\n else\n result += right_max - arr[hi];\n hi--;\n }\n }\n\n return result;\n }",
"private static int findDuplicateIdeaFour(int[] array) {\n\t\tint index = 0;\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tindex = Math.abs(array[i]);\n\t\t\tif (array[index] < 0) {\n\t\t\t\treturn index;\n\t\t\t} else {\n\t\t\t\tarray[index] = -array[index];\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Not Found\");\n\t\treturn -1;\n\t}",
"public int maxAscendingArraySum(int[] array) {\n return maxAscendingArraySum(array, 0, 2147483647, -1);\n }",
"public int solution(int[] A) {\n final int N = A.length;\n\n int maxSlice = Integer.MIN_VALUE;\n int maxEnding = 0;\n for (int i = 0; i < N; i++) {\n maxEnding = maxEnding + A[i];\n maxSlice = Math.max(maxSlice, maxEnding);\n if (maxEnding < 0) {\n maxEnding = 0;\n }\n }\n\n return maxSlice;\n }",
"public static int example1(int[] arr) { // O(1)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n)\r\n\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\t}",
"public List<List<Integer>> allTriples(int[] array, int target) {\n List<List<Integer>> res = new ArrayList<>();\n int n = array.length;\n Arrays.sort(array);\n for (int i = 0; i < n - 2; i++) {\n if (i > 0 && array[i] == array[i - 1]) { // remove dups for the 1st member\n continue;\n }\n int left = i + 1, right = n - 1;\n while (left < right) {\n int subsum = array[left] + array[right];\n if (subsum == target - array[i]) {\n res.add(Arrays.asList(array[i], array[left], array[right]));\n left++; // without this line, you will get infinite loop\n while (left < right && array[left] == array[left - 1]) {\n left++;\n }\n } else if (subsum < target - array[i]) {\n left++;\n } else { \n right--;\n }\n }\n }\n return res;\n }"
] |
[
"0.659966",
"0.63381314",
"0.6327291",
"0.6286009",
"0.62497157",
"0.6200822",
"0.6174756",
"0.6146556",
"0.6139896",
"0.612998",
"0.6095135",
"0.6092634",
"0.60916984",
"0.6066553",
"0.6046255",
"0.598568",
"0.5956618",
"0.594289",
"0.5941816",
"0.593344",
"0.59274197",
"0.5910832",
"0.5886752",
"0.5877843",
"0.5854849",
"0.58517927",
"0.58495164",
"0.58470595",
"0.5841994",
"0.58376956",
"0.5821591",
"0.5814132",
"0.5805478",
"0.5802177",
"0.57813185",
"0.5778084",
"0.57756937",
"0.5773282",
"0.5765338",
"0.5750019",
"0.57481956",
"0.5747559",
"0.57419497",
"0.57330704",
"0.57271504",
"0.5721681",
"0.57153213",
"0.5713841",
"0.57090896",
"0.57081556",
"0.5703123",
"0.5702922",
"0.56918925",
"0.5690958",
"0.5684017",
"0.5669739",
"0.56670475",
"0.56646305",
"0.56628716",
"0.5609587",
"0.560874",
"0.5606017",
"0.5603765",
"0.55956674",
"0.55943006",
"0.55923456",
"0.5591577",
"0.55871075",
"0.55867267",
"0.55859905",
"0.55845314",
"0.55843234",
"0.558322",
"0.5579849",
"0.55775654",
"0.5572679",
"0.5571829",
"0.5563114",
"0.5562578",
"0.5559214",
"0.5547036",
"0.5540341",
"0.55251974",
"0.5523156",
"0.5522673",
"0.5521168",
"0.55178326",
"0.55170757",
"0.5516301",
"0.5508827",
"0.5507332",
"0.55059123",
"0.5504902",
"0.55042183",
"0.55005366",
"0.54983795",
"0.54983246",
"0.5496596",
"0.5492644",
"0.5492485",
"0.54898155"
] |
0.0
|
-1
|
Created by Mybatis Generator 2018/12/27
|
@Mapper
public interface EmployeeMapper {
int deleteByPrimaryKey(Long id);
int insert(Employee record);
int insertSelective(Employee record);
Employee selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(Employee record);
int updateByPrimaryKey(Employee record);
List<Employee> selectByExample(Employee example);
Employee selectByEmployeeNo(String employeeNo);
List<Employee> selectByUsername(String username);
List<Employee> selectAll();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public interface CrmDmDbsBmsMapper {\n public static String TABLENAME = \"crm_dm_bds_bms\";\n @Select(\"select * from \"+TABLENAME+\" WHERE staff_city_id=#{cityId, jdbcType=BIGINT} limit 10 \")\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType= JdbcType.BIGINT, id=true),\n @Result(column=\"Saler_id\", property=\"salerId\", jdbcType= JdbcType.BIGINT),\n @Result(column=\"Saler_name\", property=\"salerName\", jdbcType= JdbcType.BIGINT)\n })\n public List<CrmDmBdsBms> findSalerListByCityId(@Param(\"cityId\") Long cityId);\n}",
"public interface BackTestOperation {\n\n\n @Select( \"SELECT * FROM ${listname}\")\n public ArrayList<BackTestDailyResultPo> getResult(@Param(\"listname\") String resultid);\n\n @Select(\" SELECT resultid FROM backtesting WHERE userid = #{0,jdbcType=BIGINT} AND sid = #{1,jdbcType=BIGINT} AND start = #{2,jdbcType=LONGVARCHAR}\\n\" +\n \" AND end = #{3,jdbcType=LONGVARCHAR}\")\n public String getResultid(String userid, String strategyid, String startdate, String enddate);\n}",
"public static void main(String[] args) throws IOException {\n\t\tString resource = \"mybatis-config.xml\";\r\n //ʹ��MyBatis�ṩ��Resources�����mybatis�������ļ�����Ҳ���ع�����ӳ���ļ���\r\n Reader reader = Resources.getResourceAsReader(resource); \r\n //����sqlSession�Ĺ���\r\n SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(reader);\r\n //������ִ��ӳ���ļ���sql��sqlSession\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.addUser\";\r\n// User user=new User(\"usermode\",22,222.22,UserState.AVAILABLE);\r\n// session.insert(statement,user);\r\n// session.commit();\r\n// System.out.println(user.getId());select id,name,age,money,status from t_user\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.getUser\";\r\n// user=session.selectOne(statement, user.getId());\r\n// System.out.println(user.toString()); \r\n \r\n\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.getuser\";\r\n// User user=session.selectOne(statement, 1);\r\n// user=session.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session.commit();\r\n// SqlSession session1 = sessionFactory.openSession();\r\n// user=session1.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session1.commit();\r\n \r\n \r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename1\";\r\n// List<User> users=session.selectList(statement, \"%J%\");\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename2\";\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"name\", \"J\"); \r\n// users=session.selectList(statement, map);\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.findcardbyuserids\";\r\n// List ids = new ArrayList();\r\n// ids.add(\"1\");\r\n// ids.add(\"2\");\r\n// ids.add(\"3\");\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"ids\", ids); \r\n// List<User> users=session.selectList(statement,map);\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\t\t SqlSession session = sessionFactory.openSession();\r\n\t\t String statement=\"com.demo.mybatis.DBMapping.UserMapper.getUserList\"; \r\n\t\t PageHelper.startPage(1, 5, true); \r\n\t\t List<User> users=session.selectList(statement);\r\n\t\t PageInfo<User> pageInfo = new PageInfo<User>(users); \r\n\t\t System.out.println(\"数据总数:\" + pageInfo.getTotal()); \r\n\t\t System.out.println(\"数据总页数:\" + pageInfo.getPages()); \r\n\t\t System.out.println(\"最后一页:\" + pageInfo.getLastPage()); \r\n\t\t for (User u: users)\r\n\t\t {\r\n\t\t\t System.out.println(u.toString());\r\n\t\t } \r\n\t \r\n\r\n\t}",
"@Mapper\npublic interface SRDaLeiDAO {\n\n @Select(\"SELECT `px_sr_dalei`.`id`,\\n\" +\n \" `px_sr_dalei`.`institution_code`,\\n\" +\n \" `px_sr_dalei`.`name`,\\n\" +\n \" `px_sr_dalei`.`createDate`,\\n\" +\n \" `px_sr_dalei`.`updateDate`\\n\" +\n \" FROM `px_sr_dalei` \\n\" +\n \" WHERE institution_code = #{institution_code} \")\n List<SRDaLei> querySRDaLeiListByInstitution(@Param(\"institution_code\") String institution_code);\n\n @Select(\"SELECT `px_sr_dalei`.`id`,\\n\" +\n \" `px_sr_dalei`.`institution_code`,\\n\" +\n \" `px_sr_dalei`.`name`,\\n\" +\n \" `px_sr_dalei`.`createDate`,\\n\" +\n \" `px_sr_dalei`.`updateDate`\\n\" +\n \" FROM `px_sr_dalei` \\n\" +\n \" WHERE institution_code = #{institution_code} \\n\" +\n \" AND id = #{id} \\n\")\n SRDaLei querySRDaLeiById(@Param(\"id\") int id, @Param(\"institution_code\") String institution_code);\n\n @Select(\"SELECT `px_sr_dalei`.`id`,\\n\" +\n \" `px_sr_dalei`.`institution_code`,\\n\" +\n \" `px_sr_dalei`.`name`,\\n\" +\n \" `px_sr_dalei`.`createDate`,\\n\" +\n \" `px_sr_dalei`.`updateDate`\\n\" +\n \" FROM `px_sr_dalei` \\n\" +\n \" WHERE institution_code = #{institution_code} \\n\" +\n \" AND name = #{name} \\n\")\n SRDaLei querySRDaLeiByName(@Param(\"name\") String name, @Param(\"institution_code\") String institution_code);\n\n @Select(\"SELECT `px_sr_dalei`.`id`,\\n\" +\n \" `px_sr_dalei`.`institution_code`,\\n\" +\n \" `px_sr_dalei`.`name`,\\n\" +\n \" `px_sr_dalei`.`createDate`,\\n\" +\n \" `px_sr_dalei`.`updateDate`\\n\" +\n \" FROM `px_sr_dalei` \\n\" +\n \" WHERE institution_code = #{institution_code} \\n\" +\n \" AND name like CONCAT('%',#{name},'%') \\n\")\n List<SRDaLei> querySRDaLeiListByNameWithLike(@Param(\"name\") String name, @Param(\"institution_code\") String institution_code);\n\n @Insert(\" INSERT INTO `px_sr_dalei`\\n\" +\n \"( \\n\" +\n \"`institution_code`,\\n\" +\n \"`name`,\\n\" +\n \"`createDate`,\\n\" +\n \"`updateDate`)\\n\" +\n \"VALUES\\n\" +\n \"( \\n\" +\n \"#{institution_code},\\n\" +\n \"#{name},\\n\" +\n \"now(),\\n\" +\n \"now());\\n\"\n )\n public int insertSRDaLei(SRDaLei srDaLei);\n\n @Update(\" UPDATE `px_sr_dalei`\\n\" +\n \"SET\\n\" +\n \"`name` = #{name},\\n\" +\n \"`updateDate` = now()\\n\" +\n \" WHERE id=#{id} and institution_code=#{institution_code} ;\\n \" )\n public int updateSRDaLei(SRDaLei srDaLei);\n\n @Delete(\" DELETE FROM `px_sr_dalei`\\n\" +\n \" WHERE id=#{id} and name=#{name} and institution_code=#{institution_code} ; \")\n public int deleteSRDaLei(SRDaLei srDaLei);\n}",
"@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime >= #{higherSkuParam.startTime}\",\n \"AND s.updateTime <= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}",
"@org.apache.ibatis.annotations.Mapper\npublic interface GoodsDao extends Mapper<Goods> {\n @Select(\"select * from tbl_goods\")\n @Results({\n @Result(property = \"cid\",column = \"cid\"),\n @Result(property = \"category\",column = \"cid\",one = @One(select = \"com.czxy.CategoryDao.selectByPrimaryKey\"))\n })\n List<Goods> findAll();\n\n}",
"public interface CfgSearchRecommendMapper extends BaseMapper {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int countByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int deleteByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int deleteByPrimaryKey(Long id);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int insert(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int insertSelective(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n List<CfgSearchRecommend> selectByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n CfgSearchRecommend selectByPrimaryKey(Long id);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByExampleSelective(@Param(\"record\") CfgSearchRecommend record, @Param(\"example\") CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByExample(@Param(\"record\") CfgSearchRecommend record, @Param(\"example\") CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByPrimaryKeySelective(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByPrimaryKey(CfgSearchRecommend record);\n}",
"public interface TableDetailMapper {\n\n @Select(\"select * from dxh_sys.tabledetail where vendorId=0 and tableName='skuProfitDayReport'\")\n List<Map<String, Object>> list();\n\n}",
"public static void main(String[] args) throws IOException {\n\t\tString resource = \"mybatis-config.xml\";\r\n\t\tInputStream inputStream = Resources.getResourceAsStream(resource);\r\n\t\t//获得sqlSessionFactory核心对象\r\n\t\t SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream);\r\n\t\t //获得session对象\r\n\t\t SqlSession session=sqlSessionFactory.openSession();\r\n\t\t List<Goods> goods=null;\r\n\t\t {\r\n\t\t\t //查询所有\r\n\t\t\tgoods= session.selectList(\"com.accp.mybatis.mapper.GoodsMapper.selectAll\");\r\n\t\t\t \r\n\t\t }\r\n\t\t System.out.println(goods);\r\n\t\t {\r\n\t\t\t //按id查询\r\n\t\t\t Goods good=session.selectOne(\"com.accp.mybatis.mapper.GoodsMapper.selectByid\",53);\r\n\t\t\t System.out.println(good);\r\n\t\t }\r\n\t\t \r\n\t\t {\r\n\t\t\t //新增\r\n\t\t\t Goods good=new Goods();\r\n\t\t\t good.setGoodsName(\"lhsb\");\r\n\t\t\t good.setGoodsType(\"sbsb\");\r\n\t\t\t good.setGoodsClassId(3);\r\n\t\t\t good.setGoodsPrice(1234);\r\n\t\t\t \r\n\t\t\t int i=session.insert(\"com.accp.mybatis.mapper.GoodsMapper.insert\", good);\r\n\t\t\t System.out.println(\"受影响行数\"+i);\r\n\t\t\t System.out.println(\"主键\"+good.getGoodsId());\r\n\t\t }\r\n\t\t \r\n\t\t {\r\n\t\t\t //删除\r\n\t\t\t int a=session.delete(\"com.accp.mybatis.mapper.GoodsMapper.delete\", 59);\r\n\t\t }\r\n\t\t {\r\n\t\t\t //模糊查询\r\n\t\t\t goods =session.selectList(\"com.accp.mybatis.mapper.GoodsMapper.selectlike\",\"%电视级%\");\r\n\t\t\t System.out.println(goods);\r\n\t\t }\r\n\t\t \r\n\t\t {\r\n\t\t\t //多条件查询\r\n\t\t\t Map<String,Object> params=new HashMap<String, Object>();\r\n\t\t\t params.put(\"goodsName\", \"%洗衣液%\");\r\n\t\t\t params.put(\"goodsPrice\", 8);\r\n\t\t\t goods=session.selectList(\"com.accp.mybatis.mapper.GoodsMapper.selectlikeandPrice\", params);\r\n\t\t\t System.out.println(goods);\r\n\t\t }\r\n\t\t \r\n\t\t {\r\n\t\t\t Goods good=new Goods();\r\n\t\t\t good.setGoodsId(60);\r\n\t\t\t good.setGoodsName(\"asd\");\r\n\t\t\t good.setGoodsType(\"123\");\r\n\t\t\t good.setGoodsClassId(1);\r\n\t\t\t good.setGoodsPrice(111);\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t int c=session.update(\"com.accp.mybatis.mapper.GoodsMapper.update\", good);\r\n\t\t }\r\n\t\t//提交事物\r\n\t\t session.commit();\r\n\t\t session.close();//关闭连接\r\n\t}",
"@Mapper\npublic interface QuestionDAO {\n String TABLE_NAME = \" question \";\n String INSERT_FIELDS = \" title, content, created_date, user_id, comment_count \";\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS,\n \") values (#{title},#{content},#{createdDate},#{userId},#{commentCount})\"})\n int addQuestion(Question question);\n\n // 使用 xml 配置文件进行 数据库查询语句与程序接口的映射。\n // 对应的 QuestionDAO.xml 文件位于 resources 文件夹 -》com.mattLearn.dao 文件夹中。\n List<Question> selectLatestQuestions(@Param(\"userId\") int userId, @Param(\"offset\") int offset,\n @Param(\"limit\") int limit);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n Question SelectById(int id);\n\n @Update(\" update question set comment_count=#{commentCount} where id = #{id}\")\n int updateCommentCount(@Param(\"commentCount\") int commentCount,\n @Param(\"id\") int id);\n\n}",
"@Mapper\npublic interface VirtualRepayFlowMapper {\n @DataSource(\"bigdata2_jdb\")\n @Select(\"SELECT * FROM virtual_repay_flow WHERE update_time >= #{from_time} and update_time < #{end_time} and id>#{id} limit 1000\")\n List<VirtualRepayFlow> find(@Param(\"from_time\") String from_time,\n @Param(\"end_time\") String end_time,\n @Param(\"id\") long id);\n\n\n @DataSource(\"dmp\")\n @Insert(\"INSERT INTO virtual_repay_flow (id,uuid,virtual_productid,to_user,amount,interest,repay_status,repay_time,create_time,update_time) values\" +\n \"(#{id},#{uuid},#{virtual_productid},#{to_user},#{amount},#{interest},#{repay_status},#{repay_time},#{create_time},#{update_time})\")\n void insert(VirtualRepayFlow virtualRepayFlow);\n\n @DataSource(\"dmp\")\n @Delete(\"DELETE FROM repay_flow where update_time<#{update_time}\")\n void delete(@Param(\"update_time\") String update_time);\n\n @DataSource(\"dmp\")\n @Select(\"SELECT * FROM virtual_repay_flow WHERE id=#{id}\")\n VirtualRepayFlow getById(@Param(\"id\") long id);\n\n\n @DataSource(\"dmp\")\n @Select(\"SELECT * FROM virtual_repay_flow WHERE uuid=#{uuid}\")\n VirtualRepayFlow getByUuid(@Param(\"uuid\") String uuid);\n}",
"@mybatisRepository\r\npublic interface StuWrongDao {\r\n List<StuWrong> getUserListPage(StuWrong stuwrong);\r\n List<StuWrong> searchStuWrongListPage(String attribute,String value);\r\n}",
"public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}",
"public interface HomePageMapper {\n @Select(\"select * from data_check where username=#{username} AND create_at>#{starttime} AND create_at<#{endtime};\")\n public List<HomePageDomain> selectHomePage(@Param(\"username\") String username, @Param(\"starttime\") String time, @Param(\"endtime\") String endtime);\n}",
"public interface PlayerStatisticMapper {\n\n @Results({\n @Result(property = \"id\", column = \"id\"),\n @Result(property = \"player\", column = \"id_player\", javaType = Player.class,\n one = @One(select = \"my.antonov.database.impl.logic.mappers.PlayerMapper.selectPlayerById\")),\n\n @Result(property = \"gamesCount\", column = \"games_count\"),\n @Result(property = \"winsCount\", column = \"wins_count\")\n })\n @Select(\"SELECT id, id_player, games_count, wins_count FROM player_statistic WHERE id = #{id}\")\n PlayerStatistic selectStatisticById(Integer id);\n\n @Insert(\"INSERT INTO player_statistic(id_player, games_count, wins_count) VALUES(#{player.id}, #{gamesCount}, #{winsCount})\")\n void insertNewStaticstic(PlayerStatistic statistic);\n\n @Update(\"ALTER TABLE player_statistic AUTO_INCREMENT = #{ai}\")\n void alterAutoIncrement(Integer ai);\n}",
"public interface NotationMapper {\n @Results({ @Result(property = \"notationId\", column = \"NOTATION_ID\"),\n @Result(property = \"title\", column = \"TITLE\"),\n @Result(property = \"subtitle\", column = \"SUBTITLE\"),\n @Result(property = \"bio\", column = \"BIO\"),\n @Result(property = \"notationUrl\", column = \"NOTATION_URL\"),\n @Result(property = \"bmgUrl\", column = \"BMG_URL\"),\n @Result(property = \"authorUrl\", column = \"AUTHOR_URL\"),\n @Result(property = \"accTitle\", column = \"ACC_TITLE\"),\n @Result(property = \"accUrl\", column = \"ACC_URL\"),\n @Result(property = \"type\", column = \"TYPE\"),\n @Result(property = \"resourceUrl\", column = \"RESOURCE_URL\"),\n @Result(property = \"createTime\", column = \"CREATETIME\") })\n @Select({\"<script>SELECT NOTATION_ID,TITLE,SUBTITLE,BIO,NOTATION_URL,BMG_URL,AUTHOR_URL,ACC_TITLE,ACC_URL,TYPE,RESOURCE_URL,CREATETIME FROM NOTATION \",\n \"<if test='type != \\\"\\\"'>WHERE TYPE = #{type}, </if>\",\n \"</script>\"})\n List<JSONObject> getNotationList(@Param(\"type\") String type);\n @Results({ @Result(property = \"notationId\", column = \"NOTATION_ID\"),\n @Result(property = \"title\", column = \"TITLE\"),\n @Result(property = \"subtitle\", column = \"SUBTITLE\"),\n @Result(property = \"bio\", column = \"BIO\"),\n @Result(property = \"notationUrl\", column = \"NOTATION_URL\"),\n @Result(property = \"bmgUrl\", column = \"BMG_URL\"),\n @Result(property = \"authorUrl\", column = \"AUTHOR_URL\"),\n @Result(property = \"accTitle\", column = \"ACC_TITLE\"),\n @Result(property = \"accUrl\", column = \"ACC_URL\"),\n @Result(property = \"type\", column = \"TYPE\"),\n @Result(property = \"resourceUrl\", column = \"RESOURCE_URL\"),\n @Result(property = \"createTime\", column = \"CREATETIME\") })\n @Select({\"SELECT NOTATION_ID,TITLE,SUBTITLE,BIO,NOTATION_URL,BMG_URL,AUTHOR_URL,ACC_TITLE,ACC_URL,TYPE,RESOURCE_URL,CREATETIME \",\n \"FROM NOTATION WHERE LOCATE(#{title},TITLE) OR LOCATE(#{title},SUBTITLE)\"\n })\n List<JSONObject> fuzzyByTitle(@Param(\"title\")String title);\n\n @Insert({\"INSERT INTO NOTATION (TITLE,SUBTITLE,BIO,NOTATION_URL,BMG_URL,AUTHOR_URL,ACC_TITLE,ACC_URL,TYPE,RESOURCE_URL,CREATETIME)\" +\n \"VALUES(#{title},#{subtitle},#{bio},#{notationUrl},#{bmgUrl},#{authorUrl},#{accTitle},#{accUrl},#{type},\" +\n \"#{resourceUrl},#{createTime})\"})\n void addNotation(JSONObject reqJson);\n}",
"@Mapper\npublic interface RoleMapper {\n @Insert(\"insert into T_Role(rname) values (#{rolename})\")\n int insertRole(@Param(\"rolename\") String rolename);\n\n @Update(\"update T_Role set rname=#{rolename} where rid=#{rid}\")\n int updateRole(@Param(\"rolename\") String rolename, String rid);\n\n @Delete(\"delete from T_Role where rid=#{rid}\")\n int deleteRole(@Param(\"rid\")String rid);\n\n @Select(\"select * from T_Role\")\n List<Role> listRole(int pageSize, int offset);\n}",
"public interface ResourceDAO {\n //通过资源信息获取id\n @Select(\" SELECT r.resourceId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceURL = #{resourceURL} \" +\n \" AND r.resourceMethodType = #{resourceMethodType} \" +\n \" AND r.systemId = #{systemId} \")\n public List<Long> findIdByResourceInfo(@Param(\"resourceURL\") String resourceURL,\n @Param(\"resourceMethodType\") int resourceMethodType,\n @Param(\"systemId\") int systemId) ;\n\n //通过资源信息和可用性获取可用id\n @Select(\" SELECT r.resourceId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceURL = #{resourceURL} \" +\n \" AND r.resourceMethodType = #{resourceMethodType} \" +\n \" AND r.systemId = #{systemId} \" +\n \" AND r.state = #{state} \")\n public List<Long> findIdByResourceInfoAndState(@Param(\"resourceURL\") String resourceURL,\n @Param(\"resourceMethodType\") int resourceMethodType,\n @Param(\"systemId\") int systemId,\n @Param(\"state\") int state) ;\n\n //通过ids获取资源记录\n @Select({\"<script>\" ,\n \" SELECT * \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取可用的资源记录\n @Select({\"<script>\" ,\n \" SELECT * \",\n \" FROM btl_resource r \",\n \" WHERE r.state = #{state} \",\n \" AND r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findByIdsAndState(@Param(\"ids\") List<Long> ids , @Param(\"state\") int state) ;\n\n //通过ids获取资源信息\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.resourceURL , r.resourceMethodType , r.systemId \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithResourceInfosByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取资源名称\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.resourceName \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithResourceNameByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取资源可用信息\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.state \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithStateByIds(@Param(\"ids\") List<Long> ids) ;\n\n\n //获取所有处于某种状态下的资源信息\n @Select(\" SELECT r.resourceId , r.resourceURL , r.resourceMethodType , r.systemId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.state = #{state} \")\n public List<ResourceRecord> findIdsWithResourceInfoByState(@Param(\"state\") int state) ;\n\n //通过名字获取资源记录(分页)\n @Select(\" SELECT * \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceName LIKE CONCAT('%' , #{name} , '%') \" +\n \" LIMIT ${skip},${size} \")\n public List<ResourceRecord> findByNameInPage(@Param(\"name\") String name,\n @Param(\"skip\") int skip,\n @Param(\"size\") int size);\n //通过名字获取资源数\n @Select(\" SELECT count(1) \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceName LIKE CONCAT('%' , #{name} , '%') \")\n long getCountByName(@Param(\"name\") String name);\n\n\n //获取资源树信息\n @Select(\"SELECT r.resourceId , r.resourceName , r.parentId , r.state FROM btl_resource r\")\n public List<ResourceRecord> findAllRoleIdsWithRoleNameAndParentIdAndState() ;\n\n //添加资源\n @Insert(\" INSERT IGNORE INTO btl_resource(createTime , resourceCode , resourceName , resourceURL , resourceMethodType , systemId , state , parentId , resourceMemo) \" +\n \" VALUES(now() , #{re.resourceCode} , #{re.resourceName} , #{re.resourceURL} , #{re.resourceMethodType} , #{re.systemId} , #{re.state} , #{re.parentId} , #{re.resourceMemo}) \")\n public int insertResource(@Param(\"re\") ResourceRecord re);\n\n //删除资源\n @Delete(\"DELETE FROM btl_resource WHERE resourceId=#{resourceId}\")\n public int deleteById(@Param(\"resourceId\") long resourceId);\n\n //更新资源\n @Update(\"UPDATE btl_resource SET \" +\n \" resourceCode = #{re.resourceCode} , \" +\n \" resourceName = #{re.resourceName} , \" +\n \" resourceURL = #{re.resourceURL} , \" +\n \" resourceMethodType = #{re.resourceMethodType} , \" +\n \" systemId = #{re.systemId} , \" +\n \" state = #{re.state} , \" +\n \" parentId = #{re.parentId} , \" +\n \" resourceMemo = #{re.resourceMemo} \" +\n \" WHERE resourceId = #{re.resourceId}\")\n public int updateResource(@Param(\"re\") ResourceRecord re);\n\n}",
"@Mapper\npublic interface CivilizationIndexMapper {\n\n @Insert(\"insert into t_timezerg_civilization_index values (#{id},#{cid},#{cdate})\")\n int add(CivilizationIndex civilizationIndex);\n\n @Delete(\"delete from t_timezerg_civilization_index where id = #{id}\")\n void delete(String id);\n\n @Select(\"select * from t_timezerg_civilization_index where cid = #{cid}\")\n CivilizationIndex selectByCid(String cid);\n\n @Select(\"select * from t_timezerg_civilization_index where id = #{id}\")\n CivilizationIndex selectById(String id);\n\n @Select(\"select ci.*,c.title from t_timezerg_civilization_index ci left join t_timezerg_civilization c on c.id = ci.cid order by ci.cdate desc\")\n List<HashMap> selectList();\n\n}",
"@Mapper\npublic interface CscpFuncDao {\n @Insert(\"insert into cscp_org_func values(#{orgID,jdbcType=VARCHAR},#{funcID,jdbcType=VARCHAR})\")\n void saveOrgFunc(@Param(\"orgID\") String orgID, @Param(\"funcID\") String funcID);\n @Select(\"select f.id,f.func_name,f.func_type,f.func_desc from cscp_org_func of,cscp_function f where of.org_id=#{orgID,jdbcType=VARCHAR} and of.func_id=f.id and f.func_type=1\")\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType= JdbcType.VARCHAR, id=true),\n @Result(column=\"func_type\", property=\"funcType\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"func_name\", property=\"funcName\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"func_desc\", property=\"description\", jdbcType=JdbcType.VARCHAR)\n })\n List<CscpFunc> getFuncs(String orgID);\n @Select(\"select menu_id from cscp_func_menu m left join cscp_org_func of on m.func_id=of.func_id where of.org_id=#{orgID,jdbcType=VARCHAR}\")\n List<String> getFuncMenus(String orgID);\n}",
"public interface RoleMapper extends RoleDao {\n\n @Override\n @ResultType(Role.class)\n @Select(\"SELECT * FROM role WHERE id = #{id}\")\n Role getRole(int id);\n\n @Override\n @ResultType(Role.class)\n @Select(\"SELECT * FROM role WHERE name = #{name}\")\n Role getRoleByName(String name);\n\n @Override\n @ResultType(Role.class)\n @Select(\"SELECT * FROM role ORDER BY name\")\n List<Role> getAllRoles();\n\n @Override\n @Insert(\"INSERT INTO role (name) VALUES(#{name})\")\n @Options(useGeneratedKeys = true)\n void addRole(Role role);\n\n @Override\n @Delete(\"DELETE FROM role WHERE id =#{id}\")\n void removeRole(Role role);\n}",
"public interface EmpDao {\n\n\n /**\n * 根据参数查询列表\n * @param map\n * @return\n */\n\n// select empno,ENAME,job,mgr,hiredate,sal,comm,deptno from emp\n @Select(\"<script>\" +\n \"select a.empno,a.ename,a.job,a.mgr,to_char(a.hiredate,'yyyy-mm-dd') hiredate,a.sal,a.comm,a.deptno,a.mgrname,a.dname,a.rn from \" +\n \"(select b.*,rownum rn from \" +\n \"(select e.*,d.dname from (select e1.*,e2.ename mgrname from emp e1 left join emp e2 on e1.mgr=e2.empno) e left join dept d on e.deptno=d.deptno \" +\n \"<where>\" +\n \"<if test='ename!=null'>and e.ename like '%'||#{ename}||'%' </if>\" +\n \"<if test='job!=null'>and e.job like '%'||#{job}||'%' </if>\" +\n \"</where>\" +\n \"order by empno desc) b where rownum < #{end}) a where a.rn > #{start}\" +\n \"</script>\")\n List<Map> getList(Map map);\n\n\n /**\n * 带条件查询总条数\n * @param map\n * @return\n */\n @Select(\"<script>\"+\n \"select count(*) from emp <where>\" +\n \"<if test='ename != null'> and ename like '%${ename}%'</if>\"+\n \"<if test='job != null'> and job like '%${job}%'</if>\"+\n \"</where></script>\")\n int getPageCount(Map map);\n /**\n * 添加\n * @param map\n * @return\n */\n// seq_emp_id.nextval,ename, job, hiredate, sal, comm,deptno\n @Insert(\"insert into emp values(seq_emp_id.nextval,#{ENAME},#{JOB},#{MGR},to_date(#{HIREDATE},'yyyy-mm-dd'),#{SAL},#{COMM},#{DEPTNO})\")\n int add(Map map);\n\n\n /**\n * 更新\n * @param map\n * @return\n */\n @Update(\"update emp set ename=#{ENAME},job=#{JOB},mgr=#{MGR},hiredate=to_date(#{HIREDATE},'yyyy-mm-dd'),sal=#{SAL},comm=#{COMM},deptno=#{DEPTNO} where empno=#{EMPNO}\")\n int update(Map map);\n\n /**\n * 删除\n * @param deptNo\n * @return\n */\n @Delete(\"delete from emp where empno=#{EMPNO}\")\n int delete(int deptNo);\n\n /**\n * 获取所有部门,用于页面数据绑定\n * @return\n */\n @Select(\"select deptno,dname from dept\")\n List<Map> getDeptType();\n\n /**\n * 获取所有职位,用于页面数据绑定\n * @return\n */\n @Select(\"select distinct(job) from emp\")\n List<Map> getJob();\n\n /**\n * 获取上司,用于页面数据绑定\n * @return\n */\n @Select(\"select empno,ename from emp where job='PRESIDENT' or job='MANAGER' or job='ANALYST'\")\n List<Map> getMgr();\n\n\n}",
"@Select({\n \"select\",\n \"JNLNO, TRANDATE, ACCOUNTDATE, CHECKTYPE, STATUS, DONETIME, FILENAME\",\n \"from B_UMB_CHECKING_LOG\",\n \"where JNLNO = #{jnlno,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"JNLNO\", property=\"jnlno\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"TRANDATE\", property=\"trandate\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"ACCOUNTDATE\", property=\"accountdate\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CHECKTYPE\", property=\"checktype\", jdbcType=JdbcType.CHAR),\n @Result(column=\"STATUS\", property=\"status\", jdbcType=JdbcType.CHAR),\n @Result(column=\"DONETIME\", property=\"donetime\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"FILENAME\", property=\"filename\", jdbcType=JdbcType.VARCHAR)\n })\n BUMBCheckingLog selectByPrimaryKey(BUMBCheckingLogKey key);",
"@Mapper\npublic interface PersonMapper {\n\n @Select(\"select * from cjh_test_person where id = #{id}\")\n Person getMydomain(@Param(\"id\") int id);\n}",
"@SqlMapper\npublic interface PortalBeanCurdMapper {\n List<LauncherHomeApiVo> getLauncherHome(@Param(\"curdId\")Integer curdId);\n}",
"public interface WarningLogMapper {\n\n @Select(\"SELECT * \"\n + \" FROM warning_log \"\n + \"where devEUI = #{devEUI} and status=#{status} \")\n List<WarningLog> queryByDevAndStatus(@Param(\"devEUI\") String devEUI,@Param(\"status\") String status);\n\n @Select(\"SELECT * \"\n + \" FROM warning_log \"\n + \"where id = #{id} \")\n WarningLog queryWarningLog(@Param(\"id\") String id);\n\n @Select(\"<script>\"\n +\"SELECT * FROM warning_log where devEUI in \"\n + \"<foreach collection=\\\"list\\\" open=\\\"(\\\" close=\\\")\\\" separator=\\\",\\\" item=\\\"uid\\\" >\"\n + \"#{uid}\"\n + \"</foreach>\"\n + \"<if test =\\\"status !=null and status!=''\\\"> and status = #{start} </if>\"\n +\" order by status asc, createTime desc \"\n +\"</script>\")\n List<WarningLog> queryWarningLogByDevIds(@Param(\"list\") List<String> list, @Param(\"status\") String status);\n\n @Insert(\"insert into warning_log (devEUI,time,fPort,gatewayCount,rssi,fCnt,loRaSNR,data,devicePath,functionCode,dataLen,status,createTime)\"\n + \" values( #{devEUI},#{time},#{fPort},#{gatewayCount},#{rssi},#{fCnt},#{loRaSNR},#{data},#{devicePath},#{functionCode},#{dataLen}, #{status},#{createTime} ) \")\n int saveWarningLog(WarningLog log);\n\n /**\n * 将故障的设备标记为已修复\n * @param status\n * @param updateTime\n * @param devEUI\n * @return\n */\n @Update(\"update warning_log set status = #{status}, updateTime = #{updateTime} where devEUI=#{devEUI} and status ='0' \")\n int updateStatus(@Param(\"status\") String status, @Param(\"updateTime\") Date updateTime, @Param(\"devEUI\") String devEUI);\n\n @Select(\"<script>\"\n +\"SELECT count(id) FROM warning_log where devEUI in \"\n + \"<foreach collection=\\\"list\\\" open=\\\"(\\\" close=\\\")\\\" separator=\\\",\\\" item=\\\"uid\\\" >\"\n + \"#{uid}\"\n + \"</foreach>\"\n + \"<if test =\\\"status !=null and status!=''\\\"> and status = #{status} </if>\"\n +\"</script>\")\n int queryFaultCount(@Param(\"list\") List<String> list, @Param(\"status\") String status);\n\n\n}",
"public static void main(String[] args) throws IOException {\n String resource = \"D:\\\\Program Files\\\\Java\\\\projects\\\\musclecoder\\\\openplateform-modules\\\\study-mybatis\\\\src\\\\main\\\\resources\\\\mybatis-config.xml\";\n resource = \"mybatis-config.xml\";\n InputStream inputStream = Resources.getResourceAsStream(resource);\n SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream);\n SqlSession sqlSession = sqlSessionFactory.openSession();\n UserEntity entity = sqlSession.selectOne(\"com.mapper.UserMapper.select\", 1L);\n System.out.println(entity.getId() + \" -> \" + entity.getUserName());\n System.out.println(\"list :\");\n List<UserEntity> list = sqlSession.selectList(\"com.mapper.UserMapper.selectAll\");\n list.forEach(userEntity -> System.out.println(userEntity.getId() + \" -> \" + userEntity.getUserName()));\n\n sqlSession.close();\n inputStream.close();\n }",
"@Mapper\r\npublic interface TestMapper {\r\n @Select(\"SELECT * from test\")\r\n public List<com.demo.pojo.Test> select();\r\n @Select(\"SELECT * FROM TEST WHERE ID=#{id}\")\r\n public com.demo.pojo.Test byId(@Param(\"id\") int id);\r\n public int updateTest(Test test);\r\n @Delete(\"delete from test where id=#{id}\")\r\n public int delete(Integer id);\r\n public int addTest(Test test);\r\n}",
"public interface OrgDeptMapper extends OrgDeptPOMapper {\n @Select( {\n \"<script>\",\n \"select\",\n \"id, org_id, name, tel_no, created_by, updated_by, created_at, updated_at\",\n \"FROM org_dept \",\n \"where org_id = #{orgId,jdbcType=INTEGER}\",\n \"<if test=\\\"text != null\\\">\",\n \" and LOWER(name) like LOWER(concat('%',#{text, jdbcType=VARCHAR},'%'))\",\n \"</if>\",\n \"</script>\"\n })\n @ResultMap( {\"com.inmind.automind.datalayer.mapper.OrgDeptPOMapper.BaseResultMap\"})\n List<OrgDeptPO> fuzzySearchByName(@Param(\"orgId\") Long orgId, @Param(\"text\") String text);\n}",
"public interface SysUserMapper extends Mapper<SysUser> {\n\n @Select(\"select * from sys_user where username=#{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,\n many = @Many(select = \"com.hailong.spring.mapper.SysRoleMapper.findByUid\"))\n })\n public SysUser findByUserName(String username);\n}",
"@Mapper\npublic interface CompanyUserInfoDAO {\n\n @Select(\"SELECT * FROM company_user_info WHERE sales_id=#{sales_id} ORDER BY add_time DESC\")\n List<CompanyUserInfoDTO> findCompanyUserInfoBySalesId(@Param(\"sales_id\") Long sales_id);\n\n}",
"public interface BugPlatformMapper {\n\n\n @Select(\"SELECT js.pname as bugResolutionStatus, COUNT(js.pname) as bugNum FROM jiraissue ji INNER JOIN project pr ON pr.ID = ji.PROJECT LEFT JOIN issuestatus js ON ji.issuestatus = js.ID where pr.ID in (#{2}) and issuetype = 1 AND CREATED between #{0} and #{1} group by js.pname\")\n List<BugPlatformObject> getList(String startDate,String endDate,String project);\n}",
"@Mapper\npublic interface LocationMapper {\n @Select(\"select * from plugin_location where id = #{id}\")\n MyLocation findOneLocation(@Param(\"id\") String id);\n\n @Select(\"select * from plugin_location\")\n List<MyLocation> findAllLocation();\n\n}",
"@MyBatisRepository\npublic interface ArticleMapper {\n\n /**\n * 根据主键id获取文章\n *\n * @param id\n * @return\n */\n ArticleDO selectByPrimaryKey(Integer id);\n\n /**\n * 获取所有有效状态的文章\n *\n * @return\n */\n List<ArticleDO> getAllArticleList();\n}",
"public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}",
"@Mapper\npublic interface UserMapper {\n\n @Select(\"select * from course_user where name = #{name}\")\n @Results({@Result(property = \"id\", column = \"id\", id = true),\n @Result(property = \"name\", column = \"name\"),\n @Result(property = \"nickname\", column = \"nickname\"),\n })\n User findByName(@Param(\"name\") String name);\n\n @InsertProvider(type = UserProvider.class, method = \"insert\")\n @SelectKey(keyProperty = \"id\", before = false, resultType = int.class, statement = \"SELECT LAST_INSERT_ID() AS id\")\n int save(@Param(\"user\") User user);\n\n\n}",
"public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}",
"@org.apache.ibatis.annotations.Mapper\npublic interface TestMapper extends Mapper<Test> {\n Test selectByid(Long id);\n}",
"@SqlMapper\npublic interface PortalAreaAdminirationMapper {\n List<PortalAreaAdministrationListVo> getPage(PortalAreaAdminirationListCondition condition);\n Integer getCount(PortalAreaAdminirationListCondition condition);\n Integer save(PortalAreaAdminirationListCondition condition);\n Integer delete(PortalAreaAdminirationListCondition condition);\n Integer update(PortalAreaAdminirationListCondition condition);\n}",
"@Mapper\npublic interface BlogDAO {\n @Insert(\"INSERT INTO blog(title,uniq,markdown,html, create_time,update_time) \" +\n \"VALUES(#{item.title},#{item.uniq},#{item.markdown},#{item.html},#{item.createTime}, #{item.updateTime})\")\n int insert(\n @Param(\"item\") Blog blog\n );\n\n @Select(\"SELECT id,uniq,title,markdown,html,\" +\n \" create_time as createTime,update_time as updateTime \" +\n \" FROM blog WHERE id = #{id}\")\n Blog getBlogById(@Param(\"id\") String id);\n\n @Insert(\"replace into blog(id,title,uniq,markdown,html, create_time,update_time) \" +\n \"VALUES(#{item.id},#{item.title},#{item.uniq},#{item.markdown},#{item.html},#{item.createTime}, #{item.updateTime})\")\n int update(@Param(\"item\")Blog blog);\n\n @Select(\"SELECT id,uniq,title,\" +\n \" create_time as createTime,update_time as updateTime \" +\n \" FROM blog order by id desc limit #{offset}, #{limit}\")\n List<Blog> getBlogList(@Param(\"offset\")long offset,\n @Param(\"limit\")long limit,\n @Param(\"sort\") String sort);\n}",
"@Repository\npublic interface HeaderHistoryMapper {\n\n @Insert(\"INSERT INTO HeaderHistory VALUES(NULL, #{name}, #{value}, #{resultHistory.id})\")\n @Options(useGeneratedKeys = true, keyProperty = \"id\")\n int save(HeaderHistory headerHistory);\n\n @Insert(\"<script>INSERT INTO HeaderHistory(name, value, resultHistoryId) VALUES \"\n + \"<foreach collection='headerHistories' item='headerHistory' separator=','> \"\n + \"(#{headerHistory.name}, #{headerHistory.value}, #{id}) \"\n + \"</foreach></script>\")\n int saveByResultHistory(ResultHistory resultHistory);\n\n @Select(\"SELECT id, name, value FROM HeaderHistory WHERE id = #{id}\")\n @Results({ @Result(id = true, property = \"id\", column = \"id\", jdbcType = JdbcType.INTEGER),\n @Result(property = \"name\", column = \"name\", jdbcType = JdbcType.VARCHAR),\n @Result(property = \"value\", column = \"value\", jdbcType = JdbcType.VARCHAR)\n })\n HeaderHistory load(int id);\n\n @Select(\"SELECT id, name, value FROM HeaderHistory WHERE resultHistoryId = #{id}\")\n @Results({ @Result(id = true, property = \"id\", column = \"id\", jdbcType = JdbcType.INTEGER),\n @Result(property = \"name\", column = \"name\", jdbcType = JdbcType.VARCHAR),\n @Result(property = \"value\", column = \"value\", jdbcType = JdbcType.VARCHAR)\n })\n List<HeaderHistory> loadByResultHistoryId(int id);\n\n @Update(\"UPDATE HeaderHistory SET name = #{name}, value = #{value}, \"\n + \"resultHistoryId = #{resultHistory.id} WHERE id = #{id}\")\n int update(HeaderHistory headerHistory);\n\n @Delete(\"DELETE FROM HeaderHistory WHERE id = #{id}\")\n int delete(int id);\n\n @Delete(\"DELETE FROM HeaderHistory WHERE resultHistoryId = #{id}\")\n int deleteByResultHistoryId(int id);\n}",
"public interface UserAnnoMapper {\n\n @Select(\"select * from tbl_user where id = #{id}\")\n User findOneById(Long id);\n}",
"@RequestMapping(\"/testMybatis\")\n public String testMybatis(){\n int count = 0;\n System.out.println(count);\n CtUser ct= new CtUser();\n ct.setUserName(\"张三\");\n ct.setAge(12);\n boolean save = ctUserService.save(ct);\n System.out.println(save);\n return \"success\";\n }",
"public interface DepartmentMapper {\n\n @Select(\"select * from department where id=#{id}\")\n DepartmentBean findById(Integer id);\n @Select(\"select * from department\")\n List<DepartmentBean> findAllDepartment();\n}",
"public static void main(String[] args) {\n\n String resource = \"spring/mybatis/mybatis.xml\";\n InputStream inputStream = null;\n try {\n inputStream = Resources.getResourceAsStream(resource);\n }catch (IOException e){\n e.printStackTrace();\n }\n\n SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(inputStream);\n SqlSession sqlSession = sessionFactory.openSession();\n //sqlSession.getMapper()\n }",
"@Mapper\npublic interface SeckillUserDao {\n\n @Select(\"select * from seckill_user where id = #{id}\")\n public SeckillUser getById(@Param(\"id\")long id);\n\n}",
"public interface MyBatisTest {\n\n List<ItemPayment> export(ExportQueryDBParam exportParam);\n\n}",
"@Mapper\npublic interface PositionMapper extends MapperTemplate{\n\n //SQL queries\n String GET_ALL = \"select * from positions\";\n String GET_BY_ID = \"select * from positions where id = #{id}\";\n String DELETE_BY_ID = \"delete from positions where id = #{id}\";\n String UPDATE_BY_ID = \"update positions set \" +\n \"name = #{name}, \" +\n \"dept_no = #{dept_no} \" +\n \"where id = #{id}\";\n String ADD_NEW = \"insert into positions \" +\n \"(name, dept_no)\" +\n \"values (#{name}, #{dept_no})\";\n\n //returns an array list of all positions\n @Select(GET_ALL)\n @Override\n ArrayList<Position> getAll();\n\n //returns the Position that matches the id passed down from the URI through the Resource and Service\n @Select(GET_BY_ID)\n @Override\n Position getById(int id);\n\n //deletes the Position that matches the id passed down from the URI through the Resource and Service\n @Delete(DELETE_BY_ID)\n @Override\n int deleteById(int id);\n\n //updates the Position received in the body of the HTTP request\n @Update(UPDATE_BY_ID)\n @Override\n int updateById(Object position);\n\n //adds the Position received in the body of the HTTP request\n @Insert(ADD_NEW)\n @Options(useGeneratedKeys = true, keyProperty = \"id\")\n @Override\n int addNew(Object position);\n}",
"@MyBatisRepository\r\npublic interface BackRoleDao extends BaseDao<BackRole> {\r\n}",
"@Select({\n \"select\",\n \"SOID, LINENO, MID, MNAME, STANDARD, UNITID, UNITNAME, NUM, BEFOREDISCOUNT, DISCOUNT, \",\n \"PRICE, TOTALPRICE, TAXRATE, TOTALTAX, TOTALMONEY, BEFOREOUT, ESTIMATEDATE, LEFTNUM, \",\n \"ISGIFT, FROMBILLTYPE, FROMBILLID\",\n \"from SALEORDERDETAIL\",\n \"where SOID = #{soid,jdbcType=VARCHAR}\",\n \"and LINENO = #{lineno,jdbcType=DECIMAL}\"\n })\n @ConstructorArgs({\n @Arg(column=\"SOID\", javaType=String.class, jdbcType=JdbcType.VARCHAR, id=true),\n @Arg(column=\"LINENO\", javaType=Long.class, jdbcType=JdbcType.DECIMAL, id=true),\n @Arg(column=\"MID\", javaType=String.class, jdbcType=JdbcType.VARCHAR),\n @Arg(column=\"MNAME\", javaType=String.class, jdbcType=JdbcType.VARCHAR),\n @Arg(column=\"STANDARD\", javaType=String.class, jdbcType=JdbcType.VARCHAR),\n @Arg(column=\"UNITID\", javaType=String.class, jdbcType=JdbcType.VARCHAR),\n @Arg(column=\"UNITNAME\", javaType=String.class, jdbcType=JdbcType.VARCHAR),\n @Arg(column=\"NUM\", javaType=Long.class, jdbcType=JdbcType.DECIMAL),\n @Arg(column=\"BEFOREDISCOUNT\", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL),\n @Arg(column=\"DISCOUNT\", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL),\n @Arg(column=\"PRICE\", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL),\n @Arg(column=\"TOTALPRICE\", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL),\n @Arg(column=\"TAXRATE\", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL),\n @Arg(column=\"TOTALTAX\", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL),\n @Arg(column=\"TOTALMONEY\", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL),\n @Arg(column=\"BEFOREOUT\", javaType=Long.class, jdbcType=JdbcType.DECIMAL),\n @Arg(column=\"ESTIMATEDATE\", javaType=Date.class, jdbcType=JdbcType.TIMESTAMP),\n @Arg(column=\"LEFTNUM\", javaType=Long.class, jdbcType=JdbcType.DECIMAL),\n @Arg(column=\"ISGIFT\", javaType=Short.class, jdbcType=JdbcType.DECIMAL),\n @Arg(column=\"FROMBILLTYPE\", javaType=Short.class, jdbcType=JdbcType.DECIMAL),\n @Arg(column=\"FROMBILLID\", javaType=String.class, jdbcType=JdbcType.VARCHAR)\n })\n Saleorderdetail selectByPrimaryKey(@Param(\"soid\") String soid, @Param(\"lineno\") Long lineno);",
"@Override\n protected void initResultTable() {\n }",
"@Mapper\npublic interface OrderMapper {\n @Insert(\" insert into t_order (order_id, order_type, city_id, \\n\" +\n \" platform_id, user_id, supplier_id, \\n\" +\n \" goods_id, order_status, remark, \\n\" +\n \" create_by, create_time, update_by, \\n\" +\n \" update_time)\\n\" +\n \" values (#{orderId}, #{orderType}, #{cityId}, \\n\" +\n \" #{platformId}, #{userId}, #{supplierId}, \\n\" +\n \" #{goodsId}, #{orderStatus}, #{remark}, \\n\" +\n \" #{createBy}, #{createTime}, #{updateBy}, \\n\" +\n \" #{updateTime})\")\n /**\n * statement=\"\":表示定义的子查询语句\n * before=true:表示在之前执行,booler类型的,所以为true\n * keyColumn=\"myNo\":表示查询所返回的类名\n * resultType=int.class:表示返回值得类型\n * keyProperty=\"empNo\" :表示将该查询的属性设置到某个列中,此处设置到empNo中\n * //进行添加、修改等操作的时候只能返回数字,而不能返回java类或其他!\n * // SELECT LAST_INSERT_ID() 适合那种主键是自增的类型\n * // 1 insert语句需要写id字段了,并且 values里面也不能省略\n * // 2 selectKey 的order属性需要写成BEFORE 因为这样才能将生成的uuid主键放入到model中,\n * // 这样后面的insert的values里面的id才不会获取为空\n * // 跟自增主键相比就这点区别,当然了这里的获取主键id的方式为 select uuid()\n */\n @SelectKey(keyColumn = \"id\", keyProperty = \"id\", resultType = long.class, before = false, statement = \"select last_insert_id()\")\n long insertSelective(Order record);\n\n @Update(\"update t_order set order_status=#{status},update_by=#{updateBy},update_time=#{updateTime} where order_id=#{orderId}\")\n int updateOrderStatus(@Param(\"orderId\") String orderId, @Param(\"status\") String status, @Param(\"updateBy\") String updateBy, @Param(\"updateTime\") Date updateTime);\n\n @Select(\"select *from t_order\\n\" +\n \" where order_id = #{orderId}\")\n Order selectByPrimaryKey(String orderId);\n}",
"@RegisterRowMapper(OptionKecamatanO.Mapper.class)\npublic interface OptionKecamatanR {\n \n /**\n * Select data dari table Surabayaa\n */\n @SqlQuery(\"SELECT gid, name AS text from sby\")\n List<OptionKecamatanO> option();\n\n @SqlQuery(\"SELECT gid, name AS text from sby WHERE name ILIKE :keyword\")\n List<OptionKecamatanO> optionByName(String keyword);\n\n}",
"@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}",
"@MyBatisRepository\npublic interface TypeCusMapper {\n\tvoid insert(TypeCus typeCus);\n\n\tvoid delete(Long typeCusId);\n\t\n\tvoid removeTcs(TypeCusQB tcQb);\n\n\tvoid update(TypeCus typeCus);\n\n\tTypeCus select(Long typeCusId);\n\n\tList<TypeCus> selectList(TypeCusQB queryBean);\n\n\tList<TypeCus> selectPage(PagingQueryBean<TypeCusQB> pagingQueryBean);\n\n\tInteger selectCount(PagingQueryBean<TypeCusQB> pagingQueryBean);\n\n\tObject proc(TypeCus typeCus);\n\t\n\tList<Customer> selectComplex(PagingQueryBean<TypeCusQB> pagingQueryBean);;\n\t\n\tInteger selectComplexCount(PagingQueryBean<TypeCusQB> pagingQueryBean);\n\tLong getMaxOrder(Long typeId);\n}",
"@Mapper\npublic interface UserMapper {\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return int\n */\n int registerAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param baseUser\n * @return int\n */\n int registerBaseUser(BaseUser baseUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return com.example.app.entity.BaseUser\n */\n AppUser loginAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param\n * @return java.util.List<com.example.app.entity.College>\n */\n @Select(\"select * from col\")\n List<College> allCollege();\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param user\n * @return int\n */\n int hasUser(BaseUser user);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param col_id\n * @return int\n */\n int hasCol(int col_id);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param sms\n * @return int\n */\n int registerCode(SMS sms);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param code\n * @return int\n */\n int getCode(@Param(\"code\") Integer code);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrder(Order order);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrderCount(Order order);\n\n}",
"@Mapper\npublic interface ConfigDao {\n\n @Select(\"SELECT * FROM config WHERE `id` = #{id}\")\n Config getConfigById(String id);\n\n}",
"@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);",
"BSQL2Java2 createBSQL2Java2();",
"public interface BattleDao {\n\n @Select(\"SELECT * FROM battle WHERE chapter_id = #{chapterId} order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattleByChapterId(String chapterId);\n\n @Select(\"SELECT * FROM battle order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattle();\n\n @Select(\"SELECT * FROM battle WHERE battle_id = #{battleId}\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public Battle getBattleById(String battleId);\n}",
"@Select({ \"select\", \"id, pid, filename, start_time, end_time, length, density, machine, ar, path, \",\n\t\t\t\"size, uuid, header_time, last_update, conflict_resolved, status, comment, width, \",\n\t\t\t\"start_version, end_version\", \"from csv_file\", \"where id = #{id,jdbcType=INTEGER}\" })\n\t@Results({ @Result(column = \"id\", property = \"id\", jdbcType = JdbcType.INTEGER, id = true),\n\t\t\t@Result(column = \"pid\", property = \"pid\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"filename\", property = \"filename\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"start_time\", property = \"startTime\", jdbcType = JdbcType.TIMESTAMP),\n\t\t\t@Result(column = \"end_time\", property = \"endTime\", jdbcType = JdbcType.TIMESTAMP),\n\t\t\t@Result(column = \"length\", property = \"length\", jdbcType = JdbcType.INTEGER),\n\t\t\t@Result(column = \"density\", property = \"density\", jdbcType = JdbcType.DOUBLE),\n\t\t\t@Result(column = \"machine\", property = \"machine\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"ar\", property = \"ar\", jdbcType = JdbcType.BIT),\n\t\t\t@Result(column = \"path\", property = \"path\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"size\", property = \"size\", jdbcType = JdbcType.BIGINT),\n\t\t\t@Result(column = \"uuid\", property = \"uuid\", jdbcType = JdbcType.CHAR),\n\t\t\t@Result(column = \"header_time\", property = \"headerTime\", jdbcType = JdbcType.TIMESTAMP),\n\t\t\t@Result(column = \"last_update\", property = \"lastUpdate\", jdbcType = JdbcType.TIMESTAMP),\n\t\t\t@Result(column = \"conflict_resolved\", property = \"conflictResolved\", jdbcType = JdbcType.BIT),\n\t\t\t@Result(column = \"status\", property = \"status\", jdbcType = JdbcType.INTEGER),\n\t\t\t@Result(column = \"comment\", property = \"comment\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"width\", property = \"width\", jdbcType = JdbcType.INTEGER),\n\t\t\t@Result(column = \"start_version\", property = \"startVersion\", jdbcType = JdbcType.INTEGER),\n\t\t\t@Result(column = \"end_version\", property = \"endVersion\", jdbcType = JdbcType.INTEGER) })\n\tCsvFile selectByPrimaryKey(Integer id);",
"public interface DataErrorNumberMapper {\n\n @Select(\"<script> SELECT \" +\n \" count( * ) AS number,d.broken_according_id,d.broken_according FROM \" +\n \" (\" +\n \" SELECT \" +\n \" c.broken_according,c.broken_according_id,a.station_code \" +\n \" FROM \" +\n \" report_manage_data_mantain a \" +\n \" RIGHT JOIN config_river_station b ON a.station_code = b.station_id \" +\n \" RIGHT JOIN config_abnormal_dictionary c ON c.broken_according_id = a.broken_according_id \" +\n \" WHERE \" +\n \"1 = 1 \" +\n \" and b.sys_org in ( SELECT id FROM sys_org so WHERE id = #{orgId} OR FIND_IN_SET( #{orgId}, path ) ) \" +\n \" <if test=\\\"stationId!=null and stationId != ''\\\">AND a.station_code = #{stationId} </if> \" +\n \" <if test=\\\"year!=null\\\"> AND SUBSTR( a.create_time, 1, 4 ) = #{year} </if> \" +\n \" <if test=\\\"list!=null\\\">AND SUBSTR( a.create_time, 6, 2 ) IN (<foreach collection=\\\"list\\\" item=\\\"item\\\" separator=\\\",\\\">#{item}</foreach>)</if> \" +\n \" <if test=\\\"dataTime!=null\\\">AND SUBSTR( a.create_time, 1, 10 ) = #{dataTime} </if>\" +\n \" ) d \" +\n \" WHERE \" +\n \" d.station_code IS NOT NULL \" +\n \" GROUP BY \" +\n \" d.broken_according_id </script>\")\n List<DataError> getList(@Param(\"stationId\") Integer stationId,\n @Param(\"year\")Integer year,\n @Param(\"list\") List<String> list,\n @Param(\"dataTime\")String dataTime,\n @Param(\"orgId\")Integer orgId);\n\n //本月的异常易发时间查询\n @Select(\"<script>SELECT * FROM `report_manage_data_mantain` a \" +\n \" left JOIN config_river_station b ON a.station_code = b.station_id \" +\n \" WHERE 1=1\" +\n \" AND b.sys_org in ( SELECT id FROM sys_org so WHERE id = #{orgId} OR FIND_IN_SET( #{orgId}, path ) ) \" +\n \" <if test = \\'stationId != null \\'>and a.station_code = #{stationId}</if> \" +\n \" <if test=\\\"year!=null\\\"> AND SUBSTR( a.create_time, 1, 4 ) = #{year} </if> \" +\n \" <if test=\\\"list!=null\\\">AND SUBSTR( a.create_time, 6, 2 ) IN (<foreach collection=\\\"list\\\" item=\\\"item\\\" separator=\\\",\\\">#{item}</foreach>)</if> \" +\n \" <if test=\\\"dataTime!=null\\\">AND SUBSTR( a.create_time, 1, 10 ) = #{dataTime} </if>\" +\n \" GROUP BY SUBSTR(a.create_time,12,8) </script>\")\n List<ReportManageDataMantain> getGroupByTime(@Param(\"stationId\") Integer stationId,\n @Param(\"year\")Integer year,\n @Param(\"list\") List<String> list,\n @Param(\"dataTime\")String dataTime,\n @Param(\"orgId\")Integer orgId);\n\n\n}",
"@Mapper\npublic interface UserMapper {\n\n @Select(\"SELECT * FROM User \")\n List<User> findAll();\n\n @Insert(\"INSERT INTO User(name, gender) VALUES(#{name}, #{gender})\")\n Integer insert(@Param(\"name\") String name, @Param(\"gender\") Boolean gender);\n}",
"@Mapper\npublic interface WeChatInfoDao {\n\n\n /**\n * 插入微信信息\n * @param wechatInfo\n * @return\n */\n @Insert(\"INSERT INTO wechat_info(parentid,unionid,openid,nickname,sex,province,city,country,headImgUrl,\" +\n \"status,ticket_url,ticket,is_guide,reward) VALUES(#{parentid},#{unionid},#{openid},#{nickname},#{sex},#{province}\" +\n \",#{city},#{country},#{headImgUrl},#{status},#{ticketUrl},#{ticket},#{isGuide},#{reward})\")\n @Options(useGeneratedKeys=true, keyProperty=\"id\")\n int insert(WeChatInfoEntity wechatInfo);\n\n /**\n * 根据openID 查找用户信息\n * @param openid\n * @return\n */\n @Select(\"SELECT * FROM wechat_info WHERE openid = #{openid}\")\n @Results(\n {\n @Result(id = true, column = \"id\", property = \"ID\"),\n @Result(column = \"unionid\", property = \"unionid\"),\n @Result(column = \"parentid\", property = \"parentid\"),\n @Result(column = \"openid\", property = \"openid\"),\n @Result(column = \"ticket_url\", property = \"ticketUrl\"),\n @Result(column = \"ticket\", property = \"ticket\"),\n @Result(column = \"nickname\", property = \"nickname\"),\n @Result(column = \"is_guide\", property = \"isGuide\"),\n @Result(column = \"reward\", property = \"reward\")\n })\n WeChatInfoEntity findByOpenID(@Param(\"openid\") String openid);\n\n /**\n * 根据openID 修改二维码信息\n * @param wechatInfo\n */\n @Update(\"UPDATE wechat_info SET ticket_url=#{ticketUrl},ticket=#{ticket} WHERE openid=#{openid}\")\n void updateTicketUrlByOpenID(WeChatInfoEntity wechatInfo);\n\n /**\n * 取消关注\n * @param wechatInfo\n */\n @Update(\"UPDATE wechat_info SET status=1 WHERE openid=#{openid}\")\n void updateStatusByOpenID(WeChatInfoEntity wechatInfo);\n\n\n /**\n * 更改status 状态\n * @param wechatInfo\n */\n @SelectProvider(type=WeChatInfoSqlProvider.class, method=\"updateByOpenIdSql\")\n void updateStatus(@Param(\"wechatInfo\") WeChatInfoEntity wechatInfo);\n\n @Select(\"SELECT * FROM wechat_info WHERE id = #{ID}\")\n @Results(\n {\n @Result(id = true, column = \"id\", property = \"ID\"),\n @Result(column = \"unionid\", property = \"unionid\"),\n @Result(column = \"parentid\", property = \"parentid\"),\n @Result(column = \"openid\", property = \"openid\"),\n @Result(column = \"ticket_url\", property = \"ticketUrl\"),\n @Result(column = \"ticket\", property = \"ticket\"),\n @Result(column = \"is_guide\", property = \"isGuide\"),\n @Result(column = \"reward\", property = \"reward\")\n })\n WeChatInfoEntity selectWecahtUserByID(@Param(\"ID\")String ID);\n}",
"@org.apache.ibatis.annotations.Mapper\npublic interface UserMapper extends Mapper<User>{\n}",
"@MyBatisDao\npublic interface ContnDao extends BaseDao<Contn> {\n\n Contn get(@Param(\"id\") int id);\n\n Contn getByContnNo(@Param(\"contnNo\") String contnNo);\n}",
"public static void main( String[] args ) throws IOException {\n\n InputStream inputStream= Resources.getResourceAsStream(\"mybatis-conf.xml\");\n\n //获取SqlSessionFactory的对象\n SqlSessionFactory sf= new SqlSessionFactoryBuilder().build(inputStream);\n\n ProductType productType=new ProductType();\n productType.setName(\"ccs\");\n productType.setStatus(1);\n //获取\n SqlSession session=sf.openSession();\n\n\n\n productType.setName(\"c\");\n List<ProductType> productTypes=session.selectList(util.selectMapper(\"productTypeMapper.selectProductType\"),productType);\n\n productTypes.forEach(p-> System.out.println(p));\n\n session.commit();\n session.close();\n\n }",
"@Component\n@Mapper\npublic interface LearnCurrentMapper {\n\n /**\n * 查询用户在这个科目下,\n * @param userid\n * @param subjectid\n * @return\n */\n @Select(value = \"select mcode from tb_learncurrent where userid = #{userid} and subjectid = #{subjectid} \" )\n long findLearnCurrentMcodeBySubjectid(long userid, String subjectid);\n\n /**\n * 查询用户在这个科目下的当前对象,\n * @param userid\n * @param subjectid\n * @return\n */\n @Select(value = \"select * from tb_learncurrent where userid = #{userid} and subjectid = #{subjectid} \" )\n LearnCurrent findLearnCurrentObjBySubjectid(@Param(\"userid\") long userid,@Param(\"subjectid\") String subjectid);\n\n\n\n\n /**\n * 查询用户在这个类型模拟年份下的当前学习的题目编号,\n * @param userid\n * @param moniname\n * @return\n */\n @Select(value = \"select mcode from tb_learncurrent where userid = #{userid} and subjectid = #{subjectid} and moniname = #{moniname} \" )\n long findLearnCurrentMcodeByMoniname(@Param(\"userid\") long userid, @Param(\"subjectid\") String subjectid,@Param(\"moniname\") String moniname);\n\n /**\n * 查询用户在这个类型模拟年份下的当前学习的 当前对象,\n * @param userid\n * @param moniname\n * @return\n */\n @Select(value = \"select * from tb_learncurrent where userid = #{userid} and subjectid = #{subjectid} and moniname = #{moniname}\" )\n LearnCurrent findLearnCurrentObjByMoniname(@Param(\"userid\") long userid, @Param(\"subjectid\") String subjectid,@Param(\"moniname\") String moniname);\n\n\n /**\n * 创建对象\n * @param learnCurrent\n */\n @Insert(\"insert into tb_learncurrent( userid , subjectid , mcode , createtime , moniname ) values ( #{userid} , #{subjectid} , #{mcode} , #{createtime} , #{moniname} )\")\n void save(LearnCurrent learnCurrent);\n\n\n @Update(\"update tb_learncurrent set pkid = #{pkid} , userid = #{userid} , subjectid = #{subjectid} , mcode = #{mcode} , createtime = #{createtime} , moniname = #{moniname} where pkid= #{pkid}\")\n void update(LearnCurrent learnCurrent);\n\n @Select(\"select * from tb_learncurrent where pkid = #{pkid}\")\n LearnCurrent find(@Param(\"pkid\") long pkid);\n\n\n}",
"@UseClasspathSqlLocator\npublic interface MovieDao {\n\n @SqlQuery\n @RegisterRowMapper(Movie.MovieMapper.class)\n List<Movie> getMovies(@Bind(\"year\") int year);\n\n @SqlQuery\n @RegisterRowMapper(Actor.ActorMapper.class)\n List<Actor> getActors(@BindCountry Country country);\n}",
"@Select({\n \"select\",\n \"id_soggetto, codice_fiscale, id_asr, cognome, nome, data_nascita_str, comune_residenza_istat, \",\n \"comune_domicilio_istat, indirizzo_domicilio, telefono_recapito, data_nascita, id_soggetto_fk,\",\n \"asl_residenza, asl_domicilio, email, lat, lng, id_tipo_soggetto, utente_operazione, \",\n \"data_creazione, data_modifica, data_cancellazione, id_medico\",\n \"from soggetto_personale_scolastico\",\n \"where id_soggetto = #{idSoggetto,jdbcType=BIGINT}\"\n })\n @Results({\n @Result(column=\"id_soggetto\", property=\"idSoggetto\", jdbcType=JdbcType.BIGINT, id=true),\n @Result(column=\"codice_fiscale\", property=\"codiceFiscale\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_asr\", property=\"idAsr\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"cognome\", property=\"cognome\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"nome\", property=\"nome\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"data_nascita_str\", property=\"dataNascitaStr\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"comune_residenza_istat\", property=\"comuneResidenzaIstat\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"comune_domicilio_istat\", property=\"comuneDomicilioIstat\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"indirizzo_domicilio\", property=\"indirizzoDomicilio\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"telefono_recapito\", property=\"telefonoRecapito\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"data_nascita\", property=\"dataNascita\", jdbcType=JdbcType.DATE),\n @Result(column=\"asl_residenza\", property=\"aslResidenza\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"asl_domicilio\", property=\"aslDomicilio\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"email\", property=\"email\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"lat\", property=\"lat\", jdbcType=JdbcType.NUMERIC),\n @Result(column=\"lng\", property=\"lng\", jdbcType=JdbcType.NUMERIC),\n @Result(column=\"id_tipo_soggetto\", property=\"idTipoSoggetto\", jdbcType=JdbcType.INTEGER),\n @Result(column = \"id_soggetto_fk\", property = \"idSoggettoFk\", jdbcType = JdbcType.BIGINT),\n @Result(column=\"utente_operazione\", property=\"utenteOperazione\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"data_creazione\", property=\"dataCreazione\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"data_modifica\", property=\"dataModifica\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"data_cancellazione\", property=\"dataCancellazione\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"id_medico\", property=\"idMedico\", jdbcType=JdbcType.BIGINT)\n })\n SoggettoPersonaleScolastico selectByPrimaryKey(Long idSoggetto);",
"public interface SQLConverter {\n String convert(Statement statement, Object params, String mapperId);\n}",
"@Mapper\npublic interface AyUserMapper {\n// @Select(\"SELECT * FROM ay_user WHERE name='name' AND password='password'\")\n //Param注意是哪个包的\n User findByNameAndPassword(@Param(\"name\") String name,@Param(\"password\") String password);\n}",
"@Mapper\n@Repository\npublic interface MessageAnnotationMapper {\n\n @Select(\"SELECT * FROM message\")\n @Results({\n @Result(property = \"id\", column = \"id\", javaType = Integer.class, jdbcType = JdbcType.INTEGER),\n @Result(property = \"nickName\", column = \"nick_name\", javaType = String.class, jdbcType = JdbcType.VARCHAR),\n @Result(property = \"ip\", column = \"ip\", javaType = String.class, jdbcType = JdbcType.VARCHAR),\n @Result(property = \"insertTime\", column = \"INSERT_TIME\", javaType = Date.class, jdbcType = JdbcType.DATE)\n })\n List<Message> list();\n}",
"@Mapper\npublic interface NationReferenceMapper {\n\n @Insert(\"insert into t_timezerg_nation_reference values (#{id},#{nid},#{rid})\")\n int add(NationReference nationReference);\n\n @Select(\"select * from t_timezerg_nation_reference where nid = #{nid} and rid = #{rid}\")\n NationReference selectByNidAndRid(NationReference nationReference);\n\n @Select(\"select * from t_timezerg_nation_reference where id = #{id}\")\n NationReference selectById(String id);\n\n @Delete(\"delete from t_timezerg_nation_reference where rid = #{rid}\")\n void deleteByRid(String rid);\n\n @Delete(\"delete from t_timezerg_nation_reference where nid = #{nid}\")\n void deleteByNid(String nid);\n\n @Delete(\"delete from t_timezerg_nation_reference where id = #{id}\")\n void deleteById(String id);\n\n @Select(\"SELECT nr.*,n.title FROM t_timezerg_nation_reference nr LEFT JOIN t_timezerg_nation n ON nr.nid = n.id WHERE nr.rid = #{rid}\")\n List<HashMap> selectByRid(String rid);\n\n @Select(\"SELECT nr.*,r.title FROM t_timezerg_nation_reference nr LEFT JOIN t_timezerg_reference r ON nr.rid = r.id WHERE nr.nid = #{nid}\")\n List<HashMap> selectByNid(String nid);\n\n}",
"@Component(\"keeperWelfareDao\")\npublic interface IKeeperWelfareMapper extends IMyBatisMapper {\n List<ShopKeeperWelfareDomain> queryWelfare(@Param(\"welfareName\") String welfareName, @Param(\"welfareId\") Integer welfareId, @Param(\"typeId\") Integer typeId,@Param(\"limit\") Integer limit, @Param(\"offset\") Integer offset, @Param(\"areaId\") Integer areaId, @Param(\"netType\") String netType);\n\n int queryWelfareCount(@Param(\"welfareName\") String welfareName, @Param(\"welfareId\") Integer welfareId, @Param(\"typeId\") Integer typeId, @Param(\"areaId\") Integer areaId, @Param(\"netType\") String netType);\n\n void addWelfare(ShopKeeperWelfareDomain shopKeeperWelfareDomain);\n\n void updateWelfare(@Param(\"welfareDomain\") ShopKeeperWelfareDomain shopKeeperWelfareDomain);\n\n void deleteWelfare(@Param(\"welfareId\") Integer welfareId);\n\n int queryWelfareCountByProductId(@Param(\"productId\") String productId);\n\n List<ShopKeeperWelfareDomain> queryWelfareForApp();\n}",
"@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}",
"public interface SpiderResultUrlsPoMapper extends feihua.jdbc.api.dao.CrudDao<SpiderResultUrlsPo, String> {\n}",
"public interface UserHomeModalMapper {\n\n @Insert({\"<script>\",\n \" insert into sys_user_home_modal (user_id,home_modal) values (#{userId},#{homeModal})\"\n , \"</script>\"})\n void save(@Param(\"userId\") Integer userId, @Param(\"homeModal\") String homeModal);\n\n @Update({\"<script>\", \"update sys_user_home_modal set home_modal = #{homeModal} where user_id = #{userId}\",\n \"</script>\"})\n void updateByUserId(@Param(\"userId\") Integer userId, @Param(\"homeModal\") String homeModal);\n\n @Select(\"select user_id as userId, home_modal as homeModal from sys_user_home_modal where user_id = #{v} limit 1\")\n Map<String, String> findHomeModalByUserId(Integer userId);\n}",
"public interface TestScoreDAO\nextends BaseIbatisDAO<TestScore> {\n}",
"@Mapper\npublic interface EquipmentDao {\n\n @Select(\"SELECT * FROM `equipment` WHERE `id` = #{id}\")\n Equipment getEquipmentById(int id);\n\n @Select(\"SELECT `equipment`.`id`, `equipment`.`name` \" +\n \"FROM `equipment`, `step_equipment` \" +\n \"WHERE `equipment`.`id` = `step_equipment`.`equipment_id`\" +\n \"AND `step_equipment`.`step_id` = #{stepId}\")\n List<Equipment> listEquipmentsByStepId(int stepId);\n\n @Insert(\"INSERT INTO `equipment`(`id`, `name`) VALUES(#{id}, #{name})\")\n void insertEquipment(Equipment equipment);\n\n}",
"@Mapper\npublic interface RoleMapper extends BaseMapper<RoleEntity>{\n @Select(\"select * from role\")\n List<RoleEntity> selectAllRole();\n @Select(\"select * from role where role_name like CONCAT('%',#{role_name},'%')\")\n List<RoleEntity>selectRoleName(String role_name);\n @Select(\"select * from role where role_name = #{roleName}\")\n RoleEntity selectRoleOne(@Param(\"roleName\")String roleName);\n}",
"@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}",
"@Mapper\r\npublic interface OrderMapper {\r\n /**\r\n * 添加库存\r\n *\r\n * @param order\r\n */\r\n void addOrder(Order order);\r\n\r\n /**\r\n * 获得所有库存\r\n *\r\n * @return\r\n */\r\n @Select(\"SELECT ms_order.*,ms_supplier.supplier_office,ms_goods.* FROM gongxiao.ms_order,gongxiao.ms_supplier,gongxiao.ms_goods WHERE or_supplier_id=supplier_id and or_goods_id=su_id and or_check=3;\")\r\n List<Order> getList();\r\n\r\n\r\n @Select(\"SELECT COUNT(*) FROM ms_sale WHERE sale_check =1;\")\r\n Integer getCount();\r\n\r\n @Select(\"SELECT ms_order.*,ms_supplier.supplier_office,ms_goods.* FROM gongxiao.ms_order,gongxiao.ms_supplier,gongxiao.ms_goods WHERE or_supplier_id=supplier_id and or_goods_id=su_id and or_check=3 limit #{rows} offset #{offset};;\")\r\n List<Order> getListByPage(@Param(\"rows\") Integer rows, @Param(\"offset\") Integer offset);\r\n\r\n\r\n @Select(\"SELECT ms_order.*,ms_supplier.supplier_office,ms_goods.* FROM gongxiao.ms_order,gongxiao.ms_supplier,gongxiao.ms_goods WHERE or_supplier_id=supplier_id and or_goods_id=su_id and or_check=3 LIMIT #{row} OFFSET #{page};\")\r\n List<Order> getListByPageAndRow(@Param(\"row\") Integer row, @Param(\"page\") Integer page);\r\n\r\n /**\r\n * 获得公司进货记录\r\n */\r\n @Select(\"SELECT * FROM gongxiao.repertory WHERE or_id=#{id}\")\r\n Order getById(Integer id);\r\n\r\n /**\r\n * 获得库存物品信息\r\n *\r\n * @param val\r\n * @return\r\n */\r\n @Select(\"SELECT ms_order.*,ms_supplier.supplier_office,ms_goods.* FROM gongxiao.ms_order,gongxiao.ms_supplier,ms_goods WHERE ms_order.or_goods_id =#{val} and or_goods_id=su_id and or_supplier_id=supplier_id and or_check='3';\")\r\n List<Order> getGoodsInfoInBound(Integer val);\r\n\r\n /**\r\n * 设置发票状况\r\n *\r\n * @param key\r\n */\r\n @Update(\"UPDATE `gongxiao`.`ms_order` SET `or_invoice`=#{value} WHERE `or_id`=#{key};\")\r\n void setInvoice(@Param(\"key\") Integer key, @Param(\"value\") Integer value);\r\n\r\n /**\r\n * 结款\r\n *\r\n * @param id\r\n * @return\r\n */\r\n @Update(\"UPDATE `gongxiao`.`ms_order` SET `or_payment`=6 WHERE `or_id`=#{id};\")\r\n void setPayment(Integer id);\r\n\r\n /**\r\n * 获得待审核进货信息\r\n *\r\n * @param check\r\n * @return\r\n */\r\n @Select(\"SELECT ms_order.*,ms_supplier.supplier_office,ms_goods.* FROM gongxiao.ms_order,gongxiao.ms_supplier,gongxiao.ms_goods WHERE or_supplier_id=supplier_id and or_goods_id=su_id and ms_order.or_check=#{check};\")\r\n List<Order> getOrderWhereCheck(Integer check);\r\n\r\n /**\r\n * 删除库存\r\n *\r\n * @param id\r\n */\r\n @Delete(\"DELETE FROM `gongxiao`.`ms_order` WHERE `or_id`=#{id};\")\r\n void deleteOrderById(Integer id);\r\n\r\n /**\r\n * 获得库存状态\r\n *\r\n * @return\r\n */\r\n @Select(\"select su_name,SUM(or_number) as su_sum from repertory group by su_name;\")\r\n List<Statistics> getStatistics();\r\n\r\n /**\r\n * 查找相似物品的库存信息\r\n *\r\n * @param like\r\n * @return\r\n */\r\n @Select(\"SELECT ms_order.*,ms_supplier.supplier_office,ms_goods.* FROM gongxiao.ms_order,gongxiao.ms_supplier,gongxiao.ms_goods where ms_goods.su_name like #{like} and or_supplier_id=supplier_id and or_check='3' and or_goods_id = su_id\")\r\n List<Order> getLikeOrderInBound(String like);\r\n\r\n /**\r\n * 查找货号的库存信息\r\n *\r\n * @param like\r\n * @return\r\n */\r\n @Select(\"SELECT ms_order.*,ms_supplier.supplier_office,ms_goods.* FROM gongxiao.ms_order,gongxiao.ms_supplier,gongxiao.ms_goods where ms_goods.su_No like #{like} and or_supplier_id=supplier_id and or_check='3' and or_goods_id = su_id\")\r\n List<Order> getListByNo(String like);\r\n\r\n\r\n void updateOrderNumInBound(UpdateItem updateItem);\r\n\r\n /**\r\n * 审核入库\r\n */\r\n @Update(\"UPDATE `gongxiao`.`ms_order` SET `or_check`= 3 WHERE `or_id`=#{id};\")\r\n void orderInBound(Integer id);\r\n\r\n /**\r\n * 刷新库存\r\n */\r\n void refreshOrderInBound();\r\n\r\n /**\r\n * 根据日期和供货商获得库存信息\r\n *\r\n * @param item\r\n * @return\r\n */\r\n List<Order> getOrderByDateAndSupplierId(OfIdAndDateItem item);\r\n\r\n /**\r\n * 获得仓库预警库存\r\n *\r\n * @return\r\n */\r\n @Select(\"SELECT * FROM gongxiao.repertory WHERE or_number<=or_alarm;\")\r\n List<Order> getBoundAlarm();\r\n\r\n /**\r\n * 获得仓库预期\r\n * 只显示库存大于0的,小鱼0的不需要显示!\r\n *\r\n * @param time\r\n * @return\r\n */\r\n @Select(\"SELECT * FROM gongxiao.repertory WHERE or_deaddate<=#{s} and or_number >0;\")\r\n List<Order> getListByDead(Date time);\r\n\r\n /**\r\n * 重设预警值\r\n *\r\n * @param val\r\n * @param key\r\n */\r\n @Update(\"UPDATE `gongxiao`.`ms_order` SET `or_alarm`=#{val} WHERE `or_id`=#{key};\")\r\n void resetAlarm(@Param(\"val\") Integer val, @Param(\"key\") Integer key);\r\n\r\n /**\r\n * 根据公司ID获得库存信息\r\n */\r\n @Select(\"SELECT ms_order.*,ms_supplier.supplier_office,ms_goods.* FROM gongxiao.ms_order,gongxiao.ms_supplier,gongxiao.ms_goods where or_supplier_id=supplier_id and or_check='3' and or_goods_id = su_id and supplier_id=#{id}\")\r\n List<Order> getListBySupId(Integer id);\r\n\r\n /**\r\n * 获得公司库存金额\r\n *\r\n * @return\r\n */\r\n @Select(\"SELECT sum(or_price*or_number) FROM gongxiao.ms_order WHERE or_check =3;\")\r\n Double getAmount();\r\n\r\n /**\r\n * 修改备注\r\n */\r\n @Update(\"UPDATE `gongxiao`.`ms_order` SET `or_other`=#{val} WHERE `or_id`=#{key};\")\r\n void updateOther(@Param(\"val\") String val, @Param(\"key\") Integer key);\r\n}",
"@Mapper\npublic interface MemberMapper {\n @Select(\"Select * From Member\")\n List<Member> findMembers();\n}",
"@Select({\n \"select\",\n \"user_id, measure_date, contract_id, consultant_uid, collar, wrist, bust, shoulder_width, \",\n \"mid_waist, waist_line, sleeve, hem, back_length, front_length, arm, forearm, \",\n \"front_breast_width, back_width, pants_length, crotch_depth, leg_width, thigh, \",\n \"lower_leg, height, weight, body_shape, stance, shoulder_shape, abdomen_shape, \",\n \"payment, invoice\",\n \"from A_SUIT_MEASUREMENT\",\n \"where user_id = #{userId,jdbcType=INTEGER}\",\n \"and measure_date = #{measureDate,jdbcType=TIMESTAMP}\"\n })\n @Results({\n @Result(column=\"user_id\", property=\"userId\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"measure_date\", property=\"measureDate\", jdbcType=JdbcType.TIMESTAMP, id=true),\n @Result(column=\"contract_id\", property=\"contractId\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"consultant_uid\", property=\"consultantUid\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"collar\", property=\"collar\", jdbcType=JdbcType.DOUBLE),\n @Result(column=\"wrist\", property=\"wrist\", jdbcType=JdbcType.DOUBLE),\n @Result(column=\"bust\", property=\"bust\", jdbcType=JdbcType.DOUBLE),\n @Result(column=\"shoulder_width\", property=\"shoulderWidth\", jdbcType=JdbcType.DOUBLE),\n @Result(column=\"mid_waist\", property=\"midWaist\", jdbcType=JdbcType.DOUBLE),\n @Result(column=\"waist_line\", property=\"waistLine\", jdbcType=JdbcType.DOUBLE),\n @Result(column=\"sleeve\", property=\"sleeve\", jdbcType=JdbcType.DOUBLE),\n @Result(column=\"hem\", property=\"hem\", jdbcType=JdbcType.DOUBLE),\n @Result(column=\"back_length\", property=\"backLength\", jdbcType=JdbcType.DOUBLE),\n @Result(column=\"front_length\", property=\"frontLength\", jdbcType=JdbcType.DOUBLE),\n @Result(column=\"arm\", property=\"arm\", jdbcType=JdbcType.DOUBLE),\n @Result(column=\"forearm\", property=\"forearm\", jdbcType=JdbcType.DOUBLE),\n @Result(column=\"front_breast_width\", property=\"frontBreastWidth\", jdbcType=JdbcType.DOUBLE),\n @Result(column=\"back_width\", property=\"backWidth\", jdbcType=JdbcType.DOUBLE),\n @Result(column=\"pants_length\", property=\"pantsLength\", jdbcType=JdbcType.DOUBLE),\n @Result(column=\"crotch_depth\", property=\"crotchDepth\", jdbcType=JdbcType.DOUBLE),\n @Result(column=\"leg_width\", property=\"legWidth\", jdbcType=JdbcType.DOUBLE),\n @Result(column=\"thigh\", property=\"thigh\", jdbcType=JdbcType.DOUBLE),\n @Result(column=\"lower_leg\", property=\"lowerLeg\", jdbcType=JdbcType.DOUBLE),\n @Result(column=\"height\", property=\"height\", jdbcType=JdbcType.DOUBLE),\n @Result(column=\"weight\", property=\"weight\", jdbcType=JdbcType.DOUBLE),\n @Result(column=\"body_shape\", property=\"bodyShape\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"stance\", property=\"stance\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"shoulder_shape\", property=\"shoulderShape\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"abdomen_shape\", property=\"abdomenShape\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"payment\", property=\"payment\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"invoice\", property=\"invoice\", jdbcType=JdbcType.VARCHAR)\n })\n ASuitMeasurement selectByPrimaryKey(@Param(\"userId\") Integer userId, @Param(\"measureDate\") Date measureDate);",
"@Select({\n \"select\",\n \"id_soggetto, codice_fiscale, id_asr, cognome, nome, data_nascita_str, comune_residenza_istat, \",\n \"comune_domicilio_istat, indirizzo_domicilio, telefono_recapito, data_nascita, \",\n \"asl_residenza, asl_domicilio, email, lat, lng, id_tipo_soggetto, id_soggetto_fk, utente_operazione, \",\n \"data_creazione, data_modifica, data_cancellazione, id_medico\",\n \"from soggetto_personale_scolastico\"\n })\n @Results({\n @Result(column=\"id_soggetto\", property=\"idSoggetto\", jdbcType=JdbcType.BIGINT, id=true),\n @Result(column=\"codice_fiscale\", property=\"codiceFiscale\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_asr\", property=\"idAsr\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"cognome\", property=\"cognome\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"nome\", property=\"nome\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"data_nascita_str\", property=\"dataNascitaStr\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"comune_residenza_istat\", property=\"comuneResidenzaIstat\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"comune_domicilio_istat\", property=\"comuneDomicilioIstat\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"indirizzo_domicilio\", property=\"indirizzoDomicilio\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"telefono_recapito\", property=\"telefonoRecapito\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"data_nascita\", property=\"dataNascita\", jdbcType=JdbcType.DATE),\n @Result(column=\"asl_residenza\", property=\"aslResidenza\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"asl_domicilio\", property=\"aslDomicilio\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"email\", property=\"email\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"lat\", property=\"lat\", jdbcType=JdbcType.NUMERIC),\n @Result(column=\"lng\", property=\"lng\", jdbcType=JdbcType.NUMERIC),\n @Result(column=\"id_tipo_soggetto\", property=\"idTipoSoggetto\", jdbcType=JdbcType.INTEGER),\n @Result(column = \"id_soggetto_fk\", property = \"idSoggettoFk\", jdbcType = JdbcType.BIGINT),\n @Result(column=\"utente_operazione\", property=\"utenteOperazione\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"data_creazione\", property=\"dataCreazione\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"data_modifica\", property=\"dataModifica\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"data_cancellazione\", property=\"dataCancellazione\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"id_medico\", property=\"idMedico\", jdbcType=JdbcType.BIGINT)\n })\n List<SoggettoPersonaleScolastico> selectAll();",
"@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}",
"@Component\npublic interface SysUserRoleMapper extends Mapper<SysUserRole> {\n @Select(\"select r.* from sys_role r, sys_user u, sys_user_role u_r where r.id = u_r.ROLE_ID and u_r.USER_ID = u.ID and u_r.IS_DELETE = 0 and u.ID = #{userId}\")\n List<SysRole> findSysRolesByUserId(String userId);\n\n @Select(\"select ROLE_ID from sys_user_role where IS_DELETE=0 and user_id=#{userID}\")\n List<String> findRolesByUserId(String userId);\n\n @Select(\"select r.`NAME` from sys_role r, sys_user u, sys_user_role u_r WHERE u.ID = u_r.USER_ID AND r.ID = u_r.ROLE_ID AND u_r.IS_DELETE=0 AND u.LOGIN_NAME = #{username}\")\n List<String> getSysRolesByUsername(String username);\n\n @Delete(\"update sys_user_role set IS_DELETE=1 where user_id=#{userId}\")\n void deleteByUserId(String userId);\n}",
"@Select({\n \"select\",\n \"courseid, code, name, teacher, credit, week, day_detail1, day_detail2, location, \",\n \"remaining, total, extra, index\",\n \"from generalcourseinformation\",\n \"where courseid = #{courseid,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"courseid\", property=\"courseid\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"code\", property=\"code\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"teacher\", property=\"teacher\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"credit\", property=\"credit\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"week\", property=\"week\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail1\", property=\"day_detail1\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail2\", property=\"day_detail2\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"location\", property=\"location\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"remaining\", property=\"remaining\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"total\", property=\"total\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"extra\", property=\"extra\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"index\", property=\"index\", jdbcType=JdbcType.INTEGER)\n })\n GeneralCourse selectByPrimaryKey(String courseid);",
"@Component\n@Mapper\npublic interface CreativeDao {\n String TABLE_NAME=\" ad_user \";\n String INSERT_FIELDS=\" name,type,material_type,height,width,size,duration,audit_status,\" +\n \"user_id,url,create_time,update_time \";\n String SELECT_FIELDS=\" id,\"+INSERT_FIELDS;\n @Insert({\"insert\",TABLE_NAME,\"(\",INSERT_FIELDS,\") values (name=#{name},type=#{type},material_type=#{materialType}\" +\n \",height=#{height},width=#{width),size=#{size},duration=#{duration},audit_status=#{audit_status},\" +\n \"user_id=#{user_id},url=#{url},create_time=#{create_time},update_time=#{update_time}\"})\n int insertCreative(Creative creative);\n @Select({\"select\",SELECT_FIELDS,\"from\",TABLE_NAME,\"where user_id=#{userId}\"})\n Creative selectCreativeByUserId(Long userId);\n @Select({\"select\",SELECT_FIELDS,\"from\",TABLE_NAME,\"where id=#{id}\"})\n Creative selectById(@Param(\"id\")Long id);\n default List<Creative> selectAllById(List<Long> ids){\n List<Creative> creatives=new ArrayList<>();\n for (Long id:ids) {\n creatives.add(selectById(id));\n }\n return creatives;\n }\n @Select({\"select\",SELECT_FIELDS,\"from\",TABLE_NAME})\n List<Creative> selectAll();\n}",
"public interface DemandSearchMapper {\n /**\n * 微信搜索\n */\n @Select(\"select count(1) from demands where demandcode like #{content} and isdelete=0 and releasestatus=1 and checkstatus='审核通过' \")\n int getWapSearchDemandCount(@Param(\"content\")String content);\n\n @Select(\"<script>\" +\n \" select * from demands where demandcode like #{content} and isdelete=0 and releasestatus=1 and checkstatus='审核通过' \" +\n \" order by id desc \" +\n \" <choose><when test='anchor==null or anchor==\\\"\\\"'>limit #{pageQuery.pagesize} offset #{pageQuery.indexNum}</when><otherwise>limit ${pageQuery.rowNum} offset 0</otherwise></choose>\" +\n \"</script>\")\n List<Demand> getWapSearchDemandList(@Param(\"content\")String content,\n @Param(\"pageQuery\") PageQueryParam param,\n @Param(\"anchor\") String scrtop);\n\n public default PageQueryParam getWapSearchDemandTotalList(String content, PageQueryParam param, String scrtop) {\n content = Where.$like$(content);\n int totalCount = getWapSearchDemandCount(content);\n List<Demand> demandList = getWapSearchDemandList(content, param, scrtop);\n int totalPage = totalCount / param.getPagesize();\n totalPage = totalCount % param.getPagesize() == 0 ? totalPage : totalPage + 1;\n param.setTotalCount(totalCount);\n param.setTotalPage(totalPage);\n param.setList(demandList);\n //如果有锚点,加载完数据,告诉前台当前是第几页\n if (org.apache.commons.lang3.StringUtils.isNotBlank(scrtop)) {\n param.setPage(param.getIndexNum() / param.getPagesize());\n }\n return param;\n }\n\n}",
"public interface SaleStoreDesignerMapper extends BaseMapperWithBLOBS<SaleStoreDesigner,SaleStoreDesignerWithBLOBs, Long, SaleStoreDesignerExample> {\n @Select(\"select id,name from sale_store_designer where delete_flag=0 and store_id=#{storeId}\")\n List<IdName> getSimpleListByStoreId(Long storeId);\n\n @Select(\"select id,name,portrait from sale_store_designer where id = #{id}\")\n IdNamePortrait getSimpleInfo(Long id);\n\n @Select(\"select id, store_id, name, head_img,portrait, intro, html_content from sale_store_designer where delete_flag=0 and id =#{id}\")\n DesignerInfoPage getInfo(Long id);\n\n @Select(\"select id,name,portrait from sale_store_designer where delete_flag=0\")\n List<SimpleDesigner> getSimpleList();\n\n @Select(\"select id,name,portrait from sale_store_designer where delete_flag=0 and store_id = #{storeId}\")\n List<SimpleDesigner> getSimpleListByStore(Long storeId);\n\n @Select(\"select d.id,d.name,d.portrait from sale_store_designer d left join sys_store s on s.id=d.store_id where d.delete_flag=0 and s.project_id = #{projectId}\")\n List<SimpleDesigner> getSimpleListByProject(Long projectId);\n\n}",
"@MapperScan\npublic interface DSSettingMapper {\n\n @Insert(\"INSERT INTO ds_setting (dsId, dsAppointment2,dsAppointment3,outCoachIds,status,modifyTime)\" +\n \" VALUES(#{dsId},#{dsAppointment2},#{dsAppointment3},#{outCoachIds},#{status},NOW())\")\n int insertDssetting(DSSetting dsSetting);\n\n @Update(\"UPDATE ds_setting SET dsAppointment2 = #{dsAppointment2},\" +\n \" dsAppointment3 = #{dsAppointment3}, outCoachIds = #{outCoachIds}, \" +\n \"status = #{status}, modifyTime = NOW() \" +\n \"WHERE dsId = #{dsId}\")\n int updateDssetting(DSSetting dsSetting);\n\n @Select(\"SELECT * FROM ds_setting WHERE dsId = #{dsId}\")\n DSSetting findOneDSSetting(@Param(\"dsId\") Long dsId);\n}",
"@Mapper\npublic interface ArticleDao {\n\n @Options(useGeneratedKeys = true)\n @Insert(\"insert into t_article(title,url) values(#{title},#{url})\" )\n void insert( Article article);\n\n @Update(\"update t_article set status = 1 where id = #{id}\" )\n void updateStatus(@Param(\"id\")Integer id);\n\n @Select(\"select * from t_article t where t.status = 0 or t.status is null limit 40\" )\n List<Article> selectByStatus();\n}",
"@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}",
"public interface UserShareActivityMapper {\n\n\n @Select(\"select count(1) from lh_share_activity_info WHERE random=#{random} AND share_user_tid=#{user_tid} AND extend_type=#{extend_type}\")\n public Integer checkSharelink(CreateShareLinkEvent event);\n\n @Insert(\"insert into lh_share_activity_info(share_user_tid,\" +\n \"random,extend_type,end_time,create_time) values(#{share_user_tid},#{random},#{extend_type},#{end_time},now())\")\n public void insertShareLink(UserShareInfo userShareInfo);\n}",
"public interface ActivityEnrollmentMapper {\n @Select(\"select status from activity_enrollment where userId=${userId} and activityId=${actId} limit 1\")\n public Integer getEnrollStatus(@Param(\"userId\") Integer userId, @Param(\"actId\") Integer actId);\n\n}",
"@MyBatisMapper\npublic interface RouteFilterDao {\n //for api\n public List<RouteFilter> listRouteFilter(int userId);\n\n public List<RouteFilter> listRouteFilterIncludeModelRoute(int userId);\n\n public List<RouteFilter> listFilterRoutes(int userId);\n\n public RouteFilter getFilterRoutesByFilterId(int userId, int filterId);\n\n //首页列表\n public int findTotalCount();\n\n public List<RouteFilter> listFilterByPage(int pageNo, int pageSize);\n\n //编辑\n public RouteFilter findOne(int filterId);\n\n //根据ID查找出分类同时带有模式\n public RouteFilter findOneWithModel(int filterId);\n\n //根据ID查找出分类同时带有控制器\n public RouteFilter findOneWithControl(int filterId);\n\n public List<Control> listControlByFilterId(int filterId);\n\n //保存\n public void addFilter(RouteFilter routeFilter);\n\n //删除\n public void deleteFilter(int filterId);\n\n //更新\n public void updateFilter(RouteFilter routeFilter);\n\n //根据名称查询\n public List<RouteFilter> findByName(String filterName, int pageNo, int pageSize);\n\n //保存分类模式对应关系\n public void saveFilterModel(Map<String, Object> gruMap);\n\n public void deleteModelFromFilterModelMapping(int groupID);\n\n //保存分类模式对应关系\n public void saveFilterControl(Map<String, Object> gruMap);\n\n public void deleteControlFromFilterControlMapping(int groupID);\n\n}",
"@Repository\npublic interface AddressDao {\n @Select(\"<script>\" +\n \" select provinceid,province \" +\n \" from provinces \" +\n \" where 1=1 \" +\n \" <if test=\\\"provinceid != null and provinceid != '' \\\">\" +\n \" and provinceid= #{provinceid} \" +\n \" </if>\" +\n \" <if test=\\\"province != null and province != '' \\\">\" +\n \" and province= #{province} \" +\n \" </if>\" +\n \"</script>\")\n List<Map<String, Object>> province(Map<String, Object> params);\n\n @Select(\"<script>\" +\n \" select cityid,city \" +\n \" from cities \" +\n \" where 1=1 \" +\n \" <if test=\\\"cityid != null and cityid != '' \\\">\" +\n \" and cityid= #{cityid} \" +\n \" </if>\" +\n \" <if test=\\\"city != null and city != '' \\\">\" +\n \" and city= #{city} \" +\n \" </if>\" +\n \" <if test=\\\"provinceid != null and provinceid != '' \\\">\" +\n \" and provinceid= #{provinceid} \" +\n \" </if>\" +\n \"</script>\")\n List<Map<String, Object>> city(Map<String, Object> params);\n\n @Select(\"<script>\" +\n \" select areaid,area \" +\n \" from areas \" +\n \" where 1=1 \" +\n \" <if test=\\\"areaid != null and areaid != '' \\\">\" +\n \" and areaid= #{areaid} \" +\n \" </if>\" +\n \" <if test=\\\"area != null and area != '' \\\">\" +\n \" and area= #{area} \" +\n \" </if>\" +\n \" <if test=\\\"cityid != null and cityid != '' \\\">\" +\n \" and cityid= #{cityid} \" +\n \" </if>\" +\n \"</script>\")\n List<Map<String, Object>> area(Map<String, Object> params);\n\n @Select(\"<script>\" +\n \" select provinceid,province \" +\n \" from provinces \" +\n \" where province= #{province} \" +\n \"</script>\")\n String getProvinceid(String province);\n\n @Select(\"<script>\" +\n \" select cityid,city \" +\n \" from cities \" +\n \" where city= #{city} \" +\n \"</script>\")\n String getCityid(String city);\n\n @Select(\"<script>\" +\n \" select areaid,area \" +\n \" from areas \" +\n \" where area= #{area} \" +\n \"</script>\")\n String getAreaid(String area);\n}",
"public interface EmployeeMapper extends BaseMapper<Employee> {\n\n @Override\n @Select(\"select * from employee\")\n List<Employee> findAll();\n\n @Override\n int save(Employee employee);\n}"
] |
[
"0.68924445",
"0.644766",
"0.6446459",
"0.6407602",
"0.6402186",
"0.63600945",
"0.62743396",
"0.62222123",
"0.6133197",
"0.6118093",
"0.6101474",
"0.60863227",
"0.6067665",
"0.6048755",
"0.6047952",
"0.60404813",
"0.60340196",
"0.60338086",
"0.6031036",
"0.60206074",
"0.60167783",
"0.600672",
"0.60053194",
"0.6003397",
"0.600273",
"0.5999953",
"0.599861",
"0.59890664",
"0.5983077",
"0.59817886",
"0.59774613",
"0.5969756",
"0.5965967",
"0.5954468",
"0.59321487",
"0.5928521",
"0.5889807",
"0.5889639",
"0.5877476",
"0.5868887",
"0.5865995",
"0.5865264",
"0.58587027",
"0.58572984",
"0.585658",
"0.5855907",
"0.58556926",
"0.5853747",
"0.5852648",
"0.58473486",
"0.58473235",
"0.58447903",
"0.584149",
"0.58377784",
"0.5836453",
"0.5833658",
"0.58264863",
"0.58217096",
"0.5819128",
"0.5815536",
"0.5808626",
"0.58082396",
"0.5801818",
"0.5799754",
"0.57962245",
"0.5795024",
"0.5794295",
"0.5790809",
"0.57730794",
"0.5770446",
"0.57682866",
"0.57666993",
"0.57630193",
"0.5759266",
"0.57582706",
"0.575705",
"0.5750696",
"0.5748782",
"0.57425314",
"0.57409763",
"0.57405156",
"0.5732827",
"0.5728796",
"0.57257545",
"0.5723916",
"0.57174873",
"0.5713391",
"0.570475",
"0.5690363",
"0.56901705",
"0.5689792",
"0.568467",
"0.5668476",
"0.5668468",
"0.566804",
"0.56669766",
"0.5659103",
"0.56579095",
"0.5655677",
"0.56525993",
"0.56498647"
] |
0.0
|
-1
|
String sql="insert into emp99(Name,Salary,Designation) values("+p.getName()+","+p.getSalary()+","+p.getDesignation()+")";
|
public Boolean save(Emp p){
String sql="insert into emp99(Name,Salary,Designation) values(?,?,?)";
return (Boolean) template.execute(sql, new PreparedStatementCallback<Boolean>() {
@Override
public Boolean doInPreparedStatement(PreparedStatement ps) throws SQLException, DataAccessException {
ps.setString(1, p.getName());
ps.setFloat(2, p.getSalary());
ps.setString(3, p.getDesignation());
return ps.execute();
}
});
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void addEmployee(employee emp){\n try {\n \n \n String insert =\"INSERT INTO JEREMY.EMPLOYEE (NAME, USERNAME, PASSWORD) VALUES \"\n + \"('\"+emp.name+\"','\"\n +emp.username+\"','\"\n +emp.password+\"')\";\n \n System.out.println(insert);\n \n empstmt.executeUpdate(insert);\n\n emprs = stmt.executeQuery(\"SELECT * FROM JEREMY.EMPLOYEE\");\n total();\n } catch (Exception e) {\n System.out.println(\"SQL problem dbEmployee Addmployee()\" + e);\n }\n \n }",
"int insert (EmpBean emp) throws ClassNotFoundException, SQLException {\n\t\t\n\tConnection con = DBUtil.getConnection();\n\tString sql= \"insert into empTab values(?,?,?)\";\n\tPreparedStatement ps = con.prepareStatement(sql);\n\tps.setString(1, emp.getEmpName());\n\tps.setString(2, emp.getEmpemailid());\n\tps.setInt(3, emp.getEmpphoneno());\n\t\n\n\treturn ps.executeUpdate(); //1 row inserted\n\t\n\t\n\t\n}",
"public void executeQuery() {\n\n \n String query=\"insert into Cost (Date,Employee_Cost,Selling,Inventory_Cost,Wastage) values ('\"+date+\"','\"+Employee_Amount+\"','\"+Sale_total_amount+\"','\"+Inventory_total_Cost+\"','\"+Wastage_Cost+\"')\";\n Connection con = DBconnect.connectdb();\n Statement st;\n\n try {\n st = con.createStatement();\n st.executeUpdate(query);\n\n \n } catch (Exception e) {\n // JOptionPane.showMessageDialog(null, e);\n\n }\n\n }",
"public void insertData() throws SQLException {\n pst=con.prepareStatement(\"insert into employee values(?,?,?)\");\n System.out.println(\"Enter id: \");\n int id=sc.nextInt();\n pst.setInt(1,id);\n System.out.println(\"Enter Name: \");\n String name=sc.next();\n pst.setString(2,name);\n System.out.println(\"Enter city: \");\n String city=sc.next();\n pst.setString(3,city);\n pst.execute();\n System.out.println(\"Data inserted successfully\");\n }",
"private String createInsertQuery() {\r\n StringBuilder query = new StringBuilder();\r\n query.append(\"insert into \").append(m_tableName)\r\n .append(\"(\").append(m_propertyNames[0]);\r\n for (int i = 1; i < m_propertyNames.length; i++) {\r\n query.append(\",\").append(m_propertyNames[i]);\r\n }\r\n query.append(\") values (?\");\r\n for (int i = 1; i < m_propertyNames.length; i++) {\r\n query.append(\",?\");\r\n }\r\n query.append(\")\");\r\n return query.toString();\r\n }",
"public void insertBillFood(Bill billFood) {\nString sql = \"INSERT INTO bills ( Id_food, Id_drink, Id_employees, Price, Serial_Number_Bill, TOTAL ) VALUES (?,?,?,?,?,?)\";\n \ntry {\n\tPreparedStatement ps = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t \n\t\n\t\tps.setInt(1, billFood.getIdF());\n\t\tps.setString(2,null);\n\t ps.setInt(3, billFood.getIdE());\n\t\tps.setDouble(4, billFood.getPrice());\n\t\tps.setString(5, billFood.getSerialNumber());\n\t\tps.setDouble(6, billFood.getTotal());\n\t\tps.execute();\n\t\t\n\t\n\t \n} catch (SQLException e) {\n\t// TODO Auto-generated catch block\n\te.printStackTrace();\n}\n\n\t\n\t\n}",
"public void Last_Day_Salary_save(){\n String salseQuery=\"insert into Salary_summery (Date,Amount,No_of_Employees) values('\"+date+\"','\"+Employee_Amount+\"','\"+Salary_No_of_Emp+\"')\";\n executeQuery_Other(salseQuery);\n }",
"private String createInsertQuery()\n {\n int i = 0;\n StringBuilder sb = new StringBuilder();\n sb.append(\"INSERT INTO \");\n sb.append(type.getSimpleName());\n sb.append(\" (\");\n for(Field field:type.getDeclaredFields()) {i++; if(i != type.getDeclaredFields().length)sb.append(field.getName() +\", \"); else sb.append(field.getName());}\n sb.append(\")\");\n sb.append(\" VALUES (\");\n i = 0;\n for(Field field:type.getDeclaredFields()) {i++; if(i!= type.getDeclaredFields().length)sb.append(\"?, \"); else sb.append(\"?\");}\n sb.append(\");\");\n return sb.toString();\n }",
"public String toInsert() {\r\n return \"(null,'\"+ ref + \"','\" + name + \"','\" + tel + \"','\" + address + \"')\";\r\n }",
"public void insertPrisoners (String fname,String sname,String ag,String crime,String pisid){\r\n String q=\"INSERT INTO prisoners(Firstname,Secondname,Age,Crime,Prisonerid)VALUES (?,?,?,?,?)\";\r\n \r\n \r\n try{\r\n int k=0;\r\n PreparedStatement st=getConnection().prepareStatement(q);\r\n st.setString(1,fname);\r\n st.setString(2,sname);\r\n st.setString(3,ag);\r\n st.setString(4,crime);\r\n st.setString(5,pisid);\r\n \r\n if(st.executeUpdate()>k){\r\n JOptionPane.showMessageDialog(null,pisid+\"registered susccessfully\");\r\n }\r\n }\r\n \r\n catch(SQLException x){\r\n JOptionPane.showMessageDialog(null, x.getMessage());\r\n}\r\n }",
"public static void main(String[] args) throws SQLException {\n\t\tConnection myConn = getConnection();\n\t\tStatement stmt = myConn.createStatement();\n\t\t//String insertQuery = \"INSERT INTO EmployeeDetails VALUES ('6666','Bruce',24,'SE')\";\n\t\tString insertQuery = \"INSERT INTO EmployeeDetails VALUES(\"+\n\t\t\t\t \"'\"+\"6666\"+\"',\"+\n\t\t\t\t \"'\"+\"BOSS\"+\"',\"+\n\t\t\t\t \t 24+\",\"+\n\t\t\t\t \"'\"+\"SE\"+\"')\";\n\t\t\n\t\tstmt.executeUpdate(insertQuery);\n\n\t\tSystem.out.println(\"Data insersted\");\n\t\t\n\t}",
"public void insertBillDrink(Bill billDrink) {\n\tString sql = \"INSERT INTO bills ( Id_food, Id_drink, Id_employees, Price, Serial_Number_Bill, TOTAL ) VALUES (?,?,?,?,?,?)\";\n\n\ttry {\n\t\tPreparedStatement ps = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\t\tps.setString(1, null);\n\t\t\tps.setInt(2, billDrink.getIdD());\n\t\t ps.setInt(3, billDrink.getIdE());\n\t\t\tps.setDouble(4, billDrink.getPrice());\n\t\t\tps.setString(5, billDrink.getSerialNumber());\n\t\t\tps.setDouble(6, billDrink.getTotal());\n\t\t\tps.execute();\n\t\t \n\t\t \n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t\n}\n\t\n}",
"public static void Enitityinsert (int id,String name,String FQN, String container,int potincy,String directtype,String table )\n { \n \n \ttry \n { \n Statement stmt=null; \n ResultSet res=null; \n Class.forName(\"com.mysql.jdbc.Driver\"); \n Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n stmt = (Statement)conn.createStatement(); \n res= stmt.executeQuery(\"SELECT * from entity \"); \n\n\n // 增加数据\n Statement stm = (Statement) conn.createStatement();// 提交查巡\n String sql = \"select * from entity\";\n ResultSet rs = stm.executeQuery(sql);// 取得查巡結果\n// sql = \"insert into entity (id,name,FQN,container) values ('6','AccountType','Example2.O2.AccountType','Example2.O10')\";\n \n int n = stm.executeUpdate(\"insert into \"+table+\"(id,FQN,name,container,potincy,direct_type) values (\"+\"'\"+id+\"'\"+\",\"+\"'\"+FQN+\"'\"+\",\"+\"'\"+name+\"'\"+\",\"+\"'\"+container+\"'\"+\",\"+\"'\"+potincy+\"'\"+\",\"+\"'\"+directtype+\"'\"+\")\"); // 增加数据 \n if (n > 0) {\n// JOptionPane.showMessageDialog(null, \"成功\");\n \n \n } else {\n// JOptionPane.showMessageDialog(null, \"失败\");\n }\n //增加数据结束\n\n while (res.next()) \n { \n\n } \n } \n \n catch(Exception ex) \n { \n ex.printStackTrace(); \n } \n}",
"public String getInsertSQL()\n\t{\n\t\tString fieldList = \"parametro, dia, valor\";\n\t\treturn String.format(\"insert into alteracs (%s) values (%d, %d, %s)\",\n\t\t\t\tfieldList, parametro, dia, String.format(\"%.3f\", valor).replace(',', '.'));\n\t}",
"public static int insert(Booking b)\n {\n Connection con = MyConnection.connect();\n int row_insert = 0;\n try\n {\n // Qry 1 -> Patient Booking\n String qry1 = \"insert into patient(name,phone,dob,problem) values(?,?,?,?)\";\n PreparedStatement stmt = con.prepareStatement(qry1);//query getting pre-compile\n //setting column values in student table\n \n stmt.setString(1,b.getName());\n stmt.setInt(2,b.getPhone());\n \n stmt.setString(3, b.getDob());\n stmt.setString(4, b.getProblem());\n \n row_insert = stmt.executeUpdate();\n }//try ends\n catch(Exception ex)\n {\n System.out.println(\"Insert error :\"+ex);//print error on server logs\n }//catch ends\n return row_insert;\n }",
"@Insert({\n \"insert into dept (id, dept_name)\",\n \"values (#{id,jdbcType=INTEGER}, #{deptName,jdbcType=VARCHAR})\"\n })\n int insert(Dept record);",
"public void add (String frist_name, String lastName, String nationality, \n int age, Date commingDate, Date checkOutDate){\n \n String insertTransaction = \"INSERT INTO customer \"+\n \"(First_name, Last_name, nationality, age, coming_date, check_out_date) \"\n +\"values ('\"+frist_name+\"','\"+lastName+\"','\"\n +nationality+\"',\"+age+\",'\"+\n commingDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate().plusDays(2)+\n \"', '\"+checkOutDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate().plusDays(2)+\"')\";\n try {\n statement.executeUpdate(insertTransaction);//insert into the DB\n } catch (SQLException ex) {\n ex.printStackTrace();\n }finally{\n setQuery(DEFUALT_QUERY);\n }\n }",
"public String insertSelective(Emp record) {\n BEGIN();\n INSERT_INTO(\"emp\");\n \n if (record.getId() != null) {\n VALUES(\"id\", \"#{id,jdbcType=INTEGER}\");\n }\n \n if (record.getName() != null) {\n VALUES(\"name\", \"#{name,jdbcType=VARCHAR}\");\n }\n \n if (record.getSex() != null) {\n VALUES(\"sex\", \"#{sex,jdbcType=CHAR}\");\n }\n \n if (record.getJob() != null) {\n VALUES(\"job\", \"#{job,jdbcType=VARCHAR}\");\n }\n \n if (record.getSalary() != null) {\n VALUES(\"salary\", \"#{salary,jdbcType=DECIMAL}\");\n }\n \n if (record.getHiredate() != null) {\n VALUES(\"hiredate\", \"#{hiredate,jdbcType=DATE}\");\n }\n \n if (record.getDeptno() != null) {\n VALUES(\"deptno\", \"#{deptno,jdbcType=INTEGER}\");\n }\n \n return SQL();\n }",
"private void submitActionPerformed(java.awt.event.ActionEvent evt) {\n try {\n\n Class.forName(\"oracle.jdbc.driver.OracleDriver\");\n Connection connection = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:orcl\", \"batman\", \"54928\");\n String query = \"insert into COMPANY_DETAILS(COMPANY_NAME,COMPANY_ID)VALUES(?,?)\";\n PreparedStatement pst;\n pst = connection.prepareStatement(query);\n pst.setString(1, compname.getText());\n pst.setString(2, compid.getText());\n \n \n pst.executeUpdate();\n JOptionPane.showMessageDialog(null, \"inserted successfully\");\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n\n } // TODO add your h\n showTableData();\n \n }",
"public int insert(person p){\n\t\t\treturn j.update(\" insert into person (id,name,location,birthdate) \"+ \" values(?,?,?,?) \", new Object[] {p.getId(),p.getName(),p.getLocation(),new Timestamp(p.getDate().getTime())});\r\n\t\t\r\n\t}",
"public static void addStudent(Student student) throws SQLException {\r\n\t String sql = \" INSERT INTO Studentspring VALUES (?,?,?,?,?)\";\r\n\t PreparedStatement pStmt = con.prepareStatement(sql);\r\n\r\n\t String Name=student.getName();\r\n\t int Age=student.getAge();\r\n\t String Course=student.getCourse();\r\n\t int Year=student.getYear();\r\n\t String Section=student.getSection();\r\n\t \r\n\t pStmt.setString(1, Name);\r\n\t pStmt.setInt(2,Age);\r\n\t pStmt.setString(3,Course);\r\n\t pStmt.setInt(4,Year );\r\n\t pStmt.setString(5,Section);\r\n\r\n\t pStmt.executeUpdate();\r\n\t \r\n\t }",
"public void addStaff(String name, String dob, String email, String number, String address, String password) throws SQLException { //code for add-operation \n st.executeUpdate(\"INSERT INTO IOTBAY.STAFF \" + \"VALUES ('\" \n + name + \"', '\" + dob + \"', '\" \n + email + \"', '\" + number+ \"', '\" \n + address + \"', '\" + password + \"')\");\n\n }",
"protected String queryInsert() {\n StringBuilder sb = new StringBuilder(\"INSERT INTO \");\n sb.append(tabla).append(\" (\").append(String.join(\",\", campos)).append(\") VALUES (\");\n\n for (int i = 0; i < campos.length; i++) {\n if (i == campos.length -1) {\n sb.append(\"?)\");\n break;\n }\n sb.append(\"?,\");\n }\n\n return sb.toString();\n }",
"int insertp(Publisher p){\r\n String pu = \"INSERT INTO publisher(publisher_id,publisher_name) VALUES(?,?);\";\r\n int res=0;\r\n try {\r\n PreparedStatement statement = this.connection.prepareStatement(pu);\r\n statement.setInt(1, p.getPublisher_id());\r\n statement.setString(2, p.getPublisher_name());\r\n res = statement.executeUpdate();\r\n statement.close(); //close\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n return res;\r\n }",
"public static void insertEmployees() {\n Connection con = getConnection();\n\n String insertString1, insertString2, insertString3, insertString4;\n insertString1 = \"insert into Employees values(6323, 'Hemanth')\";\n insertString2 = \"insert into Employees values(5768, 'Bob')\";\n insertString3 = \"insert into Employees values(1234, 'Shawn')\";\n insertString4 = \"insert into Employees values(5678, 'Michaels')\";\n\n try {\n stmt = con.createStatement();\n stmt.executeUpdate(insertString1);\n stmt.executeUpdate(insertString2);\n stmt.executeUpdate(insertString3);\n stmt.executeUpdate(insertString4);\n\n stmt.close();\n con.close();\n\n } catch (SQLException ex) {\n System.err.println(\"SQLException: \" + ex.getMessage());\n }\n JOptionPane.showMessageDialog(null, \"Data Inserted into Employees Table\");\n }",
"public void addPatient(Patient P)\r\n {\r\n\t int age =0;\r\n\t String secQ =\"What is your favorite food?\";\r\n\t String newPat = \"INSERT INTO PATIENTDATA (FIRSTNAME,LASTNAME,AGE,USERNAME,PASSWORD,SECURITYQN,SECURITYANS,\"+\r\n\t\t\t \t\t \"SYMPTOM1,SYMPTOM2,SYMPTOM3,SYMPTOM4,SYMPTOM5,SYMPTOM6,SYMPTOM7,\"+\r\n \t\t\t\t\t\"PrevSYMPTOM1_1,PrevSYMPTOM1_2,PrevSYMPTOM1_3,PrevSYMPTOM1_4,PrevSYMPTOM1_5,PrevSYMPTOM1_6,PrevSYMPTOM1_7,\"+\r\n \t\t\t\t\t\"PrevSYMPTOM2_1,PrevSYMPTOM2_2,PrevSYMPTOM2_3,PrevSYMPTOM2_4,PrevSYMPTOM2_5,PrevSYMPTOM2_6,PrevSYMPTOM2_7,\"+\r\n\t\t\t \t\t \"SYMPTOM1Thresh,SYMPTOM2Thresh,SYMPTOM3Thresh,SYMPTOM4Thresh,SYMPTOM5Thresh,SYMPTOM6Thresh,SYMPTOM7Thresh, DOCTORSNAME, NOTIFICATION ) \"; //added notification\r\n\t newPat = newPat+\"VALUES ('\"+P.firstName+\"', '\"+P.lastName+\"', \"+age+\", '\"+P.userName+\"', '\"+P.password+\"', '\"+secQ+\"', '\"+P.securityQuestionAnswer+\"',\"\r\n\t\t\t \t\t +P.getEnterSymptomLevel()[0]+\",\"+P.getEnterSymptomLevel()[1]+\",\"+P.getEnterSymptomLevel()[2]+\",\"+P.getEnterSymptomLevel()[3]+\",\"+P.getEnterSymptomLevel()[4]+\",\"+P.getEnterSymptomLevel()[5]+\",\"+P.getEnterSymptomLevel()[6]+\r\n\t\t\t \t\t\t\",\" +P.getPreviousSymptomLevel1()[0]+\",\"+P.getPreviousSymptomLevel1()[1]+\",\"+P.getPreviousSymptomLevel1()[2]+\",\"+P.getPreviousSymptomLevel1()[3]+\",\"+P.getPreviousSymptomLevel1()[4]+\",\"+P.getPreviousSymptomLevel1()[5]+\",\"+P.getPreviousSymptomLevel1()[6]+\",\"\r\n\t\t\t \t\t\t+P.getPreviousSymptomLevel2()[0]+\",\"+P.getPreviousSymptomLevel2()[1]+\",\"+P.getPreviousSymptomLevel2()[2]+\",\"+P.getPreviousSymptomLevel2()[3]+\",\"+P.getPreviousSymptomLevel2()[4]+\",\"+P.getPreviousSymptomLevel2()[5]+\",\"+P.getPreviousSymptomLevel2()[6]+\",\"\r\n\t\t\t \t\t\t+P.getSymptomsThreshold()[0]+\",\"+P.getSymptomsThreshold()[1]+\",\"+P.getSymptomsThreshold()[2]+\",\"+P.getSymptomsThreshold()[3]+\",\"+P.getSymptomsThreshold()[4]+\",\"+P.getSymptomsThreshold()[5]+\",\"+P.getSymptomsThreshold()[6]+\",'\"+P.getPatientsDoctor()+\"',0);\";\r\n\t \r\n\t try {\r\n\t\tstmt.executeUpdate(newPat);\r\n\t} catch (SQLException e) {\r\n\t\t\r\n\t\te.printStackTrace();\r\n\t}\r\n }",
"public void addDoctor(String name, String lastname, String userName, String pass, String secAns)\r\n {\r\n\t try{\r\n\t\t // command to Insert is called with parameters\r\n\t String command = \"INSERT INTO DOCTORDATA (FIRSTNAME,LASTNAME,USERNAME,PASSWORD,SECURITYQN,SECURITYANS)\"+\r\n\t\t\t \"VALUES ('\"+name+\"', '\"+lastname+\"', '\"+userName+\"', '\"+pass+\"', '\"+\"What is Your favorite food?\"+\"', '\"+secAns+\"');\";\r\n\t stmt.executeUpdate(command);\r\n\t \r\n\t \r\n\t } catch (SQLException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t}\r\n\t \r\n }",
"public void createGrade(String name,int year, String subject, String assessment, String achievement,String knowledge,String skill){\n try{\n String query = \"INSERT INTO `coitdatabase`.`grade` (`studentName`, `stuYear`, `subjectName`, `asseName`, `grade`, `knowledge`, `skill`) VALUES ('\"+name+\"', '\"+year+\"', '\"+subject+\"', '\"+assessment+\"', '\"+achievement+\"', '\"+knowledge+\"', '\"+skill+\"');\";\n st.executeUpdate(query);\n }catch(Exception ex){\n System.out.println(\"Error in create grade \"+ ex);\n }\n }",
"@Override\n\tpublic boolean insert() {\n\t\tif(num==null||name==null||email==null||phone==null||project==0||school==0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tString format=\"INSERT INTO tc_student(num,name,email,phone,degree,project,school,is_cap) values ('%s','%s','%s','%s',%d,%d,%d,%d)\";\n\t\tString sql=String.format(format, num,name,email,phone,degree,project,school,is_cap);\n\t\t//System.out.println(sql);\n\t\treturn mysql.execute(sql);\n\t\t}",
"public int Trans1(Long userid,Long amount,Double price,Double comp_id)throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"Insert into transaction values(trans_seq.nextval,\"+userid+\",sysdate,\"+amount+\",'sale','self',\"+comp_id+\",\"+price+\")\");\r\n\treturn i;\r\n}",
"public void complainAdd(String uName,String cm_type, String uCom,String userEmail,String UserTp){\n\n conn = con.connectTODB();\n\n try {\n String insert = \"INSERT INTO complain(u_name,c_type,u_complain,u_email,u_tp) VALUES('\"+uName+\"','\"+cm_type+\"','\"+uCom+\"','\"+userEmail+\"','\"+UserTp+\"')\";\n Statement RegisterUser = conn.createStatement();\n RegisterUser.execute(insert);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n\n }",
"public int insertData(Employee employee) {\n\t\ttry {\n\t\t\tString query = \"insert into employeedbaddress values(?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n\t\t\tPreparedStatement ps = connection.prepareStatement(query);\n\t\t\tps.setInt(1, employee.getEno());\n\t\t\tps.setString(2, employee.getEname());\n\t\t\tps.setString(3, employee.getEdesignation());\n\t\t\tps.setString(4, employee.getEgender());\n\t\t\tps.setDouble(5, employee.getEsalary());\n\t\t\tps.setString(6, employee.getEusername());\n\t\t\tps.setString(7, employee.getEpassword());\n\t\t\tps.setString(8, employee.getStreet());\n\t\t\tps.setString(9, employee.getCity());\n\t\t\tps.setString(10, employee.getState());\n\t\t\tps.setInt(11, employee.getPincode());\n\t\t\tps.setString(12, employee.getContact());\n\t\t\tps.setString(13, employee.getEmail());\n\t\t\tresult = ps.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}",
"private void addEmployee() {\n String name = editTextName.getText().toString().trim();\n String salary = editTextSalary.getText().toString().trim();\n String dept = spinnerDepartment.getSelectedItem().toString();\n\n //getting the current time for joining date\n Calendar cal = Calendar.getInstance();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yy-mm-dd hh:mm:ss\");\n String joiningDate = sdf.format(cal.getTime());\n\n //validating the inputs\n if (inputsAreCorrect(name, salary)) {\n\n String insertSQL = \"INSERT INTO employees \\n\" +\n \"(name, department, joiningdate, salary)\\n\" +\n \"VALUES \\n\" +\n \"(?, ?, ?, ?);\";\n\n /*\n using the same method execsql for inserting values\n this time it has two parameters\n first is the sql string and second is the parameters that is to be binded with\n the query\n */\n mDatabase.execSQL(insertSQL, new String[]{name, dept, joiningDate, salary});\n\n Toast.makeText(this, \"Employee Added Successfully\", Toast.LENGTH_SHORT).show();\n }\n }",
"public void insertEmp(Emp emp) {\n\t\t\n\t}",
"public void AddToStudent(){\n\n try {\n\n String addDataSQL = \"INSERT INTO \" + STUDENT_TABLE_NAME + \"(\" + STUDENT_FIRST_COLUMN + \", \" + STUDENT_LAST_COLUMN + \", \" + STUDENT_PHONE_COLUMN + \")\" + \" VALUES ('Margaret', 'Elkins', '555-555-1212')\";\n ConnectDB.statement.executeUpdate(addDataSQL);\n addDataSQL = \"INSERT INTO \" + STUDENT_TABLE_NAME + \"(\" + STUDENT_FIRST_COLUMN + \", \" + STUDENT_LAST_COLUMN +\", \" + STUDENT_PHONE_COLUMN + \")\" + \" VALUES ('Scott', 'Sivad', '555-555-1313')\";\n ConnectDB.statement.executeUpdate(addDataSQL);\n addDataSQL = \"INSERT INTO \" + STUDENT_TABLE_NAME + \"(\" + STUDENT_FIRST_COLUMN + \", \" + STUDENT_LAST_COLUMN +\", \" + STUDENT_PHONE_COLUMN + \")\" + \" VALUES ('Sarah', 'Kwabi', '555-555-1414')\";\n ConnectDB.statement.executeUpdate(addDataSQL);\n addDataSQL = \"INSERT INTO \" + STUDENT_TABLE_NAME + \"(\" + STUDENT_FIRST_COLUMN + \", \" + STUDENT_LAST_COLUMN +\", \" + STUDENT_PHONE_COLUMN + \")\" + \" VALUES ('Caleb', 'Mohammad', '555-555-1515')\";\n ConnectDB.statement.executeUpdate(addDataSQL);\n }\n catch (SQLException se){\n System.out.println(se);\n se.printStackTrace();\n }\n }",
"public int insert_school_details(Add_School_Bean asb)\n\t{\n\t\t\n\t\n\t\t\n\t\tSystem.out.println(\"%%%%%%%%%%%%%%% before insert query %%%%%%%%%%%%%\");\n\t\t \n\t\tint i=0;\n\t\tint s1=0;\n\t\ttry\n\t\t{\n\t\t\n\t\t\tStatement sql=con.createStatement();\n\t\t\tSystem.out.println(\"Select society id\");\n\t\t\tResultSet rs = sql.executeQuery(\"select society_id from society_master\");\n\t\t\n\t\t\t\n\t\t\tint k=0;\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tk=rs.getInt(1);\n\t\t\t\tSystem.out.println(\"Society id,,,,,,,,,,,,,,,,,,:\"+k);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"$$$$$$$ inside try $$$$$$$$$$\");\n\t\t\tPreparedStatement ps=con.prepareStatement(\"insert into school_master(society_id,School_Name,School_Registration_Num,School_Registration_Year,School_Email,School_Pincode,School_Area,School_City,School_State,School_Telephone,School_Mobile)values(?,?,?,?,?,?,?,?,?,?,?)\");\n\t\t\n\t\t\t\n\t\t\tAdd_Society_Bean ASB=new Add_Society_Bean();\n\t\t\t\n\t\t\n\t\t\t\n\t\t\tString st = asb.getSchool_name();\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"^^^^^^^^^^^^^^SCHOOL NAME^^^^^^^^^^^\"+st);\n\t\t\tps.setInt(1, k);\n\t\t\t\n\t\t\tps.setString(2, st);\n\t\t\tps.setLong(3,asb.getSchool_registartion_number());\n\t\t\tps.setString(4,asb.getSchool_registration_year());\n\t\t\tps.setString(5,asb.getSchool_email());\n\t\t\tps.setInt(6, asb.getSchool_pincode());\n\t\t\tps.setString(7,asb.getSchool_area());\n\t\t\tps.setString(8,asb.getSchool_city());\n\t\t\tps.setString(9, asb.getSchool_state());\n\t\t\tps.setLong(10,asb.getSchool_telephone());\n\t\t\tps.setLong(11,asb.getSchool_mobile());\n\t\t\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"print all\");\n\t\t\t\n\t\t\t s1=ps.executeUpdate();\n\t\t\t\n\t\t\tStatement s = con.createStatement();\n\t\t\tResultSet rs1 = s.executeQuery(\"select School_Id from school_master\");\n\t\t\twhile(rs1.next())\n\t\t\t{\n\t\t\t\tAdd_School_Bean b = new Add_School_Bean();\n\t\t\t\ti=rs1.getInt(1);\n\t\t\t\tb.setId(i);\n\t\t\t\tSystem.out.println(\"issssssss:\"+i);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"print all\");\t\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\tSystem.out.println(\"in catch\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\n\t\t\treturn i;\n\t\n\t}",
"public static void Participationinsert( int id,String name,String FQN,String container,int participant_id,String lower,String upper,\n\t\t String row_name,String whole,String generalConnection,String table)\n\t { \n\t \n\t \ttry \n\t { \n\t Statement stmt=null; \n\t ResultSet res=null; \n\t Class.forName(\"com.mysql.jdbc.Driver\"); \n\t Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n\t stmt = (Statement)conn.createStatement(); \n\t res= stmt.executeQuery(\"SELECT * from participation \"); \n\n\n\t // 增加数据\n\t Statement stm = (Statement) conn.createStatement();// 提交查巡\n\t String sql = \"select * from participation\";\n\t ResultSet rs = stm.executeQuery(sql);// 取得查巡結果\n//\t sql = \"insert into entity (id,name,FQN,container) values ('6','AccountType','Example2.O2.AccountType','Example2.O10')\";\n\t \n\t int n = stm.executeUpdate(\"insert into \"+table+\"( id,name,FQN,container,participant_id,lower,upper,row_name,whole,generalConnection) values (\"+\"'\"+id+\"'\"+\",\"+\"'\"+name+\"'\"+\",\"+\"'\"+FQN+\"'\"+\",\"+\"'\"+container+\"'\"\n\t +\",\"+\"'\"+participant_id+\"'\"+\",\"+\"'\"+lower+\"'\"+\",\"+\"'\"+upper+\"'\"+\",\"+\"'\"+row_name+\"'\"+\",\"+\"'\"+whole+\"'\"+\",\"+\"'\"+generalConnection+\"'\"+\")\"); // 增加数据 \n\t if (n > 0) {\n//\t JOptionPane.showMessageDialog(null, \"成功\");\n\t \n\t \n\t } else {\n//\t JOptionPane.showMessageDialog(null, \"失败\");\n\t }\n\t //增加数据结束\n\n\t while (res.next()) \n\t { \n\t \n\t } \n\t } \n\t \n\t catch(Exception ex) \n\t { \n\t ex.printStackTrace(); \n\t } \n\t}",
"public boolean insertIntoDB(String name, String id,String quantity,String price){\n\n Statement statement= null;\n\n // build the string, add ' ;\n StringBuilder nameBuild= new StringBuilder(name);\n nameBuild.insert(0,\"'\");\n nameBuild.insert(nameBuild.length(),\"'\");\n\n StringBuilder idBuild= new StringBuilder(id);\n idBuild.insert(0,\"'\");\n idBuild.insert(idBuild.length(),\"'\");\n\n StringBuilder quantityBuild= new StringBuilder(quantity);\n quantityBuild.insert(0,\"'\");\n quantityBuild.insert(quantityBuild.length(),\"'\");\n\n StringBuilder priceBuild= new StringBuilder(price);\n priceBuild.insert(0,\"'\");\n priceBuild.insert(priceBuild.length(),\"'\");\n\n\n try{\n statement= connection.createStatement();\n\n statement.execute(\"INSERT into \"+TABLE_GOODS+\"(name,id,quantity,price) values(\"+nameBuild+\",\"+\n idBuild+\",\"+quantityBuild+\",\"+priceBuild+\")\");\n\n return true;\n\n }catch(SQLException e){\n System.out.println(\"Query Failed \"+e.getMessage());\n\n return false;\n }finally{\n\n if(statement!=null)\n try {\n statement.close();\n } catch (SQLException e) {\n System.out.println(\"Couldn't close Statement!\");\n e.printStackTrace();\n }\n }\n }",
"public void insertPatient(Patient p) {\n String query = \"INSERT INTO PATIENTS(patient_id, name, gender, birth, dpi, phone, weight, blood, email, password) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n try (PreparedStatement pst = this.transaction.prepareStatement(query)) {\n pst.setInt(1, p.getPatientId());\n pst.setString(2, p.getName());\n pst.setBoolean(3, p.isGender());\n pst.setDate(4, p.getBirth());\n pst.setString(5, p.getDpi());\n pst.setString(6, p.getPhone());\n pst.setDouble(7, p.getWeight());\n pst.setString(8, p.getBlood());\n pst.setString(9, p.getEmail());\n pst.setString(10, p.getPass());\n pst.executeUpdate();\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n }\n }",
"public void addCustomer(int Id, String name, String dob, String gender, String number, String email, String address, String password, Boolean promo, Integer reward, Boolean reg) throws SQLException { //code for add-operation \n st.executeUpdate(\"INSERT INTO IOTBAY.CUSTOMER \" + \"VALUES ('\" \n + Id + \"','\" + name + \"', '\" + dob + \"', '\" \n + gender + \"', '\" + number + \"', '\" \n + email + \"', '\" + address + \"', '\" \n + password + \"', '\" + promo + \"', '\"+ reward + \"', '\"+ reg \n + \"')\");\n\n }",
"public static void Attributeinsert (int id,String FQN,String name, String container,String duribility,String type,String value,String mutability,String table )\n { \n \n \ttry \n { \n Statement stmt=null; \n ResultSet res=null; \n Class.forName(\"com.mysql.jdbc.Driver\"); \n Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n stmt = (Statement)conn.createStatement(); \n res= stmt.executeQuery(\"SELECT * from attribute \"); \n\n\n // 增加数据\n Statement stm = (Statement) conn.createStatement();// 提交查巡\n String sql = \"select * from attribute\";\n ResultSet rs = stm.executeQuery(sql);// 取得查巡結果\n// sql = \"insert into entity (id,name,FQN,container) values ('6','AccountType','Example2.O2.AccountType','Example2.O10')\";\n \n int n = stm.executeUpdate(\"insert into \"+table+\"(id,FQN,name, container,duribility,type,value,mutability) values (\"+\"'\"+id+\"'\"+\",\"+\"'\"+FQN+\"'\"+\",\"+\"'\"+name+\"'\"+\",\"+\"'\"+container+\"'\"\n +\",\"+\"'\"+duribility+\"'\"+\",\"+\"'\"+type+\"'\"+\",\"+\"'\"+value+\"'\"+\",\"+\"'\"+mutability+\"'\"+\")\"); // 增加数据 \n if (n > 0) {\n// JOptionPane.showMessageDialog(null, \"成功\");\n \n \n } else {\n// JOptionPane.showMessageDialog(null, \"失败\");\n }\n //增加数据结束\n\n while (res.next()) \n { \n \n } \n } \n \n catch(Exception ex) \n { \n ex.printStackTrace(); \n } \n}",
"@Insert({\n \"insert into PURCHASE (ID, SDATE, \",\n \"STYPE, SMONEY, TOUCHING, \",\n \"ACCOUNT, CHECKSTATUS, \",\n \"DEMO1, DEMO2, DEMO3)\",\n \"values (#{id,jdbcType=DECIMAL}, #{sdate,jdbcType=TIMESTAMP}, \",\n \"#{stype,jdbcType=VARCHAR}, #{smoney,jdbcType=DECIMAL}, #{touching,jdbcType=VARCHAR}, \",\n \"#{account,jdbcType=VARCHAR}, #{checkstatus,jdbcType=DECIMAL}, \",\n \"#{demo1,jdbcType=DECIMAL}, #{demo2,jdbcType=VARCHAR}, #{demo3,jdbcType=DECIMAL})\"\n })\n int insert(Purchase record);",
"public void insert() {\n String sqlquery = \"insert into SCORE (NICKNAME, LEVELS,HIGHSCORE, NUMBERKILL) values(?, ?, ?,?)\";\n try {\n ps = connect.prepareStatement(sqlquery);\n ps.setString(1, this.nickname);\n ps.setInt(2, this.level);\n ps.setInt(3, this.highscore);\n ps.setInt(4, this.numofKill);\n ps.executeUpdate();\n //JOptionPane.showMessageDialog(null, \"Saved\", \"Insert Successfully\", JOptionPane.INFORMATION_MESSAGE);\n System.out.println(\"Insert Successfully!\");\n ps.close();\n connect.close();\n } catch (Exception e) {\n e.printStackTrace();\n JOptionPane.showMessageDialog(null, e.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n\n }",
"public void insertarEmpleado(CLEmpleado cl) throws SQLException{\r\n String sql = \"{CALL sp_insertarEmpleado(?,?,?,?,?,?,?,?)}\";\r\n \r\n try{\r\n ps = cn.prepareCall(sql);\r\n ps.setString(1, cl.getPrimerNombre());\r\n ps.setString(2, cl.getSegundoNombre());\r\n ps.setString(3, cl.getPrimerApellido());\r\n ps.setString(4, cl.getSegundoApellido());\r\n ps.setString(5, cl.getDireccion());\r\n ps.setString(6, cl.getTelefonoCelular());\r\n ps.setInt(7, cl.getIdCargo());\r\n ps.setInt(8, cl.getIdEstado());\r\n ps.execute();\r\n \r\n }catch(SQLException e){\r\n JOptionPane.showMessageDialog(null, \"error: \"+ e.getMessage());\r\n \r\n } \r\n }",
"public void insertVote(String name1, String name2, String name3, String name4, String name5, String name6, int ID, Date prepDate, int CanteenNo)\r\n {\r\n try \r\n {\r\n stmt = con.createStatement();\r\n stmt.execute(\"INSERT INTO voteresult(NSBMID,PrepDate,CanteenNo,\"+name1+\",\"+name2+\",\"+name3+\",\"+name4+\",\"+name5+\",\"+name6+\") VALUES(\"+ID+\",'\"+prepDate+\"',\"+CanteenNo+\",1,1,1,1,1,1)\");\r\n\r\n } \r\n catch (SQLException ex) \r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid Entry\\n(\" + ex + \")\");\r\n }\r\n \r\n }",
"public void insertUser(int value1, String value2, String value3)\r\n {\r\n try {\r\n stmt = con.createStatement();\r\n stmt.execute(\"INSERT INTO user(NSBMID,Name,Password)VALUES(\"+value1+\",'\"+value2+\"','\"+value3+\"')\");\r\n } \r\n catch (SQLException ex)\r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid Entry\\n(\" + ex + \")\");\r\n \r\n }\r\n }",
"private String makeInsert(String tableName, Properties prop)\n {\n String sqlNames = \"\";\n String sqlValues = \"\";\n for (Enumeration e = prop.propertyNames(); e.hasMoreElements();) {\n String name = (String) e.nextElement();\n String value = prop.getProperty(name);\n if (value != null && value.length() > 0) {\n sqlNames += name + \", \";\n // Replace all (')s with ('')\n int j = 0;\n int k;\n while ((k = value.indexOf('\\'', j)) > -1) {\n value = value.substring(0, k + 1) + value.substring(k);\n j = k + 2;\n }\n sqlValues += \"'\" + value + \"', \";\n }\n }\n int idx = sqlNames.lastIndexOf(\",\");\n sqlNames = sqlNames.substring(0, idx); // remove the last \", \"\n idx = sqlValues.lastIndexOf(\",\");\n sqlValues = sqlValues.substring(0, idx); // remove the last \", \"\n String sql = \"INSERT INTO \" + tableName + \" (\" + sqlNames + \") VALUES ( \"\n + sqlValues + \");\";\n return sql;\n }",
"public void insert(String sno, String sname, String ssex, int age, String sdept, String sclass)\r\n\t\t\tthrows SQLException {\r\n\t\tString sql = \"insert into course (sno,sno,ssex,age,sdept,sclass) values (?,?,?,?,?,?)\";// ?表示占位符\r\n\t\tpstmt = con.prepareStatement(sql); // 实例化预处理对象\r\n\t\tpstmt.setString(1, sno);\r\n\t\tpstmt.setString(2, sname);\r\n\t\tpstmt.setString(3, ssex);\r\n\t\tpstmt.setInt(4, age);\r\n\t\tpstmt.setString(5, sdept);\r\n\t\tpstmt.setString(6, sclass);\r\n\t\tpstmt.executeUpdate(); // 执行预处理对象不需要sql语句\r\n\t\tpstmt.close();\r\n\t\tSystem.out.println(\"插入完成\");\r\n\t}",
"public static void inserttea() {\n\t\ttry {\n\t\t\tps = conn.prepareStatement(\"insert into teacher values ('\"+teaid+\"','\"+teaname+\"','\"+teabirth+\"','\"+protitle+\"','\"+cno+\"')\");\n\t\t\tSystem.out.println(\"cno:\"+cno);\n\t\t\tps.executeUpdate();\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"教师记录添加成功!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}catch (Exception e){\n\t\t\t// TODO Auto-generated catch block\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"数据添加异常!\", \"提示消息\", JOptionPane.ERROR_MESSAGE);\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void insertTreatment(String trtName,int cost,String date,String start,String partner){\r\n\t\ttry{\r\n\t\t\t// this is how you connect\r\n\t\t\tconnection = DriverManager.getConnection(connectionString);\r\n\t\t\tstmt = connection.prepareStatement(\"INSERT INTO Treatment VALUES(?,?,?,?,?);\");\r\n\t\t\tstmt.setString(1, trtName);\r\n\t\t\tstmt.setString(2, String.valueOf(cost));\r\n\t\t\tstmt.setString(3, date);\r\n\t\t\tstmt.setString(4, start);\r\n\t\t\tstmt.setString(5, partner);\r\n\t\t\tstmt.executeUpdate();\r\n\t\t}\r\n\t\tcatch (SQLException ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}",
"public void addPatient(String name,String lasname, int age, String unam, String pas, String sec, String secAns, int sympt[],int prevSm1[],int prevSm2[],int threshold[], String dname)\r\n {\r\n\t String newPat = \"INSERT INTO PATIENTDATA (FIRSTNAME,LASTNAME,AGE,USERNAME,PASSWORD,SECURITYQN,SECURITYANS,\"+\r\n\t\t\t \t\t \"SYMPTOM1,SYMPTOM2,SYMPTOM3,SYMPTOM4,SYMPTOM5,SYMPTOM6,SYMPTOM7,\"+\r\n \t\t\t\t\t\"PrevSYMPTOM1_1,PrevSYMPTOM1_2,PrevSYMPTOM1_3,PrevSYMPTOM1_4,PrevSYMPTOM1_5,PrevSYMPTOM1_6,PrevSYMPTOM1_7,\"+\r\n \t\t\t\t\t\"PrevSYMPTOM2_1,PrevSYMPTOM2_2,PrevSYMPTOM2_3,PrevSYMPTOM2_4,PrevSYMPTOM2_5,PrevSYMPTOM2_6,PrevSYMPTOM2_7,\"+\r\n\t\t\t \t\t \"SYMPTOM1Thresh,SYMPTOM2Thresh,SYMPTOM3Thresh,SYMPTOM4Thresh,SYMPTOM5Thresh,SYMPTOM6Thresh,SYMPTOM7Thresh, DOCTORSNAME, NOTIFICATION) \";\r\n\t newPat = newPat+\"VALUES ('\"+name+\"', '\"+lasname+\"', \"+age+\", '\"+unam+\"', '\"+pas+\"', '\"+sec+\"', '\"+secAns+\"',\"\r\n\t\t\t \t\t +sympt[0]+\",\"+sympt[1]+\",\"+sympt[2]+\",\"+sympt[3]+\",\"+sympt[4]+\",\"+sympt[5]+\",\"+sympt[6]+\r\n\t\t\t \t\t\t\",\" +prevSm1[0]+\",\"+prevSm1[1]+\",\"+prevSm1[2]+\",\"+prevSm1[3]+\",\"+prevSm1[4]+\",\"+prevSm1[5]+\",\"+prevSm1[6]+\",\"\r\n\t\t\t \t\t\t+prevSm2[0]+\",\"+prevSm2[1]+\",\"+prevSm2[2]+\",\"+prevSm2[3]+\",\"+prevSm2[4]+\",\"+prevSm2[5]+\",\"+prevSm2[6]+\",\"\r\n\t\t\t \t\t\t+threshold[0]+\",\"+threshold[1]+\",\"+threshold[2]+\",\"+threshold[3]+\",\"+threshold[4]+\",\"+threshold[5]+\",\"+threshold[6]+\",'\"+dname+\"',0);\";\r\n\t \r\n\t try {\r\n\t\tstmt.executeUpdate(newPat);\r\n\t\t\r\n\t\t\r\n\t} catch (SQLException e) {\r\n\t\t\r\n\t\te.printStackTrace();\r\n\t}\r\n\t \r\n }",
"public static void Deepmodelinsert (int id,int p_id,String FQN,String name, String container,String table )\n { \n\t mysqlhost=Login.textmysqlhostx();\n\t\t mysqluser=Login.textuserx();\n\t mysqlpassword=Login.textpasswordx();\n\t sqldatabase=\"jdbc:mysql://\"+mysqlhost;\n \n \ttry \n { \n Statement stmt=null; \n ResultSet res=null; \n Class.forName(\"com.mysql.jdbc.Driver\"); \n Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n stmt = (Statement)conn.createStatement(); \n res= stmt.executeQuery(\"SELECT * from deepmodel \"); \n\n\n // 增加数据\n Statement stm = (Statement) conn.createStatement();// 提交查巡\n String sql = \"select * from deepmodel\";\n ResultSet rs = stm.executeQuery(sql);// 取得查巡結果\n// sql = \"insert into entity (id,name,FQN,container) values ('6','AccountType','Example2.O2.AccountType','Example2.O10')\";\n \n int n = stm.executeUpdate(\"insert into \"+table+\"(id,p_id,FQN,name, container) values (\"+\"'\"+id+\"'\"+\",\"+\"'\"+p_id+\"'\"+\",\"+\"'\"+FQN+\"'\"+\",\"+\"'\"+name+\"'\"+\",\"+\"'\"+container+\"'\"+\")\"); // 增加数据 \n if (n > 0) {\n// JOptionPane.showMessageDialog(null, \"成功\");\n \n \n } else {\n// JOptionPane.showMessageDialog(null, \"失败\");\n }\n //增加数据结束\n\n while (res.next()) \n { \n \n } \n } \n \n catch(Exception ex) \n { \n ex.printStackTrace(); \n } \n}",
"public static int save(Periode p){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection();\n //melakukan query database\n PreparedStatement ps=con.prepareStatement( \n \"insert into periode(tahun, awal, akhir) values(?,?,?)\"); \n ps.setString(1,p.getTahun()); \n ps.setString(2,p.getAwal()); \n ps.setString(3,p.getAkhir()); \n status=ps.executeUpdate(); \n }catch(Exception e){\n System.out.println(e);\n } \n return status; \n }",
"@Override\r\n\tpublic int addEmployee1(Employee employee) throws SQLException {\n\t\tint added = 0;\r\n\t\tString insertData = \"insert into employee values(?,?,?,?)\";\r\n\r\n\t\t\tPreparedStatement ps = dataSource.getConnection().prepareStatement(insertData);\r\n\t\t\tps.setString(1, employee.getName());\r\n\t\t\tps.setInt(2, employee.getEmpId());\r\n\t\t\tps.setString(3, employee.getTechnoogy());\r\n\t\t\tps.setInt(4, employee.getSalary());\r\n\r\n\t\t\tadded = ps.executeUpdate();\r\n\t\treturn added;\r\n\t}",
"public void addEmployee(Employee employee) throws SQLException {\n\t\tConnection connection = DatabaseConnection.getConnection();\n\t\tString query = \"INSERT INTO EMPLOYEE VALUES(?,?)\";\n\t\tPreparedStatement pStatement = connection.prepareStatement(query);\n\t\tpStatement.setString(1, employee.getEmpId());\n\t\tpStatement.setString(2, employee.getEname());\n\t\tpStatement.executeUpdate();\n\n\t}",
"public void createEmp(Empresa p) throws ClassNotFoundException {\r\n\r\n java.sql.Connection con = ConnectionFactory.getConnection();\r\n PreparedStatement stmt = null;\r\n\r\n try {\r\n stmt = con.prepareStatement(\"INSERT INTO tbempresas(codEmp,nomeEmp)\" + \"VALUES(?,?)\");\r\n stmt.setInt(1, p.getCodEmp());\r\n stmt.setString(2, p.getNomeEmp());\r\n\r\n stmt.executeUpdate();\r\n\r\n JOptionPane.showMessageDialog(null, \"salvo com sucesso\");\r\n } catch (SQLException ex) {\r\n System.out.println(ex);\r\n } finally {\r\n ConnectionFactory.closeConnection((com.mysql.jdbc.Connection) con, stmt);\r\n }\r\n }",
"public static boolean insert_prod(String ProdName, String catg,int cost,String owner,String Description) {\n\n String sql = \"INSERT INTO Product(ProdName,Category,Cost,Owner,Description,PackageID,Status) VALUES(?,?,?,?,?,?,?)\";\n try (\n PreparedStatement pstmt = conn.prepareStatement(sql)){\n pstmt.setString(1, ProdName);\n pstmt.setString(2, catg);\n pstmt.setInt(3, cost);\n pstmt.setString(4, owner);\n pstmt.setString(5, Description);\n pstmt.setString(6,\"\");\n pstmt.setString(7,\"0\");\n pstmt.executeUpdate();\n return true;\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return false;\n }",
"public static void main(String[] args) throws ClassNotFoundException, SQLException {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tString name, code;\r\n\t\tint salary;\r\n\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n\t\tSystem.out.println(\"Driver Registered\");\r\n\t\tConnection con = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:XE\", \"ashu\", \"tiger\");\r\n\t\tSystem.out.println(\"Connection Formed\");\r\n\t\tSystem.out.println(\"Enter Employee Code : \");\r\n\t\tcode = sc.nextLine();\r\n\t\tSystem.out.println(\"Enter Name : \");\r\n\t\tname = sc.nextLine();\r\n\t\tSystem.out.println(\"Enter Salary : \");\r\n\t\tsalary = sc.nextInt();\r\n\t\tPreparedStatement pst = con.prepareStatement(\"insert into employee values(?,?,?)\");\r\n\t\tpst.setString(1, code);\r\n\t\tpst.setString(2, name);\r\n\t\tpst.setInt(3, salary);\r\n\t\tpst.execute();\r\n\t\t// System.out.println(\"Record Details : \\nCode\\t\\tName\\t\\tSalary\\n\");\r\n\t\tSystem.out.println(\"Insertion successfull!!!\");\r\n\t\tcon.close();\r\n\r\n\t}",
"public String insertInfo(String title,String date,String details)\n {\n SQLiteDatabase db = this.getWritableDatabase();\n\n try\n {\n String INSERT_DATA =\"INSERT INTO news_table(title,date,details)\"+\"VALUES('\"+title+\"','\"+date+\"','\"+details+\"')\";\n db.execSQL(INSERT_DATA);\n\n return \"Data Inserted Successfully!\";\n }\n catch (Exception ex)\n {\n return \"Error!! \"+ ex.getMessage();\n }\n\n }",
"public void insertData(String tableName) {\n //SQL statement\n String query = \"insert into \" + tableName +\n \"(\" +\n \"myName, address) \" +\n \"values ('Michael', 'my adress'), \" +\n \"('Nanna', 'Her adress'), \" +\n \"('Mathias', 'Their adress'), \" +\n \"('Maja', 'Their adress')\";\n\n try {\n //connection\n stmt = con.createStatement();\n //execute query\n stmt.executeUpdate(query);\n System.out.println(\"\\n--Data inserted into table \" + tableName + \"--\");\n } catch (SQLException ex) {\n //Handle SQL exceptions\n System.out.println(\"\\n--Query did not execute--\");\n ex.printStackTrace();\n }\n }",
"protected String createInsert(T t) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"INSERT INTO \");\n\t\tsb.append(type.getSimpleName());\n\t\tsb.append(\" VALUES \");\n\t\treturn sb.toString();\n\t}",
"@Insert({\n \"insert into generalcourseinformation (courseid, code, \",\n \"name, teacher, credit, \",\n \"week, day_detail1, \",\n \"day_detail2, location, \",\n \"remaining, total, \",\n \"extra, index)\",\n \"values (#{courseid,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, \",\n \"#{name,jdbcType=VARCHAR}, #{teacher,jdbcType=VARCHAR}, #{credit,jdbcType=INTEGER}, \",\n \"#{week,jdbcType=VARCHAR}, #{day_detail1,jdbcType=VARCHAR}, \",\n \"#{day_detail2,jdbcType=VARCHAR}, #{location,jdbcType=VARCHAR}, \",\n \"#{remaining,jdbcType=INTEGER}, #{total,jdbcType=INTEGER}, \",\n \"#{extra,jdbcType=VARCHAR}, #{index,jdbcType=INTEGER})\"\n })\n int insert(GeneralCourse record);",
"@Override\n\tpublic void addProfessor(Professor add1) {\n\t\ttry{\n\t\t\tstmt=conn.prepareStatement(\"INSERT INTO Professor(ssn,name,department,password) VALUES(?,?,?,?)\");\n\t\t\tstmt.setString(1, add1.getSsn());\n\t\t\tstmt.setString(2,add1.getName());\n\t\t\tstmt.setString(3, add1.getDepartment());\n\t\t\tstmt.setString(4, \"123456\");//Δ¬ΘΟΓάΒλ\n\t\t\t\n\t\t\t\n\t\t\tstmt.executeUpdate();\n\t\t\t}catch(SQLException e){\n\t\t\t\tex=e;\n\t\t\t}finally{\n\t\t\t\tif(conn!=null){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tconn.close();\n\t\t\t\t\t}catch(SQLException e){\n\t\t\t\t\t\tif(ex==null){\n\t\t\t\t\t\t\tex=e;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif(ex!=null){\n\t\t\t\tthrow new RuntimeException(ex);\n\t\t\t}\n\t\t\t}\n\t}",
"@Override\npublic int insert(StudentBo bo) throws Exception {\n\ttry {\n\tConnection con=ds.getConnection();\n\tps=con.prepareStatement(STUDENT_INSERT_QUERY);\n\t//set value to query param\n\tps.setInt(1, bo.getSno());\n\tps.setString(2,bo.getSname());\n\tps.setInt(3,bo.getTotal());\n\tps.setFloat(4, bo.getAvg());\n\tps.setString(5,bo.getResult());\n\t//exceute the result\n\tresult=ps.executeUpdate();\n\n\t\n\treturn result;\n}\n\tcatch(SQLException se) {\n\t\treturn 0;\n\t}\n\tcatch(Exception e) {\n\t\treturn 0;\n\t}\n}",
"public void insert(){\r\n\t\tString query = \"INSERT INTO liveStock(name, eyeColor, sex, type, breed, \"\r\n\t\t\t\t+ \"height, weight, age, furColor, vetNumber) \"\r\n\t\t\t\t+ \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) \";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement prepareStatement = conn.prepareStatement(query);\r\n\t\t\t\r\n\t\t\tprepareStatement.setString(1, liveStock.getName());\r\n\t\t\tprepareStatement.setString(2, liveStock.getEyeColor());\r\n\t\t\tprepareStatement.setString(3, liveStock.getSex());\r\n\t\t\tprepareStatement.setString(4, liveStock.getAnimalType());\r\n\t\t\tprepareStatement.setString(5, liveStock.getAnimalBreed());\r\n\t\t\tprepareStatement.setString(6, liveStock.getHeight());\r\n\t\t\tprepareStatement.setString(7, liveStock.getWeight());\r\n\t\t\tprepareStatement.setInt(8, liveStock.getAge());\r\n\t\t\tprepareStatement.setString(9, liveStock.getFurColor());\r\n\t\t\tprepareStatement.setInt(10, liveStock.getVetNumber());\r\n\t\t\t\r\n\t\t\tprepareStatement.execute();\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\ntry\n{\n\tConnection con=null;\n\tint i=0;\n\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\tcon=DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:xe\",\"system\",\"gaurav0698\");\n\tPreparedStatement ps=con.prepareStatement(\"insert into product values(?,?,?)\");\n\tps.setInt(1,2);\n\tps.setString(2, \"watches\");\n\tps.setInt(3, 2500);\n\ti=ps.executeUpdate();\n\tif(i>0)\n\t{\n\t\tSystem.out.println(\"Registered Successfully\");\n\t}\n\telse\n\t{\n\t\tSystem.out.println(\"Data not found!!\");\n\t}\n}\ncatch(Exception e)\n{\n\tSystem.out.println(e);\n}\n\t}",
"public void insert(){\n Connection conn = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n \n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n conn = DriverManager.getConnection(\n \"jdbc:mysql://localhost:3306/process_checkout\",\"root\",\"\"\n );\n \n String query = \"INSERT INTO area (name) VALUES (?)\";\n \n PreparedStatement preparedStmt = conn.prepareStatement(query);\n preparedStmt.setString(1, name);\n preparedStmt.execute();\n \n }catch(SQLException e){\n \n } catch (ClassNotFoundException ex) {\n \n }finally{\n try {\n if(rs != null)rs.close();\n } catch (SQLException e) {\n /* ignored */ }\n try {\n if(ps != null)ps.close();\n } catch (SQLException e) {\n /* ignored */ }\n try {\n if(conn != null)conn.close();\n } catch (SQLException e) {\n /* ignored */ }\n }\n \n }",
"private void TambahData(String judul,String penulis,String harga){\n try{ // memanipulasi kesalahan\n String sql = \"INSERT INTO buku VALUES(NULL,'\"+judul+\"','\"+penulis+\"',\"+harga+\")\"; // menambahkan data dengan mengkonekan dari php\n stt = con.createStatement(); // membuat statement baru dengan mengkonekan ke database\n stt.executeUpdate(sql); \n model.addRow(new Object[]{judul,penulis,harga}); // datanya akan tertambah dibaris baru di tabel model\n \n }catch(SQLException e){ // memanipulasi kesalahan\n System.out.println(\"ini error\"); // menampilkan pesan ini error\n }\n }",
"public void insertar2(String nombre, String apellido, String mail, String celular, String comuna,String profesor,String alumno,String clave) {\n db.execSQL(\"insert into \" + TABLE_NAME + \" values (null,'\" + nombre + \"','\" + apellido + \"','\" + mail + \"','\" + celular + \"','\" + comuna + \"',\" + profesor + \",0,0,0,0,\" + alumno + \",'\" + clave + \"')\");\n }",
"public void insertIntoAdminDetails(String NIC, int CanteenNo, String Name, int ContactNo, String Password)\r\n {\r\n try \r\n {\r\n stmt = con.createStatement();\r\n stmt.execute(\"INSERT INTO admindetails(NIC, CanteenNo, Name, ContactNo, Password) VALUES('\"+NIC+\"',\"+CanteenNo+\",'\"+Name+\"',\"+ContactNo+\",'\"+Password+\"')\");\r\n\r\n } \r\n catch (SQLException ex) \r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid Entry\\n(\" + ex + \")\");\r\n }\r\n }",
"public String insertCallStatement() {\n\t\treturn \"INSERT INTO CALLS\" + \"(\\\"CONTACT_ID\\\", \\\"CALL_DATE\\\", \\\"SUBJECT\\\", \\\"NOTES\\\" )\"\n\t\t\t\t+ \" VALUES (?, ?, ?, ?)\";\n\t}",
"public void nuevoPaciente(String idPaciente, String DNI, String nombres, String apellidos, String direccion, String ubigeo, String telefono1, String telefono2, String edad)\n {\n try\n {\n PreparedStatement pstm=(PreparedStatement)\n con.getConnection().prepareStatement(\"insert into \" + \" paciente(idPaciente, dui, nombres, apellidos, direccion, ubigeo, telefono1, telefono2, edad)\" + \"values (?,?,?,?,?,?,?,?,?)\");\n \n pstm.setString(1, idPaciente);\n pstm.setString(2, DNI);\n pstm.setString(3, nombres);\n pstm.setString(4, apellidos);\n pstm.setString(5, direccion);\n pstm.setString(6, ubigeo);\n pstm.setString(7, telefono1);\n pstm.setString(8, telefono2);\n pstm.setString(9, edad); \n \n pstm.execute();\n pstm.close();\n }\n catch(SQLException e)\n {\n System.out.print(e);\n }\n }",
"@Insert({\n \"insert into `category` (`cate_id`, `cate_name`)\",\n \"values (#{cateId,jdbcType=INTEGER}, #{cateName,jdbcType=VARCHAR})\"\n })\n int insert(Category record);",
"public static void insertData(UserDetail detail, Connection con) {\n\tString city=\"\";\n\tString[] cities=detail.getCities();\n\tif(cities!=null) {\n\tfor(int i=0;i<cities.length;i++) {\n\t\tcity=city+\",\"+cities[i];\n\t\n\t}\n}\n\t\n\tString sql= \"inser into db26.UserDetail values(?,?,?)\";\n\t\n\ttry {\n\t\tPreparedStatement p= con.prepareStatement(sql);\n\t\tp.setString(1, detail.getName());\n\t\tp.setString(2, detail.getGender());\n\t\tp.setString(3, city);\n\t\tp.executeUpdate();\n\t\tp.close();\n\t}catch(SQLException e) {\n\t\te.printStackTrace();\n\t}\n\t\n\t\t\n\t\t\n\t}",
"public int Edbroker(Long broker_id, String firstname, String lastname,\r\n\t\tString address, String gender, String eMail, Long phone,\r\n\t\tString experience) throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"update broker set first_name='\"+firstname+\"',last_name='\"+lastname+\"',address='\"+address+\"',gender='\"+gender+\"',e_mail='\"+eMail+\"',phone=\"+phone+\",experience='\"+experience+\"' where broker_id=\"+broker_id+\"\");\r\n\treturn i;\r\n}",
"public String addBilling(Tour t,Event e){\n \n \n String result = \"0\";\n Connection con = null;\n //build the sql\n String SQLCommand = \"INSERT INTO billing(id,lineup_order,event_id,artist_id,tour_id)\" +\n \" values (seq_billing_id.NEXTVAL,?,?,?,?)\";\n \n try{\n //obtain the database connection by calling getConn() \n con = getConn();\n Billing b = t.getBills().get(0);\n \n \n //create the PreparedStatement from the Connection object by calling prepareCall\n //method, passing it the sql , parameters are represented by ? in the sql\n PreparedStatement ps = con.prepareStatement(SQLCommand); \n \n //setting the parameters values\n ps.setInt(1,b.getLineupOrder());\n ps.setLong(2,e.getId());\n ps.setLong(3, b.getArtist().getId());\n ps.setLong(4, t.getId());\n \n //exceuting the insert or update operation \n ps.executeUpdate(); \n }\n catch (SQLException ex){\n ex.printStackTrace();\n result = ex.getMessage();\n }\n return result;\n }",
"public static int insertdata(int rollno, String name, String email, double cpi) throws SQLException {\n\t\tConnection con = getDbConnection();\n\t\tString sql = \"INSERT INTO `student` (`rollno`, `name`, `email`, `cpi`) VALUES (?, ?, ?, ?);\";\n\t\tPreparedStatement pstmt = con.prepareStatement(sql);\n\t\t//setting parameter\n\t\tpstmt.setInt(1, rollno);\n\t\tpstmt.setString(2, name);\n\t\tpstmt.setString(3, email);\n\t\tpstmt.setDouble(4, cpi);\n\t\t\n\t\tint rows = pstmt.executeUpdate();\n\t\t\n\t\treturn rows;\t\n\t}",
"public void insert(String champs,String valeur) throws SQLException {\n\t\t///Cette partie pour créer un string = \"?, ?; ?...\"\n\t\t///tel que le nombre des points d'interrogation égale au nombre des champs.\n\t\t///Pour l'utiliser dans la syntaxe \"INSERT\" du SQL. \n\t\t//Tableau de champs et valeur .\n String[] champsTab = champs.split(\", \");\n String[] valeurTab = valeur.split(\", \");\n\t\tArrayList<String> valueQST = new ArrayList<String>();\n\t\tfor(int i=0; i<(champs.split(\", \")).length; i++) {\n\t\t\tvalueQST.add(\"?\");\n\t\t}\n\t\t//valueQSTStr = \"?, ?, ?...\"\n\t\tString valueQSTStr = valueQST.toString().replaceAll(\"\\\\[|\\\\]\", \"\");\n\t\t/////////////////////////////////////////////////////////////////////\n String sql = \"INSERT INTO personnel(\"+champs+\") VALUES(\"+valueQSTStr+\")\"; \n Connection conn = connecter(); \n PreparedStatement pstmt = conn.prepareStatement(sql);\n int j=0;\n for(int i=0 ; i<champsTab.length;i++) {\n \tj=i+1;\n \tif(!champsTab[i].matches(\"nombre_Enfant|iD_Departement|iD_Cv|salaire\")) {\n \tif(champsTab.length>valeurTab.length) {\n \t\tif(champsTab[i].matches(\"Date_Fin_Contract\")){\n \t\tpstmt.setString(j,\"\");\t\n \t\t}else pstmt.setString(j,valeurTab[i]);\n \t}else pstmt.setString(j,valeurTab[i]);\n \t}\n \tif(champsTab[i].matches(\"salaire\")) {\n \t\tpstmt.setFloat(j,Float.parseFloat(valeurTab[i]));\n \t}\n \tif(champsTab[i].matches(\"nombre_Enfant|iD_Departement|iD_Cv\")) {\n \t\tpstmt.setInt(j,Integer.parseInt(valeurTab[i]));\n \t}\n }\n pstmt.executeUpdate();\n\t\tconn.close();\n }",
"public void insertPerson(Person p) throws DataAccessException {\n String sql = \"INSERT INTO persons (person_id, assoc_username, first_name, last_name, gender, \" +\n \"father_id, mother_id, spouse_id) VALUES(?,?,?,?,?,?,?,?)\";\n try(PreparedStatement stmt = conn.prepareStatement(sql)) {\n stmt.setString(1, p.getPerson_id());\n stmt.setString(2, p.getAssoc_username());\n stmt.setString(3, p.getFirst_name());\n stmt.setString(4, p.getLast_name());\n stmt.setString(5, p.getGender());\n stmt.setString(6, p.getFather_id());\n stmt.setString(7, p.getMother_id());\n stmt.setString(8, p.getSpouse_id());\n\n stmt.executeUpdate();\n } catch (SQLException e) {\n throw new DataAccessException(\"Error encountered while inserting into the database\");\n }\n }",
"public static void Inrinsert(int id,String FQN,String name, String container,String disjoint,String complete,String table)\n\t\t\t { \n\t\t\t \n\t\t\t \ttry \n\t\t\t { \n\t\t\t Statement stmt=null; \n\t\t\t ResultSet res=null; \n\t\t\t Class.forName(\"com.mysql.jdbc.Driver\"); \n\t\t\t Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n\t\t\t stmt = (Statement)conn.createStatement(); \n\t\t\t res= stmt.executeQuery(\"SELECT * from inheritancerelationship\"); \n\n\n\t\t\t // 增加数据\n\t\t\t Statement stm = (Statement) conn.createStatement();// 提交查巡\n\t\t\t String sql = \"select * from inheritancerelationship\";\n\t\t\t ResultSet rs = stm.executeQuery(sql);// 取得查巡結果\n//\t\t\t sql = \"insert into entity (id,name,FQN,container) values ('6','AccountType','Example2.O2.AccountType','Example2.O10')\";\n\t\t\t \n\t\t\t int n = stm.executeUpdate(\"insert into \"+table+\"(id,FQN,name,container,disjoint,complete) values (\"+\"'\"+id+\"'\"+\",\"+\"'\"+FQN+\"'\"+\",\"+\"'\"+name+\"'\"+\",\"+\"'\"+container+\"'\"+\",\"+\"'\"+disjoint+\"'\"+\",\"+\"'\"+complete+\"'\"+\")\"); // 增加数据 \n\t\t\t if (n > 0) {\n//\t\t\t JOptionPane.showMessageDialog(null, \"成功\");\n\t\t\t \n\t\t\t \n\t\t\t } else {\n//\t\t\t JOptionPane.showMessageDialog(null, \"失败\");\n\t\t\t }\n\t\t\t //增加数据结束\n\n\t\t\t while (res.next()) \n\t\t\t { \n\t\t\t \n\t\t\t } \n\t\t\t } \n\t\t\t \n\t\t\t catch(Exception ex) \n\t\t\t { \n\t\t\t ex.printStackTrace(); \n\t\t\t } \n\t\t\t}",
"void insertQuery (String query) throws SQLException\n\t{\n\t\t/* Creiamo lo Statement per l'esecuzione della query */\n\t\tStatement s = conn.createStatement(); \n\t\t\n\t\t/* eseguiamo la query */\n s.executeUpdate(query);\n\t}",
"@Insert({\n \"insert into kd_user_medal (id, userid, \",\n \"medalId, bindUserid, \",\n \"remark, createTime)\",\n \"values (#{id,jdbcType=BIGINT}, #{userid,jdbcType=BIGINT}, \",\n \"#{medalid,jdbcType=BIGINT}, #{binduserid,jdbcType=BIGINT}, \",\n \"#{remark,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP})\"\n })\n int insert(KDUserMedal record);",
"public Boolean simpanSupplier(String supID, String compName, String compTitle, \r\n String contactName, String contactTitle, String city, String address, \r\n String postCode, String country, String phone, String fax, String bankName, String accountNo,\r\n String bankHolder, Date lastDelivery, String comment) {\r\n Boolean sup = false;\r\n try {\r\n DatabaseConnection db = new DatabaseConnection();\r\n String query = \"INSERT INTO `citradream_purchasing`.`hcdy_suppliers`\"\r\n + \" (`suppliers_id`, `company_name`, `company_title`, \"\r\n + \"`contact_name`, `contact_title`, `city`, `address`,\"\r\n + \" `postcode`, `country`, `telephone`, `faximile`,\"\r\n + \" `bank_name`, `bank_acctNo`, `bank_acctHolder`,\"\r\n + \" `last_delivery`, `comment`) VALUES \"\r\n + \"(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?); \";\r\n PreparedStatement statement = db.getConnection().prepareStatement(query);\r\n statement.setString(1, supID);\r\n statement.setString(2, compName);\r\n statement.setString(3, compTitle);\r\n statement.setString(4, contactName);\r\n statement.setString(5, contactTitle);\r\n statement.setString(6, city);\r\n statement.setString(7, address);\r\n statement.setString(8, postCode);\r\n statement.setString(9, country);\r\n statement.setString(10, phone);\r\n statement.setString(11, fax);\r\n statement.setString(12, bankName);\r\n statement.setString(13, accountNo);\r\n statement.setString(14, bankHolder);\r\n statement.setDate(15, (java.sql.Date) lastDelivery);\r\n statement.setString(16, comment);\r\n statement.executeUpdate();\r\n sup = true;\r\n } catch (SQLException ex) {\r\n Logger.getLogger(SupplierBean.class.getName()).log(Level.SEVERE, null, ex);\r\n JOptionPane.showMessageDialog(null, \"Data isn't complete/ Wrong format\");\r\n }\r\n return sup;\r\n }",
"private void addBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_addBtnMouseClicked\n\n String id = pidTxt.getText().toString();\n String name = pnameTxt.getText().toString();\n String price = pperpriceTxt.getText().toString();\n String quantity = pquanityTxt.getText().toString();\n String date = pdateTxt.getText().toString();\n\n try {\n String Query = \"INSERT INTO `stock` (`Product_ID`, `Product_Name`,`Quantity`, `Entry_Date`,`Price`) VALUES (?, ?, ?, ?, ?)\";\n\n pstm = con.prepareStatement(Query);\n\n pstm.setInt(1, Integer.parseInt(id));\n pstm.setString(2, name);\n pstm.setInt(3, Integer.parseInt(quantity));\n pstm.setString(4, date);\n pstm.setInt(5, Integer.parseInt(price));\n pstm.executeUpdate();\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Data Insertion Failed \");\n }\n refTable();\n\n\n }",
"@Override\r\n\tpublic String generate() {\r\n\t\tStringBuilder query = new StringBuilder();\r\n\r\n\t\tquery.append(\"INSERT INTO \").append(tableName).append(\" (\");\r\n\t\tfor (int i = 0; i < fieldNames.size(); i++) {\r\n\t\t\tquery.append(fieldNames.get(i));\r\n\t\t\tif (i < fieldNames.size() - 1) {\r\n\t\t\t\tquery.append(\", \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tquery.append(\") VALUES (\");\r\n\t\tfor (int i = 0; i < fieldValues.size(); i++) {\r\n\t\t\tquery.append(\"'\").append(fieldValues.get(i)).append(\"'\");\r\n\t\t\tif (i < fieldValues.size() - 1) {\r\n\t\t\t\tquery.append(\", \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tquery.append(\");\");\r\n\t\treturn query.toString();\r\n\t}",
"public String addEmployeeRecord(String firstName, String lastName,\n String socialSecurityNumber, String department,\n String roomNumber, String phoneNumber) {\n\n Connection connection = null;\n PreparedStatement statement = null;\n ResultSet resultSet = null;\n int result = 0;\n\n try {\n\n connection = getConnection(connection);\n\n String queryString = \"INSERT INTO employees \"\n + \"(first_name, last_name, ssn, dept, room, phone)\"\n + \"values ( ?, ?, ?, ?, ?, ? )\";\n\n statement = connection.prepareStatement(queryString);\n statement.setString(1, firstName);\n statement.setString(2, lastName);\n statement.setString(3, socialSecurityNumber);\n statement.setString(4, department);\n statement.setString(5, roomNumber);\n statement.setString(6, phoneNumber);\n\n result = statement.executeUpdate();\n } catch (SQLException sqlException) {\n sqlException.printStackTrace();\n } catch (Exception exception) {\n System.err.println(\"General Error\");\n exception.printStackTrace();\n } finally {\n try {\n if (resultSet != null) {\n resultSet.close();\n }\n\n\n if (statement != null) {\n statement.close();\n }\n\n\n if (connection != null) {\n connection.close();\n }\n } catch (SQLException sqlException) {\n sqlException.printStackTrace();\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n }\n if (result > 0) {\n return \"New employee added successfully.\";\n } else {\n return \"Error adding new employee.\";\n }\n }",
"@Override\n\tpublic int insertEsalary(Esalary esalary) {\n\t\tint status = 0;\n\t\t\n\t\ttry {\n\t\t\tconnection = ConnectDB.getDBConnection();\n\t\t\t\n\t\t\tString sql = \"INSERT INTO EmployeeSalary(Emp_ID, Contract) VALUES(?, ?)\";\n\t\t\n\n\t\t\tpreparedStatement = connection.prepareStatement(sql);\n\t\t\t\n\t\t\tpreparedStatement.setString(1, esalary.getEmp_ID());\n\t\t\tpreparedStatement.setString(2, esalary.getContract());\n\t\t\t\n\t\t\t\n\t\t\tstatus = preparedStatement.executeUpdate();\n\t\t\n\t\t\ttry {\n\t\t\t\tif (preparedStatement != null) {\n\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t}\n\t\t\t\tif (connection != null) {\n\t\t\t\t\tconnection.close();\n\t\t\t\t}\n\t\t\t} catch (java.sql.SQLException e) {\n\t\t\t\tlogger.log(Level.SEVERE, e.getMessage());\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tlogger.log(Level.SEVERE, e.getMessage());\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\n\t\treturn status;\n\t\t\n\t}",
"@Override\r\n\tpublic int addEmployee(Employee employee) {\n\t\tint added = 0;\r\n\t\tString insertData = \"insert into employee values(?,?,?,?)\";\r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = dataSource.getConnection().prepareStatement(insertData);\r\n\t\t\tps.setString(1, employee.getName());\r\n\t\t\tps.setInt(2, employee.getEmpId());\r\n\t\t\tps.setString(3, employee.getTechnoogy());\r\n\t\t\tps.setInt(4, employee.getSalary());\r\n\r\n\t\t\tadded = ps.executeUpdate();\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn added;\r\n\t}",
"public int Editcomp(Long comp_id, String compname, String address, String city,\r\n\t\tString state, Long offno, Long faxno, String website, String e_mail) throws SQLException {\nint i =DbConnect.getStatement().executeUpdate(\"update company set address='\"+address+\"',city='\"+city+\"',state='\"+state+\"',offno=\"+offno+\",faxno=\"+faxno+\",website='\"+website+\"',email='\"+e_mail+\"'where comp_id=\"+comp_id+\" \");\r\n\treturn i;\r\n}",
"public void update(Emp p){\n\t\n\t\tString sql=\"UPDATE emp99 set name=?, salary=?, designation=? WHERE id=\"+p.getId();\n\t\t\n\t\ttemplate.update(sql, p.getName(),p.getSalary(),p.getDesignation());\n\t\t\n\t\t/*return template.execute(sql, new PreparedStatementCallback<Boolean>() {\n\n\t\t\t@Override\n\t\t\tpublic Boolean doInPreparedStatement(PreparedStatement ps) throws SQLException, DataAccessException {\n\t\t\t\t\n\t\t\t\tps.setString(1, p.getName());\n\t\t\t\tps.setFloat(2, p.getSalary());\n\t\t\t\tps.setString(3, p.getDesignation());\n\t\t\t\tps.setInt(4, p.getId());\n\t\t\t\t\n\t\t\t\treturn ps.execute();\n\t\t\t}\n\t\t});*/\n\t\t\n\t}",
"public void insert(String type, String querynum, String lianxiren, String telephonenum, String address, String qq,\r\n\t\t\tString email, String websource) {\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\tSystem.out.println(\"kkkk\");\r\n\t\t\tcon = DriverManager.getConnection(\r\n\t\t\t// \"jdbc:mysql://192.168.32.19:3306/weibo_sina?useUnicode=true&&characterEncoding=UTF-8\", \"weibosina\",\"OyiaV5M53qTqlZjmN0OOtA==\");\r\n\t\t\t\t\t\"jdbc:mysql://127.0.0.1:3306/xiaohe\", \"root\", \"20121028mmhct1314\");\r\n\t\t\t//\"jdbc:mysql://192.168.32.19:3306/weibo_sina\", \"weibosina\",\"OyiaV5M53qTqlZjmN0OOtA==\");\r\n\t\t\tStatement stat = con.createStatement();\r\n\t\t\tString sql = \"insert into \" + type + \" values('\" + querynum + \"','\" + lianxiren + \"','\" + telephonenum\r\n\t\t\t\t\t+ \"','\" + address + \"','\" + qq + \"','\" + email + \"','\" + \" \" + \"')\";\r\n\t\t\t//\"\"+signname+\"','\"+realname+\"','\"+nickname+\"','\"+lianxiren+\"','\"+age+\"','\"+sex+\"','\"+telephonenum+\"','\"+phonepicture+\"','\"+address+\"','\"+duty+\"','\"+area+\"','\"+qq+\"','\"+email+\"','\"+websource+\"','\"+dataresource+\"','\"+deletedd+\"')\";\r\n\t\t\tstat.executeUpdate(sql);\r\n\t\t\tSystem.out.println(\"***\" + sql);\r\n\t\t\tstat.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tcon.close();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void updateData() throws SQLException {\n pst=con.prepareStatement(\"update employee set name=?,city=? where id=?\");\n System.out.println(\"Enter name: \");\n String name=sc.next();\n pst.setString(1,name);\n\n System.out.println(\"Enter city: \");\n String city=sc.next();\n pst.setString(2,city);\n\n System.out.println(\"Enter id: \");\n int id=sc.nextInt();\n pst.setInt(3,id);\n pst.execute();\n\n System.out.println(\"Data updated successfully\");\n }",
"@Insert({\n \"insert into SALEORDERDETAIL (SOID, LINENO, \",\n \"MID, MNAME, STANDARD, \",\n \"UNITID, UNITNAME, \",\n \"NUM, BEFOREDISCOUNT, \",\n \"DISCOUNT, PRICE, \",\n \"TOTALPRICE, TAXRATE, \",\n \"TOTALTAX, TOTALMONEY, \",\n \"BEFOREOUT, ESTIMATEDATE, \",\n \"LEFTNUM, ISGIFT, \",\n \"FROMBILLTYPE, FROMBILLID)\",\n \"values (#{soid,jdbcType=VARCHAR}, #{lineno,jdbcType=DECIMAL}, \",\n \"#{mid,jdbcType=VARCHAR}, #{mname,jdbcType=VARCHAR}, #{standard,jdbcType=VARCHAR}, \",\n \"#{unitid,jdbcType=VARCHAR}, #{unitname,jdbcType=VARCHAR}, \",\n \"#{num,jdbcType=DECIMAL}, #{beforediscount,jdbcType=DECIMAL}, \",\n \"#{discount,jdbcType=DECIMAL}, #{price,jdbcType=DECIMAL}, \",\n \"#{totalprice,jdbcType=DECIMAL}, #{taxrate,jdbcType=DECIMAL}, \",\n \"#{totaltax,jdbcType=DECIMAL}, #{totalmoney,jdbcType=DECIMAL}, \",\n \"#{beforeout,jdbcType=DECIMAL}, #{estimatedate,jdbcType=TIMESTAMP}, \",\n \"#{leftnum,jdbcType=DECIMAL}, #{isgift,jdbcType=DECIMAL}, \",\n \"#{frombilltype,jdbcType=DECIMAL}, #{frombillid,jdbcType=VARCHAR})\"\n })\n int insert(Saleorderdetail record);",
"public void insertValuesinPurchase(String selection,int quantity,float amount,float rate, Date date,String item,int remaining_stock,float updated_rate,String month, String year) throws SQLException, ClassNotFoundException\n {\n PreparedStatement add_purchase = null;\n try {\n add_purchase = login.conn.prepareStatement(\"INSERT INTO Purchases(Categroy\t,Quantity,Amount,Rate,Date,Item,stock,latest_rate,Month,Year)\\n\"\n + \"VALUES (?,?,?,?,?,?,?,?,?,?)\");\n add_purchase.setString(1, selection);\n add_purchase.setInt(2, quantity);\n add_purchase.setFloat(3, amount);\n add_purchase.setFloat(4, rate);\n java.sql.Date sqlDate = new java.sql.Date(date.getTime()); \n add_purchase.setDate(5, sqlDate);\n add_purchase.setString(6, item);\n add_purchase.setInt(7, remaining_stock);\n add_purchase.setFloat(8, updated_rate);\n add_purchase.setString(9, month);\n add_purchase.setString(10, year);\n\n add_purchase.execute();\n } catch (SQLException ex) {\n Logger.getLogger(add_purchase.class.getName()).log(Level.SEVERE, null, ex);\n }\n JOptionPane optionPane = new JOptionPane(\"Purchase inserted\");\nJDialog dialog = optionPane.createDialog(\"Alert\");\n\ndialog.setAlwaysOnTop(true);\ndialog.setVisible(true);\n\n \n add_purchase obj=new add_purchase();\n obj.setVisible(true);\n this.setVisible(false);\n }",
"public void insert() throws SQLException;",
"public void addDoctor(Doctor D)\r\n {\r\n\t try{\r\n\t\t \r\n\t\t \r\n\t String command = \"INSERT INTO DOCTORDATA (FIRSTNAME,LASTNAME,USERNAME,PASSWORD,SECURITYQN,SECURITYANS)\"+\r\n\t\t\t \"VALUES ('\"+D.firstName+\"', '\"+D.lastName+\"', '\"+D.userName+\"', '\"+D.password+\"', '\"+D.securityQuestion+\"', '\"+D.securityQuestionAnswer+\"');\";\r\n\t stmt.executeUpdate(command);\r\n\t \r\n\t \r\n\t } catch (SQLException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t}\r\n\t \r\n }",
"public static void Inpinsert(int id,String FQN,String name, String container,String participant,int inheritanceRelationship_id,String table)\n\t\t\t { \n\t\t\t \n\t\t\t \ttry \n\t\t\t { \n\t\t\t Statement stmt=null; \n\t\t\t ResultSet res=null; \n\t\t\t Class.forName(\"com.mysql.jdbc.Driver\"); \n\t\t\t Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n\t\t\t stmt = (Statement)conn.createStatement(); \n\t\t\t res= stmt.executeQuery(\"SELECT * from inheritanceparticipation \"); \n\n\n\t\t\t // 增加数据\n\t\t\t Statement stm = (Statement) conn.createStatement();// 提交查巡\n\t\t\t String sql = \"select * from inheritanceparticipation\";\n\t\t\t ResultSet rs = stm.executeQuery(sql);// 取得查巡結果\n//\t\t\t sql = \"insert into entity (id,name,FQN,container) values ('6','AccountType','Example2.O2.AccountType','Example2.O10')\";\n\t\t\t \n\t\t\t int n = stm.executeUpdate(\"insert into \"+table+\"(id,FQN,name, container,participant,inheritanceRelationship_id) values (\"+\"'\"+id+\"'\"+\",\"+\"'\"+FQN+\"'\"+\",\"+\"'\"+name+\"'\"+\",\"+\"'\"+container+\"'\"\n\t\t\t +\",\"+\"'\"+participant+\"'\"+\",\"+\"'\"+inheritanceRelationship_id+\"'\"+\")\"); // 增加数据 \n\t\t\t if (n > 0) {\n//\t\t\t JOptionPane.showMessageDialog(null, \"成功\");\n\t\t\t \n\t\t\t \n\t\t\t } else {\n//\t\t\t JOptionPane.showMessageDialog(null, \"失败\");\n\t\t\t }\n\t\t\t //增加数据结束\n\n\t\t\t while (res.next()) \n\t\t\t { \n\t\t\t \n\t\t\t } \n\t\t\t } \n\t\t\t \n\t\t\t catch(Exception ex) \n\t\t\t { \n\t\t\t ex.printStackTrace(); \n\t\t\t } \n\t\t\t}",
"public static void Methodinsert(int id,String FQN,String name, String container,String duribility,String signature,String body,String table )\n\t { \n\t \n\t \ttry \n\t { \n\t Statement stmt=null; \n\t ResultSet res=null; \n\t Class.forName(\"com.mysql.jdbc.Driver\"); \n\t Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n\t stmt = (Statement)conn.createStatement(); \n\t res= stmt.executeQuery(\"SELECT * from method \"); \n\n\n\t // 增加数据\n\t Statement stm = (Statement) conn.createStatement();// 提交查巡\n\t String sql = \"select * from method\";\n\t ResultSet rs = stm.executeQuery(sql);// 取得查巡結果\n//\t sql = \"insert into entity (id,name,FQN,container) values ('6','AccountType','Example2.O2.AccountType','Example2.O10')\";\n\t \n\t int n = stm.executeUpdate(\"insert into \"+table+\"(id,FQN,name, container,duribility,signature,body) values (\"+\"'\"+id+\"'\"+\",\"+\"'\"+FQN+\"'\"+\",\"+\"'\"+name+\"'\"+\",\"+\"'\"+container+\"'\"\n\t +\",\"+\"'\"+duribility+\"'\"+\",\"+\"'\"+signature+\"'\"+\",\"+\"'\"+body+\"'\"+\")\"); // 增加数据 \n\t if (n > 0) {\n//\t JOptionPane.showMessageDialog(null, \"成功\");\n\n\t \n\t } else {\n//\t JOptionPane.showMessageDialog(null, \"失败\");\n\t }\n\t //增加数据结束\n\n\t while (res.next()) \n\t { \n\t \n\t } \n\t } \n\t \n\t catch(Exception ex) \n\t { \n\t ex.printStackTrace(); \n\t } \n\t}",
"public static void main(String[] args) {\n\r\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tSystem.out.println(\"please enter id\");\r\n\t\tint id=sc.nextInt();\r\n\t\tSystem.out.println(\"enter name\");\r\n\t\tString name=sc.next();\r\n\t\t//System.out.println(\"enter contact\");//\r\n\t\t//String contact=sc.next();//\r\n\t\tSystem.out.println(\"enter address\");\r\n\t\tString address=sc.next();\r\n\t\tSystem.out.println(\"enter city\");\r\n\t\tString city=sc.next();\r\n\t\t\r\n\t\t\r\n\t\ttry{\r\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\r\n\t\t\r\n\t\ttry{\r\n\t\t\tConnection con=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/abhi\",\"root\",\"root\");\r\n\t//PreparedStatement p=con.prepareStatement(\"create table cusbio(id int,name varchar(20),contact varchar(10),address varchar(20),city varchar(10))\");//\t\r\n\t/*PreparedStatement pd=con.prepareStatement(\"insert into cusbio (id,name,contact,address,city) values(?,?,?,?,?)\");\r\n\tpd.setInt(1,1);\r\n\tpd.setString(2, \"Alfreds F\");\r\n\tpd.setString(3, \"Maria \");\r\n\tpd.setString(4, \"Obere Str. 57\");\r\n pd.setString(5,\"Berlin\");\r\n\tpd.executeUpdate();\t\r\n\tpd.close();*/\r\n\t/*\r\n\t\r\n\tPreparedStatement pd1=con.prepareStatement(\"insert into cusbio (id,name,contact,address,city) values(?,?,?,?,?)\");\r\n\tpd1.setInt(1,2);\r\n\tpd1.setString(2, \"Ana Trujillo \");\r\n\tpd1.setString(3, \"Trujillo\");\r\n\tpd1.setString(4, \"Avda. de la 2222\");\r\n pd1.setString(5,\"Mexico\");\r\n\tpd1.executeUpdate();\t\r\n\tpd1.close();\r\n\t\r\n\t\r\n\tPreparedStatement pd2=con.prepareStatement(\"insert into cusbio (id,name,contact,address,city) values(?,?,?,?,?)\");\r\n\tpd2.setInt(1,3);\r\n\tpd2.setString(2, \"Moreno Taquería \");\r\n\tpd2.setString(3, \"Moreno\");\r\n\tpd2.setString(4, \"Mataderos 2312\");\r\n pd2.setString(5,\"Mexico\");\r\n\tpd2.executeUpdate();\t\r\n\tpd2.close();\r\n\t\r\n\t\r\n\tPreparedStatement pd3=con.prepareStatement(\"insert into cusbio (id,name,contact,address,city) values(?,?,?,?,?)\");\r\n\tpd3.setInt(1,4);\r\n\tpd3.setString(2, \"Around the Horn \");\r\n\tpd3.setString(3, \"Thomas\");\r\n\tpd3.setString(4, \"120 Hanover Sq.\");\r\n pd3.setString(5,\"London\");\r\n\tpd3.executeUpdate();\t\r\n\tpd3.close();\r\n\t*/\r\n\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t/*\tPreparedStatement pd4=con.prepareStatement(\"update cusbio set name=? where id=?\");\r\n\tpd4.setString(1,\"Around the house \");\r\npd4.setInt(2,4);\t\t\t\r\n\tpd4.executeUpdate();*/\r\n\t\r\n\t\t\tPreparedStatement pd5=con.prepareStatement(\"update cusbio set name=?,address=?,city=? where id=?\");\r\n\t\t\tpd5.setString(1,name);\r\n\t\t\tpd5.setString(2,address);\r\n\t\t\tpd5.setString(3,city);\r\n\t\t\tpd5.setInt(4,id);\r\n\t\t\tpd5.executeUpdate();\r\n\t\t\tcon.close();\r\n\t\r\n\t\t\r\n\t\t\r\n\t}catch(SQLException e){\r\n\t\te.printStackTrace();\r\n\t}\r\n\t\r\n\t}catch(ClassNotFoundException e){\r\n\te.printStackTrace();\r\n}\r\n\t}",
"public String insertContactStatement() {\n\t\treturn \"INSERT INTO CONTACTS\"\n\t\t\t\t+ \"(\\\"NAME\\\", \\\"SURNAME\\\", \\\"TITLE\\\", \\\"ADDRESS\\\", \\\"CITY\\\", \\\"PROVINCE\\\", \"\n\t\t\t\t+ \"\\\"POSTAL_CODE\\\", \\\"REGION\\\", \\\"COUNTRY\\\", \\\"COMPANY_NAME\\\", \\\"WORKSTATION\\\", \"\n\t\t\t\t+ \"\\\"WORK_PHONE\\\", \\\"WORK_EXTENSION\\\", \\\"MOBILE_PHONE\\\", \\\"FAX_NUMBER\\\", \\\"EMAIL\\\", \"\n\t\t\t\t+ \"\\\"CONTACT_TYPE_ID\\\", \\\"NOTES\\\" )\"\n\t\t\t\t+ \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n\t}"
] |
[
"0.7237608",
"0.70615846",
"0.70599073",
"0.7047677",
"0.68344766",
"0.67971295",
"0.6792392",
"0.66321474",
"0.65681845",
"0.652344",
"0.64894956",
"0.6474434",
"0.6472098",
"0.64428747",
"0.6436767",
"0.64298856",
"0.63942033",
"0.6390655",
"0.6294027",
"0.6259522",
"0.62587816",
"0.62446994",
"0.6226507",
"0.62238455",
"0.62119806",
"0.62061125",
"0.62026614",
"0.6187356",
"0.6181462",
"0.615928",
"0.6157808",
"0.61292434",
"0.6121312",
"0.61142254",
"0.6096374",
"0.6084598",
"0.6080434",
"0.60790783",
"0.60704744",
"0.60700405",
"0.59823555",
"0.5972828",
"0.5964024",
"0.5951537",
"0.59497994",
"0.5940371",
"0.59394425",
"0.59372795",
"0.59342194",
"0.59050494",
"0.5882271",
"0.587072",
"0.58640236",
"0.5849509",
"0.5843354",
"0.58381957",
"0.582468",
"0.58222914",
"0.5821822",
"0.58172256",
"0.58095163",
"0.5807289",
"0.57901734",
"0.5787683",
"0.57737654",
"0.5772808",
"0.5768406",
"0.575963",
"0.5758702",
"0.57480687",
"0.5745504",
"0.5743198",
"0.57425946",
"0.573564",
"0.5726881",
"0.5710019",
"0.57033956",
"0.5698542",
"0.5696082",
"0.5692881",
"0.56920016",
"0.56592953",
"0.56548923",
"0.5645719",
"0.5642974",
"0.5640936",
"0.56371105",
"0.56370074",
"0.56237745",
"0.56225306",
"0.5617927",
"0.5617251",
"0.5615236",
"0.5615005",
"0.5607285",
"0.5598736",
"0.5595756",
"0.5591441",
"0.55874383",
"0.55747736"
] |
0.6480368
|
11
|
String sql="update emp99 set name='"+p.getName()+"',salary="+p.getSalary()+",+ designation='"+p.getDesignation()+"' where id="+p.getId()+"";
|
public void update(Emp p){
String sql="UPDATE emp99 set name=?, salary=?, designation=? WHERE id="+p.getId();
template.update(sql, p.getName(),p.getSalary(),p.getDesignation());
/*return template.execute(sql, new PreparedStatementCallback<Boolean>() {
@Override
public Boolean doInPreparedStatement(PreparedStatement ps) throws SQLException, DataAccessException {
ps.setString(1, p.getName());
ps.setFloat(2, p.getSalary());
ps.setString(3, p.getDesignation());
ps.setInt(4, p.getId());
return ps.execute();
}
});*/
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void updateData() throws SQLException {\n pst=con.prepareStatement(\"update employee set name=?,city=? where id=?\");\n System.out.println(\"Enter name: \");\n String name=sc.next();\n pst.setString(1,name);\n\n System.out.println(\"Enter city: \");\n String city=sc.next();\n pst.setString(2,city);\n\n System.out.println(\"Enter id: \");\n int id=sc.nextInt();\n pst.setInt(3,id);\n pst.execute();\n\n System.out.println(\"Data updated successfully\");\n }",
"public int Editcomp(Long comp_id, String compname, String address, String city,\r\n\t\tString state, Long offno, Long faxno, String website, String e_mail) throws SQLException {\nint i =DbConnect.getStatement().executeUpdate(\"update company set address='\"+address+\"',city='\"+city+\"',state='\"+state+\"',offno=\"+offno+\",faxno=\"+faxno+\",website='\"+website+\"',email='\"+e_mail+\"'where comp_id=\"+comp_id+\" \");\r\n\treturn i;\r\n}",
"public void updatedata()throws ClassNotFoundException,SQLException {\n\t\tScanner s=new Scanner(System.in);\r\n\t\tStatement smt=(Statement) con.getConnection().createStatement();\r\n\t\tSystem.out.println(\"Enter Id:\");\r\n\t\tint rollno=s.nextInt();\r\n\t\tSystem.out.println(\"Enter new name:\");\r\n\t\tString name=s.next();\r\n\t\t//System.out.println(\"Enter new year:\");\r\n\t\t//String year=s.next();\r\n\t\t//System.out.println(\"Enter new Department:\");\r\n\t\t//String dep=s.next();\r\n\t\tPreparedStatement ps=con.getConnection().prepareStatement(\"update student set Name=? where RollNo=?\");\r\n\t\tps.setString(1, name);\r\n\t\tps.setInt(2, rollno);\r\n\t\tps.executeUpdate();\r\n\t\tSystem.out.println(\"Successfully Updated...\");\r\n\t}",
"public void update (int ID, String frist_name, String lastName, String nationality, \n int age, Date commingDate, Date checkOutDate){\n String qury = \"update customer\\n\" +\n \"set First_name = '\"+frist_name+\"', Last_name = '\"+lastName+\"', nationality = '\"+\n nationality+\"', age = \"+age+\", coming_date = '\"\n +commingDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate().plusDays(2)+\n \"', check_out_date = '\"+checkOutDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate().plusDays(2)+\"'\\n\" +\n \"where customer_id = \"+ID;\n try {\n statement.executeUpdate(qury);\n }catch (SQLException e)\n {\n e.printStackTrace();\n }finally{\n setQuery(DEFUALT_QUERY);\n }\n }",
"public int Edbroker(Long broker_id, String firstname, String lastname,\r\n\t\tString address, String gender, String eMail, Long phone,\r\n\t\tString experience) throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"update broker set first_name='\"+firstname+\"',last_name='\"+lastname+\"',address='\"+address+\"',gender='\"+gender+\"',e_mail='\"+eMail+\"',phone=\"+phone+\",experience='\"+experience+\"' where broker_id=\"+broker_id+\"\");\r\n\treturn i;\r\n}",
"public void updatehotelincome(double price ){\n String query = \"update Hotel set Income = Income + ? \";\n \n try {\n PreparedStatement Query = conn.prepareStatement(query);\n Query.setDouble(1,price);\n Query.execute();\n \n } catch (SQLException ex) {\n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }",
"public void updateEmployee(Employee employee) throws SQLException {\n PreparedStatement preparedStatement = null;\n MysqlDbManager mysqlDb = MysqlDbManager.getInstance();\n String SQL = \"UPDATE employees SET surname=?, name=?, gender=?, marital_status=?, salary=?, dob=? WHERE idEmployee=?\";\n try {\n mysqlDb.getNewConnection();\n preparedStatement = mysqlDb.getConnection().prepareStatement(SQL);\n preparedStatement.setString(1, employee.getSurname());\n preparedStatement.setString(2, employee.getName());\n preparedStatement.setString(3, employee.getGender());\n preparedStatement.setString(4, employee.getMaritalStatus());\n preparedStatement.setInt(5, employee.getSalary());\n preparedStatement.setDate(6, new Date(employee.getDob().getTime()));\n preparedStatement.setInt(7, employee.getId());\n mysqlDb.executePreparedUpdate(preparedStatement);\n } catch (NullPointerException e) {\n LOGGER.log(Level.SEVERE, \"There is no access to the mysql database: \" + e.toString());\n } catch (SQLException e) {\n LOGGER.log(Level.SEVERE, \"SQLException\" + e.toString());\n } finally {\n try {\n if (preparedStatement != null) {\n preparedStatement.close();\n }\n if (!mysqlDb.getConnection().isClosed()) {\n mysqlDb.getConnection().close();\n }\n } catch (SQLException e) {\n LOGGER.log(Level.SEVERE, \"SQLException\" + e.toString());\n }\n }\n }",
"public String updateByPrimaryKeySelective(Emp record) {\n BEGIN();\n UPDATE(\"emp\");\n \n if (record.getName() != null) {\n SET(\"name = #{name,jdbcType=VARCHAR}\");\n }\n \n if (record.getSex() != null) {\n SET(\"sex = #{sex,jdbcType=CHAR}\");\n }\n \n if (record.getJob() != null) {\n SET(\"job = #{job,jdbcType=VARCHAR}\");\n }\n \n if (record.getSalary() != null) {\n SET(\"salary = #{salary,jdbcType=DECIMAL}\");\n }\n \n if (record.getHiredate() != null) {\n SET(\"hiredate = #{hiredate,jdbcType=DATE}\");\n }\n \n if (record.getDeptno() != null) {\n SET(\"deptno = #{deptno,jdbcType=INTEGER}\");\n }\n \n WHERE(\"id = #{id,jdbcType=INTEGER}\");\n \n return SQL();\n }",
"public void test_update() throws Exception {\n\t\tConnection conn = null;\r\n\t\tPreparedStatement stmt = null;\r\n\t\ttry {\r\n conn = jdbcutils.getConnection();\r\n //定义sql\r\n String sql = \"update employee set salary=? where EMP_id = ?\";\r\n //获取执行sql的对象\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1,10000);\r\n stmt.setInt(2,1);\r\n \r\n //执行sql\r\n stmt.executeUpdate(); \r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }finally {\r\n jdbcutils.close(stmt,conn);\r\n }\r\n\t\t test_select a = new test_select();\r\n\t a.test_select();\r\n\t}",
"@Override\n\tpublic void update(Join j) {\n\t\tString sql = \"update Join set pwd = ?, name = ?, email = ? where id = ?\";\n\t\tPreparedStatement pstmt = null;\n\t\tSystem.out.println(\"dao\"+j.getId());\n\t\tSystem.out.println(\"dao\"+j.getPwd());\n\t\tSystem.out.println(\"dao\"+j.getName());\n\t\tSystem.out.println(\"dao\"+j.getEmail());\n\t\ttry {\n\t\t\tconn = dataSource.getConnection();\n\t\t\tpstmt = conn.prepareStatement(sql);\n\t\t\tpstmt.setString(1, j.getPwd());\n\t\t\tpstmt.setString(2, j.getName());\n\t\t\tpstmt.setString(3, j.getEmail()); \n\t\t\tpstmt.setString(4, j.getId());\n\t\t\tpstmt.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tJdbcUtils.closeConnection(conn);\n\t\t} \n\t}",
"public static void modifyPatient(String id,String title, String fname,String sname,String bd,String ph,String pl){\r\n\t\ttry{\r\n\t\t\t// this is how you connect\r\n\t\t\tconnection = DriverManager.getConnection(connectionString);\r\n\t\t\tstmt = connection.prepareStatement(\"UPDATE Patient SET Title =?, Forename=?,Surname=?,Birthdate=?,Phone=?, Plan=? WHERE ID=?;\");\r\n\t\t\tstmt.setString(1, title);\r\n\t\t\tstmt.setString(2, fname);\r\n\t\t\tstmt.setString(3, sname);\r\n\t\t\tstmt.setString(4, bd);\r\n\t\t\tstmt.setString(5, ph);\r\n\t\t\tstmt.setString(5, pl);\r\n\t\t\tstmt.setString(5, id);\r\n\t\t\tstmt.executeUpdate();\r\n\t\t}\r\n\t\tcatch (SQLException ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}",
"public static int update(int name, int phone, String dob, String problem)\n {\n int row_update = 0;\n try\n {\n Connection con = MyConnection.connect();//get connection\n Statement stmt = con.createStatement();\n \n String qry = \"update patient set name=\"+name+\" dob=\"+dob+\" problem=\"+problem+\" where phone=\"+phone;;\n \n row_update = stmt.executeUpdate(qry);\n }\n catch(Exception ex)\n {\n System.out.println(\"Update Error :\"+ex);\n }\n \n return row_update;\n }",
"public int modificarPresidente(int idpresi,int idcam,int idequipo, String nombre, String paterno,String materno,String dni,String fecNac,String fechaDirect,String telefono){\n sql=\"UPDATE presidente set idCampeonato='\"+idcam+\"', idEquipo='\"+idequipo+\"',Nombre_pres='\"+nombre+\"',Ap_presidente='\"+paterno+\"',Am_presidente='\"+materno+\"',Dni='\"+dni+\"',Fec_Nac='\"+fecNac+\"',Fecha_presidente='\"+fechaDirect+\"',Telefono='\"+telefono+\"' WHERE idPresidente='\"+idpresi+\"'\";\r\n \r\n try {\r\n cx = Conexion.coneccion();\r\n st = cx.createStatement();\r\n res = st.executeUpdate(sql);\r\n } catch (Exception e) {\r\n JOptionPane.showMessageDialog(null, \"Error: \"+e);\r\n }\r\n return res;\r\n }",
"@Override\n\tpublic void update(double sal, int id) {\n\t\tConnection con=null;\n\t\tPreparedStatement stmt=null;\n\t\t\n\t\ttry {\n\t\t\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/ems?user=root&password=root\");\n\t\t\tString query=\"update employee set sal=? where id=?\";\n\t\t\tstmt=con.prepareStatement(query);\n\t\t\tstmt.setDouble(1, sal);\n\t\t\tstmt.setInt(2, id);\n\t\t\tstmt.execute();\n\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}",
"public int req(Long req_id)throws SQLException {\nint i=DbConnect.getStatement().executeUpdate(\"update requested set status='processed',remark='bought fail' where reqid=\"+req_id+\"\");\t\r\n\treturn i;\r\n}",
"public static int update(Periode p){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection();\n //melakukan query database untuk merubah data berdasarkan id atau primary key\n PreparedStatement ps=con.prepareStatement( \n \"update periode set tahun=?, awal=?, akhir=?, status=? where id=?\"); \n ps.setString(1,p.getTahun()); \n ps.setString(2,p.getAwal()); \n ps.setString(3,p.getAkhir()); \n ps.setString(4,p.getStatus()); \n ps.setInt(5,p.getId()); \n status=ps.executeUpdate(); \n }catch(Exception e){System.out.println(e);} \n return status; \n }",
"private void rSButton8ActionPerformed(java.awt.event.ActionEvent evt) {\n try{\n String val1=jtext15.getText();\n String val2=jtext16.getText();\n String val3;\n val3 = (String) jComboBox4.getSelectedItem();\n String val4=jtext17.getText();\n String val5=jtext18.getText();\n String val6=jtext19.getText();\n String val7=jtext20.getText();\n String val8=jtext21.getText();\n \n String sql=\"update book set book_title='\"+val2+\"',category='\"+val3+\"',author_name='\"+val4+\"',publication='\"+val5+\"',edition='\"+val6+\"',pages='\"+val7+\"',price='\"+val8+\"' where book_id='\"+val1+\"'\";\n pst=(OraclePreparedStatement) conn.prepareStatement(sql);\n pst.execute();\n JOptionPane.showMessageDialog(null,\"Book Details Modified\"); \n refresh3();\n update1();\n }catch(Exception e)\n {\n JOptionPane.showMessageDialog(null,e); \n }\n }",
"public int update(person p){\n\t\t\treturn j.update(\" update person\"+ \" set name=?,location=?,birthdate=?\"+\" where id=? \", new Object[] {p.getName(),p.getLocation(),new Timestamp(p.getDate().getTime()),p.getId()});\r\n\t\t\r\n\t}",
"public Employee update(Session session, Employee emp) {\n Employee bbddEmp;\n Transaction t = session.beginTransaction();\n Query query = session.createQuery(\"from Employee where\"\n + \" name = :name and nifnie = :nifnie and companyEntryDate=:\"\n + \"companyEntryDate \");\n query.setParameter(\"name\", emp.getName());\n query.setParameter(\"nifnie\", emp.getNifnie());\n query.setDate(\"companyEntryDate\", emp.getCompanyEntryDate());\n bbddEmp = (Employee) query.list().get(0);\n\n updateColumns(emp, bbddEmp);\n session.update(bbddEmp);\n t.commit();\n return bbddEmp;\n }",
"@Override\r\n\tpublic boolean updateEmployee(Employee employee) {\n\t\tboolean added = false;\r\n\t\tString updateData = \"update employee set empName=?, salary=? ,technology=? where empId=?\";\r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = dataSource.getConnection().prepareStatement(updateData);\r\n\t\t\tps.setString(1, employee.getName());\r\n\t\t\tps.setInt(2, employee.getSalary());\r\n\t\t\tps.setString(3, employee.getTechnoogy());\r\n\t\t\tps.setInt(4, employee.getEmpId());\r\n\r\n\t\t\tint updated = ps.executeUpdate();\r\n\t\t\tif (updated > 0) {\r\n\t\t\t\tadded = true;\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn added;\r\n\t}",
"private void updateBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_updateBtnMouseClicked\n String id = pidTxt.getText().toString();\n String name = pnameTxt.getText().toString();\n String price = pperpriceTxt.getText().toString();\n String quantity = pquanityTxt.getText().toString();\n String date = pdateTxt.getText().toString();\n\n try {\n String Query = \"UPDATE `stock` SET `Product_Name`=?,`Quantity`=?,`Entry_Date`=?,`Price`=? Where `Product_ID`=?\";\n\n pstm = con.prepareStatement(Query);\n\n pstm.setString(1, name);\n\n pstm.setInt(2, Integer.parseInt(quantity));\n pstm.setString(3, date);\n pstm.setInt(4, Integer.parseInt(price));\n pstm.setInt(5, Integer.parseInt(id));\n pstm.executeUpdate();\n } catch (Exception ex) {\n\n JOptionPane.showMessageDialog(null, \"Data Not Found To be Updated\");\n }\n\n //Refersh Table\n refTable();\n\n }",
"@Override\n\tpublic void updateProfile(patient pupdate) {\n\t\t// TODO Auto-generated method stub\n\t\tString query = \" UPDATE pmohan_patient_details SET firstname = ? , lastname = ? , gender = ? , dob = ?, age =? WHERE pid = ?;\";\n\t\ttry(PreparedStatement statement = connection.prepareStatement(query))\n\t\t{ \n\t\t\t statement.setString(1, pupdate.getFirstname());\n\t\t\t statement.setString(2, pupdate.getLastname());\n\t\t\t statement.setString(3, pupdate.getGender());\n\t\t\t statement.setString(4, pupdate.getDob());\n\t\t\t statement.setInt(5, pupdate.getAge());\n\t\t\t statement.setInt(6, pupdate.getPid());\n\t\t\tstatement.executeUpdate();\n\t\t\t System.out.println(\"update done\");\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"update problem \" + e);\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"private void jbtn_updateActionPerformed(ActionEvent evt) {\n\t\ttry {\n \t\tconn cc=new conn();\n \t\tpst=cc.c.prepareStatement(\"update medicine set medicine_name=?,brand=?,mfd_date=?,expiry_date=?,price=? where medicine_name=?\");\n \t\tDefaultTableModel RecordTable=(DefaultTableModel)jTable1.getModel();\n \t\tint Selectedrow=jTable1.getSelectedRow();\n \t\tid=RecordTable.getValueAt(Selectedrow,0).toString();\n \t\t\n \t\tpst.setString(1,jtxt_medname.getText());\n \t\tpst.setString(2,jtxt_brand.getText());\n \t\tpst.setString(3,jtxt_mfd.getText());\n \t\tpst.setString(4,jtxt_exp.getText());\n \t\tpst.setString(5,jtxt_price.getText());\n \t\tpst.setString(6,id);\n \t\t\n \t\tpst.executeUpdate();\n \t\t\n \t\tJOptionPane.showMessageDialog(this, \"Record Updated\");\n \t\tupDateDB();\n \t\ttxtblank();\n \t\t\n \t\n \t}\n \tcatch (Exception e) {\n\t\t\t// TODO: handle exception\n \t\tJOptionPane.showMessageDialog(null,e);\n\t\t}\n\t\t\n\t}",
"@Override\n\tpublic void updateInformation(String firstname, String lastname, String email, int id) {\t\t\n\t\ttry {\n\t\t\tString sql = \"update employees set first_name = '\"+firstname+\"', last_name='\"+lastname+\"',email = '\"+email+\"' where employee_id=\"+id; \n\t\t\tConnection connection = DBConnectionUtil.getConnection();\n\t\t\tStatement statement = connection.createStatement();\t\t\n\t\t\tstatement.executeUpdate(sql);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void updateChallanDtl(String[] empId,String[] challanTds,String[] challanEducess,String[] challanSur,String[] challanTotTax,String[] challanCode){\r\n\t\tObject[][] param = null;\r\n\t\ttry{\r\n\t\t\tparam=new Object[empId.length][6];\r\n\t\t\t\r\n\t\t\tfor(int i=0;i<empId.length;i++){\r\n\t\t\t\tparam[i][0]=challanTds[i];\r\n\t\t\t\tparam[i][1]=challanSur[i];\r\n\t\t\t\tparam[i][2]=challanEducess[i];\r\n\t\t\t\tparam[i][3]=challanTotTax[i];\r\n\t\t\t//\tparam[i][4]=dedDate[i];\r\n\t\t\t//\tparam[i][5]=depDate[i];\r\n\t\t\t//\tparam[i][6]=pay[i];\r\n\t\t\t\tparam[i][4]=empId[i];\r\n\t\t\t\tparam[i][5]=challanCode[i];\r\n\t\t\t} //end of loop\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\tlogger.error(\"exception in updateChallanDtl empId for loop\",e);\r\n\t\t\t} //end of catch\r\n\t\t\t try {\r\n\t\t\t\tString query = \"UPDATE HRMS_TAX_CHALLAN_DTL SET CHALLAN_TDS=?,CHALLAN_SURCHARGE=?,CHALLAN_EDU_CESS=?,CHALLAN_TOTAL_TAX=?\"\r\n\t\t\t\t\t\t+ \" WHERE EMP_ID=? AND CHALLAN_CODE=?\";\r\n\t\t\t\tgetSqlModel().singleExecute(query, param);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tlogger.error(\"exception in updateChallanDtl query\",e);\r\n\t\t\t} //end of catch\r\n\t}",
"public static void main(String[] args) throws SQLException {\n\n ResultSet result= DB_Utility.getResult(\"select * from employees\");\n\n Map<String,Integer>employeeInfo=new LinkedHashMap<>();\n\n while (result.next()){\n\n String firstName=result.getString(\"first_name\");\n String lastName=result.getString(\"last_name\");\n String fullName=firstName+\" \"+lastName;\n\n Integer salary=result.getInt(\"salary\");\n System.out.println(fullName+\" \"+salary);\n\n employeeInfo.put(fullName,salary);\n\n\n }\n System.out.println(employeeInfo);\n System.out.println(employeeInfo.get(\"Steven King\")==24000);\n\n String sql=\"Update developers set name = 'Abdullah' where name= 'Nurullah'\";\n\n }",
"public void updateStudent(int id,Student student) {\n\t\tQuery q=session.createQuery(\"update Student set name=:stname ,city=:stcity where id=:stid\"); \n\t\tq.setParameter(\"stname\",student.getName()); \n\t\tq.setParameter(\"stcity\",student.getCity()); \n\t\tq.setParameter(\"stid\",id); \n\t\t \n\t\tq.executeUpdate(); \n\t\t\n\t}",
"public static String altaLogico(int id){\n String query=\"UPDATE empleado SET activo=1 WHERE idEmpleado=\"+id;\n return query;\n}",
"@Override\n\tpublic void update(Student student) {\n\t\tString query=\"update student set name='\"+student.getName()+\"',age='\"+student.getAge()+\"' where id='\"+student.getId()+\"'\";\n\t\tint result=jdbcTemplate.update(query);\n\t\tSystem.out.println(result+\" updated successfully\");\n\t}",
"public void editar(String update){\n try {\n Statement stm = Conexion.getInstancia().createStatement();\n stm.executeUpdate(update);\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n }",
"@Override\r\n\tpublic void pUpdate(String name, String depict, String type, double price, String img,String phone, int PS2_id,int P_id) {\n\t\tConnection connection = DBUtils.getConnection();\r\n\t\tPreparedStatement preparedStatement = null;\r\n\t\tString sql = \"update product set name=?,depict=?,type=?,price=?,img=?,phone=?,PS2_id=? where P_id=?\";\r\n\t try {\r\n\t \tconnection.setAutoCommit(false);\r\n\t \tpreparedStatement = connection.prepareStatement(sql);\r\n\t\t\tpreparedStatement.setString(1, name);\r\n\t\t\tpreparedStatement.setString(2, depict);\r\n\t\t\tpreparedStatement.setString(3, type);\r\n\t\t\tpreparedStatement.setDouble(4, price);\r\n\t\t\tpreparedStatement.setString(5, img);\r\n\t\t\tpreparedStatement.setString(6, phone);\r\n\t\t\tpreparedStatement.setInt(7, PS2_id);\r\n\t\t\tpreparedStatement.setInt(8,P_id);\r\n\t\t\tpreparedStatement.execute();\r\n\t\t\tconnection.commit();\r\n\t\t} catch (SQLException e) {\r\n\t\t\ttry {\r\n\t\t\t\tconnection.rollback();\r\n\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tDBUtils.release(null, preparedStatement, connection);\r\n\t\t}\r\n\t}",
"private void update() {\n\n\t\tfloat shopping = Float.parseFloat(label_2.getText());\n\t\tfloat giveing = Float.parseFloat(label_5.getText());\n\t\tfloat companyDemand = Float.parseFloat(label_7.getText());\n\n\t\ttry {\n\t\t\tPreparedStatement statement = DBConnection.connection\n\t\t\t\t\t.prepareStatement(\"update customer_list set Shopping_Account = \"\n\t\t\t\t\t\t\t+ shopping\n\t\t\t\t\t\t\t+ \" , Giving_Money_Account = \"\n\t\t\t\t\t\t\t+ giveing\n\t\t\t\t\t\t\t+ \", Company_demand = \"\n\t\t\t\t\t\t\t+ companyDemand\n\t\t\t\t\t\t\t+ \" where Name = '\"\n\t\t\t\t\t\t\t+ name\n\t\t\t\t\t\t\t+ \"' And Last_Name = '\"\n\t\t\t\t\t\t\t+ lastName + \"' \");\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\t}",
"public void modificarPaciente(String idpac, String dni, String nom, String ape, String dir, String ubig, String tel1, String tel2, String edad)\n {\n try\n {\n PreparedStatement pstm=(PreparedStatement)\n con.getConnection().prepareStatement(\"UPDATE paciente SET DNI='\"+dni+\"' , nombres='\"+nom+\"', apellidos='\"+ape+\"', direccion='\"+dir+\"', ubigeo='\"+ubig+\"', telefono1='\"+tel1+\"', telefono2='\"+tel2+\"', edad='\"+edad+\"' WHERE IdPaciente='\"+idpac+\"'\");\n pstm.executeUpdate();\n pstm.close();\n }\n catch(SQLException e)\n {\n System.out.println(e);\n }\n }",
"public String updateEvent(Event e){\n \n \n String result = \"0\";\n Connection con = null;\n //building the sql command\n String SQLCommand = \"Update event set name=?,start_time=?,end_time=? where id=?\";\n \n try{\n //obtain the database connection by calling getConn() \n con = getConn();\n //create the PreparedStatement from the Connection object by calling prepareCall\n //method, passing it the sql , parameters are represented by ? in the sql\n PreparedStatement ps = con.prepareStatement(SQLCommand); \n \n //setting the parameters values\n ps.setString(1, e.getName()); \n ps.setDate(2, new java.sql.Date(e.getStartTime().getTime()));\n ps.setDate(3, new java.sql.Date(e.getEndTime().getTime())); \n ps.setLong(4,e.getId());\n //ps.setLong(4, sp.getSeatingPlanID());\n \n \n //exceuting the insert or update operation \n ps.executeUpdate(); \n }\n catch (SQLException ex){\n ex.printStackTrace();\n result = ex.getMessage();\n }\n return result;\n }",
"public static void modifyAddress(String hn,String str, String dst,String city,String p,String id,String ohn,String opc){\r\n\t\ttry{\r\n\t\t\t// this is how you connect\r\n\t\t\tconnection = DriverManager.getConnection(connectionString);\r\n\t\t\t// in here you create a statement to execute different queries \r\n\t\t\tstmt = connection.prepareStatement(\"SELECT * FROM Address WHERE House_number='\"+hn+\"'AND Postcode='\"+p+\"';\");\r\n\t\t\tstmt.setString(1, String.valueOf(hn));\r\n\t\t\tstmt.setString(2, String.valueOf(p));\r\n\t\t\tdata = stmt.executeQuery();\r\n\t\t\tif(hn == ohn && p == opc){\r\n\t\t\t\tstmt = connection.prepareStatement(\"UPDATE Address SET Street = ? , District= ? ,City= ? , WHERE House_number= ? AND Postcode= ? ;\");\r\n\t\t\t\tstmt.setString(1, str);\r\n\t\t\t\tstmt.setString(2, dst);\r\n\t\t\t\tstmt.setString(3, city);\r\n\t\t\t\tstmt.setString(4, hn);\r\n\t\t\t\tstmt.setString(5, p);\r\n\t\t\t\tstmt.executeUpdate();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!data.isBeforeFirst()){\r\n\t\t\t\tstmt = connection.prepareStatement(\"INSERT INTO Address VALUES(?,?,?,?,?);\");\r\n\t\t\t\tstmt.setString(1, hn);\r\n\t\t\t\tstmt.setString(2, str);\r\n\t\t\t\tstmt.setString(3, dst);\r\n\t\t\t\tstmt.setString(4, city);\r\n\t\t\t\tstmt.setString(5, p);\r\n\t\t\t\tstmt.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t\tstmt = connection.prepareStatement(\"UPDATE Patient SET House_number = ? , Postcode= ? WHERE ID= ? ;\");\r\n\t\t\t\tstmt.setString(1, hn);\r\n\t\t\t\tstmt.setString(2, p);\r\n\t\t\t\tstmt.setString(3, id);\r\n\t\t\t\tstmt.executeUpdate();\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tstmt = connection.prepareStatement(\"UPDATE Patient SET House_number = ? , Postcode= ? WHERE ID= ? ;\");\r\n\t\t\t\tstmt.setString(1, hn);\r\n\t\t\t\tstmt.setString(2, p);\r\n\t\t\t\tstmt.setString(3, id);\r\n\t\t\t\tstmt.executeUpdate();\r\n\t\t\t}\r\n\t\t\tstmt = connection.prepareStatement(\"SELECT * FROM Patient WHERE House_number= ? AND Postcode= ? ;\");\r\n\t\t\tstmt.setString(1, ohn);\r\n\t\t\tstmt.setString(2, opc);\r\n\t\t\tdata = stmt.executeQuery();\r\n\t\t\tif(!data.isBeforeFirst()){\r\n\t\t\t\tstmt = connection.prepareStatement(\"DELETE FROM Address WHERE House_number= ? AND Postcode= ? \");\r\n\t\t\t\tstmt.setString(1, ohn);\r\n\t\t\t\tstmt.setString(2, opc);\r\n\t\t\t\tstmt.executeUpdate();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch (SQLException ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}",
"@Update({\n \"update generalcourseinformation\",\n \"set code = #{code,jdbcType=VARCHAR},\",\n \"name = #{name,jdbcType=VARCHAR},\",\n \"teacher = #{teacher,jdbcType=VARCHAR},\",\n \"credit = #{credit,jdbcType=INTEGER},\",\n \"week = #{week,jdbcType=VARCHAR},\",\n \"day_detail1 = #{day_detail1,jdbcType=VARCHAR},\",\n \"day_detail2 = #{day_detail2,jdbcType=VARCHAR},\",\n \"location = #{location,jdbcType=VARCHAR},\",\n \"remaining = #{remaining,jdbcType=INTEGER},\",\n \"total = #{total,jdbcType=INTEGER},\",\n \"extra = #{extra,jdbcType=VARCHAR},\",\n \"index = #{index,jdbcType=INTEGER}\",\n \"where courseid = #{courseid,jdbcType=VARCHAR}\"\n })\n int updateByPrimaryKey(GeneralCourse record);",
"public int updateEmployeeRecord(Employee employee) {\n\t\ttry {\n\t\t\t\n\t\t\tString query = \"update employeedbaddress set eName=?, eDesignation=?, eGender=?, eSalary=?, eUsername=?, ePassword=?, street=?, city=?, state=?, pincode=?, contact=?, email=? where eNo=?\";\n\t\t\tPreparedStatement ps = connection.prepareStatement(query);\n\t\t\tps.setString(1, employee.getEname());\n\t\t\tps.setString(2, employee.getEdesignation());\n\t\t\tps.setString(3, employee.getEgender());\n\t\t\tps.setDouble(4, employee.getEsalary());\n\t\t\tps.setString(5, employee.getEusername());\n\t\t\tps.setString(6, employee.getEpassword());\n\t\t\tps.setString(7, employee.getStreet());\n\t\t\tps.setString(8, employee.getCity());\n\t\t\tps.setString(9, employee.getState());\n\t\t\tps.setInt(10, employee.getPincode());\n\t\t\tps.setString(11, employee.getContact());\n\t\t\tps.setString(12, employee.getEmail());\n\t\t\tps.setInt(13, employee.getEno());\n\t\t\tresult = ps.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}",
"public void update(Empresa p) throws ClassNotFoundException {\r\n java.sql.Connection con = ConnectionFactory.getConnection();\r\n PreparedStatement stmt = null;\r\n try {\r\n stmt = con.prepareStatement(\"UPDATE tbempresas SET nomeEmp = ? WHERE codEmp = ?\");\r\n\r\n stmt.setString(1, p.getNomeEmp());\r\n stmt.setInt(2, p.getCodEmp());\r\n stmt.executeUpdate();\r\n\r\n JOptionPane.showMessageDialog(null, \"Atualizado com sucesso!\");\r\n } catch (SQLException error) {\r\n System.out.print(\"Erro ao atualizar\" + error);\r\n } finally {\r\n ConnectionFactory.closeConnection(con, stmt);\r\n }\r\n }",
"@Update({\n \"update dept\",\n \"set dept_name = #{deptName,jdbcType=VARCHAR}\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int updateByPrimaryKey(Dept record);",
"public void updateEmp(Emp emp) {\n\t\t\n\t}",
"void update(EmployeeDetail detail) throws DBException;",
"public void updateStudentCOOP(StudentCOOP toUpdate) {\n openConnection();\n try {\n updateStudent = conn.prepareStatement(\"update app.studentcoop set firstname=?, lastname=?, gender=?, address=?,\"\n + \" contact=?, email=?, workemail=?, notes=?, subject=?, semestercompleted=?, mark=?, wam=?\");\n \n updateStudent.setString(1, toUpdate.getZID());\n updateStudent.setString(1, toUpdate.getFName());\n updateStudent.setString(2, toUpdate.getLName());\n updateStudent.setString(3, toUpdate.getGEnder());\n updateStudent.setString(4, toUpdate.getADdress());\n updateStudent.setInt(5, toUpdate.getCOntact());\n updateStudent.setString(6, toUpdate.getEMail());\n updateStudent.setString(7, toUpdate.getWOrkemail());\n updateStudent.setString(8, toUpdate.getNOtes());\n updateStudent.setString(9, toUpdate.getSUbject());\n updateStudent.setInt(10, toUpdate.getSEmestercompleted());\n updateStudent.setDouble(11, toUpdate.getMArk());\n updateStudent.setDouble(12, toUpdate.getWAm());\n\n updateStudent.executeUpdate();\n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n closeConnection();\n }",
"public void updateUser(User user) {\n\n String updateSql = \"update USER set name = ?, age = ? , salary = ? where id = ?\";\n jdbcTemplate.update(updateSql, user.getName(), user.getAge(), user.getSalary(), user.getId());\n }",
"public void updateStaff(String name, String dob, String email, String number, String address, String password) throws SQLException {\n st.executeUpdate(\"UPDATE IOTBAY.STAFF SET \"\n + \"NAME ='\" + name \n + \"DATEOFBIRTH ='\" + dob \n + \"PHONENUMBER ='\" + number \n + \"ADDRESS ='\" + address \n + \"PASSWORD ='\" + password \n + \"' WHERE EMAIL='\" + email + \"'\" );\n\n }",
"public void update(TdiaryArticle obj) throws SQLException {\n\r\n\t}",
"public void modificarempleado(Empleado empleado)throws SQLException{\n Connection conexion = null;\n \n try{\n conexion = GestionSQL.openConnection();\n if(conexion.getAutoCommit()){\n conexion.setAutoCommit(false);\n }\n \n EmpleadosDatos empleadodatos = new EmpleadosDatos();\n empleadodatos.update(empleado);\n conexion.commit();\n System.out.println(\"Empleado modificado con exito\");\n }catch(SQLException e){\n System.out.println(\"Error en modificacion de empleado\");\n e.printStackTrace();\n try{\n conexion.rollback();\n }catch(SQLException ex){\n ex.printStackTrace();\n System.out.println(\"Error en rollback, vamos a morir todos\");\n ex.printStackTrace();\n }\n }finally{\n if(conexion != null){\n conexion.close();\n }\n }\n }",
"public boolean diseaseUpdate(final DiseasePojo dt) \n\t{\n\t\tString query=\"UPDATE diseasemaster set DISEASENAME = ?, DISEASECODE = ? where DISEASEID = ?\";\n\n\t\t//String query = \"UPDATE patientmaster set PATIENTFIRSTNAME = ? WHERE PATIENTID = ?\";\n\t\t\n\t\treturn jdbcTemplate.execute(query,new PreparedStatementCallback<Boolean>()\n\t\t{ \n\t\tpublic Boolean doInPreparedStatement(PreparedStatement ps) \n\t\t throws SQLException, DataAccessException { \n\t\t \n\t\t\tps.setString(1, dt.getDiseaseName());\n\t\t\tps.setString(2, dt.getDiseaseCode());\n\t\t\tps.setInt(3, dt.getDiseaseId());\n\t\t return ps.execute();\n\t\t}\n\t\t});\n\t}",
"public String updateContactStatement() {\n\t\treturn \"UPDATE CONTACTS SET (name, surname, title, address, city, \"\n\t\t\t\t+ \"province, postal_Code, region, country , company_Name, \"\n\t\t\t\t+ \"workstation, work_Phone, work_Extension, mobile_Phone, \"\n\t\t\t\t+ \"fax_Number, email, contact_type_id, notes) = (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) \" + \"WHERE id=?\";\n\n\t}",
"@Override\r\n\tpublic void updateCourse(Course c) {\n\t\t\r\n\t\tint cid1 = c.getCid();\r\n\t\ttry\r\n\t\t{\r\n\t\tConnection connection=DBConnection.getConnection();\r\n\t\tString sqlQuery=\"update \"+TABLECourse+\" set \"+COLcname+\" = ?, \"+COLduration+\" = ?, \"+COLfees+\"=? where \"+COLcid+\" =\"+cid1;\r\n\t\t\r\n\t\tPreparedStatement pst = connection.prepareStatement(sqlQuery);\r\n\t\tpst.setString(1, c.getCname());\r\n\t\tpst.setInt(2, c.getCduration());\r\n\t\tpst.setInt(3, c.getCfees());\r\n\t\t\r\n\t\tpst.executeUpdate();\r\n\r\n\t\t\r\n\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}",
"public void update(String hql) {\n\r\n\t}",
"public void updatePay(String date, String des, String amit, String id) {\n\t ContentValues up=new ContentValues();\n\t up.put(Sales_Date, date);\n\t up.put(Sales_Des, des);\n\t \n\t up.put(Sales_Amt, amit);\n\t \n\t\tourDatabase.update(DATABASE_TABLE3, up, Sales_Id+\" = \"+id, null);\n\t\t\t\n\t\t\n\t}",
"public void update(Jiaqishenqing j) throws SQLException {\n JiaqishenqingDao dao = new JiaqishenqingDao();\n dao.update(j);\n }",
"public void onClick(View v) {\n final ContentValues data = new ContentValues();\n final ContentValues data2 = new ContentValues();\n\n Intent intent_main_return = this.getIntent();\n final String table_name = intent_main_return.getExtras().getString(\"table\");\n final String table_date = intent_main_return.getExtras().getString(\"table_date\");\n bbb = intent_main_return.getExtras().getString(\"amount_column\");\n String s_r= null;\n String p=\"Present\";\n String a=\"Absent\";\n s=e1.getText().toString();\n\n assert table_date != null;\n s_r = table_date.replace(\"/\",\"_\");\n int date_col_index = Integer.parseInt(bbb);\n String where2 = \"id ='\"+s+\"' \" ;\n String where = \"name ='\"+s+\"' AND date ='\"+table_date+\"'\" ;\n\n int id=v.getId();\n\n switch(id) {\n case R.id.button22:\n\n if(e1 != null && s.length()>0){\n data.put(\"address\",p);\n dbx.update(table_name,data, where, null);\n\n for(int ll=1;ll<=date_col_index;ll++){\n String sss= s_r+\"__\"+ll;\n data2.put(\"'\"+sss+\"'\",p);\n db_net.update(table_name,data2, where2, null);\n }\n\n Toast.makeText(getBaseContext(),\"Roll no. \"+s+\" set to be Present\", Toast.LENGTH_LONG).show();\n }\n\n else\n {\n Toast.makeText(Edit_records.this,\"Please type roll no.\", Toast.LENGTH_SHORT).show();\n }\n\n break;\n\n case R.id.button23:\n\n if(e1 != null && s.length()>0){\n data.put(\"address\",a);\n dbx.update(table_name,data, where, null);\n\n for(int ll=1;ll<=date_col_index;ll++){\n String sss= s_r+\"__\"+ll;\n data2.put(\"'\"+sss+\"'\",a);\n db_net.update(table_name,data2, where2, null);\n }\n\n Toast.makeText(getBaseContext(),\"Roll no. \"+s+\" set to be Absent\", Toast.LENGTH_LONG).show();\n }\n\n else\n {\n Toast.makeText(Edit_records.this,\"Please type roll no.\", Toast.LENGTH_SHORT).show();\n }\n\n break;\n }\n\n }",
"public boolean update(Product p){\n ContentValues contvalu= new ContentValues();\n //contvalu.put(\"date_created\", \"datetime('now')\");\n contvalu.put(\"name\",p.getName());\n contvalu.put(\"feature\",p.getFeature());\n contvalu.put(\"price\",p.getPrice());\n return (cx.update(\"Product\",contvalu,\"id=\"+p.getId(),null))>0;\n//-/-update2-////\n\n\n }",
"public void addEmployee(employee emp){\n try {\n \n \n String insert =\"INSERT INTO JEREMY.EMPLOYEE (NAME, USERNAME, PASSWORD) VALUES \"\n + \"('\"+emp.name+\"','\"\n +emp.username+\"','\"\n +emp.password+\"')\";\n \n System.out.println(insert);\n \n empstmt.executeUpdate(insert);\n\n emprs = stmt.executeQuery(\"SELECT * FROM JEREMY.EMPLOYEE\");\n total();\n } catch (Exception e) {\n System.out.println(\"SQL problem dbEmployee Addmployee()\" + e);\n }\n \n }",
"public static int update(User u){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection();\n //melakukan query database untuk merubah data berdasarkan id atau primary key\n PreparedStatement ps=con.prepareStatement( \n \"update t_user set user_name=?,nama_lengkap=?,password=?,hak_akses=? where id=?\"); \n ps.setString(1,u.getUserName()); \n ps.setString(2,u.getNamaLengkap()); \n ps.setString(3,u.getPassword()); \n ps.setString(4,u.getHakAkses()); \n ps.setInt(5,u.getId()); \n status=ps.executeUpdate(); \n }catch(Exception e){System.out.println(e);} \n return status; \n }",
"public void updateDiagnosisData() {\n\n SQLiteDatabase db = null;\n try {\n\n db = this.getWritableDatabase();\n\n db.execSQL(\"UPDATE diagnosis SET diagnosis_name = replace( diagnosis_name, ',', '-' ) \");\n db.execSQL(\"UPDATE diagnosis SET diagnosis_name = replace( diagnosis_name, '(', '( ' ) \");\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"public int updShare(Long cid, Long shareamt, String datee, Long noShare,Long sindex) throws Exception{\n\tint i=DbConnect.getStatement().executeUpdate(\"insert into share_details values(\"+cid+\",\"+noShare+\",\"+shareamt+\",'\"+datee+\"',\"+sindex+\")\");\r\n\treturn i;\r\n}",
"public static void updatestu(String stuid2,String stuname2,String stusex2, Date stubirth2, String stutel2, String stuacademy2, String stuclass2, String stuadd2) {\n\t\ttry{\n\t\t\tps = conn.prepareStatement(\"update student set Sname = ?, Ssex = ?, Sbirth = ?, Stel = ?, Sacademy = ?, Sclass = ?, Saddress = ? where ID = ? \");\n\t\t\tps.setString(1, stuname2);\n\t\t\tps.setString(2, stusex2);\t\t//可能出问题的地方\n\t\t\tps.setDate(3, stubirth2);\n\t\t\tps.setString(4, stutel2);\n\t\t\tps.setString(5, stuacademy2);\n\t\t\tps.setString(6, stuclass2);\n\t\t\tps.setString(7, stuadd2);\n\t\t\tps.setString(8, stuid2);\n\t\t\tps.executeUpdate();\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"学生记录修改成功!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\n\t\t}catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"数据修改失败!\", \"提示消息\", JOptionPane.ERROR_MESSAGE);\n\t\t\te1.printStackTrace();\n\t\t}\n\t}",
"public void update() {\n\t\tPreparedStatement stmt;\n\t\ttry {\n\t\t\tstmt = cn.prepareStatement(\n\t\t\t\t\t\"UPDATE Metal SET metalDissolvedBy = ?, molesOfAcidToDissolve = ? WHERE metalID = ?\");\n\t\t\tstmt.setInt(1, dissolvedBy);\n\t\t\tstmt.setDouble(2, molesOfAcidToDissolve);\n\t\t\tstmt.setInt(3, ID);\n\t\t\tstmt.execute();\n\t\t} catch (Exception e) {\n\t\t\tDatabaseException.detectError(e);\n\t\t}\n\t}",
"@Override\n\tpublic void updateTeachers(Professor ud) {\n\t\ttry{ \n\t\t\t\n\t\t\tstmt = conn.prepareStatement(\"UPDATE Professor set name=?,department=? where ssn=?\");\n\t\t\tstmt.setString(1, ud.getName());\n\t\t\tstmt.setString(2, ud.getDepartment());\n\t\t\tstmt.setString(3, ud.getSsn());\n\t\t\tstmt.executeUpdate();\n\t\t\t\n\t\t}catch(SQLException e){\n\t\t\tex=e;\n\t\t}finally{\n\t\t\tif(conn!=null){\n\t\t\t\ttry{\n\t\t\t\t\tconn.close();\n\t\t\t\t}catch(SQLException e){\n\t\t\t\t\tif(ex==null){\n\t\t\t\t\t\tex=e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\tif(ex!=null){\n\t\t\tthrow new RuntimeException(ex);\n\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void updateEmployee(int empid, int empNewSalary) {\n\t\t\n\t}",
"public void executeQuery() {\n\n \n String query=\"insert into Cost (Date,Employee_Cost,Selling,Inventory_Cost,Wastage) values ('\"+date+\"','\"+Employee_Amount+\"','\"+Sale_total_amount+\"','\"+Inventory_total_Cost+\"','\"+Wastage_Cost+\"')\";\n Connection con = DBconnect.connectdb();\n Statement st;\n\n try {\n st = con.createStatement();\n st.executeUpdate(query);\n\n \n } catch (Exception e) {\n // JOptionPane.showMessageDialog(null, e);\n\n }\n\n }",
"@Update(\"UPDATE patients SET first_name=#{firstName}, last_name=#{lastName}, PESEL=#{pesel}, \" +\n \"email=#{email}, phone_number=#{phoneNumber} WHERE id_patient=#{id}\")\n void updatePatient(Patient patient);",
"@Test\n public void update2()\n {\n int zzz = getJdbcTemplate().update(\"UPDATE account SET NAME =?,money=money-? WHERE id =?\", \"ros\", \"100\", 2);\n System.out.println(zzz);\n }",
"@Override\r\n\tpublic void update(String id,int time) {\n\t\ttry {\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@127.0.0.1:1521:XE\", \"system\", \"oracle\");\r\n\t\t\tString sql = \"update comuser set time = ? where id = ?\";\r\n\t\t\tps = con.prepareStatement(sql);\r\n\t\t\tps.setInt(1, time);\r\n\t\t\tps.setString(2, id);\r\n\t\t\t\r\n\t\t\tps.executeUpdate();\r\n\t\t\t\r\n\t\t\tsql=\"commit\";\r\n\t\t\tps=con.prepareStatement(sql);\r\n\t\t\t\r\n\t\t\tps.executeUpdate();\r\n\t\t\tSystem.out.println(\"업데이트완료\");\r\n\t\t\t\r\n\t\t\trs.close();\r\n\t\t\tps.close();\r\n\t\t\tcon.close();\r\n\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t}",
"public void updateUSER(){\n int p = JOptionPane.showConfirmDialog(null, \"Are you sure you want to update record?\",\"Update Record\",JOptionPane.YES_NO_OPTION);\r\n if(p==0){\r\n try{\r\n \r\n \r\n String value2 = user.TXTuserNAME.getText();\r\n \r\n String value4 = user.pass1.getText();\r\n \r\n \r\n String sql= \"update Users set user_name='\"+value2+\"', password='\"+value4+\"' \";\r\n \r\n pst=conn.prepareStatement(sql);\r\n pst.execute();\r\n JOptionPane.showMessageDialog(null, \"Record Updated\");\r\n \r\n }catch(Exception e){\r\n JOptionPane.showMessageDialog(null, e);\r\n }\r\n finally {\r\n \r\n try{\r\n rs.close();\r\n pst.close();\r\n \r\n }\r\n catch(Exception e){\r\n \r\n }\r\n }\r\n }\r\n \r\n \r\n \r\n \r\n \r\n }",
"@Override\r\n\tpublic void update(Connection connection, Long id, Salary salary) throws SQLException {\n\r\n\t}",
"public void update() throws SQLException {\n DatabaseConnector.updateQuery(\"UPDATE course SET \"\n + \"courseDept='\" + this.courseDept + \"', \"\n + \"courseNum='\" + this.courseNum + \"', \"\n + \"courseName='\" + this.courseName + \"', \"\n + \"info='\" + this.info + \"', \"\n + \"credit=\" + this.credit);\n }",
"public void updatePhoneNumber(String userName, String phoneNumber) throws Exception {\n String p = \"UPDATE Users SET PhoneNumber='\"+phoneNumber+\"' WHERE UserName ='\"+userName+\"'\";\n int result = 0;\n try {\n PreparedStatement ps = con.prepareStatement(p);\n //ps.setString(1,phoneNumber);\n result = ps.executeUpdate();\n\n }\n catch (Exception e) {\n System.out.println(\"Query not executed\");\n e.printStackTrace();\n }\n\n }",
"public void updateDataBuku(){\n String sql = \"UPDATE buku SET judulBuku = '\"+getJudulBuku()+\"'\"\n + \",pengarang = '\"+getPengarang()+\"'\"\n + \",penerbit = '\"+getPenerbit()+\"'\"\n + \",tahun = '\"+getTahun()+\"'\"\n + \",stok = '\"+getStok()+\"' WHERE idBuku = '\"+getIdBuku()+\"'\";\n \n try {\n //inisialisasi preparedstatmen\n PreparedStatement eksekusi = koneksi. getKoneksi().prepareStatement(sql);\n eksekusi.execute();\n \n //pemberitahuan jika data berhasil di simpan\n JOptionPane.showMessageDialog(null,\"Data Berhasil Disimpan\");\n } catch (SQLException ex) {\n //Logger.getLogger(modelPelanggan.class.getName()).log(Level.SEVERE, null, ex);\n JOptionPane.showMessageDialog(null, \"Data Gagal Disimpan \\n\"+ex);\n }\n }",
"@Override\r\n\tpublic void update() throws SQLException {\n\r\n\t}",
"public void updateJobPrice(int job_ID, double total_price, double total_discount){\n try {\n Stm = conn.prepareStatement(\"UPDATE `bapers`.`Job` SET Total_discount = ?, Total_price = ? WHERE Job_ID = ?;\");\n Stm.setDouble(1, total_discount);\n Stm.setDouble(2,total_price);\n Stm.setInt(3, job_ID);\n Stm.executeUpdate();\n Stm.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"public void updateCustomer(String name, String dob, String gender, String number, String email, String address, String password, Boolean promo, Integer reward) throws SQLException {\n st.executeUpdate(\"UPDATE IOTBAY.CUSTOMER SET \"\n + \"NAME ='\" + name \n + \"DATEOFBIRTH ='\" + dob \n + \"GENDER ='\" + gender \n + \"CONTACTNUMBER ='\" + number \n + \"BILLINGADDRESS ='\" + address \n + \"PASSWORD ='\" + password \n + \"PROMOTIONALNEWSLETTER ='\" + promo \n + \"', REWARDPOINTS='\" + reward \n + \"' WHERE EMAIL='\" + email + \"'\" );\n\n }",
"@Override\n\tpublic Integer updateEmp(Integer id, String name) {\n\t\treturn null;\n\t}",
"public static void editDatabase(String sql){\n Connection connection = dbConnection();\n\n try{\n PreparedStatement pst = connection.prepareStatement(sql);\n pst.executeUpdate();\n pst.close();\n connection.close();\n }catch (Exception e){\n e.printStackTrace();\n }\n }",
"public int updateCourse(int idCourse, String courseName, String courseDescription, int nbHourTotal, String idTeacher, int promoId){\n Connection connection = getConnection();\n int result = 0;\n if(connection!= null){\n try{\n PreparedStatement preparedStatement = connection.prepareStatement(\"UPDATE Courses SET courseName = ?, courseDescription = ?, nbHourTotal = ?, idTeacher = ?, idPromo = ? WHERE idCourse = ?\");\n preparedStatement.setInt(6, idCourse);\n preparedStatement.setString(1, courseName);\n preparedStatement.setString(2, courseDescription);\n preparedStatement.setInt(3, nbHourTotal);\n preparedStatement.setString(4, idTeacher);\n preparedStatement.setInt(5, promoId);\n result = preparedStatement.executeUpdate();\n } catch(SQLException e){\n e.printStackTrace();\n } finally {\n closeConnection(connection);\n }\n }\n return result;\n }",
"@Override\n public void doUpdate(FasciaOrariaBean bean) throws SQLException {\n Connection con = null;\n PreparedStatement statement = null;\n String sql = \"UPDATE fasciaoraria SET fascia=? WHERE id=?\";\n try {\n con = DriverManagerConnectionPool.getConnection();\n statement = con.prepareStatement(sql);\n statement.setString(1, bean.getFascia());\n statement.setInt(2, bean.getId());\n System.out.println(\"doUpdate=\" + statement);\n statement.executeUpdate();\n con.commit();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n\n try {\n\n statement.close();\n DriverManagerConnectionPool.releaseConnection(con);\n\n } catch (SQLException e) {\n\n e.printStackTrace();\n }\n }\n }",
"public void Last_Day_Salary_save(){\n String salseQuery=\"insert into Salary_summery (Date,Amount,No_of_Employees) values('\"+date+\"','\"+Employee_Amount+\"','\"+Salary_No_of_Emp+\"')\";\n executeQuery_Other(salseQuery);\n }",
"Integer update(final String sql);",
"@Modifying\n @Query(\"update Dept u set u.deptName = ?1 where u.deptId = ?2\")\n int updateDept(String deptName, Long deptId);",
"private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed\n // TODO add your handling code here:\n int y=check();\n if(y==1)\n { \n try\n { \n Connection con= DriverManager.getConnection(host,username,password);\n Statement stmt=con.createStatement();\n String query=\"UPDATE instructorinfo SET NAME='\"+ID1.getText()+\"',eid=\"+Integer.parseInt(ID2.getText())+\",ADDRESS='\"+ID3.getText()+\"',MOBILE='\"+ID4.getText()+\"',email='\"+ID5.getText()+\"',class=\"+Integer.parseInt(ID6.getText())+\" WHERE eid=\"+ID2.getText();\n stmt.execute(query);\n JOptionPane.showMessageDialog(null,\"Saved Successfully\");\n ID1.setText(\"\");\n ID2.setText(\"\");\n ID3.setText(\"\");\n ID4.setText(\"\");\n ID5.setText(\"\");\n ID6.setText(\"\");\n Lla9.setText(null);\n getdata();\n }\n \n catch(Exception e)\n {\n JOptionPane.showMessageDialog(null,\"Values can't remain empty!!\");\n }\n }\n }",
"public abstract void updateEmployee(int id, Employee emp) throws DatabaseExeption;",
"public int Edshare(Long cid, Long shareamt,String datee, Long shareno, Long sindex) throws SQLException,ClassNotFoundException{\n\tint i=DbConnect.getStatement().executeUpdate(\"update share_details set no_share=\"+shareno+\",shareprice=\"+shareamt+\",shareindex=\"+sindex+\" where comp_id=\"+cid+\" and DATEOFTRANS='\"+datee+\"'\");\r\n\treturn i;\r\n\t\r\n}",
"public void update(String expression) {\r\n \t\tStatement st = null;\r\n \t\ttry {\r\n \t\t\tst = conn.createStatement();\r\n \t\t\tint i = st.executeUpdate(expression); // run the query\r\n \t\t\tif (i == -1) {\r\n \t\t\t\tSystem.out.println(\"db error : \" + expression);\r\n \t\t\t}\r\n \r\n \t\t} catch (SQLException e) {\r\n \t\t\te.printStackTrace();\r\n \t\t} finally {\r\n \t\t\ttry {\r\n \t\t\t\tst.close();\r\n \t\t\t} catch (SQLException e) {\r\n \t\t\t\te.printStackTrace();\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t}",
"@Override\n\tpublic void update(Seller obj) {\n\t\tPreparedStatement pst = null;\n\t\ttry {\n\t\t\tpst = conn.prepareStatement(\n\t\t\t\t\t\"UPDATE seller\\r\\n\"+\n\t\t\t\t\t\"SET Name = ?, Email = ?, BirthDate = ?, BaseSalary = ?, DepartmentId = ?\\r\\n\" +\n\t\t\t\t\t\"WHERE Id = ?;\");\n\t\t\tpst.setString(1, obj.getName());\n\t\t\tpst.setString(2, obj.getEmail());\n\t\t\tpst.setDate(3, new java.sql.Date(obj.getBirthDate().getTime()));\n\t\t\tpst.setDouble(4, obj.getBaseSalary());\n\t\t\tpst.setInt(5, obj.getDepartment().getId());\n\t\t\tpst.setInt(6, obj.getId());\n\t\t\tpst.executeUpdate();\n\t\t}catch(SQLException e) {\n\t\t\tthrow new DbException(e.getMessage());\n\t\t}finally {\n\t\t\tDb.closeStatement(pst);\n\t\t}\n\t}",
"public int Approvecomp(Long id) throws SQLException {\n\tLong idd=null;\r\n\trs=DbConnect.getStatement().executeQuery(\"select login_id from company where comp_id=\"+id+\"\");\r\n\tif(rs.next())\r\n\t{\r\n\t\tidd=rs.getLong(1);\r\n\t}\r\n\tSystem.out.println(idd);\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update login set status='approved' where login_id=\"+idd+\"\");\r\n\treturn i;\r\n\t\r\n}",
"@Update(\"UPDATE student SET name = #{name}, gpa = #{gpa} WHERE npm = #{npm}\")\n\tvoid updateStudent(StudentModel student);",
"public int queryUpdate(String query) throws SQLException {\n\t \t\t// Création de l'objet gérant les requêtes\n\t \t\tstatement = cnx.createStatement();\n\t \t\t\t\t\n\t \t\t// Exécution d'une requête d'écriture\n\t \t\tint statut = statement.executeUpdate(query);\n\t \t\t\n\t \t\treturn statut;\n\t \t}",
"public void update(long id, String name, String discipline, String grade) {\n SQLiteDatabase db = _openHelper.getWritableDatabase();\n if (db == null) {\n return;\n }\n ContentValues row = new ContentValues();\n row.put(\"name\", name);\n row.put(\"discipline\", discipline);\n row.put(\"grade\", grade);\n db.update(\"Exams\", row, \"_id = ?\", new String[] { String.valueOf(id) } );\n db.close();\n }",
"private void updateAccountTables(Connection conn) {\n\n\tPreparedStatement pst = null;\n\tString updateAccountQuery = \"Update Account Set phoneNumber = ? \" + \"Where name = ?;\";\n\n\ttry {\n\n\t\t\tpst = conn.prepareStatement(updateAccountQuery);\n\t\t\tpst.setInt(1, 312483991);\n\t\t\tpst.setString(2, \"Harry\");\n\t\t\n\t\t\tpst.executeUpdate();\n\t\t\tSystem.out.println(\"\\n\\nRecords updated into Account Table Successfully\\n\");\n\n\t\t//System.out.println(\"Abhinav\");\n\t} catch (SQLException e) {\n\t\tSystem.out.println(\"\\n-----Please Check Error Below for updating Account Table------\\n\");\n\t\te.printStackTrace();\n\t}\n\n}",
"public void updateCita(int id, Citas cita) {\n try {\n PreparedStatement preparedStatement = con.prepareStatement(\"UPDATE paciente SET name=?,doctor=?,fecha=?,hora=?,tel=?,correo=?,genero=?,motivo=?,sintomas=? WHERE id_paciente=?;\");\n preparedStatement.setString(1,cita.getName());\n preparedStatement.setString(2,cita.getDoctor());\n preparedStatement.setString(3, cita.getFecha());\n preparedStatement.setString(4,cita.getHora());\n preparedStatement.setString(5,cita.getTel());\n preparedStatement.setString(6,cita.getCorreo());\n preparedStatement.setString(7,cita.getGenero());\n preparedStatement.setString(8,cita.getMotivo());\n preparedStatement.setString(9,cita.getSintomas());\n preparedStatement.setInt(10,id);\n preparedStatement.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic void update(String sql, Object... parameters) {\n\t\tConnection conn = null;\n\t PreparedStatement stm = null;\n\t try {\n\t\t\tconn = getConnection();\n\t\t conn.setAutoCommit(false);\n\t\t stm = conn.prepareStatement(sql);\n\t\t setParameter(stm, parameters);\n\t\t stm.executeUpdate();\n\t\t conn.commit();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO: handle exception\n\t\t\ttry {\n\t\t\t\tconn.rollback();\n\t\t\t} catch (SQLException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t e.printStackTrace();\n\t\t \n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (conn != null) {\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\n\t\t\t\tif (stm != null) {\n\t\t\t\t\tstm.close();\n\t\t\t\t}\n\n\t\t\t} catch (Exception e2) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\te2.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public void update(Motorhome motorhome) throws SQLException {\n\n statement = connector.getConnection().prepareStatement(\"UPDATE motorhomes SET licence_plate=?, motorhome_status=?, description_id=? WHERE motorhome_id=?\");\n statement.setString(1, motorhome.getLicencePlate());\n statement.setString(2, motorhome.getMotorhomeStatus());\n statement.setInt(3, motorhome.getMotorhomeDescription().getMotorhomeDescriptionId());\n statement.setInt(4, motorhome.getMotorhomeId());\n statement.execute();\n statement = null;\n }",
"public static void updateArchitect(){\n projectChosen = getQuestionInput();\r\n try {\r\n Connection myConn = DriverManager.getConnection(url, user, password);\r\n\r\n String sqlInsert = \"UPDATE projects \" +\r\n \" SET architect_name = ?, architect_tel = ?, architect_email = ?, architect_address = ?\" +\r\n \"WHERE project_num = \" +projectChosen;\r\n\r\n PreparedStatement pstmt = myConn.prepareStatement(sqlInsert);\r\n pstmt.setString(1, NewProject.architect_name);\r\n pstmt.setString(2, NewProject.architect_tel);\r\n pstmt.setString(3, NewProject.architect_email);\r\n pstmt.setString(4, NewProject.architect_address);\r\n pstmt.executeUpdate(); //Execute update of database.\r\n pstmt.close();\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"final public static PreparedStatement createPstmtUpdate(Connection conn, DotProjectObject obj)\n\t{\n\t\tClass<? extends DotProjectObject> clazz = obj.getClass();\n\t\tStringBuffer sb = new StringBuffer();\n\t\tString table = null;\n\t\tField[] beanFields = null;\n\t\tString[] dbFields = null;\n\t\tObject[] dbValuesData = null;\n\t\tObject[] dbValuesRestriction = null;\n\t\tPreparedStatement stmt = null;\n\t\t\n\t\ttable = AnnotationUtil.getAnnotationValue(clazz, DbAnnotations.TABLE_ANNOTATION);\n\t\tsb.append(\"UPDATE \");\n\t\tsb.append(table);\n\t\t\n\t\tbeanFields = AnnotationUtil.getAnnotatedFields(clazz, DbAnnotations.PROPERTY_ANNOTATION);\n\t\tdbFields = new String[beanFields.length];\n\t\tdbValuesData = new Object[beanFields.length];\n\t\tfor (int i = 0; i < beanFields.length; i++) {\n\t\t\t// Identificator fields cannot be changed when updating.\n\t\t\tif (beanFields[i].isAnnotationPresent(DbAnnotations.IDENTIFICATOR_ANNOTATION)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tdbFields[i] = AnnotationUtil.getAnnotationValue(beanFields[i], DbAnnotations.PROPERTY_ANNOTATION);\n\t\t\ttry {\n\t\t\t\tdbValuesData[i] = beanFields[i].get(obj);\n\t\t\t\tif (dbValuesData[i] == null) {\n\t\t\t\t\tdbFields[i] = null;\n\t\t\t\t}\n\t\t\t} catch (IllegalAccessException iae) {\n\t\t\t\tdbFields[i] = null;\n\t\t\t\tdbValuesData[i] = null;\n\t\t\t}\n\t\t}\n\t\tdbFields = ArrayUtil.clean(dbFields);\n\t\tdbValuesData = ArrayUtil.clean(dbValuesData);\n\t\t\t\n\t\tsb.append(\" SET \");\n\t\tfor (int i = 0; i < dbFields.length; i++) {\n\t\t\tif (i > 0) {\n\t\t\t\tsb.append(\", \");\n\t\t\t}\n\t\t\tsb.append(dbFields[i]);\n\t\t\tsb.append(\"=?\");\n\t\t}\n\t\t\n\n\t\t// Update restriction on identificator\n\t\tsb.append(\" WHERE \");\n\t\tbeanFields = AnnotationUtil.getAnnotatedFields(clazz, DbAnnotations.IDENTIFICATOR_ANNOTATION);\n\t\tdbFields = new String[beanFields.length];\n\t\tdbValuesRestriction = new Object[beanFields.length];\n\t\tfor (int i = 0; i < beanFields.length; i++) {\n\t\t\tdbFields[i] = AnnotationUtil.getAnnotationValue(beanFields[i], DbAnnotations.PROPERTY_ANNOTATION);\n\t\t\ttry {\n\t\t\t\tdbValuesRestriction[i] = beanFields[i].get(obj);\n\t\t\t} catch (Exception iae) {\n\t\t\t\tdbFields[i] = null;\n\t\t\t\tdbValuesRestriction[i] = null;\n\t\t\t}\n\t\t}\n\t\tdbFields = ArrayUtil.clean(dbFields);\n\t\tdbValuesRestriction = ArrayUtil.clean(dbValuesRestriction);\n\n\t\tfor (int i = 0; i < dbFields.length; i++) {\n\t\t\tif (i != 0) {\n\t\t\t\tsb.append(\" AND \");\n\t\t\t}\n\t\t\tsb.append(dbFields[i]);\n\t\t\tsb.append(\"=?\");\n\t\t}\t\t\t\n\t\t\t\t\t\t\n\t\tint stmtCount = 1;\n\t\ttry {\n\t\t\tstmt = conn.prepareStatement(sb.toString());\n\t\t\tfor (Object o : dbValuesData) {\n\t\t\t\tstmt.setObject(stmtCount, o);\n\t\t\t\tstmtCount++;\n\t\t\t}\n\t\t\tfor (Object o : dbValuesRestriction) {\n\t\t\t\tstmt.setObject(stmtCount, o);\n\t\t\t\tstmtCount++;\n\t\t\t}\n\t\t} catch (SQLException se) {\n\t\t\tstmt = null;\n\t\t}\n\t\t\n\t\treturn stmt;\n\t}",
"public void updateDep(String depid, String depname, String depdetail) throws SQLException {\n\t\tdao.updateDep(depid, depname, depdetail);\n\t\tdao.closeConnection();\n\t}",
"public void updateSales(String date, String des, String rate, String qua,\n\t\t\tString amit, String id) {\n ContentValues up=new ContentValues();\n\t up.put(Sales_Date, date);\n\t up.put(Sales_Des, des);\n\t up.put(Sales_Rate, rate);\n\t up.put(Sales_Quan, qua);\n\t up.put(Sales_Amt, amit);\n\t \n\t\tourDatabase.update(DATABASE_TABLE2, up, Sales_Id+\" = \"+id, null);\n\t\t\n\t\t\n\t}",
"private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {\n try{\n Class.forName(driver);\n Connection con = DriverManager.getConnection(url,user,pass); \n if( TableDisplayEmp.getSelectedRow() > 0 ){\n rowSelected = TableDisplayEmp.getSelectedRow();\n }\n // loi doan nay ne em, tại vì khi em nhấn Update thì cái cai table no da bỏ chọn rồi, row = -1 ý, nên nó ko lấy đc dòng nào cần chọn\n String value = (TableDisplayEmp.getModel().getValueAt(rowSelected, 0).toString());\n \n //System.out.println( rowSelected );\n String query1 = \"UPDATE Em_Contact SET Phone = ?, Email = ? WHERE Employee_ID = ? \";\n PreparedStatement pst1 = con.prepareStatement(query1); \n pst1.setString(1, txtContact.getText());\n pst1.setString(2, txtEmail.getText());\n pst1.setString(3, txtEmployee_ID.getText());\n pst1.executeUpdate();\n \n String query = \"UPDATE Employee SET LastName = ?, FirstName = ?, Gender = ?, Dob = ?, Address = ? WHERE Employee_ID = ?\";\n PreparedStatement pst = con.prepareStatement(query); \n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n String date = sdf.format(txtDob.getDate()); \n pst.setString(1, txtLastName.getText());\n pst.setString(2, txtFirstName.getText());\n String Gender = txtGender.getSelectedItem().toString();\n pst.setString(3, Gender); \n pst.setString(4, date);\n pst.setString(5, txtAddress.getText());\n //pst.setBytes(6, person_image);\n pst.setString(6, txtEmployee_ID.getText());\n pst.executeUpdate();\n \n \n userList = userList();\n \n DefaultTableModel dm = (DefaultTableModel)TableDisplayEmp.getModel();\n while(dm.getRowCount() > 0)\n {\n dm.removeRow(0);\n }\n \n show_user(userList);\n JOptionPane.showMessageDialog(this,\"Save Successfully!!!\");\n } catch (Exception e){\n //System.out.println(e.getMessage());\n JOptionPane.showMessageDialog(this,e.getMessage());\n }\n }",
"public void actualizaAntNoPato(String id_antNP, String religion_antNP, String lugarNaci_antNP, String estaCivil_antNP, \n String escolaridad_antNP, String higiene_antNP, String actividadFisica_antNP, int frecuencia_antNP, \n String sexualidad_antNP, int numParejas_antNP, String sangre_antNP, String alimentacion_antNP, String id_paciente,\n boolean escoCompInco_antNP, String frecVeces_antNP, Connection conex){\n String sqlst = \" UPDATE `antnopato`\\n\" +\n \"SET\\n\" +\n \"`id_antNP` = ?,\\n\" +\n \"`religion_antNP` = ?,\\n\" +\n \"`lugarNaci_antNP` = ?,\\n\" +\n \"`estaCivil_antNP` = ?,\\n\" +\n \"`escolaridad_antNP` = ?,\\n\" +\n \"`higiene_antNP` = ?,\\n\" +\n \"`actividadFisica_antNP` = ?,\\n\" +\n \"`frecuencia_antNP` = ?,\\n\" +\n \"`sexualidad_antNP` = ?,\\n\" +\n \"`numParejas_antNP` = ?,\\n\" +\n \"`sangre_antNP` = ?,\\n\" +\n \"`alimentacion_antNP` = ?,\\n\" +\n \"`id_paciente` = ?,\\n\" +\n \"`escoCompInco_antNP` = ?,\\n\" +\n \"`frecVeces_antNP` = ?\\n\" +\n \"WHERE `id_antNP` = ?;\";\n try(PreparedStatement sttm = conex.prepareStatement(sqlst)) {\n conex.setAutoCommit(false);\n sttm.setString (1, id_antNP);\n sttm.setString (2, religion_antNP);\n sttm.setString (3, lugarNaci_antNP);\n sttm.setString (4, estaCivil_antNP);\n sttm.setString (5, escolaridad_antNP);\n sttm.setString (6, higiene_antNP);\n sttm.setString (7, actividadFisica_antNP);\n sttm.setInt (8, frecuencia_antNP);\n sttm.setString (9, sexualidad_antNP);\n sttm.setInt (10, numParejas_antNP);\n sttm.setString (11, sangre_antNP);\n sttm.setString (12, alimentacion_antNP);\n sttm.setString (13, id_paciente);\n sttm.setBoolean (14, escoCompInco_antNP);\n sttm.setString (15, frecVeces_antNP);\n sttm.setString (16, id_antNP);\n sttm.addBatch();\n sttm.executeBatch();\n conex.commit();\n aux.informacionUs(\"Antecedentes personales no patológicos modificados\", \n \"Antecedentes personales no patológicos modificados\", \n \"Antecedentes personales no patológicos han sido modificados exitosamente en la base de datos\");\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }"
] |
[
"0.7439988",
"0.7348397",
"0.6724844",
"0.6626602",
"0.6585726",
"0.65425134",
"0.6510522",
"0.64831007",
"0.6471415",
"0.6419215",
"0.6393494",
"0.6373654",
"0.63638204",
"0.6350563",
"0.6322565",
"0.62852234",
"0.627455",
"0.6240798",
"0.62367076",
"0.621524",
"0.6204541",
"0.61729044",
"0.6172107",
"0.6169634",
"0.6166396",
"0.61601174",
"0.6152753",
"0.614583",
"0.61231756",
"0.61149806",
"0.6114632",
"0.6067677",
"0.60601765",
"0.60466665",
"0.60326713",
"0.601836",
"0.60076934",
"0.5995625",
"0.59863263",
"0.5971587",
"0.59616196",
"0.59507495",
"0.5935525",
"0.5933676",
"0.5926098",
"0.5914275",
"0.5907402",
"0.5898267",
"0.589316",
"0.58754826",
"0.58641684",
"0.5863458",
"0.58519644",
"0.58512396",
"0.584821",
"0.5847582",
"0.5831665",
"0.58276707",
"0.58163124",
"0.58068293",
"0.5795453",
"0.57817906",
"0.5776574",
"0.5772811",
"0.5772141",
"0.5770503",
"0.5770142",
"0.57699716",
"0.57648265",
"0.57644784",
"0.57558805",
"0.57471967",
"0.5745806",
"0.574376",
"0.57361037",
"0.5726662",
"0.5719755",
"0.57143515",
"0.5713451",
"0.5713405",
"0.57128114",
"0.5708625",
"0.5691927",
"0.56912136",
"0.56896347",
"0.56741995",
"0.56729376",
"0.56652975",
"0.56574094",
"0.5656574",
"0.56561536",
"0.5652314",
"0.56497204",
"0.5644468",
"0.56347483",
"0.5632221",
"0.5630339",
"0.56254625",
"0.5622176",
"0.5621698"
] |
0.7637653
|
0
|
Initialize your data structure here.
|
public MyStack() {
queue = new LinkedList<>();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void initData() {\n }",
"private void initData() {\n\t}",
"private void initData() {\n\n }",
"public void initData() {\n }",
"public void initData() {\n }",
"@Override\n\tpublic void initData() {\n\n\n\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tpublic void initData() {\n\t\t\n\t}",
"@Override\n protected void initData() {\n }",
"@Override\n protected void initData() {\n }",
"@Override\n\tpublic void initData() {\n\n\t}",
"@Override\n\tpublic void initData() {\n\n\t}",
"@Override\n\tpublic void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"private void InitData() {\n\t}",
"@Override\r\n\tpublic void initData() {\n\t}",
"private void initData(){\n\n }",
"public AllOOneDataStructure() {\n map = new HashMap<>();\n vals = new HashMap<>();\n maxKey = minKey = \"\";\n max = min = 0;\n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tprotected void initData(){\n\t\tsuper.initData();\n\t}",
"public InitialData(){}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"protected @Override\r\n abstract void initData();",
"private void initialize() {\n first = null;\n last = null;\n size = 0;\n dictionary = new Hashtable();\n }",
"public DesignADataStructure() {\n arr = new ArrayList<>();\n map = new HashMap<>();\n }",
"public void initData() {\n\t\tnotes = new ArrayList<>();\n\t\t//place to read notes e.g from file\n\t}",
"public void initialize() {\n // empty for now\n }",
"void initData(){\n }",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void initData(){\r\n \r\n }",
"public void initialize()\n {\n }",
"private void initData() {\n\t\tpages = new ArrayList<WallpaperPage>();\n\n\t}",
"public void init() {\n \n }",
"private void initializeData() {\n posts = new ArrayList<>();\n posts.add(new Posts(\"Emma Wilson\", \"23 years old\", R.drawable.logo));\n posts.add(new Posts(\"Lavery Maiss\", \"25 years old\", R.drawable.star));\n posts.add(new Posts(\"Lillie Watts\", \"35 years old\", R.drawable.profile));\n }",
"public static void init() {\n buildings = new HashMap<Long, JSONObject>();\n arr = new ArrayList();\n buildingOfRoom = new HashMap<Long, Long>();\n }",
"public void init() {\n\t\t}",
"public void InitData() {\n }",
"abstract void initializeNeededData();",
"@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\n\t}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"private RandomData() {\n initFields();\n }",
"private TigerData() {\n initFields();\n }",
"public Data() {\n this.customers = new HashMap<>();\n this.orders = new HashMap<>();\n this.siteVisits = new HashMap<>();\n this.imageUploads = new HashMap<>();\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"public void init()\n {\n this.tripDict = new HashMap<String, Set<Trip>>();\n this.routeDict = new HashMap<String, Double>();\n this.tripList = new LinkedList<Trip>();\n this.computeAllPaths();\n this.generateDictionaries();\n }",
"public void init() {\n for (int i = 1; i <= 20; i++) {\n List<Data> dataList = new ArrayList<Data>();\n if (i % 2 == 0 || (1 + i % 10) == _siteIndex) {\n dataList.add(new Data(i, 10 * i));\n _dataMap.put(i, dataList);\n }\n }\n }",
"private void initData() {\n requestServerToGetInformation();\n }",
"private void Initialized_Data() {\n\t\t\r\n\t}",
"void initData() {\r\n\t\tthis.daVinci = new Artist(\"da Vinci\");\r\n\t\tthis.mona = new Painting(daVinci, \"Mona Lisa\");\r\n\t\t//this.lastSupper = new Painting(this.daVinci, \"Last Supper\");\r\n\t}",
"private void initValues() {\n \n }",
"private void init() {\n }",
"public void initialize() {\n grow(0);\n }",
"public void init() {\r\n\r\n\t}",
"private void initialize()\n {\n aggregatedFields = new Fields(fieldToAggregator.keySet());\n }",
"public void initialize() {\n\n fechaDeLaVisita.set(LocalDate.now());\n\n if (medico.get() != null) {\n medico.get().clear();\n } else {\n medico.set(new Medico());\n }\n\n turnoVisita.set(\"\");\n visitaAcompanadaSN.set(false);\n lugarVisita.set(\"\");\n if (causa.get() != null) {\n causa.get().clear();\n } else {\n causa.set(new Causa());\n }\n\n if (promocion.get() != null) {\n promocion.get().clear();\n } else {\n promocion.set(new Promocion());\n }\n\n observacion.set(\"\");\n persistida.set(false);\n persistidoGraf.set(MaterialDesignIcon.SYNC_PROBLEM.graphic());\n\n fechaCreacion.set(LocalDateTime.now());\n\n }",
"@objid (\"4bb3363c-38e1-48f1-9894-6dceea1f8d66\")\n public void init() {\n }",
"protected void initialize() {\n \t\n }",
"public void initialise() \n\t{\n\t\tthis.docids = scoresMap.keys();\n\t\tthis.scores = scoresMap.getValues();\n\t\tthis.occurrences = occurrencesMap.getValues();\t\t\n\t\tresultSize = this.docids.length;\n\t\texactResultSize = this.docids.length;\n\n\t\tscoresMap.clear();\n\t\toccurrencesMap.clear();\n\t\tthis.arraysInitialised = true;\n\t}",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"@Override public void init()\n\t\t{\n\t\t}",
"private void initData() {\n\t\tcomboBoxInit();\n\t\tinitList();\n\t}",
"public DataStructure() {\r\n firstX = null;\r\n lastX = null;\r\n firstY = null;\r\n lastY = null;\r\n size = 0;\r\n }",
"private void initialize() {\n }",
"private void initData() {\n\t\tnamesInfo = new NameSurferDataBase(fileName);\n\n\t}",
"private void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void initialize() {\n // TODO\n }",
"public void initialize() {\r\n }",
"@SuppressWarnings(\"static-access\")\n\tprivate void initData() {\n\t\tstartDate = startDate.now();\n\t\tendDate = endDate.now();\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"private void init()\n\t{\n\t\tif (_invData == null)\n\t\t\t_invData = new InvestigateStore.MappedStores();\n\t}",
"@Override\n\t\tprotected void initialise() {\n\n\t\t}",
"public void init() {\n\t\t\n\t}",
"public void init() {\n\t\n\t}",
"public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }",
"private void initialize() {\n\t\t\n\t}",
"private void initialize() {\n this.pm10Sensors = new ArrayList<>();\n this.tempSensors = new ArrayList<>();\n this.humidSensors = new ArrayList<>();\n }",
"@Override\r\n\tpublic void init() {}",
"public void init() {\n\t\t// Read the data text file and load up the local database\n\t\tinitData();\n\n\t\t// Create the labels and the textbox\n\t\taddNameLabel();\n\t\taddNameBox();\n\t\taddGraphButton();\n\t\taddClearButton();\n\n\t\t// Set up the graph object\n\t\tgraph = new NameSurferGraph();\n\t\tadd(graph);\n\n\t}",
"private void initialData() {\n\n }",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"public mainData() {\n }",
"private void initStructures() throws RIFCSException {\n initTexts();\n initDates();\n }",
"public void init() {\n initComponents();\n initData();\n }",
"public void init() {\n\t}"
] |
[
"0.79950666",
"0.79734904",
"0.78092736",
"0.7776931",
"0.7776931",
"0.7643151",
"0.76366234",
"0.76366234",
"0.76366234",
"0.76366234",
"0.76366234",
"0.76366234",
"0.7555222",
"0.75431204",
"0.75431204",
"0.75423974",
"0.75423974",
"0.75423974",
"0.75321865",
"0.7522416",
"0.7522416",
"0.75160325",
"0.74939144",
"0.74544525",
"0.7388251",
"0.7379696",
"0.73277855",
"0.73108023",
"0.72554386",
"0.7242406",
"0.7242406",
"0.72035944",
"0.7201518",
"0.71658486",
"0.71449256",
"0.7134543",
"0.7133322",
"0.71303594",
"0.7102352",
"0.70975196",
"0.7095817",
"0.70565146",
"0.70562994",
"0.7042039",
"0.70195395",
"0.7006739",
"0.69873273",
"0.6976938",
"0.69580215",
"0.694642",
"0.6938828",
"0.69385374",
"0.69372547",
"0.69347245",
"0.6933296",
"0.6921152",
"0.69168663",
"0.69108015",
"0.6902418",
"0.68816024",
"0.68812793",
"0.6877775",
"0.6875143",
"0.6866353",
"0.6866319",
"0.68515164",
"0.6851276",
"0.68464136",
"0.68464136",
"0.68464136",
"0.68464136",
"0.68445843",
"0.68193364",
"0.6808642",
"0.6804406",
"0.6792292",
"0.6786256",
"0.6780027",
"0.6780027",
"0.6780027",
"0.6766427",
"0.67607206",
"0.6760256",
"0.675173",
"0.675173",
"0.675173",
"0.6750465",
"0.67319447",
"0.6720339",
"0.6719468",
"0.67180806",
"0.67158633",
"0.6712268",
"0.670628",
"0.66996133",
"0.66990954",
"0.6690194",
"0.6687366",
"0.66800433",
"0.6668825",
"0.6665233"
] |
0.0
|
-1
|
Push element x onto stack.
|
public void push(int x) {
queue.offer(x);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void push(int x) {\n stack.add(x);\n }",
"public void push(int x) {\r\n inStack.push(x);\r\n }",
"public void push(int x) {\n this.stack1.add(x);\n }",
"public void push(int x) {\n pushStack.add(x);\n }",
"public void push(int x) {\n\t\tstack.push(x);\n\t}",
"public void push(int x) {\r\n stack.offer(x);\r\n }",
"public void push(int x) {\r\n stack.offer(x);\r\n }",
"public void push(int x) {\n this.inputStack.push(x);\n }",
"public void push(int x) {\n storeStack.push(x);\n }",
"public void push(int x) {\n this.stack1.push(x);\n }",
"public void push(int x) {\n inSt.push(x);\n\n }",
"public void push(int x) {\n if (isIn) {\n stackIn.push(x);\n } else {\n while (!stackOut.empty()) {\n stackIn.push(stackOut.pop());\n }\n stackIn.push(x);\n isIn = true;\n }\n\n }",
"public void push(int x) {\n rearStack.push(x);\n }",
"public void push(int x) {\n /**\n * 将otherStack中所有元素还原到stack中后在栈顶加入新元素\n */\n while (!otherStack.isEmpty()) {\n stack.push(otherStack.pop());\n }\n stack.push(x);\n }",
"public void push(int x) {\n Stack<Integer> tmp = new Stack<>();\n while(!s.isEmpty()) {\n tmp.push(s.pop());\n }\n tmp.push(x);\n while(!tmp.isEmpty()) {\n s.push(tmp.pop());\n }\n }",
"public void push(int x) {\r\n Stack<Integer> newStack = new Stack<>();\r\n newStack.push(x);\r\n\r\n Stack<Integer> tmp = new Stack<>();\r\n while (!this.stack.isEmpty()) {\r\n tmp.push(this.stack.pop());\r\n }\r\n\r\n while (!tmp.isEmpty()) {\r\n newStack.push(tmp.pop());\r\n }\r\n\r\n\r\n this.stack = newStack;\r\n }",
"public void push(int x) {\n push.push(x);\n }",
"public void push(int x) {\n load();\n stack.push(x);\n unload();\n }",
"public void push(int x) {\n if (mStack1.isEmpty()) {\n mFirst = x;\n }\n mStack1.push(x);\n }",
"public void push(int x) {\n\t if(first == null){\n\t first = x;\n\t }\n\t s.push(x);\n\t}",
"public void push(int x) {\n stk1.push(x);\n }",
"public void push(int x) {\n temp.push(x);\n }",
"public void push(int x) {\n stack1.push(x);\n }",
"public void push(int x) {\n \tstack.push(x);\n \t// if stack is empty or the element is less than current minimal,\n \t// push it to minStack\n \tif (minStack.isEmpty()) {\n \t\tminStack.push(x);\n \t} else {\n\t \tint min = minStack.peek();\n\t \tif (x <= min) minStack.push(x);\n \t}\n }",
"public void push(int x) {\n\t\tinput.push(x);\n\t}",
"public void push(int x) {\n\t\tif (size() == capacity()) {\n\t\t\tdoubleSize();\n\t\t}\n\t\tarr[end] = x;\n\t\t++end;\n\t}",
"public void push(int x) {\n if (storeStack.isEmpty()) {\n storeStack.push(x);\n return;\n }\n\n Stack<Integer> assistStack = new Stack<>();\n while (!storeStack.isEmpty()) {\n assistStack.push(storeStack.pop());\n }\n assistStack.push(x);\n while (!assistStack.isEmpty()) {\n storeStack.push(assistStack.pop());\n }\n }",
"public void push(int x) {\n s1.push(x);\n }",
"public void push(int x) {\n s1.push(x);\n }",
"public void push(int x) {\n s1.push(x);\n }",
"public void push(int x) {\n s1.push(x);\n }",
"public void push(int x) {\n if (storeStack.isEmpty()) {\n storeStack.push(x);\n return;\n }\n\n int[] ints = new int[storeStack.size()];\n int i =0;\n while (!storeStack.isEmpty()) {\n ints[i++] = storeStack.pop();\n }\n storeStack.push(x);\n for (int i1 = ints.length - 1; i1 >= 0; i1--) {\n storeStack.push(ints[i1]);\n\n }\n }",
"public void push(int x) {\n\t\tlist.add(x);\n\t}",
"void push(int x) {\n\t\tif (stack.size() == 0) {\n\t\t\tstack.push(x);\n\t\t\tminEle = x;\n\t\t} else if (x >= minEle) {\n\t\t\tstack.push(x);\n\t\t} else if (x < minEle) {\n\t\t\t// Push something smaller than original value\n\t\t\t// At any time when we pop , we will see if the value\n\t\t\t// of the peek is less then min or not\n\t\t\tstack.push(2 * x - minEle);\n\t\t\tminEle = x;\n\t\t}\n\t}",
"public void push(int x) {\n data.add(x);\n }",
"public void push(int x) {\n Integer elem = x;\n queue.offer(elem);\n topElem = elem;\n }",
"public void push(int x) {\n // 将 popStack 中数据导入 pushStack\n while (!popStack.isEmpty()) {\n pushStack.push(popStack.pop());\n }\n // 压入 x\n pushStack.push(x);\n // 将数据导回 popStack\n while (!pushStack.isEmpty()) {\n popStack.push(pushStack.pop());\n }\n\n }",
"public void push(int x) {\n \tlist.add(x);\n }",
"public void push(int x) {\n \tint size = s2.size();\n \tfor(int i = 0; i < size; i++) {\n \t\ts.push(s2.pop());\n \t}\n \ts.push(x);\n }",
"public void push(double x) \n {\n if (top == s.length) \n {\n \tthrow new IllegalArgumentException(\"full stack!\");\n }\n \n \n else\n {\n s[++top] = x;\n \n } \n }",
"public void push(int x) {\n s1.push(x);\n temp = (Stack<Integer>) s1.clone();\n s2.clear();\n while (!temp.isEmpty()) {\n s2.push(temp.pop());\n }\n }",
"public void push(int x) {\n stack1.push(x);\n if (stack2.isEmpty() || x <= stack2.peek()) {\n stack2.push(x);\n }\n }",
"public void push(int x) {\n\t\tint max = maxStack.isEmpty() ? x : maxStack.peek();\n\t\tmaxStack.push(max > x ? max : x);\n\t\tstack.push(x);\n\t}",
"public void push(T x) {\n\t\tl.push(x);\n\t}",
"public void push(int x) {\n q.add(x);\n for (int i = 0; i < q.size() - 1; ++i) {\n q.add(q.poll());\n }\n }",
"public void push(int x) {\n\t\tNode t = new Node();\n\t\tt.data = x;\n\t\tt.next = top;\n\t\ttop = t;\n\t}",
"public void push(int x) {\n queue.add(x);\n }",
"public void push(int x) {\n queue.add(x);\n }",
"public void push(int x) {\n left.push(x);\n }",
"public void push(int x) {\n Node node = new Node(x);\n top.next = node;\n node.pre = top;\n top = node;\n size++;\n }",
"public void push(int x) {\n if(afterRotate){\n rotate();\n afterRotate = false;\n }\n stack.push(x);\n }",
"public void push(int x) {\n queue.addLast(x);\n }",
"public void push(int x) {\n queue.addLast(x);\n }",
"public void push(int x) {\n queue.add(x);\n for (int i = 0; i < queue.size()-1; i++) {\n queue.add(queue.poll());\n }\n }",
"public void push(int x) {\n queue.push(x);\n }",
"public void push(int x) {\n if(x <= min){\n stack.push(min);\n min=x;\n }\n stack.push(x);\n }",
"public void push(int x) {\n helper.add(x);\n helper.addAll(objects);\n\n tmp = objects;\n tmp.clear();\n objects = helper;\n helper = tmp;\n }",
"public void push(int x) { //全部放到第一个\n temp1.push(x);\n }",
"public void push(E x) {\n\t\t\n\t\taddBefore(mHead.next, x);\n\n\t\tmSize++;\n\t\tmodCount++;\n\t}",
"public void push(int x) {\n q1.add(x);\n int n = q1.size();\n for (int i = 1; i < n; i++) {\n q1.add(q1.poll());\n }\n }",
"public void push(int x) {\n Queue<Integer> tmp = new LinkedList<>();\n while (!queue.isEmpty()) {\n tmp.add(queue.remove());\n }\n queue.add(x);\n \n while (!tmp.isEmpty()) {\n queue.add(tmp.remove());\n }\n }",
"public void push(int x) {\n one.add(x);\n for(int i=0;i<one.size()-1;i++)\n {\n one.add(one.poll());\n }\n \n }",
"public void push(int x) {\n\t int size=q.size();\n\t q.offer(x);\n\t for(int i=0;i<size;i++){\n\t q.offer(q.poll());\n\t }\n\t \n\t }",
"public void push(int x) {\n int n = queue.size();\n queue.offer(x);\n for (int i = 0; i < n; i++) {\n queue.offer(queue.poll());\n }\n }",
"public void push(int x) {\r\n queue1.add(x);\r\n top = x;\r\n }",
"public void push(int x) {\r\n queue1.add(x);\r\n top = x;\r\n }",
"@Override\n\tpublic void push(Object x) {\n\t\tlist.addFirst(x);\n\t}",
"void push(Integer x) {\n\n\t\tif (isEmpty()) {\n\t\t\ttop = new Node(x);\n\t\t\tmid = top;\n\t\t\ttotalNodes++;\n\t\t} else {\n\t\t\tNode n = new Node(x);\n\t\t\tn.next = top;\n\t\t\ttop.prev = n;\n\t\t\ttop = n;\n\t\t\ttotalNodes++;\n\t\t\tif (totalNodes % 2 != 0) {\n\t\t\t\tmid = mid.prev;\n\t\t\t}\n\t\t}\n\t}",
"public void push(int x) {\n if (head == null) {\n head = new Node1(x, x);\n } else {\n head = new Node1(x, Math.min(x, head.min), head);\n }\n }",
"public void push(int x) {\n q.offer(x);\n }",
"@Override\n\tpublic void push(Object x) {\n\t\tthis.vector.add(x);\n\t}",
"public void push(int x) {\n // 第一步先 push\n queue.offer(x);\n // 第二步把前面的变量重新倒腾一遍\n // 这一部分代码很关键,在树的层序遍历中也用到了\n int size = queue.size() - 1;\n for (int i = 0; i < size; i++) {\n queue.offer(queue.poll());\n }\n }",
"void push(Integer x) {\n if (s.isEmpty()) {\n minEle = x;\n s.push(x);\n System.out.println(\"Number Inserted: \" + x);\n return;\n }\n // if new number is less than original minEle\n if (x < minEle) {\n s.push(2 * x - minEle);\n minEle = x;\n } else {\n s.push(x);\n }\n System.out.println(\"Number Inserted: \" + x);\n }",
"public void push(int element) {\n stack1.push(element);\n }",
"public void stackPush(int element) {\r\n\t\ttop++;\r\n\t\tarray[top] = element;\r\n\t\tcount++;\r\n\t }",
"public void push(int x) {\n if (!reverseQueue.isEmpty()) {\n normalQueue.offer(reverseQueue.poll());\n }\n normalQueue.offer(x);\n }",
"public void push(int x) {\r\n this.queueMain.offer(x);\r\n }",
"public void push(int x) {\n // for pop(), so prepare\n // 要想 pop 省事 push到 queue tail 的 x 要 想办法放到队列第一位\n // how 只要不空 移到另外一个 放好 x 再移回来\n while (!One.isEmpty()) {\n Two.add(One.poll());\n }\n One.add(x);\n while (!Two.isEmpty()) {\n One.add(Two.poll());\n }\n }",
"public void push(T x);",
"public void push(int x) {\n p.next=new ListNode(x);\n p = p.next;\n }",
"@Override\n\tpublic void push(T element) {\n\t\tif(top == stack.length) \n\t\t\texpandCapacity();\n\t\t\n\t\tstack[top] = element;\n\t\ttop++;\n\n\t}",
"public void push(ExParValue x) {\r\n\t\t// System.out.println(\"ExPar.push() currently on top \" +\r\n\t\t// value.toString() + \" pushing \" + x.toString());\r\n\t\tExParValue v = x.isUndefined() ? (ExParValue) value.clone()\r\n\t\t\t\t: (ExParValue) x.clone();\r\n\t\tv.next = value;\r\n\t\tvalue = v;\r\n\t\t// System.out.println(\"ExPar.push() New value: \" + value);\r\n\t}",
"public void push (T element)\r\n {\r\n if (size() == stack.length) \r\n expandCapacity();\r\n\r\n stack[top] = element;\r\n top++;\r\n }",
"public void push(int x) {\n\n if (list.isEmpty()) {\n head = x;\n }\n\n list2.add(x);\n while (!(list.isEmpty())) {\n list2.add(list.poll());\n }\n\n while (!(list2.isEmpty())) {\n list.add(list2.poll());\n }\n\n\n }",
"public void push(int x) {\n while (!forReverse.isEmpty()) {\n queue.add(forReverse.poll());\n }\n queue.add(x);\n }",
"void push(int x) \n\t{ \n\t\tif(isEmpty() == true) \n\t\t{ \n\t\t\tsuper.push(x); \n\t\t\tmin.push(x); \n\t\t} \n\t\telse\n\t\t{ \n\t\t\tsuper.push(x); \n\t\t\tint y = min.pop(); \n\t\t\tmin.push(y); \n\t\t\tif(x < y) \n\t\t\t\tmin.push(x); \n\t\t\telse\n\t\t\t\tmin.push(y); \n\t\t} \n\t}",
"private static void sortedInsert(Stack<Integer> stack, int x) {\n if (stack.isEmpty() || stack.peek() < x) {\n stack.push(x);\n return;\n }\n int temp = stack.pop();\n sortedInsert(stack, x);\n stack.push(temp);\n }",
"void push(int stackNum, int value) throws Exception{\n\t//check if we have space\n\tif(stackPointer[stackNum] + 1 >= stackSize){ //last element\n\t\tthrows new Exception(\"Out of space.\");\n\t}\n\n\t//increment stack pointer and then update top value\n\tstackPointer[stackNum]++; \n\tbuffer[absTopOfStack(stackNum)] = value;\n}",
"public void push(int element) {\n while (!stack1.isEmpty()){\n stack2.push(stack1.pop());\n }\n stack1.push(element);\n while(!stack2.isEmpty()){\n stack1.push(stack2.pop());\n }\n }",
"public void push(T x)\n\t{\n\t\t// If the head is null, set the head equal\n\t\t// to the new node.\n\t\tif(head == null)\n\t\t\thead = new Node<T>(x);\n\t\telse\n\t\t{\n\t\t\t// Loop through the list and add the new node\n\t\t\t// on to the back of the list.\n\t\t\tNode<T> curr = head;\n\t\t\twhile(curr.getNext() != null)\n\t\t\t\tcurr = curr.getNext();\n\n\t\t\tNode<T> last = new Node<T>(x);\n\t\t\tcurr.setNext(last);\n\t\t}\t\n\t}",
"public void push(int x) {\n if(!queueA.isEmpty()){\n queueA.add(x);\n }else if(!queueB.isEmpty()){\n queueB.add(x);\n }else{\n queueA.add(x);\n }\n }",
"public void push(T element) {\n if(isFull()) {\n throw new IndexOutOfBoundsException();\n }\n this.stackArray[++top] = element;\n }",
"public void push(int element) {\n\t\tif (top -1 == size) { // top == --size\n\t\t\t//System.out.println(\"Stack is full\");\n\n\t\t\t//Switch\n\t\t\tint[] tmp = new int[size * 2];\n\t\t\tfor(int i = 0; i <= top; i++){\n\t\t\t\ttmp[i] = stacks[i];\n\t\t\t}\n\t\t\tstacks = null;\n\t\t\tstacks = new int[size * 2];\n\t\t\tfor(int i = 0; i <= top; i++){\n\t\t\t\tstacks[i] = tmp[i];\n\t\t\t}\n\t\t\tstacks[++top] = element;\n\t\t\tSystem.out.println(element + \" is pushed\");\n\t\t} else {\n\t\t\tstacks[++top] = element;\n\t\t\tSystem.out.println(element + \" is pushed\");\n\t\t}\n\t\tsize++;\n\t}",
"public void push(int x) {\n if(q1.isEmpty()) {\n q1.add(x);\n while(q2.size() > 0) {\n q1.add(q2.poll());\n }\n }\n else {\n q2.add(x);\n while(q1.size() > 0) {\n q2.add(q1.poll());\n }\n }\n }",
"void push(int x);",
"void push(T x);",
"public void push(int x) {\n q1.push(x);\n if (q2.size() > 0){\n q2.remove();\n }\n }",
"public void push(int x) {\n if(q1.isEmpty()) {\n q1.add(x);\n while(q2.size() > 0) {\n q1.add(q2.poll());\n }\n } else {\n q2.add(x);\n while(q1.size() > 0){\n q2.add(q1.poll());\n }\n }\n }",
"public void push (E item){\n this.stack.add(item);\n }",
"public void push(T value) {\n \tstack.add(value);\n }"
] |
[
"0.86726034",
"0.85932225",
"0.85570914",
"0.8550038",
"0.852482",
"0.8498592",
"0.8488227",
"0.8461912",
"0.8458076",
"0.8428038",
"0.8376653",
"0.8370226",
"0.8368897",
"0.8343204",
"0.83385926",
"0.8335069",
"0.8333074",
"0.83219844",
"0.83110696",
"0.8299808",
"0.82648236",
"0.8260843",
"0.8227758",
"0.81988394",
"0.819731",
"0.81950635",
"0.8136101",
"0.813282",
"0.81123054",
"0.81123054",
"0.81123054",
"0.8089274",
"0.8086407",
"0.8082756",
"0.8075835",
"0.8058963",
"0.8050122",
"0.80101556",
"0.79978484",
"0.79816735",
"0.7965629",
"0.7918633",
"0.78817797",
"0.7859532",
"0.7854534",
"0.7853485",
"0.78523874",
"0.78523874",
"0.78476787",
"0.7841256",
"0.78404015",
"0.7834868",
"0.7825307",
"0.780459",
"0.7791437",
"0.77746886",
"0.771773",
"0.7690058",
"0.765422",
"0.765174",
"0.7648162",
"0.7646733",
"0.76382875",
"0.7637257",
"0.7633213",
"0.7633213",
"0.7625352",
"0.7617576",
"0.7603999",
"0.75609857",
"0.75587195",
"0.75492984",
"0.75358003",
"0.74670357",
"0.7450564",
"0.74457633",
"0.7396862",
"0.73832387",
"0.73720616",
"0.7360162",
"0.73447925",
"0.7335559",
"0.7328421",
"0.7286221",
"0.7262818",
"0.72311556",
"0.72194356",
"0.72047585",
"0.71959877",
"0.7185571",
"0.717108",
"0.7165948",
"0.7088451",
"0.7078484",
"0.7070283",
"0.70639855",
"0.70509607",
"0.704537",
"0.70401484",
"0.70389265"
] |
0.75231606
|
73
|
Removes the element on top of the stack and returns that element.
|
public int pop() {
int size = queue.size();
for (int i = 0; i < size - 1; i++) {
Integer poll = queue.poll();
queue.offer(poll);
}
return queue.poll();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public T pop() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\t//remove top element from stack\n\t\t//and \"clear to let GC do its work\"\n\t\treturn elements.remove(elements.size() - 1);\n\t}",
"@Override\r\n\tpublic T pop() {\r\n\t\tT top = stack[topIndex];\r\n\t\tstack[topIndex] = null;\r\n\t\ttopIndex--;\r\n\t\treturn top;\r\n\t}",
"public Object pop() {\n if (top >= 0) {\n Object currentObject = stack[top--];\n if (top > minStackSize) {\n decreaseStackSize(1);\n }\n return currentObject;\n }\n else {\n return null;\n }\n }",
"public T pop() {\n T top = peek();\n stack[topIndex] = null;\n topIndex--;\n return top;\n }",
"public T pop() {\n \tT retVal = stack.get(stack.size() - 1); // get the value at the top of the stack\n \tstack.remove(stack.size() - 1); // remove the value at the top of the stack\n \treturn retVal;\n }",
"public E pop()\n {\n E topVal = stack.removeFirst();\n return topVal;\n }",
"public E pop(){\n return this.stack.remove(stack.size()-1);\n }",
"public Object pop()\r\n {\n assert !this.isEmpty();\r\n\t\t\r\n Node oldTop = this.top;\r\n this.top = oldTop.getNext();\r\n oldTop.setNext(null); // enable garbage collection\r\n return oldTop.getItem();\r\n }",
"public T pop() {\n\t\tT value = peek();\n\t\tstack.remove(value);\n\t\treturn value;\n\t}",
"public E pop(){\n\t\tif(top == null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tE retval = top.element;\n\t\ttop = top.next;\n\t\t\n\t\treturn retval;\n\t}",
"public E pop () {\n\t\treturn stack.remove( stack.size()-1 );\t\t\n\t}",
"private Element popElement() {\r\n return ((Element)this.elements.remove(this.elements.size() - 1));\r\n }",
"public E pop(){\r\n\t\tObject temp = peek();\r\n\t\t/**top points to the penultimate element*/\r\n\t\ttop--;\r\n\t\treturn (E)temp;\r\n\t}",
"public T pop() {\r\n\t\tT ele = top.ele;\r\n\t\ttop = top.next;\r\n\t\tsize--;\r\n\t\t\r\n\t\treturn ele;\r\n\t}",
"public T pop() {\n\t\tif (this.l.getHead() != null) {\n\t\t\tT tmp = l.getHead().getData();\n\t\t\tl.setHead(l.getHead().getNext());\n\t\t\treturn tmp;\n\t\t} else {\n\t\t\tSystem.out.println(\"No element in stack\");\n\t\t\treturn null;\n\t\t}\n\t}",
"public T pop() {\n if(isEmpty()) {\n throw new NoSuchElementException(\"Stack is empty\");\n }\n return this.stackArray[top--];\n }",
"@Override\n\tpublic T pop() {\n\t\tif(isEmpty()) {\n\t\t\tSystem.out.println(\"Stack is Empty\");\n\t\treturn null;}\n\t\ttop--;\t\t\t\t\t\t//top-- now before since we need index top-1\n\t\tT result = stack[top];\n\t\tstack[top] = null;\n\t\treturn result;\n\t\t\t\n\t}",
"public E removeFirst() {\n return pop();\n }",
"public Object pop() {\n return stack.pop();\n }",
"public GenericStack popStack(){\n if(isEmpty() == true)return null;\n GenericStack temp = top;\n // makes next item in list the tip\n top = top.next;\n return temp;\n }",
"public Object pop( )\n {\n Object item = null;\n\n try\n {\n if ( this.top == null)\n {\n throw new Exception( );\n }\n\n item = this.top.data;\n this.top = this.top.next;\n \n this.count--;\n }\n catch (Exception e)\n {\n System.out.println( \" Exception: attempt to pop an empty stack\" );\n }\n\n return item;\n }",
"public T pop() { //pop = remove the last element added to the array, in a stack last in, first out (in a queue pop and push from different ends)\n try {\n T getOut = (T) myCustomStack[numElements - 1]; //variable for element to remove (pop off) = last element (if you have 7 elements, the index # is 6)\n myCustomStack[numElements] = null; //remove element by making it null\n numElements--; //remove last element, decrease the numElements\n return getOut; //return popped number\n\n } catch (Exception exc) {\n System.out.println(\"Can't pop from empty stack!\");\n return null;\n }\n }",
"Object pop();",
"public E pop() throws NoSuchElementException{\n\t\treturn stackList.removeFromFront();\n\t}",
"public E pop() {\n if(isEmpty()) throw new EmptyStackException();\n\n E itemPopped = this.stack[top-1];\n this.stack[top-1] = null;\n top--;\n return itemPopped;\n\n }",
"public Object pop();",
"public T pop() {\n\t\tT value = null;\n\t\tif (!isEmpty()) {\n\t\t\ttop = top.next;\n\t\t\tvalue = top.value;\n\t\t}\n\t\treturn value; // returning popped value\n\t}",
"public T pop() {\r\n if ( top == null )\r\n throw new IllegalStateException(\"Can't pop from an empty stack.\");\r\n T topItem = top.item; // The item that is being popped.\r\n top = top.next; // The previous second item is now on top.\r\n return topItem;\r\n }",
"public T peek() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\t//returns the top element.\n\t\treturn elements.get(elements.size()-1);\n\t}",
"public T pop();",
"public T pop();",
"public T pop();",
"public T pop();",
"public T pop();",
"public T pop();",
"public T pop();",
"public T pop();",
"public Item pop() {\n if(isEmpty()) return null;\n Item item = top.data;\n top = top.next;\n size--;\n return item;\n\n }",
"public T pop() throws EmptyStackException\r\n {\r\n if (isEmpty())\r\n throw new EmptyStackException();\r\n\r\n top--;\r\n T result = stack[top];\r\n stack[top] = null; \r\n\r\n return result;\r\n }",
"public TYPE pop();",
"public Object pop()\n\t{\n\t\tif (size == 0)\n\t\t\tthrow new EmptyStackException();\n\t\t\n\t\tObject result = elements[--size];\n\t\telements[size] = null;\n\t\treturn result;\n\t}",
"public Employee pop() {\n if (isEmpty()) {\n throw new EmptyStackException();\n }\n /*top always contains the index of next available position in the array so, there is nothing at top.\n The top item on the stack is actually stored at top-1\n */\n Employee employee = stack[--top];\n stack[top] = null; //assign removed element position to null\n return employee; // return the removed element\n }",
"@Override\n\tpublic E pop() throws EmptyStackException {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException(\"Empty Stack\");\n\t\t}\n\t\tE element = arr[top];\n\t\tarr[top--] = null;\n\t\treturn element;\n\t}",
"private final Object pop() {\r\n\t\treturn eval_stack.remove(eval_stack.size() - 1);\r\n\t}",
"T pop();",
"T pop();",
"T pop();",
"public Object pop() {\n if (isEmpty())\n throw new EmptyStackException();\n\n Object value = peek();\n collection.remove(collection.size() - 1);\n return value;\n }",
"public T pop() {\r\n T o = get(size() - 1);\r\n remove(size() - 1);\r\n return o;\r\n\t}",
"public T pop() throws EmptyStackException {\n if (top == null) {\n throw new EmptyStackException();\n }\n\n StackNode<T> removed = top;\n top = top.getNext();\n return removed.getData();\n }",
"public Object pop() {\n\t\tif(this.isEmpty())\n throw new IllegalStateException(\"Stack is empty\");\n return items.remove(items.size() - 1);\n\t}",
"@Override\n public E pop() {\n E result = peek();\n storage[ top-- ] = null;\n return result;\n\n }",
"public Object pop() {\n if (top != null) {\n Object item = top.getOperand();\n\n top = top.next;\n return item;\n }\n\n System.out.println(\"Stack is empty\");\n return null;\n\n }",
"public T pop()\n\t{\n\t\treturn list.removeFirst();\n\t}",
"public T pop()\n {\n if (ll.getSize()==0){\n return null;\n }else {\n T temp = ll.getData(ll.getSize() - 1);\n ll.remove(ll.getSize() - 1);\n\n return temp;\n }\n }",
"@Override\n public T pop(){\n\n if (arrayAsList.isEmpty()){\n throw new IllegalStateException(\"Stack is empty. Nothing to pop!\");\n }\n\n T tempElement = arrayAsList.get(stackPointer - 1);\n arrayAsList.remove(--stackPointer);\n\n return tempElement;\n }",
"T pop() {\n if (stackSize == 0) {\n throw new EmptyStackException();\n }\n return stackArray[--stackSize];\n }",
"@Override\r\n\tpublic E pop() {\r\n\t\tif (isEmpty())\r\n\t\t\treturn null;\r\n\t\tE answer = stack[t];\r\n\t\tstack[t] = null; // dereference to help garbage collection\r\n\t\tt--;\r\n\t\treturn answer;\r\n\t}",
"public String pop() {\n String removed = NOTHING;\n // Is there anything in the stack to remove?\n if (usage > 0) {\n // Obtain the topmost value from the stack\n removed = this.foundation[this.foundation.length - this.usage];\n // Clean up the array location\n this.foundation[this.foundation.length - this.usage] = null;\n // Decrease usage counter\n usage--;\n }\n return removed;\n }",
"public Object pop() {\n\t\tObject o = get(getSize() - 1);\n\t\tremove(getSize() - 1);\n\t\treturn o;\n\t}",
"public T pop() {\r\n\r\n\t\tT top = peek(); // Throws exception if stack is empty.\r\n\t\t\r\n\t\t// Sets top of stack to next link. \r\n\t\ttopNode = topNode.getNext();\r\n\t\t\r\n\t\treturn top;\r\n\t\t\r\n\t}",
"public T pop() {\n if (this.top == null) {\n throw new EmptyStackException();\n }\n T data = this.top.data;\n this.top = this.top.below;\n return data;\n }",
"private synchronized BackStep pop() {\r\n\t\t\tBackStep bs;\r\n\t\t\tbs = stack[top];\r\n\t\t\tif (size == 1) {\r\n\t\t\t\ttop = -1;\r\n\t\t\t} else {\r\n\t\t\t\ttop = (top + capacity - 1) % capacity;\r\n\t\t\t}\r\n\t\t\tsize--;\r\n\t\t\treturn bs;\r\n\t\t}",
"public T pop() {\n\t\tif (isEmpty())\n\t\t\tthrow new EmptyStackException();\n\t\telse\n\t\t\treturn vector.remove(vector.size() - 1);\t\t\n\t}",
"public Session pop() {\r\n\t\tint oldIndex = index;\r\n\t\tif (index >= 0) {\r\n\t\t\tindex--;\r\n\t\t\treturn stack[oldIndex];\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public T top() {\n \treturn stack.get(stack.size() - 1);\n }",
"@Override\r\n\tpublic E pop() {\n\t\treturn null;\r\n\t}",
"public void pop();",
"public final Object pop()\n {\n synchronized (this.stack)\n {\n return this.stack[--this.pointer];\n }\n }",
"@Override\n\tpublic E pop() {\n\t\treturn null;\n\t}",
"Object pop(){\r\n\t\tlastStack = getLastStack();\r\n\t\tif(lastStack!=null){\r\n\t\t\tint num = lastStack.pop();\r\n\t\t\treturn num;\r\n\t\t} else {stacks.remove(stacks.size()-1);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic T pop() throws StackUnderflowException {\r\n\t\tif (!isEmpty()) {\r\n\t\t\tT e = stack.get(size()-1);\r\n\t\t\tstack.remove(size()-1);\r\n\t\t\treturn e;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new StackUnderflowException();\r\n\t\t}\r\n\t}",
"public T pop() {\n if (head == null) {\n return null;\n } else {\n Node<T> returnedNode = head;\n head = head.getNext();\n return returnedNode.getItem();\n }\n }",
"@Override\n\tpublic Object pop() {\n\t\tif (elementCount == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\telementCount--;\n\t\treturn elementData[elementCount];\n\t}",
"public T pop()\n {\n return pop(first);\n }",
"public O popBack()\r\n {\r\n if (!isEmpty())\r\n {\r\n VectorItem<O> l = last;\r\n last = last.getPrevious();\r\n\r\n count--;\r\n if (isEmpty()) first = null;\r\n else last.setNext(null);\r\n return l.getObject();\r\n } else\r\n return null;\r\n \r\n }",
"E pop() throws EmptyStackException;",
"public Object pop() {\n return fStack.pop();\n }",
"@Override\r\n\tpublic T top() throws StackUnderflowException{\r\n\t\tif (!isEmpty()) {\r\n\t\t\tT e = stack.get(size()-1);\r\n\t\t\treturn e;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new StackUnderflowException();\r\n\t\t}\r\n\t}",
"public E pop();",
"public E pop();",
"public E pop();",
"public E pop();",
"public E pop();",
"public E pop() {\n return stackImpl.pop();\n }",
"public E pop() \r\n {\r\n E o = list.get(getSize() - 1);\r\n list.remove(getSize() - 1);\r\n return o;\r\n }",
"public AnyType pop() throws StackException;",
"public K pop() {\n\t\tK data = null;\r\n\t\tif(top!=null){\r\n\t\t\tdata = top.data;\r\n\t\t\ttop = top.next;\r\n\t\t\tsize--;\r\n\t\t}\r\n\t\treturn data;\r\n\t}",
"public Item pop()\n {\n if (isEmpty()) throw new NoSuchElementException(\"Stack underflow\");\n Item item = top.item;\n top = top.next;\n N--;\n return item;\n }",
"public T pop() {\n StackNode tempNode = peekNode();\n\n if(length > 1) {\n lastNode = peekNode().getParent();\n tempNode.setParent(null);\n length--;\n return (T) tempNode.getTData();\n }\n else if(length == 1) {\n lastNode = new StackNode();\n length--;\n return (T) tempNode.getTData();\n }\n else {\n throw new IndexOutOfBoundsException(\"Your stack is empty!\");\n }\n }",
"public void pop()\r\n\t{\r\n\t\ttop--;\r\n\t\tstack[top] = null;\r\n\t}",
"public Node<T> pop() {\n\n\t\tNode<T> popNode = new Node<T>();\n\t\tpopNode = getTopNode();\n\n\t\t/*\n\t\t * Three special cases for a pop() are a empty stack, only one node at\n\t\t * the top and a stack with multiple elements.\n\t\t */\n\t\tif (isEmpty()) {\n\t\t\tSystem.out.println(\"Stack is EMPTY!!\");\n\t\t\treturn (null);\n\t\t} else if (stackSize == 1) {\n\t\t\ttopNode = null;\n\t\t} else {\n\t\t\ttopNode = topNode.getNextNode();\n\t\t}\n\n\t\tSystem.out.println(\"## POP \\\"\" + popNode.data + \"\\\" FROM STACK ##\");\n\n\t\t// Decrease Stack Size\n\t\tsetStackSize(getStackSize() - 1);\n\t\treturn (popNode);\n\t}",
"public T pop() throws StackUnderflowException{\r\n\t\t\t\t\r\n\t\t// check if the stack is empty before popping up.\r\n\t\tif(stackData.isEmpty())\r\n\t\t\tthrow new StackUnderflowException();\r\n\r\n\t\treturn stackData.remove(stackData.size()-1); //popping;\r\n\t}",
"public Object pop() {\n\t\tObject lastElement = peek();\n\t\t\n\t\tint indexOfLastElement = collection.size() - 1;\n\t\tcollection.remove(indexOfLastElement);\n\t\t\n\t\treturn lastElement;\n\t}",
"public E pop(){\r\n Node<E> curr = top;\r\n top = top.getNext();\r\n size--;\r\n return (E)curr.getData();\r\n \r\n }",
"@Override\n\tpublic E pop() {\n\t\tif(size == 0) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\tsize--;\n\t\treturn list.remove(0);\n\t}",
"public E pop(){\n E o = list.get(list.size() - 1);\n list.remove(list.size() - 1);\n return o;\n }",
"E pop();",
"E pop();",
"E pop();",
"@Override\n public T pop() {\n if (!isEmpty()) {\n T data = backing[size - 1];\n backing[size - 1] = null;\n size--;\n return data;\n } else {\n throw new NoSuchElementException(\"The stack is empty\");\n }\n }"
] |
[
"0.7831054",
"0.78167725",
"0.7808246",
"0.7797564",
"0.7689596",
"0.7677747",
"0.7633739",
"0.76071864",
"0.7598945",
"0.7597015",
"0.7577195",
"0.75743157",
"0.75456405",
"0.75169796",
"0.750027",
"0.74873495",
"0.74667877",
"0.7460093",
"0.74569875",
"0.7456191",
"0.744837",
"0.74207103",
"0.7406906",
"0.74033815",
"0.7401186",
"0.7379766",
"0.7370952",
"0.73472834",
"0.734713",
"0.7335123",
"0.7335123",
"0.7335123",
"0.7335123",
"0.7335123",
"0.7335123",
"0.7335123",
"0.7335123",
"0.7324371",
"0.7313926",
"0.7311951",
"0.73110545",
"0.7310549",
"0.7304512",
"0.7297009",
"0.7293909",
"0.7293909",
"0.7293909",
"0.7284467",
"0.72834486",
"0.72771436",
"0.7270916",
"0.7266674",
"0.72660893",
"0.72511417",
"0.7238035",
"0.72323054",
"0.72286993",
"0.72209424",
"0.72192407",
"0.7210599",
"0.72091603",
"0.7199765",
"0.7196248",
"0.7195882",
"0.7189582",
"0.71828914",
"0.71817344",
"0.7177487",
"0.71751624",
"0.71638006",
"0.7152466",
"0.7151245",
"0.7142062",
"0.71410716",
"0.71334636",
"0.7117701",
"0.71173024",
"0.71133095",
"0.71099454",
"0.71064913",
"0.71064913",
"0.71064913",
"0.71064913",
"0.71064913",
"0.7102089",
"0.71010643",
"0.70969707",
"0.7088635",
"0.7065762",
"0.7061361",
"0.70485055",
"0.7044555",
"0.7040969",
"0.70397604",
"0.7035089",
"0.7034882",
"0.7031653",
"0.70310974",
"0.70310974",
"0.70310974",
"0.70287824"
] |
0.0
|
-1
|
Get the top element.
|
public int top() {
int size = queue.size();
for (int i = 0; i < size - 1; i++) {
Integer poll = queue.poll();
queue.offer(poll);
}
Integer poll = queue.poll();
queue.offer(poll);
return poll;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public int top() {\n return topElem;\n }",
"public E top() {\n return !isEmpty() ? head.item : null;\n }",
"public int topElement() {\n\t\tif(isEmpty()){\n\t\t\tthrow new AssertionError();\n\t\t}\n\t\telse {\n\t\t\treturn heap.get(0).element;\n\t\t\n\t\t}\n\t}",
"public T getTop( );",
"E top();",
"public int top() { return 0; }",
"public int top() {\r\n return top;\r\n }",
"public int top() {\r\n return top;\r\n }",
"public int getTop() {\n\t\treturn this.top;\n\t}",
"public int getTop() {\n\treturn top;\n }",
"public Integer getTop() {\n return top;\n }",
"public int top() {\n return top;\n }",
"public int getTop() {\n return top;\n }",
"public T top();",
"public int top() {\n return One.peek();\n }",
"public T peek() {\r\n\t\tT ele = top.ele;\r\n\t\treturn ele;\r\n\t}",
"Location getTop() {\n // -\n if(!isEmpty())\n return top.getLocation();\n return null;\n }",
"public float getTop() {\n return internalGroup.getTop();\n }",
"public abstract Object top();",
"public T top() {\n \treturn stack.get(stack.size() - 1);\n }",
"public int top() {\n return (int) one.peek();\n \n }",
"public int top() {\n return list.peek();\n }",
"public E top() {\n return head.prev.data;\n }",
"public int top() {\n return top.value;\n }",
"public int top();",
"public E top()\n {\n E topVal = stack.peekFirst();\n return topVal;\n }",
"public MeasurementCSSImpl getTop()\n\t{\n\t\treturn top;\n\t}",
"public E peek(){\n\t\treturn top.element;\n\t}",
"public int top() {\n\t return q.peek();\n\t }",
"public Node top() {\r\n\t\treturn start;\r\n\t}",
"public int top() {\n return q.peek();\n }",
"public int top() {\n \treturn list.get(list.size()-1);\n }",
"public int getTop() {\n return position[0] - (size - 1) / 2;\n }",
"public int top() {\n\t\treturn list.get(list.size() - 1);\n\t}",
"public int top() {\n return objects.peek();\n }",
"public int top() {\n return q1.getFirst();\n }",
"public E top()\n\tthrows EmptyStackException;",
"public E top() {\n\t\tif (this.top == null) {\n\t\t\tthrow new EmptyStackException( );\n\t\t}\n\t\treturn this.top.data;\n\t\t\t\n\t}",
"@Override\n\tpublic E top() throws EmptyStackException {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException(\"Empty Stack\");\n\t\t}\n\t\treturn arr[top];\n\t}",
"public Node<T> getTopNode() {\n\t\treturn topNode;\n\t}",
"public int top() {\n return queue.element();\n }",
"public int top() {\n\t\treturn stack.peek();\n \n }",
"public T peek() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\t//returns the top element.\n\t\treturn elements.get(elements.size()-1);\n\t}",
"public int top() {\n return q1.peek();\n }",
"public int viewTop(){\r\n\t\treturn queue[0];\r\n\t}",
"public int top() {\n int size = q.size();\n for(int i = 1; i<size;i++){\n q.offer(q.poll());\n }\n int value = q.peek();\n q.offer(q.poll());\n \n return value;\n }",
"public K topValue() {\n\t\tif(top!=null)\r\n\t\t\treturn top.data;\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public int top() {\n return p.val;\n }",
"public Object peek()\r\n {\n assert !this.isEmpty();\r\n return this.top.getItem();\r\n }",
"public int top() {\r\n int value = this.pop();\r\n this.stack.offer(value);\r\n return value;\r\n }",
"public int top() {\n if(!q1.isEmpty())return q1.peek();\n else return -1;\n }",
"@Nullable\n public DpProp getTop() {\n if (mImpl.hasTop()) {\n return DpProp.fromProto(mImpl.getTop());\n } else {\n return null;\n }\n }",
"public String top(){\n if(!(pilha.size() == 0)){\n return pilha.get(pilha.size()-1);\n }else{\n return null;\n }\n }",
"public ILocation top()\n {\n EmptyStackException ex = new EmptyStackException();\n if (top <= 0)\n {\n throw ex;\n }\n else\n {\n return stack.get(top - 1);\n }\n }",
"public E popTop() {\n // FILL IN\n }",
"public int top() {\n return stack1.peek();\n }",
"public Card top() {\r\n\t\treturn cards.get(cards.size() - 1);\r\n\t}",
"public View getTopView() {\n\t\tint topViewIndex = getChildCount() - 1;\n\t\treturn getChildAt(topViewIndex);\n\t}",
"public Card top() {\n\t\treturn firstCard;\n\t}",
"public int top() {\n Integer poll = q1.peek();\n return poll == null ? -1 : poll;\n }",
"public int top() {\n return queue.peek();\n }",
"public int top() {\n return queue.peek();\n }",
"public int getElementAtTopOfStack() {\n if (isEmpty()) throw new RuntimeException(\"Stack underflow\");\n return myarray[top];\n \n }",
"int top();",
"public int top() {\n return queue.peek();\n }",
"public int top() {\n return queue.peek();\n }",
"public E top() throws StackUnderflowException {\r\n E item = null;\r\n if(!isEmpty()) item = items.get(0);\r\n else throw new StackUnderflowException(\"Stack Empty\");\r\n \r\n return item;\r\n }",
"public int top() {\n\t\tIterator<Integer> iter = queue.iterator();\n\t\tint temp = 0;\n\t\twhile (iter.hasNext())\n\t\t\ttemp = iter.next();\n\t\treturn temp;\n\t}",
"public int top() {\n move();\n return reverseQueue.peek();\n }",
"public String top() {\n return queue.size() == 0 ? null : queue.get(0);\n }",
"@VisibleForTesting\n public TaskStack getTopStack() {\n if (DisplayContent.this.mTaskStackContainers.getChildCount() > 0) {\n return (TaskStack) DisplayContent.this.mTaskStackContainers.getChildAt(DisplayContent.this.mTaskStackContainers.getChildCount() - 1);\n }\n return null;\n }",
"public Card getTopCard(){\n\t\treturn getCard(4);\n\t\t\n\t}",
"public Disc top()\n\t{\n\t\tint poleSize = pole.size();\n\n\t\t// If the pole is empty, return nothing\n\t\tif(poleSize == 0)\n\t\t\treturn null;\n\n\t\t// Otherwise return the top disc\n\t\treturn pole.get(poleSize - 1);\n\t}",
"public int top() {\r\n int size = this.queueMain.size();\r\n if(size == 1) return this.queueMain.element();\r\n // 转移n-1\r\n while(size != 1){\r\n this.queueHelp.offer(this.queueMain.poll());\r\n size--;\r\n }\r\n // 然后取出第n个元素\r\n int res = this.queueHelp.element();\r\n // 转移到辅助队列\r\n this.queueHelp.offer(this.queueMain.poll());\r\n // 再调换\r\n Queue<Integer> temp = this.queueMain;\r\n this.queueMain = this.queueHelp;\r\n this.queueHelp = temp;\r\n\r\n return res;\r\n }",
"public T peek() {\n return top.getData();\n }",
"public int top() {\n return queue.peekLast();\n }",
"public int top() {\n return queue.getLast();\n }",
"public int top() {\n int size=queue.size();\n for (int i = 0; i < size-1; i++) {\n int temp=queue.poll();\n queue.add(temp);\n }\n int top=queue.poll();\n queue.add(top);\n return top;\n }",
"@Override\n\tpublic T top()\n\t{\n if(list.size()==0)\n {\n throw new IllegalStateException(\"Stack is empty\");\n }\n return list.get(getSize()-1);\n\t}",
"public Integer peek() {\n if (hasTop)\n return top;\n top = it.next();\n hasTop = true;\n return top;\n }",
"public T top() throws StackUnderflowException;",
"@DISPID(-2147417103)\n @PropGet\n int offsetTop();",
"public static Interval topInterval(){\n\t\treturn top;\n\t}",
"public double getTop() {\n return this.yT;\n }",
"public int top() {\n\t\treturn count == 0? -1 : st[count-1];\r\n\t}",
"public T peek() {\n\t\treturn top.value;\n\t}",
"public Card getTopCard() {\n\t\treturn topCard;\n\t}",
"public int top() {\n if(q1.size() > 0){\n return q1.peek();\n } else {\n return q2.peek();\n }\n }",
"public int top() {\n if(q1.size() > 0) {\n return q1.peek();\n } else {\n return q2.peek();\n }\n }",
"public Card topCard() {\n return this.deck.peek();\n }",
"public Card showTop() {\n\t\treturn hand.get(0);\n\t}",
"public int top() {\n return queue1.peek();\n }",
"public E pop(){\n\t\tif(top == null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tE retval = top.element;\n\t\ttop = top.next;\n\t\t\n\t\treturn retval;\n\t}",
"@Override\n public E top()throws EmptyStackException{\n E c = null;\n if(!isEmpty()){\n c = stackArray[count-1];\n return c;\n }\n \n else \n throw new EmptyStackException();\n }",
"public final Symbol top() {\n\t\ttry {\n\t\t\treturn opstack.top().getSymbol();\n\t\t} catch (BadTypeException | EmptyStackException e) {\n\t\t\tSystem.out.println(\"An exception has occurred, \"\n\t\t\t\t\t+ \"Maybe the stack has gone empty\");\n\t\t\treturn null;\n\t\t}\n\t}",
"public int top() {\n if (data.size() != 0) {\n return data.get(data.size() - 1);\n }\n throw new RuntimeException(\"top: 栈为空,非法操作\");\n }",
"@Override\n\tpublic final int getBodyOffsetTop() {\n\t\treturn DOMImpl.impl.getBodyOffsetTop(documentFor());\n\t}",
"public int stackTop() {\r\n\t return array[top];\r\n\t }",
"@Override\r\n\tpublic T top() throws StackUnderflowException{\r\n\t\tif (!isEmpty()) {\r\n\t\t\tT e = stack.get(size()-1);\r\n\t\t\treturn e;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new StackUnderflowException();\r\n\t\t}\r\n\t}",
"protected abstract String getTopElementDesc();"
] |
[
"0.8335419",
"0.79350287",
"0.77536744",
"0.7748599",
"0.76948357",
"0.76440716",
"0.76287603",
"0.76287603",
"0.76210487",
"0.761078",
"0.75897783",
"0.757352",
"0.75697553",
"0.75569373",
"0.75336695",
"0.74941546",
"0.7478168",
"0.7464024",
"0.7455516",
"0.744731",
"0.7420307",
"0.74064183",
"0.7404334",
"0.7353008",
"0.73424685",
"0.7341916",
"0.7309753",
"0.73067194",
"0.73048276",
"0.72713166",
"0.7264665",
"0.72567767",
"0.7251667",
"0.72243714",
"0.72178376",
"0.7213566",
"0.71938527",
"0.71595603",
"0.71482515",
"0.71470845",
"0.71425194",
"0.71301484",
"0.70901084",
"0.7072783",
"0.70704937",
"0.7051931",
"0.70452917",
"0.7038905",
"0.70281166",
"0.7018083",
"0.7016962",
"0.70164806",
"0.70121604",
"0.69869167",
"0.69616324",
"0.6950085",
"0.6943346",
"0.6937197",
"0.69266814",
"0.6905805",
"0.69020635",
"0.69020635",
"0.6881843",
"0.6880443",
"0.68785655",
"0.68785655",
"0.6876129",
"0.6875657",
"0.6870703",
"0.6870001",
"0.6850275",
"0.6835022",
"0.6834514",
"0.68320215",
"0.67999524",
"0.6795726",
"0.6791124",
"0.67760855",
"0.6769921",
"0.6759245",
"0.6757686",
"0.67564976",
"0.6752771",
"0.6745556",
"0.67297226",
"0.67111665",
"0.6669713",
"0.66412",
"0.6635151",
"0.662763",
"0.66263247",
"0.65971553",
"0.6585567",
"0.65791434",
"0.6574525",
"0.6572038",
"0.65619075",
"0.6542071",
"0.6534093",
"0.64797187"
] |
0.66882724
|
86
|
Returns whether the stack is empty.
|
public boolean empty() {
return queue.isEmpty();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public boolean emptyStack() {\n return (expStack.size() == 0);\n }",
"public boolean isEmpty()\n {\n return stack.size() == 0;\n }",
"public boolean isEmpty() {\n \treturn stack.size() == 0;\n }",
"public boolean isEmpty()\n {\n return stack.isEmpty();\n }",
"public boolean isEmpty() {\n return stackImpl.isEmpty();\n }",
"public boolean empty() {\r\n return this.stack.isEmpty();\r\n }",
"public boolean empty() {\r\n return stack.isEmpty();\r\n }",
"public boolean empty() {\n return stack.isEmpty();\n }",
"public boolean empty() {\n return stack.isEmpty();\n }",
"public boolean empty() {\n System.out.println(stack.isEmpty());\n return stack.isEmpty();\n }",
"public boolean isEmpty() {\n\t\treturn (stackSize == 0 ? true : false);\n\t}",
"public boolean empty() {\r\n return stack.isEmpty();\r\n }",
"public boolean empty() {\n return stack.isEmpty();\n }",
"public boolean empty() {\n return popStack.empty() && pushStack.empty();\n }",
"public boolean empty() {\n return stack.empty();\n }",
"public boolean isEmpty(){\r\n\t\treturn stackData.isEmpty();\r\n\t}",
"@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn stack.isEmpty();\r\n\t}",
"public boolean isEmpty(){\n return this.stack.isEmpty();\n\n }",
"public final boolean isEmpty() {\n\t\treturn !(opstack.size() > 0);\n\t}",
"public boolean empty() {\n return popStack.isEmpty();\n }",
"public boolean empty() {\n\t\tif(stackTmp.isEmpty() && stack.isEmpty()){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean isEmpty() {return stackList.isEmpty();}",
"public boolean isEmpty() {\n return stack.isListEmpty();\n }",
"public boolean empty() {\n return this.stack1.empty() && this.stack2.empty();\n }",
"public boolean empty() {\n return this.stack2.size() == 0 && this.stack1.size() == 0;\n }",
"public boolean stackEmpty() {\r\n\t\treturn (top == -1) ? true : false;\r\n\t }",
"public boolean isEmpty() {\n if (opStack.size() == 0) {\n return true;\n }\n return false;\n }",
"public boolean empty() {\n return rearStack.isEmpty() && frontStack.isEmpty();\n }",
"public boolean empty() {\n /**\n * 当两个栈中都没有元素时,说明队列中也没有元素\n */\n return stack.isEmpty() && otherStack.isEmpty();\n }",
"public boolean empty() {\r\n return inStack.empty() && outStack.empty();\r\n }",
"public boolean empty() {\n if (stackIn.empty() && stackOut.empty()) {\n return true;\n }\n return false;\n }",
"public boolean isCarStackEmpty() {\n boolean carStackEmpty = false;\n if(top < 0) {\n carStackEmpty = true;\n }\n return carStackEmpty;\n }",
"public boolean isEmpty() {\n return downStack.isEmpty();\n }",
"public boolean isEmpty(){\r\n \treturn stack1.isEmpty();\r\n }",
"public boolean empty() {\n return stack1.empty();\n }",
"public boolean empty() {\n return stack1.isEmpty() && stack2.isEmpty();\n }",
"public boolean empty() {\n return mStack1.isEmpty() && mStack2.isEmpty();\n }",
"public boolean isEmpty() \n {\n return stack1.isEmpty() && stack2.isEmpty();\n }",
"@Override\r\n\tpublic boolean isFull() {\r\n\t\treturn stack.size() == size;\r\n\t}",
"private static boolean isStackEmpty(SessionState state)\n\t{\n\t\tStack operations_stack = (Stack) state.getAttribute(STATE_SUSPENDED_OPERATIONS_STACK);\n\t\tif(operations_stack == null)\n\t\t{\n\t\t\toperations_stack = new Stack();\n\t\t\tstate.setAttribute(STATE_SUSPENDED_OPERATIONS_STACK, operations_stack);\n\t\t}\n\t\treturn operations_stack.isEmpty();\n\t}",
"public boolean isEmpty() {\n\n return (top == null);\n }",
"public boolean empty() {\n return storeStack.isEmpty();\n }",
"public boolean empty() {\n return storeStack.isEmpty();\n }",
"public boolean empty() {\n return storeStack.isEmpty();\n }",
"public boolean isEmpty() {\r\n return (top == null);\r\n }",
"public boolean isEmpty() {\n return (this.top == 0);\n }",
"public boolean isEmpty() {\n\t\treturn (top == null) ? true : false;\n\t}",
"public boolean isEmpty()\n\t{\n\t\treturn top == null;\n\t}",
"public boolean isEmpty() {\n\t\t\n\t\treturn top == null;\n\t}",
"public boolean isFull() {\n return (this.top == this.stack.length);\n }",
"public boolean isEmpty() {\n return top == null;\n }",
"public boolean isEmpty() {\n return top == null;\n }",
"public boolean isEmpty()\r\n\t{\r\n\t\treturn top<=0;\r\n\t}",
"public boolean isEmpty() {\n\t\treturn heap.size() == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn heap.size() == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn heap.isEmpty();\n\t}",
"public boolean empty() {\n return push.isEmpty();\n }",
"public boolean is_empty() {\n\t\tif (queue.size() <= 0) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"@Override\r\n\tpublic boolean isFull() {\r\n\t\tif(topIndex == stack.length -1) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t}",
"public boolean isEmpty(){\n return (top == 0);\n }",
"public boolean isEmpty()\r\n {\n return this.top == null;\r\n }",
"public boolean isEmpty() {\n return this.top == null;\n }",
"public boolean isEmpty() {\n if(this.top== -1) {\n return true;\n }\n return false;\n }",
"public void testIsEmpty() {\n assertTrue(this.empty.isEmpty());\n assertFalse(this.stack.isEmpty());\n }",
"public boolean isEmpty() {\n\t\treturn front == null;\n\t}",
"public boolean empty() { \n if (top == -1) {\n return true;\n }\n else {\n return false;\n }\n }",
"public boolean isEmpty() {\n return (fifoEmpty.getBoolean());\n }",
"public boolean empty() {\n\t\treturn (size() <= 0);\n\t}",
"public boolean isEmpty() {\n return top==-1;\n }",
"@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn top==null;\r\n\t}",
"public boolean isFull(){\n return (top == employeeStack.length);\n }",
"public boolean isEmpty()\n {\n return heapSize == 0;\n }",
"public static boolean isEmpty()\n { return currentSize==0; }",
"public boolean isEmpty() {\n return topIndex < 0;\n }",
"public final boolean isEmpty() {\r\n\t\treturn this.size == 0;\r\n\t}",
"public boolean isEmpty() {\n\t\treturn queue.isEmpty();\n\t}",
"public boolean isEmpty() {\n\t\treturn queue.isEmpty();\n\t}",
"public boolean isEmpty() {\n\t\treturn (size == 0);\n\t}",
"public boolean empty() {\n return stk1.isEmpty() && stk2.isEmpty();\n }",
"public synchronized boolean isEmpty() {\n\t\treturn size == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn currentSize == 0;\n\t}",
"public boolean isEmpty(){\n if(top == null)return true;\n return false;\n }",
"public boolean isEmpty() {\n\t\treturn mSentinel == mRoot;// if the root is equal to the sentinel(empty\n\t\t\t\t\t\t\t\t\t// node) then the tree is empty otherwise it\n\t\t\t\t\t\t\t\t\t// is not\n\t}",
"public boolean isEmpty()\n\t{\n\t\treturn (head == null);\n\t}",
"public boolean isHeapEmpty() {\n\t\treturn this.head == null;\n\t}",
"public boolean isSet() {\n return !this.stack.isEmpty();\n }",
"public boolean isEmpty() {\r\n\t\t\r\n\t\treturn topNode == null; // Checks if topNode is null;\r\n\t\t\r\n\t}",
"public final boolean isEmpty() {\n return mSize == 0;\n }",
"public boolean isEmpty() {\n\t\treturn size == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn size == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn size == 0;\n\t}",
"public boolean empty() {\n return size <= 0;\n }",
"public boolean isEmpty() {\n return (size == 0);\n }",
"public boolean isEmpty() {\n\t\treturn size == 0;\r\n\t}",
"public boolean isEmpty() {\n return doIsEmpty();\n }",
"public boolean empty() {\n return size == 0;\n }",
"public boolean isEmpty() {\n return this.queue.size() == 0;\n }",
"public boolean isEmpty() {\r\n return (size == 0);\r\n }",
"public boolean isEmpty() {\r\n\t\treturn size == 0;\r\n\t}",
"public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}"
] |
[
"0.9056825",
"0.89871675",
"0.89270204",
"0.89137876",
"0.88953143",
"0.8862492",
"0.881352",
"0.8804085",
"0.8804085",
"0.8802169",
"0.8761835",
"0.8756231",
"0.87347007",
"0.87344116",
"0.8714369",
"0.87058264",
"0.8695712",
"0.8680448",
"0.8662702",
"0.863666",
"0.8620814",
"0.8590292",
"0.8536041",
"0.85202885",
"0.84936136",
"0.84548974",
"0.84050393",
"0.8387681",
"0.8364577",
"0.83544964",
"0.83170897",
"0.83042306",
"0.8283051",
"0.82790375",
"0.8276599",
"0.82362294",
"0.8206897",
"0.81942767",
"0.8156695",
"0.8026406",
"0.80128783",
"0.7958021",
"0.7958021",
"0.7958021",
"0.7939165",
"0.79273045",
"0.7913121",
"0.7879263",
"0.78698885",
"0.78670245",
"0.781039",
"0.781039",
"0.77880466",
"0.77261925",
"0.77261925",
"0.7722835",
"0.7722833",
"0.77215236",
"0.7702043",
"0.77018005",
"0.769895",
"0.7675423",
"0.76143014",
"0.7592153",
"0.7582409",
"0.7563792",
"0.75413835",
"0.7533127",
"0.75158125",
"0.7509667",
"0.7507217",
"0.75050116",
"0.74972826",
"0.74966437",
"0.7492269",
"0.7486575",
"0.7486575",
"0.7472114",
"0.7462987",
"0.7455354",
"0.7447542",
"0.7443833",
"0.7425991",
"0.74256235",
"0.742533",
"0.74214625",
"0.7414964",
"0.7400749",
"0.7398509",
"0.7398509",
"0.7398509",
"0.73952186",
"0.73941374",
"0.7393943",
"0.7393743",
"0.73895943",
"0.7387257",
"0.7386999",
"0.73867625",
"0.7383484",
"0.7383484"
] |
0.0
|
-1
|
Push element x onto stack.
|
public void push(int x) {
data.add(x);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void push(int x) {\n stack.add(x);\n }",
"public void push(int x) {\r\n inStack.push(x);\r\n }",
"public void push(int x) {\n this.stack1.add(x);\n }",
"public void push(int x) {\n pushStack.add(x);\n }",
"public void push(int x) {\n\t\tstack.push(x);\n\t}",
"public void push(int x) {\r\n stack.offer(x);\r\n }",
"public void push(int x) {\r\n stack.offer(x);\r\n }",
"public void push(int x) {\n this.inputStack.push(x);\n }",
"public void push(int x) {\n storeStack.push(x);\n }",
"public void push(int x) {\n this.stack1.push(x);\n }",
"public void push(int x) {\n inSt.push(x);\n\n }",
"public void push(int x) {\n if (isIn) {\n stackIn.push(x);\n } else {\n while (!stackOut.empty()) {\n stackIn.push(stackOut.pop());\n }\n stackIn.push(x);\n isIn = true;\n }\n\n }",
"public void push(int x) {\n rearStack.push(x);\n }",
"public void push(int x) {\n /**\n * 将otherStack中所有元素还原到stack中后在栈顶加入新元素\n */\n while (!otherStack.isEmpty()) {\n stack.push(otherStack.pop());\n }\n stack.push(x);\n }",
"public void push(int x) {\n Stack<Integer> tmp = new Stack<>();\n while(!s.isEmpty()) {\n tmp.push(s.pop());\n }\n tmp.push(x);\n while(!tmp.isEmpty()) {\n s.push(tmp.pop());\n }\n }",
"public void push(int x) {\r\n Stack<Integer> newStack = new Stack<>();\r\n newStack.push(x);\r\n\r\n Stack<Integer> tmp = new Stack<>();\r\n while (!this.stack.isEmpty()) {\r\n tmp.push(this.stack.pop());\r\n }\r\n\r\n while (!tmp.isEmpty()) {\r\n newStack.push(tmp.pop());\r\n }\r\n\r\n\r\n this.stack = newStack;\r\n }",
"public void push(int x) {\n push.push(x);\n }",
"public void push(int x) {\n load();\n stack.push(x);\n unload();\n }",
"public void push(int x) {\n if (mStack1.isEmpty()) {\n mFirst = x;\n }\n mStack1.push(x);\n }",
"public void push(int x) {\n\t if(first == null){\n\t first = x;\n\t }\n\t s.push(x);\n\t}",
"public void push(int x) {\n stk1.push(x);\n }",
"public void push(int x) {\n temp.push(x);\n }",
"public void push(int x) {\n stack1.push(x);\n }",
"public void push(int x) {\n \tstack.push(x);\n \t// if stack is empty or the element is less than current minimal,\n \t// push it to minStack\n \tif (minStack.isEmpty()) {\n \t\tminStack.push(x);\n \t} else {\n\t \tint min = minStack.peek();\n\t \tif (x <= min) minStack.push(x);\n \t}\n }",
"public void push(int x) {\n\t\tinput.push(x);\n\t}",
"public void push(int x) {\n\t\tif (size() == capacity()) {\n\t\t\tdoubleSize();\n\t\t}\n\t\tarr[end] = x;\n\t\t++end;\n\t}",
"public void push(int x) {\n if (storeStack.isEmpty()) {\n storeStack.push(x);\n return;\n }\n\n Stack<Integer> assistStack = new Stack<>();\n while (!storeStack.isEmpty()) {\n assistStack.push(storeStack.pop());\n }\n assistStack.push(x);\n while (!assistStack.isEmpty()) {\n storeStack.push(assistStack.pop());\n }\n }",
"public void push(int x) {\n s1.push(x);\n }",
"public void push(int x) {\n s1.push(x);\n }",
"public void push(int x) {\n s1.push(x);\n }",
"public void push(int x) {\n s1.push(x);\n }",
"public void push(int x) {\n if (storeStack.isEmpty()) {\n storeStack.push(x);\n return;\n }\n\n int[] ints = new int[storeStack.size()];\n int i =0;\n while (!storeStack.isEmpty()) {\n ints[i++] = storeStack.pop();\n }\n storeStack.push(x);\n for (int i1 = ints.length - 1; i1 >= 0; i1--) {\n storeStack.push(ints[i1]);\n\n }\n }",
"public void push(int x) {\n\t\tlist.add(x);\n\t}",
"void push(int x) {\n\t\tif (stack.size() == 0) {\n\t\t\tstack.push(x);\n\t\t\tminEle = x;\n\t\t} else if (x >= minEle) {\n\t\t\tstack.push(x);\n\t\t} else if (x < minEle) {\n\t\t\t// Push something smaller than original value\n\t\t\t// At any time when we pop , we will see if the value\n\t\t\t// of the peek is less then min or not\n\t\t\tstack.push(2 * x - minEle);\n\t\t\tminEle = x;\n\t\t}\n\t}",
"public void push(int x) {\n Integer elem = x;\n queue.offer(elem);\n topElem = elem;\n }",
"public void push(int x) {\n // 将 popStack 中数据导入 pushStack\n while (!popStack.isEmpty()) {\n pushStack.push(popStack.pop());\n }\n // 压入 x\n pushStack.push(x);\n // 将数据导回 popStack\n while (!pushStack.isEmpty()) {\n popStack.push(pushStack.pop());\n }\n\n }",
"public void push(int x) {\n \tlist.add(x);\n }",
"public void push(int x) {\n \tint size = s2.size();\n \tfor(int i = 0; i < size; i++) {\n \t\ts.push(s2.pop());\n \t}\n \ts.push(x);\n }",
"public void push(double x) \n {\n if (top == s.length) \n {\n \tthrow new IllegalArgumentException(\"full stack!\");\n }\n \n \n else\n {\n s[++top] = x;\n \n } \n }",
"public void push(int x) {\n s1.push(x);\n temp = (Stack<Integer>) s1.clone();\n s2.clear();\n while (!temp.isEmpty()) {\n s2.push(temp.pop());\n }\n }",
"public void push(int x) {\n stack1.push(x);\n if (stack2.isEmpty() || x <= stack2.peek()) {\n stack2.push(x);\n }\n }",
"public void push(int x) {\n\t\tint max = maxStack.isEmpty() ? x : maxStack.peek();\n\t\tmaxStack.push(max > x ? max : x);\n\t\tstack.push(x);\n\t}",
"public void push(T x) {\n\t\tl.push(x);\n\t}",
"public void push(int x) {\n q.add(x);\n for (int i = 0; i < q.size() - 1; ++i) {\n q.add(q.poll());\n }\n }",
"public void push(int x) {\n\t\tNode t = new Node();\n\t\tt.data = x;\n\t\tt.next = top;\n\t\ttop = t;\n\t}",
"public void push(int x) {\n queue.add(x);\n }",
"public void push(int x) {\n queue.add(x);\n }",
"public void push(int x) {\n left.push(x);\n }",
"public void push(int x) {\n Node node = new Node(x);\n top.next = node;\n node.pre = top;\n top = node;\n size++;\n }",
"public void push(int x) {\n if(afterRotate){\n rotate();\n afterRotate = false;\n }\n stack.push(x);\n }",
"public void push(int x) {\n queue.addLast(x);\n }",
"public void push(int x) {\n queue.addLast(x);\n }",
"public void push(int x) {\n queue.add(x);\n for (int i = 0; i < queue.size()-1; i++) {\n queue.add(queue.poll());\n }\n }",
"public void push(int x) {\n queue.push(x);\n }",
"public void push(int x) {\n if(x <= min){\n stack.push(min);\n min=x;\n }\n stack.push(x);\n }",
"public void push(int x) {\n helper.add(x);\n helper.addAll(objects);\n\n tmp = objects;\n tmp.clear();\n objects = helper;\n helper = tmp;\n }",
"public void push(int x) { //全部放到第一个\n temp1.push(x);\n }",
"public void push(E x) {\n\t\t\n\t\taddBefore(mHead.next, x);\n\n\t\tmSize++;\n\t\tmodCount++;\n\t}",
"public void push(int x) {\n q1.add(x);\n int n = q1.size();\n for (int i = 1; i < n; i++) {\n q1.add(q1.poll());\n }\n }",
"public void push(int x) {\n Queue<Integer> tmp = new LinkedList<>();\n while (!queue.isEmpty()) {\n tmp.add(queue.remove());\n }\n queue.add(x);\n \n while (!tmp.isEmpty()) {\n queue.add(tmp.remove());\n }\n }",
"public void push(int x) {\n one.add(x);\n for(int i=0;i<one.size()-1;i++)\n {\n one.add(one.poll());\n }\n \n }",
"public void push(int x) {\n\t int size=q.size();\n\t q.offer(x);\n\t for(int i=0;i<size;i++){\n\t q.offer(q.poll());\n\t }\n\t \n\t }",
"public void push(int x) {\n int n = queue.size();\n queue.offer(x);\n for (int i = 0; i < n; i++) {\n queue.offer(queue.poll());\n }\n }",
"public void push(int x) {\r\n queue1.add(x);\r\n top = x;\r\n }",
"public void push(int x) {\r\n queue1.add(x);\r\n top = x;\r\n }",
"@Override\n\tpublic void push(Object x) {\n\t\tlist.addFirst(x);\n\t}",
"void push(Integer x) {\n\n\t\tif (isEmpty()) {\n\t\t\ttop = new Node(x);\n\t\t\tmid = top;\n\t\t\ttotalNodes++;\n\t\t} else {\n\t\t\tNode n = new Node(x);\n\t\t\tn.next = top;\n\t\t\ttop.prev = n;\n\t\t\ttop = n;\n\t\t\ttotalNodes++;\n\t\t\tif (totalNodes % 2 != 0) {\n\t\t\t\tmid = mid.prev;\n\t\t\t}\n\t\t}\n\t}",
"public void push(int x) {\n if (head == null) {\n head = new Node1(x, x);\n } else {\n head = new Node1(x, Math.min(x, head.min), head);\n }\n }",
"public void push(int x) {\n q.offer(x);\n }",
"@Override\n\tpublic void push(Object x) {\n\t\tthis.vector.add(x);\n\t}",
"public void push(int x) {\n // 第一步先 push\n queue.offer(x);\n // 第二步把前面的变量重新倒腾一遍\n // 这一部分代码很关键,在树的层序遍历中也用到了\n int size = queue.size() - 1;\n for (int i = 0; i < size; i++) {\n queue.offer(queue.poll());\n }\n }",
"void push(Integer x) {\n if (s.isEmpty()) {\n minEle = x;\n s.push(x);\n System.out.println(\"Number Inserted: \" + x);\n return;\n }\n // if new number is less than original minEle\n if (x < minEle) {\n s.push(2 * x - minEle);\n minEle = x;\n } else {\n s.push(x);\n }\n System.out.println(\"Number Inserted: \" + x);\n }",
"public void push(int x) {\n queue.offer(x);\n }",
"public void push(int element) {\n stack1.push(element);\n }",
"public void stackPush(int element) {\r\n\t\ttop++;\r\n\t\tarray[top] = element;\r\n\t\tcount++;\r\n\t }",
"public void push(int x) {\n if (!reverseQueue.isEmpty()) {\n normalQueue.offer(reverseQueue.poll());\n }\n normalQueue.offer(x);\n }",
"public void push(int x) {\r\n this.queueMain.offer(x);\r\n }",
"public void push(int x) {\n // for pop(), so prepare\n // 要想 pop 省事 push到 queue tail 的 x 要 想办法放到队列第一位\n // how 只要不空 移到另外一个 放好 x 再移回来\n while (!One.isEmpty()) {\n Two.add(One.poll());\n }\n One.add(x);\n while (!Two.isEmpty()) {\n One.add(Two.poll());\n }\n }",
"public void push(T x);",
"public void push(int x) {\n p.next=new ListNode(x);\n p = p.next;\n }",
"@Override\n\tpublic void push(T element) {\n\t\tif(top == stack.length) \n\t\t\texpandCapacity();\n\t\t\n\t\tstack[top] = element;\n\t\ttop++;\n\n\t}",
"public void push(ExParValue x) {\r\n\t\t// System.out.println(\"ExPar.push() currently on top \" +\r\n\t\t// value.toString() + \" pushing \" + x.toString());\r\n\t\tExParValue v = x.isUndefined() ? (ExParValue) value.clone()\r\n\t\t\t\t: (ExParValue) x.clone();\r\n\t\tv.next = value;\r\n\t\tvalue = v;\r\n\t\t// System.out.println(\"ExPar.push() New value: \" + value);\r\n\t}",
"public void push (T element)\r\n {\r\n if (size() == stack.length) \r\n expandCapacity();\r\n\r\n stack[top] = element;\r\n top++;\r\n }",
"public void push(int x) {\n\n if (list.isEmpty()) {\n head = x;\n }\n\n list2.add(x);\n while (!(list.isEmpty())) {\n list2.add(list.poll());\n }\n\n while (!(list2.isEmpty())) {\n list.add(list2.poll());\n }\n\n\n }",
"public void push(int x) {\n while (!forReverse.isEmpty()) {\n queue.add(forReverse.poll());\n }\n queue.add(x);\n }",
"void push(int x) \n\t{ \n\t\tif(isEmpty() == true) \n\t\t{ \n\t\t\tsuper.push(x); \n\t\t\tmin.push(x); \n\t\t} \n\t\telse\n\t\t{ \n\t\t\tsuper.push(x); \n\t\t\tint y = min.pop(); \n\t\t\tmin.push(y); \n\t\t\tif(x < y) \n\t\t\t\tmin.push(x); \n\t\t\telse\n\t\t\t\tmin.push(y); \n\t\t} \n\t}",
"private static void sortedInsert(Stack<Integer> stack, int x) {\n if (stack.isEmpty() || stack.peek() < x) {\n stack.push(x);\n return;\n }\n int temp = stack.pop();\n sortedInsert(stack, x);\n stack.push(temp);\n }",
"void push(int stackNum, int value) throws Exception{\n\t//check if we have space\n\tif(stackPointer[stackNum] + 1 >= stackSize){ //last element\n\t\tthrows new Exception(\"Out of space.\");\n\t}\n\n\t//increment stack pointer and then update top value\n\tstackPointer[stackNum]++; \n\tbuffer[absTopOfStack(stackNum)] = value;\n}",
"public void push(int element) {\n while (!stack1.isEmpty()){\n stack2.push(stack1.pop());\n }\n stack1.push(element);\n while(!stack2.isEmpty()){\n stack1.push(stack2.pop());\n }\n }",
"public void push(T x)\n\t{\n\t\t// If the head is null, set the head equal\n\t\t// to the new node.\n\t\tif(head == null)\n\t\t\thead = new Node<T>(x);\n\t\telse\n\t\t{\n\t\t\t// Loop through the list and add the new node\n\t\t\t// on to the back of the list.\n\t\t\tNode<T> curr = head;\n\t\t\twhile(curr.getNext() != null)\n\t\t\t\tcurr = curr.getNext();\n\n\t\t\tNode<T> last = new Node<T>(x);\n\t\t\tcurr.setNext(last);\n\t\t}\t\n\t}",
"public void push(int x) {\n if(!queueA.isEmpty()){\n queueA.add(x);\n }else if(!queueB.isEmpty()){\n queueB.add(x);\n }else{\n queueA.add(x);\n }\n }",
"public void push(T element) {\n if(isFull()) {\n throw new IndexOutOfBoundsException();\n }\n this.stackArray[++top] = element;\n }",
"public void push(int element) {\n\t\tif (top -1 == size) { // top == --size\n\t\t\t//System.out.println(\"Stack is full\");\n\n\t\t\t//Switch\n\t\t\tint[] tmp = new int[size * 2];\n\t\t\tfor(int i = 0; i <= top; i++){\n\t\t\t\ttmp[i] = stacks[i];\n\t\t\t}\n\t\t\tstacks = null;\n\t\t\tstacks = new int[size * 2];\n\t\t\tfor(int i = 0; i <= top; i++){\n\t\t\t\tstacks[i] = tmp[i];\n\t\t\t}\n\t\t\tstacks[++top] = element;\n\t\t\tSystem.out.println(element + \" is pushed\");\n\t\t} else {\n\t\t\tstacks[++top] = element;\n\t\t\tSystem.out.println(element + \" is pushed\");\n\t\t}\n\t\tsize++;\n\t}",
"public void push(int x) {\n if(q1.isEmpty()) {\n q1.add(x);\n while(q2.size() > 0) {\n q1.add(q2.poll());\n }\n }\n else {\n q2.add(x);\n while(q1.size() > 0) {\n q2.add(q1.poll());\n }\n }\n }",
"void push(int x);",
"void push(T x);",
"public void push(int x) {\n q1.push(x);\n if (q2.size() > 0){\n q2.remove();\n }\n }",
"public void push(int x) {\n if(q1.isEmpty()) {\n q1.add(x);\n while(q2.size() > 0) {\n q1.add(q2.poll());\n }\n } else {\n q2.add(x);\n while(q1.size() > 0){\n q2.add(q1.poll());\n }\n }\n }",
"public void push (E item){\n this.stack.add(item);\n }",
"public void push(T value) {\n \tstack.add(value);\n }"
] |
[
"0.86726034",
"0.85932225",
"0.85570914",
"0.8550038",
"0.852482",
"0.8498592",
"0.8488227",
"0.8461912",
"0.8458076",
"0.8428038",
"0.8376653",
"0.8370226",
"0.8368897",
"0.8343204",
"0.83385926",
"0.8335069",
"0.8333074",
"0.83219844",
"0.83110696",
"0.8299808",
"0.82648236",
"0.8260843",
"0.8227758",
"0.81988394",
"0.819731",
"0.81950635",
"0.8136101",
"0.813282",
"0.81123054",
"0.81123054",
"0.81123054",
"0.8089274",
"0.8086407",
"0.8082756",
"0.8058963",
"0.8050122",
"0.80101556",
"0.79978484",
"0.79816735",
"0.7965629",
"0.7918633",
"0.78817797",
"0.7859532",
"0.7854534",
"0.7853485",
"0.78523874",
"0.78523874",
"0.78476787",
"0.7841256",
"0.78404015",
"0.7834868",
"0.7825307",
"0.780459",
"0.7791437",
"0.77746886",
"0.771773",
"0.7690058",
"0.765422",
"0.765174",
"0.7648162",
"0.7646733",
"0.76382875",
"0.7637257",
"0.7633213",
"0.7633213",
"0.7625352",
"0.7617576",
"0.7603999",
"0.75609857",
"0.75587195",
"0.75492984",
"0.75358003",
"0.75231606",
"0.74670357",
"0.7450564",
"0.74457633",
"0.7396862",
"0.73832387",
"0.73720616",
"0.7360162",
"0.73447925",
"0.7335559",
"0.7328421",
"0.7286221",
"0.7262818",
"0.72311556",
"0.72194356",
"0.72047585",
"0.71959877",
"0.7185571",
"0.717108",
"0.7165948",
"0.7088451",
"0.7078484",
"0.7070283",
"0.70639855",
"0.70509607",
"0.704537",
"0.70401484",
"0.70389265"
] |
0.8075835
|
34
|
Removes the element on top of the stack and returns that element.
|
public int pop() {
if (data.size() != 0) {
return data.remove(data.size() - 1);
}
throw new RuntimeException("栈为空,非法操作");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public T pop() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\t//remove top element from stack\n\t\t//and \"clear to let GC do its work\"\n\t\treturn elements.remove(elements.size() - 1);\n\t}",
"@Override\r\n\tpublic T pop() {\r\n\t\tT top = stack[topIndex];\r\n\t\tstack[topIndex] = null;\r\n\t\ttopIndex--;\r\n\t\treturn top;\r\n\t}",
"public Object pop() {\n if (top >= 0) {\n Object currentObject = stack[top--];\n if (top > minStackSize) {\n decreaseStackSize(1);\n }\n return currentObject;\n }\n else {\n return null;\n }\n }",
"public T pop() {\n T top = peek();\n stack[topIndex] = null;\n topIndex--;\n return top;\n }",
"public T pop() {\n \tT retVal = stack.get(stack.size() - 1); // get the value at the top of the stack\n \tstack.remove(stack.size() - 1); // remove the value at the top of the stack\n \treturn retVal;\n }",
"public E pop()\n {\n E topVal = stack.removeFirst();\n return topVal;\n }",
"public E pop(){\n return this.stack.remove(stack.size()-1);\n }",
"public Object pop()\r\n {\n assert !this.isEmpty();\r\n\t\t\r\n Node oldTop = this.top;\r\n this.top = oldTop.getNext();\r\n oldTop.setNext(null); // enable garbage collection\r\n return oldTop.getItem();\r\n }",
"public T pop() {\n\t\tT value = peek();\n\t\tstack.remove(value);\n\t\treturn value;\n\t}",
"public E pop(){\n\t\tif(top == null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tE retval = top.element;\n\t\ttop = top.next;\n\t\t\n\t\treturn retval;\n\t}",
"public E pop () {\n\t\treturn stack.remove( stack.size()-1 );\t\t\n\t}",
"private Element popElement() {\r\n return ((Element)this.elements.remove(this.elements.size() - 1));\r\n }",
"public E pop(){\r\n\t\tObject temp = peek();\r\n\t\t/**top points to the penultimate element*/\r\n\t\ttop--;\r\n\t\treturn (E)temp;\r\n\t}",
"public T pop() {\r\n\t\tT ele = top.ele;\r\n\t\ttop = top.next;\r\n\t\tsize--;\r\n\t\t\r\n\t\treturn ele;\r\n\t}",
"public T pop() {\n\t\tif (this.l.getHead() != null) {\n\t\t\tT tmp = l.getHead().getData();\n\t\t\tl.setHead(l.getHead().getNext());\n\t\t\treturn tmp;\n\t\t} else {\n\t\t\tSystem.out.println(\"No element in stack\");\n\t\t\treturn null;\n\t\t}\n\t}",
"public T pop() {\n if(isEmpty()) {\n throw new NoSuchElementException(\"Stack is empty\");\n }\n return this.stackArray[top--];\n }",
"@Override\n\tpublic T pop() {\n\t\tif(isEmpty()) {\n\t\t\tSystem.out.println(\"Stack is Empty\");\n\t\treturn null;}\n\t\ttop--;\t\t\t\t\t\t//top-- now before since we need index top-1\n\t\tT result = stack[top];\n\t\tstack[top] = null;\n\t\treturn result;\n\t\t\t\n\t}",
"public E removeFirst() {\n return pop();\n }",
"public Object pop() {\n return stack.pop();\n }",
"public GenericStack popStack(){\n if(isEmpty() == true)return null;\n GenericStack temp = top;\n // makes next item in list the tip\n top = top.next;\n return temp;\n }",
"public Object pop( )\n {\n Object item = null;\n\n try\n {\n if ( this.top == null)\n {\n throw new Exception( );\n }\n\n item = this.top.data;\n this.top = this.top.next;\n \n this.count--;\n }\n catch (Exception e)\n {\n System.out.println( \" Exception: attempt to pop an empty stack\" );\n }\n\n return item;\n }",
"public T pop() { //pop = remove the last element added to the array, in a stack last in, first out (in a queue pop and push from different ends)\n try {\n T getOut = (T) myCustomStack[numElements - 1]; //variable for element to remove (pop off) = last element (if you have 7 elements, the index # is 6)\n myCustomStack[numElements] = null; //remove element by making it null\n numElements--; //remove last element, decrease the numElements\n return getOut; //return popped number\n\n } catch (Exception exc) {\n System.out.println(\"Can't pop from empty stack!\");\n return null;\n }\n }",
"Object pop();",
"public E pop() throws NoSuchElementException{\n\t\treturn stackList.removeFromFront();\n\t}",
"public E pop() {\n if(isEmpty()) throw new EmptyStackException();\n\n E itemPopped = this.stack[top-1];\n this.stack[top-1] = null;\n top--;\n return itemPopped;\n\n }",
"public Object pop();",
"public T pop() {\n\t\tT value = null;\n\t\tif (!isEmpty()) {\n\t\t\ttop = top.next;\n\t\t\tvalue = top.value;\n\t\t}\n\t\treturn value; // returning popped value\n\t}",
"public T pop() {\r\n if ( top == null )\r\n throw new IllegalStateException(\"Can't pop from an empty stack.\");\r\n T topItem = top.item; // The item that is being popped.\r\n top = top.next; // The previous second item is now on top.\r\n return topItem;\r\n }",
"public T peek() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\t//returns the top element.\n\t\treturn elements.get(elements.size()-1);\n\t}",
"public T pop();",
"public T pop();",
"public T pop();",
"public T pop();",
"public T pop();",
"public T pop();",
"public T pop();",
"public T pop();",
"public Item pop() {\n if(isEmpty()) return null;\n Item item = top.data;\n top = top.next;\n size--;\n return item;\n\n }",
"public T pop() throws EmptyStackException\r\n {\r\n if (isEmpty())\r\n throw new EmptyStackException();\r\n\r\n top--;\r\n T result = stack[top];\r\n stack[top] = null; \r\n\r\n return result;\r\n }",
"public TYPE pop();",
"public Object pop()\n\t{\n\t\tif (size == 0)\n\t\t\tthrow new EmptyStackException();\n\t\t\n\t\tObject result = elements[--size];\n\t\telements[size] = null;\n\t\treturn result;\n\t}",
"public Employee pop() {\n if (isEmpty()) {\n throw new EmptyStackException();\n }\n /*top always contains the index of next available position in the array so, there is nothing at top.\n The top item on the stack is actually stored at top-1\n */\n Employee employee = stack[--top];\n stack[top] = null; //assign removed element position to null\n return employee; // return the removed element\n }",
"@Override\n\tpublic E pop() throws EmptyStackException {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException(\"Empty Stack\");\n\t\t}\n\t\tE element = arr[top];\n\t\tarr[top--] = null;\n\t\treturn element;\n\t}",
"private final Object pop() {\r\n\t\treturn eval_stack.remove(eval_stack.size() - 1);\r\n\t}",
"T pop();",
"T pop();",
"T pop();",
"public Object pop() {\n if (isEmpty())\n throw new EmptyStackException();\n\n Object value = peek();\n collection.remove(collection.size() - 1);\n return value;\n }",
"public T pop() {\r\n T o = get(size() - 1);\r\n remove(size() - 1);\r\n return o;\r\n\t}",
"public T pop() throws EmptyStackException {\n if (top == null) {\n throw new EmptyStackException();\n }\n\n StackNode<T> removed = top;\n top = top.getNext();\n return removed.getData();\n }",
"public Object pop() {\n\t\tif(this.isEmpty())\n throw new IllegalStateException(\"Stack is empty\");\n return items.remove(items.size() - 1);\n\t}",
"@Override\n public E pop() {\n E result = peek();\n storage[ top-- ] = null;\n return result;\n\n }",
"public Object pop() {\n if (top != null) {\n Object item = top.getOperand();\n\n top = top.next;\n return item;\n }\n\n System.out.println(\"Stack is empty\");\n return null;\n\n }",
"public T pop()\n\t{\n\t\treturn list.removeFirst();\n\t}",
"public T pop()\n {\n if (ll.getSize()==0){\n return null;\n }else {\n T temp = ll.getData(ll.getSize() - 1);\n ll.remove(ll.getSize() - 1);\n\n return temp;\n }\n }",
"@Override\n public T pop(){\n\n if (arrayAsList.isEmpty()){\n throw new IllegalStateException(\"Stack is empty. Nothing to pop!\");\n }\n\n T tempElement = arrayAsList.get(stackPointer - 1);\n arrayAsList.remove(--stackPointer);\n\n return tempElement;\n }",
"T pop() {\n if (stackSize == 0) {\n throw new EmptyStackException();\n }\n return stackArray[--stackSize];\n }",
"@Override\r\n\tpublic E pop() {\r\n\t\tif (isEmpty())\r\n\t\t\treturn null;\r\n\t\tE answer = stack[t];\r\n\t\tstack[t] = null; // dereference to help garbage collection\r\n\t\tt--;\r\n\t\treturn answer;\r\n\t}",
"public String pop() {\n String removed = NOTHING;\n // Is there anything in the stack to remove?\n if (usage > 0) {\n // Obtain the topmost value from the stack\n removed = this.foundation[this.foundation.length - this.usage];\n // Clean up the array location\n this.foundation[this.foundation.length - this.usage] = null;\n // Decrease usage counter\n usage--;\n }\n return removed;\n }",
"public Object pop() {\n\t\tObject o = get(getSize() - 1);\n\t\tremove(getSize() - 1);\n\t\treturn o;\n\t}",
"public T pop() {\r\n\r\n\t\tT top = peek(); // Throws exception if stack is empty.\r\n\t\t\r\n\t\t// Sets top of stack to next link. \r\n\t\ttopNode = topNode.getNext();\r\n\t\t\r\n\t\treturn top;\r\n\t\t\r\n\t}",
"public T pop() {\n if (this.top == null) {\n throw new EmptyStackException();\n }\n T data = this.top.data;\n this.top = this.top.below;\n return data;\n }",
"private synchronized BackStep pop() {\r\n\t\t\tBackStep bs;\r\n\t\t\tbs = stack[top];\r\n\t\t\tif (size == 1) {\r\n\t\t\t\ttop = -1;\r\n\t\t\t} else {\r\n\t\t\t\ttop = (top + capacity - 1) % capacity;\r\n\t\t\t}\r\n\t\t\tsize--;\r\n\t\t\treturn bs;\r\n\t\t}",
"public T pop() {\n\t\tif (isEmpty())\n\t\t\tthrow new EmptyStackException();\n\t\telse\n\t\t\treturn vector.remove(vector.size() - 1);\t\t\n\t}",
"public Session pop() {\r\n\t\tint oldIndex = index;\r\n\t\tif (index >= 0) {\r\n\t\t\tindex--;\r\n\t\t\treturn stack[oldIndex];\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public T top() {\n \treturn stack.get(stack.size() - 1);\n }",
"@Override\r\n\tpublic E pop() {\n\t\treturn null;\r\n\t}",
"public void pop();",
"public final Object pop()\n {\n synchronized (this.stack)\n {\n return this.stack[--this.pointer];\n }\n }",
"@Override\n\tpublic E pop() {\n\t\treturn null;\n\t}",
"Object pop(){\r\n\t\tlastStack = getLastStack();\r\n\t\tif(lastStack!=null){\r\n\t\t\tint num = lastStack.pop();\r\n\t\t\treturn num;\r\n\t\t} else {stacks.remove(stacks.size()-1);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic T pop() throws StackUnderflowException {\r\n\t\tif (!isEmpty()) {\r\n\t\t\tT e = stack.get(size()-1);\r\n\t\t\tstack.remove(size()-1);\r\n\t\t\treturn e;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new StackUnderflowException();\r\n\t\t}\r\n\t}",
"public T pop() {\n if (head == null) {\n return null;\n } else {\n Node<T> returnedNode = head;\n head = head.getNext();\n return returnedNode.getItem();\n }\n }",
"@Override\n\tpublic Object pop() {\n\t\tif (elementCount == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\telementCount--;\n\t\treturn elementData[elementCount];\n\t}",
"public T pop()\n {\n return pop(first);\n }",
"public O popBack()\r\n {\r\n if (!isEmpty())\r\n {\r\n VectorItem<O> l = last;\r\n last = last.getPrevious();\r\n\r\n count--;\r\n if (isEmpty()) first = null;\r\n else last.setNext(null);\r\n return l.getObject();\r\n } else\r\n return null;\r\n \r\n }",
"E pop() throws EmptyStackException;",
"public Object pop() {\n return fStack.pop();\n }",
"@Override\r\n\tpublic T top() throws StackUnderflowException{\r\n\t\tif (!isEmpty()) {\r\n\t\t\tT e = stack.get(size()-1);\r\n\t\t\treturn e;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new StackUnderflowException();\r\n\t\t}\r\n\t}",
"public E pop();",
"public E pop();",
"public E pop();",
"public E pop();",
"public E pop();",
"public E pop() {\n return stackImpl.pop();\n }",
"public E pop() \r\n {\r\n E o = list.get(getSize() - 1);\r\n list.remove(getSize() - 1);\r\n return o;\r\n }",
"public AnyType pop() throws StackException;",
"public K pop() {\n\t\tK data = null;\r\n\t\tif(top!=null){\r\n\t\t\tdata = top.data;\r\n\t\t\ttop = top.next;\r\n\t\t\tsize--;\r\n\t\t}\r\n\t\treturn data;\r\n\t}",
"public Item pop()\n {\n if (isEmpty()) throw new NoSuchElementException(\"Stack underflow\");\n Item item = top.item;\n top = top.next;\n N--;\n return item;\n }",
"public T pop() {\n StackNode tempNode = peekNode();\n\n if(length > 1) {\n lastNode = peekNode().getParent();\n tempNode.setParent(null);\n length--;\n return (T) tempNode.getTData();\n }\n else if(length == 1) {\n lastNode = new StackNode();\n length--;\n return (T) tempNode.getTData();\n }\n else {\n throw new IndexOutOfBoundsException(\"Your stack is empty!\");\n }\n }",
"public void pop()\r\n\t{\r\n\t\ttop--;\r\n\t\tstack[top] = null;\r\n\t}",
"public Node<T> pop() {\n\n\t\tNode<T> popNode = new Node<T>();\n\t\tpopNode = getTopNode();\n\n\t\t/*\n\t\t * Three special cases for a pop() are a empty stack, only one node at\n\t\t * the top and a stack with multiple elements.\n\t\t */\n\t\tif (isEmpty()) {\n\t\t\tSystem.out.println(\"Stack is EMPTY!!\");\n\t\t\treturn (null);\n\t\t} else if (stackSize == 1) {\n\t\t\ttopNode = null;\n\t\t} else {\n\t\t\ttopNode = topNode.getNextNode();\n\t\t}\n\n\t\tSystem.out.println(\"## POP \\\"\" + popNode.data + \"\\\" FROM STACK ##\");\n\n\t\t// Decrease Stack Size\n\t\tsetStackSize(getStackSize() - 1);\n\t\treturn (popNode);\n\t}",
"public T pop() throws StackUnderflowException{\r\n\t\t\t\t\r\n\t\t// check if the stack is empty before popping up.\r\n\t\tif(stackData.isEmpty())\r\n\t\t\tthrow new StackUnderflowException();\r\n\r\n\t\treturn stackData.remove(stackData.size()-1); //popping;\r\n\t}",
"public Object pop() {\n\t\tObject lastElement = peek();\n\t\t\n\t\tint indexOfLastElement = collection.size() - 1;\n\t\tcollection.remove(indexOfLastElement);\n\t\t\n\t\treturn lastElement;\n\t}",
"public E pop(){\r\n Node<E> curr = top;\r\n top = top.getNext();\r\n size--;\r\n return (E)curr.getData();\r\n \r\n }",
"@Override\n\tpublic E pop() {\n\t\tif(size == 0) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\tsize--;\n\t\treturn list.remove(0);\n\t}",
"public E pop(){\n E o = list.get(list.size() - 1);\n list.remove(list.size() - 1);\n return o;\n }",
"E pop();",
"E pop();",
"E pop();",
"@Override\n public T pop() {\n if (!isEmpty()) {\n T data = backing[size - 1];\n backing[size - 1] = null;\n size--;\n return data;\n } else {\n throw new NoSuchElementException(\"The stack is empty\");\n }\n }"
] |
[
"0.7831054",
"0.78167725",
"0.7808246",
"0.7797564",
"0.7689596",
"0.7677747",
"0.7633739",
"0.76071864",
"0.7598945",
"0.7597015",
"0.7577195",
"0.75743157",
"0.75456405",
"0.75169796",
"0.750027",
"0.74873495",
"0.74667877",
"0.7460093",
"0.74569875",
"0.7456191",
"0.744837",
"0.74207103",
"0.7406906",
"0.74033815",
"0.7401186",
"0.7379766",
"0.7370952",
"0.73472834",
"0.734713",
"0.7335123",
"0.7335123",
"0.7335123",
"0.7335123",
"0.7335123",
"0.7335123",
"0.7335123",
"0.7335123",
"0.7324371",
"0.7313926",
"0.7311951",
"0.73110545",
"0.7310549",
"0.7304512",
"0.7297009",
"0.7293909",
"0.7293909",
"0.7293909",
"0.7284467",
"0.72834486",
"0.72771436",
"0.7270916",
"0.7266674",
"0.72660893",
"0.72511417",
"0.7238035",
"0.72323054",
"0.72286993",
"0.72209424",
"0.72192407",
"0.7210599",
"0.72091603",
"0.7199765",
"0.7196248",
"0.7195882",
"0.7189582",
"0.71828914",
"0.71817344",
"0.7177487",
"0.71751624",
"0.71638006",
"0.7152466",
"0.7151245",
"0.7142062",
"0.71410716",
"0.71334636",
"0.7117701",
"0.71173024",
"0.71133095",
"0.71099454",
"0.71064913",
"0.71064913",
"0.71064913",
"0.71064913",
"0.71064913",
"0.7102089",
"0.71010643",
"0.70969707",
"0.7088635",
"0.7065762",
"0.7061361",
"0.70485055",
"0.7044555",
"0.7040969",
"0.70397604",
"0.7035089",
"0.7034882",
"0.7031653",
"0.70310974",
"0.70310974",
"0.70310974",
"0.70287824"
] |
0.0
|
-1
|
Get the top element.
|
public int top() {
if (data.size() != 0) {
return data.get(data.size() - 1);
}
throw new RuntimeException("top: 栈为空,非法操作");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public int top() {\n return topElem;\n }",
"public E top() {\n return !isEmpty() ? head.item : null;\n }",
"public int topElement() {\n\t\tif(isEmpty()){\n\t\t\tthrow new AssertionError();\n\t\t}\n\t\telse {\n\t\t\treturn heap.get(0).element;\n\t\t\n\t\t}\n\t}",
"public T getTop( );",
"E top();",
"public int top() { return 0; }",
"public int top() {\r\n return top;\r\n }",
"public int top() {\r\n return top;\r\n }",
"public int getTop() {\n\t\treturn this.top;\n\t}",
"public int getTop() {\n\treturn top;\n }",
"public Integer getTop() {\n return top;\n }",
"public int top() {\n return top;\n }",
"public int getTop() {\n return top;\n }",
"public T top();",
"public int top() {\n return One.peek();\n }",
"public T peek() {\r\n\t\tT ele = top.ele;\r\n\t\treturn ele;\r\n\t}",
"Location getTop() {\n // -\n if(!isEmpty())\n return top.getLocation();\n return null;\n }",
"public float getTop() {\n return internalGroup.getTop();\n }",
"public abstract Object top();",
"public T top() {\n \treturn stack.get(stack.size() - 1);\n }",
"public int top() {\n return (int) one.peek();\n \n }",
"public int top() {\n return list.peek();\n }",
"public E top() {\n return head.prev.data;\n }",
"public int top() {\n return top.value;\n }",
"public int top();",
"public E top()\n {\n E topVal = stack.peekFirst();\n return topVal;\n }",
"public MeasurementCSSImpl getTop()\n\t{\n\t\treturn top;\n\t}",
"public E peek(){\n\t\treturn top.element;\n\t}",
"public int top() {\n\t return q.peek();\n\t }",
"public Node top() {\r\n\t\treturn start;\r\n\t}",
"public int top() {\n return q.peek();\n }",
"public int top() {\n \treturn list.get(list.size()-1);\n }",
"public int getTop() {\n return position[0] - (size - 1) / 2;\n }",
"public int top() {\n\t\treturn list.get(list.size() - 1);\n\t}",
"public int top() {\n return objects.peek();\n }",
"public int top() {\n return q1.getFirst();\n }",
"public E top()\n\tthrows EmptyStackException;",
"public E top() {\n\t\tif (this.top == null) {\n\t\t\tthrow new EmptyStackException( );\n\t\t}\n\t\treturn this.top.data;\n\t\t\t\n\t}",
"@Override\n\tpublic E top() throws EmptyStackException {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException(\"Empty Stack\");\n\t\t}\n\t\treturn arr[top];\n\t}",
"public Node<T> getTopNode() {\n\t\treturn topNode;\n\t}",
"public int top() {\n return queue.element();\n }",
"public int top() {\n\t\treturn stack.peek();\n \n }",
"public T peek() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\t//returns the top element.\n\t\treturn elements.get(elements.size()-1);\n\t}",
"public int top() {\n return q1.peek();\n }",
"public int viewTop(){\r\n\t\treturn queue[0];\r\n\t}",
"public int top() {\n int size = q.size();\n for(int i = 1; i<size;i++){\n q.offer(q.poll());\n }\n int value = q.peek();\n q.offer(q.poll());\n \n return value;\n }",
"public K topValue() {\n\t\tif(top!=null)\r\n\t\t\treturn top.data;\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public int top() {\n return p.val;\n }",
"public Object peek()\r\n {\n assert !this.isEmpty();\r\n return this.top.getItem();\r\n }",
"public int top() {\r\n int value = this.pop();\r\n this.stack.offer(value);\r\n return value;\r\n }",
"public int top() {\n if(!q1.isEmpty())return q1.peek();\n else return -1;\n }",
"@Nullable\n public DpProp getTop() {\n if (mImpl.hasTop()) {\n return DpProp.fromProto(mImpl.getTop());\n } else {\n return null;\n }\n }",
"public String top(){\n if(!(pilha.size() == 0)){\n return pilha.get(pilha.size()-1);\n }else{\n return null;\n }\n }",
"public ILocation top()\n {\n EmptyStackException ex = new EmptyStackException();\n if (top <= 0)\n {\n throw ex;\n }\n else\n {\n return stack.get(top - 1);\n }\n }",
"public E popTop() {\n // FILL IN\n }",
"public int top() {\n return stack1.peek();\n }",
"public Card top() {\r\n\t\treturn cards.get(cards.size() - 1);\r\n\t}",
"public View getTopView() {\n\t\tint topViewIndex = getChildCount() - 1;\n\t\treturn getChildAt(topViewIndex);\n\t}",
"public Card top() {\n\t\treturn firstCard;\n\t}",
"public int top() {\n Integer poll = q1.peek();\n return poll == null ? -1 : poll;\n }",
"public int top() {\n return queue.peek();\n }",
"public int top() {\n return queue.peek();\n }",
"public int getElementAtTopOfStack() {\n if (isEmpty()) throw new RuntimeException(\"Stack underflow\");\n return myarray[top];\n \n }",
"int top();",
"public int top() {\n return queue.peek();\n }",
"public int top() {\n return queue.peek();\n }",
"public E top() throws StackUnderflowException {\r\n E item = null;\r\n if(!isEmpty()) item = items.get(0);\r\n else throw new StackUnderflowException(\"Stack Empty\");\r\n \r\n return item;\r\n }",
"public int top() {\n\t\tIterator<Integer> iter = queue.iterator();\n\t\tint temp = 0;\n\t\twhile (iter.hasNext())\n\t\t\ttemp = iter.next();\n\t\treturn temp;\n\t}",
"public int top() {\n move();\n return reverseQueue.peek();\n }",
"public String top() {\n return queue.size() == 0 ? null : queue.get(0);\n }",
"@VisibleForTesting\n public TaskStack getTopStack() {\n if (DisplayContent.this.mTaskStackContainers.getChildCount() > 0) {\n return (TaskStack) DisplayContent.this.mTaskStackContainers.getChildAt(DisplayContent.this.mTaskStackContainers.getChildCount() - 1);\n }\n return null;\n }",
"public Card getTopCard(){\n\t\treturn getCard(4);\n\t\t\n\t}",
"public Disc top()\n\t{\n\t\tint poleSize = pole.size();\n\n\t\t// If the pole is empty, return nothing\n\t\tif(poleSize == 0)\n\t\t\treturn null;\n\n\t\t// Otherwise return the top disc\n\t\treturn pole.get(poleSize - 1);\n\t}",
"public int top() {\r\n int size = this.queueMain.size();\r\n if(size == 1) return this.queueMain.element();\r\n // 转移n-1\r\n while(size != 1){\r\n this.queueHelp.offer(this.queueMain.poll());\r\n size--;\r\n }\r\n // 然后取出第n个元素\r\n int res = this.queueHelp.element();\r\n // 转移到辅助队列\r\n this.queueHelp.offer(this.queueMain.poll());\r\n // 再调换\r\n Queue<Integer> temp = this.queueMain;\r\n this.queueMain = this.queueHelp;\r\n this.queueHelp = temp;\r\n\r\n return res;\r\n }",
"public T peek() {\n return top.getData();\n }",
"public int top() {\n return queue.peekLast();\n }",
"public int top() {\n return queue.getLast();\n }",
"public int top() {\n int size=queue.size();\n for (int i = 0; i < size-1; i++) {\n int temp=queue.poll();\n queue.add(temp);\n }\n int top=queue.poll();\n queue.add(top);\n return top;\n }",
"@Override\n\tpublic T top()\n\t{\n if(list.size()==0)\n {\n throw new IllegalStateException(\"Stack is empty\");\n }\n return list.get(getSize()-1);\n\t}",
"public Integer peek() {\n if (hasTop)\n return top;\n top = it.next();\n hasTop = true;\n return top;\n }",
"public T top() throws StackUnderflowException;",
"@DISPID(-2147417103)\n @PropGet\n int offsetTop();",
"public static Interval topInterval(){\n\t\treturn top;\n\t}",
"public double getTop() {\n return this.yT;\n }",
"public int top() {\n\t\treturn count == 0? -1 : st[count-1];\r\n\t}",
"public T peek() {\n\t\treturn top.value;\n\t}",
"public int top() {\n int size = queue.size();\n for (int i = 0; i < size - 1; i++) {\n Integer poll = queue.poll();\n queue.offer(poll);\n }\n Integer poll = queue.poll();\n queue.offer(poll);\n return poll;\n }",
"public Card getTopCard() {\n\t\treturn topCard;\n\t}",
"public int top() {\n if(q1.size() > 0){\n return q1.peek();\n } else {\n return q2.peek();\n }\n }",
"public int top() {\n if(q1.size() > 0) {\n return q1.peek();\n } else {\n return q2.peek();\n }\n }",
"public Card topCard() {\n return this.deck.peek();\n }",
"public Card showTop() {\n\t\treturn hand.get(0);\n\t}",
"public int top() {\n return queue1.peek();\n }",
"public E pop(){\n\t\tif(top == null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tE retval = top.element;\n\t\ttop = top.next;\n\t\t\n\t\treturn retval;\n\t}",
"@Override\n public E top()throws EmptyStackException{\n E c = null;\n if(!isEmpty()){\n c = stackArray[count-1];\n return c;\n }\n \n else \n throw new EmptyStackException();\n }",
"public final Symbol top() {\n\t\ttry {\n\t\t\treturn opstack.top().getSymbol();\n\t\t} catch (BadTypeException | EmptyStackException e) {\n\t\t\tSystem.out.println(\"An exception has occurred, \"\n\t\t\t\t\t+ \"Maybe the stack has gone empty\");\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n\tpublic final int getBodyOffsetTop() {\n\t\treturn DOMImpl.impl.getBodyOffsetTop(documentFor());\n\t}",
"public int stackTop() {\r\n\t return array[top];\r\n\t }",
"@Override\r\n\tpublic T top() throws StackUnderflowException{\r\n\t\tif (!isEmpty()) {\r\n\t\t\tT e = stack.get(size()-1);\r\n\t\t\treturn e;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new StackUnderflowException();\r\n\t\t}\r\n\t}",
"protected abstract String getTopElementDesc();"
] |
[
"0.8335419",
"0.79350287",
"0.77536744",
"0.7748599",
"0.76948357",
"0.76440716",
"0.76287603",
"0.76287603",
"0.76210487",
"0.761078",
"0.75897783",
"0.757352",
"0.75697553",
"0.75569373",
"0.75336695",
"0.74941546",
"0.7478168",
"0.7464024",
"0.7455516",
"0.744731",
"0.7420307",
"0.74064183",
"0.7404334",
"0.7353008",
"0.73424685",
"0.7341916",
"0.7309753",
"0.73067194",
"0.73048276",
"0.72713166",
"0.7264665",
"0.72567767",
"0.7251667",
"0.72243714",
"0.72178376",
"0.7213566",
"0.71938527",
"0.71595603",
"0.71482515",
"0.71470845",
"0.71425194",
"0.71301484",
"0.70901084",
"0.7072783",
"0.70704937",
"0.7051931",
"0.70452917",
"0.7038905",
"0.70281166",
"0.7018083",
"0.7016962",
"0.70164806",
"0.70121604",
"0.69869167",
"0.69616324",
"0.6950085",
"0.6943346",
"0.6937197",
"0.69266814",
"0.6905805",
"0.69020635",
"0.69020635",
"0.6881843",
"0.6880443",
"0.68785655",
"0.68785655",
"0.6876129",
"0.6875657",
"0.6870703",
"0.6870001",
"0.6850275",
"0.6835022",
"0.6834514",
"0.68320215",
"0.67999524",
"0.6795726",
"0.6791124",
"0.67760855",
"0.6769921",
"0.6759245",
"0.6757686",
"0.67564976",
"0.6752771",
"0.6745556",
"0.67297226",
"0.67111665",
"0.66882724",
"0.6669713",
"0.66412",
"0.6635151",
"0.662763",
"0.66263247",
"0.65971553",
"0.6585567",
"0.65791434",
"0.6574525",
"0.65619075",
"0.6542071",
"0.6534093",
"0.64797187"
] |
0.6572038
|
96
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.