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 |
|---|---|---|---|---|---|---|
on click method for ad time picker
|
public void pickAdTime(View view) {
DialogFragment newFragment = new AdTimePicker();
newFragment.show(getFragmentManager(), "adTimePicker");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void onClick(View v) {\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(AddRDV.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n editTextHeur.setText(String.format(\"%02d\",selectedHour) + \":\" + String.format(\"%02d\" ,selectedMinute)+\":\"+\"00\");\n }\n }, hour, minute, true);//Yes 24 hour time\n mTimePicker.setTitle(\"Select time of your appointment\");\n mTimePicker.show();\n\n }",
"@Override\n public void onClick(View view) {\n timeDialog.show(getFragmentManager(), \"timePicker\");\n }",
"@Override\n public void onClick(View v) {\n showDialog(TIME_DIALOG_ID);\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog48 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t48Hour48 = hourOfDay1;\n t48Minute48 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t48Hour48, t48Minute48);\n //set selected time on text view\n\n\n timeE24 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime24.setText(timeE24);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog48.updateTime(t48Hour48, t48Minute48);\n //show dialog\n timePickerDialog48.show();\n }",
"@Override\n public void onClick(View v) {\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(getActivity(), new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n eventTime.setText( selectedHour + \":\" + selectedMinute);\n }\n }, hour, minute, true);//Yes 24 hour time\n mTimePicker.setTitle(\"Event Time\");\n mTimePicker.show();\n\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog40 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t40Hour40 = hourOfDay1;\n t40Minute40 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t40Hour40, t40Minute40);\n //set selected time on text view\n\n\n timeE20 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime20.setText(timeE20);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog40.updateTime(t40Hour40, t40Minute40);\n //show dialog\n timePickerDialog40.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog34 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t34Hour34 = hourOfDay1;\n t34Minute34 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t34Hour34, t34Minute34);\n //set selected time on text view\n\n\n timeE17 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime17.setText(timeE17);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog34.updateTime(t34Hour34, t34Minute34);\n //show dialog\n timePickerDialog34.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog16 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t16Hour16 = hourOfDay1;\n t16Minute16 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t16Hour16, t16Minute16);\n //set selected time on text view\n\n\n timeE8 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime8.setText(timeE8);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog16.updateTime(t16Hour16, t16Minute16);\n //show dialog\n timePickerDialog16.show();\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tflag = 1;\n\t\t\t\tshowDialog(TIME_DIALOG_ID);\n\t\t\t}",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog32 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t32Hour32 = hourOfDay1;\n t32Minute32 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t32Hour32, t32Minute32);\n //set selected time on text view\n\n\n timeE16 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime16.setText(timeE16);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog32.updateTime(t32Hour32, t32Minute32);\n //show dialog\n timePickerDialog32.show();\n }",
"@Override\n public void onClick(View v) {\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(AddReminder.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n edtSelectTimeForMeet.setText( \"\" + selectedHour + \":\" + selectedMinute);\n }\n }, hour, minute, true);\n mTimePicker.setTitle(\"Select Time\");\n mTimePicker.show();\n\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\tShowTimePickerDialog();\r\n\r\n\t\t\t}",
"@Override\n public void onClick(View v) {\n new TimePickerDialog(getActivity(), starttimepicker, trigger.getStarttime().get(Calendar.HOUR), trigger.getStarttime().get(Calendar.MINUTE), true).show();\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tflag = 2;\n\t\t\t\tshowDialog(TIME_DIALOG_ID);\n\t\t\t}",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog18 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t18Hour18 = hourOfDay1;\n t18Minute18 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t18Hour18, t18Minute18);\n //set selected time on text view\n\n\n timeE9 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime9.setText(timeE9);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog18.updateTime(t18Hour18, t18Minute18);\n //show dialog\n timePickerDialog18.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog24 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t24Hour24 = hourOfDay1;\n t24Minute24 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t24Hour24, t24Minute24);\n //set selected time on text view\n\n\n timeE12 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime12.setText(timeE12);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog24.updateTime(t24Hour24, t24Minute24);\n //show dialog\n timePickerDialog24.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog42 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t42Hour42 = hourOfDay1;\n t42Minute42 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t42Hour42, t42Minute42);\n //set selected time on text view\n\n\n timeE21 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime21.setText(timeE21);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog42.updateTime(t42Hour42, t42Minute42);\n //show dialog\n timePickerDialog42.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog47 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t47Hour47 = hourOfDay1;\n t47Minute47 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t47Hour47, t47Minute47);\n //set selected time on text view\n\n\n timeS24 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime24.setText(timeS24);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog47.updateTime(t47Hour47, t47Minute47);\n //show dialog\n timePickerDialog47.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog31 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t31Hour31 = hourOfDay1;\n t31Minute31 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t31Hour31, t31Minute31);\n //set selected time on text view\n\n\n timeS16 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime16.setText(timeS16);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog31.updateTime(t31Hour31, t31Minute31);\n //show dialog\n timePickerDialog31.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog36 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t36Hour36 = hourOfDay1;\n t36Minute36 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t36Hour36, t36Minute36);\n //set selected time on text view\n\n\n timeE18 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime18.setText(timeE18);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog36.updateTime(t36Hour36, t36Minute36);\n //show dialog\n timePickerDialog36.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog38 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t38Hour38 = hourOfDay1;\n t38Minute38 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t38Hour38, t38Minute38);\n //set selected time on text view\n\n\n timeE19 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime19.setText(timeE19);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog38.updateTime(t38Hour38, t38Minute38);\n //show dialog\n timePickerDialog38.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog39 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t39Hour39 = hourOfDay1;\n t39Minute39 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t39Hour39, t39Minute39);\n //set selected time on text view\n\n\n timeS20 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime20.setText(timeS20);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog39.updateTime(t39Hour39, t39Minute39);\n //show dialog\n timePickerDialog39.show();\n }",
"@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\n\t\t\t\t TimePickerDialog tpd = new TimePickerDialog(contextyeild, //same Activity Context like before\n\t\t\t\t new TimePickerDialog.OnTimeSetListener() {\n\n\t\t\t\t @Override\n\t\t\t\t public void onTimeSet(TimePicker view, int hourOfDay,int minute) {\n\t\t\t\t \n\t\t\t\t hour = hourOfDay;\n\t\t\t\t \t\t min = minute;\n\t\t\t\t \t\t \n\t\t\t\t \t\t\t String timeSet = \"\";\n\t\t\t\t \t\t\t if (hour > 12) {\n\t\t\t\t \t\t\t hour -= 12;\n\t\t\t\t \t\t\t timeSet = \"PM\";\n\t\t\t\t \t\t\t } else if (hour == 0) {\n\t\t\t\t \t\t\t hour += 12;\n\t\t\t\t \t\t\t timeSet = \"AM\";\n\t\t\t\t \t\t\t } else if (hour == 12)\n\t\t\t\t \t\t\t timeSet = \"PM\";\n\t\t\t\t \t\t\t else\n\t\t\t\t \t\t\t timeSet = \"AM\";\n\t\t\t\t \t\t\t \n\t\t\t\t \t\t\t \n\t\t\t\t \t\t\t String minutes = \"\";\n\t\t\t\t \t\t\t if (min < 10)\n\t\t\t\t \t\t\t minutes = \"0\" + min;\n\t\t\t\t \t\t\t else\n\t\t\t\t \t\t\t minutes = String.valueOf(min);\n\t\t\t\t \t\t\t \n\t\t\t\t \t\t\t // Append in a StringBuilder\n\t\t\t\t \t\t\t String aTime = new StringBuilder().append(hour).append(':')\n\t\t\t\t \t\t\t .append(minutes).append(\" \").append(timeSet).toString();\n\t\t\t\t \t\t\t \n\t\t\t\t \t\t\t harvesttime.setText(aTime); \n\t\t\t\t }\n\t\t\t\t }, hour, min, false);\n\t\t\t\t \n\t\t\t\t tpd.show();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog20 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t20Hour20 = hourOfDay1;\n t20Minute20 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t20Hour20, t20Minute20);\n //set selected time on text view\n\n\n timeE10 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime10.setText(timeE10);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog20.updateTime(t20Hour20, t20Minute20);\n //show dialog\n timePickerDialog20.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog46 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t46Hour46 = hourOfDay1;\n t46Minute46 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t46Hour46, t46Minute46);\n //set selected time on text view\n\n\n timeE23 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime23.setText(timeE23);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog46.updateTime(t46Hour46, t46Minute46);\n //show dialog\n timePickerDialog46.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog25 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t25Hour25 = hourOfDay1;\n t25Minute25 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t25Hour25, t25Minute25);\n //set selected time on text view\n\n\n timeS13 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime13.setText(timeS13);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog25.updateTime(t25Hour25, t25Minute25);\n //show dialog\n timePickerDialog25.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog50 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t50Hour50 = hourOfDay1;\n t50Minute50 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t50Hour50, t50Minute50);\n //set selected time on text view\n\n\n timeE25 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime25.setText(timeE25);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog50.updateTime(t50Hour50, t50Minute50);\n //show dialog\n timePickerDialog50.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog35 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t35Hour35 = hourOfDay1;\n t35Minute35 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t35Hour35, t35Minute35);\n //set selected time on text view\n\n\n timeS18 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime18.setText(timeS18);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog35.updateTime(t35Hour35, t35Minute35);\n //show dialog\n timePickerDialog35.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog49 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t49Hour49 = hourOfDay1;\n t49Minute49 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t49Hour49, t49Minute49);\n //set selected time on text view\n\n\n timeS25 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime25.setText(timeS25);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog49.updateTime(t49Hour49, t49Minute49);\n //show dialog\n timePickerDialog49.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog4 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t4Hour4 = hourOfDay1;\n t4Minute4 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t4Hour4, t4Minute4);\n //set selected time on text view\n\n\n timeE2 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime2.setText(timeE2);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog4.updateTime(t4Hour4, t4Minute4);\n //show dialog\n timePickerDialog4.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog43 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t43Hour43 = hourOfDay1;\n t43Minute43 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t43Hour43, t43Minute43);\n //set selected time on text view\n\n\n timeS22 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime22.setText(timeS22);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog43.updateTime(t43Hour43, t43Minute43);\n //show dialog\n timePickerDialog43.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog33 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t33Hour33 = hourOfDay1;\n t33Minute33 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t33Hour33, t33Minute33);\n //set selected time on text view\n\n\n timeS17 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime17.setText(timeS17);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog33.updateTime(t33Hour33, t33Minute33);\n //show dialog\n timePickerDialog33.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog12 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t12Hour12 = hourOfDay1;\n t12Minute12 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t12Hour12, t12Minute12);\n //set selected time on text view\n\n\n timeE6 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime6.setText(timeE6);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog12.updateTime(t12Hour12, t12Minute12);\n //show dialog\n timePickerDialog12.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog19 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t19Hour19 = hourOfDay1;\n t19Minute19 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t19Hour19, t19Minute19);\n //set selected time on text view\n\n\n timeS10 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime10.setText(timeS10);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog19.updateTime(t19Hour19, t19Minute19);\n //show dialog\n timePickerDialog19.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog17 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t17Hour17 = hourOfDay1;\n t17Minute17 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t17Hour17, t17Minute17);\n //set selected time on text view\n\n\n timeS9 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime9.setText(timeS9);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog17.updateTime(t17Hour17, t17Minute17);\n //show dialog\n timePickerDialog17.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog27 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t27Hour27 = hourOfDay1;\n t27Minute27 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t27Hour27, t27Minute27);\n //set selected time on text view\n\n\n timeS14 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime14.setText(timeS14);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog27.updateTime(t27Hour27, t27Minute27);\n //show dialog\n timePickerDialog27.show();\n }",
"@Override\n public void onClick(View v) {\n new TimePickerDialog(getActivity(), endtimepicker, trigger.getEndtime().get(Calendar.HOUR), trigger.getEndtime().get(Calendar.MINUTE), true).show();\n }",
"@Override\n public void onClick(View v) {\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(AddTripActivity.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n String a = \"\" + selectedMinute;\n String b = \"\" + selectedHour;\n if(selectedMinute<10){\n a = \"0\"+selectedMinute;\n }\n if(selectedHour<10){\n b = \"0\"+selectedHour;\n }\n mTime.setText( b + \":\" + a);\n }\n }, hour, minute, true);\n mTimePicker.setTitle(\"Select Time\");\n mTimePicker.show();\n\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog29 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t29Hour29 = hourOfDay1;\n t29Minute29 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t29Hour29, t29Minute29);\n //set selected time on text view\n\n\n timeS15 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime15.setText(timeS15);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog29.updateTime(t29Hour29, t29Minute29);\n //show dialog\n timePickerDialog29.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog21 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t21Hour21 = hourOfDay1;\n t21Minute21 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t21Hour21, t21Minute21);\n //set selected time on text view\n\n\n timeS11 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime11.setText(timeS11);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog21.updateTime(t21Hour21, t21Minute21);\n //show dialog\n timePickerDialog21.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog28 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t28Hour28 = hourOfDay1;\n t28Minute28 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t28Hour28, t28Minute28);\n //set selected time on text view\n\n\n timeE14 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime14.setText(timeE14);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog28.updateTime(t28Hour28, t28Minute28);\n //show dialog\n timePickerDialog28.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog37 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t37Hour37 = hourOfDay1;\n t37Minute37 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t37Hour37, t37Minute37);\n //set selected time on text view\n\n\n timeS19 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime19.setText(timeS19);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog37.updateTime(t37Hour37, t37Minute37);\n //show dialog\n timePickerDialog37.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog23 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t23Hour23 = hourOfDay1;\n t23Minute23 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t23Hour23, t23Minute23);\n //set selected time on text view\n\n\n timeS12 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime12.setText(timeS12);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog23.updateTime(t23Hour23, t23Minute23);\n //show dialog\n timePickerDialog23.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog44 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t44Hour44 = hourOfDay1;\n t44Minute44 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t44Hour44, t44Minute44);\n //set selected time on text view\n\n\n timeE22 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime22.setText(timeE22);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog44.updateTime(t44Hour44, t44Minute44);\n //show dialog\n timePickerDialog44.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog26 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t26Hour26 = hourOfDay1;\n t26Minute26 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t26Hour26, t26Minute26);\n //set selected time on text view\n\n\n timeE13 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime13.setText(timeE13);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog26.updateTime(t26Hour26, t26Minute26);\n //show dialog\n timePickerDialog26.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog22 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t22Hour22 = hourOfDay1;\n t22Minute22 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t22Hour22, t22Minute22);\n //set selected time on text view\n\n\n timeE11 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime11.setText(timeE11);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog22.updateTime(t22Hour22, t22Minute22);\n //show dialog\n timePickerDialog22.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog8 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t8Hour8 = hourOfDay1;\n t8Minute8 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t8Hour8, t8Minute8);\n //set selected time on text view\n\n\n timeE4 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime4.setText(timeE4);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog8.updateTime(t8Hour8, t8Minute8);\n //show dialog\n timePickerDialog8.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog10 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t10Hour10 = hourOfDay1;\n t10Minute10 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t10Hour10, t10Minute10);\n //set selected time on text view\n\n\n timeE5 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime5.setText(timeE5);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog10.updateTime(t10Hour10, t10Minute10);\n //show dialog\n timePickerDialog10.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog45 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t45Hour45 = hourOfDay1;\n t45Minute45 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t45Hour45, t45Minute45);\n //set selected time on text view\n\n\n timeS23 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime23.setText(timeS23);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog45.updateTime(t45Hour45, t45Minute45);\n //show dialog\n timePickerDialog45.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog15 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t15Hour15 = hourOfDay1;\n t15Minute15 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t15Hour15, t15Minute15);\n //set selected time on text view\n\n\n timeS8 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime8.setText(timeS8);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog15.updateTime(t15Hour15, t15Minute15);\n //show dialog\n timePickerDialog15.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog2 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t2Hour2 = hourOfDay1;\n t2Minute2 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t2Hour2, t2Minute2);\n //set selected time on text view\n\n\n timeE1 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime1.setText(timeE1);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog2.updateTime(t2Hour2, t2Minute2);\n //show dialog\n timePickerDialog2.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog41 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t41Hour41 = hourOfDay1;\n t41Minute41 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t41Hour41, t41Minute41);\n //set selected time on text view\n\n\n timeS21 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime21.setText(timeS21);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog41.updateTime(t41Hour41, t41Minute41);\n //show dialog\n timePickerDialog41.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog9 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t9Hour9 = hourOfDay1;\n t9Minute9 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t9Hour9, t9Minute9);\n //set selected time on text view\n\n\n timeS5 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime5.setText(timeS5);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog9.updateTime(t9Hour9, t9Minute9);\n //show dialog\n timePickerDialog9.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog3 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t3Hour3 = hourOfDay1;\n t3Minute3 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t3Hour3, t3Minute3);\n //set selected time on text view\n\n\n timeS2 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime2.setText(timeS2);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog3.updateTime(t3Hour3, t3Minute3);\n //show dialog\n timePickerDialog3.show();\n }",
"@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t TimePickerDialog tpd = new TimePickerDialog(contextyeild, //same Activity Context like before\n\t\t\t\t\t\t\t new TimePickerDialog.OnTimeSetListener() {\n\n\t\t\t\t\t\t\t @Override\n\t\t\t\t\t\t\t public void onTimeSet(TimePicker view, int hourOfDay,int minute) {\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t hour = hourOfDay;\n\t\t\t\t\t\t\t \t\t min = minute;\n\t\t\t\t\t\t\t \t\t \n\t\t\t\t\t\t\t \t\t\t String timeSet = \"\";\n\t\t\t\t\t\t\t \t\t\t if (hour > 12) {\n\t\t\t\t\t\t\t \t\t\t hour -= 12;\n\t\t\t\t\t\t\t \t\t\t timeSet = \"PM\";\n\t\t\t\t\t\t\t \t\t\t } else if (hour == 0) {\n\t\t\t\t\t\t\t \t\t\t hour += 12;\n\t\t\t\t\t\t\t \t\t\t timeSet = \"AM\";\n\t\t\t\t\t\t\t \t\t\t } else if (hour == 12)\n\t\t\t\t\t\t\t \t\t\t timeSet = \"PM\";\n\t\t\t\t\t\t\t \t\t\t else\n\t\t\t\t\t\t\t \t\t\t timeSet = \"AM\";\n\t\t\t\t\t\t\t \t\t\t \n\t\t\t\t\t\t\t \t\t\t \n\t\t\t\t\t\t\t \t\t\t String minutes = \"\";\n\t\t\t\t\t\t\t \t\t\t if (min < 10)\n\t\t\t\t\t\t\t \t\t\t minutes = \"0\" + min;\n\t\t\t\t\t\t\t \t\t\t else\n\t\t\t\t\t\t\t \t\t\t minutes = String.valueOf(min);\n\t\t\t\t\t\t\t \t\t\t \n\t\t\t\t\t\t\t \t\t\t // Append in a StringBuilder\n\t\t\t\t\t\t\t \t\t\t String aTime = new StringBuilder().append(hour).append(':')\n\t\t\t\t\t\t\t \t\t\t .append(minutes).append(\" \").append(timeSet).toString();\n\t\t\t\t\t\t\t \t\t\t \n\t\t\t\t\t\t\t \t\t\t harvesttime.setText(aTime); \n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t }, hour, min, false);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t tpd.show();\t\t\t\n\t\t\t\t\t\t\t}",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog14 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t14Hour14 = hourOfDay1;\n t14Minute14 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t14Hour14, t14Minute14);\n //set selected time on text view\n\n\n timeE7 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime7.setText(timeE7);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog14.updateTime(t14Hour14, t14Minute14);\n //show dialog\n timePickerDialog14.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog30 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t30Hour30 = hourOfDay1;\n t30Minute30 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t30Hour30, t30Minute30);\n //set selected time on text view\n\n\n timeE15 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime15.setText(timeE15);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog30.updateTime(t30Hour30, t30Minute30);\n //show dialog\n timePickerDialog30.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog13 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t13Hour13 = hourOfDay1;\n t13Minute13 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t13Hour13, t13Minute13);\n //set selected time on text view\n\n\n timeS7 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime7.setText(timeS7);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog13.updateTime(t13Hour13, t13Minute13);\n //show dialog\n timePickerDialog13.show();\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog1 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t1Hour1 = hourOfDay1;\n t1Minute1 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t1Hour1, t1Minute1);\n //set selected time on text view\n\n\n timeS1 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime1.setText(timeS1);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog1.updateTime(t1Hour1, t1Minute1);\n //show dialog\n timePickerDialog1.show();\n }",
"@Override\r\n\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\tif(!tvam.getText().equals(\"\")){\r\n\t\t\t\t\t\t\t\t\t data = info.get(position).getAdmitTime() +\"(上午)\";\r\n\t\t\t\t\t\t\t\t\t initPopupWindow();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog11 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t11Hour11 = hourOfDay1;\n t11Minute11 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t11Hour11, t11Minute11);\n //set selected time on text view\n\n\n timeS6 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime6.setText(timeS6);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog11.updateTime(t11Hour11, t11Minute11);\n //show dialog\n timePickerDialog11.show();\n }",
"@Override\n public void onClick(View v) {\n int hour = calendar.get(Calendar.HOUR_OF_DAY);\n int minute = calendar.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(getContext(), new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n String time = (selectedHour > 9 ? selectedHour : \"0\" + selectedHour)\n + \":\" +\n (selectedMinute > 9 ? selectedMinute : \"0\" + selectedMinute);\n //validar hora\n plantaOut.setText(time);\n globals.getAntecedentesHormigonMuestreo().setPlantaOut(time);\n }\n }, hour, minute, true);\n mTimePicker.setTitle(\"Seleccione Hora\");\n mTimePicker.show();\n\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tlan = 1;\r\n\t\t\t\tchonNgayDatetimePicker(c);\r\n\t\t\t}",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog5 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t5Hour5 = hourOfDay1;\n t5Minute5 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t5Hour5, t5Minute5);\n //set selected time on text view\n\n\n timeS3 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime3.setText(timeS3);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog5.updateTime(t5Hour5, t5Minute5);\n //show dialog\n timePickerDialog5.show();\n }",
"@Override\r\n\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\tif(!tvpm.getText().equals(\"\")){\r\n\t\t\t\t\t\t\t\t\t data = info.get(position).getAdmitTime()+\"(下午)\";\r\n\t\t\t\t\t\t\t\t\tinitPopupWindow();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}",
"private void selectTime() {\n Calendar calendar = Calendar.getInstance();\n int hour = calendar.get(Calendar.HOUR_OF_DAY);\n int minute = calendar.get(Calendar.MINUTE);\n TimePickerDialog timePickerDialog = new TimePickerDialog(this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int i, int i1) {\n timeTonotify = i + \":\" + i1; //temp variable to store the time to set alarm\n mTimebtn.setText(FormatTime(i, i1)); //sets the button text as selected time\n }\n }, hour, minute, false);\n timePickerDialog.show();\n }",
"@Override\n public void onClick(String date, String time) {\n\n }",
"@Override\n public void onClick(View v) {\n TimePickerDialog timePicker = new TimePickerDialog(\n PHUpdateNonRecurringScheduleActivity.this,\n mTimeSetListener, mHour, mMinute, true);\n\n timePicker.show();\n }",
"@Override\n public void onClick(View v) {\n\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(\n Attend_Regularization.this,\n new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker,\n int selectedHour, int selectedMinute) {\n\n String am_pm = \"\";\n\n Calendar datetime = Calendar.getInstance();\n datetime.set(Calendar.HOUR_OF_DAY, selectedHour);\n datetime.set(Calendar.MINUTE, selectedMinute);\n\n if (datetime.get(Calendar.AM_PM) == Calendar.AM)\n am_pm = \"AM\";\n else if (datetime.get(Calendar.AM_PM) == Calendar.PM)\n am_pm = \"PM\";\n\n String strHrsToShow = (datetime\n .get(Calendar.HOUR) == 0) ? \"12\"\n : datetime.get(Calendar.HOUR) + \"\";\n\n in_time.setText(strHrsToShow + \":\"\n + pad(datetime.get(Calendar.MINUTE))\n + \" \" + am_pm);\n\n /*if (out_time.getText().toString().trim().equals(\"\")) {\n\n } else {\n if (!in_date.getText().toString().trim().isEmpty() && !out_date.getText().toString().trim().isEmpty()) {\n if (in_date.getText().toString().trim().equals(out_date.getText().toString().trim())) {\n String resultcampare = CompareTime(in_time.getText().toString().trim(), out_time.getText().toString().trim());\n if (!resultcampare.equals(\"1\")) {\n\n EmpowerApplication.alertdialog(for_out_time, Attend_Regularization.this);\n\n }\n }\n } else {\n if (!validateindate())\n return;\n if (!validateoutdate())\n return;\n }\n }*/\n // edtxt_time.setTextColor(Color.parseColor(\"#000000\"));\n\n }\n }, hour, minute, false);// Yes 24 hour time\n mTimePicker.setTitle(\"Select Time\");\n mTimePicker.show();\n getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);\n\n }",
"@Override\n public void onClick(View v) {\n\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(\n Attend_Regularization.this,\n new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker,\n int selectedHour, int selectedMinute) {\n\n String am_pm = \"\";\n\n Calendar datetime = Calendar.getInstance();\n datetime.set(Calendar.HOUR_OF_DAY, selectedHour);\n datetime.set(Calendar.MINUTE, selectedMinute);\n\n if (datetime.get(Calendar.AM_PM) == Calendar.AM)\n am_pm = \"AM\";\n else if (datetime.get(Calendar.AM_PM) == Calendar.PM)\n am_pm = \"PM\";\n\n String strHrsToShow = (datetime\n .get(Calendar.HOUR) == 0) ? \"12\"\n : datetime.get(Calendar.HOUR) + \"\";\n\n out_time.setText(strHrsToShow + \":\"\n + pad(datetime.get(Calendar.MINUTE))\n + \" \" + am_pm);\n\n /*if (in_time.getText().toString().trim().equals(\"\")) {\n *//*if(!validateintime())\n return;*//*\n\n } else {\n if (!in_date.getText().toString().trim().isEmpty() && !out_date.getText().toString().trim().isEmpty()) {\n if (in_date.getText().toString().trim().equals(out_date.getText().toString().trim())) {\n String resultcampare = CompareTime(in_time.getText().toString().trim(), out_time.getText().toString().trim());\n if (!resultcampare.equals(\"1\")) {\n\n EmpowerApplication.alertdialog(for_out_time, Attend_Regularization.this);\n\n }\n }\n } else {\n if (!validateindate())\n return;\n if (!validateoutdate())\n return;\n }\n }*/\n\n // edtxt_time.setTextColor(Color.parseColor(\"#000000\"));\n\n }\n }, hour, minute, false);// Yes 24 hour time\n mTimePicker.setTitle(\"Select Time\");\n mTimePicker.show();\n getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);\n\n }",
"@Override\n public void onClick(String date, String time) {\n }",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog6 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t6Hour6 = hourOfDay1;\n t6Minute6 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t6Hour6, t6Minute6);\n //set selected time on text view\n\n\n timeE3 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime3.setText(timeE3);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog6.updateTime(t6Hour6, t6Minute6);\n //show dialog\n timePickerDialog6.show();\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tcalendar.setTimeInMillis(System.currentTimeMillis());\r\n\t\t\t\tint hour = calendar.get(Calendar.HOUR_OF_DAY);\r\n\t\t\t\tint minute = calendar.get(Calendar.MINUTE);\r\n\t\t\t\tnew TimePickerDialog(SetClock_Activity.this,\r\n\t\t\t\t\t\tnew TimePickerDialog.OnTimeSetListener() {\r\n\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onTimeSet(TimePicker view,\r\n\t\t\t\t\t\t\t\t\tint hourOfDay, int minute) {\r\n\t\t\t\t\t\t\t\tcalendar.setTimeInMillis(System\r\n\t\t\t\t\t\t\t\t\t\t.currentTimeMillis());\r\n\t\t\t\t\t\t\t\t// set(f, value) changes field f to value.\r\n\t\t\t\t\t\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, hourOfDay);\r\n\t\t\t\t\t\t\t\tcalendar.set(Calendar.MINUTE, minute);\r\n\t\t\t\t\t\t\t\tcalendar.set(Calendar.SECOND, 0);\r\n\t\t\t\t\t\t\t\tcalendar.set(Calendar.MILLISECOND, 0);\r\n\r\n\t\t\t\t\t\t\t\thelper.openAlarm(id, s,\r\n\t\t\t\t\t\t\t\t\t\tcalendar.getTimeInMillis());\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tAlarmList.alarmSet.put(id,s);\r\n\t\t\t\t\t\t\t\tid++;\r\n\t\t\t\t\t\t\t\tDate date = new java.util.Date(System.currentTimeMillis());\r\n\t\t\t\t\t\t\t\tint m, h;\r\n\t\t\t\t\t\t\t\tif (hourOfDay < date.getHours())\r\n\t\t\t\t\t\t\t\t\th = hourOfDay + 24 - date.getHours();\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\th = hourOfDay - date.getHours();\r\n\t\t\t\t\t\t\t\tif (minute < date.getMinutes()) {\r\n\t\t\t\t\t\t\t\t\tm = minute + 60 - date.getMinutes();\r\n\t\t\t\t\t\t\t\t\th--;\r\n\t\t\t\t\t\t\t\t} else\r\n\t\t\t\t\t\t\t\t\tm = minute - date.getMinutes();\r\n\r\n\t\t\t\t\t\t\t\tString tmps = \"距离闹钟还有: \" + h+\"小时 \"\r\n\t\t\t\t\t\t\t\t\t\t+ m+\"分钟\";\r\n\t\t\t\t\t\t\t\tmTextView.setText(tmps);\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}, hour, minute, true).show();\r\n\r\n\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\t\t\talert_dialog.dismiss();\r\n\t\t\t\t\t\tet_select_time.setText(\"Set Time\");\r\n\t\t\t\t\t\tselect_time = \"\";\r\n\r\n\t\t\t\t\t}",
"@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog7 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t7Hour7 = hourOfDay1;\n t7Minute7 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t7Hour7, t7Minute7);\n //set selected time on text view\n\n\n timeS4 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime4.setText(timeS4);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog7.updateTime(t7Hour7, t7Minute7);\n //show dialog\n timePickerDialog7.show();\n }",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\ttimeSet.performClick();\n\t\t\t\tif(ifFO.equals(\"Time_On\")){\n\t\t\t\t\tAppConstants.open.getTime();\n\t\t\t\t}else{\n\t\t\t\t\tAppConstants.close.getTime();\n\t\t\t\t}\n\t\t\t}",
"@Override\n public void onClick(View v) {\n long epochTime = getCurrentTimeSetting();\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(epochTime);\n\n int id = v.getId();\n switch (id) {\n case R.id.text_date:\n DatePickerDialog datePickerDialog = new DatePickerDialog(\n mContext, this,\n cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH)\n );\n datePickerDialog.show();\n break;\n case R.id.text_clock:\n TimePickerDialog timePickerDialog = new TimePickerDialog(\n mContext, this,\n cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE), false\n );\n timePickerDialog.show();\n break;\n }\n }",
"@Override\n public void onClick(View view) {\n calendar.set(Calendar.HOUR_OF_DAY, tp.getHour());\n calendar.set(Calendar.MINUTE, tp.getMinute());\n\n //get int value of timepicker selected time\n int hour = tp.getHour();\n int minute = tp.getMinute();\n\n String hour_string = String.valueOf(hour);\n String minute_string = String.valueOf(minute);\n\n if (hour > 12) {\n hour_string = String.valueOf(hour - 12);\n }\n\n if (minute < 10) {\n minute_string = \"0\" + String.valueOf(minute);\n }\n\n //update status box method\n alarm_text(\"Alarm set for \" + hour_string + \":\" + minute_string);\n //put extra string in my_intent\n //tells clock \"set alarm\" button pressed\n my_intent.putExtra(\"extra\", \"alarm on\");\n //create pending intent that delays intent until user selects time\n pending_intent = PendingIntent.getBroadcast(AlarmClock.this, 0, my_intent, PendingIntent.FLAG_UPDATE_CURRENT);\n //set alarm manager\n am.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pending_intent);\n }",
"@Override\n public void onClick(View v) {\n new DatePickerDialog(select_time_date.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tgetTimeView();\n\t\t\t\t}",
"@Override\n public void onClick(View v) {\n reSetparams();\n popparent.setVisibility(View.GONE);\n timeTxt.setText(\"今年\");\n\n SimpleDateFormat dateFormater = new SimpleDateFormat(\n \"yyyy-MM-dd\");\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.DAY_OF_YEAR, 1);\n cal.getTime();\n start_time.setText(dateFormater.format(cal.getTime()) + \"\");\n\n cal.set(Calendar.DAY_OF_YEAR,\n cal.getActualMaximum(Calendar.DAY_OF_YEAR));\n end_time.setText(dateFormater.format(cal.getTime()));\n starttime = start_time.getText().toString();\n endtime = end_time.getText().toString();\n setBottomPointView(0);\n onloadJsMethod();\n }",
"@Override\n public void onClick(View v) {\n int hour = calendar.get(calendar.HOUR_OF_DAY);\n int minute = calendar.get(calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(getContext(), new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n String time = (selectedHour > 9 ? selectedHour : \"0\" + selectedHour)\n + \":\" +\n (selectedMinute > 9 ? selectedMinute : \"0\" + selectedMinute);\n\n Date horaInTime;\n Date horaMuestreoTime;\n try {\n if (globals.getMuestra().getHoraIn() == null) {\n Toast.makeText(getContext(), \"No se ha definido hora de llegada\", Toast.LENGTH_SHORT).show();\n timeMuestreo.setText(\"\");\n } else {\n horaInTime = parser.parse(globals.getMuestra().getHoraIn());\n horaMuestreoTime = parser.parse(time);\n if (horaMuestreoTime.after(horaInTime)) {\n\n timeMuestreo.setText(time);\n globals.getAntecedentesMuestreo().setTimeMuestreo(time);\n } else {\n Toast.makeText(getContext(), \"Hora de Muestreo no puede ser inferior a la hora de llegada\", Toast.LENGTH_SHORT).show();\n timeMuestreo.setText(\"\");\n }\n }\n } catch (ParseException e) {\n timeMuestreo.setText(\"\");\n }\n }\n }, hour, minute, true);\n mTimePicker.setTitle(\"Seleccione Hora\");\n mTimePicker.show();\n\n }",
"public void addAlarmClicked(View view) {\n DialogFragment timePickerFragment = new TimePickerFragment();\n timePickerFragment.show(getSupportFragmentManager(), \"timePicker\");\n\n }",
"@Override\n public void onClick(View v) {\n TimePickerDialog timePickerDialog = new TimePickerDialog(ActivityEvent.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY, hourOfDay);\n calendar.set(Calendar.MINUTE, minute);\n SimpleDateFormat simpleDateFormatTime = new SimpleDateFormat(patternTime);\n String timeString = simpleDateFormatTime.format(calendar.getTime());\n eventTimeView.setText(timeString);\n }\n }, 12, 00, false);\n Calendar time = Calendar.getInstance();\n SimpleDateFormat sdf = new SimpleDateFormat(patternTime);\n Date date = null;\n try {\n date = sdf.parse(eventTimeView.getText().toString());\n time.setTime(date);\n timePickerDialog.updateTime(time.get(Calendar.HOUR_OF_DAY), time.get(Calendar.MINUTE));\n timePickerDialog.show();\n\n }\n catch (Exception e){\n Log.d(\">>>\",e.toString());\n }\n }",
"@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t24Hour24 = hourOfDay1;\n t24Minute24 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t24Hour24, t24Minute24);\n //set selected time on text view\n\n\n timeE12 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime12.setText(timeE12);\n }",
"@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t40Hour40 = hourOfDay1;\n t40Minute40 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t40Hour40, t40Minute40);\n //set selected time on text view\n\n\n timeE20 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime20.setText(timeE20);\n }",
"@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t16Hour16 = hourOfDay1;\n t16Minute16 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t16Hour16, t16Minute16);\n //set selected time on text view\n\n\n timeE8 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime8.setText(timeE8);\n }",
"@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t48Hour48 = hourOfDay1;\n t48Minute48 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t48Hour48, t48Minute48);\n //set selected time on text view\n\n\n timeE24 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime24.setText(timeE24);\n }",
"@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t20Hour20 = hourOfDay1;\n t20Minute20 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t20Hour20, t20Minute20);\n //set selected time on text view\n\n\n timeE10 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime10.setText(timeE10);\n }",
"@Override\n public void onClick(View v) {\n int hour = calendar.get(calendar.HOUR_OF_DAY);\n int minute = calendar.get(calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(getContext(), new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n String time = (selectedHour > 9 ? selectedHour : \"0\" + selectedHour)\n + \":\" +\n (selectedMinute > 9 ? selectedMinute : \"0\" + selectedMinute);\n Date horaPlantaTime;\n Date horaMuestroTime;\n Date horaCamionTime;\n\n try {\n if (globals.getAntecedentesHormigonMuestreo().getPlantaOut() == null) {\n Toast.makeText(getContext(), \"No se ha definido hora de salida planta\", Toast.LENGTH_SHORT).show();\n timeCamion.setText(\"\");\n } else {\n horaPlantaTime = parser.parse(globals.getAntecedentesHormigonMuestreo().getPlantaOut());\n\n horaCamionTime = parser.parse(time);\n if (horaCamionTime.after(horaPlantaTime)) {\n\n timeCamion.setText(time);\n globals.getAntecedentesMuestreo().setTimeCamion(time);\n } else {\n Toast.makeText(getContext(), \"Hora llegada camióm no puede ser inferior a la hora de salida planta\", Toast.LENGTH_SHORT).show();\n timeCamion.setText(\"\");\n }\n }\n } catch (ParseException e) {\n timeCamion.setText(\"\");\n }\n\n try {\n if (globals.getAntecedentesMuestreo().getTimeMuestreo() == null) {\n Toast.makeText(getContext(), \"No se ha definido hora de muestreo\", Toast.LENGTH_SHORT).show();\n timeCamion.setText(\"\");\n } else {\n horaMuestroTime = parser.parse(globals.getAntecedentesMuestreo().getTimeMuestreo());\n\n horaCamionTime = parser.parse(time);\n if (horaCamionTime.before(horaMuestroTime)) {\n\n timeCamion.setText(time);\n globals.getAntecedentesMuestreo().setTimeCamion(time);\n } else {\n Toast.makeText(getContext(), \"Hora llegada camióm no puede ser mayor a la hora de toma muestra\", Toast.LENGTH_SHORT).show();\n timeCamion.setText(\"\");\n }\n }\n } catch (ParseException e) {\n timeCamion.setText(\"\");\n }\n\n }\n }, hour, minute, true);\n mTimePicker.setTitle(\"Seleccione Hora\");\n mTimePicker.show();\n\n }",
"@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t25Hour25 = hourOfDay1;\n t25Minute25 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t25Hour25, t25Minute25);\n //set selected time on text view\n\n\n timeS13 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime13.setText(timeS13);\n }",
"@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t32Hour32 = hourOfDay1;\n t32Minute32 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t32Hour32, t32Minute32);\n //set selected time on text view\n\n\n timeE16 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime16.setText(timeE16);\n }",
"@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t34Hour34 = hourOfDay1;\n t34Minute34 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t34Hour34, t34Minute34);\n //set selected time on text view\n\n\n timeE17 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime17.setText(timeE17);\n }",
"@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t1Hour1 = hourOfDay1;\n t1Minute1 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t1Hour1, t1Minute1);\n //set selected time on text view\n\n\n timeS1 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime1.setText(timeS1);\n }",
"private void jadwalKedua(){\n jadwalKeduaEditText.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n c= Calendar.getInstance();\n int hour = c.get(Calendar.HOUR_OF_DAY);\n int minute = c.get(Calendar.MINUTE);\n\n tpd = new TimePickerDialog(IncubationForm.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n jadwalKeduaEditText.setText(hourOfDay + \":\" + minute);\n jadwal[1][0] = hourOfDay;\n jadwal[1][1] = minute;\n }\n }, hour, minute, true);\n tpd.show();\n }\n });\n }",
"@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t5Hour5 = hourOfDay1;\n t5Minute5 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t5Hour5, t5Minute5);\n //set selected time on text view\n\n\n timeS3 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime3.setText(timeS3);\n }",
"@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t23Hour23 = hourOfDay1;\n t23Minute23 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t23Hour23, t23Minute23);\n //set selected time on text view\n\n\n timeS12 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime12.setText(timeS12);\n }",
"@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t31Hour31 = hourOfDay1;\n t31Minute31 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t31Hour31, t31Minute31);\n //set selected time on text view\n\n\n timeS16 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime16.setText(timeS16);\n }",
"@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t50Hour50 = hourOfDay1;\n t50Minute50 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t50Hour50, t50Minute50);\n //set selected time on text view\n\n\n timeE25 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime25.setText(timeE25);\n }",
"@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t49Hour49 = hourOfDay1;\n t49Minute49 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t49Hour49, t49Minute49);\n //set selected time on text view\n\n\n timeS25 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime25.setText(timeS25);\n }"
] |
[
"0.7705621",
"0.7542435",
"0.7535049",
"0.7534141",
"0.74997413",
"0.74929154",
"0.749278",
"0.7487032",
"0.7486313",
"0.7479423",
"0.74635565",
"0.7455061",
"0.7454692",
"0.7443256",
"0.7439336",
"0.7437858",
"0.74333674",
"0.74304074",
"0.7427913",
"0.74235713",
"0.742262",
"0.7418811",
"0.7412577",
"0.7412244",
"0.7407464",
"0.7406551",
"0.74051857",
"0.7397699",
"0.73904115",
"0.7378475",
"0.7378254",
"0.7378026",
"0.7377312",
"0.73734087",
"0.7370858",
"0.73703986",
"0.7366628",
"0.7364149",
"0.7363463",
"0.73612195",
"0.7358857",
"0.73569703",
"0.7354873",
"0.73450774",
"0.7343508",
"0.733927",
"0.7335536",
"0.7335171",
"0.7332424",
"0.7331561",
"0.7331176",
"0.73250294",
"0.73235834",
"0.7304718",
"0.7301556",
"0.7296798",
"0.7296291",
"0.72927123",
"0.72923386",
"0.7275108",
"0.72724134",
"0.7221648",
"0.71722335",
"0.71636647",
"0.7134363",
"0.71328664",
"0.71299493",
"0.7087425",
"0.7083892",
"0.7079026",
"0.706903",
"0.70685124",
"0.7052935",
"0.70501596",
"0.7046467",
"0.7029908",
"0.6964103",
"0.6910274",
"0.68631786",
"0.6853088",
"0.6835147",
"0.6814811",
"0.6792686",
"0.67542094",
"0.67387366",
"0.6721785",
"0.67216766",
"0.6719411",
"0.6710522",
"0.67003185",
"0.66980684",
"0.66959965",
"0.6695052",
"0.66910464",
"0.667881",
"0.66779554",
"0.6672342",
"0.6670542",
"0.66689485",
"0.6667142"
] |
0.72674996
|
61
|
configure URL button on click method
|
public void configureURL(View view) {
//get url from edit text
urlString = urlText.getText().toString();
if((urlString.contains("https://") && urlString.length()>8) || (urlString.contains("http://") && urlString.length()>7)) {
PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).edit().putString("urlString_"+alarmID, urlString).apply();
//determine if from configureURLButton or searchButton (require different actions)
boolean fromConfigureURLButton;
if(view.getTag().toString().equals("configure")) {
fromConfigureURLButton = true;
} else {
fromConfigureURLButton = false;
}
Intent intent = new Intent(getApplicationContext(), WebAlarmActivity.class);
intent.putExtra("urlString", urlString);
intent.putExtra("fromConfigureURLButton", fromConfigureURLButton);
intent.putExtra("alarmID", alarmID);
startActivity(intent);
} else {
Toast.makeText(getApplicationContext(), "Your URL is malformed!", Toast.LENGTH_SHORT).show();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void setClickURL(java.lang.String clickURL);",
"@Override\r\n public void onClick(View v){\n RequestUrl(\"led1\");\r\n }",
"@Override\r\n public void onClick(View v){\n RequestUrl(\"led2\");\r\n }",
"@Override\n public void onClick(View view){\n Intent intentWeb = new Intent(Intent.ACTION_VIEW);\n intentWeb.setData(Uri.parse(buttonUrl.getText().toString()));\n startActivity(intentWeb); //lancement\n\n }",
"public URLButton()\n {\n title = \"\";\n }",
"@Override\n public void onItemClick(String url) {\n RxBus2.getInstance().post(Constants.SHOW_WEBVIEW, url);\n RxBus3.getInstance().post(Constants.SHOW_WEBVIEW, url);\n }",
"@Override\n public void buttonClick(ClickEvent event) {\n \tgetUI().getNavigator().navigateTo(NAME + \"/\" + contenView);\n }",
"public void onButtonLoadUrl(View theButton){ \t\n \tEditText edit = (EditText)findViewById(R.id.editUrl);\n \tString url = edit.getText().toString();\n \tif (url.length()>0){\n \t\tbrowser.loadUrl(url);\n \t\toutputWindow.append(\"\\nLoading \"+url);\n \t\ttabhost.setCurrentTab(0);\n \t}else {\n \t\toutputWindow.append(\"\\nURL is null\");\n \t} \t \n }",
"java.lang.String getClickURL();",
"void configureButtonListener();",
"@Override\r\n\t\tpublic void onClick(ClickEvent event) {\n\t\t\tclientAnchor.setHref(GWT.getHostPageBaseURL() + \"IT_Projekt.html\");\r\n\t\t}",
"void btnGenerateRoute();",
"public void changeUrl() {\n url();\n }",
"@Override\n\tprotected void OnClick() {\n\t\t\n\t}",
"@Override\r\n \t\t\tpublic void onClick(View v) {\n \t\t\t\tIntent browseIntent = new Intent( Intent.ACTION_VIEW , Uri.parse(urlStr) );\r\n startActivity(Intent.createChooser(browseIntent, \"Connecting...\"));\r\n \t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=201\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}",
"@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tUI.getCurrent().getNavigator().navigateTo(\"CliPantallaBusquedaExpedientes\");\t \n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=217\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=209\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}",
"@Override\n public void onClick(View v) {\n Uri uri = Uri.parse(url);\n //Se crea un intent implicito para visualizar los links en un navegador\n Intent intent = new Intent(Intent.ACTION_VIEW, uri);\n //Se inicia la actividad del navegador\n activityt.startActivity(intent);\n }",
"public void settingBtnClick() {\n\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=207\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=213\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}",
"public LinkButton( Action a) {\n\t\tsuper( a);\n\t\tinit();\n\t}",
"@Override\n\tpublic void actionPerformed (ActionEvent e)\n\t{\n\t\n\t\ttry\n\t\t{\n\t\t\t//Browser.init();\n\t\t\t//Browser.displayURL(mUrl);\n\t\t\tDesktop.getDesktop().browse(new URI(mUrl));\n\n\t\t}\n\t\tcatch (IOException exc)\n\t\t{\n\t\t\texc.printStackTrace();\n\t\t} catch (URISyntaxException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\n\t\n\t}",
"HtmlPage clickLink();",
"@Override\n public void onClick(View view) {\n Intent httpIntent = new Intent(Intent.ACTION_VIEW);\n httpIntent.setData(Uri.parse(\"http://bvmengineering.ac.in\"));\n\n startActivity(httpIntent);\n\n }",
"@Override\r\n public void doAction(ActionEvent e)\r\n {\n NetworkUtil.openURL(NetworkUtil.WEBSITE_URL);\r\n }",
"public LinkButton() {\n\t\tsuper();\n\t\tinit();\n\t}",
"public void onButtonPressed(Uri uri) {\n\n }",
"public void onButtonPressed(Uri uri) {\n\n }",
"public void onButtonPressed(Uri uri) {\n\n }",
"public void onButtonPressed(Uri uri) {\n\n }",
"public void onButtonPressed(Uri uri) {\n\n }",
"public void onButtonPressed(Uri uri) {\n\n }",
"public void onAddByWebSitePressed( ) {\n Router.Instance().changeView(Router.Views.AddFromWebSite);\n }",
"@Override\n\tpublic void onClick(View arg0) {\n\t\tswitch (arg0.getId()) {\n\t\tcase R.id.bGo:\n\t\t\tInputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\t\tmgr.hideSoftInputFromWindow(inputText.getWindowToken(), 0);\n\t\t\tString theWebsite = inputText.getText().toString();\n\t\t\ttheBrow.loadUrl((\"http:\" + theWebsite));\n\t\t\tinputText.setCursorVisible(false);\n\n\t\t\tbreak;\n\t\tcase R.id.editUrl:\n\t\t\tinputText.setCursorVisible(true);\n\t\t\tbreak;\n\t\tcase R.id.bBack:\n\t\t\tif (theBrow.canGoBack()) {\n\t\t\t\ttheBrow.goBack();\n\t\t\t}\n\t\t\tbreak;\n\t\tcase R.id.brefresh:\n\t\t\ttheBrow.reload();\n\t\t\tbreak;\n\t\tcase R.id.bForward:\n\t\t\tif (theBrow.canGoForward()) {\n\t\t\t\ttheBrow.goForward();\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}",
"void onConfigureClick(long id);",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n btnAnterior.setDisable(true);\n btnInicio.setDisable(true);\n btnSiguiente.setDisable(true);\n\n listatokens.addEventFilter(MouseEvent.MOUSE_PRESSED, new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n event.consume();\n }\n });\n\n }",
"void onURLChosen(String url);",
"@SuppressWarnings(\"deprecation\")\n public static Widget createButtonLink(Button button,\n final IDelegatedAction normalViewModeAction,\n final IURLProvider simpleViewModeUrlProvider)\n {\n button.addSelectionListener(new SelectionListener<ButtonEvent>()\n {\n @Override\n public void componentSelected(ButtonEvent ce)\n {\n if (ClientStaticState.isSimpleMode())\n {\n String url = simpleViewModeUrlProvider.tryGetURL();\n if (url != null)\n {\n History.newItem(url); // redirects\n }\n } else\n {\n normalViewModeAction.execute();\n }\n }\n });\n return button;\n }",
"public void onButtonPressed(Uri uri) {\n }",
"@Override\n public void onClick(View v) {\n Intent rpIntent = new Intent(Intent.ACTION_VIEW);\n // Set the URL to be used.\n rpIntent.setData(Uri.parse(\"http://www.rp.edu.sg\"));\n startActivity(rpIntent);\n }",
"void xsetClickURL(org.apache.xmlbeans.XmlString clickURL);",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tlinkButtonActionPerformed(evt);\n\t\t\t}",
"PreViewPopUpPage clickImageLink();",
"@Override\n public void onClick(View v) {\n String Url= currentNews.getWebUrl();\n //sent intent to the website\n Intent intent = new Intent();\n intent.setAction(Intent.ACTION_VIEW);\n intent.addCategory(Intent.CATEGORY_BROWSABLE);\n intent.setData(Uri.parse(Url));\n getContext().startActivity(intent);\n }",
"public void buttonClicked();",
"@Override\n public void onClick(View view) {\n Intent detail = new Intent(getBaseContext(), DetailArticle.class);\n detail.putExtra(\"webURL\", webHotURL);\n startActivity(detail);\n }",
"@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\tIntent i = new Intent(Intent.ACTION_VIEW, Uri\n\t\t\t\t\t\t\t\t\t\t.parse(fullsitelink));\n\t\t\t\t\t\t\t\tstartActivity(i);\n\n\t\t\t\t\t\t\t}",
"@Override\n public void onClick(View view) {\n //Convert the String URL into a URI object (to pass into the Intent constructor)\n Uri newsUri = Uri.parse(url);\n\n // Create a new intent to view the earthquake URI\n Intent websiteIntent = new Intent(Intent.ACTION_VIEW, newsUri);\n\n // Send the intent to launch a new activity\n startActivity(websiteIntent);\n }",
"@Override\n public void onClick(View v) {\n Intent opnWebIntent = new Intent(getActivity(), WebViewActivity.class);\n opnWebIntent.putExtra(\"url\", \"http://www.mbtabackontrack.com/performance/index.html#/home\");\n startActivity(opnWebIntent);\n }",
"@Override\n public void onClick(View view) {\n Intent intent = new Intent(NDS_main.this, Urubuga_Services.class);\n intent.putExtra(\"pageId\", \"1\");\n startActivity(intent);\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n \tUri uri = Uri.parse(\"http://l-sls0483d.research.ltu.se/userdata/notes/\"+param1+\"/notes.html\");\n \t\t\n \t\n \t\tIntent intent = new Intent(Intent.ACTION_VIEW, uri);\n \t\tstartActivity(intent);\n \n }",
"void setMainAction(LinkActionGUI linkActionGUI);",
"public void onClick()\n\t\t\t{\n\t\t\t\t((DccdSession)Session.get()).setRedirectPage(SearchResultDownloadPage.class, getPage());\n\t\t\t\tsetResponsePage(new SearchResultDownloadPage((SearchModel) SearchResultsDownloadPanel.this.getDefaultModel(), \n\t\t\t\t\t\t(DccdSearchResultPanel) callingPanel));\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent web = new Intent(Intent.ACTION_VIEW);\n\t\t\t\tweb.setData(Uri.parse(url));\n\t\t\t\tstartActivity(web);\n\t\t\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString url = \"Aide.html\";\r\n\t\t\t\tFile htmlFile = new File(url);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tDesktop.getDesktop().browse(htmlFile.toURI());\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}",
"@Override\n\tpublic void setOnClick() {\n\n\t}",
"public void clickEditLink() {\r\n\t\tbtn_EditLink.click();\r\n\t}",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n btnStart.setOnAction((event) -> {\n\thandleBtnStart(event);\n });\n btnStop.setOnAction((event) -> {\n\thandleBtnStop(event);\n });\n }",
"@Override\n public void onClick(View view) {\n Intent intent = new Intent(NDS_main.this, Urubuga_Services.class);\n intent.putExtra(\"pageId\", \"2\");\n startActivity(intent);\n }",
"void setActionBtnBack(LinkActionGUI mainAction, LinkActionGUI linkAction);",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n // TODO\r\n btnCliente.setAlignment(Pos.CENTER_RIGHT);\r\n btnCompras.setAlignment(Pos.CENTER_RIGHT);\r\n btnInventario.setAlignment(Pos.CENTER_RIGHT);\r\n btnProveedores.setAlignment(Pos.CENTER_RIGHT);\r\n btnUsuarios.setAlignment(Pos.CENTER_RIGHT);\r\n btnVentas.setAlignment(Pos.CENTER_RIGHT);\r\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n \tUri uri = Uri.parse(\"http://l-sls0483d.research.ltu.se/userdata/notes/\"+param1+\"/notes.html\");\n \t\n \t\tIntent intent = new Intent(Intent.ACTION_VIEW, uri);\n \t\tstartActivity(intent);\n }",
"HtmlPage clickSiteLink();",
"@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/\"));\n startActivity(browserIntent);\n }",
"@Override\n public void onClick(View v) {\n switch (v.getId()){\n case R.id.trainingVideoButton:\n if(skill != null){\n String link = (String) skill.getLink();\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(link));\n getContext().startActivity(i);\n }\n break;\n }\n }",
"public void accederClick(View view){\n //Declarar activity web\n Intent i = new Intent(this, ActivityWeb.class);\n\n //Enviar url a la activity web\n i.putExtra(\"url\", etUrlM.getText().toString());\n\n //Cargar Activity\n startActivity(i);\n }",
"@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/services\"));\n startActivity(browserIntent);\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n this.refreshData();\n if(this.backLinkScreen != null) {\n this.backButton.setVisible(true);\n }\n else {\n \tthis.backButton.setVisible(false);\n }\n }",
"public void onClick(View v) {\n\n Intent visitSite_intent = new Intent(MainActivity.this, DetailActivity.class);\n visitSite_intent.putExtra(\"url\",\"http://aanm-vvrsrpolytechnic.ac.in/\");\n startActivity(visitSite_intent);\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tLog.e(\"debug\", \"url\");\n\t\t\t\tIntent i;\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\ti = new Intent(activity, InfoDetailActivity.class);\n\t\t\t\ti.putExtra(InfoDetailActivity.TITLE, \"企业文化\");\n\t\t\t\ti.putExtra(\n\t\t\t\t\t\tInfoDetailActivity.URL,\n\t\t\t\t\t\t\"http://cloud.yofoto.cn/index.php?gr=wapsite&mr=shwuczb&ar=showpageshtml&comid=12\");\n\t\t\t\ti.setAction(\"push\");\n\t\t\t\tbundle.putString(\"title\", \"企业文化\");\n\t\t\t\tbundle.putString(\n\t\t\t\t\t\t\"key\",\n\t\t\t\t\t\t\"http://cloud.yofoto.cn/index.php?gr=wapsite&mr=shwuczb&ar=showpageshtml&comid=12\");\n\t\t\t\tbundle.putString(\n\t\t\t\t\t\t\"url\",\n\t\t\t\t\t\t\"http://cloud.yofoto.cn/index.php?gr=wapsite&mr=shwuczb&ar=showpageshtml&comid=12\");\n\t\t\t\ti.putExtras(bundle);\n\n\t\t\t\tactivity.startActivity(i);\n\t\t\t}",
"private void viewPageClicked(ActionEvent event) {\n\n Item tempItem = new Item();\n String itemURL = tempItem.itemURL;\n Desktop dk = Desktop.getDesktop();\n try{\n dk.browse(new java.net.URI(itemURL));\n }catch(IOException | URISyntaxException e){\n System.out.println(\"The URL on file is invalid.\");\n }\n\n showMessage(\"Visiting Item Web Page\");\n\n }",
"@Override\n public void onClick(View v) {\n Intent detail=new Intent(getBaseContext(),DetailArticle.class);\n detail.putExtra(\"webURL\",webHotURL);\n startActivity(detail);\n }",
"@Override\n public void onClick(View v) {\n Intent intent = new Intent(v.getContext(), WebViewActivity.class);\n //intent.setData(Uri.parse(listOfArticles.get(position).getLinkToArticle()));\n intent.putExtra(LINK_URL_KEY, listOfArticles.get(position).getLinkToArticle());\n v.getContext().startActivity(intent);\n }",
"@FXML\r\n private void btnBasic() {\r\n choix = 1;\r\n redirect();\r\n }",
"@Override\n public void buttonClick(ClickEvent event) {\n \n \ttry {\n\t\t\t\t\tUI.getCurrent().getNavigator().addView(_nombreSeccion + \"Adm/\" + _titulo.getCaption(), new AdministradorClase(new Lista_Mensaje_V_Administrador(it.getIdTema())));\n\t\t\t\t} catch (PersistentException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tUI.getCurrent().getNavigator().navigateTo(_nombreSeccion+ \"Adm/\" + _titulo.getCaption());\n \t\n \t\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n \tUri uri = Uri.parse(\"http://l-sls0483d.research.ltu.se/userdata/notes/\"+param1+\"/cchat.html\");\n \t\t\n \t\tIntent intent = new Intent(Intent.ACTION_VIEW, uri);\n \t\tstartActivity(intent);\n }",
"@Override\r\n public void doAction(ActionEvent e)\r\n {\n NetworkUtil.openURL(NetworkUtil.WEBSITE_URL + \"support\");\r\n }",
"@Override\n public void onClick()\n {\n LinkPanel.this.onClick();\n }",
"protected void WebClicked(View view){\n String url = this.itm.getItem(position).getUrl();\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\"))\n url = \"http://\" + url;\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n try {\n startActivity(browserIntent);\n } catch (ActivityNotFoundException e){\n Toast.makeText(getBaseContext(), \"Webpage \" + url + \"does not exist\", Toast.LENGTH_SHORT).show();\n }\n }",
"@Override\n public void onClick(View v) {\n switch(v.getId()) {\n\n case R.id.imgViewWebsite:\n website();\n break;\n\n case R.id.cont:\n website();\n break;\n\n }\n }",
"public void onClick(View v) {\n try {\n URL newurl = new URL(\"http://www.google.com\");\n //apppel à CallWebAPI\n CallWebAPI c = new CallWebAPI(texte);\n c.execute(newurl.toString());\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n }",
"private void OnClick(){\n onWidgetClickListener.onClick(getViewId());\n }",
"@Override //Con esto se redirige a la DisplayActivity\n public void onClick(View v) {Intent goToDisplay = new Intent(context,DisplayActivity.class);\n\n /*Se añaden además otros dos parámetros: el id (para que sepa a cuál libro buscar)\n y el título (para ponerlo como título\n */\n goToDisplay.putExtra(\"ID\",id);\n goToDisplay.putExtra(\"titulo\", title);\n\n //Se inicia la DisplayActivity\n context.startActivity(goToDisplay);\n String url=null;\n goToDisplay.putExtra(\"http://http://127.0.0.1:5000/archivo/<ID>\", url);\n\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n pane.getButtonTypes()\n .add(new ButtonType(\"Finalizar\", ButtonBar.ButtonData.OK_DONE));\n pane.getButtonTypes()\n .add(new ButtonType(\"Cancelar\", ButtonBar.ButtonData.CANCEL_CLOSE));\n System.out.println(\"stuff initialized\");\n }",
"@Override\r\n public void onClick(ClickEvent event) {\n }",
"@Override\n\tpublic void onClick(IClientContext context, IGuiElement emitter) throws Exception\n\t{\n PropertyAccessor accessor = PropertyAccessor.getInstance();\n Property ivrAdmin = accessor.getProperty(\n context, IVR_ADMIN_PROPERTY, context.getDataAccessor(), true\n );\n if (ivrAdmin != null && ivrAdmin.isSet())\n {\n IUrlDialog dialog = context.createUrlDialog(ivrAdmin.asString());\n dialog.enableNavigation(false);\n dialog.setModal(false);\n dialog.enableScrollbar(true);\n dialog.show(800, 600);\n }\n else\n {\n context.createMessageDialog(\"Could not launch IVR Admin\").show();\n }\n\t}",
"public void handle(ActionEvent t) {\n\t\t\t\ttry {\n\t\t\t\t\tURL webURL = new URL(\"http://webdevelopmentdev.azurewebsites.net/\");\n\t\t\t\t\tDesktop.getDesktop().browse(webURL.toURI());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (URISyntaxException 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}",
"@Override\n public void onClick(View v) {\n\n Intent intent = new Intent(getApplicationContext(), DetailActivity.class);\n intent.putExtra(Constant.INTENT_WEB_URL, webHotUrl);\n startActivity(intent);\n }",
"@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(article.getLink())); // intent to show item using url\n Context context = view.getContext();\n context.startActivity(browserIntent);\n }",
"@Override\n public void onClick(View v) {\n\n String url = \"https://club-omnisports-des-ulis.assoconnect.com/billetterie/offre/146926-a-adhesion-karate-2020-2021\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n\n }",
"@Override\n public void onClick(View view) {\n Uri newsUri = Uri.parse(currentNews.getUrl());\n\n // Create a new intent to view the news URI\n Intent websiteIntent = new Intent(Intent.ACTION_VIEW, newsUri);\n\n // Send the intent to launch a new activity\n mContext.startActivity(websiteIntent);\n }",
"@Command\t\n\tpublic void menuClicked(@BindingParam(\"pagename\") String pagename)\n\t{\n\t\t\n\t\tVlayout vl=(Vlayout)Path.getComponent(\"/mainlayout\");\n\t\t//Scrollview s=(Scrollview)vl.getFellow(\"scvCenter\");\n\t\t//Executions.createComponents(pagename, s, null);\n\t\t\t\n\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\n\t\t\t\tstartActivity(new Intent(context,WebView_Activity.class)\n\t\t\t\t.putExtra(\"URL\", geturl_link));\n\t\t\t\tGlobalClaass.activitySlideForwardAnimation(context);\n\t\t\t}",
"public void clickOnEditButton() {\r\n\t\tsafeClick(addMarkerOkButton.replace(\".ant-modal-footer button.ant-btn.ant-btn-primary\",\r\n\t\t\t\t\".ant-btn.ant-btn-primary.ant-btn-circle\"), SHORTWAIT);\r\n\t}",
"@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t}",
"public void addListenerOnButton() {\n\n\t\t//koppel de button code aan een widget en voeg een onclicklistener toe\n\t\tsettings = (Button) findViewById(R.id.settings);\n\n\t\tsettings.setOnClickListener(new OnClickListener() {\n\t\t\t//koppel de button aan een nieuw xml scherm wat opent\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\n\t\t\t\tIntent myIntent = new Intent(view.getContext(), Settings.class);\n\t\t\t\tstartActivityForResult(myIntent, 0);\n\t\t\t}\n\n\t\t});\n\n\t\tsearch = (Button) findViewById(R.id.search);\n\n\t\tsearch.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\n\t\t\t\tIntent myIntent = new Intent(view.getContext(), Search.class);\n\t\t\t\tstartActivityForResult(myIntent, 0);\n\t\t\t}\n\t\t});\n\t\tterug = (Button) findViewById(R.id.terug);\n\n\t\tterug.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tsetResult(RESULT_OK, intent);\n\t\t\t\tfinish();\n\t\t\t}\n\n\t\t});\n\n\n\t}",
"@Override\r\n \t\t\tpublic void onClick(View arg0) {\n \t\t\t\tIntent intent = new Intent(AppDownloaded.this, SettingActivity.class);\r\n \t\t\t\tstartActivity(intent);\r\n \t\t\t}"
] |
[
"0.72180563",
"0.7090105",
"0.7041567",
"0.7006227",
"0.6860167",
"0.6762353",
"0.6698303",
"0.6696673",
"0.6636413",
"0.6495535",
"0.6478689",
"0.64661026",
"0.6463523",
"0.6375077",
"0.6345324",
"0.6344879",
"0.63312536",
"0.6318026",
"0.6315787",
"0.6315211",
"0.6315021",
"0.6296247",
"0.62954617",
"0.6265644",
"0.62489396",
"0.6236353",
"0.6235052",
"0.6222435",
"0.6213951",
"0.61990535",
"0.61990535",
"0.61990535",
"0.61990535",
"0.61990535",
"0.61990535",
"0.61956286",
"0.61764663",
"0.6176441",
"0.6175349",
"0.61507714",
"0.6146538",
"0.6145733",
"0.61267173",
"0.6121244",
"0.6115226",
"0.6110817",
"0.6095614",
"0.609233",
"0.6084151",
"0.60757285",
"0.6073556",
"0.60673",
"0.6051065",
"0.60494",
"0.6044501",
"0.6043406",
"0.6014068",
"0.600936",
"0.6002911",
"0.5995069",
"0.5991054",
"0.59904265",
"0.59894",
"0.59841245",
"0.59790367",
"0.5970046",
"0.5965348",
"0.5963929",
"0.59629565",
"0.5961141",
"0.59487176",
"0.5946248",
"0.5940798",
"0.5939662",
"0.5927846",
"0.5917052",
"0.59165794",
"0.591449",
"0.5908918",
"0.58941084",
"0.58848244",
"0.58795196",
"0.58778346",
"0.5876451",
"0.5875176",
"0.587448",
"0.5867275",
"0.58519506",
"0.585035",
"0.58486575",
"0.5845567",
"0.5844613",
"0.58410716",
"0.5837511",
"0.58373636",
"0.58340836",
"0.58249044",
"0.5823673",
"0.58219177",
"0.5814469"
] |
0.6385765
|
13
|
when press back, go to list activity
|
@Override
public void onBackPressed() {
Intent startMain = new Intent(this, ListActivity.class);
startActivity(startMain);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\tpublic void onBackPressed() {\n\n\t\tnavigatetoAppointmentsListingScreen(\"false\");\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tif (isLstVisible) { lst.setVisibility(View.INVISIBLE); isLstVisible = false; }\n\t\telse finish();\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\t\n\t\tremoveClickList();\n\t\tfinish();\n\t}",
"public void back() {\n Views.goBack();\n }",
"@Override\n public void onBackPressed() {\n\n Intent intent =new Intent(PlayersList.this,MainActivity.class);\n startActivity(intent);\n\n\n }",
"@Override\n public void onBackPressed() {\n Intent intent = new Intent(C2Functions.this,ListofSecondCard.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n finish();\n }",
"public void onBackPressed() {\n Intent i = new Intent();\n i.putExtra(\"listCanceled\", true);\n setResult(Activity.RESULT_OK, i);\n finish();\n }",
"@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t\tif (cmd == ConstantTool.PAY_SUCCESS) {\r\n\t\t\tIntent intent = new Intent(OrderList.this, Homemenu.class);\r\n\t\t\tstartActivity(intent);\r\n\t\t}\r\n\t}",
"private void navBack() {\n Intent intent = new Intent(this, standard_home.class);\n startActivity(intent);\n }",
"@Override\n public void onBackPressed() {\n backToHome();\n }",
"@Override\n public void onBackPressed() {\n Intent i = new Intent(StockAdjustmentList.this, ActivityHomeScreen.class);\n startActivity(i);\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(i);\n finish();\n }",
"@Override\r\n\tpublic void onBackPressed() {\n\t\tfinish();\r\n\t}",
"@Override\r\n\tpublic void onBackPressed() {\n\t\tfinish();\r\n\t}",
"@Override\n public void onBackPressed() {\n if (this.path.get(this.path.size() - 1).equalsIgnoreCase(\"/\")) {\n finish();\n } else {\n this.path.remove(this.path.size() - 1);\n refreshList();\n // notify the list to be regenerated\n this.adapter.notifyDataSetChanged();\n }\n }",
"@Override\n\tpublic void onBackPressed()\n\t{\n\t\tIntent i=new Intent(AddContact.this,Contacts1.class);\n\t\tstartActivity(i);\n\t\treturn;\n\t}",
"@Override\n public void onBackPressed() {\n\n Intent intent = new Intent(DoctorsFindActivity.this,BabyHomeActivity.class);\n startActivity(intent);\n\n }",
"@Override\n public void handleOnBackPressed() {\n Intent intent = new Intent(context, AdminSessionEdit.class);\n startActivity(intent);\n }",
"void onGoBackButtonClick();",
"@Override\n public void onBackPressed() {\n\n finish();\n }",
"public void back(View v){\n Intent intent = new Intent(AddTripActivity.this,AdminMainActivity.class);\n finish();\n startActivity(intent);\n }",
"@Override\r\n\tpublic void onBackPressed() {\n\t\tArticleLatestMoreDetailActivity.this.finish();\r\n\t\tsuper.onBackPressed();\r\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tBack();\n\t}",
"@Override\n\tpublic void onBackPressed(){\n\t\tif (isinsubstate){\n\t\t\t//ITEMS = ;\n\t\t\t//ABOVE DATABASE CALL FOR CATAGORIES\n\t\t\tsetListAdapter(new ArrayAdapter<String>(context, R.layout.view_foodcatagories,ITEMS));\n\t\t\tisinsubstate = false;\n\t\t}else{\n\t\t\tsuper.onBackPressed();\n\t\t}\n\t\t\n\t}",
"@Override\n public void onBackPressed() {\n finish();\n }",
"@Override\n public void onBackPressed() {\n finish();\n }",
"@Override\n public void onBackPressed() {\n finish();\n }",
"@Override\n public void onBackPressed() {\n finish();\n }",
"@Override\n public void onBackPressed() {\n finish();\n }",
"@Override\n public void onBackPressed() {\n finish();\n }",
"@Override\n public void onBackPressed() {\n finish();\n }",
"private void backButton() {\n // Set up the button to add a new fish using a seperate activity\n backButton = (Button) findViewById(R.id.backButton);\n backButton.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n // Start up the add fish activity with an intent\n Intent detailActIntent = new Intent(view.getContext(), MainActivity.class);\n finish();\n startActivity(detailActIntent);\n\n\n }\n });\n }",
"private void goBack() {\n Intent intent = new Intent(this, ReformTypeDetailActivity.class);\n intent.putExtra(Key.REFORM_TYPE_ID, mReformTypeId);\n intent.putExtra(Key.REFORM_TYPE_NAME, mReformType.getName());\n startActivity(intent);\n finish();\n }",
"@Override\n public void backPressed(){\n }",
"public void backClick(View view) {\n finish();\n }",
"@Override\n public boolean onKeyDown(int keyCode, KeyEvent event) {\n if (keyCode == event.KEYCODE_BACK) {\n startActivity(new Intent(NuevaListaActivity.this,MiListaActivity.class));\n }\n return super.onKeyDown(keyCode, event);\n }",
"@Override\n\tpublic void onBackPressed() {\n\t\t\n\t}",
"public void backPressed(View v){\n finish();\n }",
"@Override\n public void onBackPressed() {}",
"public void onBackPressed() {\n\n Intent i = new Intent(Saved_Address.this, User_Profile.class);\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(i);\n\n }",
"public void onBackPressed() {\r\n if (listviewMode) {\r\n HideListView();\r\n } else {\r\n bottom_menu.onBackPressed();\r\n }\r\n }",
"public void goBack(View v)\n {\n Intent i = new Intent (getBaseContext(), staff_modules.class);\n module_statistics.this.startActivity(i);\n }",
"@Override\n public void onBackPressed() {\n Intent intent = new Intent(BillofLandingActivity.this, HomeActivity.class);\n startActivity(intent);\n finish();\n }",
"@Override\n\tpublic void onBackPressed() {\n\n\t}",
"public void Back(View view) // back button pressed - go back to previous class\n {\n Intent intent = new Intent(ImportingOCR.this, AddedCmc.class); // back to previous page--which should be addedcmc.class and not importing manual(i change to Addedcmc.class)\n intent.putExtra(\"personid\", personid);\n intent.putExtra(\"amount\", amount);\n intent.putExtra(\"date\", date);\n intent.putExtra(\"username\", uploader);\n startActivity(intent);\n }",
"@Override\n\tpublic void onBackPressed() {\n\treturn;\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tfinish();\n\t\tsuper.onBackPressed();\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tfinish();\n\t\tsuper.onBackPressed();\n\t}",
"@Override\r\n public void onBackPressed() {\n }",
"private void loadHome(){\n Intent intent = new Intent(this, NameListActivity.class);\n startActivity(intent);\n finish();\n }",
"@Override\r\n\tpublic void onBackPressed() {\n\t\tIntent i = new Intent(this, MainActivity.class);\r\n\t\tstartActivity(i);\r\n\t}",
"@Override\n public void onBackPressed() {\n finish();\n\n }",
"@Override\n\tpublic void onBackPressed()\n\t{\n\t}",
"public void goBack(View view){\n finish();\n }",
"public void GoBack()\n {\n //Open Home activity\n Intent intent = new Intent(getApplicationContext(), homeActivity.class);\n startActivity(intent);\n }",
"@Override\n public void onBackPressed() {\n this.finish();\n }",
"@Override\n public void onBackPressed() { }",
"@Override\r\n\tpublic void onBackPressed() {\n\r\n\t}",
"@Override\r\n\tpublic void onBackPressed() {\n\r\n\t}",
"@Override\n public void onBackPressed()\n {\t\n \t//Return tu login activity\n \tif(mlv.getUsersView())\n \t\tthis.finish();\n \telse\n \t{\n \t\t//Return to users view\n \t\tmlv.activateUsersView(); \t\t\n \t}\n }",
"public void goBack(){\n startActivity(new Intent(this, MainMenu.class));\n }",
"@Override\n public void onBackPressed()\n {\n\n super.onBackPressed();\n\n// Intent intent = new Intent(Following.this, MainActivity.class);\n// startActivity(intent);\n\n }",
"public void onBack(View v){\r\n finish();\r\n }",
"@Override\n public void onBackPressed()\n {\n super.onBackPressed();\n// Intent intent = new Intent(Following.this, MainActivity.class);\n// startActivity(intent);\n\n }",
"@Override\n \tpublic void onBackPressed() {\n \t}",
"@Override\n public void onBackPressed() {\n if (Utils.isTablet(getApplicationContext())) {\n finish();\n } else {\n final Fragment fragment = getSupportFragmentManager().findFragmentByTag(FRAGMENT_TAG);\n\n if (fragment instanceof ListingItemFragment) {\n if (fragment.isAdded() && fragment.isVisible()) {\n getSupportFragmentManager().beginTransaction().remove(fragment).commit();\n changeActivityViewsVisibility(true);\n\n setTitle(getString(R.string.search_results_title));\n } else {\n finish();\n }\n\n } else if (fragment instanceof MapViewFragment) {\n getSupportFragmentManager().popBackStackImmediate();\n } else {\n finish();\n }\n\n }\n }",
"@Override\r\n public void onClick(View view) {\r\n finish();\r\n onBackPressed();\r\n\r\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n\n Intent homeIntent = new Intent(Intent.ACTION_MAIN);\n homeIntent.addCategory( Intent.CATEGORY_HOME );\n homeIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(homeIntent);\n }",
"@Override\n public void onBackPressed()\n {\n\n }",
"@Override\n public void onBackPressed() {\n \tsetResult(RESULT_OK, getIntent());\n \tfinish();\n }",
"@Override\n\tpublic void onBackPressed()\n\t\t{\n\t\tbackPressed();\n\t\t}",
"protected void goBack() {\r\n\t\tfinish();\r\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\t finish();\n\t}",
"@Override\n public void onBackPressed()\n {\n Intent appointbackpress=new Intent(AppointmentActivity.this,PatientActivity.class);\n startActivity(appointbackpress);\n finish();\n }",
"@Override\n public void onBackPressed() {\n Intent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }",
"@Override\n public void onBackPressed() {\n Intent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }",
"@Override\n public void onBackPressed() {\n Intent viewIntent = new Intent(this, ViewPatientDetails.class);\n setResult(RESULT_CANCELED, viewIntent);\n finish();\n }",
"@Override\r\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t\tif(keyCode==KeyEvent.KEYCODE_BACK)\r\n\t\t{\r\n\t\t\tUtils.log(\"AppListActivity-----call back\");\r\n\t\t\tsetResult(1);\r\n\t\t\tfinish();\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private void onBack() {\n\t\tIntent startMain = new Intent(Intent.ACTION_MAIN);\r\n\t\tstartMain.addCategory(Intent.CATEGORY_HOME);\r\n\t\tstartMain.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); // //FLAG_ACTIVITY_NEW_TASK\r\n\t\tstartActivity(startMain);\r\n\t}",
"@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t Intent reset=new Intent(getActivity(),Listspace.class);\n\t\t \n\t\t \t\t\t\t\t\n\t\t startActivity(reset);\n\t\t getActivity().finish();\n\t\t \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t\t\t Intent reset=new Intent(getActivity(),Listspace.class);\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t \t\t\t\t\t\n\t\t\t\t\t\t\t\t\t startActivity(reset);\n\t\t\t\t\t\t\t\t\t getActivity().finish();\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}"
] |
[
"0.78408265",
"0.7818637",
"0.77411985",
"0.76946616",
"0.768277",
"0.7603297",
"0.7506109",
"0.7490129",
"0.74842715",
"0.74817586",
"0.74778306",
"0.7398204",
"0.7398204",
"0.73949987",
"0.73341",
"0.73060495",
"0.7297767",
"0.72643894",
"0.7263301",
"0.7244102",
"0.72423875",
"0.72419375",
"0.7240475",
"0.72386205",
"0.72386205",
"0.72386205",
"0.72386205",
"0.72386205",
"0.72386205",
"0.72386205",
"0.72281075",
"0.72280663",
"0.7223953",
"0.72177964",
"0.7211912",
"0.7211422",
"0.7200028",
"0.7196599",
"0.7195464",
"0.71875",
"0.7186805",
"0.716781",
"0.7165567",
"0.7162457",
"0.7160812",
"0.716058",
"0.716058",
"0.716058",
"0.716058",
"0.7147937",
"0.7147937",
"0.71438247",
"0.71424043",
"0.7140987",
"0.71398056",
"0.7138402",
"0.71361625",
"0.7125217",
"0.7119144",
"0.7118798",
"0.7114771",
"0.7114771",
"0.7111893",
"0.71104956",
"0.71085477",
"0.7105962",
"0.71046233",
"0.7103961",
"0.71024144",
"0.7099293",
"0.70978254",
"0.70978254",
"0.70978254",
"0.70978254",
"0.70978254",
"0.70978254",
"0.70978254",
"0.70978254",
"0.70978254",
"0.70978254",
"0.70978254",
"0.70978254",
"0.70978254",
"0.70978254",
"0.70978254",
"0.70978254",
"0.7097376",
"0.70953506",
"0.709304",
"0.7092316",
"0.7090551",
"0.70903176",
"0.70818514",
"0.7078571",
"0.7078571",
"0.7076962",
"0.7076254",
"0.70728546",
"0.7063031",
"0.70590276"
] |
0.8490024
|
0
|
Initializes a new TransformInputStream which is to transform the packets received from a specific (network) socket.
|
protected TransformInputStream(T socket)
{
super(socket);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void init() throws IOException {\n m_sock = new Socket(InetAddress.getByAddress(m_address), VIDEO_TO_PC_PORT);\n m_sock.setSoTimeout(READ_TIMEOUT_MS);\n m_sockistream = m_sock.getInputStream();\n m_daistream = new DataInputStream(m_sockistream);\n m_initialized = true;\n }",
"private void initStreams() throws IOException {\n OutputStream os = socket.getOutputStream();\n InputStream is = socket.getInputStream();\n dos = new DataOutputStream(new BufferedOutputStream(os));\n dis = new DataInputStream(new BufferedInputStream(is));\n }",
"public SocketIO(Socket nsocket)\n\t{\n\t\tsocket = nsocket;\n\t\ttry\n\t\t{\n\t\t\tinput = new DataInputStream(socket.getInputStream());\n\t\t\tout = new DataOutputStream(socket.getOutputStream());\n\t\t}\n\t\tcatch(UnknownHostException u)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tcatch(IOException i)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t}",
"private void initializeIOStreams() {\n try {\n inputStream = new ObjectInputStream(new BufferedInputStream(socket.getInputStream()));\n outputStream = new ObjectOutputStream(new BufferedOutputStream(socket.getOutputStream()));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void openInputStream() throws IOException {\n InputStreamReader isReader = new InputStreamReader(this.sock.getInputStream());\n reader = new BufferedReader(isReader);\n }",
"public SocketWrapper(final Socket socket) throws IOException {\n this.host = socket.getInetAddress().getHostName();\n this.port = socket.getPort();\n this.socket = socket;\n initStreams();\n opened = true;\n }",
"public NetworkSource(Socket socket) {\n try {\n comUtils = new ComUtils(socket);\n\n // TODO @alex disable timeout\n comUtils.setTimeout(0);\n\n } catch (Exception ex) {\n System.err.println(\"NETWORK SORUCE: Could not Open Socket\");\n ex.printStackTrace();\n }\n }",
"public void init() {\n\t\ttry {\n\t\t\tthis.is = new ObjectInputStream(clientSocket.getInputStream());\n\t\t\tthis.os = new ObjectOutputStream(clientSocket.getOutputStream());\n\t\t\twhile (this.readCommand()) {}\n\t\t} \n\t\tcatch (IOException e) \n\t\t{\n\t\t\tSystem.out.println(\"XX. There was a problem with the Input/Output Communication:\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public NetPacketThread(Socket socket, ObjectInputStream ois) {\n\t\tsender \t\t= false;\n\t\tthis.socket = socket;\n\t\tthis.ois\t= ois;\n\t}",
"public PacketInputStream ()\n {\n _buffer = ByteBuffer.allocate(INITIAL_BUFFER_CAPACITY);\n }",
"public void init() {\r\n\t\ttry {\r\n\t\t\tmessages = new ConcurrentLinkedDeque<>();\r\n\t\t\tout = sock.getOutputStream();\r\n\t\t\tin = sock.getInputStream();\t\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tstartMessageThread();\r\n\t}",
"public cliente(Socket socket) throws IOException {\r\n this.socket = socket;\r\n is = socket.getInputStream();\r\n os = socket.getOutputStream();\r\n\r\n }",
"public void initialize(BluetoothSocket socket) throws IOException {\n\t\tthis.socket = socket;\n\t\trfile = this.socket.getInputStream();\n\t\twfile = this.socket.getOutputStream();\n\t\t\n\t\tmessageSender.start();\n\t\tmessageReceiver.start();\n\t}",
"public BaseServerInputStream() {\n data = new ArrayDeque<IoBuffer>();\n marked = false;\n resetCache = null;\n }",
"public TCPCanSocket(Socket s) throws IOException\n \t{ \n \t System.out.println(s.getInetAddress() + \" \" + s.getPort());\n \t\tthis.s = s;\n \t\tSystem.out.println( \"constructor: open socket data streams\" );\n \t\tdin = new BufferedInputStream(s.getInputStream());\n \t\tdout = new BufferedOutputStream(s.getOutputStream());\n \t\t// dout.flush();\n \t}",
"SocketReader newSocketReader(SocketConnection connection);",
"public SingleService(Socket socket) throws IOException {\n this.socket = socket;\n output = new PrintWriter(\n new BufferedWriter(\n new OutputStreamWriter(\n socket.getOutputStream())), true);\n input = new BufferedReader(\n new InputStreamReader(\n socket.getInputStream()));\n }",
"public void initTransport() {\n JDE.signal(procID, MESSAGE, \"Debugger connected to standard I/O socket.\", QUOTE);\n\n final Process process = m_debugger.getVM().process();\n standardInputProcessor = new StandardInputProcessor(process.getOutputStream());\n standardInputProcessor.start();\n\n standardOutputWriter = new StandardOutputWriter(m_sioSocket);\n standardOutputWriter.println(\"*** Process Standard I/O ***\");\n\n standardOutputProcessor = new StandardOutputProcessor(process.getInputStream());\n standardOutputProcessor.start();\n\n standardErrorProcessor = new StandardErrorProcessor(process.getErrorStream());\n standardErrorProcessor.start();\n\n }",
"public ClientThread(Socket socket) throws IOException\r\n {\r\n this.socket = socket;\r\n this.netIn = new Scanner(new InputStreamReader(socket.getInputStream()));\r\n this.netOut = new PrintStream(socket.getOutputStream());\r\n\r\n }",
"public Mocket()\n throws IOException\n {\n init (null);\n }",
"SocketNode(ObjectInputStream socketInput, ObjectOutputStream socketOutput, MessageHandler messageHandler) {\n this.messageHandler = messageHandler;\n this.socketInput = socketInput;\n this.socketOutput = socketOutput;\n this.connected = true;\n this.connectionIn = false;\n }",
"private void setupStreams() {\n\t\ttry {\n\t\t\tthis.out = new ObjectOutputStream(this.sock.getOutputStream());\n\t\t\tthis.out.flush();\n\t\t\tthis.in = new ObjectInputStream(this.sock.getInputStream());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public Connection(Socket client_socket) {\r\n client = client_socket;\r\n try {\r\n in = new DataInputStream(client.getInputStream());\r\n out = new PrintStream(client.getOutputStream());\r\n }\r\n catch (IOException e) {\r\n try { client.close(); } catch (IOException e2) { ; }\r\n System.err.println(\"Exception while getting socket streams: \" + e);\r\n return;\r\n }\r\n this.start();\r\n }",
"protected InputStream getInputStream() throws IOException\n {\n if (fd == null) {\n throw new IOException(\"socket not created\");\n }\n\n synchronized (this) {\n if (fis == null) {\n fis = new SocketInputStream();\n }\n\n return fis;\n }\n }",
"public InputStreamIKBusPacketReader(InputStream inputStream) {\n\t\tthis.inputStream = new TimeRestrictedInputStream(inputStream, PACKET_TIMEOUT);\n\t}",
"public Handler(Socket socket) {\n this.socket = socket;\n }",
"public Handler(Socket socket) {\n this.socket = socket;\n }",
"SocketNode(NodeInterface node, Socket socketIn) {\n this.connectionIn = true;\n try {\n this.socketInput = new ObjectInputStream(socketIn.getInputStream());\n this.socketOutput = new ObjectOutputStream(socketIn.getOutputStream());\n } catch (IOException e) {\n this.close();\n }\n this.connected = true;\n Executors.newCachedThreadPool().execute(() ->\n node.getSocketManager().createConnection(this, socketIn.getInetAddress().getHostAddress()));\n }",
"public NetworkClient(Socket socket) throws IOException {\n\t\tthis.socket = socket;\n\t\tthis.host = socket.getInetAddress().getHostAddress();\n\t\tthis.port = socket.getPort();\n\t\tin = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\tout = new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));\n\t}",
"public ClientSocket(Socket socket0, Socket socket1) throws IOException {\n super();\n this.socket0 = socket0;\n this.socket1 = socket1;\n inReader = new BufferedReader(new InputStreamReader(socket0.getInputStream()));\n outWriter = new PrintWriter(new OutputStreamWriter(socket0.getOutputStream(),StandardCharsets.UTF_8), true);\n objectOutputStream = new ObjectOutputStream(socket1.getOutputStream());\n }",
"public Sender(Socket socket)\n {\n try\n {\n _out = new ObjectOutputStream(socket.getOutputStream());\n }\n catch (IOException e1)\n {\n e1.printStackTrace();\n }\n }",
"private void initSocket() {\n try {\n rtpSocket = new DatagramSocket(localRtpPort);\n rtcpSocket = new DatagramSocket(localRtcpPort);\n } catch (Exception e) {\n System.out.println(\"RTPSession failed to obtain port\");\n }\n\n rtpSession = new RTPSession(rtpSocket, rtcpSocket);\n rtpSession.RTPSessionRegister(this, null, null);\n\n rtpSession.payloadType(96);//dydnamic rtp payload type for opus\n\n //adding participant, where to send traffic\n Participant p = new Participant(remoteIpAddress, remoteRtpPort, remoteRtcpPort);\n rtpSession.addParticipant(p);\n }",
"public TCPSocketManager(String name, OutputStream os, Socket sock, InetAddress addr, String host, int port, int delay, boolean immediateFail, Layout<? extends Serializable> layout) {\n/* 77 */ super(name, os, addr, host, port, layout);\n/* 78 */ this.reconnectionDelay = delay;\n/* 79 */ this.socket = sock;\n/* 80 */ this.immediateFail = immediateFail;\n/* 81 */ this.retry = (delay > 0);\n/* 82 */ if (sock == null) {\n/* 83 */ this.connector = new Reconnector(this);\n/* 84 */ this.connector.setDaemon(true);\n/* 85 */ this.connector.setPriority(1);\n/* 86 */ this.connector.start();\n/* */ } \n/* */ }",
"public XGMMLReader(InputStream is) {\n \t\tthis.networkStream = is;\n \t\tinitialize();\n \t}",
"public HttpRequest(Socket socket) throws Exception {\n\t\tthis.socket = socket;\n\t}",
"public Client() throws IOException\n {\n socket = new Socket(\"127.0.0.1\", 1234);\n\n socket2 = new Socket(\"127.0.0.1\", 1235);\n \n out = new ObjectOutputStream(socket.getOutputStream());\n in = new ObjectInputStream(socket.getInputStream());\n \n in2 = new ObjectInputStream(socket2.getInputStream());\n }",
"public SocketConnection(String description, Socket socket) throws IOException {\n\t\tif (DEBUG) System.err.println(\"##### \" + getClass().getName() + \" - instantiated \" + description + \" \" + socket);\n\n\t\t_description = description\n\t\t\t+ \",localHost=\" + socket.getLocalAddress().getHostName()\n\t\t\t+ \",localPort=\" + socket.getLocalPort()\n\t\t\t+ \",peerHost=\" + socket.getInetAddress().getHostName()\n\t\t\t+ \",peerPort=\" + socket.getPort();\n\n\t\t_socket = socket;\n\t\t_inputStream = new BufferedInputStream(socket.getInputStream());\n\t\t_outputStream = new BufferedOutputStream(socket.getOutputStream());\n\n\t\t_listeners = new Vector();\n\t\t_firstRead = true;\n\t}",
"public HttpRequestA(Socket socket) throws Exception {\n this.socket = socket;\n }",
"protected AbstractReadablePacket() {\n this.constructor = createConstructor();\n }",
"private SocketMessage() {\n initFields();\n }",
"public ServerThread(Socket socket) {\r\n\t\tsoc = socket;\r\n\t}",
"public NetPacketThread(Socket socket, ObjectOutputStream oos) {\n\t\tsender \t\t= true;\n\t\tthis.socket = socket;\n\t\tthis.oos\t= oos;\t\n\t}",
"public static NetFlowReader prepareReader(\n DataInputStream inputStream,\n int buffer,\n boolean ignoreCorruptFile) throws IOException {\n return new NetFlowReader(inputStream, buffer, ignoreCorruptFile);\n }",
"public Ip4TcpContext(EthBufPipeTxFactory factory, IpPacket firstPacket) {\n\t\tsuper(factory, firstPacket);\n\t}",
"public ImitationSocket() throws SocketException {\n super();\n this.broadcast = true;\n }",
"public static NetFlowReader prepareReader(\n DataInputStream inputStream,\n int buffer) throws IOException {\n return prepareReader(inputStream, buffer, false);\n }",
"public static NetFlowReader prepareReader(DataInputStream inputStream) throws IOException {\n return prepareReader(inputStream, RecordBuffer.BUFFER_LENGTH_2, false);\n }",
"public ConnectedThread(BluetoothSocket socket) {\n mmSocket = socket;\n InputStream tmpIn = null;\n OutputStream tmpOut = null;\n\n // Get the input and output streams; using temp objects because\n // member streams are final.\n try {\n tmpIn = socket.getInputStream();\n } catch (IOException e) {\n Log.e(TAG, \"Error occurred when creating input stream\", e);\n }\n try {\n tmpOut = socket.getOutputStream();\n } catch (IOException e) {\n Log.e(TAG, \"Error occurred when creating output stream\", e);\n }\n\n mmInStream = tmpIn;\n mmOutStream = tmpOut;\n }",
"@Override\n protected void initFactory() throws IOException {\n\n try {\n SSLContext context = getContext();\n sslFactory = context.getSocketFactory();\n } catch (Exception e) {\n if (e instanceof IOException) {\n throw (IOException) e;\n }\n throw new IOException(e.getMessage());\n }\n }",
"LocalSocketImpl(FileDescriptor fd)\n {\n this.fd = fd;\n }",
"public MyInputStream(InputStream in) {\n super(in);\n this.in = in;\n }",
"@Override\r\n\tpublic void start(Socket socket){}",
"public COSInputStream createInputStream() throws IOException\n {\n return stream.createInputStream();\n }",
"public void setSocket(SocketWrapper socket);",
"public ClientConnectionHandler(Socket socket, int number) {\r\n clientSocket = socket;\r\n clientNumber = number;\r\n isOpen = true;\r\n\r\n try {\r\n in = new DataInputStream(socket.getInputStream());\r\n out = new DataOutputStream(socket.getOutputStream());\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }",
"private static void setupServerStreams(ProjectType project) throws IOException{\r\n serverObjectOutputStream = new ObjectOutputStream(socket.getOutputStream());\r\n serverObjectOutputStream.flush();\r\n serverObjectInputStream = new ObjectInputStream(socket.getInputStream());\r\n System.out.println(\"Server: Streams were configured properly!\");\r\n prepareInstructionPacket(project);\r\n }",
"public MockSocket () {\n state = UNBOUND;\n }",
"public RRCPConnectionHandler(Socket s) {\n this.s = s;\n try {\n dis = new DataInputStream(new BufferedInputStream(s.getInputStream()));\n dos = new DataOutputStream(new BufferedOutputStream(this.s.getOutputStream()));\n } catch (IOException ex) {\n System.err.println(\"Error making data streams on ConnectionHandler: \\\"\" + ex.getMessage() + \"\\\"\");\n }\n }",
"public static ByteArrayInputStream readSocketStream(InputStream is) throws IOException {\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n copyStream(is, bos);\n byte[] data = bos.toByteArray();\n ByteArrayInputStream bis = new ByteArrayInputStream(data);\n closeStream(is);\n closeStream(bos);\n return bis;\n }",
"public COSInputStream createInputStream() throws IOException {\n/* 236 */ return this.stream.createInputStream();\n/* */ }",
"private NetFlowReader(\n DataInputStream inputStream,\n int buffer,\n boolean ignoreCorruptFile) throws IOException {\n in = inputStream;\n bufferLength = buffer;\n ignoreCorrupt = ignoreCorruptFile;\n byte[] metadata = null;\n WrappedByteBuf buf = null;\n\n try {\n metadata = new byte[METADATA_LENGTH];\n in.read(metadata, 0, METADATA_LENGTH);\n\n // Parse metadata, byte order does not really matter, so we go for big endian. Metadata contains\n // magic numbers to verify consistency of the NetFlow file, byte order encoded as either 1 or 2,\n // and stream version which affects header parsing (currently only 1 and 3 are supported).\n buf = WrappedByteBuf.init(metadata, ByteOrder.BIG_ENDIAN);\n short magic1 = buf.getUnsignedByte(0);\n short magic2 = buf.getUnsignedByte(1);\n short order = buf.getUnsignedByte(2);\n short stream = buf.getUnsignedByte(3);\n\n // Verify consistency of NetFlow file, also this ensures that we are at the beginning of the\n // input stream\n if (magic1 != HEADER_MAGIC1 || magic2 != HEADER_MAGIC2) {\n throw new IOException(\"Corrupt NetFlow file. Wrong magic number\");\n }\n\n // Resolve byte order, last case corresponds to incorrect reading from buffer\n if (order == HEADER_BIG_ENDIAN) {\n byteOrder = ByteOrder.BIG_ENDIAN;\n } else if (order == HEADER_LITTLE_ENDIAN) {\n byteOrder = ByteOrder.LITTLE_ENDIAN;\n } else {\n throw new IOException(\"Could not recognize byte order \" + order);\n }\n\n streamVersion = stream;\n\n // Check stream version\n ensureStreamVersion();\n\n // Read header\n header = getHeader();\n } catch (IOException err) {\n if (ignoreCorrupt) {\n // we subsume exception and log warning. Set header to null\n log.warn(\"Failed to initialize reader, ignoreCorruptFile=\" + ignoreCorrupt +\n \", error=\" + err);\n header = new CorruptNetFlowHeader();\n } else {\n throw err;\n }\n } finally {\n metadata = null;\n buf = null;\n }\n }",
"public TCPReceiver(NetWorkInterface ni){\n\t\tthis.ni = ni;\n\t\ttry {\n\t\t\tmySocket = new ServerSocket(NetWorkInterface.portReceiver);\n\t\t} catch (UnknownHostException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private SSLSocket prepare(SSLSocket baseSocket) {\n\t\tbaseSocket.setEnabledCipherSuites(ciphers);\n\t\treturn baseSocket;\n\t}",
"public synchronized void init() throws IOException\n {\n parserIn = new PipedOutputStream();\n PipedInputStream in = new PipedInputStream();\n parserIn.connect( in );\n antlrSchemaConverterLexer lexer = new antlrSchemaConverterLexer( in );\n parser = new antlrSchemaConverterParser( lexer );\n }",
"public TarInputStream(Stream inputStream)\n\t{\n\t\tthis(inputStream, TarBuffer.DefaultBlockFactor);\n\t}",
"TclInputStream(InputStream inInput) {\n input = inInput;\n }",
"public TCPServer(Socket s) throws IOException\n\t{\n\t\tthis.rover = s;\n\t\tthis.rover.setTcpNoDelay(false);\n\t\tthis.in = this.rover.getInputStream();\n\t\tthis.out = this.rover.getOutputStream();\n\t}",
"public SocketParams() {\n init();\n }",
"public Connection(ConnectionListener listener, Socket socket) {\n this.listener = listener;\n this.socket = socket;\n\n try {\n in = new DataInputStream(socket.getInputStream());\n out = new DataOutputStream(socket.getOutputStream());\n } catch (IOException e) { listener.onException(Connection.this, e); }\n\n rxThread = new Thread(new Runnable() {\n public void run() {\n try {\n listener.onConnect(Connection.this);\n while(!rxThread.isInterrupted()) {\n listener.onDataRecieve(Connection.this, in.readUTF());\n }\n } catch (IOException e) {\n\n e.printStackTrace();\n }\n }\n });\n rxThread.start();\n }",
"public ClientHandler(Socket s){\r\n mySocket = s;\r\n }",
"public void initialize() throws SocketException{\n defPortUsed = true;\n initializeReal(defPortNumber, defPacketSize);\n }",
"public RequestThread(Socket soc){\r\n this.soc = soc; \r\n }",
"@Override\r\n\tprotected void initChannel(SocketChannel ch) throws Exception {\n\t\tch.pipeline().addLast(\"tcpDecoder\", new MessageDecoder());\r\n\t\tch.pipeline().addLast(\"tcpHandler\", new TcpServerHandler(ac)); \r\n\t\t\r\n\t}",
"public ClientThread(Socket socket){\n this.socket = socket;\n }",
"static Wrapper wrap(Socket socket) throws IOException {\n\t\treturn new Wrapper(socket);\n\t}",
"public GridPeer setSocket(Socket socket) throws Exception\n {\n connected = true;\n connectionSocket = socket;\n address = connectionSocket.getInetAddress();\n localPeerID = ++localPeerIDCount;\n reader = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream()));\n writer = new PrintWriter(connectionSocket.getOutputStream(),true);\n initListener();\n return this;\n }",
"private void startConnection() throws IOException {\n bos = new BufferedOutputStream(socket.getOutputStream(), 65536);\n\n byte[] key = new byte[16];\n Random random = new Random();\n random.nextBytes(key);\n String base64Key = Base64.encodeBase64String(key);\n\n byte[] handshake = createHandshake(base64Key);\n bos.write(handshake);\n bos.flush();\n\n InputStream inputStream = socket.getInputStream();\n verifyServerHandshake(inputStream, base64Key);\n\n writerThread.start();\n\n notifyOnOpen();\n\n bis = new BufferedInputStream(socket.getInputStream(), 65536);\n read();\n }",
"public Ip4Socket(int proto) {\n\t\tsuper(Socket.PF_INET,Socket.SOCK_RAW,proto);\n\t}",
"public TarInputStream(Stream inputStream, int blockFactor)\n\t{\n\t\tthis.inputStream = inputStream;\n\t\ttarBuffer = TarBuffer.CreateInputTarBuffer(inputStream, blockFactor);\n\t}",
"@Override\n\tprotected void initChannel(SocketChannel ch) throws Exception {\n\t\tch.pipeline().addLast(\"tcpDecoder\", new MessageDecoder());\n\t\tch.pipeline().addLast(\"tcpHandler\", new TcpServerHandler(ac)); \n\t\t\n\t}",
"StreamConnectionIO(Mux mux, OutputStream out, InputStream in) {\n\tsuper(mux);\n\tthis.out = out;\n//\tthis.out = new BufferedOutputStream(out);\n\tthis.in = in;\n\n\toutChannel = newChannel(out);\n\tinChannel = newChannel(in);\n sendQueue = new LinkedList<Buffer>();\n }",
"public CustomObjectInputStream() throws IOException, SecurityException {\n\t\tsuper();\n\t}",
"@Override\n\t\t\tprotected void initChannel(SocketChannel ch) throws Exception {\n\t\t\t\tch.pipeline().addLast(new ProtobufVarint32FrameDecoder());\n\t\t\t\tch.pipeline().addLast(new ProtobufDecoder(PersonMsg.Person.getDefaultInstance()));\n\t\t\t ch.pipeline().addLast(new ProtobufVarint32LengthFieldPrepender());\n\t\t\t ch.pipeline().addLast(new ProtobufEncoder());\n\t\t\t}",
"public EnvironmentSocket wrapperSocket(Socket socket) {\n return new EnvironmentSocketImpl(socket);\n }",
"public ServerSender(Socket socket) throws IOException {\n\t\tsOutput = new ObjectOutputStream(socket.getOutputStream());\n\t\tsOutput.flush();\n\t\t\n\t\tinit();\n\t}",
"public Tcp6() {\n }",
"public WebSocketServerInputStream(final InputStream is,\n final WebSocketServerOutputStream wsos) {\n checkNotNull(is, \"is == null\");\n checkNotNull(wsos, \"wsos == null\");\n this.inputStream = is;\n this.outputPeer = wsos;\n }",
"public void InitSocket(String server, int port) throws IOException {\n socket = new Socket(server, port);\n outputStream = socket.getOutputStream();\n\n Thread receivingThread = new Thread() {\n @Override\n public void run() {\n try {\n \n BufferedReader reader = new BufferedReader(\n new InputStreamReader(socket.getInputStream()));\n String line;\n while ((line = reader.readLine()) != null)\n notifyObservers(line);\n } catch (IOException ex) {\n notifyObservers(ex);\n }\n }\n };\n receivingThread.start();\n }",
"public TransportLayerNodeHandle<MultiInetSocketAddress> deserialize(\n InputBuffer buf, SourceRoute<MultiInetSocketAddress> i)\n throws IOException {\n long epoch = buf.readLong();\n Id nid = Id.build(buf);\n\n SocketNodeHandle ret = buildSNH(buf, i.getLastHop(), epoch, nid);\n return factory.coalesce(ret);\n }",
"public TestCaseSocket() {\n\t}",
"public OrganizerSingleService(Socket socket) throws IOException {\n this.socket = socket;\n output = new PrintWriter(\n new BufferedWriter(\n new OutputStreamWriter(\n socket.getOutputStream())), true);\n input = new BufferedReader(\n new InputStreamReader(\n socket.getInputStream()));\n }",
"public static AisPacketStream newStream() {\n return new AisPacketStreamImpl();\n }",
"public void InitSocket(String server, int port) throws IOException {\r\n socket = new Socket(server, port);\r\n outputStream = socket.getOutputStream();\r\n\r\n Thread receivingThread = new Thread() {\r\n @Override\r\n public void run() {\r\n try {\r\n BufferedReader reader = new BufferedReader(\r\n new InputStreamReader(socket.getInputStream()));\r\n String line;\r\n while ((line = reader.readLine()) != null) {\r\n notifyObservers(line);\r\n }\r\n } catch (IOException ex) {\r\n notifyObservers(ex);\r\n }\r\n }\r\n };\r\n receivingThread.start();\r\n }",
"public void setPackType() {\n UDP = !(UDP);\n if (UDP){\n try {\n TCPsocket = new Socket(address, port);\n out1 = TCPsocket.getOutputStream();\n in1 = TCPsocket.getInputStream();\n } catch (IOException e) {\n e.printStackTrace();\n return;\n }\n buff = new BufferedOutputStream(out1); //out1 is the socket's outputStream\n dataOutputStreamInstance = new DataOutputStream (buff);\n buff_in = new BufferedInputStream(in1);\n dataInputStreamInstance = new DataInputStream(buff_in);\n startMicTCP();\n startSpeakersTCP();\n }\n else{\n startMic();\n startSpeakersTCP();\n }\n }",
"public Client(Socket socket) {\n\t\t\tthis.socket = socket;\n\t\t}",
"public ClientHandler(InputStream inputFromClient) {\n try {\n this.inputFromClient = new ObjectInputStream(inputFromClient);\n } catch (IOException e) {\n System.out.println(\"Could not create ObjectInputStream from ClientHandler\");\n }\n }",
"ObjectInputStream newObjectInputStream(InputStream in) throws Exception;",
"private void initialize(){\n\t\ttry\n\t\t{\n\t\t\tString[] packet = setPacket();\n\t\t\tif (validatePacket(packet))\n\t\t\t{\n\t\t\t\tsend(packet);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\tSystem.out.println(\"Something went wrong...\");\n\t\t\tresetClient();\n\t\t}\n\t}",
"public ConnectedThread(BluetoothSocket socket) {\n InputStream tmpIn = null;\n OutputStream tmpOut = null;\n\n try {\n //Create I/O streams for connection\n tmpIn = socket.getInputStream();\n tmpOut = socket.getOutputStream();\n } catch (IOException e) {\n }\n\n mmInStream = tmpIn;\n mmOutStream = tmpOut;\n }",
"public GameSocket() throws SocketException {\r\n\t\tsocket = new DatagramSocket(Main.localAddress);\r\n\t\tbufSize = socket.getReceiveBufferSize();\r\n\t\tMain.logger.info(\"Starting GameSocket at port \" + socket.getLocalPort() + \" ...\");\r\n\t}"
] |
[
"0.6240236",
"0.6144193",
"0.6109066",
"0.60752326",
"0.6017049",
"0.5966036",
"0.59401006",
"0.59013975",
"0.58028424",
"0.5742734",
"0.5732023",
"0.5695058",
"0.5629408",
"0.5627551",
"0.56030357",
"0.55923975",
"0.5503977",
"0.54845315",
"0.546701",
"0.54576665",
"0.5448784",
"0.54296815",
"0.54287577",
"0.54284877",
"0.54095525",
"0.54002887",
"0.54002887",
"0.53960526",
"0.5389132",
"0.53835136",
"0.5324739",
"0.53144294",
"0.5310033",
"0.5307072",
"0.5301834",
"0.52980155",
"0.52843237",
"0.5279353",
"0.52759427",
"0.5254745",
"0.5243173",
"0.5229721",
"0.5202333",
"0.51895857",
"0.5187462",
"0.51641816",
"0.5163404",
"0.5162773",
"0.5155581",
"0.51526845",
"0.5150605",
"0.51468086",
"0.5142752",
"0.5140588",
"0.5136183",
"0.51258266",
"0.51225775",
"0.5113871",
"0.5110973",
"0.51046324",
"0.5103513",
"0.5085664",
"0.5085053",
"0.5074451",
"0.50647396",
"0.50391966",
"0.5024637",
"0.50245786",
"0.5024079",
"0.5018779",
"0.50073916",
"0.50071025",
"0.49945113",
"0.49885777",
"0.49881727",
"0.49855423",
"0.49801072",
"0.49760887",
"0.49751747",
"0.49716437",
"0.49629968",
"0.49622333",
"0.49467033",
"0.49391156",
"0.4932323",
"0.49252993",
"0.49123934",
"0.49061674",
"0.49026063",
"0.49025068",
"0.49001396",
"0.48886487",
"0.48813075",
"0.48769084",
"0.48761326",
"0.48741698",
"0.4870434",
"0.48693654",
"0.48630717",
"0.48611945"
] |
0.7525695
|
0
|
Gets the PacketTransformer which is used to reversetransform packets.
|
public PacketTransformer getTransformer()
{
return transformer;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public final Transformation getTransformation() {\n\t\treturn transform;\n\t}",
"public static com.tangosol.net.security.IdentityTransformer getIdentityTransformer()\n {\n return __s_IdentityTransformer;\n }",
"public Transform getTransform(){\n switch (this){\n case promote_terminals: return new SubexpressionTransformation.TerminalChain();\n case promote_redundant: return new SubexpressionTransformation.RedundantChain();\n case promote_summary: return new SubexpressionTransformation.SummarisingChain();\n case promote_chomsky: return new SubexpressionTransformation.ChomskyChain();\n case filter: return new RelationFilterTransformation();\n case order: return new EvaluationOrderTransformation(true, true);\n default: throw new RuntimeException(\"Unreachable\");\n }\n }",
"public Transform getTransformation() {\n Transform t = Transform.newTranslation(position);\n t = t.compose(Transform.newScale(scale));\n t = t.compose(Transform.newXRotation(rotation.x));\n t = t.compose(Transform.newYRotation(rotation.y));\n t = t.compose(Transform.newZRotation(rotation.z));\n return t;\n }",
"TransformationFactory getTransformationFactory();",
"public static Transformer instantiateTransformer() {\n return INSTANTIATE_TRANSFORMER;\n }",
"Atlantis.TransformationHelper transformationHelper() {\n String className = get(TRANSFORMATION_HELPER);\n if (isEmpty(className))\n return null;\n\n try {\n return (Atlantis.TransformationHelper) Class.forName(className).newInstance();\n } catch (Exception e) {\n info(e, \"Couldn't deserialize transformation helper\");\n return null;\n }\n }",
"Transforms getTransforms();",
"public Transformation getTransform() {\n\t\treturn mk;\n\t}",
"public static Transformer nullTransformer() {\n return NULL_TRANSFORMER;\n }",
"public RMTransform getTransformInverse() { return getTransform().invert(); }",
"public AffineTransform getTransform() {\n return new AffineTransform(transform);\n }",
"@Override\n final public String getTransform() {\n String transform = ScijavaGsonHelper.getGson(context).toJson(rt, RealTransform.class);\n //logger.debug(\"Serialization result = \"+transform);\n return transform;\n }",
"Transform<A, B> getTransform();",
"public Transform getTransform() {return transform;}",
"public String getTransformType();",
"public Transform getTransform () {\n\t\torg.jbox2d.common.Transform trans = body.getTransform();\n\t\ttransform.vals[Transform.POS_X] = trans.p.x;\n\t\ttransform.vals[Transform.POS_Y] = trans.p.y;\n\t\ttransform.vals[Transform.COS] = trans.q.c;\n\t\ttransform.vals[Transform.SIN] = trans.q.s;\n\t\treturn transform;\n\t}",
"public AffineTransform getTransform()\r\n\t{\r\n\t\treturn _g2.getTransform();\r\n\t}",
"public Transformer getTransformer(Class<?> from, Class<?> to)\n {\n return this.getTransformer(from, to, null, false);\n }",
"public int getTransformTo() {\n\t\treturn transformTo;\n\t}",
"public Matrix getTransform()\n {\n return transform;\n }",
"protected HLToCPNTranslator getTranslatorToCpn() {\n\t\treturn translator;\n\t}",
"public static Transformer getTransformer()\n\t\t\tthrows TransformerConfigurationException {\n\t\tif (transformer == null) {\n\t\t\ttransformer = tFactory.newTransformer();\n\t\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"UTF-8\");\n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\t\t}\n\n\t\treturn transformer;\n\t}",
"public Transformer getXslt() {\n return xslt;\n }",
"public Node getNormalizedNode() {\n\t\treturn transformedNode;\n\t}",
"public static Transformer loadMailerTransformer( String templateName ) throws TransformerException {\n \t\n\t\tLOG.debug(\"Entering loadMailerTransformer()\" );\n\n // Look up in the cache first\n TransformerCachedValue candidate = (TransformerCachedValue)m_cachedTransformers.get(templateName);\n\n\n if ((candidate == null) ){ \n \t\n \t\tLOG.debug(\"Transformer candidate is not cached, attempting to load the transformer.\" );\n\n\t\t\ttry {\n\n\t\t\t\tbyte[] templateBytes = ResourceHelper.getEmailTemplate(templateName);\n\t\t\t\t\n\t \tByteArrayInputStream xsltInStream = new ByteArrayInputStream(templateBytes);\n\n\t \t\tTransformer transformer = TransformerFactory.newInstance().newTransformer(\n\t \t\t\t\tnew StreamSource(xsltInStream));\n\n\t \t\tcandidate = new TransformerCachedValue(transformer, templateName);\n\t m_cachedTransformers.put(templateName, candidate);\n\t \t\tLOG.debug(\"Added the transformer candidate to the cache.\" );\n\n\t\t\t} catch (Exception e) {\n\t\t\t\t\n\t\t\t\tString errorMessage = \"Unable to load a transformer for template \" + templateName;\n\t\t\t\tLOG.error(errorMessage, e);\n\t\t\t\tthrow new TransformerException(errorMessage, e);\n\t\t\t}\n\n } \n \n StringBuffer logMsg = new StringBuffer(\"\");\n logMsg.append(\"Returning \");\n if(candidate != null && candidate.getName() != null){\n \tlogMsg.append(candidate.getName());\n }\n logMsg.append(\" transformer from loadMailerTransformer()\");\n\t\tLOG.debug(logMsg.toString());\n\t\t\n return candidate.getTransformer();\n }",
"@java.lang.Override\n public godot.wire.Wire.Transform getTransformValue() {\n if (transformValueBuilder_ == null) {\n if (typeCase_ == 14) {\n return (godot.wire.Wire.Transform) type_;\n }\n return godot.wire.Wire.Transform.getDefaultInstance();\n } else {\n if (typeCase_ == 14) {\n return transformValueBuilder_.getMessage();\n }\n return godot.wire.Wire.Transform.getDefaultInstance();\n }\n }",
"@java.lang.Override\n public godot.wire.Wire.Transform getTransformValue() {\n if (typeCase_ == 14) {\n return (godot.wire.Wire.Transform) type_;\n }\n return godot.wire.Wire.Transform.getDefaultInstance();\n }",
"public Matrix4 getTransformMatrix() {\n return transformMatrix;\n }",
"public static BinaryMessageDecoder<Trip> getDecoder() {\n return DECODER;\n }",
"public static XSLTTransformerFactory getInstance() {\r\n\t\treturn transformerFactory;\r\n\t}",
"public void setTransformer(PacketTransformer transformer)\n {\n this.transformer = transformer;\n }",
"@java.lang.Override\n public godot.wire.Wire.Transform2D getTransform2DValue() {\n if (transform2DValueBuilder_ == null) {\n if (typeCase_ == 9) {\n return (godot.wire.Wire.Transform2D) type_;\n }\n return godot.wire.Wire.Transform2D.getDefaultInstance();\n } else {\n if (typeCase_ == 9) {\n return transform2DValueBuilder_.getMessage();\n }\n return godot.wire.Wire.Transform2D.getDefaultInstance();\n }\n }",
"public static Transformer nopTransformer() {\n return NOP_TRANSFORMER;\n }",
"public Transform getRotationTransformation() {\n Transform t = Transform.newXRotation(rotation.x);\n t = t.compose(Transform.newYRotation(rotation.y));\n t = t.compose(Transform.newZRotation(rotation.z));\n return t;\n }",
"Activity getTransformBackwardActivity();",
"private TransportOutDescription getTranport(String epr) {\r\n\t\tTransportOutDescription transport = null;\r\n\r\n\t\ttry {\r\n\t\t\tURL url = new URL(epr);\r\n\t\t\tString protocol = url.getProtocol();\r\n\t\t\tif (\"http\".equalsIgnoreCase(protocol) || \"https\".equalsIgnoreCase(protocol)) {\r\n\t\t\t\ttransport = new TransportOutDescription(protocol);\r\n\t\t\t\tClass senderClass;\r\n\t\t\t\tsenderClass = Loader\r\n\t\t\t\t\t\t.loadClass(\"org.apache.axis2.transport.http.CommonsHTTPTransportSender\");\r\n\t\t\t\tTransportSender sender = (TransportSender) senderClass.newInstance();\r\n\t\t\t\ttransport.setSender(sender);\r\n\t\t\t\ttransport.addParameter(new Parameter(\"PROTOCOL\", \"HTTP/1.1\"));\r\n\t\t\t\ttransport.addParameter(new Parameter(\"Transfer-Encoding\", \"chunked\"));\r\n\t\t\t\ttransport.addParameter(new Parameter(\"OmitSOAP12Action\", \"true\"));\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn transport;\r\n\t}",
"public String getTranslator() {\n return (String)getAttributeInternal(TRANSLATOR);\n }",
"protected static final Transformer newTransformer() {\r\n try {\r\n return getOutTransformer(getTransformerFactory().newTransformer());\r\n } catch (final TransformerConfigurationException tce) {\r\n logB.error(\"XmlFactory.newTransformer : failure on creating new Transformer : \", tce);\r\n }\r\n\r\n return null;\r\n }",
"@java.lang.Override\n public godot.wire.Wire.Transform2D getTransform2DValue() {\n if (typeCase_ == 9) {\n return (godot.wire.Wire.Transform2D) type_;\n }\n return godot.wire.Wire.Transform2D.getDefaultInstance();\n }",
"public org.cagrid.data.dcql.DataTransformation getDataTransformation() {\r\n return dataTransformation;\r\n }",
"public static BinaryMessageDecoder<LNDCDC_ADS_PRPSL_DEAL_PNT_FEAT_LN> getDecoder() {\n return DECODER;\n }",
"public Transcaler getTranscaler() {\n return (_tile!=null)?_tile.getTranscaler():null;\n }",
"public static Transformer exceptionTransformer() {\n return EXCEPTION_TRANSFORMER;\n }",
"public static BinaryMessageDecoder<DNSLog> getDecoder() {\n return DECODER;\n }",
"public AffineTransform getTransform()\n/* */ {\n/* 194 */ return this.transform;\n/* */ }",
"TransformFactory getFactory();",
"public Normalizer getNormalizer() {\n return this.normalizer;\n }",
"public interface Transformer {\n\t/**\n\t * Transform a source object dynamically.\n\t * \n\t * This iteratively calls {@link #transform(Object, Class) transform}\n\t * \n\t * @param <S>\n\t * the source type.\n\t * @param <T>\n\t * the target type.\n\t * @param source\n\t * The source object.\n\t * @return The target object or <em>null</em> if no applicable rule has been\n\t * found.\n\t * @see #getTransformationRules()\n\t */\n\tpublic <S, T> T transform(S source);\n\n\t/**\n\t * Transform a source object using a specific type of rule.\n\t * \n\t * @param <S>\n\t * the source type.\n\t * @param <T>\n\t * the target type.\n\t * @param source\n\t * The source object.\n\t * @param with\n\t * The type of rule to be used.\n\t * @return The target object or <em>null</em> if no applicable rule has been\n\t * found.\n\t */\n\tpublic <S, T> T transform(S source, Class<? extends Rule<S, T>> with);\n\n\t/**\n\t * Get the list of rule definitions related to this transformation instance.\n\t * \n\t * @return An ordered collection of transformation rule definitions.\n\t */\n\tpublic Set<Class<? extends Rule<?, ?>>> getTransformationRules();\n\n\t/**\n\t * \n\t * @return\n\t */\n\tpublic Context getContext();\n}",
"public INormalizer getNormalizer();",
"public static BinaryMessageDecoder<Payload> getDecoder() {\n return DECODER;\n }",
"public static Transformer cloneTransformer() {\n return CLONE_TRANSFORMER;\n }",
"public static ServerModTransformer getInstance() {\n\t\treturn instance;\n\t}",
"@java.lang.Override\n public godot.wire.Wire.TransformOrBuilder getTransformValueOrBuilder() {\n if (typeCase_ == 14) {\n return (godot.wire.Wire.Transform) type_;\n }\n return godot.wire.Wire.Transform.getDefaultInstance();\n }",
"public Translator getTranslator() {\r\n\t\treturn this.translator;\r\n\t}",
"public CertificateDescription reverseProxyCertificate() {\n return this.reverseProxyCertificate;\n }",
"godot.wire.Wire.Transform getTransformValue();",
"public Transformer newTransformer()\n throws TransformerConfigurationException\n {\n return templates.newTransformer();\n }",
"public AffineTransform getAffineTransform() {\n return affineTransform;\n }",
"public Matrix4f getTranslationMat() {\n\t\treturn m_xforms[NvCameraXformType.MAIN].m_translateMat;\n\t}",
"protected ResultTransformer resolveResultTransformer(ResultTransformer resultTransformer) {\n \t\treturn resultTransformer;\n \t}",
"@SuppressWarnings(\"PMD.DefaultPackage\")\n TransformationContextImpl getTransformationContext() {\n return transformationContext;\n }",
"public AffineTransform getOldAffineTransform ( )\n {\n return oldAffineTransformation;\n }",
"private static Method findTransformer(Class<?> rawType) {\n if (rawType == LinkedListMultimap.class || rawType == ListMultimap.class || rawType ==\n Multimap.class) {\n return null;\n }\n\n // First, check type itself for matching methods\n for (String methodName : METHOD_NAMES) {\n try {\n Method m = rawType.getDeclaredMethod(methodName, Multimap.class);\n if (m != null) {\n return m;\n }\n } catch (NoSuchMethodException e) {\n }\n // pass SecurityExceptions as-is:\n // } catch (SecurityException e) { }\n }\n\n // If not working, possibly super types too (should we?)\n for (String methodName : METHOD_NAMES) {\n try {\n Method m = rawType.getMethod(methodName, Multimap.class);\n if (m != null) {\n return m;\n }\n } catch (NoSuchMethodException e) {\n }\n // pass SecurityExceptions as-is:\n // } catch (SecurityException e) { }\n }\n\n return null;\n }",
"@java.lang.Override\n public godot.wire.Wire.TransformOrBuilder getTransformValueOrBuilder() {\n if ((typeCase_ == 14) && (transformValueBuilder_ != null)) {\n return transformValueBuilder_.getMessageOrBuilder();\n } else {\n if (typeCase_ == 14) {\n return (godot.wire.Wire.Transform) type_;\n }\n return godot.wire.Wire.Transform.getDefaultInstance();\n }\n }",
"@Override\n \t\t\t\tpublic EnumTransformationType getTransformationType() {\n \t\t\t\t\treturn null;\n \t\t\t\t}",
"public List<ConquestWarriorTransformation> getConquestWarriorTransformation() {\n if (ConquestWarriorTransformation == null) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n ConquestWarriorTransformationDao targetDao = daoSession.getConquestWarriorTransformationDao();\n List<ConquestWarriorTransformation> ConquestWarriorTransformationNew = targetDao._queryConquestTransformationPokemon_ConquestWarriorTransformation(TransformationId);\n synchronized (this) {\n if(ConquestWarriorTransformation == null) {\n ConquestWarriorTransformation = ConquestWarriorTransformationNew;\n }\n }\n }\n return ConquestWarriorTransformation;\n }",
"@java.lang.Override\n public godot.wire.Wire.Transform2DOrBuilder getTransform2DValueOrBuilder() {\n if ((typeCase_ == 9) && (transform2DValueBuilder_ != null)) {\n return transform2DValueBuilder_.getMessageOrBuilder();\n } else {\n if (typeCase_ == 9) {\n return (godot.wire.Wire.Transform2D) type_;\n }\n return godot.wire.Wire.Transform2D.getDefaultInstance();\n }\n }",
"public Normalizer getNormalizer() {\n return null;\n }",
"public static BinaryMessageDecoder<Edge> getDecoder() {\n return DECODER;\n }",
"public static BinaryMessageDecoder<InterceptTest> getDecoder() {\n return DECODER;\n }",
"public AffineTransform getTlm(\n )\n {return tlm;}",
"@Override\n \t\t\t\tpublic File getTransformerDirectory() {\n \t\t\t\t\treturn null;\n \t\t\t\t}",
"final Class<T> targetType() {\n return this.targetType;\n }",
"@java.lang.Override\n public godot.wire.Wire.Transform2DOrBuilder getTransform2DValueOrBuilder() {\n if (typeCase_ == 9) {\n return (godot.wire.Wire.Transform2D) type_;\n }\n return godot.wire.Wire.Transform2D.getDefaultInstance();\n }",
"public String getLocalXSLT(){\r\n\t\treturn this.localXSLT;\r\n\t}",
"public static BinaryMessageDecoder<TokenTransactions> getDecoder() {\n return DECODER;\n }",
"public static Transformer asTransformer(Executor executor) {\n if (executor == null) {\n throw new IllegalArgumentException(\"The executor must not be null\");\n }\n return new ExecutorTransformer(executor);\n }",
"public StringConverter<T> getConverter() {\n\n return this.converterProperty.get();\n }",
"private RemoteEventListener getDest()\n throws RemoteException {\n if (!isPrepared) {\n try {\n Object myListener = theMarshalledListener.get();\n\n theListener = (RemoteEventListener)\n GeneratorConfig.getRecoveryPreparer().prepareProxy(myListener);\n isPrepared = true;\n } catch (IOException anIOE) {\n throw new RemoteException(\"Failed to unmarshall listener\",\n anIOE);\n } catch (ClassNotFoundException aCNFE) {\n throw new RemoteException(\"Failed to load class for listener\",\n aCNFE);\n }\n }\n \n return theListener;\n }",
"@Override\n\tpublic Mat GetTranslateMatrix()\n\t{\n\t\treturn mT;\n\t}",
"public static BinaryMessageDecoder<Timestamp> getDecoder() {\n return DECODER;\n }",
"public Object getProxy() {\n\t\t\r\n\t\treturn getProxy(this.advised.getTargetClass().getClassLoader());\r\n\t}",
"@Nonnull\n Converter<T> getConverter() {\n return converter;\n }",
"@Override\r\n\tprotected AffineTransform getPointTransformation() {\n\t\treturn null;\r\n\t}",
"public Converter getConverter() {\n return converter;\n }",
"public Converter getConverter() {\n return converter;\n }",
"Activity getTransformForwardActivity();",
"public ReversedLinearValueFunction getInternalReversedLinearValueFunction(Criterion criterion) {\n checkNotNull(criterion);\n checkArgument(criterion.isDoubleDecrease());\n return this.reversedValueFunctions.get(criterion);\n }",
"public static BinaryMessageDecoder<LNDCDC_NCS_TCS_ORDER_TYPES> getDecoder() {\n return DECODER;\n }",
"protected TemplateResolver getTemplateResolver() {\n return templateResolver;\n }",
"public static PSConfigDeNormalizer getInstance()\n {\n if (ms_instance == null)\n ms_instance = new PSConfigDeNormalizer();\n return ms_instance;\n }",
"public static Transform inverse(Transform t) {\n\t\tfloat inv_det = 1.0f / (t.a * t.d - t.c * t.b);\n\t\treturn transpose(t.d * inv_det, -t.c * inv_det, (t.c * t.ty - t.tx * t.d) * inv_det, -t.b * inv_det,\n\t\t\t\t\t\t t.a * inv_det, (t.tx * t.b - t.a * t.ty) * inv_det);\n\t}",
"public double getPipeline() {\n return get(\"getpipe\");\n }",
"protected static final TransformerFactory getTransformerFactory() {\r\n if (transformerFactory == null) {\r\n try {\r\n transformerFactory = TransformerFactory.newInstance();\r\n } catch (final TransformerFactoryConfigurationError tfce) {\r\n logB.error(\"XmlFactory.getTransformerFactory : failure on TransformerFactory initialisation : \", tfce);\r\n }\r\n }\r\n\r\n return transformerFactory;\r\n }",
"godot.wire.Wire.Transform2D getTransform2DValue();",
"public FixedFormatDoubleConverter getConverter() {\n return converter;\n }",
"@Override\n public AffineTransform getAffineTransform() {\n return null;\n }",
"public static Transformer asTransformer(Predicate predicate) {\n if (predicate == null) {\n throw new IllegalArgumentException(\"The predicate must not be null\");\n }\n return new PredicateTransformer(predicate);\n }",
"@Override\n public Transcoder getTranscoder() {\n return settings.getTranscoderType();\n }"
] |
[
"0.59110844",
"0.57028997",
"0.5673605",
"0.55213434",
"0.5430251",
"0.541063",
"0.5289848",
"0.527069",
"0.52256566",
"0.51910585",
"0.51410985",
"0.5102854",
"0.50719094",
"0.50657004",
"0.5050622",
"0.5014278",
"0.4988617",
"0.4987796",
"0.4969699",
"0.4962189",
"0.49567598",
"0.49260274",
"0.49142835",
"0.48979226",
"0.48949736",
"0.4854566",
"0.48460993",
"0.48460728",
"0.4842066",
"0.4837383",
"0.48161674",
"0.48121253",
"0.48063442",
"0.48053294",
"0.47793528",
"0.47734413",
"0.4768725",
"0.47675017",
"0.47480786",
"0.474589",
"0.47267583",
"0.47257778",
"0.47159567",
"0.47140774",
"0.4690947",
"0.4677144",
"0.46550614",
"0.46458304",
"0.46285313",
"0.46249261",
"0.46205905",
"0.46204177",
"0.46045902",
"0.46039096",
"0.45953372",
"0.4579106",
"0.45662728",
"0.45596778",
"0.45286977",
"0.4519928",
"0.45108438",
"0.45082852",
"0.45045325",
"0.45036587",
"0.4499786",
"0.44941655",
"0.4478028",
"0.44563255",
"0.4451644",
"0.44510582",
"0.44448316",
"0.44435433",
"0.44277835",
"0.44196993",
"0.44179803",
"0.43949857",
"0.4386018",
"0.43780002",
"0.4377078",
"0.4369963",
"0.4363346",
"0.43599716",
"0.43348894",
"0.4327769",
"0.43268546",
"0.4281171",
"0.4281171",
"0.42803586",
"0.42795736",
"0.42746222",
"0.4274032",
"0.4263878",
"0.42580506",
"0.42331117",
"0.42294657",
"0.42277643",
"0.42155772",
"0.42097536",
"0.41997355",
"0.41923767"
] |
0.7597597
|
0
|
Sets the PacketTransformer which is to be used to reversetransform packets. Set to null to disable transformation.
|
public void setTransformer(PacketTransformer transformer)
{
this.transformer = transformer;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public PacketTransformer getTransformer()\n {\n return transformer;\n }",
"public static Transformer nopTransformer() {\n return NOP_TRANSFORMER;\n }",
"protected static void setIdentityTransformer(com.tangosol.net.security.IdentityTransformer transformer)\n {\n __s_IdentityTransformer = transformer;\n }",
"void setTransforms(Transforms transforms);",
"public static Transformer nullTransformer() {\n return NULL_TRANSFORMER;\n }",
"public void setTransform(AffineTransform Tx)\r\n\t{\r\n\t\t// System.out.println(\"setTransform\");\r\n\t}",
"public synchronized void resetConquestWarriorTransformation() {\n ConquestWarriorTransformation = null;\n }",
"public void setTransform(Transform transform);",
"public void resetTransform() {\n this.mView.setScaleX(1.0f);\n this.mView.setScaleY(1.0f);\n this.mView.setTranslationX(0.0f);\n this.mView.setTranslationY(0.0f);\n }",
"public void setXslt(Transformer _xslt) {\n xslt = _xslt;\n }",
"public void resetUserTransform() {\n workTransform.setTransform(null);\n doc.setTransform(workTransform);\n swapTransforms();\n }",
"private void swapTransforms() {\n Transform tmp = workTransform;\n workTransform = userTransform;\n userTransform = tmp;\n }",
"public static Transformer instantiateTransformer() {\n return INSTANTIATE_TRANSFORMER;\n }",
"public synchronized void setTransformationUnit(\n\t\t\tTransformationUnit transformationUnit) {\n\t\tthis.transformationUnit = transformationUnit;\n\t}",
"@Override\r\n\tprotected AffineTransform getPointTransformation() {\n\t\treturn null;\r\n\t}",
"public void setRtlMirroring(boolean value) {\n getElement().setRtlMirroring(value);\n }",
"public SmooksTransformModel setTransformType(String type);",
"public void set(Transform transform) {\n \tif(transform == null){ // TODO: Quick workaround for wap3 cars problem\n \t\tsetIdentity();\n \t}\n \telse {\n \t\tSystem.arraycopy(transform.matrix, 0, this.matrix, 0, 16);\n \t}\n }",
"public void setReverse(Boolean newValue);",
"public void setReverse(Boolean newValue);",
"public final native void transform(String transform, Element node) /*-{ this.transform(transform, node) }-*/;",
"public void setReverseDirection(boolean reverseDirection)\n {\n mDirection = reverseDirection ? -1 : 1;\n }",
"@Override\r\n public void disableStreamFlow() {\r\n SwitchStates.setEmitTrgPRE(false);\r\n }",
"public void setModelTransformation(final AffineTransform gridToCRS) {\n final double[] modelTransformation = new double[16];\n modelTransformation[0] = gridToCRS.getScaleX();\n modelTransformation[1] = gridToCRS.getShearX();\n modelTransformation[2] = 0;\n modelTransformation[3] = gridToCRS.getTranslateX();\n modelTransformation[4] = gridToCRS.getShearY();\n modelTransformation[5] = gridToCRS.getScaleY();\n modelTransformation[6] = 0;\n modelTransformation[7] = gridToCRS.getTranslateY();\n modelTransformation[8] = 0;\n modelTransformation[9] = 0;\n modelTransformation[10] = 0;\n modelTransformation[11] = 0;\n modelTransformation[12] = 0;\n modelTransformation[13] = 0;\n modelTransformation[14] = 0;\n modelTransformation[15] = 1;\n\n nTransform = createTiffField(Tag.ModelTransformationTag);\n final Node nValues = createTiffDoubles(modelTransformation);\n nTransform.appendChild(nValues);\n }",
"public RMTransform getTransformInverse() { return getTransform().invert(); }",
"public Transformer newTransformer()\n throws TransformerConfigurationException\n {\n return templates.newTransformer();\n }",
"private void setTransformationParameters(\tfinal TourData _tourData,\r\n\t\t\t\t\t\t\t\t\t\t\t\tfinal Transformer _transformer,\r\n\t\t\t\t\t\t\t\t\t\t\t\tfinal PrintSettings _printSettings) {\r\n\r\n\t\t_transformer.setParameter(\"isPrintMarkers\", _printSettings.isPrintMarkers()); //$NON-NLS-1$\r\n\t\t_transformer.setParameter(\"isPrintDescription\", _printSettings.isPrintDescription()); //$NON-NLS-1$\r\n\r\n\t\t_transformer.setParameter(\"paperSize\", _printSettings.getPaperSize().toString()); //$NON-NLS-1$\r\n\t\t_transformer.setParameter(\"paperOrientation\", _printSettings.getPaperOrientation().toString()); //$NON-NLS-1$\r\n\r\n\t\t_transformer.setParameter(\"startDate\", formatStartDate(_tourData)); //$NON-NLS-1$\r\n\r\n\t\t_transformer.setParameter(\"unitAltitude\", new Double(net.tourbook.ui.UI.UNIT_VALUE_ALTITUDE)); //$NON-NLS-1$\r\n\t\t_transformer.setParameter(\"unitDistance\", new Double(net.tourbook.ui.UI.UNIT_VALUE_DISTANCE)); //$NON-NLS-1$\r\n\t\t_transformer.setParameter(\"unitTemperature\", net.tourbook.ui.UI.UNIT_VALUE_TEMPERATURE); //$NON-NLS-1$\r\n\t\t_transformer.setParameter(\"unitLabelDistance\", UI.UNIT_LABEL_DISTANCE); //$NON-NLS-1$\r\n\t\t_transformer.setParameter(\"unitLabelSpeed\", UI.UNIT_LABEL_SPEED); //$NON-NLS-1$\r\n\t\t_transformer.setParameter(\"unitLabelAltitude\", UI.UNIT_LABEL_ALTITUDE); //$NON-NLS-1$\r\n\t\t_transformer.setParameter(\"unitLabelTemperature\", UI.UNIT_LABEL_TEMPERATURE); //$NON-NLS-1$\r\n\t\t_transformer.setParameter(\"unitLabelHeartBeat\", net.tourbook.ui.Messages.Value_Unit_Pulse); //$NON-NLS-1$\r\n\t\t_transformer.setParameter(\"unitLabelCadence\", net.tourbook.ui.Messages.Value_Unit_Cadence); //$NON-NLS-1$\r\n\t\t_transformer.setParameter(\"unitLabelCalories\", net.tourbook.ui.Messages.Value_Unit_Calories); //$NON-NLS-1$\r\n\t}",
"protected void removeJWTTransformer(JWTTransformer jwtTransformer) {\n ServiceReferenceHolder.getInstance().removeJWTTransformer(jwtTransformer.getIssuer());\n }",
"protected void addTransformer(PropertyTransformer transformer)\n {\n transformers.add(transformer);\n }",
"@JSProperty(\"reversed\")\n void setReversed(boolean value);",
"@Override\n public AffineTransform getAffineTransform() {\n return null;\n }",
"public void setTransform(AffineTransform transform)\n/* */ {\n/* 202 */ AffineTransform old = getTransform();\n/* 203 */ this.transform = transform;\n/* 204 */ setDirty(true);\n/* 205 */ firePropertyChange(\"transform\", old, transform);\n/* */ }",
"public TraceManager(TransformerImpl transformer)\r\n {\r\n m_transformer = transformer;\r\n }",
"@Override\n\tpublic IMatrix nTranspose(boolean liveView) {\n\t\tif (liveView) {\n\t\t\treturn new MatrixTransposeView(this);\n\t\t} else {\n\t\t\treturn new MatrixTransposeView(this.copy());\n\t\t}\n\t}",
"public void transform(AffineTransform Tx)\r\n\t{\r\n\t\t// System.out.println(\"transform\");\r\n\t}",
"public TlsClientImpl(DtlsPacketTransformer packetTransformer)\n {\n super(BC_TLS_CRYPTO);\n this.packetTransformer = packetTransformer;\n }",
"public void setToTranslate(double Tx, double Ty, double Tz) {\r\n\r\n\t\tthis.M11 = 1;\r\n\t\tthis.M12 = 0;\r\n\t\tthis.M13 = 0;\r\n\t\tthis.M14 = 0;\r\n\t\tthis.M21 = 0;\r\n\t\tthis.M22 = 1;\r\n\t\tthis.M23 = 0;\r\n\t\tthis.M24 = 0;\r\n\t\tthis.M31 = 0;\r\n\t\tthis.M32 = 0;\r\n\t\tthis.M33 = 1;\r\n\t\tthis.M34 = 0;\r\n\t\tthis.M41 = Tx;\r\n\t\tthis.M42 = Ty;\r\n\t\tthis.M43 = Tz;\r\n\t\tthis.M44 = 1;\r\n\t}",
"@Override\n public void setAffineTransform(AffineTransform af) {\n\n }",
"@Override\n \t\t\t\tpublic File getTransformerDirectory() {\n \t\t\t\t\treturn null;\n \t\t\t\t}",
"public void setReverse(boolean reverse) {\n\t\t_reverse = reverse;\n\t}",
"public static Transformer switchTransformer(Predicate predicate, Transformer trueTransformer, Transformer falseTransformer) {\n return switchTransformerInternal(new Predicate[] { predicate }, new Transformer[] { trueTransformer }, falseTransformer);\n }",
"public void changeisReversed()\r\n\t{\r\n\t\tisReversed = !isReversed;\r\n\t}",
"public void setPanToView(boolean panToView){\n\t\tmPanToView = panToView;\n\t}",
"public static Transformer exceptionTransformer() {\n return EXCEPTION_TRANSFORMER;\n }",
"@ZAttr(id=779)\n public void setReverseProxyUseExternalRoute(boolean zimbraReverseProxyUseExternalRoute) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraReverseProxyUseExternalRoute, zimbraReverseProxyUseExternalRoute ? Provisioning.TRUE : Provisioning.FALSE);\n getProvisioning().modifyAttrs(this, attrs);\n }",
"public int getTransformTo() {\n\t\treturn transformTo;\n\t}",
"protected void setTranslatorToCpn(HLToCPNTranslator translator) {\n\t\tthis.translator = translator;\n\t}",
"public void setInverseOutput(boolean inverseOutput) {\r\n\t\tthis.inverseOutput = inverseOutput;\r\n\t}",
"public static Transformer getTransformer()\n\t\t\tthrows TransformerConfigurationException {\n\t\tif (transformer == null) {\n\t\t\ttransformer = tFactory.newTransformer();\n\t\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"UTF-8\");\n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\t\t}\n\n\t\treturn transformer;\n\t}",
"public static Transformer cloneTransformer() {\n return CLONE_TRANSFORMER;\n }",
"@Override\r\n public void disableStreamFlow() {\r\n SwitchStates.setEmitOrgPRE(false);\r\n }",
"protected static final Transformer newTransformer() {\r\n try {\r\n return getOutTransformer(getTransformerFactory().newTransformer());\r\n } catch (final TransformerConfigurationException tce) {\r\n logB.error(\"XmlFactory.newTransformer : failure on creating new Transformer : \", tce);\r\n }\r\n\r\n return null;\r\n }",
"public void setToIdentity() {\r\n\t\tthis.set(new AffineTransform3D());\r\n\t}",
"@Override\n \t\t\t\tpublic EnumTransformationType getTransformationType() {\n \t\t\t\t\treturn null;\n \t\t\t\t}",
"@Override\r\n public void disableStreamFlow() {\r\n SwitchStates.setPassivateTrgINT(true);\r\n }",
"public void setzeNurRechtePunkteanzeigeSichtbar() \n {\n anzeige.punkteLinksSichtbarSetzen( false );\n anzeige.punkteRechtsSichtbarSetzen( true );\n }",
"public void resetTransforms() { \r\n transforms2 = new HashMap<BundlesDT.DT,Map<String,Map<String,String>>>(); \r\n transforms2.put(BundlesDT.DT.IPv4, new HashMap<String,Map<String,String>>());\r\n transforms2.put(BundlesDT.DT.IPv4CIDR, new HashMap<String,Map<String,String>>());\r\n if (transforms.containsKey(BundlesDT.DT.IPv4)) {\r\n Iterator<String> it = transforms.get(BundlesDT.DT.IPv4).keySet().iterator();\r\n while (it.hasNext()) transforms2.get(BundlesDT.DT.IPv4).put(it.next(), new HashMap<String,String>());\r\n }\r\n if (transforms.containsKey(BundlesDT.DT.IPv4CIDR)) {\r\n sorted_cidr_trans = new HashMap<String,CIDRRec[]>();\r\n Iterator<String> it = transforms.get(BundlesDT.DT.IPv4CIDR).keySet().iterator();\r\n while (it.hasNext()) {\r\n String trans = it.next();\r\n transforms2.get(BundlesDT.DT.IPv4).put(trans, new HashMap<String,String>());\r\n transforms2.get(BundlesDT.DT.IPv4CIDR).put(trans, new HashMap<String,String>());\r\n\tCIDRRec recs[] = new CIDRRec[transforms.get(BundlesDT.DT.IPv4CIDR).get(trans).keySet().size()];\r\n\tIterator<String> it_cidr = transforms.get(BundlesDT.DT.IPv4CIDR).get(trans).keySet().iterator();\r\n\tfor (int i=0;i<recs.length;i++) {\r\n\t String cidr = it_cidr.next();\r\n\t recs[i] = new CIDRRec(cidr,transforms.get(BundlesDT.DT.IPv4CIDR).get(trans).get(cidr));\r\n }\r\n\tArrays.sort(recs);\r\n\tsorted_cidr_trans.put(trans,recs);\r\n }\r\n }\r\n }",
"public void invertOrientation() {\n\t\tPoint3D temp = getPoint(2);\n\t\tsetPoint(2, getPoint(1));\n\t\tsetPoint(1, temp);\n\n\t\tTriangleElt3D temp2 = getNeighbour(2);\n\t\tsetNeighbour(2, getNeighbour(1));\n\t\tsetNeighbour(1, temp2);\n\t\tif (this.getNetComponent() != null)\n\t\t\tthis.getNetComponent().setOriented(false);\n\t}",
"public Builder setTransform2DValue(godot.wire.Wire.Transform2D value) {\n if (transform2DValueBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n type_ = value;\n onChanged();\n } else {\n transform2DValueBuilder_.setMessage(value);\n }\n typeCase_ = 9;\n return this;\n }",
"public Transform() {\n setIdentity();\n }",
"public static Transformer asTransformer(Executor executor) {\n if (executor == null) {\n throw new IllegalArgumentException(\"The executor must not be null\");\n }\n return new ExecutorTransformer(executor);\n }",
"public void setTransform(CGAffineTransform transform) {\n \t\tthis.transform = transform;\n \t}",
"public Transform(Transform transform){\n System.arraycopy(transform.matrix, 0, matrix, 0, 16); \n }",
"public Transform getTransform(){\n switch (this){\n case promote_terminals: return new SubexpressionTransformation.TerminalChain();\n case promote_redundant: return new SubexpressionTransformation.RedundantChain();\n case promote_summary: return new SubexpressionTransformation.SummarisingChain();\n case promote_chomsky: return new SubexpressionTransformation.ChomskyChain();\n case filter: return new RelationFilterTransformation();\n case order: return new EvaluationOrderTransformation(true, true);\n default: throw new RuntimeException(\"Unreachable\");\n }\n }",
"@JSProperty(\"reversedStacks\")\n void setReversedStacks(boolean value);",
"public void setReverse(boolean revVal) {\n\t\tRelay.Value currentValue = this.get(),\n\t\t\t newValue = currentValue;\n\t\n\tif(currentValue == Relay.Value.kForward) {\n\t\tif(revVal)\n\t\t\tnewValue = Relay.Value.kOn;\n\t} else if(currentValue == Relay.Value.kOff) {\n\t\tif(revVal)\n\t\t\tnewValue = Relay.Value.kReverse;\n\t} else if(currentValue == Relay.Value.kOn) {\n\t\tif(!revVal)\n\t\t\tnewValue = Relay.Value.kForward;\n\t} else if(currentValue == Relay.Value.kReverse) {\n\t\tif(!revVal)\n\t\t\tnewValue = Relay.Value.kOff;\n\t}\n\t\n\tthis.set(newValue);\n\t}",
"public void pan(float panX, float panY) {\n workTransform.setTransform(null);\n workTransform.mTranslate(panX, panY);\n workTransform.mMultiply(userTransform);\n doc.setTransform(workTransform);\n swapTransforms();\n }",
"public void setPacketProcessor(MaplePacketProcessor processor);",
"@ZAttr(id=779)\n public Map<String,Object> setReverseProxyUseExternalRoute(boolean zimbraReverseProxyUseExternalRoute, Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraReverseProxyUseExternalRoute, zimbraReverseProxyUseExternalRoute ? Provisioning.TRUE : Provisioning.FALSE);\n return attrs;\n }",
"public void setTrusted (boolean trusted) {\n impl.setTrusted(trusted);\n }",
"Transforms getTransforms();",
"public boolean getReverse() {\r\n return Reverse;\r\n }",
"public boolean getReverse() {\r\n return Reverse;\r\n }",
"public Transform getTransform() {return transform;}",
"private void init() {\n setPageTransformer(true, new VerticalPageTransformer());\n setOverScrollMode(OVER_SCROLL_NEVER);\n }",
"public void invert() throws NoninvertibleTransform3DException {\r\n\t\tthis.set(getInverse());\r\n\t}",
"public void setTransform(float a11, float a12, float a21, float a22, float x, float y);",
"public void fromTransformations(Transformations transformations);",
"public void setAesCipherTransformation(String transformation)\n {\n this.cipherTransformation = transformation;\n }",
"@ZAttr(id=1200)\n public void unsetReverseProxyClientCertMode() throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraReverseProxyClientCertMode, \"\");\n getProvisioning().modifyAttrs(this, attrs);\n }",
"public void resetDecoyRouter() {\n this.hostsDecoyRouter = false;\n }",
"public JSONBuilder withTransformer(Class<?> fieldClass, Transformer transformer) {\n\t\ttransformers.put(fieldClass, transformer);\n\t\treturn this;\n\t}",
"public void setSymmetricRtp(boolean symmetric_rtp)\n { this.symmetric_rtp=symmetric_rtp;\n }",
"@ZAttr(id=779)\n public void unsetReverseProxyUseExternalRoute() throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraReverseProxyUseExternalRoute, \"\");\n getProvisioning().modifyAttrs(this, attrs);\n }",
"private void setTransform(Transform3D trans) {\n this.transformGroup.setTransform(trans);\n }",
"private static final Transformer getOutTransformer(final Transformer tf) {\r\n tf.setOutputProperty(OutputKeys.ENCODING, ENCODING);\r\n tf.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n\r\n return tf;\r\n }",
"public void setConcatTransforms(boolean flag) {\n concatTransforms = flag;\n }",
"public Point2D.Double detransform (Point2D.Double point) {\n Point2D.Double detransformedPoint = new Point2D.Double ();\n inverse.transform (point, detransformedPoint);\n return detransformedPoint;\n }",
"public Transformer getXslt() {\n return xslt;\n }",
"public Builder setTransformValue(godot.wire.Wire.Transform value) {\n if (transformValueBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n type_ = value;\n onChanged();\n } else {\n transformValueBuilder_.setMessage(value);\n }\n typeCase_ = 14;\n return this;\n }",
"protected ResultTransformer resolveResultTransformer(ResultTransformer resultTransformer) {\n \t\treturn resultTransformer;\n \t}",
"@java.lang.Override\n public godot.wire.Wire.Transform getTransformValue() {\n if (typeCase_ == 14) {\n return (godot.wire.Wire.Transform) type_;\n }\n return godot.wire.Wire.Transform.getDefaultInstance();\n }",
"public void disableNormalizationPlugin();",
"@Override\r\n public void disableStreamFlow() {\r\n SwitchStates.setEmitTrgEND(false);\r\n }",
"@Override\n public void setPositionSensorInverted(boolean inverted)\n {\n final String funcName = \"setPositionSensorInverted\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"inverted=%s\", inverted);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n encoderSign = inverted ? -1.0 : 1.0;\n }",
"public void setReverse(boolean reverse) {\n this.repeat = !reverse;\n }",
"public T caseTransformation(Transformation object) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic void setTranscoder(Transcoder arg0) {\n\n\t}",
"public final static void disableNormalizationPlugin()\n { /* disableNormalizationPlugin */\n activeNormalization= null;\n }",
"public ImsTransformer() {\n\n }"
] |
[
"0.5776673",
"0.5429672",
"0.5283893",
"0.52068",
"0.5163115",
"0.5116359",
"0.5083727",
"0.50619745",
"0.5021305",
"0.49602243",
"0.4801677",
"0.46921408",
"0.4636669",
"0.4632162",
"0.46246907",
"0.4614409",
"0.4607074",
"0.45559958",
"0.45519114",
"0.45519114",
"0.44722256",
"0.44614637",
"0.44603115",
"0.4446598",
"0.44137505",
"0.44088346",
"0.43717018",
"0.43681785",
"0.4356994",
"0.4353846",
"0.43507874",
"0.4345341",
"0.43444806",
"0.4338283",
"0.43334585",
"0.43244755",
"0.43170598",
"0.43016934",
"0.42802864",
"0.42776015",
"0.42749938",
"0.42650044",
"0.4256999",
"0.42443037",
"0.42439282",
"0.42422223",
"0.42361352",
"0.42220372",
"0.42028686",
"0.42017785",
"0.4184861",
"0.41748676",
"0.4166926",
"0.41617417",
"0.41573164",
"0.41569594",
"0.41550896",
"0.41535288",
"0.41502056",
"0.41385815",
"0.41245586",
"0.41063285",
"0.4087245",
"0.4082438",
"0.40799734",
"0.40791014",
"0.40773833",
"0.4069833",
"0.40687844",
"0.40686107",
"0.4067755",
"0.40614274",
"0.40614274",
"0.40546605",
"0.40529603",
"0.40507698",
"0.40453976",
"0.40324864",
"0.40178078",
"0.4013633",
"0.40135902",
"0.40121824",
"0.4002946",
"0.40018263",
"0.39952713",
"0.39918396",
"0.39854252",
"0.398506",
"0.39791608",
"0.39727387",
"0.39705157",
"0.39689416",
"0.3965785",
"0.39621553",
"0.39555675",
"0.3954848",
"0.39542365",
"0.39527902",
"0.39507854",
"0.39458278"
] |
0.6687546
|
0
|
obtiene una extructura de tipo Map> con todos los parametros de configuracion del sistema.
|
Map<Long, Map<String, Parametro>> getParametrosConfigMap();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"Map<String, String> getParameters();",
"Map<String, String[]> getParameterMap();",
"public Map getParameters();",
"Map<String, Object> getParameters();",
"Map<String, Object> getParameters();",
"public static Map<String, String> getParameters() {\r\n return null;\r\n }",
"protected Map<String, Object> getConfigurationParameters(){\n\t\treturn configurationParameters;\n\t}",
"java.util.Map<String, String>\n getOptionsMap();",
"java.util.Map<String, String>\n getOptionsMap();",
"java.util.Map<String, String>\n getOptionsMap();",
"public Map<String, Object> getInfoMap()\n {\n Map<String, Object> paramMap = new HashMap<String, Object>();\n this.putInMap(paramMap);\n return paramMap;\n }",
"public Map getProperties();",
"@Override\n\tpublic Map<String, String[]> getParameterMap() {\n\t\treturn null;\n\t}",
"Map getOptions();",
"public void buildMap(){\n this.map = new HashMap<String, String>();\n map.put(\"user\", \"user\");\n map.put(\"pw\", \"pass\");\n map.put(\"quit\", \"quit\");\n map.put(\"features\", \"feat\");\n map.put(\"cd\", \"cwd\");\n map.put(\"dir\", \"list\");\n map.put(\"get\", \"retr\");\n }",
"public Map<String, Object> getInfoMap() {\n\t\tMap<String, Object> paramMap = new HashMap<String, Object>();\n\t\tthis.putInMap(paramMap);\n\t\treturn paramMap;\n\t}",
"java.util.Map<java.lang.String, java.lang.String>\n getPropertiesMap();",
"@Override\n\t\tpublic Map getParameterMap() {\n\t\t\treturn null;\n\t\t}",
"Map<String, String> getConfigProperties();",
"Map<String, String> getAllAsMap() {\n return Collections.unmodifiableMap(settings);\n }",
"Map<String, String> getAllAsMap() {\n return Collections.unmodifiableMap(settings);\n }",
"public Map getParameters()\n\t{\n\t\tMap returnValue = null;\n\n\t\tif (params == null)\n\t\t{\n\t\t\treturnValue = new HashMap();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturnValue = params;\n\t\t}\n\n\t\treturn returnValue;\n\t}",
"public MultiValueMap<String, String> getMap() {\r\n\t\tMultiValueMap<String, String> map = new LinkedMultiValueMap<String, String>();\r\n\t\t\r\n\t\tif(this.country != null) \t\tmap.add(\"country\", this.getCountry().getValue());\r\n\t\tif(this.operation != null) \t\tmap.add(\"operation\", this.getOperation().getValue());\r\n\t\tif(this.propertyType != null) \tmap.add(\"propertyType\", this.getPropertyType().getValue());\r\n\t\tif(this.center != null) \t\tmap.add(\"center\", this.getCenter().getCoordinates());\r\n\t\tif(this.locale != null) \t\tmap.add(\"locale\", this.getLocale().getValue());\r\n\t\tif(this.distance != null) \t\tmap.add(\"distance\", this.getDistance().toString());\r\n\t\tif(this.locationId != null) \tmap.add(\"locationId\", this.getLocationId().getValue());\r\n\t\tif(this.maxItems != null) \t\tmap.add(\"maxItems\", this.getMaxItems().toString());\r\n\t\tif(this.numPage != null) \t\tmap.add(\"numPage\", this.getNumPage().toString());\r\n\t\tif(this.maxPrice != null) \t\tmap.add(\"maxPrice\", this.getMaxPrice().toString());\r\n\t\tif(this.sinceDate != null) \t\tmap.add(\"sinceDate\", this.getSinceDate().getValue());\r\n\t\tif(this.order != null) \t\t\tmap.add(\"order\", this.getOrder().getValue());\r\n\t\tif(this.sort != null) \t\t\tmap.add(\"sort\", this.getSort().getValue());\r\n\t\tif(this.adIds != null) {\r\n\t\t\tfor(Integer id: adIds) {\r\n\t\t\t\tmap.add(\"adIds\", id.toString());\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.hasMultimedia != null) \tmap.add(\"hasMultimedia\", this.getHasMultimedia().toString());\r\n\t\t\r\n\t\treturn map;\r\n\t}",
"java.util.Map<java.lang.String, java.lang.String>\n getVarsMap();",
"public abstract Map<String,List<Parameter>> getWorkflowParameters();",
"@Override\n public Map<String, Object> getConfigParams() {\n return null;\n }",
"public abstract ImmutableMap<String, ParamInfo> getParamInfos();",
"public Map<String, String[]> getParaMap() {\n\t\treturn request.getParameterMap();\n\t}",
"Map<String, Object> exportConfiguration();",
"Map<String, Object> getPropertiesAsMap();",
"public Map getParameterMap() {\n return params;\n }",
"public Map<String,String[]> getParameterMap() {\n if (isMultipart()) {\n Map parameterMap = new HashMap();\n Enumeration names = this.multipart.getParameterNames();\n \n while (names.hasMoreElements()) {\n String name = (String) names.nextElement();\n parameterMap.put(name, getParameterValues(name));\n }\n \n return parameterMap;\n }\n else {\n return super.getParameterMap();\n }\n }",
"Map<String, String> getProperties();",
"Map<String, String> getProperties();",
"Map<String, String> properties();",
"Map<String, String> properties();",
"@Override\n\tpublic Map getParameterMap() {\n\t\treturn null;\n\t}",
"public List<Map> getAllParameters() {\n List<Map> allProductParameters = new ArrayList<Map>();\n if (processorParametres != null) allProductParameters.add(processorParametres);\n if (sellerParametres != null) allProductParameters.add(sellerParametres);\n if (storageParametres != null) allProductParameters.add(storageParametres);\n\n return allProductParameters;\n }",
"ParamMap createParamMap();",
"public Map getParameterMap()\r\n {\r\n Map copyMap = new HashMap(this.parameters.size());\r\n copyMap.putAll(this.parameters);\r\n return copyMap;\r\n }",
"public Map<String, String> params() {\n return Collections.unmodifiableMap(params);\n }",
"Map<String, Object> properties();",
"public Map<String, Object> getParameterMap() {\n\t\treturn queryParameters;\n\t}",
"@Override\n\tpublic Map<String, String> getConfig() {\n\t\treturn null;\n\t}",
"List<Map<String,Object>> getConfigList(Request request, String configtype);",
"@Override\n\tpublic Map<String, String> getConf() {\n\t\treturn null;\n\t}",
"private Map<String,Object> buildParamsMap(Map<String, Object> map, HostelDTO hostelDTO){\r\n\t\tmap.put(\"hostelName\", hostelDTO.getHostelName());\r\n\t\tmap.put(\"adrStreet\", hostelDTO.getAdrStreet());\r\n\t\tmap.put(\"adrCity\", hostelDTO.getAdrCity());\r\n\t\tmap.put(\"adrState\", hostelDTO.getAdrState());\r\n\t\tmap.put(\"adrPostalCode\", hostelDTO.getAdrPostalCode());\r\n\t\tmap.put(\"adrCountry\", hostelDTO.getAdrCountry());\r\n\t\tmap.put(\"phone\", hostelDTO.getPhone());\r\n\t\tmap.put(\"email\", hostelDTO.getEmail());\r\n\t\tmap.put(\"facebook\", hostelDTO.getFacebook());\r\n\t\tmap.put(\"web\", hostelDTO.getWeb());\r\n\t\tmap.put(\"checkInTime\", hostelDTO.getCheckInTime());\r\n\t\tmap.put(\"checkOutTime\", hostelDTO.getCheckOutTime());\r\n\t\tmap.put(\"smoking\", hostelDTO.getSmoking());\r\n\t\tmap.put(\"alcohol\", hostelDTO.getAlcohol());\r\n\t\tmap.put(\"orderCancellationHoursLimit\", hostelDTO.getOrderCancellationHoursLimit());\r\n\t\tmap.put(\"cancellationFeePercant\", hostelDTO.getCancellationFeePercant());\t\r\n\t\treturn map;\r\n\t}",
"java.util.Map<java.lang.String, java.lang.String>\n getAppClientParas();",
"public Map<String, Object> getInfo();",
"public Map getParameters() {\r\n\t\treturn parameters;\r\n\t}",
"public Map<String, InterceptABTestModel> getConfigMap() {\n return Collections.unmodifiableMap(configMap);\n }",
"public Map<String, String> getParameters() {\r\n return _parameters;\r\n }",
"public Map<String, String> getParametres() {\n Map<String, String> resultat = new HashMap<>();\n if (parent != null) {\n resultat = parent.getParametres();\n }\n else {\n resultat = new HashMap<>();\n }\n for (String clef : parametresLocaux.keySet()) {\n resultat.put(clef, parametresLocaux.get(clef));\n }\n return resultat;\n }",
"Map<String, Object> readConfig(Request request, String id);",
"@Override\n\tpublic Map<String, String[]> getParameterMap() {\n\t\tMap<String, String[]> paramMap = super.getParameterMap();\n\t Set<String> keySet = paramMap.keySet();\n\t for (Iterator<String> iterator = keySet.iterator(); iterator.hasNext();) {\n\t String key = (String) iterator.next();\n\t String[] str = paramMap.get(key);\n\t\t\t\tfor(int i=0; i<str.length; i++) {\n\t\t\t\t\tstr[i] = encodeXSS(str[i]);\n\t//这里可以对页面传入的所有值进行过滤了,你想怎么处理就怎么处理。比如对出入的值进行html危险字符过滤\n\t }\n\t }\n\t return paramMap ;\n\t}",
"Map<String, List<String>> getElementBaseConfigurationOptions();",
"@Override\n\n public java.util.Map<String, String> getOptionsMap() {\n return internalGetOptions().getMap();\n }",
"@Override\n\n public java.util.Map<String, String> getOptionsMap() {\n return internalGetOptions().getMap();\n }",
"@Override\n\n public java.util.Map<String, String> getOptionsMap() {\n return internalGetOptions().getMap();\n }",
"public Map<String, List<String>> parameters() {\n return parameters;\n }",
"Map<String, String> asMap();",
"protected Map createPropertiesMap() {\n return new HashMap();\n }",
"public Map<String, Object> map() {\n Map<String, Object> tomcatInstanceMap = new HashMap<>();\n tomcatInstanceMap.put(\"instanceUUID\", tomcatInstanceUUID);\n tomcatInstanceMap.put(\"instanceName\", instanceName);\n tomcatInstanceMap.put(\"environmentName\", environmentName);\n tomcatInstanceMap.put(\"tomcatVersion\", tomcatVersion);\n tomcatInstanceMap.put(\"destinationFolder\", destinationFolder.getAbsolutePath());\n tomcatInstanceMap.put(\"compressed\", compressed);\n tomcatInstanceMap.put(\"primaryPort\", primaryPort);\n tomcatInstanceMap.put(\"protocolPrimaryPort\", protocolPrimaryPort);\n tomcatInstanceMap.put(\"shutdownPort\", shutdownPort);\n tomcatInstanceMap.put(\"ajpPort\", ajpPort);\n tomcatInstanceMap.put(\"secureInstance\", secureInstance);\n tomcatInstanceMap.put(\"securePort\", securePort);\n tomcatInstanceMap.put(\"protocolSecurePort\", protocolSecurePort);\n tomcatInstanceMap.put(\"keystoreSourceFilename\", keystoreSourceFilename);\n tomcatInstanceMap.put(\"keystoreCredentials\", keystoreCredentials);\n tomcatInstanceMap.put(\"jvmOptionXms\", jvmOptionXms);\n tomcatInstanceMap.put(\"jvmOptionXmx\", jvmOptionXmx);\n tomcatInstanceMap.put(\"jvmOptionXss\", jvmOptionXss);\n tomcatInstanceMap.put(\"jvmOptionXXMaxMetaspaceSize\", jvmOptionXXMaxMetaspaceSize);\n tomcatInstanceMap.put(\"jvmOptions\", jvmOptions);\n tomcatInstanceMap.put(\"instanceManagement\", instanceManagement);\n /**\n * Serialize our Instance Management Properties\n */\n List<Map<String,String>> instanceManagementPropertiesMapList =\n new ArrayList<>(instanceManagementProperties.size());\n for(TomcatInstanceProperty tomcatInstanceProperty : instanceManagementProperties) {\n instanceManagementPropertiesMapList.add(tomcatInstanceProperty.map());\n }\n tomcatInstanceMap.put(\"instanceManagementProperties\", instanceManagementPropertiesMapList);\n /**\n * Serialize our Instance Properties\n */\n List<Map<String,String>> instancePropertiesMapList =\n new ArrayList<>(instanceProperties.size());\n for(TomcatInstanceProperty tomcatInstanceProperty : instanceProperties) {\n instancePropertiesMapList.add(tomcatInstanceProperty.map());\n }\n tomcatInstanceMap.put(\"instanceProperties\", instancePropertiesMapList);\n /**\n * Return the Map for Persisting as YAML.\n */\n return tomcatInstanceMap;\n }",
"default Map<String, Object> getProperties()\r\n {\r\n return emptyMap();\r\n }",
"private Map<String, String> paramHandler(Map<String, String> params){\n\t\t\n\t\treturn params;\n\t}",
"public Map<String, List<BaiduZhannei>> buildSitemap() {\r\n Map<String, List<BaiduZhannei>> map = new HashMap<String, List<BaiduZhannei>>();\r\n map.put(GlobalConfigHolder.DOMAIN_TYPE_QUESTION, buildQuestion());\r\n// map.put(GlobalConfigHolder.DOMAIN_TYPE_TOPIC, buildTopic(GlobalConfigHolder.SITEMAP_COUNT));\r\n// map.put(GlobalConfigHolder.DOMAIN_TYPE_BLOG, buildBlog());\r\n\r\n return map;\r\n }",
"ProcessOperation<Map<String, Object>> map();",
"@Override\n\n public java.util.Map<String, String> getOptionsMap() {\n return internalGetOptions().getMap();\n }",
"@Override\n\n public java.util.Map<String, String> getOptionsMap() {\n return internalGetOptions().getMap();\n }",
"@Override\n\n public java.util.Map<String, String> getOptionsMap() {\n return internalGetOptions().getMap();\n }",
"private Map<String,Object> getParams(String nombre , int id){\n\t\t\tMap <String,Object> mapa;\n\t\t\tmapa = new HashMap<String,Object>();\n\t\t\t//Pasar parametros en de JasperReport\n\t\t\tmapa.put(\"alumnoNombre\", nombre);\n\t\t\tmapa.put(\"alumnoId\", id);\n\t\t\t\n\t\t\treturn mapa;\n\t\t\t\n\t\t}",
"java.util.Map<java.lang.String, java.lang.String>\n getMetadataMap();",
"java.util.Map<java.lang.String, java.lang.String>\n getMetadataMap();",
"protected Map<String,String> getParametersMap(HttpServletRequest request) {\n\t\tMap<String,String> map = new HashMap<String,String>();\n\t\t\n\t\tEnumeration<String> paramNames = request.getParameterNames() ;\n\t\t\n\t\twhile ( paramNames.hasMoreElements() ) {\n\t\t\tString name = paramNames.nextElement() ;\n\t\t\tString value = request.getParameter(name) ;\n\t\t\tmap.put(name, value);\n\t\t}\n\t\treturn map ;\n\t}",
"java.util.Map<java.lang.String, java.lang.String>\n getDetailsMap();",
"Map<String, String> mo14888a();",
"private Map getAsMap(BuildStatus bs) {\n String lines[] = bs.toExternalForm().split(\"\\n\");\n Map m = new HashMap();\n for (int i = 0; i < lines.length; i++) {\n String line = lines[i];\n String parts[] = line.split(\"=\");\n String name = parts[0];\n String value = parts[1];\n m.put(name + \"=\", value);\n }\n return m;\n }",
"@Override\n protected TreeMap<String, String> getCommonParamMap() {\n TreeMap commonParam = new TreeMap();\n commonParam.put(\"clintInfo\", getClientInfo());\n if(!TextUtils.isEmpty(SharedPreferencesUtil.getString(KeelApplication.getApplicationConext(),\"sessionid\"))){\n commonParam.put(\"sessionid\", SharedPreferencesUtil.getString(KeelApplication.getApplicationConext(),\"sessionid\"));\n }\n// commonParam.put(\"platformType\", \"2\");\n// commonParam.put(\"ver\", version);\n return commonParam;\n }",
"private HashMap<String, String> returnCorrectMap(String...parameters) {\n\n\t\tHashMap<String, String> map = null;\n\n\t\ttry {\n\n\t\t\tmap = generateHashMapFromStringList(parameters);\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn map;\n\t}",
"Map<String, Object> exportDefaultConfiguration();",
"public List<PmPropertyBean> getProperties(Map paramter);",
"public Map<Object, Object> getExtraMap() {\n return extraMap;\n }",
"private static Map<String, PropertyInfo> createPropertyMap()\r\n {\r\n Map<String, PropertyInfo> map = New.map();\r\n PropertyInfo samplingTime = new PropertyInfo(\"http://www.opengis.net/def/property/OGC/0/SamplingTime\", Date.class,\r\n TimeKey.DEFAULT);\r\n PropertyInfo lat = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Latitude\", Float.class, LatitudeKey.DEFAULT);\r\n PropertyInfo lon = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Longitude\", Float.class, LongitudeKey.DEFAULT);\r\n PropertyInfo alt = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Altitude\", Float.class, AltitudeKey.DEFAULT);\r\n map.put(samplingTime.getProperty(), samplingTime);\r\n map.put(lat.getProperty(), lat);\r\n map.put(lon.getProperty(), lon);\r\n map.put(alt.getProperty(), alt);\r\n map.put(\"lat\", lat);\r\n map.put(\"lon\", lon);\r\n map.put(\"alt\", alt);\r\n return Collections.unmodifiableMap(map);\r\n }",
"java.util.Map<java.lang.String, java.lang.String>\n getDetailsMap();",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"pasien\", pasien);\n\n return params;\n }",
"public Map<String, String> toMap() {\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"id\", id + \"\");\n map.put(\"name\", name);\n map.put(\"value\", value);\n map.put(\"type\", type);\n map.put(\"description\", description);\n\n return map;\n\n }",
"Map<String, Defines> getDefinesMap();",
"@Override\n\tpublic Map loadMap() {\n\t\ttry {\n\t\t\treturn XMLDeserialiser.loadMap();\n\t\t} catch (XMLException e) {\n\t\t\tPopup.showInformation(\"Le fichier choisi n'est pas un plan valide.\");\n\t\t\treturn null;\n\t\t} catch (NoFileChosenException e) {\n\t\t\treturn null;\n\t\t}\n\t}",
"protected Map<String, String> getStatisticsServiceParameters(IPluginConfig config) {\n if (!config.containsKey(STATISTICS_SERVICE_PARAMETER_NAMES) || !config.containsKey(STATISTICS_SERVICE_PARAMETER_VALUES)) {\n return new HashMap<String, String>();\n }\n\n String[] parameterNames = config.getStringArray(STATISTICS_SERVICE_PARAMETER_NAMES);\n String[] parameterValues = config.getStringArray(STATISTICS_SERVICE_PARAMETER_VALUES);\n\n if (parameterNames == null || parameterValues == null || parameterNames.length != parameterValues.length) {\n log.warn(\"Service parameter names/values are misconfigured\");\n return new HashMap<String, String>();\n }\n\n Map<String, String> statisticsServiceParameters = new HashMap<String, String>();\n for (int i = 0; i < parameterNames.length; i++) {\n statisticsServiceParameters.put(parameterNames[i], parameterValues[i]);\n }\n\n return statisticsServiceParameters;\n }",
"public Map<String, Object> getParameters() {\n return this.parameters;\n }",
"public abstract Map<String, Serializable> toMap();",
"@NonNull\n public Map<String, Object> getParameters() {\n return parameters;\n }",
"public Set<ConfigMapDTO> getMapProperties() {\n \t\treturn new HashSet<ConfigMapDTO>(mapProperties.values());\n \t}",
"public Map<String, String> getParameters()\n {\n return prmCache;\n }",
"Map<String, String> getEndpointMap();",
"@Override\n\tpublic Map<String, String> getConfigParams(IFloodlightModule module) {\n\t Map<String, String> retMap = configParams.get(module.getClass());\n\t if (retMap == null) {\n\t // Return an empty map if none exists so the module does not\n\t // need to null check the map\n\t retMap = new HashMap<String, String>();\n\t configParams.put(module.getClass(), retMap);\n\t }\n\n\t // also add any configuration parameters for superclasses, but\n\t // only if more specific configuration does not override it\n\t for (Class<? extends IFloodlightModule> c : configParams.keySet()) {\n\t if (c.isInstance(module)) {\n\t for (Map.Entry<String, String> ent : configParams.get(c).entrySet()) {\n\t if (!retMap.containsKey(ent.getKey())) {\n\t retMap.put(ent.getKey(), ent.getValue());\n\t }\n\t }\n\t }\n\t }\n\n\t return retMap;\n\t}",
"public Map<String, String> paramap(String...params) {\n\t\t\tMap<String, String> map = new HashMap<String, String>();\n\t\n\t\t\tfor(String p : params) {\n\t\t\t\tmap.put(p, parameters.get(p));\n\t\t\t}\n\n\t\t\treturn map;\n\t}",
"public Map getParams() {\n\t\treturn _params;\n\t}",
"@Override\n public void setParameterMap(Map arg0) {\n\n }",
"Map<Class<?>, Object> yangAugmentedInfoMap();"
] |
[
"0.7000807",
"0.6894054",
"0.6876894",
"0.6850068",
"0.6850068",
"0.6829174",
"0.67181253",
"0.66955",
"0.66955",
"0.66955",
"0.65510035",
"0.6526491",
"0.65232927",
"0.65155363",
"0.6498471",
"0.6462993",
"0.64177793",
"0.6359433",
"0.63436717",
"0.63358283",
"0.63358283",
"0.6316321",
"0.63046515",
"0.629639",
"0.6290527",
"0.6278643",
"0.62678796",
"0.6261127",
"0.62535185",
"0.62455434",
"0.62265044",
"0.62246984",
"0.6206942",
"0.6206942",
"0.61595947",
"0.61595947",
"0.6127744",
"0.61120045",
"0.61052287",
"0.609872",
"0.6094061",
"0.60708165",
"0.6061818",
"0.6030331",
"0.60269237",
"0.6007846",
"0.5997091",
"0.5996964",
"0.5995616",
"0.5991134",
"0.5984535",
"0.59772956",
"0.59536576",
"0.5932796",
"0.58902323",
"0.58748466",
"0.58676475",
"0.58676475",
"0.58676475",
"0.58587325",
"0.5854258",
"0.5848024",
"0.584079",
"0.5839915",
"0.5837151",
"0.58323014",
"0.58246475",
"0.5815974",
"0.5815974",
"0.5815974",
"0.5815406",
"0.58073884",
"0.58073884",
"0.58015054",
"0.580102",
"0.5799548",
"0.5792",
"0.57893944",
"0.5789273",
"0.57729965",
"0.5772281",
"0.57658523",
"0.5758159",
"0.5758098",
"0.5756645",
"0.5752571",
"0.5749443",
"0.5716922",
"0.57165515",
"0.5712116",
"0.57032734",
"0.5699475",
"0.56984365",
"0.5696086",
"0.5691564",
"0.5686073",
"0.56810385",
"0.56808823",
"0.56752133",
"0.5668742"
] |
0.78425467
|
0
|
Getters & Setters Visita
|
public String getEmpresa() {
return empresa;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public int getTipoAtaque(){return tipoAtaque;}",
"@Override // Métodos que fazem a anulação\n\tpublic void getBonificação() {\n\t\t\n\t}",
"public String getValor()\n/* 17: */ {\n/* 18:27 */ return this.valor;\n/* 19: */ }",
"public void setNombre(String nombre) {this.nombre = nombre;}",
"@Override // Métodos que fazem a anulação\n\tpublic void vota() {\n\t\t\n\t}",
"public String getNome () { return this.nome; }",
"public int getArmadura(){return armadura;}",
"public int getAge() {return age;}",
"public String getNombre(){\n return nombre;\n }",
"public Visita() {\n initialize();\n }",
"public IzvajalecZdravstvenihStoritev() {\n\t}",
"public String getNombre()\r\n/* 17: */ {\r\n/* 18:41 */ return this.nombre;\r\n/* 19: */ }",
"public String getVigencia() { return this.vigencia; }",
"public int getEva(){\n return eva;\n }",
"public void setNombre(String nombre){\n this.nombre =nombre;\n }",
"public int getlife(){\r\n return life;\r\n}",
"public String getNombre(){\n return nombre;\n }",
"public String getnombre(){\n return nombre;\n }",
"public String getNombre()\r\n/* 60: */ {\r\n/* 61: 67 */ return this.nombre;\r\n/* 62: */ }",
"public void setNombre(String nombre) {\r\n\tthis.nombre = nombre;\r\n}",
"@Override\r\n\tpublic void get() {\n\t\t\r\n\t}",
"public String getNombre(){\r\n return nombre;\r\n }",
"public VisObject getVis();",
"public String getNombre() {return nombre;}",
"public String getNome(){\r\n return this.nome;\r\n }",
"Objet getObjetAlloue();",
"public PuntoDeVenta getPuntoDeVenta()\r\n/* 140: */ {\r\n/* 141:162 */ return this.puntoDeVenta;\r\n/* 142: */ }",
"@Override\n public void get() {}",
"protected abstract Set method_1559();",
"public String getNombre()\r\n/* 113: */ {\r\n/* 114:204 */ return this.nombre;\r\n/* 115: */ }",
"public V get() {\n return value;\n }",
"public String getNombre(){\n return nombre;\n }",
"public String getNombre(){\n return nombre;\n }",
"public biz.belcorp.www.canonico.ffvv.vender.TEstadoPedido getEstado(){\n return localEstado;\n }",
"public void setdat()\n {\n }",
"public String getNome(){\r\n return nome;\r\n }",
"public ObjetoVida getObjeto(){\r\n\t\treturn objeto;\r\n\t}",
"protected Visualizer getVis() {\n\t\treturn myVis;\n\t}",
"@Override\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" UML Marker \"> \n // #[regen=yes,id=DCE.E1700BD9-298C-DA86-4BFF-194B41A6CF5E]\n // </editor-fold> \n protected String getProperties() {\n\n return \"Size = \" + size + \", Index = \" + value;\n\n }",
"public void get() {\n }",
"public String getNome(){\n return this.nome;\n }",
"public ValorVariavel() {\r\n }",
"public String getEtiqueta()\n/* 27: */ {\n/* 28:41 */ return this.etiqueta;\n/* 29: */ }",
"public void asetaTeksti(){\n }",
"public int getAge(){\n return age;\n }",
"@Test\r\n\tpublic void testGettersSetters()\r\n\t{\r\n\t\tPerson p = new Person(42);\r\n\t\tp.setDisplayName(\"Fred\");\r\n\t\tassertEquals(\"Fred\", p.getFullname());\r\n\t\tp.setPassword(\"hunter2\");\r\n\t\tassertEquals(\"hunter2\", p.getPassword());\r\n\t\tassertEquals(42, p.getID());\r\n\t}",
"public Empleado getEmpleado()\r\n/* 183: */ {\r\n/* 184:337 */ return this.empleado;\r\n/* 185: */ }",
"public int get () { return rating; }",
"@Override\r\n\tprotected void initVentajas() {\n\r\n\t}",
"public String getNombre(){\n\treturn this.nombre;\n }",
"public int getAyudantes(){\n return ayudantes; \n }",
"public void setAge(int age) { this.age = age; }",
"public String getNombre() {\n return nombre;\n\n }",
"public int getAnio(){\r\n \r\n \r\n return this.anio;\r\n \r\n }",
"public void setVigencia(String vigencia) { this.vigencia = vigencia; }",
"public String get();",
"public int getAge()\r\n {\r\n return age;\r\n }",
"public String getNombre () {\n return nombre;\n }",
"@Override\n String get();",
"public int getLives(){return lives;}",
"public Punto getCentro() {\r\n\treturn centro;\r\n}",
"Object getValor();",
"public int getAge()\n {\n return age;\n }",
"public Empresa getEmpresa()\r\n/* 84: */ {\r\n/* 85:131 */ return this.empresa;\r\n/* 86: */ }",
"@Override\n protected void getExras() {\n }",
"public String getNombre()\n {\n return nombre;\n }",
"public String getNombre()\n {\n return nombre;\n }",
"public NodoListaObjetos getSiguiente(){\r\n return siguiente;\r\n }",
"public Dipendente() {\r\n\t\tsetnMat();\r\n\t}",
"public int getNOficina ()\r\n {\r\n return this.nOficina;\r\n }",
"public void setGender(Gender_Tp gender) { this.gender = gender; }",
"public int getModopelea(){return modopelea;}",
"protected T getManusia(){\r\n return Manusia;\r\n }",
"public String getSex(){ //\"public\" access allows other classes to retrieve the value of \"sex\", but since there\n // is no setter it cannot be changed from outside the class = Encapsulation/Inkapsling\n return this.sex;\n }",
"public int getValeur() {\r\n return valeur;\r\n }",
"public Genero getGenero()\r\n/* 143: */ {\r\n/* 144:261 */ return this.genero;\r\n/* 145: */ }",
"public int getTamanio(){\r\n return tamanio;\r\n }",
"void setVisivel(boolean visivel);",
"public ConversorVelocidad() {\n //setTemperaturaConvertida(0);\n }",
"public VotacaoSegundoDia() {\n\n\t}",
"protected int getTreinAantal(){\r\n return treinaantal;\r\n }",
"public String getEstablecimiento()\r\n/* 114: */ {\r\n/* 115:188 */ return this.establecimiento;\r\n/* 116: */ }",
"@Override\r\n\tpublic String getIzena() {\n\t\treturn super.getIzena();\r\n\t}",
"public java.lang.String getObservacion(){\n return localObservacion;\n }",
"public V get19();",
"Nodo_B getPrimero(){\n return this.primero;\n }",
"private DittaAutonoleggio(){\n \n }",
"public VPacientes() {\n initComponents();\n inicializar();\n }",
"public Student getStudent() { return student; }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"public Age getAge() {\n return age;\n }",
"@Test\r\n public void testSetMiservicio() {\r\n System.out.println(\"setMiservicio\");\r\n Servicio miservicio = new Servicio();\r\n miservicio.descripcion=\"gestion de vigilancia\";\r\n Servicio_CentroEcu instance = new Servicio_CentroEcu();\r\n instance.setMiservicio(miservicio);\r\n assertEquals(instance.getMiservicio().descripcion, \"gestion de vigilancia\");\r\n }",
"public String getLugarVisita() {\n return lugarVisita.get();\n }",
"public void mostrarPersona(){\r\n System.out.println(\"Nombre: \" + persona.getNombre());\r\n System.out.println(\"Cedula: \" + persona.getCedula());\r\n }",
"void setVida(int vida)\n\t{\n\t\t// variable declarada anteriormente igual a la declarada en el set\n\t\tthis.vida = vida;\n\t}",
"public int getVx() { return vx; }",
"public String getTelefono() {\r\n\treturn telefono;\r\n}",
"String getEmpresa() {\n return empresa; //To change body of generated methods, choose Tools | Templates.\n }",
"public int getVelocidadBala() {\n return velocidadBala;\n }",
"public Ventas() {\n setIdVenta(1);\n setIdCliente(1);\n setFecha(new Date());\n setEstado(0); \n }",
"public String getNombre()\r\n {\r\n return nombre;\r\n }"
] |
[
"0.62982506",
"0.62739486",
"0.61059433",
"0.608961",
"0.60813326",
"0.60787773",
"0.60725355",
"0.60709447",
"0.6060125",
"0.6054209",
"0.60531884",
"0.6050813",
"0.6033882",
"0.6027601",
"0.6022055",
"0.60144204",
"0.6013196",
"0.6009776",
"0.59927446",
"0.59914434",
"0.59844494",
"0.59747547",
"0.5971267",
"0.5955489",
"0.59535205",
"0.59489775",
"0.5947252",
"0.59465355",
"0.59457755",
"0.5944982",
"0.59367454",
"0.59353685",
"0.59353685",
"0.5931561",
"0.5919642",
"0.59167296",
"0.59009874",
"0.5896318",
"0.5891844",
"0.5886994",
"0.58652294",
"0.5863613",
"0.5856612",
"0.5848704",
"0.5831287",
"0.58236444",
"0.58158785",
"0.58086395",
"0.58050996",
"0.57985765",
"0.5793448",
"0.5790367",
"0.5786236",
"0.5784891",
"0.5781762",
"0.5775033",
"0.57679355",
"0.57633823",
"0.5761298",
"0.57497436",
"0.5745837",
"0.5736863",
"0.5735807",
"0.57348317",
"0.57322675",
"0.5730506",
"0.5730506",
"0.57170206",
"0.5716002",
"0.5713976",
"0.570959",
"0.5706104",
"0.5697004",
"0.56893367",
"0.56880033",
"0.56861776",
"0.56795347",
"0.56768095",
"0.5675207",
"0.56679296",
"0.5665582",
"0.565995",
"0.56555384",
"0.5653588",
"0.56489193",
"0.56434155",
"0.5640077",
"0.5634998",
"0.562876",
"0.56272185",
"0.5622626",
"0.5621237",
"0.5618661",
"0.56176114",
"0.56136006",
"0.5612673",
"0.56044763",
"0.56034505",
"0.56003034",
"0.55988127",
"0.5595379"
] |
0.0
|
-1
|
List of ospfilter (ONLY FOR 2 DAYS, 7 Days,)
|
@RequestMapping(value="/ospfilter/{type}",method=RequestMethod.GET)
public List<Map<String, String>> ospDetails(@PathVariable String type)
{
return ospServiceServiceImpl.ospDetails(type);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"boolean isFilterByDate();",
"public List<RefineriesFilter> getRefineriesFilter();",
"List<Condition> composeFilterConditions(F filter);",
"public ArrayList<CampusEvent> eventListFilter (ArrayList<CampusEvent> campusEvents, Filters filter) {\n ArrayList<CampusEvent> newList = new ArrayList<CampusEvent>();\n //if all the filters are zero, return original list\n Log.d(Globals.TAGG, \"Showing what the filters are\");\n\n if (filter == null) {\n Log.d(Globals.TAGG, \"All filters are null\");\n return campusEvents;\n } else {\n if (filter.getfFood() == 0 && filter.getfEventType() == 0 && filter.getfProgramType() == 0 && filter.getfGender() == 0 && filter.getfGreekSociety() == 0 && filter.getfMajor() == 0 && filter.getfYear() == 0) {\n return campusEvents;\n }\n if (filter.getfFood() != 0) {\n for (CampusEvent event : campusEvents) {\n int scaleval = filter.getfFood() - 1;\n if (event.getFood() == scaleval) {\n newList.add(event);\n }\n }\n }\n if (filter.getfEventType() != 0) {\n for (CampusEvent event : campusEvents) {\n int scaleval = filter.getfEventType() - 1;\n if (event.getEventType() == scaleval) {\n newList.add(event);\n }\n }\n }\n\n if (filter.getfProgramType() != 0) {\n for (CampusEvent event : campusEvents) {\n if (event.getProgramType() == filter.getfProgramType()) {\n newList.add(event);\n }\n }\n }\n\n if (filter.getfYear() != 0) {\n for (CampusEvent event : campusEvents) {\n if (event.getYear() == filter.getfYear()) {\n newList.add(event);\n }\n }\n }\n\n if (filter.getfMajor() != 0) {\n for (CampusEvent event : campusEvents) {\n if (event.getMajor() == filter.getfMajor()) {\n newList.add(event);\n }\n }\n }\n\n if (filter.getfGender() != 0) {\n for (CampusEvent event : campusEvents) {\n if (event.getGender() == filter.getfGender()) {\n newList.add(event);\n }\n }\n }\n\n if (filter.getfGreekSociety() != 0) {\n for (CampusEvent event : campusEvents) {\n if (event.getGreekSociety() == filter.getfGreekSociety()) {\n newList.add(event);\n }\n }\n }\n\n return newList;\n }\n }",
"@RequestMapping(\n value = \"/{start}/{end}\",\n method = RequestMethod.GET\n )\n public final Iterable<Entry> filter(\n @PathVariable @DateTimeFormat(iso = ISO.DATE) final Date start,\n @PathVariable @DateTimeFormat(iso = ISO.DATE) final Date end\n ) {\n if (end.before(start)) {\n throw new IllegalArgumentException(\"Start date must be before end\");\n }\n final List<Entry> result = new LinkedList<Entry>();\n List<Entry> entries = SecurityUtils.actualUser().getEntries();\n if (entries == null) {\n entries = Collections.emptyList();\n }\n for (final Entry entry : entries) {\n if (entry.getDate().after(start)\n && entry.getDate().before(end)) {\n result.add(entry);\n }\n }\n return result;\n }",
"List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter2, Predicate<DeviceDetails> deviceFilter3);",
"public List<COSName> getFilters() {\n/* 312 */ List<COSName> retval = null;\n/* 313 */ COSBase filters = this.stream.getFilters();\n/* 314 */ if (filters instanceof COSName) {\n/* */ \n/* 316 */ COSName name = (COSName)filters;\n/* 317 */ retval = new COSArrayList<COSName>(name, (COSBase)name, (COSDictionary)this.stream, COSName.FILTER);\n/* */ }\n/* 319 */ else if (filters instanceof COSArray) {\n/* */ \n/* 321 */ retval = ((COSArray)filters).toList();\n/* */ } \n/* 323 */ return retval;\n/* */ }",
"private ArrayList<Task> filterByDate(ArrayList<Task> toFilter, Date date) {\n ArrayList<Integer> toDelete = new ArrayList<Integer>();\n Calendar calAim = Calendar.getInstance();\n Calendar calTest = Calendar.getInstance();\n calAim.setTime(date);\n\n //remove all on different dates\n for (int i = 0; i < toFilter.size(); i++) {\n if (toFilter.get(i).getClass().equals(Deadline.class)) {\n Deadline temp = (Deadline) toFilter.get(i);\n calTest.setTime(temp.getTime());\n } else if (toFilter.get(i).getClass().equals(Event.class)) {\n Event temp = (Event) toFilter.get(i);\n calTest.setTime(temp.getTime());\n } else if (toFilter.get(i).getClass().equals(Period.class)) {\n Period temp = (Period) toFilter.get(i);\n calTest.setTime(temp.getStart());\n }\n boolean sameDay = calAim.get(Calendar.DAY_OF_YEAR) == calTest.get(Calendar.DAY_OF_YEAR)\n && calAim.get(Calendar.YEAR) == calTest.get(Calendar.YEAR);\n if (!sameDay) {\n toDelete.add(i);\n }\n }\n\n for (int i = toDelete.size() - 1; i >= 0; ) {\n toFilter.remove((int) toDelete.get(i));\n i--;\n }\n return toFilter;\n }",
"List<String> getFilters();",
"private Filter ssoFilter() {\n\t\tCompositeFilter filter = new CompositeFilter();\n\t\tList<Filter> filters = new ArrayList<>();\n\t\tfilters.add(ssoFilter(facebook(), \"/login/facebook\"));\n\t\tfilters.add(ssoFilter(github(), \"/login/github\"));\n//\t\tfilters.add(ssoFilter(twitter(), \"/login/twitter\"));\n\t\tfilters.add(ssoFilter(linkedin(), \"/login/linkedin\"));\n\t\tfilter.setFilters(filters);\n\t\treturn filter;\n\t}",
"public List getCalendarios(Map criteria);",
"private void addDateRangeFiltering(Map params, String dateProperty, Date startDate, Date endDate) {\n\n\t\t// date range filter is enabled\n\t\tif (dateProperty != null) {\n\n\t\t\tparams.put(IReportDAO.DATE_COLUMN, dateProperty);\n\t\t\tString check = (String) params.get(IReportDAO.DATE_COLUMN);\n\t\t\tif (check.equalsIgnoreCase(\"lastModifiedTime\")) {\n\t\t\t\t// from date\n\t\t\t\tparams.put(IReportDAO.FROM_DATE, null);\n\t\t\t\t// to date\n\t\t\t\tparams.put(IReportDAO.TO_DATE, null);\n\t\t\t} else {\n\t\t\t\t// from date\n\t\t\t\tparams.put(IReportDAO.FROM_DATE, startDate);\n\t\t\t\t// to date\n\t\t\t\tparams.put(IReportDAO.TO_DATE, endDate);\n\t\t\t}\n\n\t\t}\n\t}",
"List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter1);",
"private void filterData(String tit, String loc, String datef, String datet, String cat, String cou){\n String t = tit;\n String l = loc;\n String df = datef;\n String dt = datet;\n String c = cat;\n String country = cou;\n filteredData.clear();\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\", Locale.US);\n\n //All empty\n if(t.length() == 0 && country.length() == 0 && c.length() == 0){\n for(int i = 0; i < data.size(); i++){\n filteredData.add(data.get(i));\n }\n }\n\n //only title\n if(t.length() != 0 && country.length() == 0 && c.length() == 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getTitle().equals(t)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //only country\n if(t.length() == 0 && country.length() != 0 && c.length() == 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCountry().equals(country)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //only category\n if(t.length() == 0 && country.length() == 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCategory().equals(c)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //only date\n if(t.length() == 0 && country.length() == 0 && c.length() == 0 && df.length() != 0 && dt.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title and country\n if(t.length() != 0 && country.length() != 0 && c.length() == 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getTitle().equals(t) && data.get(i).getCountry().equals(country)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title and category\n if(t.length() != 0 && country.length() == 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCategory().equals(c) && data.get(i).getTitle().equals(t)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, date\n if(t.length() != 0 && country.length() == 0 && c.length() == 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //country, category\n if(t.length() == 0 && country.length() != 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCategory().equals(c) && data.get(i).getCountry().equals(country)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //country, date\n if(t.length() == 0 && country.length() != 0 && c.length() == 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getCountry().equals(country) && data.get(i).getTitle().equals(t) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //category, date\n if(t.length() == 0 && country.length() == 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getCategory().equals(c) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, country, category\n if(t.length() != 0 && country.length() != 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getTitle().equals(t) && data.get(i).getCountry().equals(country) && data.get(i).getCategory().equals(c)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, country, date\n if(t.length() != 0 && country.length() != 0 && c.length() == 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && data.get(i).getCountry().equals(country) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, category, date\n if(t.length() != 0 && country.length() == 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && data.get(i).getCategory().equals(c) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n\n //country, category, date\n if(t.length() == 0 && country.length() != 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getCategory().equals(c) && data.get(i).getCountry().equals(country) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, country, category and date\n if(t.length() != 0 && country.length() != 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && data.get(i).getCategory().equals(c) && data.get(i).getCountry().equals(country) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n }",
"public List<String> getFileFilters() {\n/* 420 */ List<String> retval = null;\n/* 421 */ COSBase filters = this.stream.getDictionaryObject(COSName.F_FILTER);\n/* 422 */ if (filters instanceof COSName) {\n/* */ \n/* 424 */ COSName name = (COSName)filters;\n/* 425 */ retval = new COSArrayList<String>(name.getName(), (COSBase)name, (COSDictionary)this.stream, COSName.F_FILTER);\n/* */ \n/* */ }\n/* 428 */ else if (filters instanceof COSArray) {\n/* */ \n/* */ \n/* 431 */ retval = COSArrayList.convertCOSNameCOSArrayToList((COSArray)filters);\n/* */ } \n/* 433 */ return retval;\n/* */ }",
"List<String> getActiveFilters();",
"private ArrayList<Event> getSemesterTwoEvents(EventList eventList) throws PacException {\n ArrayList<Event> list = new ArrayList<>();\n for (int i = 0; i < eventList.list.size(); i++) {\n Event event = eventList.find(i);\n if (event.dateTimeIsParsed()) {\n if (event.getMonth() > 0 && event.getMonth() < 7) {\n list.add(event);\n }\n }\n }\n return list;\n }",
"private void buildQueryFilterTemporal(String dateField,\n String startDate,\n String endDate,\n boolean isDatesContainedChecked,\n String namedTimescale, \n String namedTimescaleQueryType,\n TermsList termsList\n ) \n \t\tthrows UnsupportedEncodingException {\n\t boolean endDateSpecified = false;\n\t boolean startDateSpecified = false;\n\t \n /* If the user specified a named time-scale query, search for it\n * in the \"timescale\" field.\n */\n if ((namedTimescale != null) && (!(namedTimescale.equals(\"\")))) {\n termsList.addTerm(namedTimescale);\n String parenthesizedValue = parenthesizeQueryValue(namedTimescale);\n String escapedValue = Search.escapeQueryChars(parenthesizedValue);\n String encodedValue = URLEncoder.encode(escapedValue, \"UTF-8\");\n String timescaleQuery = String.format(\"timescale:%s\", encodedValue);\n updateQString(timescaleQuery);\n }\n \n if ((startDate == null) || (startDate.equals(\"\"))) {\n \tstartDate = \"*\";\n }\n else {\n startDate = ISO8601Utility.formatTimestamp(startDate, \"DAY\");\n if (startDate != null) startDateSpecified = true;\n }\n\n if ((endDate == null) || (endDate.equals(\"\"))) {\n \tendDate = \"NOW\";\n }\n else {\n \tendDate = ISO8601Utility.formatTimestamp(endDate, \"DAY\");\n \tif (endDate != null) endDateSpecified = true;\n }\n\n validateDateRange(startDate, endDate);\n \n // If a start date or an end date was specified, search temporal coverage\n //\n if (startDateSpecified || endDateSpecified) {\n \tString temporalFilter = null;\n \tString collectionFilter = null;\n \tString pubDateFilter = null;\n \tString LEFT_BRACKET = \"%5B\";\n \tString RIGHT_BRACKET = \"%5D\";\n\n if (dateField.equals(\"ALL\") || dateField.equals(\"COLLECTION\")) {\n \t String singleDateQuery = String.format(\"singledate:%s%s+TO+%s%s\", LEFT_BRACKET, startDate, endDate, RIGHT_BRACKET);\n \t String startDateQuery = String.format(\"begindate:%s*+TO+%s%s\", LEFT_BRACKET, endDate, RIGHT_BRACKET);\n \t String endDateQuery = String.format(\"enddate:%s%s+TO+NOW%s\", LEFT_BRACKET, startDate, RIGHT_BRACKET);\n \t collectionFilter = String.format(\"(%s+OR+(%s+AND+%s))\", singleDateQuery, startDateQuery, endDateQuery);\n }\n \n if (dateField.equals(\"ALL\") || dateField.equals(\"PUBLICATION\")) {\n \t pubDateFilter = String.format(\"pubdate:%s%s+TO+%s%s\", LEFT_BRACKET, startDate, endDate, RIGHT_BRACKET);\n }\n \n if (dateField.equals(\"ALL\")) {\n \t temporalFilter = String.format(\"(%s+OR+%s)\", pubDateFilter, collectionFilter);\n }\n else if (dateField.equals(\"COLLECTION\")) {\n \t temporalFilter = collectionFilter;\n }\n else if (dateField.equals(\"PUBLICATION\")) {\n \t temporalFilter = pubDateFilter;\n }\n \n updateFQString(temporalFilter); \n }\n\n }",
"@Override\n public void initFilter(final Object value) {\n setPeriod((Date[]) value);\n moPaneView.getFiltersMap().put(DGridConsts.FILTER_DATE_RANGE, getPeriod());\n }",
"List<Receta> getAll(String filter);",
"public static void main(String[] args) {\n System.out.println(\"hola la concha de tu madre\");\n Persona persona1 = new Persona(\"allan\",28,19040012);\n Persona persona2 = new Persona(\"federico\", 14,40794525);\n Persona persona3 = new Persona(\"pablito\", 66,56654456);\n\n List<Persona> personas= new ArrayList<Persona>();\n personas.add(persona1);\n personas.add(persona2);\n personas.add(persona3);\n\n System.out.println(\"--------Para imprimir la list completa--------\");\n System.out.println(String.format(\"Personas: %s\",personas));\n\n System.out.println(\"----------MAYORES A 21-------------\");\n // mayores a 21\n System.out.println(String.format(\"Mayores a 21: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21)\n .collect(Collectors.toList())));\n\n System.out.println(\"-----------MENORES A 18-------------------\");\n // menores 18\n System.out.println(String.format(\"menores 18: %s\",personas.stream()\n .filter(persona->persona.getEdad() < 18)\n .collect(Collectors.toList())));\n\n System.out.println(\"---------MAYORES A 21 + DNI >20000000 -------------------\");\n System.out.println(String.format(\"MAYORES A 21 + DNI >20000000: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21 && persona.getDni()>20000000)\n //.filter( persona->persona.getDni() >20000000) // tambien funciona con este\n .collect(Collectors.toList())));\n\n }",
"ExchangeRateDto getByDate(ExchangeRateDateFilter filter);",
"public List<COSName> getFilters()\n {\n COSBase filters = stream.getFilters();\n if (filters instanceof COSName)\n {\n return Collections.singletonList((COSName) filters);\n } \n else if (filters instanceof COSArray)\n {\n return (List<COSName>)((COSArray) filters).toList();\n }\n return Collections.emptyList();\n }",
"List<FormSubmit> selectListByFilter( ResponseFilter filter, Plugin plugin );",
"List<List<String>> getFilters(String resource);",
"List<ArticleDTO> getFilteredByTwo(ArticlesFilterDTO filterDTO) throws ApiException;",
"private static void addUserFilters() {\n List<FiltersByLocation> filtersByLocations=new ArrayList<>();\n List<String> listOfFilterNamesAlreadyAddedUnModified=HealthDataFilter.returnAllFilterNames();\n List<String> listOfFilterNamesAlreadyAdded=new ArrayList<>(listOfFilterNamesAlreadyAddedUnModified);\n\n Set <String> set1=new HashSet<>();\n set1.add(\"\");\n\n String whereForZipFilter1 = createWhereForZipFilter((HashSet<String>) set1);\n\n if (!listOfFilterNamesAlreadyAdded.contains(AppConstant.CURRENT_ZIP_CODE_FILTER_NAME)){\n filtersByLocations.add(new FiltersByLocation(AppConstant.CURRENT_ZIP_CODE_FILTER_NAME ,whereForZipFilter1));\n listOfFilterNamesAlreadyAdded.add(AppConstant.CURRENT_ZIP_CODE_FILTER_NAME);\n }\n\n Map<String, ?> userZipCodeFilters = PreferenceUtility.getUserZipCodeFilters();\n\n for (Map.Entry<String, ?> entry : userZipCodeFilters.entrySet()) {\n //Upper case\n String filterName=entry.getKey().substring(AppConstant.USER_PREF_ZIP_FILTER_PREFIX.length()).toUpperCase();\n String whereForZipFilter = createWhereForZipFilter((HashSet<String>) entry.getValue());\n if (!listOfFilterNamesAlreadyAdded.contains(filterName)){\n filtersByLocations.add(new FiltersByLocation(filterName,whereForZipFilter));\n }\n }\n }",
"public void filterByFoMostRece(){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n // get the mood's date\n dateOfMood = moodListBeforeFilterFo.getMoodEvent(i).getDateOfRecord();\n // if it within the range, then add it to the new list\n if (dateOfMood.compareTo(lowerBoundDATE) >= 0 && dateOfMood.compareTo(currentDATE) <= 0) {\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }\n }",
"@Override\n\tpublic List<FilterStock> today() {\n\t\treturn filterStockRepo.findToday();\n\t}",
"public List<JLeanConference>\r\n getFilteredLeanConferenceList(final String userToken,\r\n final String... filters) {\r\n System.out.println(\"Invoking getFilteredLeanConferenceList...\");\r\n logger.info(\"Invoking getFilteredLeanConferenceList...\");\r\n final JCredentials _getFilteredLeanConferenceList_credentials = new JCredentials();\r\n _getFilteredLeanConferenceList_credentials.setUserToken(userToken);\r\n final ConferenceFilter _getFilteredLeanConferenceList_filter = new ConferenceFilter();\r\n final JUIUtcDateTime dt = new JUIUtcDateTime();\r\n dt.setUnixTime(dt.getUnixTime());\r\n for(String filter : filters){\r\n \tString[] keyWordMap = filter.split(\":\");\r\n \tif (keyWordMap.length < 2) {\r\n \t\tcontinue;\r\n \t}\r\n \tif (\"confName\".equalsIgnoreCase(keyWordMap[0])) {\r\n \t\t_getFilteredLeanConferenceList_filter.setConfName(keyWordMap[1]);\r\n \t}\r\n \tif (\"confStatus\".equalsIgnoreCase(keyWordMap[0])) {\r\n \t\tif (\"future\".equalsIgnoreCase(keyWordMap[1])) {\r\n \t\t\t_getFilteredLeanConferenceList_filter.getAcceptableStates().add(JCMConferenceStatus.FUTURE);\r\n \t\t\t_getFilteredLeanConferenceList_filter.getAcceptableStates().add(JCMConferenceStatus.FUTURE___ALERTS);\r\n \t\t} else if (\"ongoing\".equalsIgnoreCase(keyWordMap[1])) {\r\n \t\t\t_getFilteredLeanConferenceList_filter.getAcceptableStates().add(JCMConferenceStatus.ACTIVE);\r\n \t\t\t_getFilteredLeanConferenceList_filter.getAcceptableStates().add(JCMConferenceStatus.ACTIVE___ALERTS);\r\n \t\t} else {\r\n \t\t\t_getFilteredLeanConferenceList_filter.getAcceptableStates().add(JCMConferenceStatus.DECLINED);\r\n \t\t\t_getFilteredLeanConferenceList_filter.getAcceptableStates().add(JCMConferenceStatus.DELETED);\r\n \t\t\t_getFilteredLeanConferenceList_filter.getAcceptableStates().add(JCMConferenceStatus.FINISHED);\r\n \t\t}\r\n \t}\r\n \tif (\"isAnytimeConf\".equalsIgnoreCase(keyWordMap[0])) {\r\n \t\t_getFilteredLeanConferenceList_filter.setAnytimeConf(Boolean.valueOf(keyWordMap[1]).booleanValue());\r\n \t\t_getFilteredLeanConferenceList_filter.setMinimumToken(Long.valueOf(0));\r\n \t}\r\n }\r\n \r\n final Boolean _getFilteredLeanConferenceList_includeMcuInfo = true;\r\n final Holder<List<JLeanConference>> _getFilteredLeanConferenceList_leanConferences = new Holder<List<JLeanConference>>();\r\n final Holder<Long> _getFilteredLeanConferenceList_token = new Holder<Long>();\r\n final JWebResult _getFilteredLeanConferenceList__return = port\r\n .getFilteredLeanConferenceList(_getFilteredLeanConferenceList_credentials,\r\n _getFilteredLeanConferenceList_filter,\r\n _getFilteredLeanConferenceList_includeMcuInfo,\r\n _getFilteredLeanConferenceList_leanConferences,\r\n _getFilteredLeanConferenceList_token);\r\n System.out.println(\"getFilteredLeanConferenceList.result=\"\r\n + _getFilteredLeanConferenceList__return);\r\n System.out\r\n .println(\"getFilteredLeanConferenceList._getFilteredLeanConferenceList_leanConferences=\"\r\n + _getFilteredLeanConferenceList_leanConferences.value);\r\n System.out\r\n .println(\"getFilteredLeanConferenceList._getFilteredLeanConferenceList_token=\"\r\n + _getFilteredLeanConferenceList_token.value);\r\n logger.info(\"getFilteredLeanConferenceList._getFilteredLeanConferenceList_leanConferences=\"\r\n + _getFilteredLeanConferenceList_leanConferences.value);\r\n return _getFilteredLeanConferenceList_leanConferences.value;\r\n }",
"void setFilterByDate(boolean isFilterByDate);",
"@SuppressWarnings(\"unchecked\")\n\tpublic static List<Filter> getFilters(AgentContext ctx) {\n\t\tString filtrs = ConfigurationManager.getProperty(Agent.getPropertyName(AGENT_GROUP_NAME, \"list\"));\n\t\tif (filtrs == null) \n {\n filtrs = DEFAULT_FILTERS;\n log.info(LogManager.getHeader(null, \"Filters is null!!!\", null));\n }\n else\n log.info(LogManager.getHeader(null, \"Filters is NOT null!!!\", null));\n\t\tList<String> filters = Arrays.asList(filtrs.split(\",\"));\n\t\tList<Filter> list = new ArrayList<Filter>();\n\t\tfor (String string : filters) {\n\t\t\ttry {\n\t\t\t log.info(LogManager.getHeader(null,\"Get Filters #\",string));\n Class cls = Class.forName(string.trim());\n\t\t\t\tObject obj = cls.newInstance();\n\t\t\t\tif (obj instanceof Filter) {\n\t\t\t\t\tFilter m = (Filter) obj;\n\t\t\t\t\tm.setContext(ctx);\n\t\t\t\t\tlist.add(m);\n\t\t\t\t}\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tlog.info(LogManager.getHeader(null, \"oaidriver_error\",\n \"Class \"+string.trim()+\" not found\"),e);\n\t\t\t} catch (InstantiationException e) {\n\t\t\t\tlog.info(LogManager.getHeader(null, \"oaidriver_error\",\n\t\t\t\t\t\t\"Impossible to create instance of \"+string.trim()),e);\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\tlog.info(LogManager.getHeader(null, \"oaidriver_error\",\n\t\t\t\t\t\t\"Class \"+string.trim()+\" doesn't have empty constructor\"),e);\n\t\t\t}\n\t\t}\n\t\treturn list;\n }",
"<E extends CtElement> List<E> getElements(Filter<E> filter);",
"@Test\n public void testGetOrdersByDate() {\n\n LocalDate ld = LocalDate.parse(\"2017-06-23\");\n List<Order> orderListByDate = service.getOrdersByDate(ld);\n List<Order> filteredList = new ArrayList<>();\n\n for (Order currentOrder : orderListByDate) {\n if (currentOrder.getOrderDate().contains(\"06232017\")) {\n filteredList.add(currentOrder);\n }\n }\n\n assertEquals(2, filteredList.size());\n }",
"public List<TableData> filter(List<TableData> incomeData) throws Exception{\r\n return filterByNote(filterByCategory(filterByDate(incomeData)));\r\n }",
"public List<PedidoIndividual> filtrar(PedidoIndividual filtro);",
"public void filterByFoDisplayAll(){\n // add them into the new list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }",
"java.util.List<com.google.monitoring.dashboard.v1.DashboardFilter> getDashboardFiltersList();",
"@RequestMapping(value = { \"/hip/datefilter\" }, method = RequestMethod.POST)\n\t/**\n\t * \n\t * @param map\n\t * @param feed_id\n\t * @param date\n\t * @param src_flag\n\t * @return ModelAndView hipdateFilter\n\t * @throws Exception\n\t */\n\tpublic ModelAndView hipdateFilter(final ModelMap map, @Valid @RequestParam(\"feed_id\") final String feed_id,\n\t\t\t@RequestParam(\"date\") final String date, @Valid @RequestParam(\"src_flag\") final String src_flag)\n\t\t\tthrows Exception {\n\n\t\tString statFeed = this.hipService.checkFeedAvailable(feed_id);\n\t\tString stat = statFeed.substring(0, 1);\n\t\tString sdate = \"\";\n\t\tString edate = \"\";\n\t\tString[] dates = date.split(\"-\");\n\t\tString first_date = dates[0].trim() + \"-\" + dates[1].trim() + \"-\" + dates[2].trim();\n\t\tString last_date = dates[3].trim() + \"-\" + dates[4].trim() + \"-\" + dates[5].trim();\n\t\tDate sd = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).parse(first_date);\n\t\tsdate = new SimpleDateFormat(\"dd-MMM-yy\", Locale.ENGLISH).format(sd);\n\t\tDate ed = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).parse(last_date);\n\t\tedate = new SimpleDateFormat(\"dd-MMM-yy\", Locale.ENGLISH).format(ed);\n\n\t\tif (stat.equals(\"1\")) {\n\t\t\tmap.addAttribute(\"stat\", Integer.parseInt(stat));\n\t\t\tArrayList<String> arrBatchDate = new ArrayList<String>();\n\t\t\tArrayList<String> arrDuration = new ArrayList<String>();\n\t\t\tArrayList<HipDashboardDTO> arrHipDashboard = this.hipService.getTablechartUsingDate(feed_id, date);\n\t\t\tif (arrHipDashboard.isEmpty()) {\n\t\t\t\tmap.addAttribute(\"feed_id\", feed_id);\n\t\t\t\tmap.addAttribute(\"src_flag\", src_flag);\n\t\t\t} else {\n\t\t\t\tmap.addAttribute(\"stat\", 2);\n\t\t\t\tmap.addAttribute(\"arrHipDashboard\", arrHipDashboard);\n\t\t\t\tArrayList<Integer> arrDurationInt = new ArrayList<Integer>();\n\t\t\t\tfor (HipDashboardDTO hipVO : arrHipDashboard) {\n\t\t\t\t\tarrDurationInt.add(Integer.parseInt(hipVO.getDuration()));\n\t\t\t\t\tarrBatchDate.add(hipVO.getBatch_date().toString());\n\t\t\t\t\tarrDuration.add(hipVO.getDuration());\n\t\t\t\t}\n\t\t\t\tmap.addAttribute(\"feed_id\", feed_id);\n\t\t\t\tmap.addAttribute(\"src_flag\", src_flag);\n\t\t\t\tmap.addAttribute(\"x\", arrBatchDate);\n\t\t\t\tmap.addAttribute(\"y\", arrDuration);\n\t\t\t\tmap.addAttribute(\"max\", Collections.max(arrDuration));\n\t\t\t\tmap.addAttribute(\"min\", Collections.min(arrDuration));\n\t\t\t\tmap.addAttribute(\"average\", calculateAverage(arrDurationInt));\n\t\t\t\tArrayList<HipDashboardDTO> arr = this.hipService.getTableMetadata(feed_id, sdate, edate);\n\t\t\t\tArrayList<String> runidlist = this.hipService.getTableRunId(feed_id, sdate, edate);\n\t\t\t\tmap.addAttribute(\"arr\", arr);\n\t\t\t\tmap.addAttribute(\"runidlist\", runidlist);\n\t\t\t\tmap.addAttribute(\"sdate\", sdate);\n\t\t\t\tmap.addAttribute(\"edate\", edate);\n\t\t\t}\n\t\t\treturn new ModelAndView(\"/hip/hipdashboard2\");\n\t\t} else {\n\t\t\tmap.addAttribute(\"stat\", Integer.parseInt(stat));\n\t\t\tmap.addAttribute(\"feed_id\", feed_id);\n\t\t\tmap.addAttribute(\"sdate\", sdate);\n\t\t\tmap.addAttribute(\"edate\", edate);\n\n\t\t\treturn new ModelAndView(\"/hip/hipdashboard2\");\n\t\t}\n\n\t}",
"Map<String, String> getFilters();",
"java.lang.String getDataItemFilter();",
"List<SoldValueByFlag> getSoldValueByFlag(Company company, Date startDate, Date endDate) throws Exception;",
"ObservableList<Appointment> getFilteredAppointmentList();",
"public List<Cuenta> buscarCuentasList(Map filtro);",
"public List<ServiceType> getAllByDate(Date startDate , Date endDate) {\n\t\t// TODO Auto-generated method stub\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\n\t\tsession.beginTransaction();\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList <ServiceType> lst =(List<ServiceType>) session.createCriteria(ServiceType.class)\n\t\t.add(Restrictions.ge(\"createDate\", startDate))\n\t\t.add(Restrictions.lt(\"createDate\", endDate))\n\t\t.list();\n\t\tsession.close();\n\t\treturn lst;\n\t}",
"public QueryFilter(List<ConditionalExpression> list) {\r\n\t\tthis.list = list;\r\n\t}",
"public DateFilter(int smonth, int sday, int emonth, int eday) {\n\t\t//TODO you will need to implement this method\n\t}",
"private ArrayList<Event> getSemesterOneEvents(EventList eventList) throws PacException {\n ArrayList<Event> list = new ArrayList<>();\n for (int i = 0; i < eventList.list.size(); i++) {\n Event event = eventList.find(i);\n if (event.dateTimeIsParsed()) {\n if (event.getMonth() > 6) {\n list.add(event);\n }\n }\n }\n return list;\n }",
"private void getActivatedWeekdays() {\n }",
"private Reviews filterByFunc(FilterFunction filterFunc)\n\t{\n\t\tArrayList<Review> filteredList = new ArrayList<Review>();\n\t\tfor(Review review : list)\n\t\t\tif(filterFunc.filter(review))\n\t\t\t\tfilteredList.add(review);\n\t\treturn new Reviews(filteredList);\n\t}",
"public String getFilter() {\n if(isHot) {\n // buy = max\n // view = max\n }\n String s = \"oderby @exo:\"+orderBy + \" \" + orderType;\n return null;\n }",
"@Override\n public List<HotelMinimalResponseDTO> getHotelsByFilter(HotelFilterRequestDTO hotelFilterRequest) {\n List<Hotel> hotels = hotelRepository.findByLocationIgnoreCaseAndDeletedFalse(hotelFilterRequest.getCity());\n boolean filterByRooms = !ObjectUtils.isEmpty(hotelFilterRequest.getNumberOfRoomsRequired());\n boolean filterByTravellers = !ObjectUtils.isEmpty(hotelFilterRequest.getNumberOfTravellers());\n boolean filterByRating = !ObjectUtils.isEmpty(hotelFilterRequest.getRating());\n boolean filterByFacilities = hotelFilterRequest.getFacilities() != null && hotelFilterRequest.getFacilities().size() > 0;\n List<HotelMinimalResponseDTO> hotelMinimalResponses = hotels.stream()\n .filter(hotel -> {\n boolean roomFilter = !filterByRooms || (\n hotel.getRooms() != null && hotel.getRooms().size() > 0 &&\n getTotalNumberOfRooms(hotel) >= hotelFilterRequest.getNumberOfRoomsRequired()\n );\n boolean travelFilter = !filterByTravellers || (\n hotel.getRooms() != null && hotel.getRooms().size() > 0 &&\n getTotalRoomsCapacity(hotel) >= hotelFilterRequest.getNumberOfTravellers()\n );\n boolean ratingFilter = !filterByRating || (\n hotel.getReviews() != null && hotel.getReviews().size() > 0 &&\n getAverageRating(hotel) >= hotelFilterRequest.getRating()\n );\n List<String> facilities = new ArrayList<>();\n if (filterByFacilities) {\n facilities = getCombinedFacilities(hotel);\n }\n List<String> distinctHotelFacilities = facilities.stream().distinct().collect(Collectors.toList());\n boolean facilitiesFilter = !filterByFacilities || (distinctHotelFacilities.containsAll(hotelFilterRequest.getFacilities()));\n return roomFilter && travelFilter && ratingFilter && facilitiesFilter;\n })\n .map(this::makeHotelMinimalResponseDTO)\n .collect(Collectors.toList());\n logger.info(\"Fetched hotels information by filters successfully\");\n String sortOrder = hotelFilterRequest.getSortOrder() != null ? hotelFilterRequest.getSortOrder().equalsIgnoreCase(\"DESC\") ? \"DESC\" : \"ASC\" : \"ASC\";\n if (\"COST\".equalsIgnoreCase(hotelFilterRequest.getSortBy())) {\n hotelMinimalResponses.sort((o1, o2) -> {\n if (o1.getAverageRating().equals(o2.getAverageRating())) {\n return 0;\n } else if (o1.getAverageRating() > o2.getAverageRating()) {\n return sortOrder.equals(\"DESC\") ? -1 : 1;\n } else {\n return sortOrder.equals(\"DESC\") ? 1 : -1;\n }\n });\n }\n return hotelMinimalResponses;\n }",
"@Override\n\tpublic List<Historic_siteVO> datelist(Criteria cri) throws Exception {\n\t\treturn dao.datelist(cri);\n\t}",
"@Override\r\n\tpublic List<ViewListeEleve> filter(HttpHeaders headers, List<Predicat> predicats, Map<String, OrderType> orders,\r\n\t\t\tSet<String> properties, Map<String, Object> hints, int firstResult, int maxResult) {\n \tList<ViewListeEleve> list = super.filter(headers, predicats, orders, properties, hints, firstResult, maxResult);\r\n \tSystem.out.println(\"ViewListeEleveRSImpl.filter() size is \"+list.size());\r\n\t\treturn list ;\r\n\t}",
"private void addFilterOperations(String filterField, String filterOperation, Object filterValue,\r\n\t\t\tStringBuilder hqlFilter, HashMap<String, String> aliases, HashMap<String, Object> queryParams) {\r\n\r\n\t\tString fields = aliases.get(filterField);\r\n\t\tString[] fieldsTab = fields.split(\",\");\r\n\r\n\t\tint length = fieldsTab.length;\r\n\t\tif (length == 1) {\r\n\t\t\tString field = fieldsTab[0];\r\n\t\t\taddFilterOperation(filterField, filterOperation, filterValue, hqlFilter, field, queryParams);\r\n\t\t} else if (length > 1) {\r\n\t\t\thqlFilter.append(\"(\");\r\n\t\t\tfor (int i = 0; i < length; i++) {\r\n\t\t\t\tif (i > 0) {\r\n\t\t\t\t\thqlFilter.append(\" or \");\r\n\t\t\t\t}\r\n\t\t\t\tString field = fieldsTab[i];\r\n\t\t\t\taddFilterOperation(filterField, filterOperation, filterValue, hqlFilter, field, queryParams);\r\n\t\t\t}\r\n\t\t\thqlFilter.append(\")\");\r\n\t\t}\r\n\r\n\t}",
"List<ExchangeRateDto> getHistoryRates(ExchangeRateHistoryFilter filter);",
"public List<ViewXwZqkh> Query(String filters, String orders, Object... values);",
"ObservableList<ReadOnlyEvent> getFilteredEventList();",
"public List<Reservation>reporteFechas(String date1, String date2){\n\n\t\t\tSimpleDateFormat parser = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\tDate dateOne = new Date();\n\t\t\tDate dateTwo = new Date();\n\n\t\t\ttry {\n\t\t\t\tdateOne = parser.parse(date1);\n\t\t\t\tdateTwo = parser.parse(date2);\n\t\t\t} catch (ParseException e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif(dateOne.before(dateTwo)){\n\t\t\t\treturn repositoryR.reporteFechas(dateOne, dateTwo);\n\t\t\t}else{\n\t\t\t\treturn new ArrayList<>();\n\t\t\t}\n\n\t \t\n\t }",
"private List<WavefrontEvent> filterEvents(List<WavefrontEvent> wavefrontEvents, Long startTime, Long endTime) {\n List<WavefrontEvent> filterEvents = wavefrontEvents.stream()\n .filter(event -> event.getEnd() >= startTime && event.getEnd() <= endTime).collect(Collectors.toList());\n log.debug(\"{} events were found out of time bound, startTime: {} and endTime: {}\",\n wavefrontEvents.size() - filterEvents.size(), startTime, endTime);\n return filterEvents;\n }",
"public void setFilters(List<COSName> filters) {\n/* 333 */ COSArray cOSArray = COSArrayList.converterToCOSArray(filters);\n/* 334 */ this.stream.setItem(COSName.FILTER, (COSBase)cOSArray);\n/* */ }",
"private List<FilterStatement> convertToFilterStatementList(GroupRequestProtocolMessage groupRequestProtocol){\n return groupRequestProtocol.getFilterStatements().stream()\n .map(filterStatementProtocol -> {\n FilterStatement filterStatement = new FilterStatement();\n filterStatement.setColumn(FieldTypeUtils.getFieldType(filterStatementProtocol.getColumn()));\n filterStatement.setComparisonSymbol(ComparisonSymbolUtils\n .getComparisonSymbol(filterStatementProtocol.getComparisonSymbol()));\n filterStatement.setValue(filterStatementProtocol.getValue());\n return filterStatement;\n }).collect(Collectors.toList());\n }",
"protected static<T extends FitbitInterval> List<T> filterResults( List<T> results, FitbitQuery query ) {\n\t\tif ( query.atResolution( ) == FitbitResolution.DAILY )\n\t\t\treturn results;\n\t\t\n\t\tList<T> filteredResults = new ArrayList<T>( );\n\t\tfor ( T r : results )\n\t\t\tif ( r.getInterval( ).getStart( ).isAfter( query.from( ) ) && r.getInterval( ).getStart( ).isBefore( query.to( ) ) )\n\t\t\t\tfilteredResults.add( r );\n\t\t\t\t\n\t\treturn filteredResults;\n\t}",
"protected Set<String> getFilter(StaplerRequest req) throws ServletException, IllegalAccessException, IllegalArgumentException, InvocationTargetException{\n Set<String> filter = new TreeSet<String>();\n String values[] = {\"other\",\"job\",\"view\",\"computer\",\"user\"};\n for(String s:values){\n if(req.getParameter(s)!=null)\n filter.add(s); \n }\n return filter;\n }",
"public List<Reserva> getReservasPeriod(String dateOne, String dateTwo){\n /**\n * Instancia de SimpleDateFormat para dar formato correcto a fechas.\n */\n SimpleDateFormat parser = new SimpleDateFormat(\"yyyy-MM-dd\");\n /**\n * Crear nuevos objetos Date para recibir fechas fomateadas.\n */\n Date dateOneFormatted = new Date();\n Date dateTwoFormatted = new Date();\n /**\n * Intentar convertir las fechas a objetos Date; mostrar registro de\n * la excepción si no se puede.\n */\n try {\n dateOneFormatted = parser.parse(dateOne);\n dateTwoFormatted = parser.parse(dateTwo);\n } catch (ParseException except) {\n except.printStackTrace();\n }\n /**\n * Si la fecha inicial es anterior a la fecha final, devuelve una lista\n * de Reservas creadas dentro del intervalo de fechas; si no, devuelve\n * un ArrayList vacío.\n */\n if (dateOneFormatted.before(dateTwoFormatted)){\n return repositorioReserva.findAllByStartDateAfterAndStartDateBefore\n (dateOneFormatted, dateTwoFormatted);\n } else {\n return new ArrayList<>();\n }\n }",
"public static List<? extends AForecast> extractData(List<? extends AForecast> data) {\n List<? extends AForecast> result = new ArrayList<>();\n\n if (data.isEmpty()) {\n return result;\n }\n\n Collections.sort(data);\n mForecastHoursContainer = new HashSet<>(Constants.FORECASTS_FOR_A_DAY);\n\n int comparison = TimeUtil.compareTodayWithDate(data.get(0).getApplicableDate());\n\n if (comparison == 1) {\n result = extractDataForThePast(data);\n } else if (comparison == -1) {\n result = extractDataForTheFuture(data);\n } else {\n result = extractDataForThePresent(data);\n }\n\n mForecastHoursContainer.clear();\n mForecastHoursContainer = null;\n\n return result;\n }",
"List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter);",
"public static void addFilterCriteria(Query query, Options options)\n {\n\n WorklistFilterDTO filterDTO = (WorklistFilterDTO) options.filter;\n\n if (filterDTO == null)\n {\n return;\n }\n\n FilterAndTerm filter = query.getFilter().addAndTerm();\n\n boolean worklistQuery = query instanceof WorklistQuery;\n\n // Activity ID\n if (null != filterDTO.activityOID)\n {\n if (null != filterDTO.activityOID.from)\n {\n filter.and((worklistQuery\n ? WorklistQuery.ACTIVITY_INSTANCE_OID\n : ActivityInstanceQuery.OID).greaterOrEqual(filterDTO.activityOID.from));\n }\n if (null != filterDTO.activityOID.to)\n {\n filter.and((worklistQuery\n ? WorklistQuery.ACTIVITY_INSTANCE_OID\n : ActivityInstanceQuery.OID).lessOrEqual(filterDTO.activityOID.to));\n }\n }\n //Process Instance Oid\n if (null != filterDTO.processOID)\n {\n if (null != filterDTO.processOID.from)\n {\n filter.and((worklistQuery\n ? WorklistQuery.PROCESS_INSTANCE_OID\n : ActivityInstanceQuery.PROCESS_INSTANCE_OID).greaterOrEqual(filterDTO.processOID.from));\n }\n if (null != filterDTO.processOID.to)\n {\n filter.and((worklistQuery\n ? WorklistQuery.PROCESS_INSTANCE_OID\n : ActivityInstanceQuery.PROCESS_INSTANCE_OID).lessOrEqual(filterDTO.processOID.to));\n }\n }\n // Start Filter\n if (null != filterDTO.startTime)\n {\n\n if (filterDTO.startTime.from != null)\n {\n Date fromDate = new Date(filterDTO.startTime.from);\n filter.and((worklistQuery\n ? WorklistQuery.START_TIME\n : ActivityInstanceQuery.START_TIME).greaterOrEqual(fromDate.getTime()));\n }\n\n if (filterDTO.startTime.to != null)\n {\n Date toDate = new Date(filterDTO.startTime.to);\n filter.and((worklistQuery\n ? WorklistQuery.START_TIME\n : ActivityInstanceQuery.START_TIME).lessOrEqual(toDate.getTime()));\n }\n }\n // Modified Filter\n if (null != filterDTO.lastModified)\n {\n\n if (filterDTO.lastModified.from != null)\n {\n Date fromDate = new Date(filterDTO.lastModified.from);\n\n filter.and((worklistQuery\n ? WorklistQuery.LAST_MODIFICATION_TIME\n : ActivityInstanceQuery.LAST_MODIFICATION_TIME).greaterOrEqual(fromDate\n .getTime()));\n }\n\n if (filterDTO.lastModified.to != null)\n {\n Date toDate = new Date(filterDTO.lastModified.to);\n\n filter.and((worklistQuery\n ? WorklistQuery.LAST_MODIFICATION_TIME\n : ActivityInstanceQuery.LAST_MODIFICATION_TIME).lessOrEqual(toDate\n .getTime()));\n }\n }\n // Status Filter\n if (null != filterDTO.status)\n {\n FilterOrTerm or = filter.addOrTerm();\n for (String status : filterDTO.status.like)\n {\n Integer actState = Integer.parseInt(status);\n if (!worklistQuery)\n {\n or.add(ActivityInstanceQuery.STATE.isEqual(Long.parseLong(status\n .toString())));\n }\n else if (worklistQuery)\n {\n // Worklist Query uses ActivityStateFilter.\n or.add(new ActivityStateFilter(ActivityInstanceState.getState(actState)));\n }\n }\n }\n // Priority Filter\n if (null != filterDTO.priority)\n {\n FilterOrTerm or = filter.addOrTerm();\n for (String priority : filterDTO.priority.like)\n {\n or.or((worklistQuery\n ? WorklistQuery.PROCESS_INSTANCE_PRIORITY\n : ActivityInstanceQuery.PROCESS_INSTANCE_PRIORITY).isEqual(Integer\n .valueOf(priority)));\n }\n }\n // Criticality Filter\n if (null != filterDTO.criticality)\n {\n FilterOrTerm or = filter.addOrTerm();\n for (RangeDTO criticality : filterDTO.criticality.rangeLike)\n {\n or.or((worklistQuery\n ? WorklistQuery.ACTIVITY_INSTANCE_CRITICALITY\n : ActivityInstanceQuery.CRITICALITY).between(\n (criticality.from / PORTAL_CRITICALITY_MUL_FACTOR), criticality.to\n / PORTAL_CRITICALITY_MUL_FACTOR));\n }\n\n }\n // Activities Filter\n if (null != filterDTO.activityName)\n {\n\n if (!CollectionUtils.isEmpty(filterDTO.activityName.activities))\n {\n FilterOrTerm or = filter.addOrTerm();\n if (!filterDTO.activityName.activities.contains(\"-1\"))\n {\n for (String activity : filterDTO.activityName.activities)\n {\n\n or.add(ActivityFilter.forAnyProcess(activity));\n }\n }\n }\n\n if (!CollectionUtils.isEmpty(filterDTO.activityName.processes))\n {\n FilterOrTerm or = filter.addOrTerm();\n if (!filterDTO.activityName.processes.contains(\"-1\"))\n {\n for (String processQId : filterDTO.activityName.processes)\n {\n or.add(new ProcessDefinitionFilter(processQId, false));\n }\n }\n }\n }\n // Process Filter\n if (null != filterDTO.processName)\n {\n FilterOrTerm or = filter.addOrTerm();\n if (!filterDTO.processName.processes.contains(\"-1\"))\n {\n for (String processQId : filterDTO.processName.processes)\n {\n or.add(new ProcessDefinitionFilter(processQId, false));\n }\n }\n }\n // Assigned To\n if (null != filterDTO.assignedTo)\n {\n FilterOrTerm or = filter.addOrTerm();\n for (ParticipantDTO participant : filterDTO.assignedTo.participants)\n { \n\n if(ParticipantType.USER.toString().equals( participant.type) ){\n\n or.add(new org.eclipse.stardust.engine.api.query.PerformingUserFilter( Long.valueOf( participant.OID)));\n } \n else if (ParticipantType.ROLE.toString().endsWith( participant.type))\n {\n RoleInfoDetails roleInfo = new RoleInfoDetails(participant.qualifiedId);\n or.add(org.eclipse.stardust.engine.api.query.PerformingParticipantFilter.forParticipant(roleInfo)); \n }else if(ParticipantType.ORGANIZATION.toString().equals( participant.type)){\n\n OrganizationInfoDetails organizationInfo = new OrganizationInfoDetails(participant.qualifiedId);\n or.add(org.eclipse.stardust.engine.api.query.PerformingParticipantFilter.forParticipant(organizationInfo)); \n }else if(ParticipantSearchComponent.PerformerTypeUI.Department.name().equals(participant.type)){\n\n DepartmentInfo departmentInfo = new DepartmentInfoDetails(participant.OID, participant.id, participant.name, participant.runtimeOrganizationOid);\n or.add(org.eclipse.stardust.engine.api.query.ParticipantAssociationFilter.forDepartment(departmentInfo));\n }\n }\n }\n //Completed By\n if ( null != filterDTO.completedBy)\n {\n FilterOrTerm or = filter.addOrTerm();\n for (ParticipantDTO user : filterDTO.completedBy.participants)\n {\n or.add(new org.eclipse.stardust.engine.api.query.PerformedByUserFilter(user.OID));\n }\n }\n addDescriptorFilters(query, filterDTO);\n }",
"Collection<GestionPrecioDTO> findCampaniasFiltros (GestionPrecioDTO gestionPrecio,String estadoCobro);",
"@Test\n\tpublic void shouldReturnPagedOpenDocumentsFilteredByDateRange() throws ParseException\n\t{\n\n\t\tfinal SearchPageData<B2BDocumentModel> result = pagedB2BDocumentDao.getAllPagedDocuments(\n\t\t\t\tcreatePageableData(0, 10, \"byDocumentDateAsc\"), Collections.singletonList(AccountSummaryAddonUtils\n\t\t\t\t\t\t.createDateRangeCriteriaObject(\"08/10/2013\", DATE_08_11_2013, DOCUMENT_STATUS_OPEN, FILTER_BY_DATE)));\n\n\t\tTestCase.assertEquals(2, result.getResults().size());\n\n\t\tTestCase.assertEquals(DATE_2013_08_11, sdf.format(result.getResults().get(0).getDate()));\n\t\tTestCase.assertEquals(DATE_2013_08_11, sdf.format(result.getResults().get(1).getDate()));\n\t}",
"private String getWhereFilter(ArrayList<Object> prmList) {\n StringBuffer filterBuffer = new StringBuffer();\n /* set id filter */\n if (this.idFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" ndp.id = ? \");\n prmList.add(this.idFilter);\n }\n\n if (this.typeFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" npp.type LIKE ? \");\n prmList.add(this.typeFilter);\n }\n\n if (this.propertyInfoFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" npp.property_info LIKE ? \");\n prmList.add(this.propertyInfoFilter);\n }\n\n if (this.landCertificateFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" npp.land_certificate LIKE ? \");\n prmList.add(this.landCertificateFilter);\n }\n\n if (this.landMapNumberFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" npp.land_map_number LIKE ? \");\n prmList.add(this.landMapNumberFilter);\n }\n\n if (this.landNumberFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" npp.land_number LIKE ? \");\n prmList.add(this.landNumberFilter);\n }\n\n if (this.landAddressFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" npp.land_address LIKE ? \");\n prmList.add(this.landAddressFilter);\n }\n\n if (this.carLicenseNumberFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" npp.car_license_number LIKE ? \");\n prmList.add(this.carLicenseNumberFilter);\n }\n\n if (this.carRegistNumberFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" npp.car_regist_number LIKE ? \");\n prmList.add(this.carRegistNumberFilter);\n }\n\n if (this.carFrameNumberFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" npp.car_frame_number LIKE ? \");\n prmList.add(this.carFrameNumberFilter);\n }\n\n if (this.carMachineNumberFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" npp.car_machine_number LIKE ? \");\n prmList.add(this.carMachineNumberFilter);\n }\n\n if (this.originKindFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" ndp.origin_kind LIKE ? \");\n prmList.add(this.originKindFilter);\n }\n\n if (this.releaseFlgFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" ndp.release_flg = ? \");\n prmList.add(this.releaseFlgFilter);\n }\n\n if (this.deleteFlgFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" ndp.delete_flg = ? \");\n prmList.add(this.deleteFlgFilter);\n }\n\n if (this.typeKeySearchFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" npp.type LIKE ? \");\n prmList.add(this.typeKeySearchFilter);\n }\n\n if (this.keySearchFilter != null) {\n for (int i = 0; i < subKeys.size(); i++) {\n String subkey = subKeys.get(i);\n\n if (Constants.PLUS.equals(subkey)) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" ( \");\n if (i == 0) {\n filterBuffer.append(\" ( \");\n }\n } else if (Constants.SPACE.equals(subkey)) {\n appendOr(filterBuffer);\n filterBuffer.append(\" ( \");\n } else {\n filterBuffer.append(\" MATCH(npp.property_info, npp.owner_info, npp.other_info, \" +\n \"ndp.prevent_in_book_number, ndp.prevent_person_info, ndp.prevent_doc_number, ndp.prevent_doc_summary, \" +\n \"ndp.prevent_note, ndp.release_in_book_number, ndp.release_person_info, \" +\n \"ndp.release_doc_number, ndp.release_doc_summary, ndp.release_note) \");\n filterBuffer.append(\" AGAINST(? IN BOOLEAN MODE) \");\n prmList.add(subkey);\n\n if (subkey.charAt(0) == '\"') {\n subkey = subkey.substring(1, subkey.length() - 1);\n }\n\n if (subkey.charAt(subkey.length() - 1) == '\"') {\n subkey = subkey.substring(0, subkey.length() - 2);\n }\n\n appendOr(filterBuffer);\n filterBuffer.append(\" npp.property_info LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" npp.owner_info LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" npp.other_info LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.prevent_in_book_number LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.prevent_person_info LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n \n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.prevent_doc_number LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.prevent_doc_summary LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.prevent_note LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.release_in_book_number LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.release_person_info LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.release_doc_number LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.release_doc_summary LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.release_note LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n filterBuffer.append(\" ) \");\n }\n }\n filterBuffer.append(\" ) \");\n\n filterBuffer.append(\" ORDER BY \");\n for (int j = 1; j < subKeys.size(); j++) {\n String subkey = subKeys.get(j);\n if (!Constants.PLUS.equals(subkey) && !Constants.SPACE.equals(subkey)) {\n\n filterBuffer.append(\" ( \");\n filterBuffer.append(\" MATCH(npp.property_info, npp.owner_info, npp.other_info, \" +\n \"ndp.prevent_in_book_number, ndp.prevent_person_info, ndp.prevent_doc_number, ndp.prevent_doc_summary, \" +\n \"ndp.prevent_note, ndp.release_in_book_number, ndp.release_person_info, \" +\n \"ndp.release_doc_number, ndp.release_doc_summary, ndp.release_note) \");\n filterBuffer.append(\" AGAINST(? IN BOOLEAN MODE) \");\n prmList.add(subkey);\n\n if (subkey.charAt(0) == '\"') {\n subkey = subkey.substring(1, subkey.length() - 1);\n }\n\n if (subkey.charAt(subkey.length() - 1) == '\"') {\n subkey = subkey.substring(0, subkey.length() - 2);\n }\n\n appendOr(filterBuffer);\n filterBuffer.append(\" npp.property_info LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" npp.owner_info LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" npp.other_info LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.prevent_in_book_number LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.prevent_person_info LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n \n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.prevent_doc_number LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.prevent_doc_summary LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.prevent_note LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.release_in_book_number LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.release_person_info LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.release_doc_number LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.release_doc_summary LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.release_note LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n if (j == subKeys.size() - 1) {\n filterBuffer.append(\" ) \");\n } else {\n filterBuffer.append(\" ) + \");\n }\n }\n }\n filterBuffer.append(\" DESC, prevent_doc_receive_date DESC \");\n }\n\n if (this.officeCode != null && !\"\".equals(this.officeCode)) {\n \tappendAnd(filterBuffer);\n filterBuffer.append(\" ndp.synchronize_id LIKE ? \");\n prmList.add(this.officeCode);\n }\n \n return filterBuffer.toString();\n }",
"List<State> getListStateByFilter( StateFilter filter );",
"public List<Food> getPortionedFoodsInDateTimeRange(LocalDateTime start, LocalDateTime end) {\n List<FoodEntry> entriesInRange = FoodListManager.filterListByDate(foodEntries, start, end);\n return FoodListManager.convertListToPortionedFoods(entriesInRange);\n }",
"public static ArrayList<LocalDate> getPhDates() {\r\n \tArrayList<Date> phDates = phRepo.findAllPublicHolidayDates();\r\n \tArrayList<LocalDate> phLocalDates = new ArrayList<LocalDate>();\r\n \t\r\n\t\tfor(Date phDate : phDates) {\r\n\t\t\tphLocalDates.add(phDate.toLocalDate());\r\n\t\t}\r\n\t\t\r\n\t\treturn phLocalDates;\r\n }",
"public FilterSource[] getFilterSources();",
"public void filterByMyDisplayAll(){\n // add them into the new list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }",
"public Collection<Object> getOrderedTestNames(Map<String,String> filter) throws\n NEDSSSystemException , InvalidSRTFilterKeysException {\n\n\n\n ArrayList<Object> returnSet = null;\n String programArea = null;\n String condition = null;\n String orderingFacility = null;\n String orderedTest = null;\n\n programArea = (String) filter.get(SRTFilterKeys.PROGRAM_AREA_CODE);\n condition = (String) filter.get(SRTFilterKeys.CONDITION_CODE);\n orderingFacility = (String) filter.get(SRTFilterKeys.REPORTING_FACILITY_ID);\n orderedTest = (String) filter.get(SRTFilterKeys.ORDERED_TEST_CODE);\n\n if (filter.size() == 1) {\n if (orderingFacility != null)\n returnSet = (ArrayList<Object> ) getOrderedTestNamesByOrderingFacility(orderingFacility);\n else {\n throw new InvalidSRTFilterKeysException(\"Invalid Filter Key Exception\");\n\n }\n }\n else\n {\n if (programArea != null && orderingFacility != null)\n {\n returnSet = (ArrayList<Object> ) getOrderedTestNamesByPA(programArea, orderingFacility);\n if(returnSet == null)\n returnSet = (ArrayList<Object> ) getOrderedTestNamesByPA(programArea, \"DEFAULT\");\n }\n\n else if (condition != null && orderingFacility != null)\n {\n returnSet = (ArrayList<Object> ) getOrderedTestNamesByCondition(condition, orderingFacility);\n if(returnSet == null)\n returnSet = (ArrayList<Object> ) getOrderedTestNamesByCondition(condition, \"DEFAULT\");\n }\n\n else if(orderedTest != null && orderingFacility != null)\n {\n returnSet = (ArrayList<Object> ) getOrderedTestNamesByOrderingFacilityAndTest(orderingFacility, orderedTest);\n if(returnSet == null)\n returnSet = (ArrayList<Object> ) getOrderedTestNamesByOrderingFacilityAndTest(\"DEFAULT\",orderedTest);\n }\n else\n throw new NEDSSSystemException(\"Invalid Filter Key Exception\");\n\n }\n\n if (returnSet == null)\n return getOrderedTestNamesByOrderingFacility(\"DEFAULT\");\n else\n return returnSet;\n}",
"public ArrayList<Question> filterByStart(ArrayList<Question> input, LocalDate start) {\n\n /* The final filtered arrayList */\n ArrayList<Question> filtered = new ArrayList<>();\n\n /* Go through the entire input arraylist checking each question. */\n for (int i = 0 ; i < input.size(); i++) {\n\n /* If the question date is after the start date, then add it to the new ArrayList. */\n if (input.get(i).getDate().compareTo(start) >= 0) {\n filtered.add(input.get(i));\n }\n }\n\n return filtered;\n }",
"@Override\n public int filterOrder() {\n return 1;\n }",
"@Override\n public int filterOrder() {\n return 1;\n }",
"List<SpotPrice> getByCommodityAndFromDateAndToDateAndLocation(\n Commodity commodity,\n Date fromDate,\n Date toDate,\n Location location\n );",
"public DateFilter(int smonth, int sday) {\n\t\t//TODO you will need to implement this method\n\t}",
"public IListFilterDatePanel(IListe l, SQLField fieldDate) {\r\n this(l, fieldDate, null);\r\n if (l.getRequest() == Configuration.getInstance().getDirectory().getElement(l.getSource().getPrimaryTable()).getListRequest()) {\r\n System.err.println(\"Attention il ne faut pas utiliser la listrequest par défaut sinon les filtres restes !!!\");\r\n Thread.dumpStack();\r\n }\r\n }",
"public List<ShelfItem> getAllWishlist(String filter, String username, Integer from, Integer to);",
"List<InsureUnitTrend> queryInsureDate();",
"void displaySpecifiedDayList();",
"public List<String> getFileFilters()\n {\n COSBase filters = stream.getDictionaryObject(COSName.F_FILTER);\n if (filters instanceof COSName)\n {\n COSName name = (COSName) filters;\n return Collections.singletonList(name.getName());\n }\n else if (filters instanceof COSArray)\n {\n return ((COSArray) filters).toCOSNameStringList();\n }\n return Collections.emptyList();\n }",
"Set<StewardSimpleDTO> getAllAvailable(Date from, Date to);",
"public ArrayList<Question> filterByEnd(ArrayList<Question> input, LocalDate end) {\n\n /* The final filtered arrayList */\n ArrayList<Question> filtered = new ArrayList<>();\n\n /* Go through the entire input arraylist checking each question. */\n for (int i = 0 ; i < input.size(); i++) {\n\n /* If the question date is before the end date, then add it to the new ArrayList. */\n if (input.get(i).getDate().compareTo(end) <= 0) {\n filtered.add(input.get(i));\n }\n }\n\n return filtered;\n }",
"public StringList getCRFilterRangeData(Context context, String[] args) throws Exception {\n StringList filterCRList = new StringList();\n\n filterCRList.addElement(\"All\");\n filterCRList.addElement(\"Active\");\n filterCRList.addElement(\"Opened\");\n filterCRList.addElement(\"Opened this month and not closed\");\n filterCRList.addElement(\"In Process\");\n filterCRList.addElement(\"Completed\");\n filterCRList.addElement(\"Customer\");\n // Findbug Issue correction start\n // Date: 21/03/2017\n // By: Asha G.\n\n // Findbug Issue correction End\n\n return filterCRList;\n }",
"public void GetAvailableDates()\n\t{\n\t\topenDates = new ArrayList<TimePeriod>(); \n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\t\n\t\t\tString query = \"SELECT startDate, endDate FROM Available WHERE available_hid = '\"+hid+\"'\"; \n\t\t\tResultSet rs = con.stmt.executeQuery(query);\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tTimePeriod tp = new TimePeriod(); \n\t\t\t\ttp.stringStart = rs.getString(\"startDate\"); \n\t\t\t\ttp.stringEnd = rs.getString(\"endDate\"); \n\t\t\t\ttp.StringToDate();\n\t\t\t\t\n\t\t\t\topenDates.add(tp); \n\t\t\t}\n\t\t\tcon.closeConnection(); \n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}",
"public List<?> weWater_chart2(String search_type_year,String search_type_mw);",
"@RequestMapping(value=\"/filter\",method=RequestMethod.GET)\n\t@ResponseBody public List<FaculityLeaveMasterVO> filterByDate(Model model,@RequestParam(\"empId\") String empId, @RequestParam(\"date1\") String d1, @RequestParam(\"date2\") String d2,HttpSession session) throws IOException {\n\t\tString eid=empId;\n\t\t\n\t\tSimpleDateFormat myFormat1 = new SimpleDateFormat(\"yyyy-MM-dd\");\t\n\t\tSimpleDateFormat formatJSP1 = new SimpleDateFormat(\"MM/dd/yyyy\");\n\t\tString reformattedStr1 = null;\n\t\ttry {\n\t\t\treformattedStr1 = myFormat1.format(formatJSP1.parse(d1));\n\t\t} catch (ParseException e){\n\t\t\te.printStackTrace();}\n\n\t\tSimpleDateFormat myFormat2 = new SimpleDateFormat(\"yyyy-MM-dd\");\t\n\t\tSimpleDateFormat formatJSP2 = new SimpleDateFormat(\"MM/dd/yyyy\");\n\t\tString reformattedStr2 = null;\n\t\ttry {\n\t\t\treformattedStr2 = myFormat2.format(formatJSP2.parse(d2));\n\t\t} catch (ParseException e){\n\t\t\te.printStackTrace();}\n\n\t\tList<FaculityLeaveMasterVO> faculityLeaveMasterVOslist=basFacultyService.sortLeaveByDate(reformattedStr1, reformattedStr2, eid);\n\t\tfor(FaculityLeaveMasterVO faculityLeaveMasterVO : faculityLeaveMasterVOslist){\n\t\t\t if(faculityLeaveMasterVO.getLeaveFrom()!=null)\n\t\t\t faculityLeaveMasterVO.setSdateFrom( DateUtils.convertDateIntoString(faculityLeaveMasterVO.getLeaveFrom()));\n\t\t\t if(faculityLeaveMasterVO.getLeaveTo()!=null)\n\t\t\t faculityLeaveMasterVO.setSdateTo( DateUtils.convertDateIntoString(faculityLeaveMasterVO.getLeaveTo()));\n\t\t\t// System.out.println(\"leave from : \"+t.getLeaveFrom()+\" leave to :\"+faculityLeaveMasterVO.getLeaveTo()+\"---------\"+t.getLeaveDates());\n\t\t}\n\t\treturn faculityLeaveMasterVOslist;\n\t\t//System.out.println(\"-------sfsfsfs----------\"+eid);\n\t}",
"@Override\n\tpublic int filterOrder() {\n\t\treturn 1;\n\t}",
"private List<String> getDataFromApi() throws IOException {\n // List the next 10 events from the primary calendar.\n DateTime now = new DateTime(System.currentTimeMillis());\n Date nowToday = new Date(System.currentTimeMillis());\n Date now2 = new Date();\n Log.d(\"TIME\", now2.toString()); // Fri Apr 14 11:45:53 GMT-04:00 2017\n String show = DateFormat.getTimeInstance().format(nowToday); // 오후 4:22:40\n String show2 = DateFormat.getDateInstance().format(nowToday); // 2017. 4. 7.\n String show3 = DateFormat.getDateTimeInstance().format(nowToday); // 2017. 4. 7. 오후 4:22:40\n // String show4 = DateFormat.getDateInstance().format(now); 이건 안됌 에러\n\n\n java.text.SimpleDateFormat toDateTime = new java.text.SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssZ\");\n //Date todayDate = new Date();\n // String todayName = dayName.format(todayDate);\n\n java.util.Calendar calendar = java.util.Calendar.getInstance();\n\n calendar.setTime(nowToday);\n calendar.add(Calendar.HOUR, 2);\n Date twoFromNow = calendar.getTime();\n\n\n\n List<String> eventStrings = new ArrayList<String>();\n Events events = mService.events().list(\"primary\")\n .setMaxResults(10)\n .setTimeMin(now)\n .setTimeMax(new DateTime(twoFromNow, TimeZone.getDefault()))\n .setOrderBy(\"startTime\")\n .setSingleEvents(true)\n .execute();\n\n\n List<Event> items = events.getItems();\n // List<Map<String, String>> pairList = new ArrayList<Map<String, String>>();\n // String nowDay = now.toString().substring(0, now.toString().indexOf(\"T\"));\n\n\n for (Event event : items) {\n DateTime start = event.getStart().getDateTime();\n\n // Only get events with exact start time set, exclude all day\n if (start != null) {\n eventStrings.add(\n String.format(\"%s //// %s)\", event.getSummary(), start));\n }\n\n\n }\n\n return eventStrings;\n }",
"String genWhereConditionsFromFilters(TableFields tableFields, String filters);",
"public static BookFilter getDailyDevotionals()\n {\n return new BookCategoryFilter(BookCategory.DAILY_DEVOTIONS);\n }",
"public List<OrderOverViewDTO> getOrders(IDataService dataService, List<OrderOverViewDTO> orderList,\n FilterDTO filterObject) throws Exception {\n int foundBoTypeUsrRequest = getboTypeQuery(dataService, \"UsrRequest\");\n int foundBoTypeUsrComplaint = getboTypeQuery(dataService, \"UsrOrder\");\n // Finally we can do query\n IDatabaseQuery queryOrders = dataService.getPVDatabaseQuery(\"GetOrdersByType\");\n queryOrders.getSearchExpression(\"boType\", Operator.IN).addValue(foundBoTypeUsrRequest);\n queryOrders.getSearchExpression(\"boType\", Operator.IN).addValue(foundBoTypeUsrComplaint);\n\n // Query filter description\n if (filterObject.getNotModifiedBy() != null) {\n queryOrders.getSearchExpression(\"notModifiedByAccountName\", Operator.NOT_EQUAL)\n .setValue(filterObject.getNotModifiedBy());\n }\n\n // Query filter state\n if (filterObject.getModifiedBy() != null) {\n queryOrders.getSearchExpression(\"modifiedByAccountName\", Operator.EQUAL)\n .setValue(filterObject.getModifiedBy());\n }\n\n // Query filter mutation date from\n if (filterObject.getModifiedDateFrom() != null) {\n queryOrders.getDateTimeSearchExpression(\"searchMutationDateFrom\", Operator.GREATER)\n .setValue(filterObject.getModifiedDateFrom());\n }\n // Query filter mutation date to\n if (filterObject.getModifiedDateTo() != null) {\n queryOrders.getDateTimeSearchExpression(\"searchMutationDateTo\", Operator.LESS_EQUAL)\n .setValue(filterObject.getModifiedDateTo());\n }\n\n IResultSet resultsetNew = queryOrders.execute();\n System.out.println(\"Query Executed successfully...\");\n\n while (resultsetNew.next()) {\n OrderOverViewDTO orderOverViewDTO = new OrderOverViewDTO();\n orderOverViewDTO = fillOrderBoFields(resultsetNew, orderOverViewDTO);\n orderList.add(orderOverViewDTO);\n }\n\n return orderList;\n }",
"@Query(\"from Flight as f where f.fare.fare <= 5000\")\n\tList<Flight> filterFlightsByPrice();",
"@Test\n public void getBetweenDaysTest(){\n\n Date bDate = DateUtil.parse(\"2021-03-01\", DatePattern.NORM_DATE_PATTERN);//yyyy-MM-dd\n System.out.println(\"bDate = \" + bDate);\n Date eDate = DateUtil.parse(\"2021-03-15\", DatePattern.NORM_DATE_PATTERN);\n System.out.println(\"eDate = \" + eDate);\n List<DateTime> dateList = DateUtil.rangeToList(bDate, eDate, DateField.DAY_OF_YEAR);//创建日期范围生成器\n List<String> collect = dateList.stream().map(e -> e.toString(\"yyyy-MM-dd\")).collect(Collectors.toList());\n System.out.println(\"collect = \" + collect);\n\n }",
"protected List<Tuple<Operator, Property>> getPropertyFilters() {\n if (properties == null) {\n EntityDescriptor ed = getDescriptor();\n properties = filters.stream()\n .map(filter -> Tuple.create(filter.getFirst(), ed.getProperty(filter.getSecond())))\n .toList();\n }\n\n return Collections.unmodifiableList(properties);\n }"
] |
[
"0.5974312",
"0.5923693",
"0.5877121",
"0.58521956",
"0.5678428",
"0.56061673",
"0.5596698",
"0.5487701",
"0.5485599",
"0.5455703",
"0.54511225",
"0.54476696",
"0.5411474",
"0.5394756",
"0.53917164",
"0.5371468",
"0.5356831",
"0.5355065",
"0.5338314",
"0.53364396",
"0.5323018",
"0.52834564",
"0.52713734",
"0.5269538",
"0.5267895",
"0.526242",
"0.52615064",
"0.5249948",
"0.5247614",
"0.52368534",
"0.5233405",
"0.52310586",
"0.5223197",
"0.52068496",
"0.5204963",
"0.52000386",
"0.519707",
"0.5195156",
"0.51721853",
"0.51707774",
"0.514457",
"0.5143682",
"0.514023",
"0.51384556",
"0.51158524",
"0.51040953",
"0.5090979",
"0.50799835",
"0.5063288",
"0.5061898",
"0.50584114",
"0.5057352",
"0.50414073",
"0.50350314",
"0.5034747",
"0.5027555",
"0.5024639",
"0.50228554",
"0.50222176",
"0.50217366",
"0.5015355",
"0.5011683",
"0.50076586",
"0.4999264",
"0.49976596",
"0.49916264",
"0.49891162",
"0.49854735",
"0.4985035",
"0.4983868",
"0.49773306",
"0.49532616",
"0.4948373",
"0.49401644",
"0.49300817",
"0.4923674",
"0.49135512",
"0.49004835",
"0.4899857",
"0.4899857",
"0.48992094",
"0.48985076",
"0.48921373",
"0.48919487",
"0.48891664",
"0.48880082",
"0.48850033",
"0.48808858",
"0.48738942",
"0.48710322",
"0.48694906",
"0.4867776",
"0.48673812",
"0.48627293",
"0.48620823",
"0.4859645",
"0.485499",
"0.48510385",
"0.48508736",
"0.4849036",
"0.48386446"
] |
0.0
|
-1
|
Drop User Table if exist
|
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL(DROP_USER_TABLE);
db.execSQL(SQL_DELETE_ENTRIES);
// Create tables again
onCreate(db);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void dropUsersTable() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n session.createSQLQuery(\"DROP TABLE IF EXISTS Users\").executeUpdate();\n tx.commit();\n session.close();\n\n }",
"@Override\n\tpublic void dropTable() {\n\t\ttry {\n\t\t\tTableUtils.dropTable(connectionSource, UserEntity.class, true);\n\t\t\tTableUtils.dropTable(connectionSource, Downloads.class, true);\n\t\t} catch (SQLException e) {\n\t\t}\n\t}",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"USER_INFORMATION\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"USER\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"USER\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"USER\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"USER\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"USER_BEAN\\\"\";\n db.execSQL(sql);\n }",
"public void clearUserTable() {\n\t\tSQLDelete deleteStatament = new SQLDelete();\n\t\tdeleteStatament.clearUserTable();\n\t}",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"USER_INFO\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"USER_ENTITY\\\"\";\n db.execSQL(sql);\n }",
"@Override\r\n public void dropTable() {\n if(tableIsExist(TABLE_NAME)){\r\n String sql = \"drop table \" + TABLE_NAME;\r\n database.execSQL(sql);\r\n }\r\n }",
"@Override\n public void cleanUsersTable() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n session.createQuery(\"delete from User\").executeUpdate();\n tx.commit();\n System.out.println(\"HibCleaning users table\");\n session.close();\n\n }",
"public void dropUserWarehouse() {\r\n try {\r\n UserManager mydb = new UserManager(activity);\r\n mydb.open();\r\n mydb.dropWarehouse();\r\n mydb.close();\r\n }catch(Exception e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public void dropUser(String userName) throws Exception;",
"public void dropTable();",
"public void resetTables(){\r\n try {\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n // Delete All Rows\r\n db.delete(User.TABLE_USER_NAME, null, null);\r\n db.close();\r\n }catch(SQLiteDatabaseLockedException e){\r\n e.printStackTrace();\r\n }\r\n }",
"public void clear() throws DBException\n {\n String sqlString = \"DELETE FROM user\";\n try(Statement statement = conn.createStatement())\n {\n statement.executeUpdate(sqlString);\n }\n catch(SQLException ex)\n {\n throw new DBException(\"Error while clearing user table\");\n }\n\n\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"MEMBER_DOCTOR\\\"\";\n db.execSQL(sql);\n }",
"public void drop() {\n SQLiteDatabase db = this.getWritableDatabase();\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_NAME);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_NAME1);\n onCreate(db);\n }",
"public void dropTable(String tableName);",
"public void dropDB() throws SQLException {\n\t \t\tStatement stmt = cnx.createStatement();\n\t \t\tString[] tables = {\"account\", \"consumer\", \"transaction\"};\n\t \t\tfor (int i=0; i<3;i++) {\n\t \t\t\tString query = \"DELETE FROM \" + tables[i];\n\t \t\t\tstmt.executeUpdate(query);\n\t \t\t}\n\t \t}",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"ACCOUNT\\\"\";\n db.execSQL(sql);\n }",
"private void dropDBProcedure() {\r\n try {\r\n Class.forName(myDriver);\r\n Connection conn = DriverManager.getConnection(myUrl, myUser, myPass);\r\n DatabaseMetaData md = conn.getMetaData();\r\n String[] types = {\"TABLE\"};\r\n ResultSet rs = md.getTables(null, \"USERTEST\", \"%\", types);\r\n while (rs.next()) {\r\n String queryDrop\r\n = \"DROP TABLE \" + rs.getString(3);\r\n Statement st = conn.createStatement();\r\n st.executeQuery(queryDrop);\r\n System.out.println(\"TABLE \" + rs.getString(3).toLowerCase() + \" DELETED\");\r\n st.close();\r\n }\r\n rs.close();\r\n conn.close();\r\n } catch (ClassNotFoundException | SQLException ex) {\r\n System.out.println(ex.toString());\r\n }\r\n }",
"private static void dropTablesFromDatabase (Statement statement) throws SQLException {\n //Удаление таблиц из БД\n statement.execute(\"DROP TABLE IF EXISTS payment;\");\n statement.execute(\"DROP TABLE IF EXISTS account;\");\n statement.execute(\"DROP TABLE IF EXISTS users;\");\n statement.execute(\"DROP TABLE IF EXISTS role;\");\n }",
"public static void dropMysqlUser(Eleve e) {\n Session session = HibernateUtils.getSessionFactory().openSession();\r\n String SQLRequest = \"DROP USER '\" + e.getAbreviation() + \"'@'%' ; \";\r\n System.out.println(SQLRequest);\r\n session.beginTransaction();\r\n session.createSQLQuery(SQLRequest).executeUpdate();\r\n session.getTransaction().commit();\r\n session.close();\r\n\r\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"'PERSONAL_INFORMATION'\";\n db.execSQL(sql);\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"'SPECIAL_ACCOUNT_INFO'\";\n db.execSQL(sql);\n }",
"boolean dropTable();",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"'SELLER'\";\n db.execSQL(sql);\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"'CUSTOMER'\";\n db.execSQL(sql);\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"FRIEND\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"'P5P10'\";\n db.execSQL(sql);\n }",
"public void deleteUser(SPUser user, String tableName) { \n try {\n \t\t\tmyCon.execute(\"DELETE FROM \"+tableName+\" WHERE Username= '\"+ user.getUsername()+\"';\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }",
"public void dropTable() {\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"'IdCard'\";\n db.execSQL(sql);\n }",
"public void dropTables()\n {\n String tableName;\n\n for (int i=0; i<tableNames.length; i++)\n {\n tableName = tableNames[i];\n System.out.println(\"Dropping table: \" + tableName);\n try\n {\n Statement statement = connect.createStatement();\n\n String sql = \"DROP TABLE \" + tableName;\n\n statement.executeUpdate(sql);\n }\n catch (SQLException e)\n {\n System.out.println(\"Error dropping table: \" + e);\n }\n }\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"GROUP_INFO_BEAN\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"SECURITY_ITEMS\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"'P7P4'\";\n db.execSQL(sql);\n }",
"public void DropTables() {\n\t\ttry {\n\t\t\tDesinstall_DBMS_MetaData();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"COUNT_DATA_BEAN\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"BANK_REGISTRATION_BEAN\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"'PHONE_NUMBER'\";\n db.execSQL(sql);\n }",
"@Test\n public void teardown() throws SQLException {\n PreparedStatement ps = con.prepareStatement(\"delete from airline.user where username = \\\"username\\\";\");\n ps.executeUpdate();\n this.con.close();\n this.con = null;\n this.userDAO = null;\n this.testUser = null;\n }",
"public static void emptyTable(Connection con, String tableName) throws SQLException\r\n\t{\r\n\t Statement st = null;\r\n\t\r\n String createStr = \"CREATE TABLE \" + tableName + \" (userId INTEGER, firstName VARCHAR(30), lastName VARCHAR(30), countryCode VARCHAR(10), primary key(userID))\";\r\n \tString dropStr = \"DROP TABLE \" + tableName;\r\n \t\r\n DatabaseMetaData dbm = con.getMetaData();\r\n ResultSet tables = dbm.getTables(null, null, tableName, null);\r\n \r\n st = con.createStatement(); \r\n\r\n if (tables != null && tables.next()) {\r\n // Table exists\r\n \tst.executeUpdate(dropStr); \r\n \tSystem.out.println(\"Got rid of old table\");\r\n }\r\n\r\n st.executeUpdate(createStr);\r\n\t\r\n\t}",
"public void clear() {\n\t\tLog.i(TAG, \"clear table \" + TABLE_USER);\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tdb.delete(TABLE_USER, null, null);\n\t}",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"'BLACK_LIST'\";\n db.execSQL(sql);\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"CONTACTS_BEAN\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"WEB_URL_BEAN\\\"\";\n db.execSQL(sql);\n }",
"private static void removeDB()\n {\n if(getStatus().equals(\"no database\"))\n return;\n\n dropTable(\"myRooms\");\n dropTable(\"myReservations\");\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"LOCAL_BEAN\\\"\";\n db.execSQL(sql);\n }",
"void removeTable(String tableName) throws SQLException {\n\t\tstmt = con.createStatement();\n\t\tString sql = (new StringBuilder(\"drop table \")).append(tableName)\n\t\t\t\t.toString();\n\t\tstmt.executeUpdate(sql);\n\t\tstmt.close();\n\t}",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"ANSWERS_QUESTION\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"TRUCK\\\"\";\n db.execSQL(sql);\n }",
"public void deleteDB(){\n \t\tSQLiteDatabase db = this.getWritableDatabase();\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS user\");\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS poll\");\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS time\");\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS status\");\n \t\tonCreate(db);\n \t}",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"'TABLE__STATUS'\";\n db.execSQL(sql);\n }",
"@Override\r\n\tpublic boolean dropTable() {\n\t\treturn false;\r\n\t}",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"'ENTITY_COMMAND'\";\n db.execSQL(sql);\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"'PHOTO_PATH_BEAN'\";\n db.execSQL(sql);\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"CHAT_LOG\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"FEATURE\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"SHOP_RECEIVABLE_ENTITY\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"livechina_chinnel\\\"\";\n db.execSQL(sql);\n }",
"public void doDropTable();",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"GROUP_INFO_ENTITY\\\"\";\n db.execSQL(sql);\n }",
"public void deleteTable(String tableName) {\n try {\n connectToDB(\"jdbc:mysql://localhost/EmployeesProject\");\n } catch (Exception e) {\n System.out.println(\"The EmployeesProject db does not exist!\\n\"\n + e.getMessage());\n }\n String sqlQuery = \"drop table \" + tableName;\n try {\n stmt.executeUpdate(sqlQuery);\n } catch (SQLException ex) {\n System.err.println(\"Failed to delete '\" + tableName + \n \"' table.\\n\" + ex.getMessage());\n }\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"HEALTH_RECORD__STATUS\\\"\";\n db.execSQL(sql);\n }",
"public void dropTableIfExists(String tableName) throws SQLException{\n\t\tStatement stmt = connection.createStatement();\n\t\tstmt.execute(\"DROP TABLE IF EXISTS \\\"\" + tableName + \"\\\"\"); \n\t\tstmt.close();\n\t}",
"public void dropTable(DropTableQuery query);",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"\" + TABLENAME + \"\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"'RECYCLE_SCAN'\";\n db.execSQL(sql);\n }",
"void remove(User user) throws SQLException;",
"public static void dropAllTables(SQLiteDatabase db, boolean ifExists) {\n UserDao.dropTable(db, ifExists);\n SbjectDao.dropTable(db, ifExists);\n SourceDao.dropTable(db, ifExists);\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"FEATURE\\\"\";\n db.execSQL(sql);\n }",
"public boolean delete(UserBean user) {\n\tthis.createConnection();\n\n try (Connection con = this.getCon();\n \tPreparedStatement pstmt = con.prepareStatement(\"DELETE FROM ? where id = ? ;\")) {\n pstmt.setString(1, this.getTableName());\n pstmt.setInt(2, user.getUserId());\n pstmt.executeUpdate();\n return true;\n } catch (SQLException e) {\n System.out.println(\"SQL Exception\" + e.getErrorCode() + e.getMessage());\n return false;\n }\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"STEP11_RESBEAN\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"ORDER_PAY\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"HINT\\\"\";\n db.execSQL(sql);\n }",
"public void wipeTable() {\n SqlStorage.wipeTable(db, TABLE_NAME);\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"PAYMENT_RECORD\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"EXAM_QUESTION\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"CONTACT\\\"\";\n db.execSQL(sql);\n }",
"public String execute() throws SQLException {\n\t\t/*conn = DataBase.getConnection();\n\t\tst = conn.createStatement();\n\t\tString sql=\"drop table user\";\n\t\tst.execute(sql);*/\n\t\treturn \"SUCCESS\";\n\n\t}",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"DEVICE_INFOS\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"BUDGETS\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"TOPIC_DB\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"TB_CONVERSATION\\\"\";\n db.execSQL(sql);\n }",
"void dropTable(ObjectPath tablePath, boolean ignoreIfNotExists)\n throws TableNotExistException, CatalogException;",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"'LOCAL_SUB_TYPE_ID'\";\n db.execSQL(sql);\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"'ORDER_BATCH'\";\n db.execSQL(sql);\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\r\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"'META'\";\r\n db.execSQL(sql);\r\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"FITTING_TABLE\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n\t\tString sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"'District'\";\n\t\tdb.execSQL(sql);\n\t}",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"'MESSAGE_CONFIG'\";\n db.execSQL(sql);\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"GAME_FILL_ITEM\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(Database db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"HOT_SONG_LIST\\\"\";\n db.execSQL(sql);\n }",
"private void deleteOldTables(){\n jdbcTemplate.execute(\"DROP TABLE OLDcompetence\");\n jdbcTemplate.execute(\"DROP TABLE OLDrole\");\n jdbcTemplate.execute(\"DROP TABLE OLDperson\");\n jdbcTemplate.execute(\"DROP TABLE OLDavailability\");\n jdbcTemplate.execute(\"DROP TABLE OLDcompetence_profile\");\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"STOCK\\\"\";\n db.execSQL(sql);\n }",
"public static void dropTable(SQLiteDatabase db, boolean ifExists) {\n String sql = \"DROP TABLE \" + (ifExists ? \"IF EXISTS \" : \"\") + \"\\\"ExtraDetails\\\"\";\n db.execSQL(sql);\n }",
"public void removeLifeloggingTables() throws SQLException {\n\n\t\tString sqlCommand1 = \"DROP TABLE IF EXISTS minute\";\n\t\tString sqlCommand2 = \"DROP TABLE IF EXISTS image\";\n\t\tStatement stmt = this.connection.createStatement();\n\n\t\tstmt.execute(sqlCommand2);\n\t\tstmt.execute(sqlCommand1);\n\t\tstmt.close();\n\t}"
] |
[
"0.80555433",
"0.76483446",
"0.7420146",
"0.73900676",
"0.73900676",
"0.73900676",
"0.73900676",
"0.73675084",
"0.7364191",
"0.72577447",
"0.7235674",
"0.72275424",
"0.71386224",
"0.6977631",
"0.6803981",
"0.6795635",
"0.67952263",
"0.6753142",
"0.67139167",
"0.6712199",
"0.67032003",
"0.67025685",
"0.66824776",
"0.6666706",
"0.6657311",
"0.66481197",
"0.66415817",
"0.66313916",
"0.66296697",
"0.66282237",
"0.6621843",
"0.6584019",
"0.65772665",
"0.6574119",
"0.65411484",
"0.65327483",
"0.6500324",
"0.64837086",
"0.6479045",
"0.6472259",
"0.6470461",
"0.6452614",
"0.64522624",
"0.6441385",
"0.6439679",
"0.6436012",
"0.64096344",
"0.64085054",
"0.6402352",
"0.64019626",
"0.6399918",
"0.63978744",
"0.6396003",
"0.6390752",
"0.63883525",
"0.6382941",
"0.63828284",
"0.6382105",
"0.6380388",
"0.6379623",
"0.6376074",
"0.6361057",
"0.6359874",
"0.6358209",
"0.6353538",
"0.63530093",
"0.6349085",
"0.63480914",
"0.6345249",
"0.6344272",
"0.63353366",
"0.6332538",
"0.6319682",
"0.63182575",
"0.6318235",
"0.6316531",
"0.63145775",
"0.63099676",
"0.63047874",
"0.63022995",
"0.6301638",
"0.62681395",
"0.626423",
"0.626117",
"0.62574023",
"0.6255246",
"0.62550366",
"0.6244726",
"0.6241652",
"0.6238302",
"0.6228588",
"0.62232995",
"0.62179136",
"0.6216483",
"0.6215177",
"0.62088907",
"0.6203089",
"0.6202338",
"0.6189716",
"0.6188118",
"0.61811393"
] |
0.0
|
-1
|
This method is to create user record
|
public void addUser(user user) {
SQLiteDatabase db = this.getWritableDatabase();
ContentValues values = new ContentValues();
values.put(COLUMN_USER_NAME, user.getName());
values.put(COLUMN_USER_EMAIL, user.getEmail());
values.put(COLUMN_USER_PASSWORD, user.getPassword());
// Inserting Row
db.insert(TABLE_NAME, null, values);
db.close();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void createUser(User user) {\n\n\t}",
"public void createUser() {\r\n\t\tif(validateUser()) {\r\n\t\t\t\r\n\t\t\tcdb=new Connectiondb();\r\n\t\t\tcon=cdb.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tps=con.prepareStatement(\"INSERT INTO t_user (nom,prenom,userName,pass,tel,type,status) values(?,?,?,?,?,?,?)\");\r\n\t\t\t\tps.setString(1, this.getNom());\r\n\t\t\t\tps.setString(2, this.getPrenom());\r\n\t\t\t\tps.setString(3, this.getUserName());\r\n\t\t\t\tps.setString(4, this.getPassword());\r\n\t\t\t\tps.setInt(5, Integer.parseInt(this.getTel().trim()));\r\n\t\t\t\tps.setString(6, this.getType());\r\n\t\t\t\tps.setBoolean(7, true);\r\n\t\t\t\tps.executeUpdate();\r\n\t\t\t\tnew Message().error(\"Fin d'ajout d'utilisateur\");\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tnew Message().error(\"Echec d'ajout d'utilisateur\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}finally {\r\n\t\t\t\tcdb.closePrepareStatement(ps);\r\n\t\t\t\tcdb.closeConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"public String create() {\r\n\t\tuserService.create(userAdd);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"create\";\r\n\t}",
"public void createUser(User user);",
"@Override\n\tpublic void create(User user) {\n\t\t\n\t}",
"private void createUser(String Address, String Phone_number,String needy) {\n // TODO\n // In real apps this userId should be fetched\n // by implementing firebase auth\n if (TextUtils.isEmpty(userId)) {\n userId = mFirebaseDatabase.push().getKey();\n }\n\n com.glitch.annapurna.needy user = new needy(Address,Phone_number,needy);\n\n mFirebaseDatabase.child(userId).setValue(user);\n\n addUserChangeListener();\n }",
"public int createUser(Users user) {\n\t\t int result = getTemplate().update(INSERT_users_RECORD,user.getUsername(),user.getPassword(),user.getFirstname(),user.getLastname(),user.getMobilenumber());\n\t\t\treturn result;\n\t\t\n\t\n\t}",
"private void createNewUser() {\n ContentValues contentValues = new ContentValues();\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.GENDER, getSelectedGender());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.PIN, edtConfirmPin.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.LAST_NAME, edtLastName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.FIRST_NAME, edtFirstName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.STATUS, spnStatus.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.DATE_OF_BIRTH, edtDateOfBirth.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.BLOOD_GROUP, spnBloodGroup.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.IS_DELETED, \"N\");\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.MOBILE_NUMBER, edtMobileNumber.getText().toString());\n contentValues.put(DataBaseConstants.Constants_TBL_CATEGORIES.CREATE_DATE, Utils.getCurrentDateTime(Utils.DD_MM_YYYY));\n\n dataBaseHelper.saveToLocalTable(DataBaseConstants.TableNames.TBL_PATIENTS, contentValues);\n context.startActivity(new Intent(CreatePinActivity.this, LoginActivity.class));\n }",
"UserCreateResponse createUser(UserCreateRequest request);",
"public RecordObject createUser(String token, Object record) throws RestResponseException;",
"@Override\n\tpublic ApplicationResponse createUser(UserRequest request) {\n\t\tUserEntity entity = repository.save(modeltoentity.apply(request));\n\t\tif (entity != null) {\n\t\t\treturn new ApplicationResponse(true, \"Success\", enitytomodel.apply(entity));\n\t\t}\n\t\treturn new ApplicationResponse(false, \"Failure\", enitytomodel.apply(entity));\n\t}",
"CreateUserResult createUser(CreateUserRequest createUserRequest);",
"boolean create(User user) throws Exception;",
"int createUser(User data) throws Exception;",
"public void creatUser(String name, String phone, String email, String password);",
"private void createAccount()\n {\n // check for blank or invalid inputs\n if (Utils.isEmpty(edtFullName))\n {\n edtFullName.setError(\"Please enter your full name.\");\n return;\n }\n\n if (Utils.isEmpty(edtEmail) || !Utils.isValidEmail(edtEmail.getText().toString()))\n {\n edtEmail.setError(\"Please enter a valid email.\");\n return;\n }\n\n if (Utils.isEmpty(edtPassword))\n {\n edtPassword.setError(\"Please enter a valid password.\");\n return;\n }\n\n // check for existing user\n AppDataBase database = AppDataBase.getAppDataBase(this);\n User user = database.userDao().findByEmail(edtEmail.getText().toString());\n\n if (user != null)\n {\n edtEmail.setError(\"Email already registered.\");\n return;\n }\n\n user = new User();\n user.setId(database.userDao().findMaxId() + 1);\n user.setFullName(edtFullName.getText().toString());\n user.setEmail(edtEmail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n\n database.userDao().insert(user);\n\n Intent intent = new Intent(this, LoginActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent);\n }",
"User createUser();",
"public void create() throws DuplicateException, InvalidUserDataException, \n NoSuchAlgorithmException, SQLException {\n\tUserDA.create(this);\n }",
"public void insertUser() {}",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n if (CREATE_USER_REQUEST_CODE == requestCode && RESULT_OK == resultCode){\n if (data != null) {\n String username = data.getStringExtra(UserCreationActivity.BUNDLE_NEW_USER_NAME);\n\n User user = new User(username, User.EMPTY_CASE, User.EMPTY_CASE);\n\n createUser(user);\n }\n }\n }",
"public String createUserAction()throws Exception{\n\t\tString response=\"\";\n\t\tresponse=getService().getUserMgmtService().createNewUser(\n\t\t\t\tgetAuthBean().getUserName(),\n\t\t\t\tgetAuthBean().getFirstName(),\n\t\t\t\tgetAuthBean().getLastName(),\n\t\t\t\tgetAuthBean().getEmailId(),\n\t\t\t\tgetAuthBean().getRole()\n\t\t);\n\t\tgetAuthBean().setResponse(response);\n\t\tinputStream = new StringBufferInputStream(response);\n\t\tinputStream.close();\n\t\treturn SUCCESS;\n\t}",
"private void insert() {//将数据录入数据库\n\t\tUser eb = new User();\n\t\tUserDao ed = new UserDao();\n\t\teb.setUsername(username.getText().toString().trim());\n\t\tString pass = new String(this.pass.getPassword());\n\t\teb.setPassword(pass);\n\t\teb.setName(name.getText().toString().trim());\n\t\teb.setSex(sex1.isSelected() ? sex1.getText().toString().trim(): sex2.getText().toString().trim());\t\n\t\teb.setAddress(addr.getText().toString().trim());\n\t\teb.setTel(tel.getText().toString().trim());\n\t\teb.setType(role.getSelectedIndex()+\"\");\n\t\teb.setState(\"1\");\n\t\t\n\t\tif (ed.addUser(eb) == 1) {\n\t\t\teb=ed.queryUserone(eb);\n\t\t\tJOptionPane.showMessageDialog(null, \"帐号为\" + eb.getUsername()\n\t\t\t\t\t+ \"的客户信息,录入成功\");\n\t\t\tclear();\n\t\t}\n\n\t}",
"@Override\n\tpublic int create(Users user) {\n\t\tSystem.out.println(\"service:creating new user...\");\n\t\treturn userDAO.create(user);\n\t}",
"@Override\n public void createUser(User user) {\n run(()->{this.userDAO.save(user);});\n\n }",
"void createUser() throws SQLException {\n String name = regName.getText();\n String birthdate = regAge.getText();\n String username = regUserName.getText();\n String password = regPassword.getText();\n String query = \" insert into users (name, birthdate, username, password)\"\n + \" values (?, ?, ?, ?)\";\n\n DB.registerUser(name, birthdate, username, password, query);\n }",
"public void createUser() {\n try {\n conn = dao.getConnection();\n\n ps = conn.prepareStatement(\"INSERT INTO Users(username, password) VALUES(?, ?)\");\n ps.setString(1, this.username);\n ps.setString(2, this.password);\n\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"private void saveUserDetails() {\n UserModel userModel = new UserModel();\n userModel.setUserName(editUserName.getText().toString());\n userModel.setPassword(editPassword.getText().toString());\n\n /* if (db.insertUserDetils(userModel)) {\n //Toast.makeText(LoginActivity.this, \"Successfully save\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, \"Data not Saved\", Toast.LENGTH_SHORT).show();\n }*/\n }",
"public UserRecord(Integer idUser, String name, String surname, String title, LocalDateTime dateBirth, LocalDateTime dateCreate, LocalDateTime dateUpdate, LocalDateTime dateDelete, String govId, String username, String password, String email, String gender, String status) {\n super(User.USER);\n\n set(0, idUser);\n set(1, name);\n set(2, surname);\n set(3, title);\n set(4, dateBirth);\n set(5, dateCreate);\n set(6, dateUpdate);\n set(7, dateDelete);\n set(8, govId);\n set(9, username);\n set(10, password);\n set(11, email);\n set(12, gender);\n set(13, status);\n }",
"User createUser(UserCreationModel user);",
"public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}",
"User createUser(User user);",
"@Override\r\n\tpublic void postRequest(Request request, Response response) {\r\n\t\tcreateUser(request, response);\r\n\t}",
"public void create(String userName, String password, String userFullname,\r\n\t\t\tString userSex, int userTel, String role);",
"@RequestMapping(value=\"\", method=RequestMethod.POST, consumes=MediaType.MULTIPART_FORM_DATA_VALUE, produces = \"application/json\")\n\tpublic @ResponseBody Object createUser(@RequestParam String userName, @RequestParam String userPassword, @RequestParam String userFirstName, \n\t\t\t@RequestParam String userLastName, @RequestParam String userPicURL,@RequestParam String userEmail, @RequestParam String userEmployer,\n\t\t\t@RequestParam String userDesignation, @RequestParam String userCity, @RequestParam String userState, @RequestParam(required=false) String programId, \n\t\t\t@RequestParam long updatedBy, @RequestParam String userExpertise, @RequestParam String userRoleDescription,\n\t\t\t@RequestParam String userPermissionCode, @RequestParam String userPermissionDescription, HttpServletRequest request, HttpServletResponse response) {\n\t\treturn userService.createUser(userName, userPassword, userFirstName, userLastName, userPicURL, userEmail, userEmployer, userDesignation, userCity, userState, programId, updatedBy, userExpertise, userRoleDescription, userPermissionCode, userPermissionDescription, request, response);\n\t}",
"public void createUser() throws ServletException, IOException {\n\t\tString fullname = request.getParameter(\"fullname\");\n\t\tString password = request.getParameter(\"password\");\n\t\tString email = request.getParameter(\"email\");\n\t\tUsers getUserByEmail = productDao.findUsersByEmail(email);\n\t\t\n\t\tif(getUserByEmail != null) {\n\t\t\tString errorMessage = \"we already have this email in database\";\n\t\t\trequest.setAttribute(\"message\", errorMessage);\n\t\t\t\n\t\t\tString messagePage = \"message.jsp\";\n\t\t\tRequestDispatcher requestDispatcher = request.getRequestDispatcher(messagePage);\n\t\t\trequestDispatcher.forward(request, response);\n\t\t}\n\t\t// create a new instance of users class;\n\t\telse {\n\t\t\tUsers user = new Users();\n\t\t\tuser.setPassword(password);\n\t\t\tuser.setFullName(fullname);\n\t\t\tuser.setEmail(email);\n\t\t\tproductDao.Create(user);\n\t\t\tlistAll(\"the user was created\");\n\t\t}\n\n\t\t\n\t}",
"public static void createUser(String name, Record record) {\n\t\tEntity user = getUser(name);\n\t\tif(user == null) {\n\t\t\tuser = new Entity(\"User\", name);\n\t\t\tuser.setProperty(\"record\", record);\n\t\t}\n\t\tUtil.persistEntity(user);\n\t}",
"private void createUser(String username) {\n if (TextUtils.isEmpty(username)) {\n Toast.makeText(this, \"Username Field Required!\", Toast.LENGTH_SHORT).show();\n return;\n }else {\n FirebaseUser current_user = FirebaseAuth.getInstance().getCurrentUser();\n String userID = current_user.getUid();\n User user = new User(et_username.getText().toString(), et_gender.getText().toString(), \"Newbie\", \"Online\", \"Active\", userID, \"default_url\");\n mRef.child(mAuth.getCurrentUser().getUid()).setValue(user);\n }\n }",
"User create(final User user) throws DatabaseException;",
"public UserAuthToken createUser(CreateUserRequest request);",
"public void createUserAccount(UserAccount account);",
"public boolean createUser() {\r\n\t\tboolean signupSuccess = false;\r\n\t\t/**\r\n\t\t*\tSince connecting to database (DbConnection()) and retrieving data (fetchSelectAllUsers())\r\n\t\t* throw SQLException and throwing an exception from multiple levels again and again is not\r\n\t\t*\ta good way, so its is needed to catch the exception here.\r\n\t\t*/\r\n\t\ttry {\r\n\t\t\t/**\r\n\t\t\t*\tCreate a connection to the database\r\n\t\t\t*/\r\n\t\t\tDbConnection signupConn = new DbConnection();\r\n\t\t\t/**\r\n\t\t\t*\tinsert data into table\r\n\t\t\t*/\r\n\t\t\tsignupSuccess = signupConn.executeInsertIntoUsers(uName, password, fullName, phone, email);\r\n\r\n\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSystem.out.println(\"**************Error Connecting to the Database**************\");\r\n\t\t\tSqlExcep.printStackTrace();\r\n\t\t} catch (ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\t//validateConn.closeDbConnection();\r\n\t\t\t} catch(SQLException SqlExcep) {\r\n\t\t\t\tSqlExcep.printStackTrace();\r\n\t\t\t}*/\r\n\t\t}\r\n\t\treturn signupSuccess;\r\n\t}",
"private void CreateUserAccount(final String lname, String lemail, String lpassword, final String lphone, final String laddress, final String groupid, final String grouppass ){\n mAuth.createUserWithEmailAndPassword(lemail,lpassword).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //account creation successful\n showMessage(\"Account Created\");\n //after user account created we need to update profile other information\n updateUserInfo(lname, pickedImgUri,lphone, laddress, groupid, grouppass, mAuth.getCurrentUser());\n }\n else{\n //account creation failed\n showMessage(\"Account creation failed\" + task.getException().getMessage());\n regBtn.setVisibility(View.VISIBLE);\n loadingProgress.setVisibility(View.INVISIBLE);\n\n }\n }\n });\n }",
"public static void CreateUser(Messenger esql){\n try{\n System.out.print(\"\\tEnter user login: \");\n String login = in.readLine();\n System.out.print(\"\\tEnter user password: \");\n String password = in.readLine();\n System.out.print(\"\\tEnter user phone: \");\n String phone = in.readLine();\n //Creating empty contact\\block lists for a user\n esql.executeUpdate(\"INSERT INTO USER_LIST(list_type) VALUES ('block')\");\n int block_id = esql.getCurrSeqVal(\"user_list_list_id_seq\");\n esql.executeUpdate(\"INSERT INTO USER_LIST(list_type) VALUES ('contact')\");\n int contact_id = esql.getCurrSeqVal(\"user_list_list_id_seq\");\n String query = String.format(\"INSERT INTO USR (phoneNum, \" +\n \"login, password, block_list, \" + \n \"contact_list) VALUES ('%s','%s','%s',%s,%s)\"\n , phone, login, password, block_id, contact_id);\n\n esql.executeUpdate(query);\n System.out.println (\"User successfully created!\");\n }catch(Exception e){\n System.err.println (e.getMessage ());\n }\n }",
"@Override\n\tpublic void createUser(User user) {\n\t\tSystem.out.println(\"INSIDE create user function\");\n\t\tem.persist(user);\n\t\t\t\n\t}",
"private void CreateUser(){\n String uid = currUser.getUid();\n Map<String, Object> userMap = new HashMap<>();\n\n //add the user details to the userMap\n userMap.put(\"car-make\", \"\");\n userMap.put(\"firstname\", \"firstname\");\n userMap.put(\"lastname\", \"lastname\");\n userMap.put(\"registration-no\", \"\");\n userMap.put(\"seats-no\", 0);\n userMap.put(\"user-email\", currUser.getEmail());\n userMap.put(\"user-id\", currUser.getUid());\n userMap.put(\"p-ride\", null);\n userMap.put(\"d-ride\", null);\n userMap.put(\"latitude\", null);\n userMap.put(\"longitude\", null);\n userMap.put(\"rating\", -1);\n userMap.put(\"amountOfRatings\", 0);\n userMap.put(\"ride-price\", null);\n\n //set the details into the database\n dataStore.collection(\"users\").document(uid)\n .set(userMap)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void v) {\n Log.d(TAG, \"User was added to the db\");\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.w(TAG, \"Exception: \", e);\n }\n });\n }",
"@RequestMapping(value=\"/user\",method=RequestMethod.POST)\n\tpublic @ResponseBody ResponseEntity<User> createUser(@RequestBody User userDetails) throws Exception{\n\t\tUser user=null;\n\t\n\t\t//for checking update user \n\t\tuser=userDAO.findOne(userDetails.getId());\n\t\tif (user==null){\n\t\t\t//insert new user \n\t\t\ttry{\n\t\t\t\tuser=new User(userDetails.getEmail(),userDetails.getName(),userDetails.getContact(),userDetails.getIsActive(), new Date(),new Date());\n\t\t\t\tuserDAO.save(user);\n\t\t\t\t}catch(Exception e){\n\t\t\t\t\tthrow new Exception(\"Exception in saving user details...\",e);\n\t\t\t\t}\n\t\t}else{ \n\t\t\t\tuserDetails.setCreationTime(user.getCreationTime());\n\t\t\t\tuserDetails.setLastModifiedTime(new Date());\n\t\t\t\tuserDAO.save(userDetails);\n\t\t\t}\n\t\t\n\t\t\treturn new ResponseEntity<User>(user, HttpStatus.OK);\n\t}",
"private void createNewAccount() {\n\n // if user has not provided valid data, do not create an account and return from method\n if (!validateData()) {\n return;\n }\n\n // If flag value is false, that means email provided by user doesn't exists in database\n // so initialize the loader to create a new account\n if (!mEmailExistsFlag) {\n getLoaderManager().initLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n } else {\n // If flag is true, that means email provided by user already exists in database\n // so restart the loader and allow user to enter new email address for account\n getLoaderManager().restartLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n }\n\n }",
"UserModel createUserModel(UserModel userModel);",
"Human_User createHuman_User();",
"Long insert(User record);",
"@Override\n\tpublic User Create(User t) {\n\t\tsessionFactory.getCurrentSession().save(t);\n\t\t\n\t\treturn t;\n\t}",
"@BeforeClass(alwaysRun = true)\r\n\tpublic void createUser() throws ParseException, SQLException, JoseException {\r\n\t\tSystem.out.println(\"******STARTING***********\");\r\n\t\tUser userInfo = User.builder().build();\r\n\t\tuserInfo.setUsername(userName);\r\n\t\tuserInfo.setPassword(\"Test@123\");\r\n\t\tsessionObj = EnvSession.builder().cobSession(config.getCobrandSessionObj().getCobSession())\r\n\t\t\t\t.path(config.getCobrandSessionObj().getPath()).build();\r\n\t\t//userHelper.getUserSession(\"InsightsEngineusers26 \", \"TEST@123\", sessionObj); \r\n\t\tuserHelper.getUserSession(userInfo, sessionObj);\r\n\t\tlong providerId = 16441;\r\n\t\tproviderAccountId = providerId;\r\n\t\tResponse response = providerAccountUtils.addProviderAccountStrict(providerId, \"fieldarray\",\r\n\t\t\t\t\"budget1_v1.site16441.1\", \"site16441.1\", sessionObj);\r\n\t\tproviderAccountId = response.jsonPath().getLong(JSONPaths.PROVIDER_ACC_ID);\r\n\t\tAssert.assertTrue(providerAccountId!=null);\r\n\t\t\r\n\t\t}",
"@Override\n\tpublic boolean create(User user) {\n\t\treturn false;\n\t}",
"Utilizator createUser(String username, String password, String nume,\n\t\t\tString prenume, String tip, String aux);",
"User create(User user);",
"@Override\r\n\tpublic int insert(User record) {\n\t\treturn userDao.insert(record);\r\n\t}",
"Boolean registerNewUser(User user);",
"public boolean create(UserDTO user){\r\n error = \"\";\r\n boolean check = checkMail(user.getEmail());\r\n if(check){\r\n try {\r\n PreparedStatement preSta = conn.prepareStatement(sqlInsertUser);\r\n preSta.setString(1, user.getEmail());\r\n preSta.setString(2, user.getPassword());\r\n preSta.setInt(3, user.getRole());\r\n if(preSta.executeUpdate() > 0){\r\n return true;\r\n }\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(UserDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }\r\n return false;\r\n \r\n }",
"@Test\n public void createUser() {\n Response response = regressionClient.createUser();\n dbAssist.responseValidation(response);\n }",
"public void create() {\n String salt = PasswordUtils.getSalt(30);\n\n // Protect user's password. The generated value can be stored in DB.\n String mySecurePassword = PasswordUtils.generateSecurePassword(password, salt);\n\n // Print out protected password\n System.out.println(\"My secure password = \" + mySecurePassword);\n System.out.println(\"Salt value = \" + salt);\n Operator op = new Operator();\n op.setUsername(username);\n op.setDescription(description);\n op.setSalt(salt);\n op.setPassword(mySecurePassword);\n op.setRol(rol);\n operatorService.create(op);\n message = \"Se creo al usuario \" + username;\n username = \"\";\n description = \"\";\n password = \"\";\n rol = null;\n }",
"@Override\n\tpublic void createUserProfile(User user) throws Exception {\n\n\t}",
"private void register_user() {\n\n\t\tHttpRegister post = new HttpRegister();\n\t\tpost.execute(Config.URL + \"/api/newuser\");\n\n\t}",
"private void createAccount() {\n mAuth.createUserWithEmailAndPassword(mTextEmail.getText().toString(), mTextPassword.getText().toString()).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n if(!task.isSuccessful()){\n Toast.makeText(SignInActivity.this, \"Account creation failed!\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(SignInActivity.this, \"Account creation success!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }",
"int insert(BaseUser record);",
"@PostMapping(\"/user/new/\")\n\tpublic userprofiles createUser(@RequestParam String firstname, @RequestParam String lastname, @RequestParam String username, @RequestParam String password, @RequestParam String pic) {\n\t\treturn this.newUser(firstname, lastname, username, password, pic);\n\t}",
"@Override\r\n\tpublic void postCreate(User u) {\n\t\tthis.created = LocalDateTime.now();\r\n\t\tthis.createdBy = (FaqUser) u;\r\n\t\t\r\n\t}",
"private User createUser(org.picketlink.idm.model.User picketLinkUser) {\n User user = new User(picketLinkUser.getLoginName());\n user.setFullName(picketLinkUser.getFirstName() + \" \" + picketLinkUser.getLastName());\n user.setShortName(picketLinkUser.getLastName());\n return user;\n }",
"int insert(User record);",
"int insert(User record);",
"int insert(User record);",
"int insert(User record);",
"int insert(User record);",
"int insert(User record);",
"int insert(User record);",
"int insert(User record);",
"public void addUser(String id, String display_name, String phone, String national_number, String country_prefix, String created_at) {\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n\r\n ContentValues values = new ContentValues();\r\n values.put(User.KEY_UID, id); // FirstName //values.put(User.KEY_FIRSTNAME, id); // FirstName\r\n values.put(\"display_name\", display_name); // LastName\r\n values.put(\"phone\", phone); // Email\r\n values.put(\"national_number\", national_number); // UserName\r\n values.put(\"country_prefix\", country_prefix); // Email\r\n values.put(User.KEY_CREATED_AT, created_at); // Created At\r\n\r\n // Inserting Row\r\n db.insert(User.TABLE_USER_NAME, null, values);\r\n db.close(); // Closing database connection\r\n }",
"@RequestMapping(\"/createnewuser\")\r\n\tpublic ModelAndView userCreated(@ModelAttribute(\"rg\") Register reg) {\r\n\t\t\r\n\t\tBigInteger num = reg.getMb_no();\r\n\t\tSystem.out.println(\"mbno=\"+num.toString());\r\n\t\t//Doing the entry of New User in Spring_Users table\r\n\t\t\r\n\t\tString username = reg.getEmail_id();\r\n\t\tString password = reg.getPassword();\r\n\t\tSpringUsers su = new SpringUsers();\r\n\t\tsu.setUsername(username);\r\n\t\tsu.setPassword(password);\r\n\t\tsu.setEnabled(1);\r\n\t\tSystem.out.println(\"username=\"+username);\r\n\t\tSystem.out.println(\"password=\"+password);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString r = reg.getUser_type();\r\n\t\t\r\n\t\t//if(r.equals(\"ROLE_INDIVIDUAL\"))\r\n\t\t\t//return new ModelAndView(\"individualhomepage\");\r\n\t\t//if(r.equals(\"ROLE_BROKER\"))\r\n\t//\t\treturn new ModelAndView(\"brokerhomepage\");\r\n\t\t//if(r.equals(\"ROLE_BUILDER\"))\r\n\t\t//\treturn new ModelAndView(\"builderhomepage\");\r\n\t\t\r\n\t//\tint i = susvc.entryOfNewUser(su);\r\n\t\t\r\n\t\tint j = regsvc.registerNewUser(reg);\r\n\t\t \r\n\t\treturn new ModelAndView(\"usercreated\");\r\n\r\n\t}",
"@Override\r\n\tpublic boolean createUser(Utilisateur u) {\n\t\treturn false;\r\n\t}",
"@RequestMapping(value = \"/join\", method = RequestMethod.POST)\n public String createUser(@RequestBody UserDto userDto, Model model) {\n if (userDto == null) {\n return \"user1\";\n }\n User user = new User();\n user.setEmail(userDto.getEmail());\n user.setPass(userDto.getPass());\n userService.createUser(user);\n model.addAttribute(\"email\", user.getEmail());\n model.addAttribute(\"pass\", user.getPass());\n return \"one_product\";\n }",
"public static void createUser(User user) {\n URL url = null;\n HttpURLConnection connection = null;\n final String methodPath = \"/entities.credential/\";\n try {\n Gson gson = new Gson();\n String stringUserJson = gson.toJson(user);\n url = new URL(BASE_URI + methodPath);\n // open connection\n connection = (HttpURLConnection) url.openConnection();\n // set time out\n connection.setReadTimeout(10000);\n connection.setConnectTimeout(15000);\n // set connection method to POST\n connection.setRequestMethod(\"POST\");\n // set the output to true\n connection.setDoOutput(true);\n // set length of the data you want to send\n connection.setFixedLengthStreamingMode(stringUserJson.getBytes().length);\n // add HTTP headers\n connection.setRequestProperty(\"Content-Type\", \"application/json\");\n\n // send the POST out\n PrintWriter out = new PrintWriter(connection.getOutputStream());\n out.print(stringUserJson);\n out.close();\n Log.i(\"error\", new Integer(connection.getResponseCode()).toString());\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n connection.disconnect();\n }\n }",
"@FXML\n\tpublic void createUser(ActionEvent event) {\n\t\tString empty = \"\";\n\t\tString name = txtUserNames.getText();\n\t\tString lastName = txtUserSurnames.getText();\n\t\tString id = txtUserId.getText();\n\t\tString username = txtUserUsername.getText();\n\t\tString password = PfUserPassword.getText();\n\n\t\tif (!name.equals(empty) && !lastName.equals(empty) && !id.equals(empty) && !username.equals(empty)\n\t\t\t\t&& !password.equals(empty)) {\n\t\t\tcreateSystemUser(name, lastName, id, username, password);\n\t\t\ttxtUserNames.setText(\"\");\n\t\t\ttxtUserSurnames.setText(\"\");\n\t\t\ttxtUserId.setText(\"\");\n\t\t\ttxtUserUsername.setText(\"\");\n\t\t\tPfUserPassword.setText(\"\");\n\t\t\t// labelUserMessage.setText(\"The user has been created\");\n\t\t} else if (name.equals(empty) && lastName.equals(empty) && id.equals(empty) && username.equals(empty)\n\t\t\t\t&& password.equals(empty)) {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.setContentText(\"Todos los campos de texto deben ser llenados\");\n\t\t\tdialog.show();\n\t\t}\n\t}",
"@RequestMapping(value = \"create\", method = RequestMethod.POST)\n\tpublic String create(@ModelAttribute(\"usermodel\") User user, Errors errors)\n\t\t\tthrows NoSuchAlgorithmException, IOException {\n\t\tuser.setId(0);\n\t\tvalidator.validate(user, errors);\n\t\tif (errors.hasErrors()) {\n\t\t\treturn VIEW_DEFAULT;\n\t\t}\n\t\tuser.setCreated(new Date());\n\t\tString password = user.getPassword();\n\t\tStandardPasswordEncoder encoder = new StandardPasswordEncoder();\n String encodedPassword = encoder.encode(password);\n user.setPassword(encodedPassword);\n String uuid = UUID.randomUUID().toString();\n user.setUuid(uuid);\n user.setStatus(EnumStatus.INACTIVE.toString());\n // if there is the inactive user, update it with new data\n User userDb = userRepository.findInactiveByEmail(user.getEmail());\n if (userDb != null) {\n \tuser.setId(userDb.getId());\n }\n userRepository.save(user);\n\n // send registration email\n sendRegistrationEmail(user.getEmail(), uuid);\n\n\t\treturn VIEW_EMAIL_SENT;\n\t}",
"private void createUser(final String email, final String password) {\n\n }",
"@Override\n\tpublic int insert(User record) {\n\t\treturn userMapper.insert(record);\n\t}",
"public void addUser(String name, String email, String uid, String created_at,String address,String number) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_NAME, name); // Name\n values.put(KEY_EMAIL, email); // Email\n values.put(KEY_UID, uid); // Email\n values.put(KEY_CREATED_AT, created_at); // Created At\n values.put(KEY_ADDRESS, address);\n values.put(KEY_NUMBER, number);\n\n // Inserting Row\n long id = db.insert(TABLE_USER, null, values);\n db.close(); // Closing database connection\n\n Log.d(TAG, \"New user inserted into sqlite: \" + id);\n }",
"int insert(UUser record);",
"@Override\npublic String createUser(String userAccount, String userPassword,\n\t\tString userSex, String userEmail, String userName) {\n\t\n\tUser user = new User(userAccount, userPassword, userSex , userEmail, userName);\n\tem.persist(user) ;\n\t return \n\t\t\t \"Account: \" + user.getUserAccount() + \"\\n\" +\n\t\t\t\"Password: \" + user.getUserPassword() + \"\\n\" + \n\t\t\t\"Sex: \" + user.getUserSex() + \"\\n\" +\n\t\t\t\"Email: \" + user.getUserEmail() + \"\\n\" +\n\t\t\t\"Name: \" + user.getUserName();\n\n\t\n}",
"private void setCreateUser(entity.User value) {\n __getInternalInterface().setFieldValue(CREATEUSER_PROP.get(), value);\n }",
"public boolean createUser(UserProfile userProfile) {\n\t\tmongoTemplate.insert(userProfile, \"UserProfile_Details\");\n\t\treturn true;\n\t}",
"@PostMapping(value = \"/createUser\", consumes = MediaType.APPLICATION_JSON_VALUE, \n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic RestResponse<UserResource> createUser(HttpServletRequest request) throws SQLException {\n\t\tString userName = WebUtil.getCookieValue(request.getCookies(), \"USERNAME\");\n\t\tString uuID = (String)request.getAttribute(\"uuid\");\n\t\tString emailID = (String)request.getAttribute(\"email\");\n\t\tString firstName = (String)request.getAttribute(\"firstname\");\n\t\tString lastName = (String)request.getAttribute(\"lastname\");\n\t\tString browserVersion = request.getHeader(\"user-agent\");\n\t\tString clientAddress = request.getHeader(\"x-forwarded-for\");\n\t\t\n\t\tlogDebug(LOG, \"User Details : {}, {}, {}, {}, {}, {}, {} \", userName, uuID, emailID, firstName, lastName,\n\t\t\t\tbrowserVersion, clientAddress); \n\t\t\n\t\tRestResponse<UserResource> restResponse = new RestResponse<>(SUCCESS);\n\t\ttry {\n\t\t\tUserResource userDetails = userCreationService.createUser(userName, uuID, firstName, lastName, emailID, clientAddress, browserVersion);\n\t\t\tif(StringUtils.isBlank(userDetails.getUserKey())) {\n\t\t\t\trestResponse.setStatus(ERROR);\n\t\t\t\trestResponse.setErrorMessage(\"Exception occured while retrieving details.\");\n\t\t\t}\n\t\t\tif(StringUtils.isNotBlank(userDetails.getErrorMsg()))\t{\n\t\t\t\trestResponse.setStatus(ERROR);\n\t\t\t\trestResponse.setErrorMessage(userDetails.getErrorMsg());\t\t\t\n\t\t\t}\n\t\t\trestResponse.setResult(userDetails);\n\t\t} catch (Exception e) { // this is for inactive.\n\t\t\trestResponse.setStatus(ERROR);\n\t\t\trestResponse.setErrorMessage(\"You do not have any active roles in the system. Please contact your Supervisor to activate roles.\");\n\t\t\tLOG.error(\"Exception while executing createUser service \", e);\n\t\t}\n\t\treturn restResponse;\n\t\t\n\t}",
"public long create_user(User user)\r\n\t{ \r\n\t long id = 0; //id de la tabla user (único) \r\n\r\n\t try \r\n\t { \r\n\t iniciaOperacion(); \r\n\t id = (Long)sesion.save(user); //metodo para guardar cliente (del objeto hibernate.sesion) \r\n\t tx.commit(); \r\n\t }catch(HibernateException he) \r\n\t { \r\n\t manejaExcepcion(he);\r\n\t throw he; \r\n\t }finally \r\n\t { \r\n\t sesion.close(); \r\n\t } \r\n\t return id; \r\n\t}",
"public boolean createNewUser(String username){\n boolean isCreated=false;\n try{\n\n database = dbH.getWritableDatabase();\n dbH.openDataBase();\n database.execSQL(\"INSERT INTO CurrentUser (Username) VALUES ('\" + username + \"');\");\n isCreated=true;\n dbH.close();\n }\n catch (SQLException e){\n }\n return isCreated;\n }",
"int insert(Userinfo record);",
"@Headers({\n \"Content-Type:application/json\"\n })\n @POST(\"administrators\")\n Call<Void> createUser(\n @retrofit2.http.Body UserBody userBody\n );",
"public void createAndAddUser(String fName, String lName){\n ModelPlayer user = new ModelPlayer(fName, lName);\n user.setUserID(this.generateNewId());\n userListCtrl.addUser(user);\n }",
"public User createUser() {\n printer.println(\"Welcome! Enter you name and surname:\");\n printer.println(\"Name:\");\n String name = input.nextString();\n printer.println(\"Surname:\");\n String surname = input.nextString();\n return new User(name, surname);\n }",
"public void createAccount() {\n\t\t// Assigns variables based on user input\n\t\tString username = usernameField.getText();\n\t\tString firstName = firstNameField.getText();\n\t\tString lastName = lastNameField.getText();\n\t\tString address = addressField.getText();\n\t\tString postCode = postcodeField.getText();\n\t\tString phoneNumber = phoneNumberField.getText();\n\t\tlong phoneNumberLong;\n\t\tif (username.isEmpty() || firstName.isEmpty() || lastName.isEmpty() || address.isEmpty() || postCode.isEmpty()\n\t\t\t\t|| phoneNumber.isEmpty()) { // Checks if number is correct format\n\n\t\t\tAlert alert = new Alert(AlertType.ERROR); // Error message\n\t\t\talert.setTitle(\"Error\");\n\n\t\t\talert.setHeaderText(\"Could not create an user\");\n\t\t\talert.setContentText(\"Make sure you fill all fields and press button again\");\n\t\t\talert.showAndWait();\n\n\t\t\treturn;\n\t\t}\n\n\t\telse {\n\t\t\ttry {\n\t\t\t\tphoneNumberLong = Long.parseLong(phoneNumber);\n\t\t\t} catch (Exception e) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\n\t\t\t\talert.setHeaderText(\"Wrong format of phone number\");\n\t\t\t\talert.setContentText(\"Please enter correct phone number\");\n\t\t\t\talert.showAndWait();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif(FileReader.exists(username)) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\n\t\t\t\talert.setHeaderText(\"User with the username \"+ username +\" already exists. \");\n\t\t\t\talert.setContentText(\"Please choose another username\");\n\t\t\t\talert.showAndWait();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tString userdata = \"\";\n\t\t\tuserdata += \"\\n Username: \" + username;\n\t\t\tuserdata += \"\\n First name: \" + firstName;\n\t\t\tuserdata += \"\\n Last name: \" + lastName;\n\t\t\tuserdata += \"\\n Address: \" + address;\n\t\t\tuserdata += \"\\n Post code: \" + postCode;\n\t\t\tuserdata += \"\\n Phone number: \" + phoneNumberLong;\n\t\t\t\n\n\t\t\tif(custom) {\n\t\t\t\tavatarIndex = 101;\n\t\t\t\t// Gives users the custom avatar\n\t\t\t\tFile file1 = new File(\"artworkImages/\" + username);\n\t\t\t\tfile1.mkdir();\n\t\t\t\tPath path = Paths.get(\"customAvatars/\" + username + \".png\");\n\t\t\t\tString path1 = \"tmpImg.png\";\n\t\t\t\tFile file = new File(path1);\n\n\t\t\t\ttry {\n\t\t\t\t\tFiles.copy(file.toPath(), path, StandardCopyOption.REPLACE_EXISTING);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tUser user = new User(username, firstName, lastName, address, postCode, phoneNumberLong, avatarIndex);\n\t\t\tFileReader.addUser(user); // Creates user\n\n\t\t\ttry {\n\t\t\t\tWriter.writeUserFile(user); // Adds user to memory\n\t\t\t} catch (IOException e) {\n\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\n\t\t\tAlert alert = new Alert(AlertType.INFORMATION); // Success message\n\t\t\talert.setTitle(\"Success\");\n\n\t\t\talert.setHeaderText(\"The user has been created\");\n\t\t\talert.setContentText(\"Close this window to return to login screen\");\n\t\t\talert.showAndWait();\n\n\t\t\tcreateAccountButton.getScene().getWindow().hide();\n\t\t}\n\n\t}",
"private void addNewUser() throws Exception, UnitException {\n String firstNameInput = firstName.getText();\n String lastNameInput = lastName.getText();\n String unitInput = unitID.getText();\n String accountInput = accountTypeValue;\n String passwordInput = password.getText();\n User newUserInfo;\n\n // Create user type based on the commandbox input\n switch (accountInput) {\n case \"Employee\":\n newUserInfo = new Employee(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Lead\":\n newUserInfo = new Lead(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Admin\":\n newUserInfo = new Admin(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n default:\n throw new IllegalStateException(\"Unexpected value: \" + accountInput);\n }\n\n // Try adding this new user information to the database, if successful will return success prompt\n try {\n Admin.addUserToDatabase(newUserInfo);\n\n // If successful, output message dialog\n String msg = \"New User \" + firstNameInput + \" \" + lastNameInput + \" with UserID \"\n + newUserInfo.returnUserID() + \" successfully created\";\n JOptionPane.showMessageDialog(null, msg);\n\n // Reset Values\n firstName.setText(\"\");\n lastName.setText(\"\");\n unitID.setText(\"\");\n password.setText(\"\");\n } catch (UserException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }",
"public void createUserAccount(String email, String password, final String userId, final SignUpInterface listner) {\n collectionReference = db.collection(\"Users\");\n firebaseAuth = FirebaseAuth.getInstance();\n firebaseAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if(task.isSuccessful()){\n currentUser = FirebaseAuth.getInstance().getCurrentUser();\n assert currentUser!= null;\n final String currentUserId = currentUser.getUid();\n\n Map<String, String> userMap = new HashMap<>();\n userMap.put(\"UserIdInDB\", currentUserId);\n userMap.put(\"UserName\", userId);\n\n collectionReference.add(userMap)\n .addOnSuccessListener(new OnSuccessListener<DocumentReference>() {\n @Override\n public void onSuccess(DocumentReference documentReference) {\n documentReference.get()\n .addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n if(task.getResult().exists()) {\n\n String name = task.getResult().getString(\"UserName\");\n\n EntityClass entityObj = EntityClass.getInstance();\n entityObj.setUserName(name);\n entityObj.setUserIdInDb(currentUserId);\n listner.signUpStatus(true);\n }\n }\n });\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(TAG, \"onFailure: \" + e.getMessage());\n listner.signUpStatus(false);\n listner.onFailure(e.getMessage());\n }\n });\n }\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(TAG, \"onFailure: \" + e.getMessage());\n listner.signUpStatus(false);\n listner.onFailure(e.getMessage());\n }\n });\n }",
"@Override\n\tpublic String DBcreateUser(String userJson) {\n\t\tUser newUser = (User) jsonToUserPOJO(userJson);\n\t\tString id = userRepository.create(newUser);\n\t\treturn id;\n\t}",
"private void createNewUser(final User unmanagedUser) {\n Realm realm = (mRealm == null) ? Realm.getDefaultInstance() : mRealm;\n //create by administrator\n realm.executeTransaction(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n User u2 = realm.createObject(User.class, PrimaryKeyFactory.getInstance().nextKey(User.class));\n u2.setLoggedIn(false);\n u2.setUserId(unmanagedUser.getUserId());\n\n String password = unmanagedUser.getPassword();\n if (password == null) {\n password = \"\";\n }\n u2.setPassword(password);\n\n u2.setUserName(unmanagedUser.getUserName());\n u2.setStartDate(unmanagedUser.getStartDate());\n u2.setEndDate(unmanagedUser.getEndDate());\n u2.setCreated(new Date());\n u2.setActive(unmanagedUser.getActive());\n u2.setSpecial(false);\n u2.setPermission(unmanagedUser.getPermission());\n u2.setEnabled(unmanagedUser.getEnabled());\n }\n });\n\n if (mRealm == null)\n realm.close();\n }"
] |
[
"0.7792709",
"0.76817775",
"0.76684445",
"0.7643108",
"0.75113225",
"0.743572",
"0.7404015",
"0.73931324",
"0.7374611",
"0.7356148",
"0.73531413",
"0.7317474",
"0.72922105",
"0.72748387",
"0.7246161",
"0.72251266",
"0.71738505",
"0.7128755",
"0.712772",
"0.7108712",
"0.7099678",
"0.70970005",
"0.7086557",
"0.7079056",
"0.706382",
"0.70270574",
"0.7007",
"0.6981691",
"0.69675386",
"0.69637567",
"0.69629043",
"0.69621533",
"0.6960535",
"0.6943856",
"0.6942749",
"0.69344234",
"0.6925969",
"0.69087696",
"0.6901782",
"0.6896633",
"0.6894647",
"0.68929297",
"0.68679833",
"0.68653005",
"0.68599",
"0.6855057",
"0.6837753",
"0.6833259",
"0.6810539",
"0.68058854",
"0.680276",
"0.67779154",
"0.67626375",
"0.67590433",
"0.67401445",
"0.6723408",
"0.6709898",
"0.67064923",
"0.6706486",
"0.67032856",
"0.67027223",
"0.6702301",
"0.6701526",
"0.66962546",
"0.669569",
"0.6685232",
"0.66792685",
"0.66764253",
"0.66764253",
"0.66764253",
"0.66764253",
"0.66764253",
"0.66764253",
"0.66764253",
"0.66764253",
"0.6674336",
"0.6672384",
"0.6672227",
"0.6668398",
"0.6666045",
"0.66615427",
"0.66606426",
"0.6649474",
"0.6645858",
"0.66443044",
"0.66441166",
"0.66346574",
"0.66237146",
"0.6621015",
"0.6619845",
"0.6599223",
"0.65903246",
"0.6587511",
"0.65841895",
"0.65831345",
"0.6582934",
"0.65797",
"0.65782624",
"0.6578135",
"0.65752923",
"0.65737903"
] |
0.0
|
-1
|
This method is to fetch all user and return the list of user records
|
public List<user> getAllUser() {
// array of columns to fetch
String[] columns = {
COLUMN_USER_ID,
COLUMN_USER_EMAIL,
COLUMN_USER_NAME,
COLUMN_USER_PASSWORD
};
// sorting orders
String sortOrder =
COLUMN_USER_NAME + " ASC";
List<user> userList = new ArrayList<user>();
SQLiteDatabase db = this.getReadableDatabase();
// query the user table
/**
* Here query function is used to fetch records from user table this function works like we use sql query.
* SQL query equivalent to this query function is
* SELECT user_id,user_name,user_email,user_password FROM user ORDER BY user_name;
*/
Cursor cursor = db.query(TABLE_NAME, //Table to query
columns, //columns to return
null, //columns for the WHERE clause
null, //The values for the WHERE clause
null, //group the rows
null, //filter by row groups
sortOrder); //The sort order
// Traversing through all rows and adding to list
if (cursor.moveToFirst()) {
do {
user user = new user();
user.setId(Integer.parseInt(cursor.getString(cursor.getColumnIndex(COLUMN_USER_ID))));
user.setName(cursor.getString(cursor.getColumnIndex(COLUMN_USER_NAME)));
user.setEmail(cursor.getString(cursor.getColumnIndex(COLUMN_USER_EMAIL)));
user.setPassword(cursor.getString(cursor.getColumnIndex(COLUMN_USER_PASSWORD)));
// Adding user record to list
userList.add(user);
} while (cursor.moveToNext());
}
cursor.close();
db.close();
// return user list
return userList;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public List<User> allUserRecords() {\n\t\tSystem.out.println(\"Calling getAllUserRecords() Method To Fetch Users Record\");\t\n\t\tList<User> userList = userDAO.listUser();\n\t\treturn userList;\n\t}",
"@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}",
"public List<User> fetchAll()\n {\n String query = \"SELECT * FROM user\";\n RowMapper<User> userRowMapper = new BeanPropertyRowMapper<>(User.class); // a collection type that holds the results of the query\n List<User> userList; // list of users that will be returned\n try\n {\n userList = template.query(query, userRowMapper); // call the database and assign the results to the userList\n } catch (EmptyResultDataAccessException e)\n {\n userList = new ArrayList<>(); // return an empty arrayList\n }\n return userList;\n }",
"public List<TestUser> getAllUsers(){\n\t\tSystem.out.println(\"getting list of users..\");\n\t\tList<TestUser> user=new ArrayList<TestUser>();\n\t\tuserRepositary.findAll().forEach(user::add);\n\t\t//System.out.println(\"data: \"+userRepositary.FindById(\"ff80818163731aea0163731b190c0000\"));\n\t\treturn user;\n\t}",
"@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public List getAllUsers();",
"public List<User> getAllUsers(){\n myUsers = loginDAO.getAllUsers();\n return myUsers;\n }",
"public List<User> getAllUsers();",
"@Override\n public List<User> findAll() {\n try {\n return runner.query(con.getThreadConnection(),\"select * from user\",new BeanListHandler<User>(User.class));\n } catch (SQLException e) {\n System.out.println(\"执行失败\");\n throw new RuntimeException(e);\n }\n }",
"List<User> fetchAllUSers();",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"@Override\r\n\tpublic List<User> getAllUser() {\n\t\tList<User> listStudents = new ArrayList<User>();\r\n\t\tlistStudents = userReposotory.findAll();\r\n\t\treturn listStudents;\r\n\t}",
"@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }",
"@Override\n\tpublic List<User> getAllUser() {\n\t\tList<User> users = dao.searchAllUser();\n\t\treturn users;\n\t}",
"public List<User> getAllUsers(){\n return userRepository.findAll();\n }",
"List<User> getAllUsers();",
"List<User> getAllUsers();",
"@GetMapping(\"/allusers\")\n\t@Secured({CommonConstants.ROLE_EMPLOYEE,CommonConstants.ROLE_ADMIN})\n\tpublic ResponseEntity<List<UserEntity>> fetchUsers(){\n\t\treturn new ResponseEntity<List<UserEntity>>(this.service.findAll(), HttpStatus.OK);\n\t}",
"@Override\n\tpublic ArrayList<User> findAll() {\n\t\t\n\t\treturn userDao.querydAll();\n\t}",
"@Override\n\tpublic List<User> getAll() {\n\t\treturn userDao.getAll();\n\t}",
"@Override\n\tpublic List<User> FetchAll() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic List<User> list() \n\t{\n\t\treturn userDAO.list();\n\t}",
"public List<User> findAll() \n\t{\n\t\tString sql = \"SELECT * FROM VIDEOGAMESTORE.USERS\";\n\t\t\n\t\t// Instantiate a new list of Users.\n\t\tList<User> userList = new ArrayList<User>();\n\t\t\n\t\ttry {\n\t\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(sql);\n\t\t\twhile(srs.next())\n\t\t\t{\n\t\t\t\t// Add a new User to the list for every row that is returned\n\t\t\t\tuserList.add(new User(srs.getString(\"USERNAME\"), srs.getString(\"PASSWORD\"), srs.getString(\"EMAIL\"),\n\t\t\t\t\t\tsrs.getString(\"FIRST_NAME\"), srs.getString(\"LAST_NAME\"), srs.getInt(\"GENDER\"), srs.getInt(\"USER_PRIVILEGE\"), srs.getInt(\"ID\")));\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn userList;\n\t}",
"public List<Users> getUserList(){\n\t\tList<Users> users = (List<Users>) this.userDao.findAll();\n\t\treturn users;\n\t}",
"@Override\n public List<User> getAllUsers() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n List<User> hiberusers =\n session.createQuery(\"From User\").list();\n tx.commit();\n session.close();\n return hiberusers;\n }",
"@Override\n public List<User> findAll() {\n return dao.findAll();\n }",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}",
"public List<User> queryAllUsers() {\n \tList<User> userList = new ArrayList<>();\n\tUser user;\n String sql = \"SELECT * FROM users\";\n\ttry {\t\n this.statement = connection.prepareStatement(sql);\n this.resultSet = this.statement.executeQuery();\n while(this.resultSet.next()) {\n\t\tuser = new User();\n user.setUserName(this.resultSet.getString(\"user_name\"));\n user.setHashedPassword(this.resultSet.getString(\"hashed_password\"));\n\t\tuser.setEmail(this.resultSet.getString(\"email\"));\n user.setHashedAnswer(this.resultSet.getString(\"hashed_answer\"));\n user.setIsActivated(this.resultSet.getInt(\"is_activated\"));\n user.setPublicKey(this.resultSet.getString(\"pubkey\"));\n\t\tuserList.add(user);\n }\t\n this.statement.close();\n\t} \n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return userList;\n }",
"@Override\n public List<User> selectAllUsers() {\n\n List<User> userList = new ArrayList<>();\n\n try (Connection connection = DriverManager.getConnection(URL, USERNAME, PASSWORD)) {\n\n String sql = \"SELECT * FROM ers_users\";\n\n PreparedStatement ps = connection.prepareStatement(sql);\n\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n\n userList.add(\n new User(\n rs.getInt(1)\n , rs.getString(2)\n , rs.getString(3)\n , rs.getString(4)\n , rs.getString(5)\n , rs.getString(6)\n , rs.getInt(7)\n )\n );\n }\n }\n\n catch (SQLException e) {\n\n e.printStackTrace();\n }\n\n return userList;\n }",
"@Override\n\tpublic List All() {\n\t\treturn new userDaoImpl().All();\n\t}",
"public List<User> getAll() {\n\t\treturn service.getAll();\n\t}",
"public List<User> retrieveAllUsers() {\n\t\treturn (List<User>) userRepository.findAll();\n\t}",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn mapper.findAllUser();\n\t}",
"@Override\r\n\tpublic List findAll() {\n\t\treturn usermaindao.findAll();\r\n\t}",
"@GetMapping(\"/all\")\r\n\tpublic List<Users> findAll()\r\n\t{\r\n\t\treturn userJPARepository.findAll(); //findAll() method is implemented ins Spring JpaRepository, which fetch and returns all the records from database using the give entity \r\n\t}",
"List<User> getAll() throws SQLException;",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn userDao.findAllUser();\n\t}",
"@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}",
"public List<Users> getAllUsers() {\r\n\t\t// return usDao.findAll();\r\n\t\treturn usDao.getAllUsers();\r\n\t}",
"@Override\n\tpublic List<User> findAll() {\n\t\treturn this.userMapper.findAll();\n\t}",
"List<User> loadAll();",
"@Override\n\tpublic List<User> getAllUsers() {\n\t\tlog.info(\"get all users!\");\n\t\treturn userRepository.findAll();\n\t}",
"@Override\n\tpublic List<User> getAllUser() {\n\t\treturn uDao.getAllUser();\n\t}",
"@Override\n\tpublic List<Object> getAllUsers() {\n\t\tList<Object> usersList = new ArrayList<Object>();\n\t\tList<TestUser> users = dao.getAll();\n\t\tSystem.out.println(dao.exists(5));\n\t\tfor(TestUser user : users){\n\t\t\tMap<String,Object> m = new HashMap<String,Object>();\n\t\t\tm.put(\"id\", user.getId());\n\t\t\tm.put(\"name\", user.getUsername());\n\t\t\tm.put(\"pwd\", user.getPassword());\n\t\t\tJSONObject j = new JSONObject(m);\n\t\t\tusersList.add(j);\n\t\t}\n\t\treturn usersList;\n\t}",
"public void getAllUsers() {\n\t\t\n\t}",
"public List<User> getAllUsers() {\n\t\tfactory = new Configuration().configure().buildSessionFactory();\n\t\tsession = factory.getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tQuery query = session.createQuery(\"from User\");\n\t\tList<User> list = query.getResultList();\n\t\tsession.close();\n\t\treturn list;\n\n\t\t\n\t}",
"public ArrayList<IndividualUser> listAllUsers() {\n try {\n PreparedStatement s = sql.prepareStatement(\"SELECT id, userName, firstName, lastName FROM Users \");\n s.execute();\n ResultSet results = s.getResultSet();\n ArrayList<IndividualUser> users = new ArrayList<>();\n if (!results.isBeforeFirst()) {\n results.close();\n s.close();\n return users;\n }\n\n while (!results.isLast()) {\n results.next();\n IndividualUser u = new IndividualUser(results.getInt(1), results.getString(2), results.getString(3), results.getString(4));\n\n users.add(u);\n\n }\n\n results.close();\n s.close();\n\n return users;\n } catch (SQLException e) {\n sqlException(e);\n return null;\n }\n }",
"Iterable<User> getAllUsers();",
"public ArrayList<User> list() {\n\t\tUserDao ua=new UserDao();\n\t\treturn ua.list();\n\t\t//System.out.println(\"haii\");\n\t\t \n\t}",
"public List<UserData> list() {\n\t\treturn userDAO.list();\r\n\t}",
"@Override\r\n\tpublic List<Map<String, Object>> findAllUser() {\n\t\treturn userMapper.findAllUser();\r\n\t}",
"@Override\n\tpublic Collection<Users> read() {\n\t\treturn userDAO.readAll();\n\t}",
"public static List<User> getAllUsers(){\n\t\t// getting all users\n\t\treturn dao.getAllUsers();\n\t}",
"@GetMapping(\"/users\")\n\tpublic List<User> retrieveAllUsers() {\n\t\treturn userService.findAll();\n\t}",
"@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }",
"@Override\r\n\tpublic List<?> getAllUser() {\n\t\treturn userQueryRepositoryImpl.getAllUser();\r\n\t}",
"@RequestMapping(\"/alluser\")\n\t@ResponseBody\n\t@Secured({CommonConstants.ROLE_EMPLOYEE,CommonConstants.ROLE_ADMIN})\n\tpublic List<UserEntity> findAll() {\n\t\treturn this.service.findAll();\n\t}",
"public static List<User> all() \n {\n return find.all();\n }",
"public List<User> loadAllUserDetails()throws Exception;",
"@Override\n\tpublic List<ERSUser> getAllUsers() {\n\t\treturn userDao.selectAllUsers();\n\t}",
"@Override\r\n\tpublic List<AccountDTO> getAllUser() {\n\t\treturn accountDao.getAll();\r\n\t}",
"@Override\r\n\tpublic List<User> queryAllUsers() {\n\t\tList<User> users = userMapper.queryAllUsers();\r\n\t\treturn users;\r\n\t}",
"public List<User> listAll() throws Exception;",
"@Override\n public List<User> findAll() throws DaoException {\n log.info(\"Get all users\");\n return userDao.findAll();\n }",
"@RequestMapping(value = {\"/users/list\"}, method = RequestMethod.GET)\n\tpublic ResponseEntity<List<User>> fetchUsers() {\n\t\t\tSystem.out.println(\"fetching users\");\n\t\t\tList<User> user = userDAO.list(\"APPROVED\");\n\t\t\tSystem.out.println(user);\n\t\t\treturn new ResponseEntity<List<User>>(user, HttpStatus.OK);\n\t\t}",
"@Override\r\n\tpublic List<User> findAllUsers() {\n\t\treturn userDAO.findAllUsers();\r\n\t}",
"@GET\n\t@Path(\"/allUsers\")\n\t@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })\n\tpublic Map<String, List<User>> getUser() throws JsonGenerationException, JsonMappingException, IOException {\n\t\t\n\t\tMap<String, List<User>> user = userDao.getUser();\n\t\t\n\t\treturn user; \n\t}",
"@RequestMapping(\"/user/all\")\n public @ResponseBody Iterable<Tbl_Web_User_Info> getAllUsers(){\n \treturn userRepository.findAll();\n }",
"public ResultSet fetchSelectAllUsers() {\r\n\t\ttry {\r\n\t\t\t/**\r\n\t\t\t*\tTo create connection to the DataBase\r\n\t\t\t*/\r\n\t\t\tnew DbConnection();\r\n\t\t\t/**\r\n\t\t\t*\tStore the table data in ResultSet rs and then return it\r\n\t\t\t*/\r\n\t\t\trs = stmt.executeQuery(SELECT_ALL_USERS_QUERY);\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSqlExcep.printStackTrace();\r\n\t\t} catch(ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\tcloseDbConnection();\r\n\t\t\t} catch(SQLException SqlExcep) {\r\n\t\t\t\tSqlExcep.printStackTrace();\r\n\t\t\t}*/\r\n\t\t}\r\n\t\treturn rs;\r\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}",
"public List<User> list() {\n\t\treturn userDao.list();\n\t}",
"@RequestMapping(method = RequestMethod.GET, path = \"/allUsers\")\n\t\tpublic List<leaderBoard> getAllUsers(){\n\t\t\t logger.info(\"Entered into Controller Layer\");\n\t\t List<leaderBoard> results = leaderboardrepository.findAll();\n\t\t logger.info(\"Number of Records Fetched:\" + results.size());\n\t\t \n\t\t return results;\n\t\t //this works\n\t\t \n\t\t \n\t\t}",
"@Override\n\tpublic List<Users> getAll() {\n\t\treturn usersDAO.getAll();\n\t}",
"public List<User> getAllUsers() {\n\t\tLog.i(TAG, \"return all users list.\");\n\t\tList<User> result = new ArrayList<User>();\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString getUsers = \"select * from \" + TABLE_USER;\n\t\tCursor cursor = db.rawQuery(getUsers, null);\n\t\tfor (cursor.moveToFirst();!cursor.isAfterLast();cursor.moveToNext()) {\n\t\t\tUser user = new User(cursor.getInt(0), cursor.getString(1), cursor.getString(2));\n\t\t\tresult.add(user);\n\t\t}\n\t\treturn result;\n\t}",
"public List<User> findAll() {\n return userRepository.findAll();\n }",
"@GetMapping(path = \"/all\")\n public @ResponseBody\n Iterable<User> getAllUsers() {\n LOG.info(\"Displays all the users from the database\");\n return userRepository.findAll();\n }",
"@RequestMapping(method = RequestMethod.GET)\n\tpublic List<User> getAll() {\n\t\tList<User> users = dao.getAll();\n\t\treturn users;\n\t}",
"public List<User> findAll() {\n return store.findAll();\n }",
"@Override\n\tpublic Iterable<User> getAllUser() {\n\t\treturn userRepository.findAll();\n\t}",
"public List<YuserVO> getAllUsers() {\n\t\tList<YuserVO> list = null;\n\t\t\ttry {\n\t\t\t\tlist = userDao.getAllUsers();\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.out.println(\"get users failed ..................................\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\treturn list;\n\t}",
"@Override\n\tpublic List<User> selectAllUser() {\n\t\tList<User> users = null;\n\t\ttry {\n\t\t\tusers = client.queryForList(\"selectAllUser\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn users;\n\n\t}",
"@GetMapping(path=\"/all\",produces = MediaType.APPLICATION_JSON_VALUE)\r\n public @ResponseBody\r\n Iterable<UserEntity> getAllUsers() {\n return userService.getAllUsers();\r\n }",
"public static ArrayList<User> findAllUsers() {\n\n User targetUser = new User();\n IdentityMap<User> userIdentityMap = IdentityMap.getInstance(targetUser);\n\n String findAllUsers = \"SELECT * FROM public.member where type = 0\";\n PreparedStatement stmt = DBConnection.prepare(findAllUsers);\n ArrayList<User> userList = new ArrayList<User>();\n\n try {\n ResultSet rs = stmt.executeQuery();\n\n while(rs.next()) {\n User user = load(rs);\n\n targetUser = userIdentityMap.get(user.getId());\n if (targetUser == null) {\n userList.add(user);\n userIdentityMap.put(user.getId(), user);\n } else {\n userList.add(targetUser);\n }\n }\n DBConnection.close(stmt);\n rs.close();\n\n } catch (SQLException e) {\n System.out.println(\"Exception!\");\n e.printStackTrace();\n }\n return userList;\n }",
"@Override\r\n\tpublic List<User1> getAll() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = session.createQuery(\"FROM User1\");\r\n\t\treturn query.list();\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }",
"@RequestMapping(value=\"/user/all\",method=RequestMethod.GET)\n\t\t public @ResponseBody ResponseEntity<List<User>> getAllUsers(){\n\t\t\t List<User> user=(List<User>) userDAO.findAll();\n\t\t\t return new ResponseEntity<List<User>>(user,HttpStatus.OK);\n\t\t }",
"@GetMapping\n public List<User> getAll() {\n return userService.getAll();\n }",
"public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }",
"public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }",
"public Cursor fetchAll() {\n\t\tCursor cursor = db.query(UserConstants.DB_TABLE, UserConstants.fields(), null, null, null, null, null);\n\t\treturn cursor;\n\t}",
"public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}",
"public List listUsers() {\n Session session = HibernateSessionFactory.getSessionFactory().openSession();\n Transaction tx = null;\n List users = null;\n try {\n tx = session.beginTransaction();\n users = session.createQuery(\"FROM User\").list();\n for (Iterator iterator = users.iterator(); iterator.hasNext(); ) {\n User user = (User) iterator.next();\n System.out.print(\"id: \" + user.getId());\n System.out.print(\" Username: \" + user.getUsername());\n System.out.print(\" Password: \" + user.getPassword());\n System.out.println(\" Email: \" + user.getEmail());\n }\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null) tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n return users;\n }",
"@Override\n\tpublic List<User> getList() {\n\t\treturn Lists.newArrayList(userRepository.findAll());\n\t}",
"public Users findAll() {\n\tthis.createConnection();\n try {\n Connection con = this.getCon();\n PreparedStatement stmnt = con.prepareStatement(this.getAllQuery());\n ResultSet rs = stmnt.executeQuery();\n return get(rs);\n } catch (SQLException e) {\n System.out.println(\"SQL Exception\" + e.getErrorCode() + e.getMessage());\n e.getStackTrace();\n return new Users();\n }\n }",
"@Override\r\n\tpublic List<User> getAll() {\n\t\treturn users;\r\n\t}",
"List<KingdomUser> getAllUsers();",
"@Override\n\tpublic List<User> findAll() {\n\t\treturn userRepository.findAll();\n\t}",
"@Override\n\tpublic Iterable<com.example.demo.model.User> getAllUsers() {\n\t\treturn userRepository.findAll();\n\t}",
"@GetMapping\n public List<User> getAllUsers() {\n return userService.getAllUsers();\n }",
"@GetMapping(path=\"/all\")\n\tpublic @ResponseBody Iterable<User> getAllUsers() {\n\t\t// This returns a JSON or XML with the users\n\t\treturn userRepository.findAll();\n\t}"
] |
[
"0.84724087",
"0.8189616",
"0.8132186",
"0.8075823",
"0.8062744",
"0.80583805",
"0.80563366",
"0.8024122",
"0.7999926",
"0.79963773",
"0.7993604",
"0.7981954",
"0.7974452",
"0.79724455",
"0.79540247",
"0.7932884",
"0.7932884",
"0.78973603",
"0.78800356",
"0.78775585",
"0.7872273",
"0.7870391",
"0.78355783",
"0.783074",
"0.78216106",
"0.7802088",
"0.7793176",
"0.77922946",
"0.7786125",
"0.77800965",
"0.7747573",
"0.77457076",
"0.7739062",
"0.7737961",
"0.77317476",
"0.77308154",
"0.7709263",
"0.7706986",
"0.7705791",
"0.77045554",
"0.76990235",
"0.76967657",
"0.76919526",
"0.76905894",
"0.7686681",
"0.7686087",
"0.76827425",
"0.76806355",
"0.76774865",
"0.76771593",
"0.7672528",
"0.76724344",
"0.7672347",
"0.76700485",
"0.76663035",
"0.76658005",
"0.76649266",
"0.76585674",
"0.76566124",
"0.7649142",
"0.7635041",
"0.7629602",
"0.7629244",
"0.7623758",
"0.7617564",
"0.7615423",
"0.76103425",
"0.76038563",
"0.76010084",
"0.7599444",
"0.75978214",
"0.7597536",
"0.7595191",
"0.7592358",
"0.75922406",
"0.7590237",
"0.7588006",
"0.75837815",
"0.7579661",
"0.757939",
"0.7576358",
"0.7575263",
"0.7568995",
"0.75669014",
"0.756426",
"0.7563354",
"0.7558062",
"0.7557577",
"0.7557548",
"0.75541234",
"0.75524426",
"0.75445426",
"0.75377107",
"0.75338966",
"0.7533449",
"0.7530863",
"0.75226533",
"0.7519383",
"0.7510571",
"0.75059015"
] |
0.7598609
|
70
|
This method to update user record
|
public void updateUser(user user) {
SQLiteDatabase db = this.getWritableDatabase();
ContentValues values = new ContentValues();
values.put(COLUMN_USER_NAME, user.getName());
values.put(COLUMN_USER_EMAIL, user.getEmail());
values.put(COLUMN_USER_PASSWORD, user.getPassword());
// updating row
db.update(TABLE_NAME, values, COLUMN_USER_ID + " = ?",
new String[]{String.valueOf(user.getId())});
db.close();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void updateUserDetails() {\n\t\tSystem.out.println(\"Calling updateUserDetails() Method To Update User Record\");\n\t\tuserDAO.updateUser(user);\n\t}",
"public void updateUser(User user) {\n\t\t\r\n\t}",
"public boolean update(User u);",
"public String updateUser(){\n\t\tusersservice.update(usersId, username, password, department, role, post, positionId);\n\t\treturn \"Success\";\n\t}",
"public User updateUser(User user);",
"@Override\n\tpublic void updateUser(User pUser) {\n\t\t\n\t}",
"public void update(User user);",
"@Override\r\n\tpublic int updateByPrimaryKey(User record) {\n\t\treturn userDao.updateByPrimaryKey(record);\r\n\t}",
"@Override\n\tpublic void updateUser(user theUser) {\n\t}",
"@Override\n\tpublic void updateUser(User user)\n\t{\n\n\t}",
"@Override\n\tpublic int updateByPrimaryKey(User record) {\n\t\treturn userMapper.updateByPrimaryKey(record);\n\t}",
"public void updateUser() {\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(db.DB.connectionString, db.DB.user, db.DB.password);\n Statement stmt = conn.createStatement();\n String query = \"update users set first_name='\" + firstName + \"', \";\n query += \"last_name='\" + lastName + \"', \";\n query += \"phone_number='\" + phoneNumber + \"', \";\n query += \"email='\" + email + \"', \";\n query += \"address='\" + address + \"', \";\n query += \"id_city='\" + idCity + \"' \";\n query += \"where id_user = \" + id;\n stmt.executeUpdate(query);\n\n User updatedUser = findUser(id);\n updatedUser.setFirstName(firstName);\n updatedUser.setLastName(lastName);\n updatedUser.setPhoneNumber(phoneNumber);\n updatedUser.setEmail(email);\n updatedUser.setIdCity(idCity);\n updatedUser.setAddress(address);\n\n } catch (SQLException ex) {\n Logger.getLogger(UserController.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n clear();\n try {\n conn.close();\n } catch (Exception e) {\n /* ignored */ }\n }\n }",
"void update(User user);",
"void update(User user);",
"UpdateUserResult updateUser(UpdateUserRequest updateUserRequest);",
"ManageUserResponse updateUser(UserUpdateRequest user, Long userId);",
"public void update(User obj) {\n\t\t\n\t}",
"public void update(User u) {\n\r\n\t}",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"public void updateUser(Person user) {\n\t\t\n\t}",
"public void update(com.conurets.inventory.model.User model) throws InventoryException {\n }",
"private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }",
"@Override\n\tpublic void update(User objetc) {\n\t\tuserDao.update(objetc);\n\t}",
"int updateByPrimaryKey(UUser record);",
"int updateByPrimaryKey(BaseUser record);",
"int updateByPrimaryKey(RegsatUser record);",
"public void update() throws Exception {\n\t HaUserDao.getInstance().updateUser(this);\n\t}",
"public static void update_TbUser() {\n builder = new Uri.Builder();\n builder.appendQueryParameter(\"username\", Server.owner.get_username());\n builder.appendQueryParameter(\"email\", Server.owner.get_Email());\n builder.appendQueryParameter(\"birthday\", Server.owner.get_Birthday().toString());\n builder.appendQueryParameter(\"gender\", Server.owner.get_gender() ? \"1\" : \"0\");\n builder.appendQueryParameter(\"phone\", Server.owner.get_Phone());\n builder.appendQueryParameter(\"image_source\", Server.owner.get_imageSource());\n builder.appendQueryParameter(\"conversations\", Server.owner.get_AllConversation());\n\n String url = Constant.M_HOST + Constant.M_UPDATE_USER_WITHOUT_PASS;\n String a = uService.execute(builder, url);\n }",
"@Override\r\n\tpublic int updateUser(Users user) {\n\t\treturn 0;\r\n\t}",
"public String update() {\r\n\t\tuserService.update(userEdit);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"update\";\r\n\t}",
"int updateUserById( User user);",
"public void updateUser(int uid, String name, String phone, String email, String password, int money, int credit);",
"int updateByPrimaryKey(Userinfo record);",
"@Override\r\n\tpublic int updateByPrimaryKey(AdminUser record) {\n\t\treturn adminUserMapper.updateByPrimaryKey(record);\r\n\t}",
"@Override\n\tpublic int update(TbUser user) {\n\t\treturn new userDaoImpl().update(user);\n\t}",
"@Override\n\tpublic boolean updateUser(Integer Id, User user) {\n\t\treturn false;\n\t}",
"@Update({\n \"update user_t\",\n \"set user_name = #{userName,jdbcType=VARCHAR},\",\n \"password = #{password,jdbcType=VARCHAR},\",\n \"age = #{age,jdbcType=INTEGER},\",\n \"ver = #{ver,jdbcType=INTEGER}\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(AdminUser record);",
"int updateByPrimaryKey(AdminUser record);",
"@Override\r\n\tpublic void update(User user) {\n\t\tint iRet = dao.update(user);\r\n\t\tif(iRet != 1){\r\n\t\t\tlogger.error(\"修改失败\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tlogger.info(\"修改成功\");\r\n\t}",
"@Override\n public boolean updateUser(User user) {\n return controller.updateUser(user);\n }",
"void updateUser(@Nonnull User user);",
"int updateByPrimaryKey(LitemallUserFormid record);",
"@Override\r\n\tpublic int updateByPrimaryKeySelective(User record) {\n\t\treturn userDao.updateByPrimaryKeySelective(record);\r\n\t}",
"void update(User user) throws SQLException;",
"void updateUserById(String username, User userData);",
"int updateByPrimaryKey(UserEntity record);",
"void update(String userName, String password, String userFullname,\r\n\t\tString userSex, int userTel, String role);",
"void editUser(String uid, User newUser);",
"@Override\r\n\tpublic int updateUser(User user, String userName) {\n\t\treturn 0;\r\n\t}",
"int updateByPrimaryKey(UserInfoUserinfo record);",
"public void updateUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk updateUser\");\r\n\t}",
"ResponseMessage updateUser(final User user);",
"@Override\r\n\tpublic int update(User user) {\n\t\treturn 0;\r\n\t}",
"@Override\n public User update(User user) {\n return dao.update(user);\n }",
"public User update(User user)throws Exception;",
"private void updateUser() {\n if (\"\".equals(txtFirstname.getText()) || \"\".equals(txtLastname.getText()) || \"\".equals(txtEmail.getText())) {\n JOptionPane.showMessageDialog(null, \"Select a user to update\");\n } else {\n try {\n //Updates record of selected user\n System.out.println(User);\n String sql = \"UPDATE Accounts SET Firstname = '\" + txtFirstname.getText() + \"', Lastname = '\" + txtLastname.getText() + \"', Email = '\" + txtEmail.getText() + \"' WHERE Username = '\" + User + \"'\";\n\n ps = con.prepareStatement(sql);\n ps.executeUpdate();\n showUserData();\n JOptionPane.showMessageDialog(null, User + \" Your information has been updated\");\n\n } catch (SQLException ex) {\n System.out.println(\"Error: \" + ex);\n Logger.getLogger(myAccount.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }",
"int updateByPrimaryKey(SysUser record);",
"void updateUser(User entity) throws UserDaoException;",
"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 }",
"int updateByPrimaryKey(UserDO record);",
"@Override\n public void updateUser(User u) {\n Session session = this.sessionFactory.getCurrentSession();\n session.update(u);\n logger.info(\"User updated successfully, User Details=\"+u);\n }",
"public void updateUser(long userID) {\n \t}",
"int updateByPrimaryKey(RoleUser record);",
"int updateByPrimaryKey(WbUser record);",
"@Override\r\n\tpublic void updateUser(TUsers tuser) {\n\t\tdao.updateUser(tuser);\r\n\t}",
"public User update(User updatedInfo);",
"int updateByPrimaryKey(LikeUser record);",
"@Override\r\n\tpublic boolean updateUser(user user) {\n\t\tif(userdao.updateByPrimaryKey(user)==1){\r\n\t\t\treturn true;}else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t}",
"UserEntity updateUser(UserEntity userEntity);",
"public Account update(Account user);",
"@Override\r\n\tpublic void update(User user) {\n\t\tuserDao.update(user);\r\n\t}",
"public void updateUser(User oldUser, User newUser) ;",
"int updateByPrimaryKey(R_dept_user record);",
"private static void updateUser() {\n\t currentUser = Structure.User(currentUser);\n\t CRUDUsers.compareWithRemote(currentUser).subscribe(new SingleSubscriber<User>() {\n\t\t @Override\n\t\t public void onSuccess(User value) {\n\t\t\t\tConnection.logIn(value);\n\t\t }\n\t\t\n\t\t @Override\n\t\t public void onError(Throwable error) {\n\t\t\t logOff();\n\t\t\t App.showMessage(error.getMessage());\n\t\t }\n\t });\n }",
"void updateUser(UserDTO user);",
"@Update({\n \"update tb_user\",\n \"set password = #{password,jdbcType=VARCHAR}\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n int updateByPrimaryKey(User record);",
"public Boolean updateUserData (User currentUser){ //throws Exception if user not existing in database\n\n if(userRepository.existsById(currentUser.getId())){\n User temp_user = getUserById(currentUser.getId());\n\n temp_user.setUsername(currentUser.getUsername());\n temp_user.setBirthday_date(currentUser.getBirthday_date());\n userRepository.save(temp_user);\n\n return true;\n }else{\n throw new UnknownUserException(\"This user doesn't exist and can therefore not be updated\");\n }\n }",
"public void update() throws NotFoundException {\n\tUserDA.update(this);\n }",
"@Override\n\tpublic void update(User user)\n\t{\n\t\tuserDAO.update(user);\n\t}",
"@Override\n\tpublic void updateUser(SpaceUserVO spaceUserVO) throws Exception {\n\t\t\n\t}",
"@Override\n\tpublic void updateOne(User u) {\n\t\tdao.updateInfo(u);\n\t}",
"@Override\n\tpublic int updateByPrimaryKey(User record) {\n\t\treturn 0;\n\t}",
"int updateByPrimaryKey(ROmUsers record);",
"@Override\n public void updateUser(User user){\n try {\n runner.update(con.getThreadConnection(),\"update user set username=?,address=?,sex=?,birthday=? where id=?\"\n ,user.getUsername(),user.getAddress(),user.getSex(),user.getBirthday(),user.getId());\n } catch (SQLException e) {\n System.out.println(\"执行失败\");\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic int update(Users user) {\n\t\treturn userDAO.update(user);\n\t}",
"@Override\n\tpublic int updateByPrimaryKeySelective(User record) {\n\t\treturn userMapper.updateByPrimaryKeySelective(record);\n\t}",
"public void update(JTable tblUser)\n {\n int i = tblUser.getSelectedRow();\n \n if(i != -1)\n {\n usersDto = users[i];\n \n CUpdateUser update;\n \n if(usersDto.getState() == 1)\n {\n update = new CUpdateUser(usersDto.getUserId());\n window.dispose();\n \n } else { JOptionPane.showMessageDialog(null, \"Solo se permite modificar registros activos\", \"ERROR\", JOptionPane.ERROR_MESSAGE); }\n \n } else { JOptionPane.showMessageDialog(null, \"Seleccione un registro a modificar\", \"ERROR\", JOptionPane.ERROR_MESSAGE); }\n }",
"@Override\n\tpublic Boolean updateUser(User user) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic void updateUser(User user) {\n\t userMapper.updateUser(user);\n\t}",
"public boolean update(UserDTO user){\r\n try {\r\n PreparedStatement preSta = conn.prepareStatement(sqlUpdateUser);\r\n preSta.setString(1,user.getEmail());\r\n preSta.setString(2, user.getPassword());\r\n preSta.setInt(3, user.getRole());\r\n preSta.setInt(4, user.getUserId());\r\n if(preSta.executeUpdate() >0){\r\n return true;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(UserDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n error=\"khong ton tai userId\"+ user.getUserId();\r\n return false;\r\n }",
"int updateByPrimaryKey(SysRoleUser record);",
"@Override\n\tpublic void update(User user) throws DAOException {\n\t\t\n\t}"
] |
[
"0.79761034",
"0.79423773",
"0.7799762",
"0.77794814",
"0.77692974",
"0.7760493",
"0.7750683",
"0.77350944",
"0.7728486",
"0.7726437",
"0.7693553",
"0.7680269",
"0.7638895",
"0.7638895",
"0.76247716",
"0.7606842",
"0.75975144",
"0.7533773",
"0.7531023",
"0.7531023",
"0.7531023",
"0.7531023",
"0.7531023",
"0.7531023",
"0.7531023",
"0.7531023",
"0.7531023",
"0.75253594",
"0.750404",
"0.7489778",
"0.74746805",
"0.7449829",
"0.7447144",
"0.7444835",
"0.7434715",
"0.7434423",
"0.7424345",
"0.74222064",
"0.7410604",
"0.7410368",
"0.7395615",
"0.73850197",
"0.73763406",
"0.73742723",
"0.73739916",
"0.73712593",
"0.73712593",
"0.73651755",
"0.7359311",
"0.73589486",
"0.73589015",
"0.73502547",
"0.7348736",
"0.73477745",
"0.734708",
"0.7344266",
"0.7310198",
"0.7308383",
"0.7301621",
"0.72801477",
"0.7278141",
"0.7277563",
"0.7261181",
"0.725437",
"0.72520006",
"0.7236157",
"0.72349995",
"0.72344166",
"0.72312814",
"0.7228613",
"0.72216755",
"0.72157496",
"0.7213589",
"0.7213393",
"0.7193287",
"0.71922356",
"0.7188879",
"0.7184178",
"0.71828246",
"0.71821505",
"0.7172878",
"0.71667534",
"0.71646965",
"0.7162826",
"0.71557784",
"0.7152177",
"0.7144074",
"0.7141547",
"0.71215194",
"0.7117955",
"0.71141756",
"0.7113847",
"0.71043396",
"0.7099186",
"0.7090679",
"0.70899415",
"0.70882463",
"0.70854944",
"0.7082692",
"0.70788985",
"0.7073357"
] |
0.0
|
-1
|
This method is to delete user record
|
public void deleteUser(user user) {
SQLiteDatabase db = this.getWritableDatabase();
// delete user record by id
db.delete(TABLE_NAME, COLUMN_USER_ID + " = ?",
new String[]{String.valueOf(user.getId())});
db.close();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void deleteUserRecord() {\n\t\tSystem.out.println(\"Calling deleteUserRecord() Method To Delete User Record\");\n\t\tuserDAO.deleteUser(user);\n\t}",
"@Override\n\tpublic void deleteUser(user theUser) {\n\t\t\n\t}",
"@Override\n\tpublic void deleteUser(User user)\n\t{\n\n\t}",
"@Override\n\tpublic void deleteUser() {\n\t\tLog.d(\"HFModuleManager\", \"deleteUser\");\n\t}",
"public void deleteUser(User userToDelete) throws Exception;",
"public void deleteUser(long userId);",
"void deleteUser(String deleteUserId);",
"public boolean delete(User user);",
"@Override\r\n\tpublic int delete(User user) {\n\t\treturn 0;\r\n\t}",
"public void deleteUser(Integer uid);",
"public void delete(User user)throws Exception;",
"void deleteUserById(Long id);",
"@Override\r\n\tpublic int deleteUser(Users user) {\n\t\treturn 0;\r\n\t}",
"public void deleteUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk deleteUser\");\r\n\t}",
"void deleteUser(String userId);",
"public void deleteUser(int userid) {\n\t\t\n\t}",
"public void delete(User obj) {\n\t\t\n\t}",
"void delete(User user);",
"void delete(User user);",
"void deleteUser(int id);",
"@Override\n\tpublic void delete(User entity) {\n\t\tuserlist.remove(String.valueOf(entity.getDni()));\n\t}",
"public void deleteUserById(Long userId);",
"@Override\n\tpublic void deleteUser(String id) throws Exception {\n\t\t\n\t}",
"boolean delete(User user);",
"@Override\n\tpublic void deleteUser(User user) {\n\t\topenSession().createQuery(\"DELETE FROM User where userId =\" + user.getUserId()).executeUpdate();\n\t\t\n\t}",
"void deleteUserById(Integer id);",
"@Override\n\tpublic void deleteUserById(Integer id) {\n\n\t}",
"@Override\n\tpublic void delete_User(String user_id) {\n\t\tuserInfoDao.delete_User(user_id);\n\t}",
"@Override\n public boolean deleteUser(User user) {\n return false;\n }",
"@Override\n\tpublic void deleteUser(String userId) {\n\t\t\n\t}",
"@Override\r\n\tpublic boolean delUser(user user) {\n\t\tif(userdao.deleteByPrimaryKey(user.gettUserid())==1){\r\n\t\t\treturn true;}else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t}",
"public String deleteUser(){\n\t\tusersservice.delete(usersId);\n\t\treturn \"Success\";\n\t}",
"@Override\r\n\tpublic void delete(User user) {\n\t\tint iRet = dao.delete(user);\r\n\t\tif(iRet != 1){\r\n\t\t\tlogger.error(\"删除失败\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tlogger.info(\"删除成功\");\r\n\t}",
"@Override\n public void delete(User user) {\n dao.delete(user);\n }",
"@Override\r\n\tpublic void delete(UserMain user) {\n\t\tusermaindao.delete(user);\r\n\t}",
"@Override\n\tpublic Boolean deleteUser(User user) {\n\t\treturn null;\n\t}",
"public User delete(String user);",
"@Override\r\n\tpublic void deleteUser(String userid) {\n\t\ttry{\r\n\t\t\tString sql = \"delete from vipuser where id=?\";\r\n\t\t\tObject[] args = new Object[]{userid};\r\n\t\t\tdaoTemplate.update(sql, args, false);\r\n\t\t}catch (Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public User delete(User user);",
"public void deleteUser(String name);",
"@Override\r\n\tpublic void delete(User user) {\n\t\tuserDao.delete(user);\r\n\t}",
"@Override\n\tpublic void delete(User entity) {\n\t\t\n\t}",
"public void delete() throws NotFoundException {\n\tUserDA.delete(this);\n }",
"@Override\n public boolean deleteUser(User user) {\n return controller.deleteUser(user);\n }",
"public static int delete(User u){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection(); \n //melakukan query database untuk menghapus data berdasarkan id atau primary key\n PreparedStatement ps=con.prepareStatement(\"delete from t_user where id=?\"); \n ps.setInt(1,u.getId()); \n status=ps.executeUpdate(); \n }catch(Exception e){System.out.println(e);} \n\n return status; \n }",
"public void deleteUser(ExternalUser userMakingRequest, String userId);",
"@Override\n\tpublic void delete(User user)\n\t{\n\t\tuserDAO.delete(user);\n\t}",
"public void deleteUser(long id){\n userRepository.deleteById(id);\n }",
"public Boolean DeleteUser(User user){\n\t\t\treturn null;\n\t\t}",
"public void delete(User user){\n userRepository.delete(user);\n }",
"public void deleteUser(Userlist user) {\n SQLiteDatabase db = this.getWritableDatabase();\n // delete user record by id\n db.delete(TABLE_USERLIST, COLUMN_USER_ID + \" = ?\",\n new String[]{String.valueOf(user.getID())});\n db.close();\n }",
"public void deleteUser(User user) {\n\t\t\r\n\t\tsessionFactory.getCurrentSession().delete(user);\t\r\n\t\t\r\n\t}",
"public void deleteUser(String username);",
"@Override\n\tpublic int delete(Users user) {\n\t\t\n\t\treturn userDAO.delete(user);\n\t}",
"public void deleteUser(User user) {\n SQLiteDatabase db = this.getWritableDatabase();\n // delete user record by id\n db.delete(TABLE_USER, COLUMN_USER_ID + \" = ?\",\n new String[]{String.valueOf(user.getId())});\n db.close();\n }",
"public void deleteUserById(int id){\n userListCtrl.deleteUser(id);\n }",
"public String deleteUser(){\n\t\ttry{\n\t\t\tnew UtenteDao().deleteUser(utente_target);\n\t\t\treturn \"Utente eliminato con successo!\";\n\t\t}\n\t\tcatch(SQLException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n public void deleteUser(Integer id){\n try {\n runner.update(con.getThreadConnection(),\"delete from user where id=?\",id);\n } catch (SQLException e) {\n System.out.println(\"执行失败\");\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic void deleteOne(User u) {\n\t\tdao.deleteOne(u);\n\t}",
"public void deleteUser(View v){\n Boolean deleteSucceeded = null;\n\n int userId = users.get(userSpinner.getSelectedItemPosition() - 1).getId();\n\n // Delete user from database\n deleteSucceeded = udbHelper.deleteUser(userId);\n\n String message = \"\";\n if(deleteSucceeded){\n message = \"Successfully removed user with id {\" + userId + \"} from database!\";\n }\n else {\n message = \"Failed to save user!\";\n }\n Toast.makeText(ManageAccountsActivity.this, message, Toast.LENGTH_LONG).show();\n\n reloadUserLists();\n }",
"public void delete(User usuario);",
"@Override\n\tpublic void deleteUser(int id) {\n\t\tuserMapper.deleteUser(id);\n\t}",
"@Delete({\r\n \"delete from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n int deleteByPrimaryKey(Integer user_id);",
"@Override\n\tpublic void delete(User user) throws DAOException {\n\t\t\n\t}",
"void DeleteCompteUser(int id);",
"@Override\n\tpublic int delete(int uid) {\n\t\treturn new userDaoImpl().delete(uid);\n\t}",
"void deleteUser(String username) throws UserDaoException;",
"@Override\n\tpublic void deleteUser(NguoiDung nd) {\n\n\t}",
"@Override\n\tpublic String delete(User user) {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic void del(int uid) {\n\t\tuserDao.del(uid);\r\n\t}",
"@Override\n\tpublic void delete(Connection conn, User user) throws SQLException {\n\t\tString deleteSql=\"delete from tbl_user where id=?\";\n\t\tPreparedStatement ps=conn\n\t\t\t\t.prepareCall(deleteSql);\n\t\tps.setLong(1, user.getId());\n\t\tps.execute();\n\t\t\n\t}",
"@Override\n\tpublic void deleteUser(int userId) {\n\t\tuserDao.deleteUser(userId);\n\t}",
"public boolean delete(int userId);",
"public void deleteUser(User user) {\n\t\tdelete(user);\r\n\t}",
"public void delete(JTable tblUser)\n {\n int i = tblUser.getSelectedRow();\n \n if(i != -1)\n {\n usersDto = users[i];\n \n if(usersDto.getState() != 3)\n {\n if(JOptionPane.showConfirmDialog(null, \"¿Está seguro que desea eliminar el registro?\", \"Eliminar\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION)\n {\n try {\n usersDto.setState((short) 3);\n \n if(usersDao.update(usersDto.createPk(), usersDto)) {\n tableModel = (DefaultTableModel) tblUser.getModel();\n tableModel.setValueAt(\"*\", i, 6);\n }\n \n } catch (UsersDaoException exception) {}\n }\n \n } else { JOptionPane.showMessageDialog(null, \"El registro ya está eliminado\", \"ERROR\", JOptionPane.ERROR_MESSAGE); }\n \n } else { JOptionPane.showMessageDialog(null, \"Seleccione un registro a eliminar\", \"ERROR\", JOptionPane.ERROR_MESSAGE); }\n }",
"public void deleteUser(User user) {\n update(\"DELETE FROM user WHERE id = ?\",\n new Object[] {user.getId()});\n }",
"int deleteByPrimaryKey(Integer user);",
"public void deleteUser(String id) {\n\t\tSystem.out.println(\"deleteUser\");\n\t\t personDAO.deleteUser(id);\n\t}",
"public void delete(User user) {\n\t\tuserDao.delete(user);\n\t}",
"void deleteUser( String username );",
"@Override\n\tpublic User delete(User t) {\n\t\treturn null;\n\t}",
"@Override\r\n public void userdelete(Integer[] u_id) {\n userMapper.userdelete(u_id);\r\n }",
"@Override\r\n\tpublic void deleteByIdUser(int id) {\n\t\tuserReposotory.deleteById(id);\r\n\t}",
"@Override\r\n\tpublic boolean deleteUser() {\n\t\treturn false;\r\n\t}",
"public void deleteUser(int id) throws Exception {\n\t\tSession session = null;\n \t\ttry {\n\t\t\tsession = sf.openSession();\n\t\t\tString sql = \"delete from sys_user where emp_id=\"+id;\n\t\t\tSQLQuery sqlQuery=session.createSQLQuery(sql);\n\t\t\tsqlQuery.executeUpdate();\n\t\t\tsession.flush();\n\t\t} catch (Exception e) {\n \t\t\te.printStackTrace();\n \t\t} finally {\n\t\t\tif (session != null)\n\t\t\t\tsession.close();\n\t\t}\n\t}",
"@Delete({\n \"delete from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int deleteByPrimaryKey(Integer id);",
"public void delete(User u) {\n\t\tUserDao ua=new UserDao();\n\t\tua.delete(u);\n\t\t\n\t}",
"public void deleteUser(Integer id) throws BadRequestException;",
"public void deleteUser(IndividualUser user) {\n try{\n PreparedStatement s = sql.prepareStatement(\"DELETE FROM Users WHERE userName=? AND id=? AND firstName=? AND lastName=?;\");\n s.setString(1, user.getId());\n s.setInt(2,user.getIdNum());\n s.setString(3, user.getFirstName());\n s.setString(4, user.getLastName());\n s.execute();\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }",
"DeleteUserResult deleteUser(DeleteUserRequest deleteUserRequest);",
"@RolesAllowed(\"admin\")\n @DELETE\n public Response delete() {\n synchronized (Database.users) {\n User user = Database.users.remove(username);\n if (user == null) {\n return Response.status(404).\n type(\"text/plain\").\n entity(\"User '\" + username + \"' not found\\r\\n\").\n build();\n } else {\n Database.usersUpdated = new Date();\n synchronized (Database.contacts) {\n Database.contacts.remove(username);\n }\n }\n }\n return Response.ok().build();\n }",
"public void deleteUser(SPUser user, String tableName) { \n try {\n \t\t\tmyCon.execute(\"DELETE FROM \"+tableName+\" WHERE Username= '\"+ user.getUsername()+\"';\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }",
"public void delete(User user) {\n repository.delete(user);\n }",
"public void deleteUser(int id) {\r\n userRepo.deleteById(id);\r\n }",
"@Override\r\n\tpublic void deleteByUser(User user) {\n\t\tuserReposotory.delete(user);\r\n\t}",
"@Override\n\tpublic boolean deleteUser(int userid) {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\tlogger.info(\"IN DELETE METHOD\" + userid);\n\t\t// Check if head Unit is registered with given userID\n\t\tString check_query = \"select count(1) from user where user_id = ?\";\n\t\tint result = jdbcTemplate.queryForObject(check_query, new Object[] { userid }, Integer.class);\n\t\tlogger.info(\"Result ======= \" + result);\n\t\tif (result > 0) {\n\t\t\tString query = \"delete from user where user_id= ?\";\n\t\t\tint rowdelete = jdbcTemplate.update(query, userid);\n\t\t\tlogger.info(\"Row Delete ======= \" + rowdelete);\n\t\t\tif (rowdelete > 0) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}",
"@FXML\n private void deleteUser(ActionEvent event) throws IOException {\n User selectedUser = table.getSelectionModel().getSelectedItem();\n\n boolean userWasRemoved = selectedUser.delete();\n\n if (userWasRemoved) {\n userList.remove(selectedUser);\n UsermanagementUtilities.setFeedback(event,selectedUser.getName().getFirstName()+\" \"+LanguageHandler.getText(\"userDeleted\"),true);\n } else {\n UsermanagementUtilities.setFeedback(event,LanguageHandler.getText(\"userNotDeleted\"),false);\n }\n }",
"int deleteByPrimaryKey(String pkUserid);",
"public void deleteUser(int id){\r\n\t\tconfigDao.deleteUserById(id);\r\n\t}",
"@Override\n\tpublic boolean deleteUser(Integer id) {\n\t\treturn false;\n\t}"
] |
[
"0.866978",
"0.8105142",
"0.8044499",
"0.79602176",
"0.79517645",
"0.79279566",
"0.79199713",
"0.7876117",
"0.78730345",
"0.78451747",
"0.7841078",
"0.7822135",
"0.7799567",
"0.7781182",
"0.7779804",
"0.7777004",
"0.7742497",
"0.7741002",
"0.7741002",
"0.7732526",
"0.7726074",
"0.7725528",
"0.771242",
"0.7711139",
"0.7701806",
"0.76965153",
"0.76934284",
"0.76889974",
"0.76722676",
"0.76668847",
"0.76644593",
"0.76621586",
"0.7653124",
"0.7645933",
"0.7630887",
"0.76214916",
"0.7616957",
"0.76102257",
"0.7607324",
"0.7597575",
"0.7594423",
"0.7590329",
"0.7577616",
"0.756262",
"0.7556576",
"0.75500494",
"0.7543041",
"0.75266725",
"0.751965",
"0.7508829",
"0.7506875",
"0.7500947",
"0.74993587",
"0.74965703",
"0.74962485",
"0.74793714",
"0.7473104",
"0.74718875",
"0.7462104",
"0.7450271",
"0.74398834",
"0.7435371",
"0.7431256",
"0.7431124",
"0.741743",
"0.7411657",
"0.7408075",
"0.7400092",
"0.73911375",
"0.7385406",
"0.73759353",
"0.7359267",
"0.73544854",
"0.73519677",
"0.7351347",
"0.7348951",
"0.73434603",
"0.7337403",
"0.7334668",
"0.7331106",
"0.7322543",
"0.73099047",
"0.73074615",
"0.7305086",
"0.73045594",
"0.72987384",
"0.728579",
"0.7270283",
"0.7267582",
"0.7267088",
"0.7263945",
"0.72603095",
"0.7254092",
"0.7249777",
"0.7241431",
"0.7240739",
"0.7238293",
"0.7233361",
"0.72300154",
"0.72217023"
] |
0.7619007
|
36
|
This method to check user exist or not
|
public boolean checkUser(String email) {
// array of columns to fetch
String[] columns = {
COLUMN_USER_ID
};
SQLiteDatabase db = this.getReadableDatabase();
// selection criteria
String selection = COLUMN_USER_EMAIL + " = ?";
// selection argument
String[] selectionArgs = {email};
// query user table with condition
/**
* Here query function is used to fetch records from user table this function works like we use sql query.
* SQL query equivalent to this query function is
* SELECT user_id FROM user WHERE user_email = 'jack@androidtutorialshub.com';
*/
Cursor cursor = db.query(TABLE_NAME, //Table to query
columns, //columns to return
selection, //columns for the WHERE clause
selectionArgs, //The values for the WHERE clause
null, //group the rows
null, //filter by row groups
null); //The sort order
int cursorCount = cursor.getCount();
cursor.close();
db.close();
if (cursorCount > 0) {
return true;
}
return false;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private boolean IsUserExist(){\n SignupUser user =roomDB.dao().GetUserData(et_user.getText().toString());\n if(user!=null){\n if(!user.getEmail().isEmpty()){\n Toast.makeText(this, \"User is already registered!\", Toast.LENGTH_SHORT).show();\n return true;\n }\n\n }\n return false;\n }",
"private boolean isUserExists() {\n\t\treturn KliqDataStore.isUserExists(this.mobileNumber, null);\r\n\t}",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"public boolean existUser(String id);",
"private static boolean doesUserExist () {\n String sqlRetrieveAisId = \"SELECT ais_id FROM users WHERE user_id=?\";\n \n boolean valid = false;\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveAisId)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n valid = rs.next() != false;\n } catch (SQLException se) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return valid;\n }",
"public boolean findUserIsExist(String name) {\n\t\treturn false;\r\n\t}",
"private void checkUser() {\n\t\tlog.info(\"___________checkUser\");\n\t\tList<User> adminUser = userRepository.getByAuthority(AuthorityType.ROLE_ADMIN.toString());\n\t\tif (adminUser == null || adminUser.isEmpty()) {\n\t\t\tgenerateDefaultAdmin();\n\t\t}\n\t}",
"private void isUserExist() {\n\n if (firebaseAuth.getCurrentUser() != null) {\n\n final String user_id = firebaseAuth.getCurrentUser().getUid();\n users_database_reference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n if (dataSnapshot.hasChild(user_id)) {\n // sign in the user and go to main activity\n // Intent intent = new Intent(StartActivity.this, MainActivity.class);\n // intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(intent);\n } else {\n // go to profile page\n Intent intent = new Intent(MainActivity.this, Profile.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }\n }",
"private boolean userExists(Utente checkUser) {\n\t\tDB db = getDB();\n\t\tMap<Long, UtenteBase> users = db.getTreeMap(\"users\");\n\t\tfor(Map.Entry<Long, UtenteBase> user : users.entrySet())\n\t\t\tif(user.getValue() instanceof Utente && (((Utente)user.getValue()).getUsername().equals(checkUser.getUsername())))\n\t\t\t\treturn true;\n\t\treturn false;\n\t}",
"public boolean isUserExist(String email, String Password);",
"boolean isUserExists(RegisterData data) throws DuplicateUserException;",
"boolean isUserExist(String username, String password);",
"private void checkForUser(){\n if(mUserId != -1){\n return;\n }\n\n if(mPreferences == null) {\n getPrefs();\n }\n\n mUserId = mPreferences.getInt(USER_ID_KEY, -1);\n\n if(mUserId != -1){\n return;\n }\n\n //do we have any users at all?\n List<User> users = mUserDAO.getAllUsers();\n if(users.size() <= 0 ){\n User defaultUser = new User(\"din_djarin\",\"baby_yoda_ftw\");\n mUserDAO.insert(defaultUser);\n }\n }",
"Boolean checkUserExists(String userName) throws AppException;",
"boolean userExists(HttpServletRequest request, String userId);",
"public boolean existsUser(String username);",
"@Override\r\n\tpublic Boolean userExist(String username) {\n\t\treturn null;\r\n\t}",
"boolean hasUserName();",
"private void checkUserExist() {\n\n final DatabaseReference mUseRef;\n\n\n if (mAuth.getCurrentUser() != null) {\n final String valid_user_id = mAuth.getCurrentUser().getUid();\n mDatabase.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.hasChild(valid_user_id)) {\n Intent singinIntent = new Intent(JoinActivity.this, MainActivity.class);\n singinIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(singinIntent);\n finish();\n } else {\n Toast.makeText(JoinActivity.this, \"You have to first setup your account!\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }\n }",
"public boolean isExistingUser() {\r\n return isExistingUser;\r\n }",
"public boolean doesTheUserExist(String user)\r\n\t {\r\n\t\t if (!users.get(user).equals(null))\r\n\t\t return true;\r\n\t\t return false;\r\n\t }",
"public Boolean user_exists (UserWS user) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tQuery i = null;\r\n\t\t\t\t\t\r\n\t\t\t\t\tiniciaOperacion();\r\n\t\t\t\t\ti = sesion.createQuery(\"SELECT u.id_user FROM User u WHERE u.mail = :login\"); \r\n\t\t\t\t i.setString(\"login\", user.getLogin());\r\n\t\t\t\t \r\n\t\t\t\t return (i.uniqueResult() != null);\r\n\t\t\t\t}",
"private void checkUser() {\n\t\tloginUser = mySessionInfo.getCurrentUser();\n\t}",
"Boolean checkUserExists(Integer userId) throws AppException;",
"private boolean isUserExist(String friendName)\r\n\t{\r\n\t\tlogger.debug(\"->->->->-> Inside isUserExist method ->->->->->\");\r\n\t\tif(userDAO.getParticularUserbyUserName(friendName)==null){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}",
"public boolean isUserExisted(String _fbEmail);",
"boolean hasUserId();",
"boolean hasUserId();",
"boolean hasUserId();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"@Override\n\tpublic boolean isUserExist(StudentForm student) {\n\t\treturn false;\n\t}",
"boolean hasObjUser();",
"boolean isUserExists(Username username);",
"boolean exists(User user);",
"public User userExist(User user);",
"public User userExists(IDatabase db) {\n\t\tUser doesExist = db.userExists(model);\n\t\treturn doesExist;\n\t}",
"public boolean hasUser() {\n return user_ != null;\n }",
"public boolean hasUser() {\n return user_ != null;\n }",
"@Override\n\tpublic boolean userExists(String user) {\n\t\tLogin login = fetchUser(user);\n\t\treturn (login != null);\n\t}",
"boolean hasUsername();",
"boolean hasUsername();",
"boolean hasUsername();",
"boolean hasUsername();",
"boolean hasUsername();",
"boolean hasUsername();",
"public boolean verifyUser(User user) {\n GetUserTask getUserTask = new GetUserTask();\n User temp = new User();\n\n try {\n temp = getUserTask.execute(user.getUserName()).get();\n }\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n catch (ExecutionException e) {\n e.printStackTrace();\n }\n\n //if user did not exist, add one\n if(temp == null){\n ElasticSearchUserController.AddUserTask addUserTask = new ElasticSearchUserController.AddUserTask();\n addUserTask.execute(user);\n return true;\n }\n return false;\n }",
"public boolean checkUserExist(String userName) {\n\t\tboolean exist = true;\n\t\tString adminToken = this.loginAAA(adminUsername, adminPassword);\n\n\t\ttry {\n\t\t\t// read identity of the user\n\t\t\tString identity = this.getIdentity(userName);\n\t\t\tif (identity != null && !identity.equals(\"\")) {\n\t\t\t\t// parse the UUID from user identity, the member userUUID will\n\t\t\t\t// be\n\t\t\t\t// null if the user is not exist\n\t\t\t\tthis.userUUID = this.getUUIDByUserIdentity(identity);\n\t\t\t\tif (this.userUUID == null)\n\t\t\t\t\texist = false;\n\t\t\t} else {\n\t\t\t\texist = false;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\texist = false;\n\t\t\tlogger.error(\"IOException: \", e);\n\t\t} catch (Exception e) {\n\t\t\texist = false;\n\t\t\tlogger.error(\"Exception: \", e);\n\t\t} finally {\n\t\t\tif (adminToken != null) {\n\t\t\t\tthis.logoutAAA(adminToken);\n\t\t\t}\n\t\t}\n\n\t\tif (exist)\n\t\t\tlogger.info(\"user {}'s UUID = {} \", userName, this.userUUID);\n\t\telse\n\t\t\tlogger.info(\"user {} is not exist\");\n\n\t\treturn exist;\n\t}",
"public boolean existsUser(String userId) {\n\t\treturn true;\n\t}",
"private boolean existsUser(Connection con) throws SQLException {\n\t\tlog.entry();\n\t\tboolean userExists = false;\n\t\tPreparedStatement ps = con.prepareStatement(\"SELECT COUNT(*) FROM Users \"\n\t\t + \"WHERE `id`=?;\");\n\t\ttry {\n\t\t\tps.setInt(1, id);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tif (rs.first() && rs.getInt(1) > 0) {\n\t\t\t\tuserExists = true;\n\t\t\t}\n\t\t} finally {\n\t\t\tcloseStatement(ps);\n\t\t}\n\t\tthrowSqlException();\n\t\tlog.exit();\n\t\treturn userExists;\n\t}",
"@Override\n\tpublic boolean checkUser(String username) {\n\t\tboolean result = false;\n\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tQuery query = (Query) session.createQuery(\"from Member where username=?\");\n\n\t\tMember member = (Member) query.setString(0, username).uniqueResult();\n\t\tif (member != null) {\n\t\t\tresult = true;\n\t\t\tlogger.info(\"Member Exists\");\n\t\t} \n\n\t\treturn result;\n\n\t}",
"@Override\n public boolean userExists(User user) {\n return DATABASE.getUsers().stream()\n .anyMatch(currentUser -> user.equals(currentUser));\n }",
"public boolean hasUser() {\n return user_ != null;\n }",
"private void checkUserExists() {\n dblogin.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n showData1(dataSnapshot);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }",
"public void checkUsernameExist() {\n\n try {\n BLUser bluser = new BLUser();\n User user = new User();\n\n ResultSet rs = bluser.selectUserIdFromUsername(txt_username.getText());\n\n user.setUsername(txt_username.getText());\n bluser.setUser(user);\n\n if (bluser.checkUsernameExist()) {\n \n populateDataOnTable();\n }// end if\n else {\n JOptionPane.showMessageDialog(rootPane, \"Invalid username!\");\n }// end else \n\n }// end try\n catch (Exception ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage(), \"Exception\", JOptionPane.INFORMATION_MESSAGE);\n }//end catch\n }",
"public boolean existUser(String campo1, String campo2);",
"@Override\n\tpublic boolean userExists(String email) {\n\t\treturn (searchIndex(email) >= 0);\n\t}",
"public boolean isThereSuchAUser(String username, String email) ;",
"public boolean userExists(String userName) {\r\n String qr = \"from UserCredsTbl where userName like '%\" + userName + \"%'\"\r\n + \"or userName like '%\" + userName + \"%'\";\r\n List userList = crud.getObject(qr);\r\n\r\n if (userList.size() > 0) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"private boolean correctUser() {\n // TODO mirar si l'usuari es unic a la base de dades\n return true;\n }",
"public boolean hasUser() {\n return instance.hasUser();\n }",
"public boolean isUser(String userName) throws Exception;",
"@Override\n public boolean isUserAlreadyExist(String email) throws UserException {\n User user;\n\n if (email == null || email.equals(\"\")) {\n logger.error(\"invalid user id: \" + email);\n return false;\n }\n try {\n user = userDAO.getUserById(email);\n return user != null;\n } catch (UserException e) {\n e.printStackTrace();\n logger.error(\"failed to delete a user with id: \" + email);\n return false;\n }\n }",
"public boolean exists(gw_show gh) throws Exception {\n\t\treturn this.dao.checkUserExistsWithName(gh.getName());\n\t}",
"private boolean checkNameExistAdd(String userName) {\n\n\t\tUser user = this.userDAO.getUserByName(userName);\n\t\tif (null != user) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"private static boolean verificaUser(String username) {\n String user = null;\r\n try {\r\n PreparedStatement stmt = c.prepareStatement(\"SELECT * FROM utilizador where nome=?;\");\r\n stmt.setString(1, username);\r\n ResultSet rs = stmt.executeQuery();\r\n rs.next();\r\n user = rs.getString(\"nome\");\r\n if (user.equals(username)) {\r\n return true;\r\n }\r\n } catch (SQLException e) {\r\n System.out.println(e);\r\n }\r\n return false;\r\n }",
"public boolean userExists(String user){\n boolean answer = false;\n //look into the database\n try{\n statement = connection.createStatement();\n //execute SQL query and get the data from the database\n ResultSet myResult = statement.executeQuery(\"SELECT name FROM members WHERE name = '\" + user +\"'\");\n while (myResult.next()) {\n if (myResult.getString(\"name\")!= null)\n //name exists so answer = true\n answer = true;\n }\n\n }catch (SQLException ex){ex.printStackTrace();}\n return answer;\n }",
"public boolean checkUserId() {\n if (userIdEditText.getText().toString().isEmpty()) {\n userIdContainer.setError(getString(R.string.error_user_id));\n } else {\n userIdContainer.setError(null);\n }\n return !userIdEditText.getText().toString().isEmpty();\n }",
"public boolean checkUser(User userobj)\n\t\t{\n\t\t\tCursor c = getUser();\n\t\t\tif(c!=null){\n\t\t\t\tc.moveToFirst();\n\t\t\t\tdo{\n\t\t\t\tif(userobj.getUserName().equalsIgnoreCase(c.getString(1))&& userobj.getPassword().equalsIgnoreCase(c.getString(2)))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t}while(c.moveToNext());\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"@Test\n public void nonExistingUser() {\n boolean result = auth.authenticateUser(\"Spiderman\", \"fido\", 0); \n //Then\n assertThat(result, is(false));\n }",
"private boolean isExistUserName(String userName, String userId) {\n User user = userService.findByUserNameAndStatus(userName, Constant.Status.ACTIVE.getValue());\n if (user != null && !user.getUserId().equals(userId)) {\n return true;\n }\n return false;\n }",
"@RequestMapping(value = \"is_exist_user\", method = { RequestMethod.GET })\n\tpublic boolean isExistUser(@RequestParam(\"username\") String username) throws IOException {\n\t\tSystem.out.println(username);\n\t\tboolean result = true;\n\t\tMongoClient mongoClient = null;\n\t\ttry {\n\t\t\t// Create Mongo client\n\t\t\tmongoClient = new MongoClient(\"localhost\", 27017);\n\t\t\tMongoDatabase db = mongoClient.getDatabase(\"projectDB\");\n\n\t\t\t// Create Users collection and user document\n\t\t\tMongoCollection<Document> collection = db.getCollection(\"USERS\");\n\t\t\tDocument myDoc = collection.find(eq(\"username\", username)).first();\n\n\t\t\t//In case no document in the collection match the condition, the user not exist in the DB\n\t\t\tif (myDoc == null) {\n\t\t\t\tmongoClient.close();\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t//Close DB connection\n\t\t\tmongoClient.close();\n\n\t\t} catch (Exception e) {\n\t\t\tmongoClient.close();\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\treturn result;\n\t}",
"public static Boolean checkUser( String id ) {\r\n\t\tif( id == null ) return false;\r\n\t\t\r\n\t\tResultSet resultSet = DBConnector.getQueryResult( \"SELECT * FROM User WHERE userID='\"+id+\"'\" );\r\n\t\ttry {\r\n\t\t\tif( resultSet.next() ){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse return false;\r\n\t\t} \r\n\t\tcatch (SQLException e) {\r\n\t\t\tSystem.out.println(\"DBUtilUser.loginUser() : Error getting user\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\tDBConnector.closeDBConnection();\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}",
"private boolean checkUser(String user_name, String passwordd) throws SQLException {\n boolean sucss = false;\n DBConnection db = new DBConnection();\n Connection connection = db.getConnection();\n String sql = \"SELECT * FROM USER WHERE NAME = ? AND PASSWORD = ?\";\n try (PreparedStatement preparedStatement = connection.prepareStatement(sql);) {\n preparedStatement.setString(1, user_name);\n preparedStatement.setString(2, passwordd);\n ResultSet rs = preparedStatement.executeQuery();\n if (rs.next()) {\n System.out.println(rs.getString(\"name\"));\n System.out.println(rs.getString(\"password\"));\n sucss = true;\n }\n } catch (SQLException e) {\n System.out.println(\"User Is Not Insert\" + e);\n } finally {\n connection.close();\n return sucss;\n }\n }",
"public boolean userExists(String user) {\r\n return userInfo.containsKey(user);\r\n }",
"boolean hasSelectedUser();",
"public static boolean doesUserIdExist(String userId) {\r\n\t\tString query = \"select userid_active from afbcusrmap_master where master_user='\"\r\n\t\t\t\t+ userId + \"'\";\r\n\t\tboolean doesUserExist = false;\r\n\t\ttry {\r\n\t\t\t\r\n\t//\t\t ArrayList<ArrayList<Object>> statusData = Database\r\n\t//\t\t\t\t.getResultsFromDatabase(query);\r\n\t\t\t \r\n\t\t\t ArrayList<ArrayList<Object>> statusData = (ArrayList<ArrayList<Object>>) readTableWithReturnValue(query);\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(statusData.isEmpty())\r\n\t\t\t{\r\n\t\t\t\tdoesUserExist=false;\r\n\t\t\t\tSystem.out.println(\"User ID Does not Exist ..\");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tdoesUserExist=true;\r\n\t\t\t\tSystem.out.println(\"Generated UserID already assigned\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\r\n\t\t }\r\n\t\t\r\n\t\treturn doesUserExist;\r\n\t }",
"public boolean hasUser(){\n return numUser < MAX_USER;\n }",
"@Test\n public void existingUserNOT_OK_PW() {\n boolean result = auth.authenticateUser(\"Ole\", \"fido\", 0); \n //Then\n assertThat(result, is(false));\n }"
] |
[
"0.8109315",
"0.807779",
"0.7857591",
"0.7857591",
"0.7857591",
"0.7857591",
"0.7857591",
"0.7857591",
"0.7857591",
"0.78422797",
"0.7814909",
"0.7686945",
"0.7680346",
"0.76445246",
"0.7563711",
"0.7553823",
"0.75531965",
"0.7527435",
"0.75215006",
"0.75181186",
"0.749873",
"0.7486805",
"0.74568784",
"0.7418588",
"0.74040586",
"0.739925",
"0.7392706",
"0.73745996",
"0.73703814",
"0.7338413",
"0.7296885",
"0.72954243",
"0.728481",
"0.728481",
"0.728481",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.7244173",
"0.7216614",
"0.71998566",
"0.7197647",
"0.7196374",
"0.71952325",
"0.7178718",
"0.7178718",
"0.71757966",
"0.71720403",
"0.71720403",
"0.71720403",
"0.71720403",
"0.71720403",
"0.71720403",
"0.715247",
"0.7136608",
"0.7134081",
"0.7128827",
"0.7122611",
"0.7116931",
"0.71090555",
"0.71026146",
"0.7081188",
"0.70639306",
"0.70340806",
"0.7031222",
"0.6979815",
"0.6976463",
"0.6967638",
"0.6956593",
"0.69501597",
"0.69284475",
"0.69179475",
"0.6917464",
"0.6904296",
"0.6898603",
"0.68912125",
"0.68898505",
"0.6879644",
"0.6865017",
"0.6860765",
"0.68574727",
"0.68567437",
"0.6834774",
"0.6827339",
"0.68187904",
"0.6817888"
] |
0.0
|
-1
|
This method to check user exist or not
|
public boolean checkUser(String email, String password) {
// array of columns to fetch
String[] columns = {
COLUMN_USER_ID
};
SQLiteDatabase db = this.getReadableDatabase();
// selection criteria
String selection = COLUMN_USER_EMAIL + " = ?" + " AND " + COLUMN_USER_PASSWORD + " = ?";
// selection arguments
String[] selectionArgs = {email, password};
// query user table with conditions
/**
* Here query function is used to fetch records from user table this function works like we use sql query.
* SQL query equivalent to this query function is
* SELECT user_id FROM user WHERE user_email = 'jack@androidtutorialshub.com' AND user_password = 'qwerty';
*/
Cursor cursor = db.query(TABLE_NAME, //Table to query
columns, //columns to return
selection, //columns for the WHERE clause
selectionArgs, //The values for the WHERE clause
null, //group the rows
null, //filter by row groups
null); //The sort order
int cursorCount = cursor.getCount();
cursor.close();
db.close();
if (cursorCount > 0) {
return true;
}
return false;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private boolean IsUserExist(){\n SignupUser user =roomDB.dao().GetUserData(et_user.getText().toString());\n if(user!=null){\n if(!user.getEmail().isEmpty()){\n Toast.makeText(this, \"User is already registered!\", Toast.LENGTH_SHORT).show();\n return true;\n }\n\n }\n return false;\n }",
"private boolean isUserExists() {\n\t\treturn KliqDataStore.isUserExists(this.mobileNumber, null);\r\n\t}",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"public boolean existUser(String id);",
"private static boolean doesUserExist () {\n String sqlRetrieveAisId = \"SELECT ais_id FROM users WHERE user_id=?\";\n \n boolean valid = false;\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveAisId)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n valid = rs.next() != false;\n } catch (SQLException se) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return valid;\n }",
"public boolean findUserIsExist(String name) {\n\t\treturn false;\r\n\t}",
"private void checkUser() {\n\t\tlog.info(\"___________checkUser\");\n\t\tList<User> adminUser = userRepository.getByAuthority(AuthorityType.ROLE_ADMIN.toString());\n\t\tif (adminUser == null || adminUser.isEmpty()) {\n\t\t\tgenerateDefaultAdmin();\n\t\t}\n\t}",
"private void isUserExist() {\n\n if (firebaseAuth.getCurrentUser() != null) {\n\n final String user_id = firebaseAuth.getCurrentUser().getUid();\n users_database_reference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n if (dataSnapshot.hasChild(user_id)) {\n // sign in the user and go to main activity\n // Intent intent = new Intent(StartActivity.this, MainActivity.class);\n // intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(intent);\n } else {\n // go to profile page\n Intent intent = new Intent(MainActivity.this, Profile.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }\n }",
"private boolean userExists(Utente checkUser) {\n\t\tDB db = getDB();\n\t\tMap<Long, UtenteBase> users = db.getTreeMap(\"users\");\n\t\tfor(Map.Entry<Long, UtenteBase> user : users.entrySet())\n\t\t\tif(user.getValue() instanceof Utente && (((Utente)user.getValue()).getUsername().equals(checkUser.getUsername())))\n\t\t\t\treturn true;\n\t\treturn false;\n\t}",
"public boolean isUserExist(String email, String Password);",
"boolean isUserExists(RegisterData data) throws DuplicateUserException;",
"boolean isUserExist(String username, String password);",
"private void checkForUser(){\n if(mUserId != -1){\n return;\n }\n\n if(mPreferences == null) {\n getPrefs();\n }\n\n mUserId = mPreferences.getInt(USER_ID_KEY, -1);\n\n if(mUserId != -1){\n return;\n }\n\n //do we have any users at all?\n List<User> users = mUserDAO.getAllUsers();\n if(users.size() <= 0 ){\n User defaultUser = new User(\"din_djarin\",\"baby_yoda_ftw\");\n mUserDAO.insert(defaultUser);\n }\n }",
"Boolean checkUserExists(String userName) throws AppException;",
"boolean userExists(HttpServletRequest request, String userId);",
"public boolean existsUser(String username);",
"@Override\r\n\tpublic Boolean userExist(String username) {\n\t\treturn null;\r\n\t}",
"boolean hasUserName();",
"private void checkUserExist() {\n\n final DatabaseReference mUseRef;\n\n\n if (mAuth.getCurrentUser() != null) {\n final String valid_user_id = mAuth.getCurrentUser().getUid();\n mDatabase.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.hasChild(valid_user_id)) {\n Intent singinIntent = new Intent(JoinActivity.this, MainActivity.class);\n singinIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(singinIntent);\n finish();\n } else {\n Toast.makeText(JoinActivity.this, \"You have to first setup your account!\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }\n }",
"public boolean isExistingUser() {\r\n return isExistingUser;\r\n }",
"public boolean doesTheUserExist(String user)\r\n\t {\r\n\t\t if (!users.get(user).equals(null))\r\n\t\t return true;\r\n\t\t return false;\r\n\t }",
"public Boolean user_exists (UserWS user) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tQuery i = null;\r\n\t\t\t\t\t\r\n\t\t\t\t\tiniciaOperacion();\r\n\t\t\t\t\ti = sesion.createQuery(\"SELECT u.id_user FROM User u WHERE u.mail = :login\"); \r\n\t\t\t\t i.setString(\"login\", user.getLogin());\r\n\t\t\t\t \r\n\t\t\t\t return (i.uniqueResult() != null);\r\n\t\t\t\t}",
"private void checkUser() {\n\t\tloginUser = mySessionInfo.getCurrentUser();\n\t}",
"Boolean checkUserExists(Integer userId) throws AppException;",
"private boolean isUserExist(String friendName)\r\n\t{\r\n\t\tlogger.debug(\"->->->->-> Inside isUserExist method ->->->->->\");\r\n\t\tif(userDAO.getParticularUserbyUserName(friendName)==null){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}",
"public boolean isUserExisted(String _fbEmail);",
"boolean hasUserId();",
"boolean hasUserId();",
"boolean hasUserId();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"boolean hasUserID();",
"@Override\n\tpublic boolean isUserExist(StudentForm student) {\n\t\treturn false;\n\t}",
"boolean hasObjUser();",
"boolean isUserExists(Username username);",
"boolean exists(User user);",
"public User userExist(User user);",
"public User userExists(IDatabase db) {\n\t\tUser doesExist = db.userExists(model);\n\t\treturn doesExist;\n\t}",
"public boolean hasUser() {\n return user_ != null;\n }",
"public boolean hasUser() {\n return user_ != null;\n }",
"@Override\n\tpublic boolean userExists(String user) {\n\t\tLogin login = fetchUser(user);\n\t\treturn (login != null);\n\t}",
"boolean hasUsername();",
"boolean hasUsername();",
"boolean hasUsername();",
"boolean hasUsername();",
"boolean hasUsername();",
"boolean hasUsername();",
"public boolean verifyUser(User user) {\n GetUserTask getUserTask = new GetUserTask();\n User temp = new User();\n\n try {\n temp = getUserTask.execute(user.getUserName()).get();\n }\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n catch (ExecutionException e) {\n e.printStackTrace();\n }\n\n //if user did not exist, add one\n if(temp == null){\n ElasticSearchUserController.AddUserTask addUserTask = new ElasticSearchUserController.AddUserTask();\n addUserTask.execute(user);\n return true;\n }\n return false;\n }",
"public boolean checkUserExist(String userName) {\n\t\tboolean exist = true;\n\t\tString adminToken = this.loginAAA(adminUsername, adminPassword);\n\n\t\ttry {\n\t\t\t// read identity of the user\n\t\t\tString identity = this.getIdentity(userName);\n\t\t\tif (identity != null && !identity.equals(\"\")) {\n\t\t\t\t// parse the UUID from user identity, the member userUUID will\n\t\t\t\t// be\n\t\t\t\t// null if the user is not exist\n\t\t\t\tthis.userUUID = this.getUUIDByUserIdentity(identity);\n\t\t\t\tif (this.userUUID == null)\n\t\t\t\t\texist = false;\n\t\t\t} else {\n\t\t\t\texist = false;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\texist = false;\n\t\t\tlogger.error(\"IOException: \", e);\n\t\t} catch (Exception e) {\n\t\t\texist = false;\n\t\t\tlogger.error(\"Exception: \", e);\n\t\t} finally {\n\t\t\tif (adminToken != null) {\n\t\t\t\tthis.logoutAAA(adminToken);\n\t\t\t}\n\t\t}\n\n\t\tif (exist)\n\t\t\tlogger.info(\"user {}'s UUID = {} \", userName, this.userUUID);\n\t\telse\n\t\t\tlogger.info(\"user {} is not exist\");\n\n\t\treturn exist;\n\t}",
"public boolean existsUser(String userId) {\n\t\treturn true;\n\t}",
"private boolean existsUser(Connection con) throws SQLException {\n\t\tlog.entry();\n\t\tboolean userExists = false;\n\t\tPreparedStatement ps = con.prepareStatement(\"SELECT COUNT(*) FROM Users \"\n\t\t + \"WHERE `id`=?;\");\n\t\ttry {\n\t\t\tps.setInt(1, id);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tif (rs.first() && rs.getInt(1) > 0) {\n\t\t\t\tuserExists = true;\n\t\t\t}\n\t\t} finally {\n\t\t\tcloseStatement(ps);\n\t\t}\n\t\tthrowSqlException();\n\t\tlog.exit();\n\t\treturn userExists;\n\t}",
"@Override\n\tpublic boolean checkUser(String username) {\n\t\tboolean result = false;\n\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tQuery query = (Query) session.createQuery(\"from Member where username=?\");\n\n\t\tMember member = (Member) query.setString(0, username).uniqueResult();\n\t\tif (member != null) {\n\t\t\tresult = true;\n\t\t\tlogger.info(\"Member Exists\");\n\t\t} \n\n\t\treturn result;\n\n\t}",
"@Override\n public boolean userExists(User user) {\n return DATABASE.getUsers().stream()\n .anyMatch(currentUser -> user.equals(currentUser));\n }",
"public boolean hasUser() {\n return user_ != null;\n }",
"private void checkUserExists() {\n dblogin.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n showData1(dataSnapshot);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }",
"public void checkUsernameExist() {\n\n try {\n BLUser bluser = new BLUser();\n User user = new User();\n\n ResultSet rs = bluser.selectUserIdFromUsername(txt_username.getText());\n\n user.setUsername(txt_username.getText());\n bluser.setUser(user);\n\n if (bluser.checkUsernameExist()) {\n \n populateDataOnTable();\n }// end if\n else {\n JOptionPane.showMessageDialog(rootPane, \"Invalid username!\");\n }// end else \n\n }// end try\n catch (Exception ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage(), \"Exception\", JOptionPane.INFORMATION_MESSAGE);\n }//end catch\n }",
"public boolean existUser(String campo1, String campo2);",
"@Override\n\tpublic boolean userExists(String email) {\n\t\treturn (searchIndex(email) >= 0);\n\t}",
"public boolean isThereSuchAUser(String username, String email) ;",
"public boolean userExists(String userName) {\r\n String qr = \"from UserCredsTbl where userName like '%\" + userName + \"%'\"\r\n + \"or userName like '%\" + userName + \"%'\";\r\n List userList = crud.getObject(qr);\r\n\r\n if (userList.size() > 0) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"private boolean correctUser() {\n // TODO mirar si l'usuari es unic a la base de dades\n return true;\n }",
"public boolean hasUser() {\n return instance.hasUser();\n }",
"public boolean isUser(String userName) throws Exception;",
"@Override\n public boolean isUserAlreadyExist(String email) throws UserException {\n User user;\n\n if (email == null || email.equals(\"\")) {\n logger.error(\"invalid user id: \" + email);\n return false;\n }\n try {\n user = userDAO.getUserById(email);\n return user != null;\n } catch (UserException e) {\n e.printStackTrace();\n logger.error(\"failed to delete a user with id: \" + email);\n return false;\n }\n }",
"public boolean exists(gw_show gh) throws Exception {\n\t\treturn this.dao.checkUserExistsWithName(gh.getName());\n\t}",
"private boolean checkNameExistAdd(String userName) {\n\n\t\tUser user = this.userDAO.getUserByName(userName);\n\t\tif (null != user) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"private static boolean verificaUser(String username) {\n String user = null;\r\n try {\r\n PreparedStatement stmt = c.prepareStatement(\"SELECT * FROM utilizador where nome=?;\");\r\n stmt.setString(1, username);\r\n ResultSet rs = stmt.executeQuery();\r\n rs.next();\r\n user = rs.getString(\"nome\");\r\n if (user.equals(username)) {\r\n return true;\r\n }\r\n } catch (SQLException e) {\r\n System.out.println(e);\r\n }\r\n return false;\r\n }",
"public boolean userExists(String user){\n boolean answer = false;\n //look into the database\n try{\n statement = connection.createStatement();\n //execute SQL query and get the data from the database\n ResultSet myResult = statement.executeQuery(\"SELECT name FROM members WHERE name = '\" + user +\"'\");\n while (myResult.next()) {\n if (myResult.getString(\"name\")!= null)\n //name exists so answer = true\n answer = true;\n }\n\n }catch (SQLException ex){ex.printStackTrace();}\n return answer;\n }",
"public boolean checkUserId() {\n if (userIdEditText.getText().toString().isEmpty()) {\n userIdContainer.setError(getString(R.string.error_user_id));\n } else {\n userIdContainer.setError(null);\n }\n return !userIdEditText.getText().toString().isEmpty();\n }",
"public boolean checkUser(User userobj)\n\t\t{\n\t\t\tCursor c = getUser();\n\t\t\tif(c!=null){\n\t\t\t\tc.moveToFirst();\n\t\t\t\tdo{\n\t\t\t\tif(userobj.getUserName().equalsIgnoreCase(c.getString(1))&& userobj.getPassword().equalsIgnoreCase(c.getString(2)))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t}while(c.moveToNext());\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"@Test\n public void nonExistingUser() {\n boolean result = auth.authenticateUser(\"Spiderman\", \"fido\", 0); \n //Then\n assertThat(result, is(false));\n }",
"private boolean isExistUserName(String userName, String userId) {\n User user = userService.findByUserNameAndStatus(userName, Constant.Status.ACTIVE.getValue());\n if (user != null && !user.getUserId().equals(userId)) {\n return true;\n }\n return false;\n }",
"@RequestMapping(value = \"is_exist_user\", method = { RequestMethod.GET })\n\tpublic boolean isExistUser(@RequestParam(\"username\") String username) throws IOException {\n\t\tSystem.out.println(username);\n\t\tboolean result = true;\n\t\tMongoClient mongoClient = null;\n\t\ttry {\n\t\t\t// Create Mongo client\n\t\t\tmongoClient = new MongoClient(\"localhost\", 27017);\n\t\t\tMongoDatabase db = mongoClient.getDatabase(\"projectDB\");\n\n\t\t\t// Create Users collection and user document\n\t\t\tMongoCollection<Document> collection = db.getCollection(\"USERS\");\n\t\t\tDocument myDoc = collection.find(eq(\"username\", username)).first();\n\n\t\t\t//In case no document in the collection match the condition, the user not exist in the DB\n\t\t\tif (myDoc == null) {\n\t\t\t\tmongoClient.close();\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t//Close DB connection\n\t\t\tmongoClient.close();\n\n\t\t} catch (Exception e) {\n\t\t\tmongoClient.close();\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\treturn result;\n\t}",
"public static Boolean checkUser( String id ) {\r\n\t\tif( id == null ) return false;\r\n\t\t\r\n\t\tResultSet resultSet = DBConnector.getQueryResult( \"SELECT * FROM User WHERE userID='\"+id+\"'\" );\r\n\t\ttry {\r\n\t\t\tif( resultSet.next() ){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse return false;\r\n\t\t} \r\n\t\tcatch (SQLException e) {\r\n\t\t\tSystem.out.println(\"DBUtilUser.loginUser() : Error getting user\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\tDBConnector.closeDBConnection();\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}",
"private boolean checkUser(String user_name, String passwordd) throws SQLException {\n boolean sucss = false;\n DBConnection db = new DBConnection();\n Connection connection = db.getConnection();\n String sql = \"SELECT * FROM USER WHERE NAME = ? AND PASSWORD = ?\";\n try (PreparedStatement preparedStatement = connection.prepareStatement(sql);) {\n preparedStatement.setString(1, user_name);\n preparedStatement.setString(2, passwordd);\n ResultSet rs = preparedStatement.executeQuery();\n if (rs.next()) {\n System.out.println(rs.getString(\"name\"));\n System.out.println(rs.getString(\"password\"));\n sucss = true;\n }\n } catch (SQLException e) {\n System.out.println(\"User Is Not Insert\" + e);\n } finally {\n connection.close();\n return sucss;\n }\n }",
"public boolean userExists(String user) {\r\n return userInfo.containsKey(user);\r\n }",
"boolean hasSelectedUser();",
"public static boolean doesUserIdExist(String userId) {\r\n\t\tString query = \"select userid_active from afbcusrmap_master where master_user='\"\r\n\t\t\t\t+ userId + \"'\";\r\n\t\tboolean doesUserExist = false;\r\n\t\ttry {\r\n\t\t\t\r\n\t//\t\t ArrayList<ArrayList<Object>> statusData = Database\r\n\t//\t\t\t\t.getResultsFromDatabase(query);\r\n\t\t\t \r\n\t\t\t ArrayList<ArrayList<Object>> statusData = (ArrayList<ArrayList<Object>>) readTableWithReturnValue(query);\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(statusData.isEmpty())\r\n\t\t\t{\r\n\t\t\t\tdoesUserExist=false;\r\n\t\t\t\tSystem.out.println(\"User ID Does not Exist ..\");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tdoesUserExist=true;\r\n\t\t\t\tSystem.out.println(\"Generated UserID already assigned\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\r\n\t\t }\r\n\t\t\r\n\t\treturn doesUserExist;\r\n\t }",
"public boolean hasUser(){\n return numUser < MAX_USER;\n }",
"@Test\n public void existingUserNOT_OK_PW() {\n boolean result = auth.authenticateUser(\"Ole\", \"fido\", 0); \n //Then\n assertThat(result, is(false));\n }"
] |
[
"0.8109315",
"0.807779",
"0.7857591",
"0.7857591",
"0.7857591",
"0.7857591",
"0.7857591",
"0.7857591",
"0.7857591",
"0.78422797",
"0.7814909",
"0.7686945",
"0.7680346",
"0.76445246",
"0.7563711",
"0.7553823",
"0.75531965",
"0.7527435",
"0.75215006",
"0.75181186",
"0.749873",
"0.7486805",
"0.74568784",
"0.7418588",
"0.74040586",
"0.739925",
"0.7392706",
"0.73745996",
"0.73703814",
"0.7338413",
"0.7296885",
"0.72954243",
"0.728481",
"0.728481",
"0.728481",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.72448695",
"0.7244173",
"0.7216614",
"0.71998566",
"0.7197647",
"0.7196374",
"0.71952325",
"0.7178718",
"0.7178718",
"0.71757966",
"0.71720403",
"0.71720403",
"0.71720403",
"0.71720403",
"0.71720403",
"0.71720403",
"0.715247",
"0.7136608",
"0.7134081",
"0.7128827",
"0.7122611",
"0.7116931",
"0.71090555",
"0.71026146",
"0.7081188",
"0.70639306",
"0.70340806",
"0.7031222",
"0.6979815",
"0.6976463",
"0.6967638",
"0.6956593",
"0.69501597",
"0.69284475",
"0.69179475",
"0.6917464",
"0.6904296",
"0.6898603",
"0.68912125",
"0.68898505",
"0.6879644",
"0.6865017",
"0.6860765",
"0.68574727",
"0.68567437",
"0.6834774",
"0.6827339",
"0.68187904",
"0.6817888"
] |
0.0
|
-1
|
array of columns to fetch
|
public List<Diary> getAlldiary(String user_e) {
String[] columns = {
FeedEntry.COLUMN_NAME_USER,
FeedEntry.COLUMN_NAME_TITLE,
FeedEntry.COLUMN_NAME_DETAIL,
FeedEntry.COLUMN_NAME_DATE,
FeedEntry.COLUMN_NAME_COVER
};
String selection = FeedEntry.COLUMN_NAME_USER + " = ?";
String[] v_columns = {
user_e
};
List<Diary> diaryList = new ArrayList<Diary>();
SQLiteDatabase db = this.getReadableDatabase();
// query the user table
/**
* Here query function is used to fetch records from user table this function works like we use sql query.
* SQL query equivalent to this query function is
* SELECT user_id,user_name,user_email,user_password FROM user ORDER BY user_name;
*/
Cursor cursor = db.query(FeedEntry.TABLE_NAME, //Table to query
columns, //columns to return
selection, //columns for the WHERE clause
v_columns, //The values for the WHERE clause
null, //group the rows
null, //filter by row groups
null); //The sort order
// Traversing through all rows and adding to list
if (cursor.moveToFirst()) {
do {
Diary user = new Diary(
cursor.getString(cursor.getColumnIndex(FeedEntry.COLUMN_NAME_USER)),
cursor.getString(cursor.getColumnIndex(FeedEntry.COLUMN_NAME_DATE)),
cursor.getString(cursor.getColumnIndex(FeedEntry.COLUMN_NAME_TITLE)),
cursor.getString(cursor.getColumnIndex(FeedEntry.COLUMN_NAME_DETAIL)),
cursor.getString(cursor.getColumnIndex(FeedEntry.COLUMN_NAME_COVER))
);
// Adding diary record to list
diaryList.add(user);
} while (cursor.moveToNext());
}
cursor.close();
db.close();
// return user list
return diaryList;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"List<Column> getQueryColumns();",
"List<String> getColumns();",
"private String[] getColumns(String[] properties) {\r\n String[] dst = new String[properties.length];\r\n int i = 0;\r\n for (String string : properties) {\r\n dst[i++] = getProjectionColumn(string);\r\n }\r\n return dst;\r\n }",
"public List<Column> getColumns();",
"Column[] getColumns() { return columns; }",
"public List<String> getColumns();",
"public Column[] getColumns() {return columns;}",
"public String[] getColumns() {\r\n\t\tlogger.trace(\"Enter getColumns\");\r\n\t\tlogger.trace(\"Exit getColumns\");\r\n\t\treturn columns;\r\n\t}",
"@Override\r\n\tpublic String[] getCol(String[] sql) {\n\t\treturn null;\r\n\t}",
"Column getColumns(int index);",
"public List<Object[]> select() {\n return selectColumns(metadata.getColumns());\n }",
"private String getAllColumnName() {\n\t\t\n\t\tStringBuilder builder = new StringBuilder();\n\t\t// .append(COLUMN_id).append(\"=?,\").\n\t\tbuilder.append(\"user_id\").append(\"=?,\");\n\t\tbuilder.append(\"lib_book_id\").append(\"=?,\");\n\t\tbuilder.append(\"lending_date\").append(\"=?,\");\n\t\tbuilder.append(\"return_date\").append(\"=?,\");\n\t\tbuilder.append(\"returned_date\").append(\"=?,\");\n\t\tbuilder.append(\"status\").append(\"=?\");\n\t\t\n\t\treturn builder.toString();\n\t}",
"private String[] getColumas(){\n String columna[]={\"Tipo Usuario \",\"Nombre\",\"Empleado ID\",\"Asignar\"};\n return columna;\n }",
"com.google.protobuf.ByteString getColumnBytes();",
"public Map<String, ColumnMetaData> getColumns();",
"public java.lang.String[] getColumns() {\n return columns;\n }",
"public Set<String> getColumns();",
"private Object [] getFilterVals()\n throws java.sql.SQLException\n {\n Object [] ret = new Object[m_cols.length];\n\n for (int i = 0; i < m_cols.length; i++)\n {\n ret[i] = m_rs.getString((String)m_cols[i]);\n }\n return ret;\n }",
"java.util.List<Column>\n getColumnsList();",
"public int[] getColumns()\n\t{\n\t\treturn columns;\n\t}",
"public com.guidewire.datamodel.ColumnDocument.Column[] getColumnArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(COLUMN$0, targetList);\r\n com.guidewire.datamodel.ColumnDocument.Column[] result = new com.guidewire.datamodel.ColumnDocument.Column[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }",
"public com.walgreens.rxit.ch.cda.StrucDocCol[] getColArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(COL$2, targetList);\n com.walgreens.rxit.ch.cda.StrucDocCol[] result = new com.walgreens.rxit.ch.cda.StrucDocCol[targetList.size()];\n targetList.toArray(result);\n return result;\n }\n }",
"public static String[] columnProjection() {\n\n\t\treturn new String[]{KEY_ID, KEY_ADDRESS, KEY_NAME, KEY_VOLUME, KEY_POOL_LOCALE, KEY_FINISH, KEY_SANITIZER, KEY_PUMP_BRAND, KEY_PUMP_MODEL, KEY_FILTER, KEY_CLEANER_BRAND, KEY_CLEANER_MODEL, KEY_TRAFFIC, KEY_MIN_DEPTH, KEY_MAX_DEPTH, KEY_TILING, KEY_COVER, KEY_ATTACHED_SPA, KEY_HEATER, KEY_DIVING_BOARD, KEY_SLIDE, KEY_LADDER, KEY_FOUNTAINS, KEY_ROCK_WATERFALL, KEY_LIGHTS, KEY_INFINITY, KEY_SPORTING_EQUIPMENT, KEY_BEACH_ENTRY, KEY_SAND, KEY_IMAGE, KEY_WEATHER_NOTIFICATIONS, KEY_WATER_TEST_REMINDERS, KEY_FILTER_REMINDERS, KEY_SAFETY_NOTIFICATIONS, KEY_MAINTENANCE_REMINDERS, KEY_CUSTOM_NOTIFICATIONS, KEY_COUPON_NOTIFICATIONS};\n\t}",
"private void fetchColumnValues(int[] docIdSet, int startIndex, int length) {\n Set<String> columnsLoaded = new HashSet();\n\n for (AggregationFunctionContext aggrFuncContext : _aggrFuncContextList) {\n String[] aggrColumns = aggrFuncContext.getAggregationColumns();\n\n for (int i = 0; i < aggrColumns.length; i++) {\n String aggrColumn = aggrColumns[i];\n\n if (!columnsLoaded.contains(aggrColumn)) {\n int[] dictIdArray = _columnToDictArrayMap.get(aggrColumn);\n BlockValSet blockValSet = aggrFuncContext.getBlockValSet(i);\n\n blockValSet.readIntValues(docIdSet, startIndex, length, dictIdArray, startIndex);\n columnsLoaded.add(aggrColumn);\n\n Dictionary dictionary = aggrFuncContext.getDictionary(i);\n double[] valueArray = _columnToValueArrayMap.get(aggrColumn);\n dictionary.readDoubleValues(dictIdArray, startIndex, length, valueArray, startIndex);\n }\n }\n }\n }",
"public List getColumns() {\r\n return columns;\r\n }",
"private static ArrayList getColumns (Connection c, String t)\n\t\tthrows Exception\n\t{\n\t\tStatement s = c.createStatement();\n\t\tResultSet r = s.executeQuery(\"show columns from `\" + t + \"`\");\n\t\tArrayList result = new ArrayList();\n\t\twhile (r.next()) {\n\t\t\tColumnInfo info = new ColumnInfo();\n\t\t\tinfo.name = r.getString(1);\n\t\t\tinfo.type = r.getString(2);\n\t\t\tinfo.nullok = r.getString(3);\n\t\t\tinfo.key = r.getString(4);\n\t\t\tinfo.defaultval = r.getString(5);\n\t\t\tinfo.extra = r.getString(6);\n\t\t\tresult.add(info);\n\t\t}\n\t\ts.close();\n\t\tCollections.sort(result);\n\t\treturn result;\n\t}",
"public ArrayList getColumns() {\n return columns;\n }",
"public int[] getCol() { return _col; }",
"public Collection<TapColumn> findAllColumns();",
"public final Column[] getRawColumns() { return columns; }",
"public void loadData(Object[] columnData);",
"public List<byte[]> getColumns(){\n List<byte[]> list = new ArrayList<byte[]>();\n Iterator<Pair<String ,byte[]>> iter =outList.iterator();\n if(iter.hasNext()){\n byte[] col = iter.next().getSecond();\n if(null != col)\n list.add(col);\n }\n return list;\n }",
"public String[][] getData(String stmt, int numOfFields) {\n String[][] result = new String[0][];\n try {\n Statement stmnt = connection.createStatement();\n result = new String[100][100];\n ResultSet rs = stmnt.executeQuery(stmt);\n int row = 0;\n while (rs.next()) {\n for (int i = 1; i <= numOfFields; i++) {\n\n result[row][i - 1] = rs.getString(i);\n\n } //for\n row++;\n } //while\n } //try\n catch (SQLException sqlex) {\n System.out.println(sqlex.getMessage());\n } //catch\n return result;\n }",
"public static String getSelectColumns(boolean selectIDs)\r\n {\r\n Course.CourseTable[] cols = Course.CourseTable.class.getEnumConstants();\r\n\r\n String columnSetUp = \"\";\r\n\r\n for (int i = 0; i < cols.length; i++)\r\n {\r\n if (selectIDs || !cols[i].isID() || i == 0)\r\n {\r\n columnSetUp += cols[i].getWithAlias() + \" as '\" + cols[i].getWithAlias() + \"', \";\r\n }\r\n }\r\n columnSetUp = columnSetUp.substring(0, columnSetUp.length() - 2);\r\n return columnSetUp;\r\n\r\n }",
"Map<String, ByteBuffer> getColumns(String columnFamily, String key, boolean reversed, String... columns);",
"public MrnWoatlas5[] get (String fields, String where, String order) {\n // create the column list from the instance variables if neccessary\n try {\n if (fields.equals(\"\")) { fields = null; }\n } catch (NullPointerException e) {}\n if (fields == null) {\n fields = createColumns();\n } // if (fields != null)\n return doGet(db.select(fields, TABLE, where, order));\n }",
"public abstract TableTreeNodeColumn[] getColumns();",
"com.factset.protobuf.stach.v2.table.ColumnDefinitionProto.ColumnDefinition getColumns(int index);",
"public int getCols();",
"private String[] getHeaderColumns() {\n int length = CallLogQuery._PROJECTION.length;\n String[] columns = new String[length + 1];\n System.arraycopy(CallLogQuery._PROJECTION, 0, columns, 0, length);\n columns[length] = CallLogQuery.SECTION_NAME;\n return columns;\n }",
"private static String [] getColumnName(){\r\n\t\tString [] columnNames = { DBSAResourceBundle.res.getString(\"no\"), DBSAResourceBundle.res.getString(\"title\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"authors\"), DBSAResourceBundle.res.getString(\"link\"),\r\n\t\t\t\tDBSAResourceBundle.res.getString(\"year\"),DBSAResourceBundle.res.getString(\"abstract\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"publisher\"),(\"X\"), \r\n\t\t\t\t(\"duplicate\"), \"id\"};\r\n\t\t\t\r\n\t\treturn columnNames;\r\n\t}",
"public RawGetRecordsByColumnResponse getRecordsByColumnRaw(GetRecordsByColumnRequest request) throws GPUdbException {\n RawGetRecordsByColumnResponse actualResponse_ = new RawGetRecordsByColumnResponse();\n submitRequest(\"/get/records/bycolumn\", request, actualResponse_, false);\n return actualResponse_;\n }",
"public String [] getColumnNamesForQuery(String query) {\n LOG.error(\"This database does not support free-form query column names.\");\n return null;\n }",
"private List<String> getColNames() {\r\n\t\t//\r\n\t\tDBManager dbm = new DBManager(this);\r\n\t\t\r\n\t\tSQLiteDatabase wdb = dbm.getWritableDatabase();\r\n\r\n\t\t// REF=> http://stackoverflow.com/questions/947215/how-to-get-a-list-of-column-names-on-sqlite3-iphone\r\n\t\tString sql = \"PRAGMA table_info('\" + DBManager.tableName + \"')\";\r\n\t\t\r\n\t\tCursor c = wdb.rawQuery(sql, null);\r\n\t\t\r\n\t\t// Log\r\n\t\tLog.d(\"DBAdminActivity.java\" + \"[\"\r\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\r\n\t\t\t\t+ \"]\", \"c.getCount() => \" + c.getCount());\r\n\t\t\r\n\t\tLog.d(\"DBAdminActivity.java\" + \"[\"\r\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\r\n\t\t\t\t+ \"]\", \"c.getColumnCount() => \" + c.getColumnCount());\r\n\r\n\t\tList<String> colNames = new ArrayList<String>();\r\n\t\t\r\n\t\tc.moveToFirst();\r\n\t\t\r\n\t\tfor (int i = 0; i < c.getCount(); i++) {\r\n\t\t\t\r\n\t\t\tcolNames.add(c.getString(0));\r\n\t\t\t\r\n\t\t\t// Log\r\n\t\t\tLog.d(\"DBAdminActivity.java\" + \"[\"\r\n\t\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\r\n\t\t\t\t\t+ \"]\", \"c.getString(0) => \" + c.getString(0) + \r\n\t\t\t\t\t\" / \" + \"c.getString(1) => \" + c.getString(1));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tc.moveToNext();\r\n\t\t\t\r\n\t\t}//for (int i = 0; i < c.getCount(); i++)\r\n\t\t\r\n\t\twdb.close();\r\n\t\t\r\n\t\tfor (String string : colNames) {\r\n\t\t\t\r\n\t\t\t// Log\r\n\t\t\tLog.d(\"DBAdminActivity.java\" + \"[\"\r\n\t\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\r\n\t\t\t\t\t+ \"]\", \"colName => \" + string);\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n//\t\treturn (String[])colNames.toArray();\r\n\t\treturn colNames;\r\n\t\t\r\n\t}",
"public SystemColumn[] buildColumnList() {\n \n return new SystemColumn[] {\n SystemColumnImpl.getUUIDColumn(\"TIMING_ID\", false),\n SystemColumnImpl.getColumn(\"CONSTRUCTOR_TIME\", Types.BIGINT, true),\n SystemColumnImpl.getColumn(\"OPEN_TIME\", Types.BIGINT, true),\n SystemColumnImpl.getColumn(\"NEXT_TIME\", Types.BIGINT, true),\n SystemColumnImpl.getColumn(\"CLOSE_TIME\", Types.BIGINT, true),\n SystemColumnImpl.getColumn(\"EXECUTE_TIME\", Types.BIGINT, true),\n SystemColumnImpl.getColumn(\"AVG_NEXT_TIME_PER_ROW\", Types.BIGINT, true),\n SystemColumnImpl.getColumn(\"PROJECTION_TIME\", Types.BIGINT, true),\n SystemColumnImpl.getColumn(\"RESTRICTION_TIME\", Types.BIGINT, true),\n SystemColumnImpl.getColumn(\"TEMP_CONG_CREATE_TIME\", Types.BIGINT, true),\n SystemColumnImpl.getColumn(\"TEMP_CONG_FETCH_TIME\", Types.BIGINT, true),\n };\n }",
"public ArrayList<String> selectCommand(String query, String[] wantedColumn){\n String record = null;\n ArrayList<String> records=new ArrayList<>( );\n try (Connection conn = this.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(query)){\n // loop through the result set\n while (rs.next()) {\n record=\"\";\n for (int i = 0; i <wantedColumn.length ; i++) {\n record+=rs.getString( wantedColumn[i] ) + \"\\t\";\n }\n records.add(record);\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return records;\n }",
"public Class<?>[] getColumnTypes();",
"public static String[] concreteColumnProjection() {\n\n\t\treturn new String[]{CONCRETE_ID, CONCRETE_ADDRESS, CONCRETE_NAME, CONCRETE_VOLUME, CONCRETE_POOL_LOCALE, CONCRETE_FINISH, CONCRETE_SANITIZER, CONCRETE_PUMP_BRAND, CONCRETE_PUMP_MODEL, CONCRETE_FILTER, CONCRETE_CLEANER_BRAND, CONCRETE_CLEANER_MODEL, CONCRETE_TRAFFIC, CONCRETE_MIN_DEPTH, CONCRETE_MAX_DEPTH, CONCRETE_TILING, CONCRETE_COVER, CONCRETE_ATTACHED_SPA, CONCRETE_HEATER, CONCRETE_DIVING_BOARD, CONCRETE_SLIDE, CONCRETE_LADDER, CONCRETE_FOUNTAINS, CONCRETE_ROCK_WATERFALL, CONCRETE_LIGHTS, CONCRETE_INFINITY, CONCRETE_SPORTING_EQUIPMENT, CONCRETE_BEACH_ENTRY, CONCRETE_SAND, CONCRETE_IMAGE, CONCRETE_WEATHER_NOTIFICATIONS, CONCRETE_WATER_TEST_REMINDERS, CONCRETE_FILTER_REMINDERS, CONCRETE_SAFETY_NOTIFICATIONS, CONCRETE_MAINTENANCE_REMINDERS, CONCRETE_CUSTOM_NOTIFICATIONS, CONCRETE_COUPON_NOTIFICATIONS};\n\t}",
"private static String [] getColumnName(){\r\n\t\tString [] columnNames = { DBSAResourceBundle.res.getString(\"no\"), DBSAResourceBundle.res.getString(\"title\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"authors\"), DBSAResourceBundle.res.getString(\"link\"),\r\n\t\t\t\tDBSAResourceBundle.res.getString(\"year\"),DBSAResourceBundle.res.getString(\"abstract\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"publisher\"),DBSAResourceBundle.res.getString(\"mark\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"duplicate\"), \"dlsName\"};\r\n\t\t\t\r\n\t\treturn columnNames;\r\n\t}",
"public String getColumns() {\n\t\tString[] colStrArr = columns.toArray(new String[columns.size()]); \n\t\tlogInfo(String.join(\", \", colStrArr));\n\t\treturn \"\"+String.join(\", \", colStrArr);\n\t}",
"List<String> headerColumns();",
"void setColumns(List<String> columns);",
"@Override\n public java.util.List<Column> getColumnsList() {\n return columns_;\n }",
"Vector<String> getColumns(String table) throws SQLException {\n\t\tVector<String> columns = new Vector<String>();\n\t\tDatabaseMetaData md = con.getMetaData();\n\t\tfor (ResultSet rs = md.getColumns(null, null, table, null); rs.next(); columns\n\t\t\t\t.add(rs.getString(4)))\n\t\t\t;\n\t\treturn columns;\n\t}",
"public static Column[] all() {\n return Column.values();\n }",
"Map<String, ByteBuffer> getColumns(String columnFamily, String key, int limit, boolean reversed, String fromColumn, String toColumn);",
"@Override\r\n\tpublic String[] getPrettyColumnNames() {\n\t\treturn this.dispColNames;\r\n\t\t//未实现\r\n\t}",
"private void addColumns() {\n\n List<Integer> colIds = new ArrayList<>();\n List<String> colNames = new ArrayList<>();\n List<ColumnDescriptor> tupleDescription = context.getTupleDescription();\n for (int i = 0; i < tupleDescription.size(); i++) {\n ColumnDescriptor col = tupleDescription.get(i);\n if (col.isProjected() && hiveIndexes.get(i) != null) {\n colIds.add(hiveIndexes.get(i));\n colNames.add(col.columnName());\n }\n }\n jobConf.set(READ_ALL_COLUMNS, \"false\");\n jobConf.set(READ_COLUMN_IDS_CONF_STR, StringUtils.join(colIds, \",\"));\n jobConf.set(READ_COLUMN_NAMES_CONF_STR, StringUtils.join(colNames, \",\"));\n }",
"List<String> getColumnIdentifiers();",
"com.google.protobuf.ByteString\n getColumnBytes();",
"int getColumns();",
"int getColumns();",
"public void cols(String...columns) {\n\t\tthis.columnList = columns;\n\t}",
"java.util.List<com.factset.protobuf.stach.v2.table.ColumnDefinitionProto.ColumnDefinition> \n getColumnsList();",
"@Test\n public void selectAllDeletedColumns() {\n String[] retArray = {\n \"3,30000.0,null,30000\", \"4,4.0,4,null\",\n };\n\n String[] columnNames = {\"root.sg1.d1.s1\", \"root.sg1.d1.s2\", \"root.sg1.d1.s3\"};\n\n try (Connection connection = EnvFactory.getEnv().getConnection();\n Statement statement = connection.createStatement();\n ResultSet resultSet =\n statement.executeQuery(\"select s1, s2, s3 from root.sg1.d1 where time <= 4\")) {\n\n ResultSetMetaData resultSetMetaData = resultSet.getMetaData();\n Map<String, Integer> map = new HashMap<>();\n for (int i = 1; i <= resultSetMetaData.getColumnCount(); i++) {\n map.put(resultSetMetaData.getColumnName(i), i);\n }\n assertEquals(columnNames.length + 1, resultSetMetaData.getColumnCount());\n int cnt = 0;\n while (resultSet.next()) {\n StringBuilder builder = new StringBuilder();\n builder.append(resultSet.getString(1));\n for (String columnName : columnNames) {\n int index = map.get(columnName);\n builder.append(\",\").append(resultSet.getString(index));\n }\n assertEquals(retArray[cnt], builder.toString());\n cnt++;\n }\n assertEquals(retArray.length, cnt);\n } catch (SQLException e) {\n e.printStackTrace();\n fail(e.getMessage());\n }\n }",
"DataFrameColumns<R,C> cols();",
"@NonNull\n Collection<TObj> getColumnItems(int column) {\n Collection<TObj> result = new LinkedList<>();\n for (int count = mData.size(), i = 0; i < count; i++) {\n int key = mData.keyAt(i);\n TObj columnObj = mData.get(key).get(column);\n if (columnObj != null) {\n result.add(columnObj);\n }\n\n }\n return result;\n }",
"@Override\n public Column getColumns(int index) {\n return columns_.get(index);\n }",
"public GetRecordsByColumnResponse getRecordsByColumn(GetRecordsByColumnRequest request) throws GPUdbException {\n if ( !request.getEncoding().equals( \"binary\" ))\n throw new GPUdbException( \"This method only supports binary encoding.\" );\n\n RawGetRecordsByColumnResponse actualResponse_ = new RawGetRecordsByColumnResponse();\n submitRequest(\"/get/records/bycolumn\", request, actualResponse_, false);\n GetRecordsByColumnResponse response_ = new GetRecordsByColumnResponse();\n response_.setTableName(actualResponse_.getTableName());\n response_.setData( DynamicTableRecord.transpose( actualResponse_.getResponseSchemaStr(), actualResponse_.getBinaryEncodedResponse() ) );\n response_.setTotalNumberOfRecords(actualResponse_.getTotalNumberOfRecords());\n response_.setHasMoreRecords(actualResponse_.getHasMoreRecords());\n return response_;\n }",
"public Object[] getColumn(int c) {\n// Object[] dta = new Object[data.rows];\n// for (int i = 0; i < data.rows; i++)\n// dta[i] = data.values[c][c];\n return data.values[c];\n }",
"public static String[] detailsColumnProjection() {\n\n\t\treturn new String[]{KEY_ID, KEY_ADDRESS, KEY_NAME, KEY_VOLUME};\n\t}",
"java.util.List<com.google.devtools.kythe.proto.Filecontext.ContextDependentVersion.Column> \n getColumnList();",
"public List<Column> getColumns(){\r\n\t\treturn columns;\r\n\t}",
"public SystemColumn[] buildColumnList()\n throws StandardException\n {\n return new SystemColumn[] {\n SystemColumnImpl.getUUIDColumn(\"UUID\", false),\n SystemColumnImpl.getIdentifierColumn(\"ROLEID\", false),\n SystemColumnImpl.getIdentifierColumn(\"GRANTEE\", false),\n SystemColumnImpl.getIdentifierColumn(\"GRANTOR\", false),\n SystemColumnImpl.getIndicatorColumn(\"WITHADMINOPTION\"),\n SystemColumnImpl.getIndicatorColumn(\"ISDEF\"),\n };\n }",
"public String[] getColumnNames();",
"@Test\n public void twoColumns_and_projection() {\n for (Tuple row : query().from(Constants.survey).select(Constants.survey.id, Constants.survey.name, new QIdName(Constants.survey.id, Constants.survey.name)).fetch()) {\n Assert.assertEquals(3, row.size());\n Assert.assertEquals(Integer.class, row.get(0, Object.class).getClass());\n Assert.assertEquals(String.class, row.get(1, Object.class).getClass());\n Assert.assertEquals(IdName.class, row.get(2, Object.class).getClass());\n }\n }",
"public static Object[] getColumnNames()\n\t{\n\t\treturn new Object[]{\"id\", \"name\", \"price\", \"onSale\"};\n\t}",
"@Test\n public void projection_and_twoColumns() {\n for (Tuple row : query().from(Constants.survey).select(new QIdName(Constants.survey.id, Constants.survey.name), Constants.survey.id, Constants.survey.name).fetch()) {\n Assert.assertEquals(3, row.size());\n Assert.assertEquals(IdName.class, row.get(0, Object.class).getClass());\n Assert.assertEquals(Integer.class, row.get(1, Object.class).getClass());\n Assert.assertEquals(String.class, row.get(2, Object.class).getClass());\n }\n }",
"public String[] getReferencedColumnNames();",
"DataFrame<R,C> select(Iterable<R> rowKeys, Iterable<C> colKeys);",
"public void setColumns(java.lang.String[] columns) {\n this.columns = columns;\n }",
"boolean getIncludesAllColumns();",
"private void checkColumns(String[] projection) {\n\t\tString[] available = { MedTable.MED_NAME,\n\t\t\t\tMedTable.MED_DOSAGE, MedTable.MED_ID,\n\t\t\t\tMedTable.MED_DATE_FILLED, MedTable.MED_DURATION,\n\t\t\t\tMedTable.MED_WARNING, MedTable.MED_REMINDER_ON };\n\t\tif(projection != null) {\n\t\t\tHashSet<String> requestedColumns = new HashSet<String>(Arrays.asList(projection));\n\t\t\tHashSet<String> availableColumns = new HashSet<String>(Arrays.asList(available));\n\t\t\t// Check if all columns which are requested are available\n\t\t\tif(!availableColumns.containsAll(requestedColumns)) {\n\t\t\t\tthrow new IllegalArgumentException(\"Unknown columns in projection\");\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic Map<String, String[]> loadColumnMetas(String databaseName) throws SQLException {\n\t\tString sql=\"select utc.*,UCC.comments from user_tab_columns utc\\n\" + \n\t\t\t\t\"left join user_col_comments ucc on UCC.table_name=UTC.table_name and UCC.column_name=UTC.column_name\";\n\t\tMap<String, String[]> ret=new HashMap<>();\n\t\t try(PreparedStatement preparedStatement= connection.prepareStatement(sql);\n\t \t\tResultSet resultSet=preparedStatement.executeQuery();){\n\t\t\twhile(resultSet.next()) {\n\t\t\t\tString tableName=resultSet.getString(\"TABLE_NAME\")\n\t\t\t\t\t\t,columnName=resultSet.getString(\"COLUMN_NAME\")\n\t\t\t\t\t\t,dataLength=resultSet.getString(\"DATA_LENGTH\")\n\t\t ,nullable=resultSet.getString(\"NULLABLE\")\n\t\t ,comments=resultSet.getString(\"COMMENTS\")\n\t\t\t\t\t\t;\n\t\t\t\tString key=tableName+\":\"+columnName;\n\t\t\t\tret.put(key, new String[] {dataLength,nullable,comments});\n\t\t\t\t\n\t\t\t}\n\t }\n\t\t\n\t\treturn ret;\n\t}",
"public void setColumns(List<String> columnNames);",
"private List<Column> getPayloadColumns(int payloadColumns) {\n List<Column> payloads = new ArrayList<Column>();\n\n for (int c = 0; c < payloadColumns; c++) {\n Column column = new Column(\"PAYLOAD_\" + c);\n column.setMappedType(\"VARCHAR\");\n column.setSize(\"100\");\n payloads.add(column);\n }\n\n return payloads;\n }",
"Object[] getAttributes() throws SQLException;",
"public ResultSet getColumns(String table)\n\t{\n\t\tDatabaseMetaData metadata = null;\n\t\tResultSet rs = null;\n\t\ttry\n\t\t{\n\t\t\tConnection conn = source.conn;\n\t\t\tmetadata = conn.getMetaData();\n\t\t\trs = metadata.getColumns(null, sourceSchema, table, \"%\");\n\t\t}\n\t\tcatch(SQLException e)\n\t\t{\n\t\t\tLog.error(\"Errore SQL generico: \" + e.getMessage());\n\t\t}\n\t\treturn rs;\n\t}",
"@Override\n\tprotected String getColumns()\n\t{\n\t\treturn null;\n\t}",
"private void initColumns() {\n columnNames = new LinkedList<String>();\n columnNames.add(\"table.ededb.datatable.action\");\n columnNames.add(\"table.ededb.datatable.filename\");\n columnNames.add(\"table.ededb.datatable.mime\");\n columnNames.add(\"table.ededb.datatable.size\");\n columnNames.add(\"table.ededb.datatable.localcopy\");\n }",
"@Override\r\n\tpublic String[] getData(String[] sql) {\n\t\treturn null;\r\n\t}",
"public ArrayList<Column> getColumns(String schema, String table) {\r\n try {\r\n Statement stmt = conexion.createStatement();\r\n String sql;\r\n sql = \"SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = '\" + schema + \"' AND TABLE_NAME = '\" + table + \"'\";\r\n ResultSet rs = stmt.executeQuery(sql);\r\n ArrayList<Column> columns = new ArrayList();\r\n while (rs.next()) {\r\n Column_Base column = new Column_Base();\r\n column.setTitle(rs.getString(4));\r\n column.setStorageFormat(rs.getString(8));\r\n column.setDecimalPositions(\".\");//default standard mysql\r\n column.setRecordNumber(getRecordNumberColumnBD(schema, table, column.getTitle()));\r\n columns.add(column);\r\n }\r\n return columns;\r\n } catch (SQLException ex) {\r\n Logger.getLogger(DAOBaseDatos.class.getName()).log(Level.SEVERE, null, ex);\r\n return null;\r\n }\r\n\r\n }",
"public Vector getColunas(String schema, String name);",
"private int[] processColumnList(Table t,\n boolean acceptAscDesc)\n throws HsqlException {\n\n HashMappedList list = Parser.processColumnList(tokenizer,\n acceptAscDesc);\n int size = list.size();\n int[] col = new int[size];\n\n for (int i = 0; i < size; i++) {\n col[i] = t.getColumnNr((String) list.getKey(i));\n }\n\n return col;\n }",
"public int getColumns() {\n return this.columns;\n }",
"public static int getColumns() {\n\t\treturn columns;\n\t}",
"public List<IColumn> getColumns() {\r\n\t\treturn Collections.unmodifiableList(columns);\r\n\t}",
"Iterator<ColumnPair> columnPairs();",
"public Set<String> columns() {\n if (columnsDefinedOrder.size() <= 0) {\n columnsDefinedOrder = rows.stream()\n .findFirst()\n .map(x -> new ArrayList<>(x.keySet()))\n .orElse(columnsDefinedOrder);\n }\n\n return new LinkedHashSet<>(columnsDefinedOrder);\n }",
"public ArrayList<String> getColumnNames();",
"public String[] getKeyColumns()\n {\n return KEY_COLUMNS;\n }"
] |
[
"0.71844953",
"0.7125301",
"0.6969409",
"0.69576776",
"0.6948778",
"0.69049126",
"0.6824205",
"0.67036366",
"0.6587281",
"0.65199846",
"0.65017647",
"0.6429154",
"0.64229435",
"0.63846666",
"0.63778526",
"0.63638633",
"0.63598806",
"0.6326261",
"0.6299836",
"0.6295686",
"0.6278726",
"0.62573504",
"0.6222291",
"0.6211275",
"0.61980325",
"0.61971855",
"0.61819017",
"0.6176881",
"0.61656654",
"0.6163799",
"0.616316",
"0.6161783",
"0.6128876",
"0.61112946",
"0.61022353",
"0.60885024",
"0.6079353",
"0.6073959",
"0.60590875",
"0.6011669",
"0.5991917",
"0.5987417",
"0.59679884",
"0.59594685",
"0.59555864",
"0.59462756",
"0.5937996",
"0.591793",
"0.5916719",
"0.5903588",
"0.5901636",
"0.58861595",
"0.58858365",
"0.58842933",
"0.5882598",
"0.58792144",
"0.5875306",
"0.5873579",
"0.5869447",
"0.5867862",
"0.5867449",
"0.5867449",
"0.5853992",
"0.5846632",
"0.584278",
"0.5842514",
"0.5842436",
"0.58371854",
"0.5834276",
"0.5830072",
"0.58271503",
"0.58185065",
"0.5812564",
"0.58114916",
"0.5803038",
"0.57947683",
"0.5779768",
"0.576958",
"0.5757354",
"0.57499796",
"0.57474375",
"0.57076687",
"0.5697043",
"0.56917185",
"0.56895477",
"0.5688624",
"0.5687562",
"0.56799155",
"0.56623304",
"0.56614774",
"0.56612855",
"0.56609416",
"0.5653417",
"0.56509465",
"0.56194687",
"0.56180793",
"0.56169856",
"0.5612104",
"0.5605169",
"0.559791",
"0.5594946"
] |
0.0
|
-1
|
Checking is the specified tile holds a piece.
|
public boolean hasPieces() {
return !(pieces.isEmpty());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public boolean hasPiece()\r\n\t{\r\n\t\treturn piece != null;\r\n\t}",
"public boolean hasTile(Tile a_tile){\n for(int i = 0; i < playerHand.size(); i++){\n if(playerHand.get(i).getLeft() == a_tile.getLeft() && playerHand.get(i).getRight() == a_tile.getRight()){\n return true;\n }\n }\n return false;\n }",
"boolean testIsTouchingIGamePiece(Tester t) {\n return t.checkExpect(los2.isTouching(ship2), false)\n && t.checkExpect(los3.isTouching(bullet8), true)\n && t.checkExpect(lob2.isTouching(ship2), true)\n && t.checkExpect(lob3.isTouching(ship11), false)\n && t.checkExpect(lob3.isTouching(ship3), true)\n && t.checkExpect(mt.isTouching(ship6), false);\n }",
"public boolean hasPiece(int x, int y)\r\n {\r\n return isValidSqr(x, y) && board[x][y] != null;\r\n }",
"boolean checkWin(Tile initialTile);",
"public boolean tileOccupied(int x, int y, int pno){\n\t\tfor (int key : playerPosition.keySet()){\n\t\t\tif (key != pno){\n\t\t\t\tint a = playerPosition.get(key)[0];\n\t\t\t\tint b = playerPosition.get(key)[1];\n\t\t\t\tif (a == x && b == y){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"boolean testIsTouchingILoGamePieceShip(Tester t) {\n return t.checkExpect(ship2.isTouching(los2), false)\n && t.checkExpect(ship2.isTouching(lob2), true)\n && t.checkExpect(ship3.isTouching(lob3), true)\n && t.checkExpect(ship3.isTouching(mt), false);\n }",
"public boolean isOccupied() {\n return piece != null;\n }",
"public static boolean isPieceAvailable(int[] piece) {\n /* Before this was checking if a frame was available,\n but now it's checking for the whole piece since the method\n implemented before could give bugs */\n\n for (int b = 1; b <= ColorFrames.BOARD_PLACES; ++b) {\n if (hasSpaceForPiece(piece, b))\n return true;\n }\n\n return false;\n }",
"public boolean isInsideTile(int x, int y){\n\t\treturn (x >= tileX && x <= tileX+tileImage.getWidth() && y >= tileY && y <= tileY+tileImage.getHeight());\n\t}",
"public boolean hasTile(GroundTile tile) {\n return this.editedTiles.contains(tile);\n }",
"public boolean canChow(int tile) {\n\t\treturn TileAnalyser.inchow(tile, getTileNumbers())>0;\n\t}",
"public boolean hasPiece(int row, int col)\n\t{\n\t\t/* make sure our square is in bounds */\n\t\tif (row < 0 || row >= m_rows || col < 0 || col >= m_cols) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t/* empty squares have null in our pieces array */\n\t\treturn (m_pieces[row][col] != null);\n\t}",
"boolean canBuildBlock(Tile t);",
"public boolean isOccupied() {\n\t\treturn piece != null;\n\t}",
"public boolean hasShip(int tile) {\r\n return (tiles[tile] & 1) != 0;\r\n }",
"@Override\n\tpublic boolean check(piece[][] board) {\n\t\t\n\t\treturn false;\n\t\t\n\t}",
"public Piece getPieceInTile() {\n \r\n return pieceInTile;\r\n }",
"boolean canBuildDome(Tile t);",
"public boolean addPieceToBoardTile(Piece piece) {\n\n\t\tif(piece == null) return false; \n\t\tLocation pieceLoc = piece.getLocation();\n\n\t\tTile tile=null;\n\n\t\ttry {\n\t\t\ttile = getTileInLocation(pieceLoc);\n\t\t\ttile.setPiece(piece);\n\t\t\tthis.replaceTileInSameTileLocation(tile);\n\t\t\treturn true;\n\t\t} catch (LocationException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\n\t}",
"private boolean removePieceFromBoardTile(Piece piece) {\n\n\t\tif(piece == null) return false; \n\t\tLocation pieceLoc = piece.getLocation();\n\n\t\tTile tile=null;\n\t\ttry {\n\t\t\ttile = getTileInLocation(pieceLoc);\n\t\t\ttile.setPiece(null);\n\t\t\tthis.replaceTileInSameTileLocation(tile);\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}",
"boolean canMove(Tile t);",
"public boolean canPung(int tile) {\n\t\tint[] numbers = getTileNumbers();\n\t\tint instances = TileAnalyser.in(tile, numbers);\n\t\treturn instances>1;\n\t}",
"private boolean canAttack(Piece p, Location loc)\n {\n int thisRow = getLocation(p).getRow();\n int thisCol = getLocation(p).getCol();\n int otherRow = loc.getRow();\n int otherCol = loc.getCol();\n int rowDiff = Math.abs(otherRow-thisRow);\n int colDiff = Math.abs(otherCol-thisCol);\n switch (p.getType())\n {\n case PAWN:\n return rowDiff==1&&colDiff==1 &&\n ((p.white()&&otherRow<thisRow)||(!p.white()&&otherRow>thisRow));\n \n case KING:\n return adjacent(getLocation(p),loc);\n \n case KNIGHT:\n return rowDiff>0 && colDiff>0 && rowDiff+colDiff==3;\n \n //rook, bishop, queen are identical, except for their preconditions\n case ROOK:case BISHOP:case QUEEN:\n if ((p.getType()==Type.ROOK&&rowDiff>0&&colDiff>0)\n ||(p.getType()==Type.BISHOP&&rowDiff!=colDiff)\n ||(p.getType()==Type.QUEEN&&rowDiff>0&&colDiff>0&&rowDiff!=colDiff))\n return false;\n Location next = getLocation(p).closerTo(loc);\n while (!next.equals(loc))\n {\n if (getPiece(next)!=null) //checks for piece in the way\n return false;\n next = next.closerTo(loc);\n }\n return true;\n }\n return false; //will never happen because all piece types covered\n }",
"public boolean checkWin (int totalPieces){\n\t\treturn isFull();\n\t}",
"public boolean isAt(Point punto) {\r\n Point inner = toInnerPoint(punto);\r\n for (Point block : innerPiece.getPoints())\r\n \tif (block.X() == inner.X() && block.Y() == inner.Y())\r\n \t\treturn true;\r\n return false;\r\n }",
"public boolean tileOfComputer (int row, int col){\n return this.gameBoard[row][col] == 'o';\n }",
"public boolean isWon(int row, int column, char piece) {\n int matches = 0;\n int tempCol = column;\n int tempRow = row;\n //Check below\n if (row < 3) {\n for (int i = 1; board[row + i][column] == piece; i++) {\n if (i == 3) {\n return true;\n }\n }\n }\n //Check horizontal\n while (tempCol > 0 && board[row][tempCol - 1] == piece) {\n matches++;\n tempCol--;\n }\n tempCol = column;\n while (tempCol < 6 && board[row][tempCol + 1] == piece) {\n matches++;\n tempCol++;\n }\n if (matches >= 3) {\n return true;\n }\n matches = 0;\n tempCol = column;\n \n //Check left diagonal\n while(tempRow < 5 && tempCol > 0 && board[tempRow + 1][tempCol - 1] == piece) {\n matches++;\n tempRow++;\n tempCol--;\n }\n tempCol = column;\n tempRow = row;\n while (tempRow > 0 && tempCol < 6 && board[tempRow - 1][tempCol + 1] == piece) {\n matches++;\n tempRow--;\n tempCol++;\n }\n if (matches >= 3) {\n return true;\n }\n matches = 0;\n tempCol = column;\n tempRow = row;\n //Check right diagonal\n while(tempRow < 5 && tempCol < 6 && board[tempRow + 1][tempCol + 1] == piece) {\n matches++;\n tempRow++;\n tempCol++;\n }\n tempCol = column;\n tempRow = row;\n while (tempRow > 0 && tempCol > 0 && board[tempRow - 1][tempCol - 1] == piece) {\n matches++;\n tempRow--;\n tempCol--;\n }\n if (matches >= 3) {\n return true;\n }\n return false;\n\t}",
"private boolean canGetOutOfCheck(boolean[][] moves, Piece piece) {\r\n\t\tfor (int i = 0; i < this.SIZE; i++) {\r\n\t\t\tfor (int j = 0; j < this.SIZE; j++) {\r\n\t\t\t\tif(checkMove(moves, piece, i, j)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"static boolean canPlace(int row, int col, char[][] piece) {\n for (int r = 0; r < piece.length; r++) {\n for (int c = 0; c < piece[r].length; c++) {\n if (piece[r][c] != '0') {\n if (row + r >= 0 && row + r < board.length && col + c >= 0 && col + c < board[row].length) {\n if (board[row + r][col + c] != '0') {\n return false;\n }\n } else {\n return false;\n }\n }\n }\n }\n\n return true;\n }",
"private boolean fail(Piece piece) {\n\n // To store the moving over\n int localColumnPos = columnPos - piece.getShift();\n\n // If the piece will go outside the bounds of the board, return false\n if (piece.getMatrix().length + rowPos > board.length ||\n piece.getMatrix()[0].length + localColumnPos > board[0].length || localColumnPos < 0) return true;\n\n // Check for no true true collisions\n for (int i = 0; i < piece.getMatrix().length; i++) {\n for (int j = 0; j < piece.getMatrix()[0].length; j++) {\n // If there is a true + true anywhere, do not add piece\n if (piece.getMatrix()[i][j] && board[i + rowPos][j + localColumnPos]) return true;\n }\n }\n return false;\n }",
"public boolean tileOnFire(float xTile, float yTile)\r\n/* 510: */ {\r\n/* 511:616 */ return (tileInBounds(xTile, yTile)) && (this.fire[((int)xTile)][((int)yTile)] != 0);\r\n/* 512: */ }",
"public static boolean isGameWon(final char piece){\n\t\tif (board[0][0] == piece){\t\t\t\t\t\t\t\t// top-left corner\n\t\t\tif (board[1][1] == piece && board[2][2] == piece)\t\t// diagonal\n\t\t\t\treturn true;\n\t\t\telse if (board[0][1] == piece && board[0][2] == piece)\t// going right\n\t\t\t\treturn true;\n\t\t\telse if (board[1][0] == piece && board[2][0] == piece)\t// going down\n\t\t\t\treturn true;\n\t\t}\n\t\tif (board[2][2] == piece){\t\t\t\t\t\t\t\t// bottom-right corner\n\t\t\tif (board[2][1] == piece && board[2][0] == piece)\t\t// going left\n\t\t\t\treturn true;\n\t\t\telse if (board[1][2] == piece && board[0][2] == piece)\t// going up\n\t\t\t\treturn true;\n\t\t}\n\t\tif (piece == board[1][1]){\t\t\t\t\t\t\t\t// middle slot\n\t\t\tif (board[0][2] == piece && board[2][0] == piece)\t\t// the other diagonal\n\t\t\t\treturn true;\n\t\t\telse if (piece == board[1][0] && piece == board[1][2])\t// horizontal through and through\n\t\t\t\treturn true;\n\t\t\telse if (piece == board[0][1] && piece == board[2][1])\t// vertical through and through\n\t\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false; \t\n\t}",
"public boolean isMyPiece(int row, int col)\n\t{\n\t\tChessPiece piece = m_pieces[row][col];\n\t\tif (piece == null) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn m_version.legalPieceToPlay(piece);\n\t}",
"public boolean tileInBounds(float xTile, float yTile)\r\n/* 111: */ {\r\n/* 112:124 */ return (xTile >= 0.0F) && (xTile < getWidthInTiles()) && (yTile >= 0.0F) && (\r\n/* 113:125 */ yTile < getHeightInTiles());\r\n/* 114: */ }",
"public boolean tileOfHuman (int row, int col){\n return this.gameBoard[row][col] == 'o';\n }",
"private boolean endSquareContainsPiece(Chessboard chessboard, Piece piece, int end) {\n\t\tif (!(0 <= end && end < 64)) {\n\t\t\treturn false;\n\t\t}\n\t\tPiece endContents = chessboard.getSquareContents(end);\n\t\tif (endContents == null) {\n\t\t\treturn false;\n\t\t}\n\t\tif (endContents.getSign() != piece.getSign()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn white ? endContents.amIWhite() : !endContents.amIWhite();\n\t}",
"static void checkCompleteness(Piece piece, Context context) {\n\t\tif (Helper.isSolved()) { //puzzle is solved\n \t\tpuzzleComplete(context); //cleanup\n \t} else {\n \t\tif(Helper.isPieceCorrect(piece)) { //piece is in the correct position and orientation\n \t\t\tHelper.markPiece(piece, true); //mark the piece as correct\n \t\t}\n \t}\n\t}",
"public boolean isAttacking(int row, int col)\n {\n if (this.getRow() == row || this.getCol() == col) // if self has same row or column as chesspiece, self is attacking\n return true;\n else\n return false; // self is not attacking chesspiece\n }",
"private boolean hasPiece(int row, int column) {\n if (board[row][column] == ' ') {\n return false;\n }\n return true;\n\t}",
"@Test\n public void testIsOccupied()\n {\n try\n {\n Square s = new Square();\n\n assertFalse(s.isOccupied()); // Should be false as no tile on it yet\n\n s.setTile(Tile.A); // Add a tile\n\n assertTrue(s.isOccupied()); // Should now be true\n }\n catch(Exception ex)\n {\n fail(\"No exception should be thrown when adding a tile to a square normally.\");\n }\n }",
"public boolean hasPlacedPiece() {\n return hasPlacedPiece;\n }",
"public boolean isAttacking(ChessPiece piece)\n {\n if ((Math.abs(this.getRow() - piece.getRow()) == Math.abs(this.getCol() - piece.getCol())) && (this.getColor() != piece.getColor())) // if self is on same diagonal as chesspiece, this is attack. we use absolute values to determine diagonal\n return true;\n else\n return false; // self is not attacking chesspiece at position l\n }",
"private boolean canEats(Point piece){\r\n\t// direction -1: red pieces +1: black pieces\r\n int dir = isRed(piece)? -1:+1;\r\n int dest = dir * 2; // eat move destination\r\n // compute movement points\r\n Point left = new Point(piece.getFirst() + dir, piece.getSecond() - 1);\r\n Point left2 = new Point(piece.getFirst()+ dest, piece.getSecond() - 2);\r\n Point right = new Point(piece.getFirst() + dir, piece.getSecond() + 1);\r\n Point right2 = new Point(piece.getFirst() + dest, piece.getSecond() + 2);\r\n // check left eat\r\n if(isValidPosition(left) && isValidPosition(left2)){\r\n if(isRed(piece) && isBlack(left) && isEmpty(left2)) return true;\r\n if(isBlack(piece) && isRed(left) && isEmpty(left2)) return true;\r\n }\r\n // check right eat\r\n if(isValidPosition(right) && isValidPosition(right2)){\r\n if(isRed(piece) && isBlack(right) && isEmpty(right2)) return true;\r\n if(isBlack(piece) && isRed(right) && isEmpty(right2)) return true;\r\n }\r\n // if is a queen\r\n if(isQueen(piece)){\r\n // compute queen move points (invert direction)\r\n Point leftQ = new Point(piece.getFirst() - dir, piece.getSecond() - 1);\r\n Point leftQ2 = new Point(piece.getFirst() - dest, piece.getSecond() - 2);\r\n Point rightQ = new Point(piece.getFirst() - dir, piece.getSecond() + 1);\r\n Point rightQ2 = new Point(piece.getFirst() - dest, piece.getSecond() + 2);\r\n // check left eat\r\n if(isValidPosition(leftQ) && isValidPosition(leftQ2)){\r\n if(isRed(piece) && isBlack(leftQ) && isEmpty(leftQ2)) return true;\r\n if(isBlack(piece) && isRed(leftQ) && isEmpty(leftQ2)) return true;\r\n }\r\n // check right eat\r\n if(isValidPosition(rightQ) && isValidPosition(rightQ2)){\r\n if(isRed(piece) && isBlack(rightQ) && isEmpty(rightQ2)) return true;\r\n if(isBlack(piece) && isRed(rightQ) && isEmpty(rightQ2)) return true;\r\n }\r\n }\r\n return false;\r\n }",
"public static boolean insideBounds(GameTile tile) {\n\n if (tile == null) {\n return false;\n } else {\n\n int x = tile.getXCoord();\n int y = tile.getYCoord();\n\n return !(x < 0 || y < 0) && !(x > TILE_COLS || y > TILE_ROWS);\n\n }\n\n }",
"public boolean isTileOnMap(int x, int y) {\n\t\treturn getTileAt(x, y) != null;\n\t}",
"public boolean isCheck(PieceColor color) {\n \tint[][] map = generateAttackMaps(color);\n \tint x = getKing(color).getX();\n \tint y = getKing(color).getY();\n\n \t//if the king is being threatened, return true\n \tif(map[y][x] > 0) return true;\n \telse return false;\n }",
"boolean testIsTouchingILoGamePieceBullet(Tester t) {\n return t.checkExpect(bullet9.isTouching(los3), true)\n && t.checkExpect(bullet1.isTouching(los3), false)\n && t.checkExpect(bullet9.isTouching(lob3), false);\n }",
"boolean canMove (int newRow, int newColumn, Piece piece) {\n for (int r = 0; r < piece.height; ++r)\n for (int c = 0; c < piece.width; ++c) {\n if (piece.blocks[r][c] == 1 && !board.isEmpty(newRow + r, newColumn + c))\n return false;\n }\n return true;\n }",
"boolean isTile(int x, int y, int rotation) {\n return tiles[rotation][dimensions * y + x] == 1;\n }",
"public boolean kingCheck(ArrayList<Piece> pieces) {\r\n boolean check = false;\r\n int[] kingCoords = new int[]{this.getX(), this.getY()};\r\n\r\n for (Piece piece : pieces) {\r\n if (piece.getColor() != this.getColor()) { // If the color does not match the king's color...\r\n for (int[] coordinate : piece.range) {\r\n if (coordinate[0] == kingCoords[0] && coordinate[1] == kingCoords[1]) { // Checks to see if the king is in range of enemy pieces\r\n check = true;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n return check;\r\n }",
"private boolean canCaptureEnPassant(Board board, Point pt) {\n Piece temp = board.getPieceAt(pt);\n if(temp != null)\n if (temp instanceof Pawn && temp.getColor() != this.color)\n if (((Pawn)temp).enPassantOk)\n return true;\n return false;\n }",
"public boolean isAllPiecesEaten(Piece piece) {\n\t\tArrayList<Piece> ediblePieces= piece.getMustEdiblePieces();\n\t\tif(ediblePieces.isEmpty()) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean addPiece(Piece piece) {\n\t\tif(piece != null) {\n\t\t\treturn this.pieces.add(piece) && addPieceToBoardTile(piece);\n\t\t}\n\t\treturn false;\n\t}",
"private boolean movePiece(Tile fromTile) {\r\n\t\tgetBoard().setToTile(tile);\r\n\t\tmakeBackup();\r\n\r\n\t\ttile.setPiece(fromTile.getPiece());\r\n\r\n\t\t// League wins the game if the piece carrying the flag returns to its territory\r\n\t\tif (tile.getPiece().getHasEnemyFlag() == true && tile.getPiece().getLEAGUE().toString().toLowerCase()\r\n\t\t\t\t.equals(tile.getTer().territoryName().toLowerCase())) {\r\n\t\t\tGame.getInstance().setGameOver(true);\r\n\t\t}\r\n\r\n\t\t// reset the old position\r\n\t\tfromTile.setPiece(null);\r\n\t\tgetBoard().setFromTile(null);\r\n\r\n\t\t// reset the selection\r\n\t\tgetBoard().setPieceSelected(false);\r\n\r\n\t\t// fromTile = null;\r\n\t\tgetBoard().setToTile(null);\r\n\r\n\t\treturn true;\r\n\t}",
"public boolean hasPiece(Square sqr)\r\n {\r\n return (sqr != null) && hasPiece(sqr.x, sqr.y);\r\n }",
"@Override\n /**\n * Check whether a certain tile is blocked for a particular Mover.\n */\n public boolean blocked(Mover mover, int x, int y) {\n if(mPathTiles == null) {\n return true;\n }\n \n // Check bounds\n if( x < 0 || y < 0 || x >= getActualWidthInTiles() || y >= getActualHeightInTiles()) {\n return true;\n }\n \n // Check whether this tile blocks the unit\n return mPathTiles[ (y * getActualWidthInTiles()) + x].isBlocking(mover);\n \n }",
"public boolean checkForVictory() {\n // keep track of whether we have seen any pieces of either color.\n boolean anyWhitePieces = false;\n boolean anyRedPieces = false;\n // iterate through each row\n for (Row row : this.redBoard) {\n // whether we iterate through the red or white board does not matter; they contain the same pieces, just\n // in a different layout\n // iterate through each space in a row\n for (Space space : row) {\n // if there is a piece on this space\n if (space.getPiece() != null) {\n if (space.getPiece().getColor() == Piece.COLOR.RED) {\n // and if it's red, we have now seen at least one red piece\n anyRedPieces = true;\n } else if (space.getPiece().getColor() == Piece.COLOR.WHITE) {\n // and if it's white, we have now seen at least one white piece\n anyWhitePieces = true;\n }\n }\n }\n }\n // if we haven't seen any pieces of a color, then the other player has won\n if (!anyRedPieces) {\n // white player has won\n markGameAsDone(getWhitePlayer().getName() + \" has captured all the pieces.\");\n return true;\n } else if (!anyWhitePieces) {\n // red player has won\n markGameAsDone(getRedPlayer().getName() + \" has captured all the pieces.\");\n return true;\n }\n return false;\n }",
"public boolean tileRock(float xTile, float yTile)\r\n/* 207: */ {\r\n/* 208:231 */ return (tileInBounds(xTile, yTile)) && (this.rock[((int)xTile)][((int)yTile)] != 0);\r\n/* 209: */ }",
"public boolean tileGrass(float xTile, float yTile)\r\n/* 212: */ {\r\n/* 213:236 */ return (tileInBounds(xTile, yTile)) && (this.grass[((int)xTile)][((int)yTile)] != 0);\r\n/* 214: */ }",
"public boolean tileFence(float xTile, float yTile)\r\n/* 202: */ {\r\n/* 203:226 */ return (tileInBounds(xTile, yTile)) && (this.door[((int)xTile)][((int)yTile)] != 0);\r\n/* 204: */ }",
"@Override\n public boolean canMovePieceAtPoint(Point point) {\n return (getPiece(point) != null);\n }",
"private boolean partAvailable(Piece piece) {\n boolean temp = false;\r\n try {\r\n temp = repairAreaInt.partAvailable(piece, id);\r\n } catch (RemoteException e) {\r\n System.err.println(\"Excepção na invocação remota de método\" + getName() + \": \" + e.getMessage() + \"!\");\r\n System.exit(1);\r\n }\r\n return temp;\r\n }",
"public MoveResult canMovePiece(Alignment player, Coordinate from, Coordinate to);",
"public boolean isCheck()\n {\n Game g = Game.getInstance();\n\n for(Piece[] p1 : g.m_board.m_pieces)\n {\n for(Piece p2 : p1)\n {\n if(p2 == null){ continue; }\n if(g.containsMove(new Move(m_x, m_y), p2.getMoves()))\n return true;\n }\n }\n\n return false;\n }",
"public static boolean validPiece(String piece)\n\t{\n\t\tfor(int loopPieces = 0; loopPieces < 32; loopPieces++)\n\t\t{\n\t\t\tif(pieceList[loopPieces].equals(piece))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@Test \n\tpublic void kingNotOnThroneBlackPieceLeftWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(1,15);\n\t\td.set(5,16);\n\t\td.set(9,104);\n\t\td.set(2,49);\n\t\td.set(0,91);\n\t\td.set(24,60);\n\t\td.set(2,59);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(59);\n\t\tassertTrue(4==test_arr.get(0).getX() && 5==test_arr.get(0).getY());\n\n\t}",
"public boolean isHere(){ return this.piece.isAffected();}",
"@Test\r\n\tpublic void testDirectCheck() {\n\t\tBoard b = new Board();\r\n\t\tb.state = new Piece[][] //set up the board in the standard way\r\n\t\t\t\t{\r\n\t\t\t\t{new Rook(\"b\"), new Knight(\"b\"),new Bishop(\"b\"),new Queen(\"b\"), new King(\"b\"), new Bishop(\"b\"),\r\n\t\t\t\t\tnew Knight(\"b\"), new Rook(\"b\")},\r\n\t\t\t\t{new Pawn(\"b\"),new Pawn(\"b\"),new Pawn(\"b\"),new Pawn(\"b\"),new Pawn(\"b\"),new Pawn(\"b\"),new Pawn(\"b\"),\r\n\t\t\t\t\t\tnew Pawn(\"b\")},\r\n\t\t\t\t{null,null,null,null,null,null,null,null},\r\n\t\t\t\t{null,null,null,null,null,null,null,null},\r\n\t\t\t\t{null,null,null,null,null,null,null,null},\r\n\t\t\t\t{null,null,null,null,null,new Knight(\"b\"),null,null},\r\n\t\t\t\t{new Pawn(\"w\"),new Pawn(\"w\"),new Pawn(\"w\"),new Pawn(\"w\"),new Pawn(\"w\"),new Pawn(\"w\"),new Pawn(\"w\"),\r\n\t\t\t\t\tnew Pawn(\"w\")},\r\n\t\t\t\t{new Rook(\"w\"), new Knight(\"w\"),new Bishop(\"w\"),new Queen(\"w\"), new King(\"w\"), new Bishop(\"w\"),\r\n\t\t\t\t\tnew Knight(\"w\"), new Rook(\"w\")}\r\n\t\t\t\t};\r\n\t\tassertTrue(b.whiteCheck());\t\r\n\t}",
"public boolean validBish (int startRow, int startColumn, int endRow, int endColumn, Tile[][] board) {\n\t\t\n\n\t\tif (Math.abs(startRow-endRow)==Math.abs(startColumn-endColumn)) {\n\t\t\tint distanceMovedRows = startRow-endRow;\n\t\t\tint distanceMovedCols =startColumn-endColumn;\n\t\t\tif (distanceMovedRows > 0 && distanceMovedCols < 0) {\n\n\t\t\t\tint x=startRow-1;\n\t\t\t\tint y = startColumn+1;\n\t\t\t\twhile (x > endRow && y < endColumn) { \n\t\t\t\t\tif (board[x][y].getOccupyingPiece() != null) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tx--; y++;\n\t\t\t\t}\n\t\t\t} \n\t\t\tif (distanceMovedRows > 0 && distanceMovedCols > 0) { \n\n\t\t\t\tint x=startRow-1;\n\t\t\t\tint y = startColumn-1;\n\t\t\t\twhile (x > endRow && y > endColumn) {\n\t\t\t\t\tif (board[x][y].getOccupyingPiece() != null) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tx--; y--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (distanceMovedRows < 0 && distanceMovedCols < 0) {\n\n\t\t\t\tint x=startRow+1;\n\t\t\t\tint y = startColumn+1;\n\n\t\t\t\twhile (x < endRow && y < endColumn) {\n\t\t\t\t\tif (board[x][y].getOccupyingPiece() != null) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tx++; y++;\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (distanceMovedRows < 0 && distanceMovedCols > 0) {\n\n\t\t\t\tint x=startRow+1;\n\t\t\t\tint y = startColumn-1;\n\n\t\t\t\twhile (x < endRow && y > endColumn) {\n\t\t\t\t\tif (board[x][y].getOccupyingPiece() != null) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tx++; y--;\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"private boolean isAboveLimit(FallingPiece piece){\r\n\t\tfor (Point p : piece.allOuterPoints()) {\r\n if (p.Y() >= height) \r\n return true;\r\n }\r\n\t\treturn false;\r\n\t}",
"public boolean inCheck(PieceColor color)\n {\n Piece king = findKing(color);\n if (king==null)\n return false;\n Location loc = getLocation(king);\n return enemyCanAttack(color,loc);\n }",
"public boolean isFull() {\n for (int r = 0; r < 6; r++) {\n for (int c = 0; c < 7; c++) {\n if (!hasPiece(r, c)) {\n return false;\n }\n }\n }\n return true;\n }",
"public boolean hasNeighbor(Tile tile) {\n if (tile == null) {\n return false;\n }\n\n return (this.tileNorth == tile || this.tileEast == tile || this.tileSouth == tile || this.tileEast == tile);\n }",
"private boolean check(boolean isWhite) {\n Tile kingTile = null;\n ArrayList<Position> opponentMoves = new ArrayList<>();\n // find king's tile and populate opponent moves\n for (Tile[] t : this.board) {\n for (Tile tile : t) {\n if (tile.piece instanceof King && tile.piece.isWhite() == isWhite) {\n kingTile = tile;\n }\n if (tile.hasPiece && tile.piece.isWhite() != isWhite) {\n for(Position move : tile.piece.getLegalMoves()) opponentMoves.add(move);\n }\n }\n }\n // compare every position with king's position\n for (Position opponentMove : opponentMoves) {\n if (opponentMove.equals(kingTile.position)) {\n return true;\n }\n }\n return false;\n }",
"public boolean checkMove(Piece piece, boolean check) {\n\t\tif (check) {\n\t\t\tint x = piece.getX();\n\t\t\tint y = piece.getY();\n\t\t\tif (x >= 0 && x <= 7 && y >= 0 && y <= 7) {\n\t\t\t\tstrong_enemy = false;\n\t\t\t\tfriend = false;\n\t\t\t\t// check surrounding\n\t\t\t\tcheck_enemy_and_friend(x - 1, y, piece.getStrength(), piece.getColor());\n\t\t\t\tcheck_enemy_and_friend(x + 1, y, piece.getStrength(), piece.getColor());\n\t\t\t\tcheck_enemy_and_friend(x, y - 1, piece.getStrength(), piece.getColor());\n\t\t\t\tcheck_enemy_and_friend(x, y + 1, piece.getStrength(), piece.getColor());\n\n\t\t\t\tif (strong_enemy == false) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else if (strong_enemy == true && friend == true) {// freezing is solved\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"boolean isLegal(String move) {\n int[][] theStatusBoard;\n if (_playerOnMove == ORANGE) {\n theStatusBoard = _orangeStatusBoard;\n } else {\n theStatusBoard = _violetStatusBoard;\n }\n Pieces thispiece = new Pieces();\n String piecename = move.substring(0, 1);\n int col = getCoordinate(move.substring(1, 2));\n int row = getCoordinate(move.substring(2, 3));\n int ori = Integer.parseInt(move.substring(3, 4));\n int[][] initialPositions = thispiece.getInitialPositions(piecename);\n int[][] finalPositions = thispiece.processPositions(initialPositions, ori);\n int depth = finalPositions.length;\n int length = finalPositions[0].length;\n\n if (row + depth - 1 > 13 || col + length - 1 > 13) {\n System.out.println(\"Your move makes your piece out of the board, try again!\");\n return false;\n }\n\n boolean has1 = false;\n boolean no2 = true;\n\n int i, j;\n for (i = 0; i < depth; i++) {\n for (j = 0; j < length; j++) {\n if (finalPositions[i][j] == 1) {\n if (theStatusBoard[15 - (row + depth - i)][col + j + 1] == 1) {\n has1 = true;\n } else if (theStatusBoard[15 - (row + depth - i)][col + j + 1] == 2) {\n return false;\n }\n }\n }\n }\n System.out.println(\"has1: \" + has1);\n return has1;\n }",
"public boolean isRevealed(int tile) {\r\n return (tiles[tile] & 2) != 0;\r\n }",
"@Test\n\tpublic void kingNotOnThroneWhitePieceLeftBlackCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(1,15);\n\t\td.set(5,27);\n\t\td.set(2,80);\n\t\td.set(0,37);\n\t\td.set(24,60);\n\t\td.set(2,59);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(59);\n\t\tassertTrue(4==test_arr.get(0).getX() && 5==test_arr.get(0).getY());\n\t}",
"public boolean isHit(Point p){\n if(super.getLocation().equals(p)){\n nunMissiles = 0;\n return true;\n } else {\n return false;\n }\n }",
"public boolean validRook (int startRow, int startColumn, int endRow, int endColumn, Tile[][] board) {\n\t\t\n\t\tint distanceMovedUpDown =endRow-startRow; \n\t\tint distanceMovedLeftRight = endColumn-startColumn;\n\n\t\tif (distanceMovedUpDown !=0 && distanceMovedLeftRight != 0) { //have to stay in the same column or row to be valid\n\t\t\treturn false;\n\t\t}\n\n\n\t\tif (startRow == endRow) { //moving left or right \n\t\t\tif (Math.abs(distanceMovedLeftRight) > 1) { //checking if there's pieces btwn start and end if moving more than 1\n\t\t\t\tif (distanceMovedLeftRight > 0) {//moving to the right \n\t\t\t\t\tint x=startColumn + 1;\n\t\t\t\t\twhile (x < endColumn) {\n\t\t\t\t\t\tif (board[startRow][x].getOccupyingPiece() != null) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx++;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\tif (distanceMovedLeftRight < 0) {//moving to the left\n\t\t\t\t\tint x = startColumn -1;\n\t\t\t\t\twhile (x > endColumn) {\n\t\t\t\t\t\tif (board[startRow][x].getOccupyingPiece() != null) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx--;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\treturn true;\n\n\t\t}\n\t\tif (startColumn == endColumn) { //moving up or down\n\t\t\tif (Math.abs(distanceMovedUpDown) > 1) { //checking if there's pieces btwn start and end if moving more than 1\n\t\t\t\tif (distanceMovedUpDown > 0) {//moving up the array\n\t\t\t\t\tint x=startRow + 1;\n\t\t\t\t\twhile (x < endRow) {\n\t\t\t\t\t\tif (board[x][startColumn].getOccupyingPiece() != null) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx++;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\tif (distanceMovedUpDown < 0) {//moving down the array\n\t\t\t\t\tint x = startRow -1;\n\t\t\t\t\twhile (x > endRow) {\n\t\t\t\t\t\tif (board[x][startColumn].getOccupyingPiece() != null) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx--;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\n\t}",
"public boolean canStandOn(Environment tile)\n {\n if( tile.terrainType == TerrainType.TELETILE )\n return false; // Standing on empty space is pretty hard\n return getMoveCost(tile) < IMPASSABLE;\n }",
"public boolean checkSwitch(int row, int col){\n boolean output = false;\n Tile[] updownleftright = new Tile[4]; //Array which holds the four adjacent tiles\n if (row - 1 >= 0) updownleftright[0] = tiles[row - 1][col];\n else updownleftright[0] = nulltile;\n \n if (row + 1 < sidelength) updownleftright[1] = tiles[row + 1][col];\n else updownleftright[1] = nulltile;\n \n if (col - 1 >= 0) updownleftright[2] = tiles[row][col - 1];\n else updownleftright[2] = nulltile;\n \n if (col + 1 < sidelength) updownleftright[3] = tiles[row][col + 1];\n else updownleftright[3] = nulltile;\n \n for (int i = 0; i < 4; i ++) //Goes through the array and checks to see if any adjacent tile is the blank tile\n {\n if (updownleftright[i].getCurPic() == blankindex){\n tiles[row][col].swap(updownleftright[i]);\n return true;\n }\n }\n return false;\n }",
"@Test\n\tpublic void kingOnThroneBlackPieceRightWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\t//moving pieces out so capture can occur\n\t\td.set(24,68);\n\t\td.set(7,29);\n\t\td.set(36,119);\n\t\td.set(11,106);\n\t\td.set(20,33);\n\t\td.set(4,85);\n\t\td.set(35,118);\n\t\td.set(3,95);\n\t\td.set(25,62);\n\t\td.set(4,63);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(63);\n\t\tassertTrue(6==test_arr.get(0).getX() && 5==test_arr.get(0).getY());\n\n\t}",
"@Test\n\tpublic void kingOnThroneBlackPieceLeftWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(29,100);\n\t\td.set(1,103);\n\t\td.set(27,89);\n\t\td.set(5,46);\n\t\td.set(24,58);\n\t\td.set(2,16);\n\t\td.set(24,60);\n\t\td.set(5,27);\n\t\td.set(32,112);\n\t\td.set(5,49);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(49);\n\t\tassertTrue(4==test_arr.get(0).getX() && 5==test_arr.get(0).getY());\n\t}",
"public boolean equals(Tile tile){\n\t if(tile.getLocation().equals(location))\n\t\t return true;\n\t else\n\t\t return false;\n\t}",
"boolean isLegal(Move move) {\n int c = move.getCol0();\n int r = move.getRow0();\n int[] vector = move.unit();\n Piece p;\n for(int i = 0; i <= vector[2]; i++) {\n p = get(c, r);\n if (p != null && p.side() != _turn) {\n return false;\n }\n }\n return true;\n\n }",
"private boolean isMyPiece(Loc thisSpot) {\n\t\tfor (Loc loc : currentPiece.getLocation()) {\n\t\t\tif (loc.row == thisSpot.row && loc.col == thisSpot.col) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private boolean tileIsInbounds(int row, int col){\n\t\treturn row >= 0 && col >= 0\n\t\t\t\t&& row < board.length && col < board[0].length;\n\t}",
"@Test\n\tpublic void kingOnThroneBlackPieceUpWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(8,35);\n\t\td.set(6,39);\n\t\td.set(24,79);\n\t\td.set(6,40);\n\t\td.set(18,50);\n\t\td.set(6,39);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(39);\n\t\tassertTrue(5==test_arr.get(0).getX() && 4==test_arr.get(0).getY());\n\t}",
"private static boolean isCornerTile(Tile tile, Map<Border, List<Tile>> borderMap) {\n int n = 0;\n for (Border border : tile.getBorders()) {\n if (borderMap.get(border).size() == 1) {\n n++;\n }\n }\n return n == 2;\n }",
"public boolean checkShot(int row, int col) {\n /* invalid board position */\n if(row < 1 || col < 1 || row > (this.boardHeight-1) || col > (this.boardWidth-1))\n return false;\n \n /* We have a hit! */\n if(this.board[row][col] == 'S') {\n this.board[row][col] = 'X';\n \n /* check if this was the last part of a ship, if so decrement the\n * number of ships left */\n if(this.board[row+1][col] != 'S' && this.board[row][col+1] != 'S' &&\n this.board[row-1][col] != 'S' && this.board[row][col-1] != 'S') {\n numShips--;\n }\n \n return true;\n }\n /* Did they really shoot at the same spot again? */\n else if(this.board[row][col] == 'X' || this.board[row][col] == 'O') {\n /* do nothing, penalize them for their foolish double shot! */\n return false;\n }\n /* The must have missed then */\n else {\n this.board[row][col] = 'O';\n return false;\n }\n }",
"public boolean tileBlocked(float xTile, float yTile)\r\n/* 117: */ {\r\n/* 118:131 */ return (!tileInBounds(xTile, yTile)) || (this.blocked[((int)xTile)][((int)yTile)] != 0);\r\n/* 119: */ }",
"@Test\n public void testGetTile()\n {\n try\n {\n Square s = new Square();\n\n assertNull(s.getTile()); // Should return null as no tile placed yet.\n\n s.setTile(Tile.E); // Add a tile\n\n assertEquals(Tile.E, s.getTile()); // Check the tile is now on the square\n }\n catch(Exception ex)\n {\n fail(\"No exception should be thrown when getting a Tile from the square.\");\n }\n }",
"@Test\n public void isONGroundTestTrue(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{0,0}},new byte[][]{{1,1},{1,1},{1,1},{1,1}}, tilepath);\n Rect cBox = new Rect(2,2,24,22);\n assertEquals(true, tileMap.isOnGround(cBox));\n }",
"private boolean isWinning(Piece[] arr) {\n if (arr[0] == X) {\n for (Piece piece : arr) {\n if (piece != X) {\n return false;\n }\n }\n }\n else {\n for (Piece piece : arr) {\n if (piece != O) {\n return false;\n }\n }\n }\n return true;\n }",
"public boolean samePieceCheck(GameBoardVertex p){\n if (pieceAtVertex == null){\n if (p.getPiece() == null){\n return true;\n } else {\n return false;\n }\n } else {\n if (p.getPiece() == null) {\n return false;\n } else {\n return pieceAtVertex.equals(p.getPiece());\n }\n }\n }",
"@Test\n\tpublic void kingNoOnThroneWhitePieceDownBlackCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(12,79);\n\t\td.set(11,76);\n\t\td.set(9,70);\n\t\td.set(10,85);\n\t\td.set(0,91);\n\t\td.set(24,58);\n\t\td.set(10,72);\n\t\td.set(31,83);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(83);\n\t\tassertTrue(5==test_arr.get(0).getX() && 6==test_arr.get(0).getY());\n\t}",
"private boolean canMove(Point piece){\r\n // direction -1: red pieces +1: black pieces\r\n int dir = isRed(piece)? -1:+1;\r\n // normal movement\r\n Point left = new Point(piece.getFirst() + dir, piece.getSecond() - 1);\r\n Point right = new Point(piece.getFirst() + dir, piece.getSecond() + 1);\r\n // check for normal movements\r\n if(isValidPosition(left) && isEmpty(left)) return true;\r\n if(isValidPosition(right) && isEmpty(right)) return true;\r\n // if is a queen\r\n if(isQueen(piece)){\r\n // compute queen move points (invert direction)\r\n Point leftQ = new Point(piece.getFirst() - dir, piece.getSecond() - 1);\r\n Point rightQ = new Point(piece.getFirst() - dir, piece.getSecond() + 1);\r\n // check for down movements\r\n if(isValidPosition(leftQ) && isEmpty(leftQ)) return true;\r\n if(isValidPosition(rightQ) && isEmpty(rightQ)) return true;\r\n }\r\n return false;\r\n }",
"@Test\n\tpublic void kingOnThroneBlackPieceDownWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(12,86);\n\t\td.set(9,82);\n\t\td.set(11,75);\n\t\td.set(10,70);\n\t\td.set(34,72);\n\t\td.set(9,83);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(83);\n\t\tassertTrue(5==test_arr.get(0).getX() && 6==test_arr.get(0).getY());\n\t}"
] |
[
"0.7161532",
"0.71608675",
"0.7014101",
"0.69178176",
"0.6882489",
"0.68488073",
"0.6841079",
"0.6812826",
"0.6777265",
"0.67658865",
"0.6720876",
"0.67172194",
"0.6716262",
"0.6702416",
"0.667639",
"0.666427",
"0.6651997",
"0.66471744",
"0.6645651",
"0.6634616",
"0.6605418",
"0.6547413",
"0.65253794",
"0.6525146",
"0.6482979",
"0.6432932",
"0.6419029",
"0.63959515",
"0.6383756",
"0.6381484",
"0.63788956",
"0.6369409",
"0.6357418",
"0.63366395",
"0.6334172",
"0.6323733",
"0.63172495",
"0.6294556",
"0.6290611",
"0.6284391",
"0.6276339",
"0.6268909",
"0.62648857",
"0.6263244",
"0.6257956",
"0.6242627",
"0.6234815",
"0.62191904",
"0.61990994",
"0.6185071",
"0.6179221",
"0.6168463",
"0.6155174",
"0.61488557",
"0.61317295",
"0.61257124",
"0.6112636",
"0.6112399",
"0.61015403",
"0.609885",
"0.6096044",
"0.6089616",
"0.6073029",
"0.6059604",
"0.6059387",
"0.60560167",
"0.602273",
"0.60165745",
"0.60140353",
"0.60129166",
"0.6010823",
"0.600679",
"0.6006452",
"0.6003297",
"0.60008264",
"0.60000396",
"0.59995824",
"0.59971464",
"0.59938097",
"0.5991248",
"0.59911066",
"0.5982627",
"0.597847",
"0.5977737",
"0.5976243",
"0.59757173",
"0.5973104",
"0.59727174",
"0.59635526",
"0.59589034",
"0.5957494",
"0.59555244",
"0.5953562",
"0.5953327",
"0.5951545",
"0.59500587",
"0.5949892",
"0.594795",
"0.59460646",
"0.5943019"
] |
0.615458
|
53
|
Initialize the Tile object with background graphic and coordinates. Also sets methods for moving and placing pieces on tiles.
|
public Tile(GameLogic logic, PieceService pieceservice, int x, int y) {
this.x = x;
this.y = y;
this.pieces = new ArrayList<>();
setWidth(TakApp.TILE_SIZE);
setHeight(TakApp.TILE_SIZE);
relocate(x * TakApp.TILE_SIZE, y * TakApp.TILE_SIZE);
Image tilebg = new Image(getClass().getResourceAsStream("/images/tile.jpg"));
ImagePattern imagePattern = new ImagePattern(tilebg);
setFill(imagePattern);
if (this.hasPieces() == false) {
setOnMousePressed(e -> {
String pieceColor = logic.checkTurn();
Piece piece = pieceservice.makePiece(logic, pieceColor, x, y);
if (piece != null) {
pieceservice.setPiece(piece, x, y);
this.pieces.add(piece);
}
});
} else if (this.hasPieces() == true) {
setOnMousePressed(e -> {
this.oldX = this.getXcoordinate();
this.oldY = this.getYcoordinate();
});
setOnMouseDragged(e -> {
relocate(e.getSceneX(), e.getSceneY());
});
setOnMouseReleased(e -> {
double mouseX = e.getSceneX();
double mouseY = e.getSceneY();
int newX = (int) Math.floor(mouseX / 100.0);
int newY = (int) Math.floor(mouseY / 100.0);
boolean validMove = logic.isValidMove(oldX, oldY, newX, newY);
if (validMove) {
pieceservice.removePiece(this.pieces.get(this.pieces.size() - 1), oldX, oldY);
pieceservice.setPiece(this.pieces.get(this.pieces.size() - 1), newX, newY);
} else {
pieceservice.setPiece(this.pieces.get(this.pieces.size() - 1), oldX, oldY);
}
});
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"protected Tile() {\n super();\n }",
"public void initTiles() {\n\t\ttileList.add(new Go());\n\n\t\t// Brown properties\n\t\tProperty mediterranean = new Property(\"Mediterranean\");\n\t\tProperty balticAve = new Property(\"Baltic Avenue\");\n\n\t\t// Light blue properties\n\t\tProperty orientalAve = new Property(\"Oriental Avenue\");\n\t\tProperty vermontAve = new Property(\"Vermont Avenue\");\n\t\tProperty connecticutAve = new Property(\"Connecticut Avenue\");\n\n\t\t// Magenta properties\n\t\tProperty stCharles = new Property(\"St. Charles Place\");\n\t\tProperty statesAve = new Property(\"States Avenue\");\n\t\tProperty virginiaAve = new Property(\"Virginia Avenue\");\n\n\t\t// Orange properties\n\t\tProperty stJames = new Property(\"St. James Place\");\n\t\tProperty tennesseeAve = new Property(\"Tennessee Avenue\");\n\t\tProperty newYorkAve = new Property(\"New York Avenue\");\n\n\t\t// Red properties\n\t\tProperty kentuckyAve = new Property(\"Kentucky Avenue\");\n\t\tProperty indianaAve = new Property(\"Indiana Avenue\");\n\t\tProperty illinoisAve = new Property(\"Illinois Avenue\");\n\n\t\t// Yellow Properties\n\t\tProperty atlanticAve = new Property(\"Atlantic Avenue\");\n\t\tProperty ventnorAve = new Property(\"Ventnor Avenue\");\n\t\tProperty marvinGard = new Property(\"Marvin Gardins\");\n\n\t\t// Green Properties\n\t\tProperty pacificAve = new Property(\"Pacific Avenue\");\n\t\tProperty northCar = new Property(\"North Carolina Avenue\");\n\t\tProperty pennsylvannia = new Property(\"Pennsylvania Avenue\");\n\n\t\t// Dark blue properties\n\t\tProperty parkPlace = new Property(\"Park Place\");\n\t\tProperty boardWalk = new Property(\"Boardwalk\");\n\n\t\t// Tax tiles\n\t\tTaxTile incomeTax = new TaxTile(\"Income Tax\", 200);\n\t\tTaxTile luxuryTax = new TaxTile(\"Luxury Tax\", 100);\n\n\t\t// Utilities\n\t\tUtility electric = new Utility(\"Electric Company\");\n\t\tUtility water = new Utility(\"Water Works\");\n\n\t\t// Railroads\n\t\tRailroad reading = new Railroad(\"Reading\");\n\t\tRailroad pennRail = new Railroad(\"Pennsylvania\");\n\t\tRailroad bno = new Railroad(\"B & O\");\n\t\tRailroad shortLine = new Railroad(\"Short Line\");\n\n\t\t// Chance and community chest\n\t\tChance chance = new Chance();\n\t\tCommunity chest = new Community();\n\n\t\t// Adds the properties by color in accordance with their position on the board\n\t\t// adds color + placement of piece to a list of their respective colors\n\t\tbrown.add(1);\n\t\tbrown.add(3);\n\t\trailroads.add(5);\n\t\tlightBlue.add(6);\n\t\tlightBlue.add(8);\n\t\tlightBlue.add(9);\n\t\tmagenta.add(11);\n\t\tutilities.add(12);\n\t\tmagenta.add(13);\n\t\tmagenta.add(14);\n\t\trailroads.add(15);\n\t\torange.add(16);\n\t\torange.add(18);\n\t\torange.add(19);\n\t\tred.add(21);\n\t\tred.add(23);\n\t\tred.add(24);\n\t\trailroads.add(25);\n\t\tyellow.add(26);\n\t\tyellow.add(27);\n\t\tutilities.add(28);\n\t\tyellow.add(29);\n\t\tgreen.add(31);\n\t\tgreen.add(32);\n\t\tgreen.add(34);\n\t\trailroads.add(35);\n\t\tdarkBlue.add(37);\n\t\tdarkBlue.add(39);\n\n\t\t// tileList is the list of tiles of the board where each tile is representative of a place on the board\n\t\t// adds each tile is chronological order beginning of the board \"go\"\n\t\t//this list includes: properties, taxes, railroads, chance, community chest\n\t\t\n\t\ttileList.add(new Go());\n\n\t\ttileList.add(mediterranean);\n\t\ttileList.add(chest);\n\t\ttileList.add(balticAve);\n\t\ttileList.add(incomeTax);\n\t\ttileList.add(reading);\n\t\ttileList.add(orientalAve);\n\t\ttileList.add(chance);\t\n\t\ttileList.add(vermontAve);\n\t\ttileList.add(connecticutAve);\n\n\t\ttileList.add(new Jail());\n\t\t\t\n\t\ttileList.add(stCharles);\n\t\ttileList.add(electric);\t\t\t\n\t\ttileList.add(statesAve);\t\t\t\n\t\ttileList.add(virginiaAve);\n\t\ttileList.add(pennRail);\n\t\ttileList.add(stJames);\t\n\t\ttileList.add(chest);\n\t\ttileList.add(tennesseeAve);\t\t\t\n\t\ttileList.add(newYorkAve);\n\n\t\ttileList.add(new FreeParking());\n\t\t\t\n\t\ttileList.add(kentuckyAve);\t\t\n\t\ttileList.add(chance);\t\n\t\ttileList.add(indianaAve);\t\t\t\n\t\ttileList.add(illinoisAve);\n\t\ttileList.add(bno);\n\t\ttileList.add(atlanticAve);\t\t\t\n\t\ttileList.add(ventnorAve);\n\t\ttileList.add(water);\n\t\ttileList.add(marvinGard);\n\n\t\ttileList.add(new GoToJail());\n\t\t\t\t\t\n\t\ttileList.add(pacificAve);\t\t\t\n\t\ttileList.add(northCar);\n\t\ttileList.add(chest);\t\t\t\n\t\ttileList.add(pennsylvannia);\n\t\ttileList.add(shortLine);\n\t\ttileList.add(chance);\n\t\ttileList.add(parkPlace);\n\t\ttileList.add(luxuryTax);\n\t\ttileList.add(boardWalk);\n\t}",
"public TilePiece(){\n\t\t\n\t\tiColour = null;\n\t\tiShape = null;\n\t}",
"public Tile(int x, int y, String type) {\n\tthis.x = x;\n\tthis.y = y;\n\tthis.type = type;\n\tboundingShape = null;\n }",
"public TileManager(int xCells, int yCells, int brushSize, boolean brushMode, boolean isBlack, ControlP5 cp5, int background)\n {\n somethingToRender = false;\n this.cp5 = cp5;\n this.background = background;\n previews = new PImage[8];\n previewGradients = new PImage[8];\n previewHover = new boolean[8];\n tiles = new Tile[8];\n this.xCells = xCells;\n this.yCells = yCells;\n this.brushSize = brushSize;\n this.brushMode = brushMode;\n this.isBlack = isBlack;\n newTile();\n newTile();\n }",
"@Override\r\n public void init() {\n Image bgImage = assets().getImage(\"images/bg.png\");\r\n ImageLayer bgLayer = graphics().createImageLayer(bgImage);\r\n graphics().rootLayer().add(bgLayer);\r\n\r\n // Create tiles\r\n tiles = new int[BOARD_MAX_WIDTH][BOARD_MAX_HEIGHT];\r\n printTiles();\r\n\r\n // Place mines at random positions\r\n int placedMines = 0;\r\n Random r = new Random();\r\n while (placedMines < MINES) {\r\n int row = r.nextInt(BOARD_MAX_WIDTH);\r\n int col = r.nextInt(BOARD_MAX_HEIGHT);\r\n if (tiles[row][col] == TILE_EMPTY) {\r\n tiles[row][col] = TILE_MINE;\r\n placedMines++;\r\n }\r\n }\r\n printTiles();\r\n\r\n // Count number of mines around blank tiles\r\n for (int row = 0; row < BOARD_MAX_WIDTH; row++) {\r\n for (int col = 0; col < BOARD_MAX_WIDTH; col++) {\r\n // Check surrounding tiles if mine\r\n if (tiles[row][col] == TILE_MINE) {\r\n for (int rowCheck = -1; rowCheck <= 1; rowCheck++) {\r\n for (int colCheck = -1; colCheck <= 1; colCheck++) {\r\n if (tileExistAndNotMine(row+rowCheck, col+colCheck)) {\r\n tiles[row+rowCheck][col+colCheck]++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n printTiles();\r\n\r\n // Create tile map\r\n Map<Integer, TileType> tileMap = new HashMap<Integer, TileType>();\r\n tileMap.put(0, TileType.EMPTY);\r\n tileMap.put(1, TileType.ONE);\r\n tileMap.put(2, TileType.TWO);\r\n tileMap.put(3, TileType.THREE);\r\n tileMap.put(4, TileType.FOUR);\r\n tileMap.put(5, TileType.FIVE);\r\n tileMap.put(6, TileType.SIX);\r\n tileMap.put(7, TileType.SEVEN);\r\n tileMap.put(8, TileType.EIGHT);\r\n tileMap.put(9, TileType.MINE);\r\n\r\n // Create a GroupLayer to hold the sprites\r\n GroupLayer groupLayer = graphics().createGroupLayer();\r\n graphics().rootLayer().add(groupLayer);\r\n\r\n // Create graphic tiles\r\n tileList = new ArrayList<Tile>();\r\n for (int row = 0; row < BOARD_MAX_WIDTH; row++) {\r\n for (int col = 0; col < BOARD_MAX_WIDTH; col++) {\r\n Tile tile = new Tile(groupLayer, col*Tile.SIZE, row*Tile.SIZE, tileMap.get(tiles[row][col]), row, col);\r\n tileList.add(tile);\r\n }\r\n }\r\n\r\n // Timer text\r\n CanvasImage canvasImage = graphics().createImage(160, 70);\r\n timerLabel = canvasImage.canvas();\r\n ImageLayer countDownLayer = graphics().createImageLayer(canvasImage);\r\n countDownLayer.setTranslation(180, 10);\r\n graphics().rootLayer().add(countDownLayer);\r\n\r\n // Cleared tiles text\r\n CanvasImage clearedTilesImage = graphics().createImage(160, 70);\r\n clearedTilesLabel = clearedTilesImage.canvas();\r\n ImageLayer clearedTilesLayer = graphics().createImageLayer(clearedTilesImage);\r\n clearedTilesLayer.setTranslation(180, 30);\r\n graphics().rootLayer().add(clearedTilesLayer);\r\n updateClearedTiles();\r\n }",
"public ClassTester()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1);\n addObject(new NonScrollingBackground(\"Stage - 0.jpg\"),300,131);\n addObject(playerMage,35,170);\n addObject(new AbilityDisplayer(playerMage),125,268);\n }",
"public Tile(int type, int x, int y) {\n\t\tthis.type=type;\n\t\tthis.coordinates= new int[2];\n\t\tthis.coordinates[0]=x;\n\t\tthis.coordinates[1]=y;\n\t\tif(type==1){\n\t\t\ttileImage= new ImageIcon(this.getClass().getResource(\"scenery.png\")).getImage();\n\t\t}\n\t\telse if(type==2){\n\t\t\ttileImage= new ImageIcon(this.getClass().getResource(\"path.png\")).getImage();\n\t\t}\n\t\telse if(type==3){\n\t\t\ttileImage= new ImageIcon(this.getClass().getResource(\"tower.png\")).getImage();\n\t\t}\n\t}",
"public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n for( int i = 0; i < IMAGE_COUNT; i++)\n {\n images[i] = new GreenfootImage(\"frame_\" + i + \"_delay-0.06s.gif\");\n }\n \n setBackground(images [0]); \n \n }",
"public WallTile()\n\t{\n\t\t\n\t}",
"public Level()\n {\n //Initialise Tile Types\n try \n {\n //Dynamically assign texture paints\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/surface.jpg\")), tile));\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/rover.png\")), tile));\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/rock.png\")), tile));\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/mineral.png\")), tile));\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/target.png\")), tile));\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/warning.png\")), tile));\n } catch(FileNotFoundException fnfe) {\n System.out.println(\"ERROR: Invalid texture paint, file not found\" + fnfe);\n }\n catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }",
"public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1200, 800, 1); \n GreenfootImage bg = new GreenfootImage(\"background.jpg\");\n bg.scale(getWidth(), getHeight());\n setBackground(bg);\n initialize();\n \n }",
"public void initializeTiles(){\r\n tileBoard = new Tile[7][7];\r\n //Create the fixed tiles\r\n //Row 0\r\n tileBoard[0][0] = new Tile(false, true, true, false);\r\n tileBoard[2][0] = new Tile(false, true, true, true);\r\n tileBoard[4][0] = new Tile(false, true, true, true);\r\n tileBoard[6][0] = new Tile(false, false, true, true);\r\n //Row 2\r\n tileBoard[0][2] = new Tile(true, true, true, false);\r\n tileBoard[2][2] = new Tile(true, true, true, false);\r\n tileBoard[4][2] = new Tile(false, true, true, true);\r\n tileBoard[6][2] = new Tile(true, false, true, true);\r\n //Row 4\r\n tileBoard[0][4] = new Tile(true, true, true, false);\r\n tileBoard[2][4] = new Tile(true, true, false, true);\r\n tileBoard[4][4] = new Tile(true, false, true, true);\r\n tileBoard[6][4] = new Tile(true, false, true, true);\r\n //Row 6\r\n tileBoard[0][6] = new Tile(true, true, false, false);\r\n tileBoard[2][6] = new Tile(true, true, false, true);\r\n tileBoard[4][6] = new Tile(true, true, false, true);\r\n tileBoard[6][6] = new Tile(true, false, false, true);\r\n \r\n //Now create the unfixed tiles, plus the extra tile (15 corners, 6 t's, 13 lines)\r\n ArrayList<Tile> tileBag = new ArrayList<Tile>();\r\n Random r = new Random();\r\n for (int x = 0; x < 15; x++){\r\n tileBag.add(new Tile(true, true, false, false));\r\n }\r\n for (int x = 0; x < 6; x++){\r\n tileBag.add(new Tile(true, true, true, false));\r\n }\r\n for (int x = 0; x < 13; x++){\r\n tileBag.add(new Tile(true, false, true, false));\r\n }\r\n //Randomize Orientation\r\n for (int x = 0; x < tileBag.size(); x++){\r\n int rand = r.nextInt(4);\r\n for (int y = 0; y <= rand; y++){\r\n tileBag.get(x).rotateClockwise();\r\n }\r\n }\r\n \r\n for (int x = 0; x < 7; x++){\r\n for (int y = 0; y < 7; y++){\r\n if (tileBoard[x][y] == null){\r\n tileBoard[x][y] = tileBag.remove(r.nextInt(tileBag.size()));\r\n }\r\n }\r\n }\r\n extraTile = tileBag.remove(0);\r\n }",
"public Tile(int x, int y, char type) {\n\t\tthis.tileX = x*Tile.TILE_SIDE;\n\t\tthis.tileY = LevelScreen.INFO_BAR_HEIGHT+y*Tile.TILE_SIDE;\n\t\tthis.type = type;\n\t\tthis.hasDefenseObject = false;\n\t\tthis.currentConstruct = null;\n\n\t\tif (type == TOWER_TERRAIN) {\n\t\t\ttileImage = Assets.tileEmptyTower;\n\t\t} else if (type == PATH) {\n\t\t\ttileImage = Assets.tilePath;\n\t\t} else if (type == MONSTER_GOAL) {\n\t\t\ttileImage = Assets.tileGoal;\n\t\t} else if (type == MONSTER_ENTRANCE) {\n\t\t\ttileImage = Assets.tileEntrance;\n\t\t}\n\t}",
"private static void tileInit(int i, int j, Group tileGroup, int i2, int i3, int i4, int i5) {\n Tile tile = new Tile(i, j, (i2), (i3));\n tile.setTranslateX((i4));\n tile.setTranslateY(i5);\n tileGroup.getChildren().add(tile);\n }",
"private void init() {\n\t\trunning = true;\n\t\timage = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB);\n\t\tg = (Graphics2D) image.getGraphics();\n\t\ttheMap.loadTiles(\"resizedTiles2.png\");\n\t}",
"public zombie_bg()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1010,900, 1); \n setPaintOrder(ScoreBoard.class, player.class, zomb_gen.class, options.class);\n populate();\n \n }",
"private void initialize() {\n this.board.addBoardChangeListener(this);\n\n this.layers = new ArrayList();\n this.bounds = new Rectangle();\n\n this.zoom = 1.0;\n this.zoomLevel = ZOOM_NORMALSIZE;\n this.affineTransform = new AffineTransform();\n\n this.loadTiles(board);\n this.setPreferredSize(new Dimension((board.getWidth() * 32),\n (board.getHeight() * 32)));\n\n bufferedImage = new BufferedImage((board.getWidth() * 32),\n (board.getHeight() * 32), BufferedImage.TYPE_INT_ARGB);\n\n this.antialiasGrid = true;\n this.gridColor = DEFAULT_GRID_COLOR;\n this.gridOpacity = 100;\n\n if (!this.layers.isEmpty()) {\n this.currentSelectedLayer = this.layers.get(0);\n }\n }",
"public Stage1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1200, 900, 1);\n \n GreenfootImage image = getBackground();\n image.setColor(Color.BLACK);\n image.fill();\n star();\n \n \n \n //TurretBase turretBase = new TurretBase();\n playerShip = new PlayerShip();\n scoreDisplay = new ScoreDisplay();\n addObject(scoreDisplay, 100, 50);\n addObject(playerShip, 100, 450);\n \n }",
"public void initGame() {\r\n Log.d(\"UT3\", \"init game\");\r\n mEntireBoard = new Tile(this);\r\n // Create all the tiles\r\n for (int large = 0; large < 9; large++) {\r\n mLargeTiles[large] = new Tile(this);\r\n for (int small = 0; small < 9; small++) {\r\n mSmallTiles[large][small] = new Tile(this);\r\n }\r\n mLargeTiles[large].setSubTiles(mSmallTiles[large]);\r\n }\r\n mEntireBoard.setSubTiles(mLargeTiles);\r\n\r\n // If the player moves first, set which spots are available\r\n mLastSmall = -1;\r\n mLastLarge = -1;\r\n setAvailableFromLastMove(mLastSmall);\r\n }",
"public void initTiles()\n {\n PropertiesManager props = PropertiesManager.getPropertiesManager(); \n String imgPath = props.getProperty(MahjongSolitairePropertyType.IMG_PATH);\n int spriteTypeID = 0;\n SpriteType sT;\n \n // WE'LL RENDER ALL THE TILES ON TOP OF THE BLANK TILE\n String blankTileFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_IMAGE_NAME);\n BufferedImage blankTileImage = miniGame.loadImageWithColorKey(imgPath + blankTileFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileImage(blankTileImage);\n \n // THIS IS A HIGHLIGHTED BLANK TILE FOR WHEN THE PLAYER SELECTS ONE\n String blankTileSelectedFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_SELECTED_IMAGE_NAME);\n BufferedImage blankTileSelectedImage = miniGame.loadImageWithColorKey(imgPath + blankTileSelectedFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileSelectedImage(blankTileSelectedImage);\n \n // FIRST THE TYPE A TILES, OF WHICH THERE IS ONLY ONE OF EACH\n // THIS IS ANALOGOUS TO THE SEASON TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeATiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_A_TILES);\n for (int i = 0; i < typeATiles.size(); i++)\n {\n String imgFile = imgPath + typeATiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_A_TYPE);\n spriteTypeID++;\n }\n \n // THEN THE TYPE B TILES, WHICH ALSO ONLY HAVE ONE OF EACH\n // THIS IS ANALOGOUS TO THE FLOWER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeBTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_B_TILES);\n for (int i = 0; i < typeBTiles.size(); i++)\n {\n String imgFile = imgPath + typeBTiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_B_TYPE);\n spriteTypeID++;\n }\n \n // AND THEN TYPE C, FOR WHICH THERE ARE 4 OF EACH \n // THIS IS ANALOGOUS TO THE CHARACTER AND NUMBER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeCTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_C_TILES);\n for (int i = 0; i < typeCTiles.size(); i++)\n {\n String imgFile = imgPath + typeCTiles.get(i);\n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID); \n for (int j = 0; j < 4; j++)\n {\n initTile(sT, TILE_C_TYPE);\n }\n spriteTypeID++;\n }\n }",
"public Tile(Tile tile){\n this.gameX = tile.getGameX();\n this.gameY = tile.getGameY();\n this.state = tile.getState();\n this.color = tile.getColor();\n }",
"public Background() {\n\t\ttime = 0;\n\t\tRandom rand = new Random();\n\t\trandomGrid = new Vector2[101][101];\n\t\tfor (int i = 0; i < randomGrid.length; i++) {\n\t\t\tfor (int j = 0; j < randomGrid[0].length; j++) {\n\t\t\t\trandomGrid[i][j] = new Vector2(rand.nextFloat() - 0.5f, rand.nextFloat() - 0.5f).nor();\n\t\t\t}\n\t\t}\n\n\t\tshapeRenderer = new ShapeRenderer();\n\t}",
"public Tile(int x, int y){\n this.gameX = x;\n this.gameY = y;\n state = State.OPEN;\n this.color = this.state.getColor();\n }",
"protected Tile(Polygon shape, int centerX, int centerY, int numSides,\r\n ColorScheme colors, int baseColorIndex, int xIndex, int yIndex){\r\n polyGon = shape;\r\n adjTiles = new Tile[numSides];\r\n colorIdx = baseColorIndex;\r\n this.colors = colors;\r\n isActive = true;\r\n x = centerX;\r\n y = centerY;\r\n this.xIndex = xIndex;\r\n this.yIndex = yIndex;\r\n highLight = TileStatus.NONE;\r\n id = idCounter;\r\n idCounter++;\r\n }",
"public Tile(int xPos, int yPos, int zPos, int colour) {\n this.xPos = xPos;\n this.yPos = yPos;\n this.zPos = zPos;\n occupied = 0;\n setWidth(50);\n setHeight(50);\n if ((colour % 2) == 0) {\n setFill(Color.YELLOW);\n } else {\n setFill(Color.GREEN);\n }\n }",
"public void Initialize()\n\t{\n\t\tsetObject(new GraphicsLayer());\n\t}",
"@Override\n\tpublic void init() {\n\t\tEffect().registerEffect(40, 40, 3, \"ExplosionSheet.png\");\n\t\tbg = new Background();\n\t\tobj = new TestObj();\n\t\tobj.init();\n\t\ttest = new Test2[50];\n\t\tfor(int x = 0; x < test.length; x++ )\n\t\t\ttest[x] = new Test2(x*30-600,30 *(float)Math.pow(-1, x), \"g.png\");\n\t\t\n\t\ttest2 = new Test2[50000];\n\t\tfor(int x = 0; x < test2.length; x++ )\n\t\t\ttest2[x] = new Test2(x*30-600,150+30 *(float)Math.pow(-1, x), \"AlienPawn.png\");\n\t\t\n\t\ttest3 = new Test2[50000];\n\t\tfor(int x = 0; x < test3.length; x++ )\n\t\t\ttest3[x] = new Test2(x*30-600,-200+30 *(float)Math.pow(-1, x), \"AlienPawn - Copy.png\");\n\t\n\t}",
"public void init() {\n this.screen = new Rectangle(PADDING, PADDING, Game.TOTAL_COLUMNS * CELL_SIZE, Game.TOTAL_ROWS * CELL_SIZE);\n\n // display the background\n this.screen.setColor(Color.LIGHT_GRAY);//board edge color\n this.screen.fill();\n\n }",
"public Background(GameLevel w, int width, int height) {\n super(w, 800, 800);\n this.world = w;\n //this.gameLevel = gameLevel;\n try {\n //All images being read from their respective image files and being assigned to variables.\n bg = ImageIO.read(new File(\"data/bg.png\"));\n bg2 = ImageIO.read(new File(\"data/bg2.png\"));\n bg3 = ImageIO.read(new File(\"data/bg3.png\"));\n fg = ImageIO.read(new File(\"data/clouds.png\"));\n win = ImageIO.read(new File(\"data/win.jpg\"));\n dead = ImageIO.read(new File(\"data/dead.jpg\"));\n scoreBoard = ImageIO.read(new File(\"data/scoreBoard.png\"));\n bulletBillSelect = ImageIO.read(new File(\"data/GUI/billSelect.png\"));\n bulletSelect = ImageIO.read(new File(\"data/GUI/bulletSelect.png\"));\n arrow = ImageIO.read(new File(\"data/GUI/arrow.png\"));\n health = ImageIO.read(new File(\"data/GUI/health.png\"));\n black = ImageIO.read(new File(\"data/GUI/black.jpg\"));\n\n\n } catch (IOException ex) {\n System.out.println(\"System Error\");\n }\n }",
"public MapTile() {}",
"public void init() {\n if (!getLocation().isTileMap()) {\n //Debug.signal( Debug.NOTICE, null, \"PlayerImpl::init\");\n this.animation = new Animation(this.wotCharacter.getImage(), ClientDirector.getDataManager().getImageLibrary());\n this.sprite = (Sprite) this.wotCharacter.getDrawable(this);\n this.brightnessFilter = new BrightnessFilter();\n this.sprite.setDynamicImageFilter(this.brightnessFilter);\n }\n this.movementComposer.init(this);\n }",
"public PondTile(int x, int y) {\n super(x, y);\n }",
"public void renderTileManager()\n {\n background(background);\n tiles[activeTile].drawGrid();\n tiles[activeTile].drawCellHover();\n createPreview(tiles[activeTile]);\n drawPreviewHover();\n drawPreviews();\n }",
"public void initBasicBoardTiles() {\n\t\ttry {\n\t\t\tfor(int i = 1 ; i <= BOARD_SIZE ; i+=2) {\n\t\t\t\tfor(char c = getColumnLowerBound() ; c <= getColumnUpperBound() ; c+=2) {\n\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, c), PrimaryColor.BLACK).build());\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, (char) ( c + 1)), PrimaryColor.WHITE).build());\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 2 ; i <= BOARD_SIZE ; i+=2) {\n\t\t\t\tfor(char c = getColumnLowerBound() ; c <= getColumnUpperBound() ; c+=2) {\n\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, c), PrimaryColor.WHITE).build());\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, (char) ( c + 1)), PrimaryColor.BLACK).build());\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(LocationException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public StartScreen()\n { \n // Create a new world with 1111x602 cells with a cell size of 1x1 pixels.\n super(1111, 602, 1); \n prepare();\n background.playLoop();\n }",
"public GameTileyul579(int tileValue) {\n\n //calls the empty constructor\n super(tileValue);\n\n /*TODO: Create one or more new Shape(s) to represent the tile \n * (it can be a Rectangle, a Circle, a combination, etc. Get creative!)\n *\n * Don't forget to set the width and height of the object(s)\n * \n * Set the color of the object(s) depending on the tile's value.\n * You can use the colors HashMap to get the appropriate color.\n * Remember you can change the colors in this HashMap, and you can \n * combine them with other colors to make a creative tile. The\n * only requirement is that each legal value in the game have a \n * different color or color scheme. You need to handle illegal \n * values, but the color you choose for these illegal values is \n * up to you.\n * \n * Remember that colors.get(tileValue) will return the Color\n * associated with the value.\n * \n */ \n Rectangle square = new Rectangle();\n square.setWidth(100);\n square.setHeight(100);\n populateColors();\n square.setFill(colors.get(tileValue));\n //illegal value\n if((tileValue & (tileValue-1))!=0 || tileValue<0 ||tileValue==1)\n square.setFill(Color.BLACK);\n if(tileValue > 256)\n square.setFill(Color.WHITE);\n\n \n \n /* TODO: Create a Text object to display the value of the tile,\n * if the tileValue is non-zero\n * Don't forget to setText, setFont, and setFill\n *\n * The font type and color is up to you. You might choose to vary it\n * depending on the value of the tile, or you can just use a single\n * color.\n *\n * If tileValue is 0,\n * you do not need to create this text object. I.e. it will be blank.\n */\n Text someText = new Text();\n if(tileValue!=0){\n someText.setText(Integer.toString(tileValue));\n someText.setFont(Font.font(\n \"Times New Roman\",FontWeight.BOLD,30));\n someText.setFill(Color.WHITE); \n }else{\n someText.setText(\"\"); \n }\n\n /* TODO: Finally, add tile shape(s) and value of tile to the calling\n * object, which is a StackPane. \n * Hint: Look into the getChildren method of the StackPane/Pane class\n * and remember that you are adding your objects to the calling object\n * which is a StackPane. \n */\n this.getChildren().add(square);\n this.getChildren().add(someText);\n\n }",
"public Tile (int pos, int type) { \r\n\t\tthis.tilePos = pos;\r\n\t\tthis.tileType = type;\r\n\t}",
"private void setUpBackGround() {\n try {\n setBackGround(new Image(new FileInputStream(\"images/backgrounds/battlemap0_background@2x.png\")));\n } catch (FileNotFoundException ignored) {\n }\n\n\n try {\n ImageView middleGround = new ImageView(new Image(new FileInputStream(\"images/gameIcons/middleGround/battlemap0_middleground.png\")));\n middleGround.setFitHeight(windowHeight);\n middleGround.setFitWidth(windowWidth);\n addComponent(new NodeWrapper(middleGround));\n } catch (FileNotFoundException ignored) {\n }\n\n try {\n ImageView foreGround = new ImageView(new Image(new FileInputStream(\"images/foregrounds/battlemap0_foreground_002@2x.png\")));\n foreGround.setPreserveRatio(true);\n foreGround.setFitWidth(windowHeight / 3);\n foreGround.relocate(windowWidth - foreGround.getFitWidth(), windowHeight - foreGround.getFitWidth() * foreGround.getImage().getHeight() / foreGround.getImage().getWidth());\n addComponent(new NodeWrapper(foreGround));\n } catch (FileNotFoundException ignored) {\n }\n }",
"public void setup() {\n\t\tthis.image = new BufferedImage(maxXPos, maxYPos, BufferedImage.TYPE_4BYTE_ABGR);\n\t\tthis.graphics = getImage().createGraphics();\n\t}",
"public Tile(int imageCoordinate, int x, int y) {\n this.imageCoordinate = imageCoordinate;\n this.x = x;\n this.y = y;\n }",
"public DoorTile(int x, int y) {\r\n\t\tsuper(\"resources/door.gif\", x, y);\r\n\t}",
"public Tile(int row, int column){\n this.row = row;\n this.column = column;\n this.piece = null;\n }",
"public Tile(final int x, final int y) {\n this.x = x;\n this.y = y;\n }",
"public void init() {\n\t\t// Image init\n\t\tcharacter_static = MainClass.getImage(\"\\\\data\\\\character.png\");\n\t\tcharacter_static2 = MainClass.getImage(\"\\\\data\\\\character2.png\");\n\t\tcharacter_static3 = MainClass.getImage(\"\\\\data\\\\character3.png\");\n\t\t\n\t\tcharacterCover = MainClass.getImage(\"\\\\data\\\\cover.png\");\n\t\tcharacterJumped = MainClass.getImage(\"\\\\data\\\\jumped.png\");\n\t\t\n\t\t// Animated when static.\n\t\tthis.addFrame(character_static, 2000);\n\t\tthis.addFrame(character_static2, 50);\n\t\tthis.addFrame(character_static3, 100);\n\t\tthis.addFrame(character_static2, 50);\n\t\t\n\t\tthis.currentImage = super.getCurrentImage();\n\t}",
"@Override\r\n\tpublic void setup() {\r\n\t\tthis.gridCells = this.world.getCells();\r\n\t\tthis.markerDrawOrders = new HashMap<Cell, Integer>();\r\n\t\tsetMarkerDrawOrders(this.gridCells);\r\n\t\t//Number of hexagons in columns and rows\r\n\t\tthis.numHexRow = this.gridCells.length;\r\n\t\tthis.numHexCol = this.gridCells[0].length;\r\n\t\t//Calculate the total width and height in pixels the hexagons take up\r\n\t\tthis.totalHexWidth = (this.numHexCol * HEX_WIDTH) + HEX_WIDTH / 2;\r\n\t\tthis.totalHexHeight = \r\n\t\t\t\t(HEX_ANGLE_HEIGHT + HEX_VERT_HEIGHT) \r\n\t\t\t\t* this.numHexRow + HEX_ANGLE_HEIGHT;\r\n\t\t\r\n\t\t//Work out which dimension take up the most space\r\n\t\tif (this.totalHexWidth > this.totalHexHeight) {\r\n\t\t\tthis.largestDimension = Dimensions.HORIZONTAL;\r\n\t\t} else {\r\n\t\t\tthis.largestDimension = Dimensions.VERTICAL;\r\n\t\t}\r\n\t\tsize(PIXEL_WIDTH, PIXEL_HEIGHT);\r\n\t\t\r\n\t\t//Gives the garbage clearer time to free up memory before the \r\n\t\t//background buffer is recalculated\r\n\t\tthis.backgroundBuffer = null; \r\n\t\t//Of screen buffer to where the background tiles of the ant world a are\r\n\t\t//drawn. This means that each time the buffer is drawn to the screen,\r\n\t\t//rather than all the tiles which makes it much faster!\r\n\t\tthis.backgroundBuffer = createGraphics(this.totalHexWidth,\r\n\t\t\t\tthis.totalHexHeight, P2D);\r\n\t\t\r\n\t\tsmooth(); //Turn on anti aliasing\r\n\t\tframeRate(10); //Turn down the frame rate for less processing power\r\n\t\t//Text variables\r\n\t\ttextFont(this.courierFont, 30);\r\n\t\tfill(255); //Fill colour (white) for the text\r\n\t\tthis.zoomer = new ZoomPan(this); // Initialise the zoomer\r\n\t\tthis.zoomer.allowZoomButton(false); \r\n\t\tsetInitialPanAndZoom(); //Set the initial zoom and pan\r\n\t\tupdateImageScale(); //Update the image scales because zoom scale has\r\n\t\t\t\t\t\t\t//been changed\r\n\t\tbufferWorld(); //Buffer the background tiles\r\n\t}",
"public Tile(int row, int column, Piece piece) {\n this.row = row;\n this.column = column;\n this.piece = piece;\n this.setBorder(javax.swing.BorderFactory.createEmptyBorder());\n }",
"public TileObject(Point position, TileContainer superContainer, TETile tile) {\n super(1, 1, position, superContainer);\n superContainer.addElement(this);\n this.tile = tile;\n }",
"public LoadingScreen2()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1280, 720, 1); \n tracker = new Tracker();\n }",
"public FireTile() {\n super();\n setUtility(5);\n }",
"public TetrisBoard() {\n super();\n\n myBoard = new Board();\n myHeight = myBoard.getHeight() * BLOCK_SIZE;\n myWidth = myBoard.getWidth() * BLOCK_SIZE;\n myGameMode = CLASSIC_MODE;\n myBoardString = myBoard.toString();\n myGameOver = false;\n myWelcome = true;\n myTimer = new Timer(INITIAL_TIMER_DELAY, new TimerListener());\n\n setupBoard();\n }",
"public Grass() throws Exception {\n super(setColumns(JumpCanvas.DISP_WIDTH), 1, Image\n .createImage(\"/images/grass.png\"), TILE_WIDTH, TILE_WIDTH);\n TOP_Y = JumpManager.DISP_HEIGHT - TILE_WIDTH;\n setPosition(0, TOP_Y);\n myAnimatedTileIndex = createAnimatedTile(2);\n for (int i = 0; i < COLUMNS; i++) {\n if ((i % CYCLE == 0) || (i % CYCLE == 2)) {\n setCell(i, 0, myAnimatedTileIndex);\n } else {\n setCell(i, 0, 1);\n }\n }\n }",
"private void init() {\n\n\t\tinitializeLists();\n\t\tcreateTiles();\n\t\tcreateTileViews();\n\t\tshuffleTiles();\n\n\t}",
"public IsoTiledTest() {\r\n\t\tsuper(\"Isometric Tiled Map Test\");\r\n\t}",
"private void initTile(SpriteType sT, String tileType)\n {\n // CONSTRUCT THE TILE\n MahjongSolitaireTile newTile = new MahjongSolitaireTile(sT, unassignedTilesX, unassignedTilesY, 0, 0, INVISIBLE_STATE, tileType);\n \n // AND ADD IT TO THE STACK\n stackTiles.add(newTile); \n }",
"public void Init(){\n\t\trequestFocus();\n\t\tBufferedImageLoader loader = new BufferedImageLoader();\t\t// Class to load images\n\t\ttry {\n\t\t\tBackGround = loader.loadImage(\"/Scroll Small.png\");\t\t// Load background\n\t\t} catch (IOException e) {e.printStackTrace();}\n\t\t\n\t\ttext = new Text(this);\n\t\tren = new Render(screenHeight, screenWidth);\n\t\titems = ItemManager.getInstance();\n\t\tmon = MonsterManager.getInstance(this, text);\n\t\trooms = RoomManager.getInstance(items, mon);\n\t\trep = new Reponses(this, text, rooms);\n\t\tthis.addKeyListener(new KeyInput(this, mon));\t\t\t\t// Keyboard input\n\t\tthis.addMouseListener(new MouseInput(this, text, screenHeight, screenWidth)); // Mouse input\n\t\t\n\t\troom = rooms.x2y3;\t\t\t\t// Set starting location\n\t\t\n\t\trender(); render(); render();\t// Render screen\n\t}",
"public void init() {\n\t\tbg = new MyImg(\"gamepage/endgame/bg.png\");\n\t\tbut0 = new MyImg(\"paygame/qdbut.png\");\n\t\tbut1 = new MyImg(\"paygame/qxbut.png\");\n\t}",
"public BodyPart(int xcoord, int ycoord, int tileSize) {\r\n\t\tthis.xcoord = xcoord;\r\n\t\tthis.ycoord = ycoord;\r\n\t\twidth = tileSize;\r\n\t\theight = tileSize;\r\n\t}",
"EnemyTile(int xGraphic, int yGraphic, int xGrid, int yGrid){\n super(xGraphic,yGraphic, xGrid, yGrid);\n }",
"public GameDisplay(World world) {\r\n\t\tthis.world = world;\r\n\t\t//Initialise image variables and load image files (files loaded here \r\n\t\t//rather than dynamically when needed because it would require a large \r\n\t\t//amount of loading/unloading image files which would slow the game \r\n\t\t//down when running\r\n\t\tthis.grassTile = loadImage(\"resources/images/tiles/grass_tile.png\");\r\n\t\tthis.blackAnthillTile \r\n\t\t\t\t= loadImage(\"resources/images/tiles/black_anthill.png\");\r\n\t\tthis.redAnthillTile \r\n\t\t\t\t= loadImage(\"resources/images/tiles/red_anthill.png\");\r\n\t\tthis.rockTile = loadImage(\"resources/images/tiles/rock_tile.png\");\r\n\t\t\r\n\t\t//Some entities have different images depending on how zoomed in the\r\n\t\t//display is, i.e. ants and food. In these cases the different scaled\r\n\t\t//images are held in array, accessed via constants\r\n\t\tthis.blackAnt = new PImage[3];\r\n\t\tthis.blackAnt[SMALL_IMAGE] \r\n\t\t = loadImage(\"resources/images/ants/black_ant_small.png\");\r\n\t\tthis.blackAnt[LARGE_IMAGE] \r\n\t\t = loadImage(\"resources/images/ants/black_ant_large.png\");\r\n\t\tthis.blackAntFood = \r\n\t\t\t\tloadImage(\"resources/images/ants/black_ant_food_large.png\");\r\n\t\t\r\n\t\tthis.redAnt = new PImage[3];\r\n\t\tthis.redAnt[SMALL_IMAGE] \r\n\t\t = loadImage(\"resources/images/ants/red_ant_small.png\");\r\n\t\tthis.redAnt[LARGE_IMAGE] \r\n\t\t = loadImage(\"resources/images/ants/red_ant_large.png\");\r\n\t\tthis.redAntFood =\r\n\t\t\t\tloadImage(\"resources/images/ants/red_ant_food_large.png\");\r\n\t\t\r\n\t\tthis.foodSmall = loadImage(\"resources/images/food/food_small.png\");\r\n\t\tthis.foodMedium = loadImage(\"resources/images/food/food_medium.png\");\r\n\t\tthis.foodLarge = new PImage[9];\r\n\t\tthis.foodLarge[ONE_FOOD] \r\n\t\t = loadImage(\"resources/images/food/food_one_large.png\");\r\n\t\tthis.foodLarge[TWO_FOOD] \r\n\t\t = loadImage(\"resources/images/food/food_two_large.png\");\r\n\t\tthis.foodLarge[THREE_FOOD] \r\n\t\t = loadImage(\"resources/images/food/food_three_large.png\");\r\n\t\tthis.foodLarge[FOUR_FOOD] \r\n\t\t = loadImage(\"resources/images/food/food_four_large.png\");\r\n\t\tthis.foodLarge[FIVE_FOOD] \r\n\t\t = loadImage(\"resources/images/food/food_five_large.png\");\r\n\t\tthis.foodLarge[SIX_FOOD] \r\n\t\t = loadImage(\"resources/images/food/food_six_large.png\");\r\n\t\tthis.foodLarge[SEVEN_FOOD] \r\n\t\t = loadImage(\"resources/images/food/food_seven_large.png\");\r\n\t\tthis.foodLarge[EIGHT_FOOD] \r\n\t\t = loadImage(\"resources/images/food/food_eight_large.png\");\r\n\t\tthis.foodLarge[NINE_FOOD] = \r\n\t\t\t\tloadImage(\"resources/images/food/food_nine_large.png\");\r\n\t\t\r\n\t\tthis.blackMarker \r\n\t\t\t\t= loadImage(\"resources/images/markers/chemical_black.png\");\r\n\t\tthis.redMarker \r\n\t\t\t\t= loadImage(\"resources/images/markers/chemical_red.png\");\r\n\t\t\r\n\t\t//Load font\r\n\t\tthis.courierFont = loadFont(\"resources/fonts/courier_new_font.vlw\");\r\n\t}",
"public TileFloor(int x, int y)\r\n {\r\n random = new Random(12345);\r\n ROWS = DEFAULT_ROWS;\r\n COLUMNS= DEFAULT_COLUMNS;\r\n this.x = x;\r\n this.y = y;\r\n }",
"public void init() {\r\n int width = img.getWidth();\r\n int height = img.getHeight();\r\n floor = new Floor(game, width, height);\r\n units = new ArrayList<Unit>();\r\n objects = new ArrayList<GameObject>();\r\n for (int y=0; y<height; y++) {\r\n for (int x=0; x<width; x++) {\r\n int rgb = img.getRGB(x,y);\r\n Color c = new Color(rgb);\r\n Tile t;\r\n if (c.equals(GRASS_COLOR)) {\r\n t = new Tile(game, new Posn(x,y), \"tile_48x24_grass.png\");\r\n } else if (c.equals(STONE_COLOR)) {\r\n t = new Tile(game, new Posn(x,y), \"tile_48x24_stone.png\");\r\n } else {\r\n /* Check all the surrounding tiles. Take a consensus for the underlying tile color. */\r\n int numGrass=0, numStone=0;\r\n for (int j=y-1; j<=y+1; j++) {\r\n for (int i=x-1; i<=x+1; i++) {\r\n if (i>=0 && i<img.getWidth() && j>=0 && j<img.getHeight() && !(i==x && j==y)) {\r\n int rgb2 = img.getRGB(i,j);\r\n Color c2 = new Color(rgb2);\r\n if (c2.equals(GRASS_COLOR)) numGrass++;\r\n else if (c2.equals(STONE_COLOR)) numStone++;\r\n }\r\n }\r\n }\r\n if (numGrass >= numStone) {\r\n t = new Tile(game, new Posn(x,y), \"tile_48x24_grass.png\");\r\n } else {\r\n t = new Tile(game, new Posn(x,y), \"tile_48x24_stone.png\");\r\n }\r\n }\r\n floor.setTile(x, y, t);\r\n \r\n if (c.equals(TREE_COLOR)) {\r\n //objects.add(new GameObject(x,y))\r\n } else if (c.equals(WALL_COLOR)) {\r\n objects.add(new Wall(game, new Posn(x,y), \"wall_48x78_1.png\"));\r\n } else if (c.equals(WIZARD_COLOR)) {\r\n addWizard(x,y);\r\n } else if (c.equals(ZOMBIE_COLOR)) {\r\n addZombie(x,y);\r\n } else if (c.equals(BANDIT_COLOR)) {\r\n addBandit(x,y);\r\n } else if (c.equals(PLAYER_COLOR)) {\r\n game.getPlayerUnit().setPosn(new Posn(x,y));\r\n units.add(game.getPlayerUnit());\r\n }\r\n }\r\n }\r\n }",
"public Game()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1, false); \n Greenfoot.start(); //Autostart the game\n Greenfoot.setSpeed(50); // Set the speed to 30%\n setBackground(bgImage);// Set the background image\n \n //Create instance\n \n Airplane gameplayer = new Airplane ();\n addObject (gameplayer, 100, getHeight()/2);\n \n }",
"private void initBoard() {\n initCommands();\n setBackground(Color.BLACK);\n setPreferredSize(new Dimension((int) (W * Application.scale), (int) (H * Application.scale)));\n\n commandClasses.forEach((cmdstr) -> {\n try {\n Object obj = Class.forName(cmdstr).getDeclaredConstructor().newInstance();\n Command cmd = (Command) obj;\n connectCommand(cmd);\n System.out.println(\"Loaded \" + cmdstr);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n });\n\n Particle.heatmap.addColor(0, Color.GREEN);\n Particle.heatmap.addColor(50, Color.YELLOW);\n Particle.heatmap.addColor(100, Color.RED);\n\n Particle.slopemap.addColor(-5, Color.RED);\n Particle.slopemap.addColor(0, Color.WHITE);\n Particle.slopemap.addColor(5, Color.GREEN);\n\n setFocusable(true);\n }",
"public ScoreBoard()\r\n {\r\n super();\r\n int boardWidth = 200;\r\n int boardHeight = 30;\r\n \r\n board = new GreenfootImage(boardWidth,boardHeight);\r\n board.setColor(Color.green); \r\n //&& Color.blue);\r\n board.fillRect(0, 0, boardWidth,boardHeight);\r\n this.setImage(board);\r\n \r\n //draw it\r\n update();\r\n }",
"public SandTile(float x, float y) {\n\t\tsuper(x, y, ImageLibrary.get(\"sand_tile\"));\n\t}",
"void setTile(Tile tile) {\n _tile = tile;\n }",
"@Override\r\n\tpublic void gameInit() \r\n\t{\r\n\t\tfont = new Font(\"Courier\", Font.BOLD, 14);\r\n\t\tfontInfo = this.getFontMetrics(font);\r\n\t\tkeys = new KeyValues();\r\n\t\t\r\n\t\tbackground.loadImage(\"/images/sky.png\");\r\n\t\ttileset = new TileSet(10,10,32,32);\r\n\t\ttileset.loadTiles(\"/images/test_tiles.png\");\r\n\t\tmap = new Map(tileset, 20, 50);\r\n\t\tmap.readMap(\"res/maps/testmap2.txt\");\r\n\t\t\r\n\t\tcamera.setDimensions(getScreenWidth(), getScreenHeight());\r\n\t\tcamera.setXRange(0, map.getWidth() - getScreenWidth());\r\n\t\tcamera.setYRange(0, map.getHeight() - getScreenHeight());\r\n\t}",
"public void init() {\r\n\t\t\r\n\t\tsetSize(WIDTH, HEIGHT);\r\n\t\tColor backgroundColor = new Color(60, 0, 60);\r\n\t\tsetBackground(backgroundColor);\r\n\t\tintro = new GImage(\"EvilMehranIntroGraphic.png\");\r\n\t\tintro.setLocation(0,0);\r\n\t\tadd(intro);\r\n\t\tplayMusic(new File(\"EvilMehransLairThemeMusic.wav\"));\r\n\t\tinitAnimationArray();\r\n\t\taddKeyListeners();\r\n\t\taddMouseListeners();\r\n\t\twaitForClick();\r\n\t\tbuildWorld();\r\n\t}",
"public gameWorld()\n { \n // Create a new world with 600x600 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n \n addObject(new winSign(), 310, 300);\n addObject(new obscureDecorative(), 300, 400);\n addObject(new obscureDecorative(), 300, 240);\n \n for(int i = 1; i < 5; i++) {\n addObject(new catchArrow(i * 90), 125 * i, 100);\n }\n for (int i = 0; i < 12; i++) {\n addObject(new damageArrowCatch(), 50 * i + 25, 50); \n }\n \n \n //Spawning Interval\n\n if(timerInterval >= 10) {\n arrowNumber = Greenfoot.getRandomNumber(3);\n }\n if(arrowNumber == 0) {\n addObject(new upArrow(directionOfArrow[0], imageOfArrow[0]), 125, 590);\n arrowNumber = 5;\n }\n if(arrowNumber == 1) {\n addObject(new upArrow(directionOfArrow[1], imageOfArrow[1]), 125 * 2, 590);\n arrowNumber = 5;\n }\n if(arrowNumber == 2) {\n addObject(new upArrow(directionOfArrow[2], imageOfArrow[2]), 125 * 3, 590);\n arrowNumber = 5;\n }\n if( arrowNumber == 3) {\n addObject(new upArrow(directionOfArrow[3], imageOfArrow[3]), 125 * 4, 590);\n arrowNumber = 5;\n }\n \n \n\n \n }",
"protected abstract void setTile( int tile, int x, int y );",
"public UISnake(int startW, int startH) {\n\t\tsuper(startW, startH);\n\t\thead = new HeadTile(startW, startH, direction, this);\n\t\tlastTile = new BodyTile(800, 800, this);\n\t}",
"public void Define() {\n manager = new Manager(); // Initialize other classes\n save = new Save();\n store = new Store();\n menu = new Menu();\n postgame = new PostGame();\n\n map = new ImageIcon(\"res/map.png\").getImage(); // Load background image\n \t\n \n // Load the track image\n track = new ImageIcon(\"res/TrackCorner.png\").getImage(); // Initialize the track image file\n \n // Load images for the towers\n tileset_towers[0] = new ImageIcon(\"res/redlasertower.png\").getImage();\n tileset_towers[1] = new ImageIcon(\"res/blueLaserTower.png\").getImage();\n tileset_towers[2] = new ImageIcon(\"res/goldLaserTower.png\").getImage();\n \n // Load images for the indicators\n tileset_indicators[0] = new ImageIcon(\"res/button.png\").getImage();\n tileset_indicators[1] = new ImageIcon(\"res/money.png\").getImage();\n tileset_indicators[2] = new ImageIcon(\"res/heart.png\").getImage();\n \n // Load images for the buttons\n tileset_buttons[0] = new ImageIcon(\"res/redLaserTower.png\").getImage();\n tileset_buttons[1] = new ImageIcon(\"res/blueLaserTower.png\").getImage();\n tileset_buttons[2] = new ImageIcon(\"res/goldLaserTower.png\").getImage();\n tileset_buttons[3] = new ImageIcon(\"res/trash.png\").getImage();\n \n // Load images for the solider\n tileset_soldier[0] = new ImageIcon(\"res/enemyD1.png\").getImage();\n tileset_soldier[1] = new ImageIcon(\"res/enemyD2.png\").getImage();\n \n tileset_soldier[2] = new ImageIcon(\"res/enemyR1.png\").getImage();\n tileset_soldier[3] = new ImageIcon(\"res/enemyR2.png\").getImage();\n \n tileset_soldier[4] = new ImageIcon(\"res/enemyL1.png\").getImage();\n tileset_soldier[5] = new ImageIcon(\"res/enemyL2.png\").getImage();\n \n tileset_soldier[6] = new ImageIcon(\"res/enemyU1.png\").getImage();\n tileset_soldier[7] = new ImageIcon(\"res/enemyU2.png\").getImage();\n \n // Save the configuration of the track\n save.loadSave(new File(\"save/mission.txt\"));\n save.loadHighScore();\n \n // Initialize enemy objects\n for(int i = 0; i < enemies.length; i++) {\n \tenemies[i] = new Enemy();\n }\n \n }",
"public void initialize() {\n\t\tbombLabel.setText(\"Flag: \" + game.getFlagCounter() + \"/\" + game.getNumOfBombs());\n\t\ttimerLabel.setText(\"Time: \" + 0);\n\t\tboard.getStyleClass().add(\"grid\");\n\t\tbtnArray = new Button[game.getHeight()][game.getWidth()];\n\t\tfor (int x = 0; x < game.getHeight(); x++) {\n\t\t\tfor (int y = 0; y < game.getWidth(); y++) {\n\t\t\t\tButton btn = new Button(\"\");\n\t\t\t\tbtnArray[x][y] = btn;\n\t\t\t\tbtn.setMaxSize(50, 50);\n\t\t\t\tbtn.setMinSize(50, 50);\n\t\t\t\t//Add Button to the board (GridPane)\n\t\t\t\tboard.add(btn, x, y);\n\t\t\t\tbtn.setId(x + \" . \" + y);\n\t\t\t\tbtn.setOnMouseClicked(e -> TileClicked(e));\n\t\t\t}\n\t\t}\n\t}",
"private void init() throws IOException {\n //Initializing a new Display\n this.display = new Display(title, width, height);\n this.background = new SpriteSheet(gfx.loader(\"/images/RoadTile3.png\"));\n this.inputHandler = new InputHandler(this.display);\n Assets.init();\n\n gameState = new GameState();\n StateManager.setState(gameState);\n\n player = new Player();\n enemies = new ArrayList<>();\n }",
"public Main()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n\n prepare();\n }",
"private void initialiseBoard() {\r\n\t\t//Set all squares to EMPTY\r\n\t\tfor(int x = 0; x < board.getWidth(); x++) {\r\n\t\t\tfor(int y = 0; y < board.getHeight(); y++) {\r\n\t\t\t\tboard.setSquare(new GridSquare(GridSquare.Type.EMPTY), x, y);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Assign player tiles\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_ONE_TILE), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_TWO_TILE), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y);\r\n\t\t\r\n\t\t//Assign Creation tiles\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_ONE_POSITION_X+3, Board.PLAYER_ONE_POSITION_Y+3);\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_TWO_POSITION_X-3, Board.PLAYER_TWO_POSITION_Y-3);\r\n\t\t\r\n\t\t//Assign Out of Bounds tiles\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\t\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\t\r\n\t\t\r\n\t}",
"public WinScreen()\r\n { \r\n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\r\n super(1500, 500, 1); \r\n\r\n prepare();\r\n }",
"Board() {\n currentlyPlacedShip = null;\n imageMap = new TreeMap<ShipType, Image>();\n fillImageMap();\n try {\n hit = ImageIO.read(getClass().getResource(\"img/hit.gif\"));\n board = ImageIO.read(getClass().getResource(\"img/board.gif\"));\n mishit = ImageIO.read(getClass().getResource(\"img/mishit.gif\"));\n } catch(IOException e) {\n e.printStackTrace();\n }\n }",
"public void drawTile() {\n\n }",
"public void generateShape() {\n\n //TODO for tetris game - copy added to Tetris\n Shape newShape = null;\n //if(GAME_TO_TEST==GameEnum.TETRIS){\n //newShape = TetrisShapeFactory.getRandomShape(this.board);\n //} else if (GAME_TO_TEST== GameEnum.DRMARIO){\n //newShape = DrMarioShapeFactory.getRandomShape(this.board);\n //}\n\n //Temporary\n //-------------------------------------//\n Image image = null;\n try {\n image = new Image(new FileInputStream(\"resources/BlockPurple.png\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n int spawnColIndex = 0;\n int spawnRowIndex = 0;\n int tileSize = 0;\n boolean setColor = false;\n boolean setTileBorder = false; //toggle to add boarder to tile\n boolean setImage = true;\n spawnColIndex = (board.gridWidth-1)/2; //half of board width\n spawnRowIndex = 0;\n tileSize = board.tileSize;\n\n Tile tile1 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 0 , Direction.DOWN); //Center Tile\n Tile tile2 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex,1 , Direction.RIGHT);\n Tile tile3 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 1 , Direction.LEFT);\n Tile tile4 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 1 , Direction.DOWN);\n\n List<Tile> tiles = new ArrayList<Tile>();\n tiles.add(tile1);\n tiles.add(tile2);\n tiles.add(tile3);\n tiles.add(tile4);\n newShape = new Shape(tiles);\n\n //set newly created shape as the currently active shape\n this.currentActiveShape = newShape;\n\n //check if spawn area is occupied\n boolean isOccupied =false;\n for (Tile newTile : this.currentActiveShape.tiles) {\n if(this.board.getTile(newTile.columnIndex,newTile.rowIndex)!=null){\n isOccupied = true;\n }\n }\n\n //TODO\n //check if shape reaches top\n if(!isOccupied){\n //add tiles to board\n for (Tile newTile : this.currentActiveShape.tiles) {\n this.board.placeTile(newTile);\n }\n } else {\n //TODO later add Game Over JavaFx message\n System.out.println(\"GAME OVER\");\n\n //TODO Finishlater\n //Text gameoverText = new Text(10,20,\"GAME OVER\");\n //gameoverText.setFill(Color.RED);\n //gameoverText.setX( 100/*( ((board.gridWidth-1)*tileSize)/2)*/ );\n //gameoverText.setY( 100/*( ((board.gridHeight-1)*tileSize)/2)*/ );\n //gameoverText.setStyle(\"-fx-font: 70 arial;\");\n //this.group.getChildren().add(gameoverText);\n\n //Text t = new Text();\n //t.setX(20.0f);\n //t.setY(65.0f);\n //t.setX(100);\n //t.setY(200);\n //t.setText(\"Perspective\");\n //t.setFill(Color.YELLOW);\n //t.setFont(Font.font(null, FontWeight.BOLD, 36));\n //this.group.getChildren().add(t);\n //this.pane.getChildren().add(t);\n\n //System.exit(0);\n }\n\n }",
"public TileSelector(){\r\n super();\r\n \r\n }",
"public TileRegion() {\n\t\tthis.bounds = new Rectangle();\n\t\tthis.type\t= CollisionType.land;\n\t}",
"synchronized public void initGfx()\n {\n // Points for initial sprite placement\n Point p1, p2, p3;\n\n p1 = getMainPoint();\n p2 = getRandomMiniPoint();\n p3 = getRandomMiniPoint();\n\n // Reset score\n score = 0;\n\n // Reset text for score\n ((TextView)findViewById(R.id.the_score_label)).setText(\"SCORE: 0\");\n\n // Set main sprite\n ((GameBoard)findViewById(R.id.the_canvas)).setMainSprite(p1.x, p1.y);\n\n // Set mini sprites\n ((GameBoard)findViewById(R.id.the_canvas)).setMiniSprite(p2.x, p2.y);\n ((GameBoard)findViewById(R.id.the_canvas)).setMiniSprite2(p3.x, p3.y);\n\n // Set game over sprite to outside screen\n ((GameBoard) findViewById(R.id.the_canvas)).setOverSprite(-2000, -2000);\n\n // Enable reset button\n ((Button)findViewById(R.id.reset_button)).setEnabled(true);\n\n frame.removeCallbacks(frameUpdate);\n ((GameBoard)findViewById(R.id.the_canvas)).invalidate();\n frame.postDelayed(frameUpdate, FRAME_RATE);\n }",
"public Parent createContent(){\n Pane root = new Pane();\n root.setPrefSize((dimension * tileSize)+(tileSize*4)+menuWidth, (dimension * tileSize)+(tileSize*4));\n root.getChildren().addAll(tileGroup);\n TopOfBoard top = new TopOfBoard();\n Parent controlsAndMovement = top.newScene();\n root.getChildren().addAll(controlsAndMovement);\n\n // setting main game board template\n for (int i = 0; i< dimension; i++){\n for (int j = 0; j< dimension; j++){\n if (i==0||i== dimension -1||j==0||j== dimension -1){\n if (i==0) {\n if (j==0){\n tileInit(i, j, tileGroup, tileSize * 2, tileSize * 2, j * tileSize, i * tileSize);\n }\n else if (j== dimension -1){\n tileInit(i, j, tileGroup, tileSize*2, tileSize*2, (j * tileSize)+tileSize, i * tileSize);\n }\n else {\n tileInit(i, j, tileGroup, tileSize*2, tileSize, (j * tileSize)+tileSize, i * tileSize);\n }\n }\n else if (i== dimension -1){\n if (j==0){\n tileInit(i, j, tileGroup, tileSize*2, tileSize*2, j * tileSize, (i * tileSize)+tileSize);\n }\n else if (j== dimension -1){\n tileInit(i, j, tileGroup, tileSize*2, tileSize*2, (j * tileSize)+tileSize, (i * tileSize)+tileSize);\n }\n else {\n tileInit(i, j, tileGroup, tileSize * 2, tileSize, (j * tileSize) + tileSize, (i * tileSize) + tileSize);\n }\n }\n else if (j==0){\n tileInit(i, j, tileGroup, tileSize, tileSize*2, j * tileSize, (i * tileSize)+(tileSize));\n\n }\n else if (j== dimension -1) {\n tileInit(i, j, tileGroup, tileSize, tileSize*2, (j * tileSize)+(tileSize), (i * tileSize)+tileSize);\n }\n\n }\n }\n\n // Setting player score board\n for (int q = 1; q <= numOfPlayers; q++){\n if (q == 1){\n Tile tile = new Tile((getTileSize()*2), (getTileSize()*4));\n tile.setTranslateX((getTileSize()* getDimension())+(getTileSize()*3));\n tile.setTranslateY(getTileSize()*3);\n Text text = new Text((getTileSize()* getDimension())+(getTileSize()*4), (getTileSize()*3.5), \"Player 1 score board:\");\n tileGroup.getChildren().addAll(tile, text);\n }\n else if (q == 2){\n Tile tile = new Tile((getTileSize()*2), (getTileSize()*4));\n tile.setTranslateX((getTileSize()* getDimension())+(getTileSize()*3));\n tile.setTranslateY(getTileSize()*5);\n Text text = new Text((getTileSize()* getDimension())+(getTileSize()*4), (getTileSize()*5.5), \"Player 2 score board:\");\n tileGroup.getChildren().addAll(tile, text);\n }\n else if (q == 3){\n Tile tile = new Tile((getTileSize()*2), (getTileSize()*4));\n tile.setTranslateX((getTileSize()* getDimension())+(getTileSize()*3));\n tile.setTranslateY(getTileSize()*7);\n Text text = new Text((getTileSize()* getDimension())+(getTileSize()*4), (getTileSize()*7.5), \"Player 3 score board:\");\n tileGroup.getChildren().addAll(tile, text);\n }\n else if (q == 4){\n Tile tile = new Tile((getTileSize()*2), (getTileSize()*4));\n tile.setTranslateX((getTileSize()* getDimension())+(getTileSize()*3));\n tile.setTranslateY(getTileSize()*9);\n Text text = new Text((getTileSize()* getDimension())+(getTileSize()*4), (getTileSize()*9.5), \"Player 4 score board:\");\n tileGroup.getChildren().addAll(tile, text);\n }\n\n }\n\n for (int r = 1; r <= numOfPlayers; r++) {\n if (r == 1) {\n Tile tile = new Tile((getTileSize() * 3), (getTileSize() * 4));\n tile.setTranslateX((getTileSize() * getDimension()) + (getTileSize() * 7));\n tile.setTranslateY(0);\n Text text = new Text((getTileSize() * getDimension()) + (getTileSize() * 8), (getTileSize() * 0.5), \"Player 1 owned cards:\");\n tileGroup.getChildren().addAll(tile, text);\n } else if (r == 2) {\n Tile tile = new Tile((getTileSize() * 3), (getTileSize() * 4));\n tile.setTranslateX((getTileSize() * getDimension()) + (getTileSize() * 7));\n tile.setTranslateY(getTileSize() * 3);\n Text text = new Text((getTileSize() * getDimension()) + (getTileSize() * 8), (getTileSize() * 3.5), \"Player 2 owned cards:\");\n tileGroup.getChildren().addAll(tile, text);\n } else if (r == 3) {\n Tile tile = new Tile((getTileSize() * 3), (getTileSize() * 4));\n tile.setTranslateX((getTileSize() * getDimension()) + (getTileSize() * 7));\n tile.setTranslateY(getTileSize() * 6);\n Text text = new Text((getTileSize() * getDimension()) + (getTileSize() * 8), (getTileSize() * 6.5), \"Player 3 owned cards:\");\n tileGroup.getChildren().addAll(tile, text);\n } else if (r == 4) {\n Tile tile = new Tile((getTileSize() * 3), (getTileSize() * 4));\n tile.setTranslateX((getTileSize() * getDimension()) + (getTileSize() * 7));\n tile.setTranslateY(getTileSize() * 9);\n Text text = new Text((getTileSize() * getDimension()) + (getTileSize() * 8), (getTileSize() * 9.5), \"Player 4 owned cards:\");\n tileGroup.getChildren().addAll(tile, text);\n\n }\n }\n addImg();\n }\n return root;\n }",
"private void initBackGround() {\n Entity walls = Entities.makeScreenBounds(100);\n walls.setType(PinballTypes.WALL);\n walls.addComponent(new CollidableComponent(true));\n getGameWorld().addEntity(walls);\n\n Entities.builder()\n .viewFromTexture(\"piñi.jpg\")\n .buildAndAttach();\n\n// adds bottom part of table, shared with all tables\n// getGameWorld().addEntity(factory.bottomLeft());\n// getGameWorld().addEntity(factory.bottomRight());\n }",
"public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1000, 600, 1);\n planets();\n stars();\n }",
"public void init(){\n\t\tsetSize (800,600);\n\t\t//el primer parametro del rectangulo en el ancho\n\t\t//y el alto\n\t\trectangulo = new GRect(120,80);\n\t\t\n\t}",
"public Board() {\n tiles = new int[3][3];\n int[] values = genValues(new int[]{1, 2, 3, 4, 5, 6, 7, 8, 0});\n\n int offset;\n for (int i = 0; i < 3; i++) {\n offset = 2 * i;\n tiles[i] = Arrays.copyOfRange(values, i + offset, i + offset + 3);\n }\n }",
"@Override\n\tpublic void init() {\n\t\t\n\t\t// Set your level dimensions.\n\t\t// Note that rows and columns cannot exceed a size of 16\n\t\tsetDimensions(4, 4);\n\t\t\n\t\t// Select your board type\n\t\tsetBoardType(BoardType.CHECKER_BOARD);\n\n\t\t// Select your grid colors.\n\t\t// You need to specify two colors for checker boards\n\t\tList<Color> colors = new ArrayList<Color>();\n\t\tcolors.add(new Color(255, 173, 179, 250)); // stale blue\n\t\tcolors.add(new Color(255, 255, 255, 255)); // white\n\t\tsetColors(colors);\n\t\t\n\t\t// Specify the level's rules\n\t\taddGameRule(new DemoGameRule());\n\t\t\n\t\t// Retrieve player IDs\n\t\tList<String> playerIds = getContext().getGame().getPlayerIds();\n\t\tString p1 = playerIds.get(0);\n\t\tString p2 = playerIds.get(1);\n\n\t\t// Add your entities to the level's universe\n\t\t// using addEntity(GameEntity) method\n\t\taddEntity(new Pawn(this, p1, EntityType.BLACK_PAWN, new Point(0, 0)));\n\t\taddEntity(new Pawn(this, p2, EntityType.WHITE_PAWN, new Point(3, 3)));\n\t}",
"public PantallaVictoria()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(400, 600, 1); \n prepare();\n }",
"public GridPane() {\n\t\t for (int i=0;i<MAX_X; i++) {\n\t\t\tfor (int j=0;j<MAX_Y;j++) {\n\t\t\t\tseed[i][j] = new Cell(i,j,false);\n\t\t\t}//end for j\n\t\t }//end for i\n\t\n\t \tdefaultBackground = getBackground();\n\t\n\t MatteBorder border = new MatteBorder(1, 1, 1, 1, Color.BLACK);\n\t \tthis.setBorder(border);\n\t \t\t\n\t\t addMouseListener(new MouseAdapter() {\n\t @Override\n\t public void mouseClicked(MouseEvent e) {\n\t \t int x1 = (int)(e.getX()/CELL_WIDTH);\n\t \t int y1 = (int)(e.getY()/CELL_WIDTH);\n\t \t if(seed[x1][y1].isAlive()) {\n\t \t\t seed[x1][y1].isAlive = false;\n\t \t }\n\t \t else {\n\t \t\t seed[x1][y1].isAlive = true;\n\t \t }\n//\t \t System.out.println(\"[\"+x1+\",\"+y1+\"]\");\n\t repaint();\n\t }\n\t });\n\t }",
"public Tile(int type, int image, Character c) {\n\t\tsetType(type);\n\t\tsetImage(image);\n\t\tsetCharacter(c);\n\t\tsetSelected(false);\n\t\tsetMvmnt(false);\n\t}",
"public void setup()\n {\n this.imageStore = new ImageStore(\n createImageColored(TILE_WIDTH, TILE_HEIGHT, DEFAULT_IMAGE_COLOR));\n this.world = new WorldModel(WORLD_ROWS, WORLD_COLS,\n createDefaultBackground(imageStore));\n this.view = new WorldView(VIEW_ROWS, VIEW_COLS, this, world,\n TILE_WIDTH, TILE_HEIGHT);\n this.scheduler = new EventScheduler(timeScale);\n\n loadImages(IMAGE_LIST_FILE_NAME, imageStore, this);\n loadWorld(world, LOAD_FILE_NAME, imageStore);\n\n scheduleActions(world, scheduler, imageStore);\n\n next_time = System.currentTimeMillis() + TIMER_ACTION_PERIOD;\n click = false;\n }",
"public TilePanel(CoordinatesTile coordTile) {\r\n\t\tthis(getPath(coordTile));\r\n\t}",
"public TilePanel(BufferedImage img){\r\n\t\twidth = 80;\r\n\t\theight = 80;\r\n\t\tthis.bufferedImage = img;\r\n\t\tsetVisible(true);\r\n\t}",
"private void initImage() {\n this.image = (BufferedImage)this.createImage(DisplayPanel.COLS, DisplayPanel.ROWS);\n this.r.setRect(0, 0, DisplayPanel.ROWS, DisplayPanel.COLS);\n this.paint = new TexturePaint(this.image,\n this.r);\n }",
"@Override\r\n\tpublic void init() \r\n\t{\r\n\t\tthis.board = new GameBoard();\r\n\t}",
"public Tile(final int originalPos) {\n this.originalPos = originalPos;\n this.currentPos = originalPos;\n this.selector = Player.empty();\n }",
"public BlackTile(float posX, float posY, float posZ, float height, float width) {\n super(new Box3D(posX, posY, posZ, height, width, 1f));\n this.setTexture(\"black_tile\");\n this.canWalkOver = true;\n }"
] |
[
"0.679614",
"0.67684335",
"0.67269826",
"0.66313887",
"0.6623664",
"0.66144735",
"0.6557624",
"0.65293646",
"0.6483788",
"0.64770526",
"0.64769685",
"0.64436847",
"0.64360625",
"0.6412685",
"0.64022475",
"0.63877547",
"0.6383077",
"0.63828635",
"0.63803583",
"0.6321033",
"0.6306403",
"0.6286817",
"0.62865156",
"0.6285262",
"0.627597",
"0.62727743",
"0.62653685",
"0.62550896",
"0.6246471",
"0.62237495",
"0.62158024",
"0.6214965",
"0.61965436",
"0.6191634",
"0.6186774",
"0.61866474",
"0.6150496",
"0.61447245",
"0.61411875",
"0.6130614",
"0.6107823",
"0.6081653",
"0.60759324",
"0.6066873",
"0.6066831",
"0.6053564",
"0.60448885",
"0.6038821",
"0.60359955",
"0.60176796",
"0.6015834",
"0.6007834",
"0.59985316",
"0.5985017",
"0.598401",
"0.5983712",
"0.598322",
"0.59773946",
"0.596707",
"0.5966039",
"0.59639335",
"0.59519625",
"0.5926363",
"0.5918951",
"0.59129035",
"0.59049344",
"0.589307",
"0.58868945",
"0.58839047",
"0.58793175",
"0.5873848",
"0.58579814",
"0.5852822",
"0.58473116",
"0.5844884",
"0.5841389",
"0.5841095",
"0.5836688",
"0.58239436",
"0.5821631",
"0.58174455",
"0.5809342",
"0.57941526",
"0.57888377",
"0.5784686",
"0.57799053",
"0.5778564",
"0.5775174",
"0.57739294",
"0.576745",
"0.5766776",
"0.576478",
"0.5760365",
"0.5759965",
"0.57497793",
"0.5744142",
"0.5739621",
"0.57371193",
"0.5735774",
"0.57351905"
] |
0.66001034
|
6
|
/static UndoManager undoMgr=new UndoManager(); Creates a new instance of OpenSimDB
|
private OpenSimDB() {
instance = this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private UndoManager() {\n undoList = new LinkedHashMap<RefactoringSession, LinkedList<UndoItem>>();\n redoList = new LinkedHashMap<RefactoringSession, LinkedList<UndoItem>>();\n descriptionMap = new IdentityHashMap<LinkedList, String>();\n }",
"public UndoController() {\r\n \t}",
"public DocumentUndoManager(IDocument document) {\n \t\tsuper();\n \t\tAssert.isNotNull(document);\n \t\tfDocument= document;\n \t\tfHistory= OperationHistoryFactory.getOperationHistory();\n \t\tfUndoContext= new ObjectUndoContext(fDocument);\n \t\tfConnected= new ArrayList();\n \t\tfDocumentUndoListeners= new ListenerList(ListenerList.IDENTITY);\n \t}",
"UndoableTransaction(RitUndoManager manager, String name, String details,\r\n BackupRepository repository) {\r\n this.manager = manager;\r\n this.name = name;\r\n this.repository = repository;\r\n// this.getRepository().clean();\r\n this.details = details;\r\n\r\n if (RitUndoManager.debug) {\r\n log.debug(\"Created UNDO \" + getPresentationName() + \" \" +\r\n details + \" with repository on \" + repository.getBackupDir());\r\n }\r\n }",
"public UndoManager getUndoManager() {\n return undoManager;\n }",
"protected abstract void internalUndo();",
"void processUndo() {\r\n boardManager.undo();\r\n }",
"public UndoManager getUndoManager() {\n\t\treturn undoManager;\n\t}",
"void undo();",
"private void initializeUndoHistory() {\n \t\tif (fHistory != null && fUndoContext != null)\n \t\t\tfHistory.dispose(fUndoContext, true, true, false);\n \n \t}",
"public UndoChart() {\n }",
"public void testUndo() {\n\t\t\tpeople.begin();\n\t\t\tSystem.out.println(\"begin/insert into people (Solo, Han, 5)\");\n\n\t\t\tpeople.insert(new Object[] { \"Solo\", \"Han\", \"5\" });\n\t\t\tSystem.out.println(people.toString());\n\n\t\t\tpeople.begin();\n\t\t\tSystem.out.println(\"begin/insert into people (Lea, Princess, 6)\");\n\n\t\t\tpeople.insert(new Object[] { \"Lea\", \"Princess\", \"6\" });\n\t\t\tSystem.out.println(people.toString());\n\n\t\t\tSystem.out.println(\"commit(THIS_LEVEL)\\n\" + \"rollback(Table.THIS_LEVEL)\\n\");\n\t\t\tpeople.commit(Table.THIS_LEVEL);\n\t\t\tpeople.rollback(Table.THIS_LEVEL);\n\t\t\tSystem.out.println(people.toString());\n\n\t\t\t// Now test that nested transactions work correctly.\n\n\t\t\tSystem.out.println(people.toString());\n\n\t\t\tSystem.out.println(\"begin/insert into people (Vader,Darth, 4)\");\n\t\t\tpeople.begin();\n\t\t\tpeople.insert(new Object[] { \"Vader\", \"Darth\", \"4\" });\n\t\t\tSystem.out.println(people.toString());\n\n\t\t\tSystem.out.println(\"begin/update people set last=Skywalker where last=Vader\");\n\n\t\t\tpeople.begin();\n\t\t\tpeople.update(new Selector() {\n\t\t\t\tpublic boolean approve(Cursor[] tables) {\n\t\t\t\t\treturn tables[0].column(\"last\").equals(\"Vader\");\n\t\t\t\t}\n\n\t\t\t\tpublic void modify(Cursor current) {\n\t\t\t\t\tcurrent.update(\"last\", \"Skywalker\");\n\t\t\t\t}\n\t\t\t});\n\t\t\tSystem.out.println(people.toString());\n\n\t\t\tSystem.out.println(\"delete from people where last=Skywalker\");\n\t\t\tpeople.delete(new Selector.Adapter() {\n\t\t\t\tpublic boolean approve(Cursor[] tables) {\n\t\t\t\t\treturn tables[0].column(\"last\").equals(\"Skywalker\");\n\t\t\t\t}\n\t\t\t});\n\t\t\tSystem.out.println(people.toString());\n\n\t\t\tSystem.out.println(\"rollback(Table.THIS_LEVEL) the delete and update\");\n\t\t\tpeople.rollback(Table.THIS_LEVEL);\n\t\t\tSystem.out.println(people.toString());\n\n\t\t\tSystem.out.println(\"rollback(Table.THIS_LEVEL) insert\");\n\t\t\tpeople.rollback(Table.THIS_LEVEL);\n\t\t\tSystem.out.println(people.toString());\n\t\t}",
"public void undo() {\n\t\tcmd = new UndoCommand(editor);\n\t\tinvoker = new MiniEditorInvoker(cmd);\n\t\tinvoker.action();\n\t}",
"private void prepareUndoRedo()\n {\n undoManager = new UndoManager();\n \n doc = textArea.getDocument();\n doc.addUndoableEditListener(new UndoableEditListener(){\n public void undoableEditHappened(UndoableEditEvent evt)\n {\n undoManager.addEdit(evt.getEdit());\n }\n });\n \n textArea.getActionMap().put(\"Undo\", new AbstractAction(\"Undo\"){\n public void actionPerformed(ActionEvent evt)\n {\n try{\n if(undoManager.canUndo())\n {\n undoManager.undo();\n }\n }catch (CannotUndoException exc)\n {\n System.out.println(\"Erro ao usar Undo :(\");\n }\n }\n });\n textArea.getInputMap().put(KeyStroke.\n getKeyStroke(\"control Z\"), \"Undo\");\n \n textArea.getActionMap().put(\"Redo\", new AbstractAction(\"Redo\"){\n public void actionPerformed(ActionEvent evt)\n {\n try{\n if(undoManager.canRedo())\n {\n undoManager.redo();\n }\n }catch (CannotRedoException exc)\n {\n System.out.println(\"Erro ao usar Redo :(\");\n }\n }\n });\n textArea.getInputMap().put(KeyStroke.\n getKeyStroke(\"control Y\"), \"Redo\"); \n }",
"public abstract void undo();",
"@Override\n public Move createUndoMove(final ScoreDirector scoreDirector) {\n return null;\n }",
"public void undo() {\n }",
"public static void undo () {\r\n\t\tCommand cmd = undoCommands.pop();\r\n\t\tcmd.undo();\r\n\t\tredoCommands.push(cmd);\r\n\t}",
"private UnitManager() {\r\n\t\tUM = new UnitMap(); // create an object\r\n\t}",
"@Test\n\tpublic void testUndo()\n\t{\n\t}",
"public MenuDAO() {\n\t\t\n\t\tconnection = ConnectDatabase.connectDatabase();\n\t\t\n\t}",
"public void undo() {\n\t\t\r\n\t}",
"public manager() {\n initComponents();\n autoID();\n table_update();\n }",
"public Object execute(Object theFrame) {\n\t\tObjectEditor.setMethodsVisible(HistoryUndoerListener.class, false);\r\n\t\tKeyShortCuts.put(Common.control('z'), \"Edit>Undo\");\r\n\t\tKeyShortCuts.put(Common.control('y'), \"Edit>Redo\");\r\n\t\t //ObjectEditor.setMethodDisplayName(AFileOperationsModel.class, \"open\", \"Open..\");\r\n\t\t //ObjectEditor.setMethodDisplayName(AFileOperationsModel.class, \"load\", \"Load..\");\r\n\t\t return null;\r\n\t}",
"public UndoStack() {\n super();\n undoPointer = -1;\n }",
"public void undoAction(){}",
"@Override\n T undo();",
"private OrderFacade(){\n\t\tAbstractDAOFactory f = new MySQLDAOFactory();\n \tthis.odao = f.getOrderDAO();\n\t}",
"public ActionUndo(GraphModel model) {\n super(\"Undo\");\n this.model = model;\n //putValue(Action.MNEMONIC_KEY, KeyEvent.VK_E);\n setEnabled(false);\n model.addObserver(this);\n }",
"@Override\n\tpublic void undo()\n\t{\n\t}",
"private SummonerSpellsDao() {\n\t\tconnectionManager = new ConnectionManager();\n\t}",
"public void undo() {\n\t\tif (currentPlayer.getUndos() > 0) {\n\t\t\tcurrentPlayer.updateUndos();\n\t\t\t//System.out.println(\"Current Player's Undos!\" + currentPlayer.getUndos());\n\t\t\tturnEnd = false;\n\t\t\tmadeMove = false;\n\t\t\tboard = cloneForUndo;\n\t\t\t//printBoard();\n\t\t}\n\t}",
"public Os() {\n osBO = new OsBO();\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}",
"@Override\n public void undo() {\n\n }",
"@Override\n public void undo() {\n\n }",
"@Override\r\n\tpublic void undo(Transaction tx) {\r\n\t\t// do nothing\r\n\t\t\r\n\t}",
"public void undo() {\n if (!undos.isEmpty()) {\n Command toUndo = undos.removeLast();\n redos.addLast(toUndo);\n toUndo.undo();\n } \n }",
"@Test\n public void execute() {\n expectedModel.undoActiveCardFolder();\n assertCommandSuccess(new UndoCommand(), model, commandHistory, UndoCommand.MESSAGE_SUCCESS, expectedModel);\n\n // single undoable state in model\n expectedModel.undoActiveCardFolder();\n assertCommandSuccess(new UndoCommand(), model, commandHistory, UndoCommand.MESSAGE_SUCCESS, expectedModel);\n\n // no undoable states in model\n assertCommandFailure(new UndoCommand(), model, commandHistory, UndoCommand.MESSAGE_FAILURE);\n }",
"public void undo() {\n\t\tif (undolist.empty())\n\t\t\treturn;\n\n\t\tIHexEditorCommand comm;\n\t\tcomm = undolist.pop();\n\t\tif (comm == null)\n\t\t\treturn;\n\t\tcomm.revoke();\n\t\tredolist.push(comm);\n\n\t\tupdateStatusPanel();\n\t\tcursor.update();\n\t\tupdateActions();\n\t}",
"private void undoPopItemActionPerformed(java.awt.event.ActionEvent evt) {\n undoredo.undo();\n }",
"@Override\n public void undo() {\n Memento temp = createMemento();\n memento.restore();\n memento = temp;\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 }",
"@Override\r\n public void undo() {\n\r\n }",
"public Session(){\n\t\tdb = ALiteOrmBuilder.getInstance().openWritableDatabase();\n\t\texternalsCallbacks = new ArrayList<EntityListener>();\n\t}",
"void addUndo(UndoableMapEdit undo) {\r\n\t\tundoManager.addEdit(undo);\r\n\t\tsetUndoRedoMenu();\r\n\t}",
"public TermDAOImpl(){\n connexion= new Connexion();\n }",
"public Undoer getUndoer() { return _parent!=null? _parent.getUndoer() : null; }",
"public void uptadeDB(){\n //mainDatabase.modifyStaff(this);\n }",
"private void cmdUndo() throws NoSystemException {\n \ttry {\n\t\t\tsystem().undoLastStatement();\n\t\t} catch (MSystemException e) {\n\t\t\tLog.error(e.getMessage());\n\t\t}\n }",
"@Override\n void undo() {\n assert false;\n }",
"public static void undoButton(){\n\t\tundoMoveClass.undoButtonHelper(board);\n\t}",
"private void importState() {\n SpeakerManager s = new SpeakerManager();\n this.speakerManager = s.importState();\n\n RoomManager r = new RoomManager();\n this.roomManager = r.importState();\n\n OrganizerManager o = new OrganizerManager();\n this.organizerManager = o.importState();\n\n EventManager e = new EventManager();\n this.eventManager = e.importState();\n\n ChatManager c = new ChatManager();\n this.chatManager = c.importState();\n\n AttendeeManager a = new AttendeeManager();\n this.attendeeManager = a.importState();\n\n\n }",
"protected void setUp() throws Exception {\n super.setUp();\n TestHelper.loadConfig();\n actionManager = new ActionManager();\n\n // Setup the undoActions\n actionManager.executeAction(undoableAction1);\n actionManager.executeAction(undoableAction2);\n actionManager.executeAction(undoableAction3);\n\n eventManager = new EventManager(actionManager);\n }",
"private void addUndoButtonListener() {\n Button undoButton = findViewById(R.id.btnundo);\n undoButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n boolean undoAvailable = boardManager.undo();\n if (undoAvailable) {\n displayToast(\"Undo successfully! You have made \" + boardManager.getTimesOfUndo() + \" times of undo.\");\n } else {\n displayToast(\"Undo failed! This is the original board.\");\n }\n }\n });\n }",
"private void addUndoButton() {\n\t\tundoButton = new EAdSimpleButton(EAdSimpleButton.SimpleButton.UNDO);\n undoButton.setEnabled(false);\n\t\ttoolPanel.add(undoButton);\n\t\tredoButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tcontroller.getCommandManager().undoCommand();\n\t\t\t}\n\n\t\t});\n\t}",
"public DBManager() {\n\t\t\n\t}",
"public OnibusDAO() {}",
"public void onUndo(TableroInmutable tablero) {\r\n\t\tthis.tablero.undo(tablero);\r\n\t\t\r\n\t}",
"public MoviesDatabase()\n {\n file = new FileOperation();\n menu = new Menu();\n validation = new Validation();\n }",
"private ORMServiceFactory() { }",
"public RemoteControl() {\n onCommands = new ArrayList<Command>(7); // concrete command.Command registers itself with the invoker\n offCommands = new ArrayList<Command>(7);\n\n Command noCommand = new NoCommand(); //Good programming practice to create dummy objects like this\n for (int i = 0;i < 7;i++) {\n onCommands.add(noCommand);\n }\n\n //Initialize the off command objects\n for (int i = 0;i < 7;i++) {\n offCommands.add(noCommand);\n }\n\n undoCommand = noCommand;\n }",
"public UtentiDB(){\r\n this.utenti = new LinkedList<Utente>();\r\n }",
"public ODatabaseDocumentTx db();",
"public UserDAO() {\n\t\tthis.emf = Persistence.createEntityManagerFactory(\"feedr_v3\");\n\t\tthis.em = this.emf.createEntityManager();\n\t\tthis.et = this.em.getTransaction();\n\t}",
"public final void undo() {\n\t\tthis.historyManager.undo();\n\t}",
"@Override\n\tpublic TranscriptDao GetTranscriptInstance() throws Exception {\n\t\treturn new SqliteTranscriptDaoImpl();\n\t}",
"public void undo() throws CannotUndoException;",
"public void undo () {\n // The restores must be run in the reverse order they are added.\n for (int i = restores.size() - 1; i >= 0; --i) {\n restores.get(i).run();\n }\n restores.clear();\n }",
"public StateDAOImpl() {\n super();\n }",
"public void undoerEnable() { Undoer u = getUndoer(); if(u!=null) u.enable(); }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\t\t\t\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tScriptRunner runner=new ScriptRunner(JPanelTest.con, false, false);\n\t\t\t\t\tInputStreamReader reader = new InputStreamReader(new FileInputStream(\"sejong.sql\"));\n\t\t\t\t\tSystem.out.println(\"Resetting data...\");\n\t\t\t\t\tStatement stmt;\n\t\t\t\t stmt = JPanelTest.con.createStatement();\n\t\t\t\t\trunner.runScript(reader);\n\t\t\t\t reader.close();\n\t\t\t\t\tSystem.out.println(\"Reset Completed!\");\n\t\t\t\t}\n\t\t\t\tcatch (Exception e2) {\n\t\t\t\t\tSystem.out.println(\"Reset Failed! :\" + e2);\n\t\t\t\t}\n//\t\t\t\twin.change(\"adminHome\");\n\t\t\t}",
"public DBController() {\n System.out.println(\"[\" + this.getClass() + \" : consctructor]\");\n this.listeObservers = new ArrayList<>();\n this.url = \"/Users/nico/Desktop/testSquirell.db\";\n //this.listeMorceau=new ArrayList<Morceau>();\n //this.initDB();\n addTableMorceau();\n System.out.println(\"[end constructor \" + this.getClass() + \"]\");\n }",
"@Test\n\tpublic void testUndoAction() {\n\n\t\t//Add the new cell to the undo stack to simulate what\n\t\t//occurs during cell editing. Every change must be recorded so it can be undone\n\t\tundoRedo_TestStack.noUndoRedoAction(testGrid.selectCell(\"A\",5));\n\t\t//Update cell values, simulating user manual input\n\t\ttestGrid.selectCell(\"A\",5).setValue(\"88\");\n\n\t\t//Add the new cell to the undo stack to simulate what\n\t\t//occurs during cell editing. Every change must be recorded so it can be undone\n\t\tundoRedo_TestStack.noUndoRedoAction(testGrid.selectCell(\"E\",8));\n\t\t//Update cell value, simulating user manual input\n\t\ttestGrid.selectCell(\"E\",8).setValue(\"99\");\n\n\n\t\t//Simulate the undo action and keep that info\n\t\tCell result2_undo = undoRedo_TestStack.undoAction(testGrid);\n\t\ttestGrid.selectCell(result2_undo.getCol(), result2_undo.getRow()).setValue(result2_undo.getValue());\n\t\ttestGrid.selectCell(result2_undo.getCol(), result2_undo.getRow()).setCellFormat(result2_undo.getCellFormat());\n\n\t\tCell result1_undo = undoRedo_TestStack.undoAction(testGrid);\n\t\ttestGrid.selectCell(result1_undo.getCol(), result1_undo.getRow()).setValue(result1_undo.getValue());\n\t\ttestGrid.selectCell(result1_undo.getCol(), result1_undo.getRow()).setCellFormat(result1_undo.getCellFormat());\n\n\t\t//Case when the undo stack is empty\n\t\tCell emptyStackCell = undoRedo_TestStack.undoAction(testGrid);\n\n\t\t//Compare the cells modified by the undo action and the expected value\n\t\tassertEquals(\"E\", result2_undo.getCol());\n\t\tassertEquals(8, result2_undo.getRow());\n\t\tassertEquals(\"0\", result2_undo.getValue());\n\t\tassertEquals(Formatting.REAL, result2_undo.getCellFormat());\n\n\t\tassertEquals(\"A\", result1_undo.getCol());\n\t\tassertEquals(5, result1_undo.getRow());\n\t\tassertEquals(\"0\", result1_undo.getValue());\n\t\tassertEquals(Formatting.REAL, result1_undo.getCellFormat());\n\n\t\t//Check that the undo stack is indeed empty\n\t\tassertEquals(-1, emptyStackCell.getRow());\n\t\tassertEquals(\"-1\", emptyStackCell.getCol());\n\n\t}",
"private String undo() {\n if (!undos.isEmpty()) {\n History history = undos.pop();\n this.redos.push(History.copy(this));\n pasteHistory(history);\n }\n\n //return sb.toString();\n return printList();\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tGUIViewTransactionHistory h = new GUIViewTransactionHistory(true);\n\t\t\t}",
"public VRpHrStpDAOImpl() {\r\n super();\r\n }",
"private DaoManager() {\n }",
"public TManagerImp() {\n transactions = new ConcurrentHashMap<>();\n }",
"public testDatabaseAppController()\n\t{\n\t\tdataController = new testDatabaseController(this);\n\t\tqueryList = new ArrayList<QueryInfo>();\n\t\tappFrame = new testDatabaseFrame(this);\n\t}",
"DatabaseCommandInterpreter(Session s) {\n session = s;\n database = s.getDatabase();\n }",
"public MovementDAO() { this(CoreDAO.DRIVER_NAME, CoreDAO.URL, CoreDAO.USER, CoreDAO.PASSWORD);\t\t}",
"public void setTableMgr(TableMgr tablMgr);",
"public DataManager() {\n\t\tthis(PUnit == null ? \"eElectionsDB\" : PUnit);\n\t}",
"public static void record (Command cmd) {\r\n\t\t// Since there is just one instance of each command instantiated\r\n\t\t// when we create the GUI, we would have only one undo state \r\n\t\t// available without the clone. We need to clone the command\r\n\t\t// to support multi-level undo.\r\n\t\tundoCommands.push((Command) cmd.clone());\r\n\t}",
"public RepositorioTransacaoHBM() {\n\n\t}",
"public synchronized void resetOrdenDBList() {\n ordenDBList = null;\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t// TODO Auto-generated method stub\n\t\tSystem.out.println(e.getActionCommand());\n\t\tif (e.getActionCommand().equals(\"save\")) {\n\n\t\t\ttry {\n\t\t\t\tboardModel.save(undoStack, redoStack, config);\n\t\t\t} catch (IOException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t} else if (e.getActionCommand().equals(\"load\")) {\n\n\t\tloadGame();\n\n\t\t} else if (e.getActionCommand().equals(\"undo\")) {\n\n\t\t\tundoing = true;\n\t\t\tif (!undoStack.isEmpty()) {\n\t\t\t\tCommand aux = undoStack.pop();\n\t\t\t\tredoStack.push(aux);\n\t\t\t\taux.execute();\n\t\t\t}\n\t\t\tundoing = false;\n\n\t\t} else if (e.getActionCommand().equals(\"redo\")) {\n\n\t\t\tundoing = true;\n\t\t\tif (!redoStack.isEmpty()) {\n\t\t\t\tCommand aux = redoStack.pop();\n\t\t\t\tundoStack.push(aux);\n\t\t\t\taux.execute();\n\t\t\t}\n\t\t\tundoing = false;\n\n\t\t} else if (e.getActionCommand().equals(\"clutter\")) {\n\n\t\t\tsetSolved(false);\n\t\t\tshuffle(shuffleNum);\n\t\t\tboardView.clearWin();\n\n\t\t} else if (e.getActionCommand().equals(\"solve\")) {\n\t\t\tmongoSolveTime = 0;\n\t\t\tbaseXSolveTime = 0;\n\t\t\t\n\t\t\tsolving = true;\n\t\t\twhile (!undoStack.isEmpty()) {\n\t\t\t\tundoing = true;\n\t\t\t\tundoStack.pop().execute();\n\t\t\t\tundoing = false;\n\t\t\t}\n\t\t\tundoStack.clear();\n\t\t\tredoStack.clear();\n\t\t\tsolving = false;\n\n\t\t} else if (e.getActionCommand().equals(\"exit\")) {\n\n\t\t\tSystem.exit(0);\n\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tLight light = new Light(\"Party Hall \");\r\n\t\tSterio sterio = new Sterio(\"Party Hall \");\r\n\t\tTv tv = new Tv(\"Party Hall \");\r\n\t\t\r\n\t\tLightOnCommand lightOnCommand = new LightOnCommand(light);\r\n\t\tSterioOnWithCDCommand sterioOnWithCDCommand = new SterioOnWithCDCommand(sterio);\r\n\t\tTvOnCommand tvOnCommand = new TvOnCommand(tv);\r\n\t\t\r\n\t\tLightOffCommand lightOffCommand = new LightOffCommand(light);\r\n\t\tSterioOffCommand sterioOffCommand = new SterioOffCommand(sterio);\r\n\t\tTvOffCommand tvOffCommand = new TvOffCommand(tv);\r\n\t\t\r\n\t\tCommand[] onCommands = {lightOnCommand, sterioOnWithCDCommand, tvOnCommand};\r\n\t\tCommand[] offCommands = {lightOffCommand, sterioOffCommand, tvOffCommand};\r\n\t\t\r\n\t\tMacroCommand macroOnCommand = new MacroCommand(onCommands);\r\n\t\tMacroCommand macroOffCommand = new MacroCommand(offCommands);\r\n\t\t\r\n\t\tRemoteControl rc = new RemoteControl();\r\n\t\trc.setCommand(0, macroOnCommand, macroOffCommand);\r\n\t\t\r\n\t\trc.onButtonWasPressed(0);\r\n\t\t\r\n\t\trc.offButtonWasPressed(0);\r\n\t\t\r\n\t\tSystem.out.println(\"=======undo========\");\r\n\t\trc.undoButtonWasPressed();\r\n\r\n\t}",
"private void initRedo(){\n view.getUndo().setOnAction(event -> {\n String title = \"Confirm\";\n String message = (isWhiteTurn ? whiteName : blackName) + \", do you really wish to redo?\";\n ConfirmBox.display(title, message);\n if (ConfirmBox.isConfirmed){\n model.undo();\n view.getUndo().setDisable(true);\n isWhiteTurn = !isWhiteTurn;\n view.refreshPieces();\n initListener();\n updateInformation();\n }\n });\n }",
"@Test\n public void testUndo(){\n //TODO\n }",
"private void createUndoAndRedo(final DrawingPanel thePanel) {\n myUndo = new JButton();\n myToolBar.add(myUndo);\n \n String imageLocation = \"images/undoicon.png\";\n URL imgFileLocation = PowerPaintGUI.class.getResource(imageLocation);\n \n if (Objects.nonNull(imgFileLocation)) {\n myUndo.setIcon(new ImageIcon(imgFileLocation)); \n } \n final JButton redo = new JButton();\n myToolBar.add(redo);\n imageLocation = \"images/redoicon.png\";\n imgFileLocation = PowerPaintGUI.class.getResource(imageLocation);\n \n if (Objects.nonNull(imgFileLocation)) {\n redo.setIcon(new ImageIcon(imgFileLocation)); \n } \n myUndo.setEnabled(false);\n myUndo.addActionListener(new ActionListener() {\n\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n thePanel.getCollection().undo();\n redo.setEnabled(true);\n thePanel.repaint();\n if (thePanel.getCollection().isEmpty()) {\n myUndo.setEnabled(false); \n myPcs.firePropertyChange(\"undo\", false, true);\n }\n }\n });\n \n \n myToolBar.add(redo);\n redo.setEnabled(false);\n redo.addActionListener(new ActionListener() {\n\n @Override\n public void actionPerformed(final ActionEvent theEvt) {\n \n thePanel.getCollection().redo();\n thePanel.repaint();\n if (thePanel.getCollection().isRedoEmpty()) {\n redo.setEnabled(false);\n }\n myUndo.setEnabled(true);\n }\n });\n }",
"public static void main(String[]args){\n Carataker carataker=new Carataker();\n //el originator es el creador de los mementos\n Originator originator=new Originator();\n\n ConcreteObject concreteObject;\n\n concreteObject=new ConcreteObject(\"Doc\",\"Titulo\",\"Estado1\");\n originator.setState(concreteObject);\n\n concreteObject=new ConcreteObject(\"Doc\",\"Descripcion\",\"Estado2\");\n originator.setState(concreteObject);\n carataker.addMemento(originator.createMemento()); // [0] Primer estado\n\n concreteObject=new ConcreteObject(\"Doc\",\"Resumen\",\"Estado3\");\n originator.setState(concreteObject);\n\n concreteObject=new ConcreteObject(\"Doc\",\"Conclusion\",\"Estado4\");\n originator.setState(concreteObject);\n carataker.addMemento(originator.createMemento()); //[1] Segundo estado\n\n concreteObject=new ConcreteObject(\"Doc\",\"Bibliografia\",\"Estado5\");\n originator.setState(concreteObject);\n\n //recuperando o restaurando un estado\n\n originator.restoreFromMemento(carataker.getMemento(0));\n\n }",
"public Memento(PanelTablero inicial) {\n this.tableroGuardado = inicial;\n }",
"public SPManager() {\n \tmyCon = new DBManager();\n }",
"private DBMaster() {\r\n\t\t//The current address is localhost - needs to be changed at a later date\r\n\t\t_db = new GraphDatabaseFactory().newEmbeddedDatabase(\"\\\\etc\\\\neo4j\\\\default.graphdb\");\r\n\t\tregisterShutdownHook();\r\n\t}",
"public RcivControlDAOImpl(){\r\n \r\n }",
"public UnidadDAO() {\n this.setCon(cs.getConection());\n \n }"
] |
[
"0.7027463",
"0.6216606",
"0.6065993",
"0.57245684",
"0.55715513",
"0.55311453",
"0.5475336",
"0.5384501",
"0.5383313",
"0.5377078",
"0.53636986",
"0.5342385",
"0.5303416",
"0.5302368",
"0.5259311",
"0.5238936",
"0.52242184",
"0.520128",
"0.5200707",
"0.51833725",
"0.51705796",
"0.5164652",
"0.5164548",
"0.5151279",
"0.5129868",
"0.5088413",
"0.5087227",
"0.50860685",
"0.50694",
"0.50452936",
"0.50431836",
"0.5036793",
"0.5034112",
"0.5033395",
"0.5033395",
"0.5033395",
"0.5013129",
"0.5013129",
"0.5006188",
"0.50010514",
"0.49980286",
"0.49873877",
"0.49683952",
"0.4955891",
"0.49455875",
"0.4944775",
"0.4933835",
"0.4932743",
"0.49290064",
"0.49190384",
"0.4916395",
"0.49106908",
"0.4896518",
"0.48940372",
"0.4882209",
"0.4880596",
"0.48794556",
"0.48686394",
"0.48563462",
"0.4844151",
"0.48435503",
"0.48431894",
"0.48417634",
"0.48398823",
"0.483801",
"0.4836542",
"0.48359534",
"0.48327965",
"0.48298377",
"0.48246616",
"0.48223415",
"0.48215514",
"0.48214805",
"0.48193845",
"0.48189434",
"0.48150596",
"0.48141026",
"0.48029482",
"0.47985116",
"0.47981265",
"0.4795243",
"0.47947806",
"0.47920954",
"0.47910044",
"0.47889712",
"0.4788969",
"0.4779048",
"0.47785378",
"0.47738066",
"0.47681862",
"0.47634694",
"0.47513324",
"0.47507173",
"0.47505635",
"0.47485358",
"0.47466943",
"0.47433832",
"0.47394142",
"0.47365725",
"0.47280276"
] |
0.5980573
|
3
|
The setChanged() protected method must overridden to make it public
|
public synchronized void setChanged() {
super.setChanged();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public final synchronized void setChanged() {\n\t\tsuper.setChanged ();\n }",
"@Override\n\tpublic void setChanged() {\n\t\tthis.changed = true;\n\t}",
"protected synchronized void setChanged() {\n changed = true;\n }",
"@Override\n public void onChanged() {\n }",
"@Override\n public void setChanged() {\n set(getItem());\n }",
"@Override\n\tpublic void stateChanged() {\n\t\t\n\t}",
"public void markChanged()\n \t{\n \t\tbChanged=true;\n \t}",
"protected void PropertyChanged()\r\n { }",
"private void change() {\n\t\tsetChanged();\n\t\t//NotifyObservers calls on the update-method in the GUI\n\t\tnotifyObservers();\n\t}",
"private void changed() {\n // Ok to have a race here, see the field javadoc.\n if (!changed)\n changed = true;\n }",
"@Override\n\tpublic void stateChanged(ChangeEvent arg0) {\n\t\t\n\t}",
"public void onChanged() {\n }",
"public void setChangeListener();",
"public void changed(boolean changed) {\r\n\t\tthis.changed = changed;\r\n\t}",
"public void isChanged()\n\t{\n\t\tchange = true;\n\t}",
"public void setChanged(boolean isChanged)\r\n\t{\r\n\t\tchanged = isChanged;\r\n\t}",
"@Override\n\t\tpublic void onChange(boolean selfChange) {\n\t\t\tsuper.onChange(selfChange);\n\t\t}",
"public void setModified();",
"@Override\n public void eventsChanged() {\n }",
"protected void stateChanged() {\r\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}",
"@Override\r\n\tpublic void valuesChanged() {\r\n\t}",
"@Override\n protected void onContentsChanged(int slot) {\n setChanged();\n }",
"@Override\r\n public void stateChanged(ChangeEvent e) {\n }",
"@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t}",
"@Override\n\tpublic void notifySettingChanged() {\n\t}",
"@Override\n public void stateChanged(javax.swing.event.ChangeEvent e) {\n }",
"@Override\n public void addChangeListener(ChangeListener l) {}",
"@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}",
"@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}",
"@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}",
"@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}",
"@Override\n protected void onDataChanged() {\n }",
"void instanceChanged();",
"@Override\n public void onChange(boolean selfChange) {\n onChange(selfChange, null);\n }",
"public void notifyChange()\r\n {\r\n setChanged();\r\n notifyObservers();\r\n }",
"public boolean isChanged() {\r\n return isChanged;\r\n }",
"protected void childrenChanged() {\n\n }",
"@Override\n\tpublic boolean valueChanged() {\n\t\treturn false;\n\t}",
"@Override\n\tprotected void setDirty(boolean dirty) {\n\t\tsuper.setDirty(dirty);\n\t}",
"public void changed() {\n this.fireContentsChanged(this, 0, this.getSize() - 1);\n }",
"final void resetChanged() {\n this.changed = false;\n }",
"public abstract void stateChanged(STATE state);",
"@Override\n public void onDataChanged() {\n\n }",
"private void setDirty() {\n\t}",
"protected void setDirty(boolean d)\n/* */ {\n/* 306 */ boolean old = super.isDirty();\n/* 307 */ boolean ours = isDirty();\n/* */ \n/* 309 */ super.setDirty(d);\n/* */ \n/* */ \n/* 312 */ if ((d != old) && (d == ours)) {\n/* 313 */ firePropertyChange(\"dirty\", Boolean.valueOf(old), Boolean.valueOf(isDirty()));\n/* */ }\n/* */ }",
"public void setChanged(final Date changed) {\n this.changed = new Date(changed.getTime());\n }",
"@Override\n public void onDataChanged() {\n }",
"@Override\n public void onDataChanged() {\n }",
"@Override\n public void setDirty(boolean arg0)\n {\n \n }",
"@Override\n\tpublic void settingsChanged(AbstractSettings settings) {\n\t}",
"@Override\n public void addChangeListener(ChangeListener l) {\n }",
"@Override\n public void addChangeListener(ChangeListener l) {\n }",
"public void stateChanged(ChangeEvent param1ChangeEvent) {\n/* 1503 */ if (param1ChangeEvent == null) {\n/* 1504 */ throw new NullPointerException();\n/* */ }\n/* 1506 */ firePropertyChange(\"AccessibleVisibleData\", \n/* 1507 */ Boolean.valueOf(false), \n/* 1508 */ Boolean.valueOf(true));\n/* */ }",
"public void stateChanged( ChangeEvent event )\n {\n \n }",
"@Override\n\t\t\tpublic void changedUpdate(DocumentEvent arg0) {\n\t\t\t}",
"public void setModified (boolean modified);",
"public boolean changed() {\r\n\t\treturn changed;\r\n\t}",
"public void onDataChanged(){}",
"public void setPropertyChanged(com.app.tvp.cas.cliente.PropertyChangedEventHandler propertyChanged) {\n this.propertyChanged = propertyChanged;\n }",
"@Override\n public void actionPerformed (ActionEvent e) {\n fireChanged();\n }",
"@Override\n\t\tpublic void onChange(boolean selfChange) {\n\t\t\tmHandler.sendEmptyMessage(1);\n\t\t\tLog.i(\"message\", \"dataChange\");\n\t\t\tsuper.onChange(selfChange);\n\t\t}",
"public abstract void modelStructureChanged();",
"public void stateChanged (ChangeEvent e)\n {\n }",
"public interface Changed extends Editable.Changed\n {\n }",
"void valueChanged(T oldValue, T newValue);",
"@Override\n\t\tpublic void onChanged() {\n\t\t\tsuper.onChanged();\n\t\t\tinitChildViews();\n\t\t}",
"protected synchronized void clearChanged() {\n changed = false;\n }",
"void onChange( T newValue );",
"@Override\r\n\tpublic void propertyChange(PropertyChangeEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void propertyChange(PropertyChangeEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void propertyChange(PropertyChangeEvent arg0) {\n\r\n\t}",
"protected void indicateModified() {\n invalidationListenerManager.callListeners(this);\n }",
"@Override\n\tprotected void setListener() {\n\n\t}",
"@Override\n\tprotected void setListener() {\n\n\t}",
"public boolean hasChanged();",
"public boolean hasChanged();",
"public void willbeUpdated() {\n\t\t\n\t}",
"public void onDataChanged();",
"@Override\n\tpublic void setConfigChanged(boolean changed) {\n\t\t//do nothing\n\t}",
"public void setModified(boolean state) {\n //System.out.println(\"setting modified to \" + state);\n //new Exception().printStackTrace();\n current.setModified(state);\n calcModified();\n }",
"@Override\n\tpublic void propertyChange(PropertyChangeEvent arg0) {\n\t\t\n\t}",
"public boolean isChanged()\r\n\t{\r\n\t\treturn changed;\r\n\t}",
"public void fieldChanged(Field arg0, int arg1) {\n\t\t\n\t}",
"@Override\n\tpublic void clearChanged() {\n\t\tthis.changed = false;\n\t}",
"Boolean getIsChanged();",
"public final void CanNotBeChanged () {\n\t\tSystem.out.println(\"Can not be Changed\");\n\t}",
"@Override\n public void changed(ObservableValue<? extends Boolean> ov, Boolean onHidden, Boolean onShown) {\n }",
"@Override\n\tpublic boolean hasChanged() {\n\t\treturn this.changed;\n\t}",
"@Override\n\tpublic void propertyChange(PropertyChangeEvent arg0)\n\t{\n\t\t\n\t}",
"public void setMobHasChanged() {\r\n\t\t// method that informs the view(the observer) of the changes\r\n\t\tthis.setChanged();\r\n\t\tthis.notifyObservers();\r\n\t\r\n\t}",
"@Override\n\tpublic void changedUpdate(DocumentEvent de) {\n\n\t}",
"void setMapChanged();",
"@Override\n\tprotected void setValueOnUi() {\n\n\t}",
"void onDataChanged();",
"@Override\n \tpublic void propertyChange(PropertyChangeEvent arg0) {\n \t\t\n \t}",
"private void setModelToChanged() {\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}",
"@Override\n public void changed( Change change ) {\n if ( !( change.isSelected()\n && change.isForInstanceOf( Node.class )\n && change.isForProperty( \"other\" ) ) ) {\n if ( change.isUpdated() ) {\n setFlowUpdated( true );\n }\n super.changed( change );\n }\n }",
"public boolean changeMade()\n {\n return isChanged;\n }",
"void eventChanged();",
"void onPropertyChange(String name, String newValue);"
] |
[
"0.84787136",
"0.82405746",
"0.8229703",
"0.77813286",
"0.7477878",
"0.7408405",
"0.73707604",
"0.73686236",
"0.73659384",
"0.72633904",
"0.711253",
"0.7110799",
"0.7092726",
"0.70811033",
"0.7069362",
"0.70284635",
"0.7004449",
"0.6967443",
"0.69472426",
"0.69168955",
"0.6894829",
"0.68678373",
"0.68646747",
"0.6791614",
"0.67810446",
"0.6776425",
"0.67688143",
"0.6765049",
"0.6765049",
"0.6765049",
"0.6765049",
"0.6757841",
"0.67337275",
"0.67057776",
"0.66525084",
"0.66425234",
"0.6620503",
"0.66011196",
"0.6596341",
"0.6594675",
"0.65946263",
"0.6589819",
"0.6583086",
"0.6580998",
"0.6580154",
"0.65676546",
"0.65674657",
"0.65674657",
"0.6535911",
"0.6517197",
"0.6503676",
"0.6503676",
"0.6491854",
"0.6484515",
"0.64599365",
"0.6431318",
"0.64091915",
"0.6406589",
"0.6399046",
"0.639578",
"0.6394899",
"0.63925576",
"0.6389098",
"0.6374471",
"0.6368185",
"0.63607764",
"0.63553995",
"0.63498497",
"0.6348901",
"0.6348901",
"0.63459396",
"0.6344223",
"0.63432837",
"0.63432837",
"0.6340295",
"0.6340295",
"0.63340175",
"0.632964",
"0.632757",
"0.6312615",
"0.63036627",
"0.62953055",
"0.62931436",
"0.6291969",
"0.62918246",
"0.6285181",
"0.62819946",
"0.62793654",
"0.62772304",
"0.627523",
"0.62691796",
"0.6264916",
"0.6256033",
"0.6243038",
"0.62398076",
"0.62383276",
"0.6232334",
"0.621255",
"0.6204323",
"0.6204127"
] |
0.8697517
|
0
|
/ addModel adds a model to the OpenSimDB. Would throw an exception if initSystem throws
|
public void addModel(Model aModel) throws IOException {
addModel(aModel, null);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void addModel(Model aModel, OpenSimContext context) throws IOException {\n OpenSimContext dContext = context==null?new OpenSimContext(aModel.initSystem(), aModel):context;\n models.add(aModel);\n mapModelsToContexts.put(aModel, dContext);\n SingleModelGuiElements newModelGuiElements = new SingleModelGuiElements(aModel);\n mapModelsToGuiElements.put(aModel, newModelGuiElements);\n setChanged();\n ModelEvent evnt = new ModelEvent(aModel, ModelEvent.Operation.Open);\n notifyObservers(evnt); \n setCurrentModel(aModel, false);\n //ExplorerTopComponent.addFinalEdit();\n }",
"public void addModel(SimpleModel model) {\n Preconditions.checkState(!registered);\n Preconditions.checkNotNull(model.getFullName());\n Preconditions.checkArgument(!models.containsKey(Ascii.toLowerCase(model.getFullName())));\n Preconditions.checkArgument(!modelsById.containsKey(model.getId()));\n String fullName = model.getFullName();\n models.put(Ascii.toLowerCase(fullName), model);\n modelsById.put(model.getId(), model);\n }",
"boolean add(SysFile model);",
"void addModelElement(EObject modelElement);",
"public void addToModel(Object object, StsModel model)\n\t{\n\t}",
"public void appendModel(Model m) {\r\n models.addElement(m);\r\n }",
"public boolean addNewModel(SVMmodel newModel) {\n\n boolean canAdd = true;\n\n for(SVMmodel model : svmModels.values()) {\n if(model.containsTheSounds( true, newModel.getSounds())) {\n canAdd = false;\n }\n }\n\n if(canAdd) {\n svmModels.put(newModel.getName(), newModel);\n }\n\n return canAdd;\n }",
"public void add(SVGElementModel parentModel, SVGElementModel model) {\n \t\tinsertBefore(parentModel, model, null);\n \t}",
"public void addModel(IAnimatorModel newModel) {\r\n this.model = newModel;\r\n }",
"@Override\n\tpublic Integer addModel(PhotoTag model) throws BaseException {\n\t\treturn this.insert(\"Mapper.PhotoTag.insert\", model);\n\t}",
"void addToModel(Model model, int numGenerated) throws Exception {\n addToModel(model, generateEventList(numGenerated));\n }",
"public void saveModel(ModelClass model) throws StorageIOException {\n try {\n Dao<ModelDB, String> modelDao = this.databaseHelper.getDao(ModelDB.class);\n\n ModelDB modelEntity = classToDB(model);\n modelDao.createOrUpdate(modelEntity);\n \n } catch (SQLException e) {\n throw new StorageIOException(\"Failed to save model\", e);\n }\n }",
"protected final void addClueModel(final ClueModel model) {\r\n\t\tclueModels.add(model);\r\n\t}",
"public ModelContainer importModel(String modelData) throws OWLOntologyCreationException {\n\t\t// load data from String\n\t\tfinal OWLOntologyManager manager = graph.getManager();\n\t\tfinal OWLOntologyDocumentSource documentSource = new StringDocumentSource(modelData);\n\t\tOWLOntology modelOntology;\n\t\tfinal Set<OWLParserFactory> originalFactories = removeOBOParserFactories(manager);\n\t\ttry {\n\t\t\tmodelOntology = manager.loadOntologyFromOntologyDocument(documentSource);\n\t\t}\n\t\tcatch (OWLOntologyAlreadyExistsException e) {\n\t\t\t// exception is thrown if there is an ontology with the same ID already in memory \n\t\t\tOWLOntologyID id = e.getOntologyID();\n\t\t\tIRI existingModelId = id.getOntologyIRI().orNull();\n\n\t\t\t// remove the existing memory model\n\t\t\tunlinkModel(existingModelId);\n\n\t\t\t// try loading the import version (again)\n\t\t\tmodelOntology = manager.loadOntologyFromOntologyDocument(documentSource);\n\t\t}\n\t\tfinally {\n\t\t\tresetOBOParserFactories(manager, originalFactories);\n\t\t}\n\t\t\n\t\t// try to extract modelId\n\t\tIRI modelId = null;\n\t\tOptional<IRI> ontologyIRI = modelOntology.getOntologyID().getOntologyIRI();\n\t\tif (ontologyIRI.isPresent()) {\n\t\t\tmodelId = ontologyIRI.get();\n\t\t}\n\t\tif (modelId == null) {\n\t\t\tthrow new OWLOntologyCreationException(\"Could not extract the modelId from the given model\");\n\t\t}\n\t\t// paranoia check\n\t\tModelContainer existingModel = modelMap.get(modelId);\n\t\tif (existingModel != null) {\n\t\t\tunlinkModel(modelId);\n\t\t}\n\t\t\n\t\t// add to internal model\n\t\tModelContainer newModel = addModel(modelId, modelOntology);\n\t\t\n\t\t// update imports\n\t\tupdateImports(newModel);\n\t\t\n\t\treturn newModel;\n\t}",
"public void addLogModel(LogModel param) {\n if (localLogModel == null) {\n localLogModel = new LogModel[] { };\n }\n\n //update the setting tracker\n localLogModelTracker = true;\n\n java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil.toList(localLogModel);\n list.add(param);\n this.localLogModel = (LogModel[]) list.toArray(new LogModel[list.size()]);\n }",
"public sust.paperlessexm.entity.Student addStudent(sust.paperlessexm.entity.Student model) throws GenericBusinessException {\n sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();\n try {\n hibernateTemplate.save(model);\n return getStudent(model.getPrimaryKey());\n } finally {\n log.debug(\"finished addStudent(sust.paperlessexm.entity.Student model)\");\n }\n }",
"public final void entryRuleModel() throws RecognitionException {\n try {\n // InternalMLRegression.g:54:1: ( ruleModel EOF )\n // InternalMLRegression.g:55:1: ruleModel EOF\n {\n before(grammarAccess.getModelRule()); \n pushFollow(FOLLOW_1);\n ruleModel();\n\n state._fsp--;\n\n after(grammarAccess.getModelRule()); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"public final void entryRuleModel() throws RecognitionException {\n try {\n // InternalWh.g:54:1: ( ruleModel EOF )\n // InternalWh.g:55:1: ruleModel EOF\n {\n before(grammarAccess.getModelRule()); \n pushFollow(FOLLOW_1);\n ruleModel();\n\n state._fsp--;\n\n after(grammarAccess.getModelRule()); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"void addToModel(Model model, List<Event> eventsToAdd) throws Exception {\n for (Event p: eventsToAdd) {\n model.addEvent(p);\n }\n }",
"public void openModel() {\r\n \t\tisReleased = true;\r\n \t\tif (checkForSave(\"<html>Save changes before opening a saved model?</html>\")) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tif(animationHolder != null ) {\r\n \t\t\tanimationHolder.stop();\r\n \t\t}\r\n \t\tJMODELModel tmpmodel = new JMODELModel();\r\n \t\tint state = modelLoader.loadModel(tmpmodel, mainWindow);\r\n \t\tif (state == ModelLoader.SUCCESS || state == ModelLoader.WARNING) {\r\n \t\t\tresetMouseState();\r\n \t\t\t// Avoid checkForSave again...\r\n \t\t\tif (model != null) {\r\n \t\t\t\tmodel.resetSaveState();\r\n \t\t\t}\r\n \t\t\tnewModel();\r\n \t\t\t// At this point loading was successful, so substitutes old model\r\n \t\t\t// with loaded one\r\n \t\t\tmodel = tmpmodel;\r\n \t\t\tthis.populateGraph();\r\n \t\t\tsetSelect.setEnabled(true);\r\n \t\t\tcomponentBar.clickButton(setSelect);\r\n \t\t\topenedArchive = modelLoader.getSelectedFile();\r\n \t\t\tmainWindow.updateTitle(openedArchive.getName());\r\n \t\t\t// Removes selection\r\n \t\t\tgraph.clearSelection();\r\n \t\t\t// If model contains results, enable Results Window\r\n \t\t\tif (model.containsSimulationResults()) {\r\n \t\t\t\tif (model.isParametricAnalysisEnabled()) {\r\n \t\t\t\t\tthis.setResultsWindow(new PAResultsWindow(model.getParametricAnalysisModel(), (PAResultsModel) model.getSimulationResults()));\r\n \t\t\t\t\tshowResults.setEnabled(true);\r\n \t\t\t\t} else {\r\n \t\t\t\t\tthis.setResultsWindow(new ResultsWindow(model.getSimulationResults()));\r\n \t\t\t\t\tshowResults.setEnabled(true);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tmodel.resetSaveState();\r\n \t\t\tSystem.gc();\r\n \t\t} else if (state == ModelLoader.FAILURE) {\r\n \t\t\tshowErrorMessage(modelLoader.getFailureMotivation());\r\n \t\t}\r\n \t\t// Shows warnings if any\r\n \t\tif (state == ModelLoader.WARNING) {\r\n \t\t\tnew WarningWindow(modelLoader.getLastWarnings(), mainWindow, modelLoader.getInputFileFormat(), CommonConstants.JSIM).show();\r\n \t\t}\r\n \r\n \t}",
"public void addDataModel(DataModel dm) throws Exception {\r\n\t\tif (dm == null) {\r\n\t\t\tthrow new NullPointerException(\"The data model passed to \" +\r\n\t\t\t\t\t\"the DefaultDataSource's addDataModel method cannot \" +\r\n\t\t\t\t\t\"be null\");\r\n\t\t}\r\n\t\tif (!dataModels.contains(dm)) {\r\n\t\t\tdataModels.add(dm);\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void add(UserModel um) throws Exception {\n\t\tsf.getCurrentSession().save(um);\n\t}",
"void create(Model model) throws Exception;",
"@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n public com.spirit.medios.entity.PlanMedioMesIf addPlanMedioMes(com.spirit.medios.entity.PlanMedioMesIf model)\r\n throws com.spirit.exception.GenericBusinessException \r\n {\r\n PlanMedioMesEJB value = new PlanMedioMesEJB();\r\n try {\r\n value.setId(model.getId());\r\n value.setPlanMedioId(model.getPlanMedioId());\r\n value.setFechaInicio(model.getFechaInicio());\r\n value.setFechaFin(model.getFechaFin());\r\n value.setValorSubtotal(model.getValorSubtotal());\r\n value.setValorDescuento(model.getValorDescuento());\r\n value.setTipo(model.getTipo());\r\n manager.persist(value);\r\n manager.flush();\r\n } catch (Exception e) {\r\n log.error(\"Error al insertar información en planMedioMes.\", e);\r\n\t\t\tthrow new GenericBusinessException(\r\n\t\t\t\t\t\"Error al insertar información en planMedioMes.\");\r\n }\r\n \r\n return getPlanMedioMes(value.getPrimaryKey());\r\n }",
"public void addModelMeta(ModelMeta modelMeta){\n String schema = modelMeta.getSchemaName();\n String model = modelMeta.getModelName();\n metaSet.add(Pair.of(getMetaKey(schema,model),modelMeta));\n }",
"public final void entryRuleModel() throws RecognitionException {\r\n try {\r\n // InternalGo.g:55:1: ( ruleModel EOF )\r\n // InternalGo.g:56:1: ruleModel EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getModelRule()); \r\n }\r\n pushFollow(FOLLOW_1);\r\n ruleModel();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getModelRule()); \r\n }\r\n match(input,EOF,FOLLOW_2); if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n }\r\n return ;\r\n }",
"public void saveModel() {\n\t}",
"void add( ModelObject modelObject, Long id );",
"void setModel(Model model);",
"@Override\n\tpublic void add(UserModel um) throws Exception {\n\t\tuserMapper.insert(um);\n\t}",
"private void initializeModel() {\n\t\tmodel = new Model();\n\n\t\t// load up playersave\n\t\ttry {\n\t\t\tFileInputStream save = new FileInputStream(\"playersave.ser\");\n\t\t\tObjectInputStream in = new ObjectInputStream(save);\n\t\t\tmodel = ((Model) in.readObject());\n\t\t\tin.close();\n\t\t\tsave.close();\n\t\t\tSystem.out.println(\"playersave found. Loading file...\");\n\t\t}catch(IOException i) {\n\t\t\t//i.printStackTrace();\n\t\t\tSystem.out.println(\"playersave file not found, starting new game\");\n\t\t}catch(ClassNotFoundException c) {\n\t\t\tSystem.out.println(\"playersave not found\");\n\t\t\tc.printStackTrace();\n\t\t}\n\t\t\n\t\t// load up customlevels\n\t\ttry {\n\t\t\tFileInputStream fileIn = new FileInputStream(\"buildersave.ser\");\n\t\t\tObjectInputStream in = new ObjectInputStream(fileIn);\n\t\t\tmodel.importCustomLevels(((ArrayList<LevelModel>) in.readObject()));\n\t\t\tin.close();\n\t\t\tfileIn.close();\n\t\t\tSystem.out.println(\"Builder ArrayList<LevelModel> found. Loading file...\");\n\t\t}catch(IOException i) {\n\t\t\t//i.printStackTrace();\n\t\t\tSystem.out.println(\"Builder ArrayList<LevelModel> file not found, starting new game\");\n\t\t\treturn;\n\t\t}catch(ClassNotFoundException c) {\n\t\t\tSystem.out.println(\"Builder ArrayList<LevelModel> not found\");\n\t\t\tc.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t}",
"public void setModel(String model) {\r\n if (model != null) {\r\n store.put(Names.model, model);\r\n } else {\r\n \tstore.remove(Names.model);\r\n }\r\n }",
"@Test\n public void addModelData() {\n new FactoryInitializer()\n .initialize(\n ((tr, ev, is, np, md) -> new ResNetConv2DFactory(tr,ev,is,np,md).addModelData(new ArrayList<>()))\n );\n }",
"private void createNewDynamicModel(){\n\t\tDynamicModel dModel = new DynamicModel(currentView.getViewModel().getName());\r\n\r\n\t\t// Add the new graph to the view\r\n\t\tint modelWidth = DynamicModelView.minimumWidth; \r\n\t\tint modelHeight = DynamicModelView.minimumHeight; \r\n\t\tint viewHeight = currentView.getHeight();\r\n\t\tint pad = 8;\r\n\t\tcurrentView.addModelView(new DynamicModelView(new EntityViewConfig(pad, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t viewHeight - (modelHeight + pad), \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t modelWidth, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t modelHeight, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t EntityViewConfig.Type.DYNAMIC_MODEL), \r\n\t\t\t\t\t\t\t\t\t\t\t\t\tdModel, this, currentView));\r\n\t\tcurrentView.repaint();\r\n\t}",
"public static int addModel(String fileName) {\n\t\tString path = NEW_MODEL + fileName;\n\t\tHttpResponse<String> response = sendRequest(path);\n\t\tif(response == null) return 400;\n\t\treturn response.statusCode();\n\t}",
"public final void entryRuleModel() throws RecognitionException {\n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:61:1: ( ruleModel EOF )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:62:1: ruleModel EOF\n {\n before(grammarAccess.getModelRule()); \n pushFollow(FOLLOW_ruleModel_in_entryRuleModel61);\n ruleModel();\n\n state._fsp--;\n\n after(grammarAccess.getModelRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleModel68); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"public final void entryRuleModel() throws RecognitionException {\n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:61:1: ( ruleModel EOF )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:62:1: ruleModel EOF\n {\n before(grammarAccess.getModelRule()); \n pushFollow(FOLLOW_ruleModel_in_entryRuleModel61);\n ruleModel();\n\n state._fsp--;\n\n after(grammarAccess.getModelRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleModel68); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"@Override\n\tpublic void dbInsert(MovementModel model, String insertStm) throws DAOSysException\t\t{\n\t\tPreparedStatement preparedStm = null;\n\t\tConnection connection = null;\n\n\t\ttry\t{\n\t\t\tconnection = connectToDB();\n\t\t\tpreparedStm = connection.prepareStatement(insertStm);\n\t\t\tpreparedStm.setInt(1, model.getMovementNumber());\n\t\t\tpreparedStm.setString(2, model.getMovementName());\n\t\t\tpreparedStm.executeUpdate();\n\n\t\t}\tcatch (SQLException sex)\t{\n\t\t\tthrow new DAOSysException(\"Error adding composition <\" + model.getMovementNumber() + \" \"+ model.getMovementName() + \"> \" + sex.getMessage());\n\n\t\t}\tfinally\t{\n\t\t\ttry\t{\n\t\t\t\treleaseAll(null, preparedStm, connection);\n\t\t\t} catch (Exception ex)\t{\n\t\t\t\tSystem.err.println(\"Error releasing resources <\" + ex.toString());\n\t\t\t}\n\t\t}\n\t}",
"public void addPetModel(PetModel param) {\n if (localPetModel == null) {\n localPetModel = new PetModel[] { };\n }\n\n //update the setting tracker\n localPetModelTracker = true;\n\n java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil.toList(localPetModel);\n list.add(param);\n this.localPetModel = (PetModel[]) list.toArray(new PetModel[list.size()]);\n }",
"@Override\n\tpublic void addModel(Object o) {\n\t\ttreeModel.insertNodeInto(createNode(o), root, root.getChildCount()); \t\n\t\ttreeTable.setRowSelectionInterval(treeTable.getRowCount()-1, treeTable.getRowCount()-1);\n\t}",
"@Override\n\tpublic void dbInsert(MovementModel model)\tthrows DAOSysException {\n\t\tdbInsert(model, MovementDAO.INSERT_STM);\n\t}",
"public final void entryRuleModel() throws RecognitionException {\n try {\n // InternalCsv.g:55:1: ( ruleModel EOF )\n // InternalCsv.g:56:1: ruleModel EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getModelRule()); \n }\n pushFollow(FOLLOW_1);\n ruleModel();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getModelRule()); \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"@Override\n\tpublic int insert(Object model) {\n\t\treturn 0;\n\t}",
"public void setModel(String model)\n {\n this.model = model;\n }",
"void setModel(Model m);",
"public void AddOrder(Shoporder model) {\n\t\tmapper.AddOrder(model);\n\t}",
"public void addAnimalModel(AnimalModel param) {\n if (localAnimalModel == null) {\n localAnimalModel = new AnimalModel[] { };\n }\n\n //update the setting tracker\n localAnimalModelTracker = true;\n\n java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil.toList(localAnimalModel);\n list.add(param);\n this.localAnimalModel = (AnimalModel[]) list.toArray(new AnimalModel[list.size()]);\n }",
"public void setModel(String model) {\n this.model = model;\n }",
"@Override\n\tpublic void AddOrUpdate(Stock model) {\n\t\tif (model.getId() == 0){\n\t\t\t_stockDao.insert(model);\n\t\t}\n\t\telse {\n\t\t\t_stockDao.updateByPrimaryKey(model);\n\t\t}\n\t}",
"public void useModel(String location) throws ModelManagerException {\n\t\tassert isValidModelDir(location);\n\n\t\tthis.mdir = location;\n\t\tLog.d(\"ModelManager\", \"Loading model from \" + getModelURI());\n\t\ttry {\n\t\t\tmodelxml = db.parse(getInStream(\"model.xml\"));\n\t\t} catch (Exception e) {\n\t\t\tthrow new ModelManagerException(\"Unexpected Exception in AModelManager.setModelDir: \" + e.getMessage(), e);\n\t\t}\n\n\t\tmodelxml.normalize();\n\t\tmodelnode = modelxml.getElementsByTagName(\"model\").item(0);\n\n\t\tString type = getModelXMLAttribute(\"type\");\n\t\tmtype = ModelType.parse(type);\n\t\tif (mtype == ModelType.Unknown)\n\t\t\tthrow new ModelManagerException(\"Unknown model type: \" + type);\n\n\t\t// Parse model data machine format\n\t\tmor = new MathObjectReader();\n\t\tString machformat = getModelXMLAttribute(\"machformat\");\n\t\tif (\"le\".equals(machformat)) {\n\t\t\tmor.MachineFormat = MachineFormats.LittleEndian;\n\t\t} else {\n\t\t\tmor.MachineFormat = MachineFormats.BigEndian;\n\t\t}\n\t}",
"public void setModel(String model) {\r\n this.model = model;\r\n }",
"public void saveModel() {\n\n }",
"public CmdAddShape(Model model, Shape os) {\n\t\tthis.model = model;\n\t\tthis.s = os;\n\t\t\n\t}",
"public void addScene(ModelScene scene) {\r\n\t\tscenes.add(scene);\r\n\t}",
"public void storeModelAt(Model m, int index) {\r\n if (index <= models.size()) models.addElement(m);\r\n else models.setElementAt(m, index);\r\n }",
"public abstract Model openModel(String graphName) throws JenaProviderException;",
"@Override\n public int insert(Model model) throws ServiceException {\n \ttry {\n \t\treturn getDao().insert(model);\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 }",
"private void addModelToScene(Anchor anchor, ModelRenderable modelRenderable) {\n AnchorNode anchorNode = new AnchorNode(anchor);\n //modelRenderable.getMaterial().setFloat4(\"baseColorTint\",new Color(1.0f,0.0f,0.0f,1.1f));\n\n //enables anchorNode to move,scale,zoom\n TransformableNode transformableNode = new TransformableNode(arFragment.getTransformationSystem());\n //set the anchorNode as the parent of the transformableNode\n transformableNode.setParent(anchorNode);\n //renders the 3d model\n transformableNode.setRenderable(modelRenderable);\n\n //set the 3d model/.sfb on top of the scenic platform\n arFragment.getArSceneView().getScene().addChild(anchorNode);\n transformableNode.select();\n }",
"@RequestMapping(value = \"/add\")\n\tpublic String addItem(Model model) {\n\t\tmodel.addAttribute(\"item\", new Item());\n\t\tmodel.addAttribute(\"shops\", srepository.findAll());\n\t\treturn \"additem\";\n\t}",
"public void initializeModel(SongModel songmodel)\n {\n this.sm = songmodel;\n }",
"public void saveModel() {\r\n \t\tif (openedArchive == null) {\r\n \t\t\tsaveModelAs();\r\n \t\t\treturn;\r\n \t\t}\r\n \r\n \t\t// Updates station positions into data structure\r\n \t\tupdateStationPositions();\r\n \t\tint status = modelLoader.saveModel(model, mainWindow, openedArchive);\r\n \t\tswitch (status) {\r\n \t\t\tcase ModelLoader.SUCCESS:\r\n \t\t\t\tmodel.resetSaveState();\r\n \t\t\t\tmainWindow.updateTitle(openedArchive.getName());\r\n \t\t\t\tbreak;\r\n \t\t\tcase ModelLoader.FAILURE:\r\n \t\t\t\tshowErrorMessage(modelLoader.getFailureMotivation());\r\n \t\t\t\tbreak;\r\n \t\t}\r\n \t}",
"public void setModel(String model) {\r\n this.model = Objects.requireNonNull(model);\r\n }",
"GameModel createGameModel(GameModel gameModel);",
"protected void bindModel(Model model) {\n\n //Bind the vao and vbo\n glBindVertexArray(model.getVaoID());\n\n //Send the vertices\n if (model.getVertices().length > 0) {\n glBindBuffer(GL_ARRAY_BUFFER, model.getVerticesID());\n glVertexAttribPointer(0, 3, GL_FLOAT, false, 0, 0);\n glEnableVertexAttribArray(0);\n }\n\n //Send the normals\n if (model.getNormals().length > 0) {\n glBindBuffer(GL_ARRAY_BUFFER, model.getNormalsID());\n glVertexAttribPointer(1, 3, GL_FLOAT, false, 0, 0);\n glEnableVertexAttribArray(1);\n }\n\n //Send the uvs\n if (model.getUvs().length > 0) {\n glBindBuffer(GL_ARRAY_BUFFER, model.getUvsID());\n glVertexAttribPointer(2, 2, GL_FLOAT, false, 0, 0);\n glEnableVertexAttribArray(2);\n }\n }",
"public void addRelations(T model);",
"private void initializeModel() {\n\t\t\n\t}",
"public void loadModel(int modelId) {\n \t\tif(this.openGLModelConfiguration != null) {\r\n \t\t\tthis.fireOnModelDataEvent(this.openGLModelConfiguration, false);\r\n \t\t} else {\r\n \t\t\tcacheManager.readModelAsync(modelId, this);\r\n \t\t}\r\n \t}",
"public ModelOfCar saveModel(ModelOfCar modelOfCar) {\n\t\tModelOfCar existingModel = repository.findByName(modelOfCar.getName());\n\t\tif (existingModel == null)\n\t\t\treturn repository.save(modelOfCar);\n\t\telse\n\t\t\t{\n\t\t\tLOGGER.error(\"Spring Boot informerar mig om att ett fel har inträffat. Model finns i tabell\");\n\t\t\tthrow new OurCustomExceptions(\"Model finns i tabell\");}\n\n\t}",
"public Model createModel(ModelNode modelNode) {\n \tif (modelNode == null)\n \t\tthrow new NullPointerException();\n return new ModelImpl(modelNode);\n }",
"@Override\r\n public void addModel(String name, Object value) {\n if (value == null) return;\r\n super.addModel(name, value);\r\n }",
"public void registerModelStructure(IModelStructure modelStructure) {\n this.modelStructure = modelStructure;\n }",
"ScenarioModel loadScenarioModel() throws ModelSerializationException, ModelConversionException;",
"public void setModel(EPStatementObjectModel model) {\n this.model = model;\n }",
"private void createModel() {\n model = new Node(\"Enemy\"+enemyCounter);\n Box b = new Box(.5f, 2, .5f);\n Geometry bg = new Geometry(\"Box\", b);\n Material bm = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\");\n Sphere sphere = new Sphere(32, 32, 1.5f, false, false);\n Geometry sg = new Geometry(\"Sphere\", sphere);\n Material sm = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\");\n bm.setColor(\"Color\", ColorRGBA.Blue);\n sm.setColor(\"Color\", ColorRGBA.Red);\n bg.setMaterial(bm); \n sg.setMaterial(sm);\n model.attachChild(bg);\n model.attachChild(sg);\n sg.setLocalTranslation(0,2.5f,0);\n \n attachChild(model);\n }",
"com.google.ortools.linearsolver.MPModelProtoOrBuilder getModelOrBuilder();",
"public void saveModelAs() {\r\n \t\t// Updates station positions into data structure\r\n \t\tupdateStationPositions();\r\n \t\tint status = modelLoader.saveModel(model, mainWindow, null);\r\n \t\tswitch (status) {\r\n \t\t\tcase ModelLoader.SUCCESS:\r\n \t\t\t\tmodel.resetSaveState();\r\n \t\t\t\topenedArchive = modelLoader.getSelectedFile();\r\n \t\t\t\tmainWindow.updateTitle(openedArchive.getName());\r\n \t\t\t\tbreak;\r\n \t\t\tcase ModelLoader.FAILURE:\r\n \t\t\t\tshowErrorMessage(modelLoader.getFailureMotivation());\r\n \t\t\t\tbreak;\r\n \t\t}\r\n \t}",
"com.google.ortools.linearsolver.MPModelProto getModel();",
"@Override\n\tpublic void addModel(ODocument o) {\n\t\ttreeModel.insertNodeInto(createNode(o), root, root.getChildCount()); \t\n\t\ttreeTable.setRowSelectionInterval(treeTable.getRowCount()-1, treeTable.getRowCount()-1);\n\t}",
"public AbstractJMFXModel(M model) {\n\t\tthis.model = model;\n\t}",
"public void saveRequirementModelAs(ArchERequirementModel requirementModel, \n\t\t\t\tArchEVersion newVersion) throws ArchEException {\n\t try {\t \t\n\t\t\t// Begin unit of work (transaction == session) in Hibernate, which means\n\t \t// \t1) Open a session\n\t \t// \t2) Open a JDBC connection\n\t \t// \t3) Start a transaction\n\t \tsessionFactory.getCurrentSession().beginTransaction();\t\t\t\t\t\n\n\t \t// Save this architecture in DB\n\t \t((ArchECoreRequirementModel)requirementModel).saveAs((ArchEVersionVO)newVersion);\t\t\t\t\t\n\t \t\n\t\t\t// End unit of work (transaction == session) in Hibernate, which means\n\t \t// \t1) End the transaction by commit\n\t \t// \t2) Close the JDBC connection\n\t \t// \t3) Close the session\n\t\t\tsessionFactory.getCurrentSession().getTransaction().commit();\t\t\t\n\t\t\t\n\t } catch (HibernateException ex) {\n\t \t// If any problem occurred, an exception will be thrown and\n\t\t\t// end unit of work in Hibernate, which means\n\t \t// \t1) End the transaction by rollback\n\t \t// \t2) Close the JDBC connection\n\t \t// \t3) Close the session\n\t \tsessionFactory.getCurrentSession().getTransaction().rollback();\t\t\n\t throw new ArchEException(ex.getMessage(),ex.getCause());\n\t }\t\t\t\t\t\n\t}",
"public void setDBModel(DBModel m)\n {\n\tthis.model = m;\n\n }",
"public void save(E model) {\n\t\tgetHibernateTemplate().save(model);\r\n\t}",
"com.spirit.cartera.entity.LogCarteraDetalleIf addLogCarteraDetalle(com.spirit.cartera.entity.LogCarteraDetalleIf model) throws GenericBusinessException;",
"public void addSwitch(ModelSwitch s) {\r\n\t\tswitches.add(s);\r\n\t}",
"public void saveRequirementModel(ArchERequirementModel requirementModel) throws ArchEException{\n\t try {\t \t\n\t\t\t// Begin unit of work (transaction == session) in Hibernate, which means\n\t \t// \t1) Open a session\n\t \t// \t2) Open a JDBC connection\n\t \t// \t3) Start a transaction\n\t \tsessionFactory.getCurrentSession().beginTransaction();\t\t\t\t\t\n\n\t \t// Save this architecture in DB\n\t \t((ArchECoreRequirementModel)requirementModel).save();\t\t\t\t\t\n\t \t\n\t\t\t// End unit of work (transaction == session) in Hibernate, which means\n\t \t// \t1) End the transaction by commit\n\t \t// \t2) Close the JDBC connection\n\t \t// \t3) Close the session\n\t\t\tsessionFactory.getCurrentSession().getTransaction().commit();\t\t\t\n\t\t\t\n\t } catch (HibernateException ex) {\n\t \t// If any problem occurred, an exception will be thrown and\n\t\t\t// end unit of work in Hibernate, which means\n\t \t// \t1) End the transaction by rollback\n\t \t// \t2) Close the JDBC connection\n\t \t// \t3) Close the session\n\t \tsessionFactory.getCurrentSession().getTransaction().rollback();\t\t\n\t throw new ArchEException(ex.getMessage(),ex.getCause());\n\t }\t\t\t\t\t\n\t}",
"public void setModel(Model model) {\n this.model = model;\n }",
"public void setModel(Model model) {\n this.model = model;\n }",
"public void setModel(Model model) {\n this.model = model;\n }",
"protected void importEOModel() {\n JFileChooser fileChooser = getEOModelChooser();\n int status = fileChooser.showOpenDialog(Application.getFrame());\n\n if (status == JFileChooser.APPROVE_OPTION) {\n\n // save preferences\n FSPath lastDir = getApplication()\n .getFrameController()\n .getLastEOModelDirectory();\n lastDir.updateFromChooser(fileChooser);\n\n File file = fileChooser.getSelectedFile();\n if (file.isFile()) {\n file = file.getParentFile();\n }\n\n DataMap currentMap = getProjectController().getCurrentDataMap();\n\n try {\n URL url = file.toURI().toURL();\n\n EOModelProcessor processor = new EOModelProcessor();\n\n // load DataNode if we are not merging with an existing map\n if (currentMap == null) {\n loadDataNode(processor.loadModeIndex(url));\n }\n\n // load DataMap\n DataMap map = processor.loadEOModel(url);\n addDataMap(map, currentMap);\n\n }\n catch (Exception ex) {\n logObj.info(\"EOModel Loading Exception\", ex);\n ErrorDebugDialog.guiException(ex);\n }\n\n }\n }",
"@Override\n\tpublic void setModel(String model) {\n\t\tthis.model = model;\n\t}",
"public void setModel(OntModel model) {\n\t\tthis.model = model;\n\t}",
"@Override\r\n public void setModel(String model) {\n }",
"void addParametersToModel( Map<String, String> model, Integer nIdUser );"
] |
[
"0.7579798",
"0.69301784",
"0.6858331",
"0.6421642",
"0.6265923",
"0.6096005",
"0.6037361",
"0.6024325",
"0.60011387",
"0.59549564",
"0.59302306",
"0.5794209",
"0.56772274",
"0.56487167",
"0.5635935",
"0.56277585",
"0.55850774",
"0.55801064",
"0.55438805",
"0.55270696",
"0.5500015",
"0.54802907",
"0.54427576",
"0.54416275",
"0.5438123",
"0.54293805",
"0.540665",
"0.5375821",
"0.5372411",
"0.5346429",
"0.53266793",
"0.5322155",
"0.5296012",
"0.52929974",
"0.52715766",
"0.524386",
"0.5232012",
"0.5230064",
"0.5202284",
"0.5196099",
"0.51921827",
"0.5179672",
"0.5158506",
"0.5158506",
"0.5158506",
"0.5158506",
"0.5158506",
"0.5158506",
"0.5158506",
"0.51520675",
"0.5141751",
"0.5139192",
"0.5139079",
"0.51269794",
"0.5111782",
"0.5092338",
"0.50913626",
"0.50883985",
"0.5081508",
"0.50580436",
"0.50491273",
"0.5037033",
"0.50287837",
"0.502869",
"0.50257766",
"0.5023929",
"0.50222456",
"0.5021419",
"0.50194794",
"0.50158286",
"0.5011646",
"0.50110054",
"0.499798",
"0.49910387",
"0.4978315",
"0.4975017",
"0.49615258",
"0.49598646",
"0.49439418",
"0.49399382",
"0.49369785",
"0.49334598",
"0.4930166",
"0.49174938",
"0.4899958",
"0.48865145",
"0.4875711",
"0.48675004",
"0.48668653",
"0.4866181",
"0.48608002",
"0.48574248",
"0.48524255",
"0.48524255",
"0.48524255",
"0.48396838",
"0.48361236",
"0.48214412",
"0.48192987",
"0.4818044"
] |
0.7032417
|
1
|
setupGroups(aModel); // initSystem could throw exception
|
public void addModel(Model aModel, OpenSimContext context) throws IOException {
OpenSimContext dContext = context==null?new OpenSimContext(aModel.initSystem(), aModel):context;
models.add(aModel);
mapModelsToContexts.put(aModel, dContext);
SingleModelGuiElements newModelGuiElements = new SingleModelGuiElements(aModel);
mapModelsToGuiElements.put(aModel, newModelGuiElements);
setChanged();
ModelEvent evnt = new ModelEvent(aModel, ModelEvent.Operation.Open);
notifyObservers(evnt);
setCurrentModel(aModel, false);
//ExplorerTopComponent.addFinalEdit();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void testGroupInitializer() throws Exception {\n }",
"@PostConstruct\n\tprivate void InitGroups() {\n\t\tList<Group> groups = identityService.createGroupQuery().groupIdIn(\"READER\", \"BETAREADER\").list();\n\n\t\tif (groups.isEmpty()) {\n\n\t\t\tGroup reader = identityService.newGroup(\"READER\");\n\t\t\tidentityService.saveGroup(reader);\n\n\t\t\tGroup betaReader = identityService.newGroup(\"BETAREADER\");\n\t\t\tidentityService.saveGroup(betaReader);\n\t\t}\n\n\t\tRoles newRole1 = new Roles(\"READER\");\n\t\troleRepository.save(newRole1);\n\t\tRoles newRole2 = new Roles(\"BETAREADER\");\n\t\troleRepository.save(newRole2);\n\t\tRoles newRole3 = new Roles(\"WRITER\");\n\t\troleRepository.save(newRole3);\n\t\tRoles newRole4 = new Roles(\"COMMISSION\");\n\t\troleRepository.save(newRole4);\n\n\t\tBCryptPasswordEncoder encoder = new BCryptPasswordEncoder();\n\n\t\tList<Roles> roles = new ArrayList<Roles>();\n\t\troles.add(newRole4);\n\n\t\tcom.example.app.models.User user1 = new com.example.app.models.User(\"Dejan\", \"Jovanovic\", \"dejan\",\n\t\t\t\tencoder.encode(\"123\").toString(), false, true, roles, \"novica.nikolioc@gmail.com\", \"as2d1as4d5a6s4da6\");\n\t\tuserRepository.save(user1);\n\n\t\tcom.example.app.models.User user2 = new com.example.app.models.User(\"Jovan\", \"Popovic\", \"jovan\",\n\t\t\t\tencoder.encode(\"123\").toString(), false, true, roles, \"nole994ns2@gmail.com\", \"as2d1as4d5a6s4da6\");\n\t\tuserRepository.save(user2);\n\t}",
"private void prepareChecklistFormModel() \n\t{\n\t\tchecklistGroup.clear();\n\t\tSet<ChecklistGroup> groupCollection = checklistService.loadGroups();\n\t\tIterator it = groupCollection.iterator();\n\t\twhile(it.hasNext())\n\t\t{\t\t\t\n\t\t\tChecklistGroup group = (ChecklistGroup) it.next();\n\t\t\tchecklistGroup.add(new ChecklistGroupModel(Integer.toString(group.getId()),\n\t\t\t\t\t\t\t\t\t\t\t\tgroup.getGroupName(),\n\t\t\t\t\t\t\t\t\t\t\t\tchecklistService.loadActivityCollection(Integer.toString(group.getId()))));\t\t \t\n\t\t}\n\t}",
"@BeforeGroup\n public void beforeGroup() {\n }",
"LoadGroup createLoadGroup();",
"@Override\n public void testOneRequiredGroup() {\n }",
"@Override\n public void testOneRequiredGroup() {\n }",
"private void sendGroupInit() {\n \t\ttry {\n \t\t\tmyEndpt=new Endpt(serverName+\"@\"+vsAddress.toString());\n \n \t\t\tEndpt[] view=null;\n \t\t\tInetSocketAddress[] addrs=null;\n \n \t\t\taddrs=new InetSocketAddress[1];\n \t\t\taddrs[0]=vsAddress;\n \t\t\tview=new Endpt[1];\n \t\t\tview[0]=myEndpt;\n \n \t\t\tGroup myGroup = new Group(\"DEFAULT_SERVERS\");\n \t\t\tvs = new ViewState(\"1\", myGroup, new ViewID(0,view[0]), new ViewID[0], view, addrs);\n \n \t\t\tGroupInit gi =\n \t\t\t\tnew GroupInit(vs,myEndpt,null,gossipServers,vsChannel,Direction.DOWN,this);\n \t\t\tgi.go();\n \t\t} catch (AppiaEventException ex) {\n \t\t\tSystem.err.println(\"EventException while launching GroupInit\");\n \t\t\tex.printStackTrace();\n \t\t} catch (NullPointerException ex) {\n \t\t\tSystem.err.println(\"EventException while launching GroupInit\");\n \t\t\tex.printStackTrace();\n \t\t} catch (AppiaGroupException ex) {\n \t\t\tSystem.err.println(\"EventException while launching GroupInit\");\n \t\t\tex.printStackTrace();\n \t\t} \n \t}",
"public void initModel() {\n gunControl.initSmoke();\n }",
"public CreateGroup() {\n initComponents();\n start();\n }",
"private void initializeModel() {\n\t\t\n\t}",
"public final void rule__Model__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:871:1: ( rule__Model__Group__0__Impl rule__Model__Group__1 )\n // InternalMLRegression.g:872:2: rule__Model__Group__0__Impl rule__Model__Group__1\n {\n pushFollow(FOLLOW_3);\n rule__Model__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Model__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"@Test\n public void groupsTest() {\n // TODO: test groups\n }",
"@Override\n public void testTwoRequiredGroups() {\n }",
"@Override\n public void testTwoRequiredGroups() {\n }",
"public static Group initGroupObject(){\n Group test_group = new Group(\"testGroup\");\n return test_group;\n }",
"CsticGroupModel createInstanceOfCsticGroupModel();",
"public final void rule__Model__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:883:1: ( ( () ) )\n // InternalCsv.g:884:1: ( () )\n {\n // InternalCsv.g:884:1: ( () )\n // InternalCsv.g:885:2: ()\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getModelAccess().getModelAction_0()); \n }\n // InternalCsv.g:886:2: ()\n // InternalCsv.g:886:3: \n {\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getModelAccess().getModelAction_0()); \n }\n\n }\n\n\n }\n\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public void addGroup(Group group) {\r\n System.out.println(\"conectado con model ---> metodo addGroup\");\r\n //TODO\r\n }",
"void syncGroup();",
"public final void rule__Model__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2538:1: ( rule__Model__Group__0__Impl rule__Model__Group__1 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2539:2: rule__Model__Group__0__Impl rule__Model__Group__1\n {\n pushFollow(FOLLOW_rule__Model__Group__0__Impl_in_rule__Model__Group__04997);\n rule__Model__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Model__Group__1_in_rule__Model__Group__05000);\n rule__Model__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public void initialize(Model model){\r\n\t\tArrayList<String> elements = new ArrayList<String>();\r\n\t\tfor(int i = 0; i < model.getElements().size(); i++){\r\n\t\t\telements.add(model.getElements().get(i).getId());\r\n\t\t}\r\n\t\t\r\n\t\tFeature base = new Feature(\"base\", \"mandatory\", \"root\", elements);\r\n\t\tthis.mandatoryFeatures.add(base);\r\n\t\tFeatureGroup variants = new FeatureGroup(\"variants\", \"alternative\", \"root\");\r\n\t\tthis.alternativeFeatureGroup.add(variants);\r\n\t\t\r\n\t\t//New 02/12/201/\r\n\t\tFeature newVariant = new Feature(model.getId()+\"_Variant\", \"variant\", this.alternativeFeatureGroup.get(0).getId());\r\n\t\tthis.addVariant(newVariant);\r\n\t\t//-New 02/12/201/\r\n\t}",
"public Set getGroups() { return this.groups; }",
"public abstract ModuleContactGroups contactGroups();",
"public void config(Group[] group) {\n\n }",
"public Technology() {\t\t\r\n\t\tthis.groups = null;\r\n\t}",
"void initializeGroup(GroupType group)\n throws IllegalArgumentException, UnsupportedOperationException;",
"public final void rule__Model__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:452:1: ( ( () ) )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:453:1: ( () )\n {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:453:1: ( () )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:454:1: ()\n {\n before(grammarAccess.getModelAccess().getModelAction_0()); \n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:455:1: ()\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:457:1: \n {\n }\n\n after(grammarAccess.getModelAccess().getModelAction_0()); \n\n }\n\n\n }\n\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"private SettingsGroupManager() {}",
"public void setup(){\n\t\tgui.getCenter().setText(\"No book info is yet available. Submit some!\");\n\t\tconstrain(gui.getGroups());\n\t\t\n\t\tgui.getMasterCheck().selectedProperty().addListener(new ChangeListener<Boolean>() {\n\t\t @Override\n\t\t public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n\t\t for (InputGroup group: gui.getGroups()){\n\t\t \tgroup.getCheck().setSelected(newValue);\n\t\t }\n\t\t }\n\t\t});\n\t}",
"protected void initializeGroups() {\r\n if ((getCriteriaGroup() != null) && (getCriteriaGroup().getItems().isEmpty())) {\r\n getCriteriaGroup().setItems(getCriteriaFields());\r\n }\r\n\r\n if (getResultsGroup() != null) {\r\n if ((getResultsGroup().getItems().isEmpty()) && (getResultFields() != null)) {\r\n getResultsGroup().setItems(getResultFields());\r\n }\r\n\r\n if (getResultsGroup().getCollectionObjectClass() == null) {\r\n getResultsGroup().setCollectionObjectClass(getDataObjectClass());\r\n }\r\n }\r\n\r\n if (getItems().isEmpty()) {\r\n setItems(Arrays.asList(getCriteriaGroup(), getResultsGroup()));\r\n }\r\n }",
"protected DynamicDeviceGroup() {\n\t}",
"public interface IWEGroupManager {\n\n /**\n * Public function called to save a Bundle. This function takes a Bundle\n * name, the sequence of ParmIDs to be saved, and the sequence of available\n * ParmIDs.\n * \n * @param name\n * @param parmIDs\n * @param availableParmIDs\n */\n public abstract void save(String name, ParmID[] parmIDs,\n ParmID[] availableParmIDs);\n\n /**\n * Public function called to delete a Bundle. This function takes a Bundle\n * name.\n * \n * @param name\n */\n public abstract boolean remove(String name);\n\n /**\n * Public function called to get the ParmIDs of a Bundle. This function\n * takes a Bundle name, the sequence of available ParmIDs, and return a list\n * of ParmIDs as saved in the Bundle.\n * \n * @param name\n * @param availableParmIDs\n */\n public abstract ParmID[] getParmIDs(String name, ParmID[] availableParmIDs);\n\n /**\n * Public function called to get the ParmIDs of a Bundle. This function\n * takes bundle text, the sequence of available ParmIDs, and return a list\n * of ParmIDs as saved in the Bundle.\n */\n public abstract ParmID[] getParmIDs(final WEGroup bundle,\n final ParmID[] availableParmIDs);\n\n /**\n * Return a list of the available weather element groups\n * \n * @return the available weather element groups\n */\n public abstract List<String> getInventory();\n\n /**\n * Returns just the user elements groups\n * \n * @return the user elements groups\n */\n public abstract List<String> getUserInventory();\n\n /**\n * Retrieve the default Weather Element group\n * \n * @return the default weather element group\n */\n public abstract String getDefaultGroup();\n\n /**\n * Returns whether or not a particular group is protected or not.\n * \n * @param name\n * The name of the weather element group to check.\n * @return True, if it is protected. False, in all other cases.\n */\n boolean isProtected(String name);\n}",
"protected void prepareModel() {\n model();\n }",
"protected void initModules()\n {\n\n }",
"public final void rule__Model__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2060:1: ( rule__Model__Group__0__Impl rule__Model__Group__1 )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2061:2: rule__Model__Group__0__Impl rule__Model__Group__1\n {\n pushFollow(FOLLOW_rule__Model__Group__0__Impl_in_rule__Model__Group__04407);\n rule__Model__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Model__Group__1_in_rule__Model__Group__04410);\n rule__Model__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"private void instantiate(){\n inputAddressList = new LinkedList<Address>();\n inputGroupList = new LinkedList<Group>();\n root = new Group(\"root\", 0);\n }",
"private void setup(){\n buildTree(2);\n }",
"public final void rule__Model__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:440:1: ( rule__Model__Group__0__Impl rule__Model__Group__1 )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:441:2: rule__Model__Group__0__Impl rule__Model__Group__1\n {\n pushFollow(FOLLOW_rule__Model__Group__0__Impl_in_rule__Model__Group__0890);\n rule__Model__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Model__Group__1_in_rule__Model__Group__0893);\n rule__Model__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public GroupLayoutRonald ()\n {\n groupFunction();\n }",
"public final void rule__Model__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:898:1: ( rule__Model__Group__1__Impl )\n // InternalMLRegression.g:899:2: rule__Model__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Model__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"private void initData() throws Exception {\n runTX(new Callable<Void>() {\n @Override\n public Void call() throws Exception {\n createOrganizationRoles(dm);\n createPaymentTypes(dm);\n createUserRoles(dm);\n supplier = Organizations.createOrganization(dm,\n OrganizationRoleType.SUPPLIER);\n UserGroup defaultGroupSup = new UserGroup();\n defaultGroupSup.setOrganization(supplier);\n defaultGroupSup.setIsDefault(true);\n defaultGroupSup.setName(\"default\");\n dm.persist(defaultGroupSup);\n technologyProvider = Organizations.createOrganization(dm,\n OrganizationRoleType.TECHNOLOGY_PROVIDER);\n UserGroup defaultGroupTP = new UserGroup();\n defaultGroupTP.setOrganization(technologyProvider);\n defaultGroupTP.setIsDefault(true);\n defaultGroupTP.setName(\"default\");\n dm.persist(defaultGroupTP);\n tpAndSup = Organizations.createOrganization(dm,\n OrganizationRoleType.TECHNOLOGY_PROVIDER,\n OrganizationRoleType.SUPPLIER);\n supplierAdminUser = Organizations.createUserForOrg(dm, supplier,\n true, \"admin\");\n supplier2 = Organizations.createOrganization(dm,\n OrganizationRoleType.SUPPLIER);\n UserGroup defaultGroup = new UserGroup();\n defaultGroup.setOrganization(supplier2);\n defaultGroup.setIsDefault(true);\n defaultGroup.setName(\"default\");\n dm.persist(defaultGroup);\n UserGroup defaultGroupTpAndSp = new UserGroup();\n defaultGroupTpAndSp.setOrganization(tpAndSup);\n defaultGroupTpAndSp.setIsDefault(true);\n defaultGroupTpAndSp.setName(\"default\");\n dm.persist(defaultGroupTpAndSp);\n Organizations.createUserForOrg(dm, supplier2, true, \"admin\");\n customer = Organizations.createCustomer(dm, supplier);\n UserGroup defaultGroup1 = new UserGroup();\n defaultGroup1.setOrganization(customer);\n defaultGroup1.setIsDefault(true);\n defaultGroup1.setName(\"default\");\n dm.persist(defaultGroup1);\n customer2 = Organizations.createCustomer(dm, supplier2);\n customerUser = Organizations.createUserForOrg(dm, customer,\n true, \"admin\");\n OrganizationReference onBehalf = new OrganizationReference(\n supplier, customer,\n OrganizationReferenceType.ON_BEHALF_ACTING);\n dm.persist(onBehalf);\n onBehalf = new OrganizationReference(supplier, supplier2,\n OrganizationReferenceType.ON_BEHALF_ACTING);\n dm.persist(onBehalf);\n onBehalf = new OrganizationReference(supplier,\n technologyProvider,\n OrganizationReferenceType.ON_BEHALF_ACTING);\n dm.persist(onBehalf);\n onBehalf = new OrganizationReference(supplier, tpAndSup,\n OrganizationReferenceType.ON_BEHALF_ACTING);\n dm.persist(onBehalf);\n return null;\n }\n });\n }",
"public interface GroupService {\n\n ImGroup createGroup();\n\n}",
"public GroupAccessBean constructGroups() throws Exception {\n\n\tif (groups == null) {\t\n\t\t// Construct groups bean\n\t\tif (getGroupcode() != null) {\n\t\t\tgroups = new GroupAccessBean();\n\t\t\tgroups.setInitKey_division(getGroupcode().intValue());\n\t\t\tgroups.refreshCopyHelper();\n\t\t}\n\t}\n\treturn groups;\n}",
"private void setupModel() {\n\n //Chooses which model gets prepared\n switch (id) {\n case 2:\n singlePackage = new Node();\n activeNode = singlePackage;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.package_solo)\n .build().thenAccept(renderable -> activeRenderable = renderable)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n\n case 3:\n multiPackage = new Node();\n activeNode = multiPackage;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.package_multi_new)\n .build().thenAccept(renderable -> activeRenderable = renderable)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n\n case 4:\n wagonPackage = new Node();\n activeNode = wagonPackage;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.package_car_new)\n .build().thenAccept(a -> activeRenderable = a)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n\n default:\n mailbox = new Node();\n activeNode = mailbox;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.mailbox)\n .build().thenAccept(renderable -> activeRenderable = renderable)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n }\n }",
"private void initialize() {\n\t\troot = new Group();\n\t\tgetProperties();\n\t\tsetScene();\n\t\tsetStage();\n\t\tsetGUIComponents();\n\t}",
"public final void ruleModel() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:73:2: ( ( ( rule__Model__Group__0 ) ) )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:74:1: ( ( rule__Model__Group__0 ) )\n {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:74:1: ( ( rule__Model__Group__0 ) )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:75:1: ( rule__Model__Group__0 )\n {\n before(grammarAccess.getModelAccess().getGroup()); \n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:76:1: ( rule__Model__Group__0 )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:76:2: rule__Model__Group__0\n {\n pushFollow(FOLLOW_rule__Model__Group__0_in_ruleModel94);\n rule__Model__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getModelAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public interface CoreGroup extends AbstractGroup {\r\n}",
"public List<UserGroup> GetActiveGroups() {\n/* 44 */ return this.userDal.GetActiveGroups();\n/* */ }",
"public void populateGroups() {\n new PopulateGroupsTask(this.adapter, this).execute();\n }",
"public Group(){\n\n }",
"public static void initializeGroupMember(Group group){\n\t\tHibernate.initialize(group.getGroupMembers());\n\t}",
"public Group() {\r\n\t}",
"public Group() {\n\n }",
"@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tmFaceManager.createGroup(\"first_group\");\n\t\t\t\t\t\tmResult = mFaceManager.getmResult();\n\t\t\t\t\t}",
"public final void rule__Model__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:871:1: ( rule__Model__Group__0__Impl rule__Model__Group__1 )\n // InternalCsv.g:872:2: rule__Model__Group__0__Impl rule__Model__Group__1\n {\n pushFollow(FOLLOW_4);\n rule__Model__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__Model__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"@Before\n public void setUp() {\n LOG.info(\"===========================================================\");\n module1 = context.mock(Module.class, \"module1\");\n module2 = context.mock(Module.class, \"module2\");\n managerListener = context.mock(ModuleLifecycleManagerListener.class);\n listener = context.mock(ModuleLifecycleListener.class);\n peerGroup = context.mock(PeerGroup.class);\n id = IDFactory.newModuleClassID();\n pgx = new PeerGroupException(\"Hardcoded test exception\");\n\n manager = new ModuleLifecycleManager<Module>();\n manager.addModuleLifecycleManagerListener(managerListener);\n manager.addModuleLifecycleListener(listener);\n }",
"public void initTreeModel() {\n\t\t\n\t}",
"public void initTreeModel() {\n\t\t\n\t}",
"@SideOnly(Side.CLIENT)\n public static void initModels() {\n }",
"public final void rule__Model__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2574:1: ( rule__Model__Group__1__Impl )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2575:2: rule__Model__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__Model__Group__1__Impl_in_rule__Model__Group__15074);\n rule__Model__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Model__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2089:1: ( rule__Model__Group__1__Impl rule__Model__Group__2 )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2090:2: rule__Model__Group__1__Impl rule__Model__Group__2\n {\n pushFollow(FOLLOW_rule__Model__Group__1__Impl_in_rule__Model__Group__14468);\n rule__Model__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Model__Group__2_in_rule__Model__Group__14471);\n rule__Model__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"private void createNewGroup() {\r\n if(selectedNode != null) { \r\n DefaultMutableTreeNode nextNode = (DefaultMutableTreeNode)selectedNode.getNextNode();\r\n if(selectedNode.isLeaf() && !selectedNode.getAllowsChildren()) {\r\n CoeusOptionPane.showInfoDialog(coeusMessageResources.parseMessageKey(\"maintainSponsorHierarchy_exceptionCode.1254\"));\r\n return;\r\n } else if(selTreePath.getPathCount() == 10) {\r\n CoeusOptionPane.showInfoDialog(coeusMessageResources.parseMessageKey(\"maintainSponsorHierarchy_exceptionCode.1255\"));\r\n return;\r\n }else if (nextNode != null && nextNode.isLeaf()) {\r\n CoeusOptionPane.showInfoDialog(\"The group '\"+selectedNode.toString()+\"' has sponsors assigned to it. \\nCannot create subgroups for this group.\");\r\n return;\r\n }else {\r\n nextNode = new DefaultMutableTreeNode(\"New Group - \"+(selectedNode.getLevel()+1)+\".\"+selectedNode.getChildCount(),true);\r\n model.insertNodeInto(nextNode, selectedNode, selectedNode.getChildCount());\r\n TreePath newSelectionPath = selTreePath.pathByAddingChild(nextNode);\r\n sponsorHierarchyTree.clearSelection();\r\n sponsorHierarchyTree.addSelectionPath(newSelectionPath);\r\n sponsorHierarchyTree.startEditingAtPath(newSelectionPath);\r\n newGroup = true;\r\n saveRequired = true;\r\n }\r\n }\r\n }",
"PlayerGroup createPlayerGroup();",
"public static void main(String[] args)\n\t{\n\t\tGroupSynchronization groupSynchronization = new GroupSynchronization();\n\t\tGroup group\t\t\t= new Group();\n\t\t\n//\t\tGroupInfo subNodeGroupInfo\t= new GroupInfo();\n//\t\tsubNodeGroupInfo.setGroupName(\"组一\");\n//\t\tsubNodeGroupInfo.setGroupFullname(\"集团公司.省公司.市公司一.公司一部门二.组一\");\n//\t\tsubNodeGroupInfo.setGroupParentid(\"000000000600007\");\n//\t\tsubNodeGroupInfo.setGroupType(\"0\");\n//\t\tsubNodeGroupInfo.setGroupOrderBy(\"1\");\n//\t\tsubNodeGroupInfo.setGroupPhone(\"1111111\");\n//\t\tsubNodeGroupInfo.setGroupFax(\"1111111\");\n//\t\tsubNodeGroupInfo.setGroupStatus(\"0\");\n//\t\tsubNodeGroupInfo.setGroupCompanyid(\"000000000600004\");\n//\t\tsubNodeGroupInfo.setGroupCompanytype(\"3\");\n//\t\tsubNodeGroupInfo.setGroupDesc(\"1\");\n//\t\tsubNodeGroupInfo.setGroupIntId(600009);\n//\t\tsubNodeGroupInfo.setGroupDnId(\"0;000000000600002;000000000600003;000000000600004;000000000600007;000000000600009;\");\n//\t\t\n//\t\tgroupSynchronization.modifySynchronization(\"000000000600009\",subNodeGroupInfo);\n//\t\tgroup.modifyGroup(subNodeGroupInfo,\"000000000600009\");\n\t\t\n\t\tGroupInfo subNodeGroupInfo\t= new GroupInfo();\n\t\tsubNodeGroupInfo.setGroupName(\"公司一部门二\");\n\t\tsubNodeGroupInfo.setGroupFullname(\"集团公司.省公司.省公司部门一.公司一部门二\");\n\t\tsubNodeGroupInfo.setGroupParentid(\"000000000600008\");\n\t\tsubNodeGroupInfo.setGroupType(\"3\");\n\t\tsubNodeGroupInfo.setGroupOrderBy(\"1\");\n\t\tsubNodeGroupInfo.setGroupPhone(\"1111111\");\n\t\tsubNodeGroupInfo.setGroupFax(\"1111111\");\n\t\tsubNodeGroupInfo.setGroupStatus(\"0\");\n\t\tsubNodeGroupInfo.setGroupCompanyid(\"000000000600003\");\n\t\tsubNodeGroupInfo.setGroupCompanytype(\"1\");\n\t\tsubNodeGroupInfo.setGroupDesc(\"1\");\n\t\tsubNodeGroupInfo.setGroupIntId(600007);\n\t\tsubNodeGroupInfo.setGroupDnId(\"0;000000000600002;000000000600003;000000000600008;000000000600007;\");\n\t\t\n\t\tgroupSynchronization.modifySynchronization(\"000000000600007\",subNodeGroupInfo);\n\t\tgroup.modifyGroup(subNodeGroupInfo,\"000000000600007\");\n\t}",
"public void ensureInitialized() {\r\n\t\ttry {\r\n\t\t\tif (this.getGroup() != null)\r\n\t\t\t\t// Success\r\n\t\t\t\treturn;\r\n\t\t} catch (EJBException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tUtil.redirectToRoot();\r\n\t}",
"protected abstract Group createIface ();",
"public void setGroup(entity.Group value);",
"private void initialize() {\r\n\t\t//For the library model\r\n\t\tEObject eObject=ModelPersisterHelper.modelLoader();\r\n\t\tLibrary library=null;\r\n\t\tif(eObject instanceof Library){\r\n\t\t\tlibrary=(Library)eObject;\r\n\t\t}\r\n\t\tinvisibleRoot = new TreeParent(\"\");\r\n\t\tinvisibleRoot.addChild(library);\r\n\t}",
"private void readGroups(List<Element> groupElements, Model model)\n throws ObjectExistsException {\n // Add the groups.\n for (int i = 0; i < groupElements.size(); i++) {\n Element curGroupElement = groupElements.get(i);\n Integer groupID;\n try {\n groupID = Integer.valueOf(curGroupElement.getAttributeValue(\"id\"));\n }\n catch (NumberFormatException e) {\n groupID = null;\n }\n Group curGroup = model.createGroup(groupID);\n TCSObjectReference<Group> groupRef = curGroup.getReference();\n String groupName = curGroupElement.getAttributeValue(\"name\");\n if (groupName == null || groupName.isEmpty()) {\n groupName = \"GroupName\" + i + \"Unknown\";\n }\n model.getObjectPool().renameObject(curGroup.getReference(), groupName);\n // Add members.\n List<Element> memberElements = curGroupElement.getChildren(\"member\");\n for (int j = 0; j < memberElements.size(); j++) {\n Element curMemberElement = memberElements.get(j);\n String memberName = curMemberElement.getAttributeValue(\"name\");\n if (memberName == null || memberName.isEmpty()) {\n memberName = \"MemberName\" + j + \"Unknown\";\n }\n TCSObject<?> curMember = model.getObjectPool().getObject(memberName);\n curGroup.addMember(curMember.getReference());\n }\n List<Element> properties = curGroupElement.getChildren(\"property\");\n for (int k = 0; k < properties.size(); k++) {\n Element curPropElement = properties.get(k);\n String curKey = curPropElement.getAttributeValue(\"name\");\n if (curKey == null || curKey.isEmpty()) {\n curKey = \"Key\" + k + \"Unknown\";\n }\n String curValue = curPropElement.getAttributeValue(\"value\");\n if (curValue == null || curValue.isEmpty()) {\n curValue = \"Value\" + k + \"Unknown\";\n }\n model.getObjectPool().setObjectProperty(groupRef, curKey, curValue);\n }\n }\n }",
"@org.junit.Before\n public void setUp() throws Exception {\n theModel = new Model();\n }",
"private void group(String[] args){\n String name;\n \n switch(args[1]){\n case \"view\":\n this.checkArgs(args,2,2);\n ms.listGroups(this.groups);\n break;\n case \"add\":\n this.checkArgs(args,3,2);\n name = args[2];\n db.createGroup(name);\n break;\n case \"rm\":\n this.checkArgs(args,3,2);\n name = args[2];\n Group g = this.findGroup(name);\n if(g == null)\n ms.err(4);\n db.removeGroup(g);\n break;\n default:\n ms.err(3);\n break;\n }\n }",
"public final void rule__Model__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:471:1: ( rule__Model__Group__1__Impl rule__Model__Group__2 )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:472:2: rule__Model__Group__1__Impl rule__Model__Group__2\n {\n pushFollow(FOLLOW_rule__Model__Group__1__Impl_in_rule__Model__Group__1951);\n rule__Model__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Model__Group__2_in_rule__Model__Group__1954);\n rule__Model__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"private void setupAllMafiosis()\n {\n }",
"public final void ruleModel() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:73:2: ( ( ( rule__Model__Group__0 ) ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:74:1: ( ( rule__Model__Group__0 ) )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:74:1: ( ( rule__Model__Group__0 ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:75:1: ( rule__Model__Group__0 )\n {\n before(grammarAccess.getModelAccess().getGroup()); \n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:76:1: ( rule__Model__Group__0 )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:76:2: rule__Model__Group__0\n {\n pushFollow(FOLLOW_rule__Model__Group__0_in_ruleModel94);\n rule__Model__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getModelAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"@Override\n\tpublic void setup (ServerGroup the_sg) {\n\t\tsuper.setup (the_sg);\n\n\t\tforce_primary = 0;\n\n\t\treturn;\n\t}",
"@Override\n protected void initModel() {\n bannerModel = new BannerModel();\n// homeSousuoModel = new Home\n\n// bannerModel = new BannerModel();\n// homeSousuoModel = new HomeSousuoModel();\n// izxListModelBack = new\n }",
"@Before\n\tpublic void setUp() {\n\t\tSpriteStore mockSpriteStore = mock(SpriteStore.class);\n\t\tboardFactory = new BoardFactory(mockSpriteStore);\n\t\tmockGroup = mock(javafx.scene.Group.class);\n\t\twhen(mockGroup.getChildren()).thenReturn(mock(ObservableList.class));\n\n\t}",
"@Before\n public void prepare() throws Exception{\n systemController = new SystemControllerImpl();\n //List<Node> inputNodes = NodeDataGenerator.generate(3, 5);\n List<Node> inputNodes = NodeDataGenerator.generateFixedReal();\n inputNodes.forEach(node -> systemController.addNode(node));\n }",
"Build_Model() {\n\n }",
"public void checkInit() {\r\n super.checkInit();\r\n ValidationUtility.checkNotNull(groupService, \"groupService\",\r\n SecurityGroupsActionConfigurationException.class);\r\n }",
"public interface GroupService {\n}",
"public interface GroupService {\n}",
"GroupsType createGroupsType();",
"public void toolGroupsAdded(String name, List<ToolGroup> groups) {\r\n try {\r\n a.toolGroupsAdded(name, groups);\r\n } catch(Exception e) {\r\n I18nManager intl_mgr = I18nManager.getManager();\r\n String msg = intl_mgr.getString(GROUPS_ADD_ERR_PROP) + a;\r\n\r\n errorReporter.errorReport(msg, e);\r\n }\r\n\r\n try {\r\n b.toolGroupsAdded(name, groups);\r\n } catch(Exception e) {\r\n I18nManager intl_mgr = I18nManager.getManager();\r\n String msg = intl_mgr.getString(GROUPS_ADD_ERR_PROP) + b;\r\n\r\n errorReporter.errorReport(msg, e);\r\n }\r\n }",
"public void modifyGroup(String id) {\r\n //TODO\r\n System.out.println(\"conectado con model ---> metodo modifyGroup\");\r\n }",
"private void createGroupsForBranchPoints(SignalGroupsData signalGroups) {\n Id<SignalSystem> idSystem2 = Id.create(\"signalSystem2\", SignalSystem.class);\r\n\t\tSignalGroupData groupLeftTurn12 = signalGroups.getFactory().createSignalGroupData(idSystem2, \r\n\t\t\t\tId.create(\"signalLeftTurn1_2\", SignalGroup.class));\r\n\t\tgroupLeftTurn12.addSignalId(Id.create(\"signal1_2.2_3\", Signal.class));\r\n\t\tsignalGroups.addSignalGroupData(groupLeftTurn12);\r\n\r\n\t\tSignalGroupData groupLeftTurn72 = signalGroups.getFactory().createSignalGroupData(idSystem2, \r\n\t\t\t\tId.create(\"signalLeftTurn7_2\", SignalGroup.class));\r\n\t\tgroupLeftTurn72.addSignalId(Id.create(\"signal7_2.2_1\", Signal.class));\r\n\t\tsignalGroups.addSignalGroupData(groupLeftTurn72);\r\n\t\t\r\n\t\tSignalGroupData groupRightTurns1232 = signalGroups.getFactory().createSignalGroupData(idSystem2, \r\n\t\t\t\tId.create(\"signalRightTurns2\", SignalGroup.class));\r\n\t\tgroupRightTurns1232.addSignalId(Id.create(\"signal1_2.2_7\", Signal.class));\r\n\t\tgroupRightTurns1232.addSignalId(Id.create(\"signal3_2.2_1\", Signal.class));\r\n\t\tsignalGroups.addSignalGroupData(groupRightTurns1232);\r\n\t\t\r\n\t\t// create groups for system 5\r\n\t\tId<SignalSystem> idSystem5 = Id.create(\"signalSystem5\", SignalSystem.class);\r\n\t\tSignalGroupData groupLeftTurn65 = signalGroups.getFactory().createSignalGroupData(idSystem5, \r\n\t\t\t\tId.create(\"signalLeftTurn6_5\", SignalGroup.class));\r\n\t\tgroupLeftTurn65.addSignalId(Id.create(\"signal6_5.5_8\", Signal.class));\r\n\t\tsignalGroups.addSignalGroupData(groupLeftTurn65);\r\n\r\n\t\tSignalGroupData groupLeftTurn45 = signalGroups.getFactory().createSignalGroupData(idSystem5, \r\n\t\t\t\tId.create(\"signalLeftTurn4_5\", SignalGroup.class));\r\n\t\tgroupLeftTurn45.addSignalId(Id.create(\"signal4_5.5_6\", Signal.class));\r\n\t\tsignalGroups.addSignalGroupData(groupLeftTurn45);\r\n\t\t\r\n\t\tSignalGroupData groupRightTurns6585 = signalGroups.getFactory().createSignalGroupData(idSystem5, \r\n\t\t\t\tId.create(\"signalRightTurns5\", SignalGroup.class));\r\n\t\tgroupRightTurns6585.addSignalId(Id.create(\"signal6_5.5_4\", Signal.class));\r\n\t\tgroupRightTurns6585.addSignalId(Id.create(\"signal8_5.5_6\", Signal.class));\r\n\t\tsignalGroups.addSignalGroupData(groupRightTurns6585);\r\n\t\t\r\n\t\tif (TtCreateParallelNetworkAndLanes.checkNetworkForSecondODPair(this.scenario.getNetwork())) {\r\n\t\t\t// create groups for system 10\r\n\t\t\tId<SignalSystem> idSystem10 = Id.create(\"signalSystem10\", SignalSystem.class);\r\n\t\t\tSignalGroupData groupLeftTurn910 = signalGroups.getFactory().createSignalGroupData(idSystem10, \r\n\t\t\t\t\tId.create(\"signalLeftTurn9_10\", SignalGroup.class));\r\n\t\t\tgroupLeftTurn910.addSignalId(Id.create(\"signal9_10.10_4\", Signal.class));\r\n\t\t\tsignalGroups.addSignalGroupData(groupLeftTurn910);\r\n\r\n\t\t\tSignalGroupData groupLeftTurn310 = signalGroups.getFactory().createSignalGroupData(idSystem10, \r\n\t\t\t\t\tId.create(\"signalLeftTurn3_10\", SignalGroup.class));\r\n\t\t\tgroupLeftTurn310.addSignalId(Id.create(\"signal3_10.10_9\", Signal.class));\r\n\t\t\tsignalGroups.addSignalGroupData(groupLeftTurn310);\r\n\t\t\t\r\n\t\t\tSignalGroupData groupRightTurns910410 = signalGroups.getFactory().createSignalGroupData(idSystem10, \r\n\t\t\t\t\tId.create(\"signalRightTurns10\", SignalGroup.class));\r\n\t\t\tgroupRightTurns910410.addSignalId(Id.create(\"signal9_10.10_3\", Signal.class));\r\n\t\t\tgroupRightTurns910410.addSignalId(Id.create(\"signal4_10.10_9\", Signal.class));\r\n\t\t\tsignalGroups.addSignalGroupData(groupRightTurns910410);\r\n\t\t\t\r\n\t\t\t// create groups for system 11\r\n\t\t\tId<SignalSystem> idSystem11 = Id.create(\"signalSystem11\", SignalSystem.class);\r\n\t\t\tSignalGroupData groupLeftTurn1211 = signalGroups.getFactory().createSignalGroupData(idSystem11, \r\n\t\t\t\t\tId.create(\"signalLeftTurn12_11\", SignalGroup.class));\r\n\t\t\tgroupLeftTurn1211.addSignalId(Id.create(\"signal12_11.11_7\", Signal.class));\r\n\t\t\tsignalGroups.addSignalGroupData(groupLeftTurn1211);\r\n\r\n\t\t\tSignalGroupData groupLeftTurn811 = signalGroups.getFactory().createSignalGroupData(idSystem11, \r\n\t\t\t\t\tId.create(\"signalLeftTurn8_11\", SignalGroup.class));\r\n\t\t\tgroupLeftTurn811.addSignalId(Id.create(\"signal8_11.11_12\", Signal.class));\r\n\t\t\tsignalGroups.addSignalGroupData(groupLeftTurn811);\r\n\t\t\t\r\n\t\t\tSignalGroupData groupRightTurns1211711 = signalGroups.getFactory().createSignalGroupData(idSystem11, \r\n\t\t\t\t\tId.create(\"signalRightTurns11\", SignalGroup.class));\r\n\t\t\tgroupRightTurns1211711.addSignalId(Id.create(\"signal12_11.11_8\", Signal.class));\r\n\t\t\tgroupRightTurns1211711.addSignalId(Id.create(\"signal7_11.11_12\", Signal.class));\r\n\t\t\tsignalGroups.addSignalGroupData(groupRightTurns1211711);\r\n\t\t}\r\n\t}",
"public void init() {\n\t\t\n\t\tdebugPrintln(\"Doing init.\");\n\t\t\n\t\t// can sanity check some things by requesting notification when nodes\n\t\t// are created/deleted/etc.\n\t\t// It does not notify when playBufs reach the end of a buffer, though.\n\t\t// Too bad, that. Would have to poll.\n\t\tsendMessage(\"/notify\", new Object[] { 1 });\n\n\t\t//start by cleaning up any detritus from previous runs on the same server:\n\t\tcleanup();\n\n\t\t//sclang creates the default group, not supercollider, so let's follow that convention.\n\t\tcreateGroup(1, 0);\n\n\t\t// create a mother group, under the default group (1),\n\t\t// which will contain all of the SCSoundControl objects.\n\t\t//this is where we would query if another node == _motherGroupID already exists.\n\t\t//if so, would need to choose an alternate groupID (e.g. += 10000)\n\t\tcreateGroup(_motherGroupID, 1);\n\t\t\n\t}",
"public boolean createGroup(GroupsGen group) {\n \n super.create(group);\n return true;\n }",
"@RequestMapping(value = {\"/admin2543/view_component_groups\"}, method = RequestMethod.GET)\n public String view_component_groups(Model model) { \n List<ComponentGroup> componentGroups = componentGroupDAO.getAllComponentGroups();\n \n model.addAttribute(\"componentGroup\", new ComponentGroup());\n model.addAttribute(\"componentsGroup\", componentGroups);\n return \"admin2543/component_group\";\n }",
"GamifiedmodellingobjectmodelFactory getGamifiedmodellingobjectmodelFactory();",
"public void visitGroup(Group group) {\n\t}",
"@AfterGroup\n public void afterGroup() {\n }",
"private void createCommonGroupForBranchPoints(SignalGroupsData signalGroups) {\n SignalGroupData group2 = signalGroups.getFactory().createSignalGroupData(Id.create(\"signalSystem2\", SignalSystem.class), \r\n\t\t\t\tId.create(\"signal2\", SignalGroup.class));\r\n\t\tgroup2.addSignalId(Id.create(\"signal1_2.2_3\", Signal.class));\r\n\t\tgroup2.addSignalId(Id.create(\"signal7_2.2_1\", Signal.class));\r\n\t\tgroup2.addSignalId(Id.create(\"signal1_2.2_7\", Signal.class));\r\n\t\tgroup2.addSignalId(Id.create(\"signal3_2.2_1\", Signal.class));\r\n\t\tsignalGroups.addSignalGroupData(group2);\r\n\t\t\r\n\t\t// create groups for system 5\r\n\t\tSignalGroupData group5 = signalGroups.getFactory().createSignalGroupData(Id.create(\"signalSystem5\", SignalSystem.class), \r\n\t\t\t\tId.create(\"signal5\", SignalGroup.class));\r\n\t\tgroup5.addSignalId(Id.create(\"signal6_5.5_8\", Signal.class));\r\n\t\tgroup5.addSignalId(Id.create(\"signal4_5.5_6\", Signal.class));\r\n\t\tgroup5.addSignalId(Id.create(\"signal6_5.5_4\", Signal.class));\r\n\t\tgroup5.addSignalId(Id.create(\"signal8_5.5_6\", Signal.class));\r\n\t\tsignalGroups.addSignalGroupData(group5);\r\n\t\t\r\n\t\tif (TtCreateParallelNetworkAndLanes.checkNetworkForSecondODPair(this.scenario.getNetwork())) {\r\n\t\t\t// create groups for system 10\r\n\t\t\tSignalGroupData group10 = signalGroups.getFactory().createSignalGroupData(Id.create(\"signalSystem10\", SignalSystem.class), \r\n\t\t\t\t\tId.create(\"signal10\", SignalGroup.class));\r\n\t\t\tgroup10.addSignalId(Id.create(\"signal9_10.10_4\", Signal.class));\r\n\t\t\tgroup10.addSignalId(Id.create(\"signal3_10.10_9\", Signal.class));\r\n\t\t\tgroup10.addSignalId(Id.create(\"signal9_10.10_3\", Signal.class));\r\n\t\t\tgroup10.addSignalId(Id.create(\"signal4_10.10_9\", Signal.class));\r\n\t\t\tsignalGroups.addSignalGroupData(group10);\r\n\r\n\t\t\t// create groups for system 11\r\n\t\t\tSignalGroupData group11 = signalGroups.getFactory().createSignalGroupData(Id.create(\"signalSystem11\", SignalSystem.class), \r\n\t\t\t\t\tId.create(\"signal11\", SignalGroup.class));\r\n\t\t\tgroup11.addSignalId(Id.create(\"signal12_11.11_7\", Signal.class));\r\n\t\t\tgroup11.addSignalId(Id.create(\"signal8_11.11_12\", Signal.class));\r\n\t\t\tgroup11.addSignalId(Id.create(\"signal12_11.11_8\", Signal.class));\r\n\t\t\tgroup11.addSignalId(Id.create(\"signal7_11.11_12\", Signal.class));\r\n\t\t\tsignalGroups.addSignalGroupData(group11);\r\n\t\t}\r\n\t}",
"public Group()\r\n {\r\n endpoints = new ArrayList<>();\r\n name = \"NewGroup\";\r\n }",
"public com.ext.portlet.model.ModelInputGroup create(long modelInputGroupPK);",
"public interface Group {\n\n void saveGroup(ServiceCallback<Group> callback);\n\n String getId();\n\n String getName();\n\n void setName(String name);\n\n String getCoverUrl();\n\n void setCoverImage(Bitmap bitmap);\n\n List<User> getUsers();\n\n void fetchUsers(ServiceCallback<Group> callback);\n\n List<User> getAdmins();\n\n void fetchAdmins(ServiceCallback<Group> callback);\n}",
"public final void rule__System__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2352:1: ( rule__System__Group__0__Impl rule__System__Group__1 )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2353:2: rule__System__Group__0__Impl rule__System__Group__1\n {\n pushFollow(FOLLOW_rule__System__Group__0__Impl_in_rule__System__Group__04985);\n rule__System__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__System__Group__1_in_rule__System__Group__04988);\n rule__System__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"void setUpLinearManager();",
"private void setGroupMapping(List<CommandGroupModel> commandGroups) {\n for (CommandGroupModel commandGroupModel : commandGroups) {\n for (FlamingoCommand command : commandGroupModel.getCommandList()) {\n if (!command.isToggle()) {\n throw new IllegalStateException(\"Gallery command must be toggle\");\n }\n if (command.getToggleGroup() != null) {\n throw new IllegalStateException(\n \"Gallery toggle command should not be associated with a toggle group\");\n }\n }\n }\n\n this.commandGroups = new ArrayList<>();\n boolean hasGroupWithNullTitle = false;\n for (CommandGroupModel commandGroupModel : commandGroups) {\n if (commandGroupModel.getTitle() == null) {\n if (hasGroupWithNullTitle) {\n throw new IllegalArgumentException(\n \"Can't have more than one ribbon gallery group with null name\");\n }\n hasGroupWithNullTitle = true;\n }\n\n this.commandGroups.add(commandGroupModel);\n // add all the commands to this gallery (creating a UI representation for each command)\n for (FlamingoCommand command : commandGroupModel.getCommandList()) {\n this.addGalleryCommand(command);\n }\n }\n }",
"private GroupActionHome( )\n {\n }"
] |
[
"0.64963186",
"0.6097364",
"0.60769016",
"0.6067368",
"0.59806705",
"0.59680915",
"0.59680915",
"0.5959035",
"0.5949937",
"0.59470737",
"0.5920496",
"0.5874956",
"0.58508056",
"0.582448",
"0.582448",
"0.58172095",
"0.58082837",
"0.5767766",
"0.57325417",
"0.5700228",
"0.56944877",
"0.5678806",
"0.5654254",
"0.5641932",
"0.5638529",
"0.56359714",
"0.5633811",
"0.5629288",
"0.5625444",
"0.5622931",
"0.5603388",
"0.5593155",
"0.5592585",
"0.55918825",
"0.5540991",
"0.5537112",
"0.55359125",
"0.553515",
"0.55192703",
"0.5487973",
"0.54850435",
"0.54836196",
"0.5473906",
"0.5468958",
"0.5468656",
"0.5464385",
"0.5454903",
"0.5452764",
"0.54503196",
"0.54469454",
"0.544544",
"0.54447603",
"0.54447377",
"0.5438917",
"0.54366523",
"0.54355466",
"0.5422177",
"0.5411348",
"0.5411348",
"0.541116",
"0.54111487",
"0.5409627",
"0.5405828",
"0.5404877",
"0.5401994",
"0.5371122",
"0.5362424",
"0.53610253",
"0.5343998",
"0.53271705",
"0.53183573",
"0.531374",
"0.53111035",
"0.5311095",
"0.52978235",
"0.52971935",
"0.5296222",
"0.5294128",
"0.5285885",
"0.52854234",
"0.5282414",
"0.5281341",
"0.5281341",
"0.527721",
"0.5274238",
"0.5262483",
"0.5259425",
"0.52345496",
"0.5233959",
"0.52298087",
"0.52280384",
"0.52215815",
"0.52160835",
"0.52128094",
"0.5204888",
"0.52006847",
"0.5200035",
"0.5197251",
"0.51961786",
"0.5195294",
"0.5188855"
] |
0.0
|
-1
|
Number of models currently loaded.
|
public int getNumModels() {
return models.size();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public int size() {\n return models.size();\n }",
"public long getModelCount() throws StorageIOException {\n try {\n return this.databaseHelper.getDao(ModelDB.class).countOf();\n } catch (SQLException e) {\n throw new StorageIOException(\"Failed to get models' count\", e);\n }\n }",
"public int getCount() {\n return gdModels.size();\n }",
"public int getModelSize()\n\t{\n\t\treturn this.model.listStatements().toList().size();\n\t}",
"@Override\n public long size() {\n return model.size();\n }",
"public int getObjectCount() {\n\t\treturn objects.size(); // Replace with your code\n\t}",
"public static int numberObjects()\r\n\t{\r\n\t\treturn(no_of_obj);\r\n\t}",
"public int getNumbObjects()\n\t{\n\t\treturn this.numObjects;\n\t}",
"public int size() {\n resolveAll();\n return resolvedPojos.size();\n }",
"public int getNumObjects(){\n return numObjects;\n }",
"public int getNumEntities()\n\t{\n\t\treturn this.entities.size();\n\t}",
"public int loadedPlayers(){\n return playerMap.size();\n }",
"public int getPredictionsCount() {\n if (predictionsBuilder_ == null) {\n return predictions_.size();\n } else {\n return predictionsBuilder_.getCount();\n }\n }",
"@Override\n\t\t\t\tpublic int getModelRowCount() {\n\t\t\t\t\treturn model.getListaBase().size();\n\t\t\t\t}",
"public int size() {\n\t\treturn trainlist.size();\n\t}",
"public int size() {\n\t\treturn _modules.size();\n\t}",
"public final int getDependentCount() {\r\n synchronized (f_seaLock) {\r\n return f_dependents.size();\r\n }\r\n }",
"public static int getControllerCacheCount() {\r\n if (!_cacheControllers)\r\n return 0;\r\n return _controllerCache.size();\r\n }",
"public int getNumInstances() {\n return this.train_values.get(0).length;\n }",
"public int getNrOfAssociations() {\n int size = 0;\n for (PriorityCollection associations : memory.values()) {\n size += associations.size();\n }\n return size;\n }",
"@Override\n\tpublic int size()\n\t{\n\t\tint count = 0;\n\t\tfor (Variable var : FactorGraphIterables.variables(rootGraph()))\n\t\t{\n\t\t\tif (var.getPrior() != null)\n\t\t\t{\n\t\t\t\t++count;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}",
"public long getInstancesSeen() {\n\t\treturn this.getLearningNode().getInstancesSeen();\n\t}",
"public int getNumResources() {\n \t\tint count = 0;\n \t\tfor (int i = 0; i < resources.length; i++)\n \t\t\tcount += resources[i];\n \n \t\treturn count;\n \t}",
"public int getCount() {\n return objects.size();\n }",
"public int getNumOfRecords() {\n return records.size();\n }",
"public synchronized int getPersistentCount() {\n return _persistent.size();\n }",
"protected int numGenes() {\n\t\treturn genes.size();\n\t}",
"public int getCount() {\n\t\t\treturn mApplications.size();\n\t\t}",
"public int getResourcesCount() {\n return resources_.size();\n }",
"public int getLoadMoreViewCount() {\n if (mRequestLoadMoreListener == null || !mLoadMoreEnable) {\n return 0;\n }\n if (!mNextLoadEnable && mLoadMoreView.isLoadEndMoreGone()) {\n return 0;\n }\n if (mData.size() == 0) {\n return 0;\n }\n return 1;\n }",
"public int getTextureCount()\n\t{\n\t\treturn textures.length;\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public int getBootclasspathCount() {\n return bootclasspath_.size();\n }",
"public int getBootclasspathCount() {\n return bootclasspath_.size();\n }",
"public int getRequestsCount() {\n return instance.getRequestsCount();\n }",
"public int getResourcesCount() {\n return resources_.size();\n }",
"public int getCount() {\n return cp.getmImageIds(gridType).length;\n\n }",
"public int getItemCount() {\r\n\t\treturn listModel.size();\r\n\t}",
"public int getNumOfClasses();",
"public Integer getNumberOfLoadedMolecules() {\n if(result == null){\n return 0;\n }\n return result.getNumberOfMolecules();\n }",
"public int getImageCount() {\n return this.imageViews.length;\n }",
"public static int getCount() {\r\n\t\treturn count;\r\n\t}",
"public static int getCount() {\r\n\t\treturn count;\r\n\t}",
"public static int getCount() {\r\n\t\treturn count;\r\n\t}",
"public int getNumPersons() {\r\n\t\treturn this.persons.size();\r\n\t}",
"public static int count() {\n\t\treturn definitions.length;\n\t}",
"public int getRequestsCount() {\n return requests_.size();\n }",
"public int getCount() {\r\n\t\t\treturn ((HerdinatorApplication) getApplication()).imageIDs.length;\r\n\t\t}",
"public int countPoolMaps(){\n\n\t\treturn poolMaps.size();\n\t}",
"int getViewsCount();",
"public int getNbVehicles() {\n\t\t\treturn K;\r\n\t\t}",
"public int getCount() {\n return definition.getInteger(COUNT, 1);\n }",
"public int getNumProbes()\r\n\t{\r\n\t\treturn numProbes;\r\n\t}",
"public static int getSize() {\n\n\t\treturn strategyChain.size();\n\t}",
"int getFeaturesCount();",
"public int getSize() {\n\t\t\treturn objects.size();\n\t\t}",
"public int size() {\n return neurons.size();\n }",
"public int getCount() {\n\t\treturn Dispatch.get(object, \"Count\").getInt();\n\t}",
"public int getRequestsCount() {\n return requests_.size();\n }",
"int getTablesCount();",
"public int getCount() {\n\t\t\treturn appList.size();\n\t\t}",
"public int getInstanceCount() {\n return instanceCount;\n }",
"public int getInstanceCount() {\n return instanceCount;\n }",
"public int count()\r\n {\r\n return this.classNameToJavaSourceFileMap.size();\r\n }",
"public int getNumIncludedApplications()\n {\n return getIncludedApplications().size();\n }",
"protected long getObjectCount() {\r\n return objectCount;\r\n }",
"int getExperimentsCount();",
"@java.lang.Override\n public int getPredictionsCount() {\n return predictions_.size();\n }",
"public static int getTabViewCount() {\n return tabViews.size();\n }",
"public int getNumberOfItemObjects() {\r\n\t\treturn itemFileVersions.size();\r\n\t}",
"public final int getKnownCount()\r\n {\r\n return knownCount;\r\n }",
"public int getActiveDownloads() {\r\n return downloadControllers.size();\r\n }",
"public static synchronized int size() {\n\t\treturn ClassRegistry.dictionary.size();\n\t}",
"public int getSeenInfoCount() {\n return instance.getSeenInfoCount();\n }",
"public int getResumesCount() {\n return resumes_.size();\n }",
"public int numberOfOpenSites() {\n \treturn num;\r\n }",
"public int getScenesSize() {\r\n\t\treturn scenes.size();\r\n\t}",
"public int numberOfFeatures(){\n\t\treturn indexByFeature.keySet().size();\n\t}",
"public int getCount() {\n\t\t\treturn list.size();\r\n\t\t}",
"public int getRelationsCount() {\n return relationsCount;\n }",
"static public int numberOfPersons() {\n return personMap.size();\n }",
"public int numberOfOpenSites() {\n return count;\n }",
"public static int count() {\n return segmentList.size();\n }",
"public int size() {\n\t\t\treturn gameObjects.size();\n\t\t}",
"public int getFeaturesCount();",
"public void updateNumberOfVehicles() {\r\n numberOfVehicles = getVehicles().size();\r\n }",
"public static int getCount() {\n\t\treturn count;\n\t}",
"public int size() {\n\t\treturn vehicles.size();\n\t}",
"long countPostings() {\n \tlong result = 0;\n \tfor (Layer layer : layers.values())\n \t\tresult += layer.size();\n \treturn result;\n }",
"int getBootclasspathCount();",
"int getBootclasspathCount();"
] |
[
"0.78277063",
"0.730931",
"0.7215195",
"0.68394876",
"0.67094404",
"0.64984846",
"0.64588875",
"0.6456787",
"0.63681036",
"0.63383406",
"0.63212496",
"0.6317657",
"0.6315336",
"0.6304929",
"0.6293023",
"0.6277863",
"0.6238216",
"0.6229791",
"0.62236285",
"0.62168074",
"0.62008214",
"0.6199367",
"0.6193485",
"0.6183808",
"0.6167129",
"0.6135121",
"0.61330837",
"0.61239094",
"0.61160576",
"0.6114998",
"0.6114121",
"0.6111764",
"0.6111764",
"0.6111764",
"0.6111764",
"0.6111764",
"0.6111764",
"0.6111764",
"0.6111764",
"0.6111764",
"0.6111764",
"0.6109577",
"0.61069494",
"0.6102097",
"0.6102",
"0.609146",
"0.60834265",
"0.6081535",
"0.6075173",
"0.60662925",
"0.6060296",
"0.6060296",
"0.6060296",
"0.60396",
"0.6037505",
"0.6031201",
"0.60283875",
"0.60238564",
"0.60174054",
"0.6010645",
"0.6003768",
"0.60004234",
"0.59993047",
"0.5996418",
"0.59942555",
"0.5992292",
"0.5991511",
"0.59863687",
"0.59800303",
"0.5978362",
"0.5977274",
"0.5977274",
"0.5976576",
"0.59690154",
"0.5962557",
"0.59562534",
"0.5955967",
"0.5946678",
"0.5943316",
"0.5935535",
"0.5930124",
"0.59285796",
"0.5924859",
"0.59095657",
"0.59083086",
"0.59077585",
"0.5904241",
"0.5901389",
"0.5899457",
"0.58959407",
"0.5895812",
"0.58951354",
"0.5894848",
"0.5894601",
"0.58933806",
"0.5887501",
"0.58863807",
"0.5885754",
"0.5885228",
"0.5885228"
] |
0.80977625
|
0
|
removes old model and adds new model, but also transfers over some display properties currently used by scale tool, which can't rescale in place so it creates a new model to replace the old one Swap context objects as well
|
public void replaceModel(Model oldModel, Model newModel, OpenSimContext newContext) {
OpenSimContext swap=null;
if(oldModel!=null) {
removeModel(oldModel);
}
if(newModel!=null) {
try {
addModel(newModel, newContext);
} catch (IOException ex) {
ErrorDialog.displayExceptionDialog(ex);
}
//mapModelsToContexts.put(newModel, newContext);
/*
SingleModelVisuals rep = ViewDB.getInstance().getModelVisuals(newModel);
if(offset!=null) {
ViewDB.getInstance().setModelVisualsTransform(rep, offset);
ViewDB.getInstance().setObjectOpacity(newModel, opacity);
}*/
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void updateModel() {\n updateModel(false);\n }",
"private void recreateModel() {\n items = null;\n didItCountAlready = false;\n }",
"public void revise()\n {\n super.revise();\n\n String nm = model.get(\"name\", \"Init\");\n String newnm = revisePatchName(nm);\n if (!nm.equals(newnm))\n model.set(\"name\", newnm);\n }",
"public void modelUntangle()\n {\n\tif (manim==null) return;\n\n\tmodelStop();\n\tmanim.rewind();\n\tmanim.generations().unTangle();\n\tmanim.scale(width,height);\n\tclearToBack();\n\tmodelFlush();\n }",
"protected abstract void setClueModels();",
"public void markRenderModelsModified() {\n\t\t\n\t\t// TODO dispose of the VBOs!!!\n\t\trenderUnits = null;\n\t\t\n\t}",
"public void revise()\n {\n // check the easy stuff -- out of range parameters\n super.revise();\n \n String nm = model.get(\"name\", \"Untitled\");\n String newnm = revisePatchName(nm);\n if (!nm.equals(newnm))\n model.set(\"name\", newnm);\n \n // deal with modulation amount destinations\n for(int i = 3; i < 16; i++)\n {\n if (model.get(\"mod\" + i + \"destination\") == i + 17) // can't refer to yourself\n model.set(\"mod\" + i + \"destination\", 0); // off\n for(int j = 3; j < 16; j++)\n {\n if (model.get(\"mod\" + j + \"destination\") == i + 17 && // someone is referring to you\n model.get(\"mod\" + i + \"destination\") >= 18) // you're using a modulation destination, not legal \n model.set(\"mod\" + i + \"destination\", 0); // off\n }\n }\n }",
"@Override\n\tpublic void setModel() {\n\t\tsuper.setModel();\n\t\tclear();\n\t}",
"public void updateModel() {\n\t\t// Set the mode to validation\n\t\tmode = UPDATE;\n\t\t// Traverses the source and updates the model when UML elements are\n\t\t// missing\n\t\tinspect();\n\t}",
"public void resetModel() {\n\t\twhitePieces.removeAll();\n\t\tblackPieces.removeAll();\n\t\tcapturedPieces.removeAll(capturedPieces);\n\t\tmoveList.removeAll(moveList);\n\n\t\tinitializeBoard();\n\t\tpopulateLists();\n\t}",
"public void switchModel()\n {\n \tactiveModel++;\n \tif (activeModel > 1)\n \t{\n \t\tactiveModel = 0;\n \t}\n }",
"@Override\n public void undo()\n {\n PointsBinding.setScaling(false);\n property.setValue(orig_points);\n property.getWidget().setPropertyValue(propX, orig_x);\n property.getWidget().setPropertyValue(propY, orig_y);\n property.getWidget().setPropertyValue(propWidth, orig_width);\n property.getWidget().setPropertyValue(propHeight, orig_height);\n PointsBinding.setScaling(true);\n }",
"void restoreBefore() {\r\n\t\t\tsurface.basemap.clear();\r\n\t\t\tsurface.basemap.putAll(basemapBefore);\r\n\t\t\tsurface.buildingmap.clear();\r\n\t\t\tsurface.buildingmap.putAll(buildingmapBefore);\r\n\t\t\tsurface.features.clear();\r\n\t\t\tsurface.features.addAll(surfaceBefore);\r\n\t\t\tsurface.buildings.clear();\r\n\t\t\tsurface.buildings.addAll(buildingsBefore);\r\n\t\t}",
"public void revertChanges()\n {\n // TODO: Find a good way to revert changes\n // reload patient\n HibernateUtil.currentSession().evict(_dietTreatment.getModel());\n PatientDAO dao = DAOFactory.getInstance().getPatientDAO();\n _patient.setModel(dao.findById(_patient.getPatientId(), false));\n }",
"@Override\n\t\t\t\tpublic void modelStructureChanged() {\n\n\t\t\t\t}",
"public void reInitializeModels () {\n this.model = new ModelManager(getTypicalAddressBook(), new UserPrefs());\n this.expectedModel = new ModelManager(model.getAddressBook(), new UserPrefs());\n }",
"protected void updateScales() {\n hscale = 1f;\n vscale = 1f;\n viewData.setHscale(hscale);\n viewData.setVscale(vscale);\n }",
"public void popModelMatrix()\r\n\t{\r\n\t\tgl.glMatrixMode(GL_MODELVIEW);\r\n\t\tgl.glPopMatrix();\r\n\t}",
"protected void handleModelChanged() {\n\t\t// refresh connections on the source edit part!\n\t\tif (isActive()) {\n//\t\t\tLink link = (Link)getModel();\n//\t\t\tEObject sourceActivity = FlowLinkUtil.getLinkSource(link); \n//\t\t\tif (sourceActivity != null) {\n//\t\t\t\tObject editPart = getViewer().getEditPartRegistry().get(sourceActivity);\n//\t\t\t\tif (editPart instanceof ActivityEditPart) {\n//\t\t\t\t\t((ActivityEditPart)editPart).refresh();\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tEObject targetActivity = FlowLinkUtil.getLinkTarget(link); \n//\t\t\tif (targetActivity != null) {\n//\t\t\t\tObject editPart = getViewer().getEditPartRegistry().get(targetActivity);\n//\t\t\t\tif (editPart instanceof ActivityEditPart) {\n//\t\t\t\t\t((ActivityEditPart)editPart).refresh();\n//\t\t\t\t}\n//\t\t\t}\n\t\t\t// If property name is children, refresh children.\n\t\t\t// If property name is size or location, refresh visuals.\n\t\t\trefreshVisuals();\n\t\t}\n\t}",
"private void actualizeazaModel() {\n model.clear();\n listaContacte.forEach((o) -> {\n model.addElement(o);\n });\n }",
"@Override\r\n\tpublic void setModel() {\n\t\tnew UpUI(context).execute();\r\n\t}",
"public void rescale()\r\n\t{\n\t}",
"@Override\r\n\tpublic void setModel() {\n\t}",
"public void swap() {\n\t\tPGraphics tmp = this.src;\n\t\tthis.src = this.dst;\n\t\tthis.dst = tmp;\n\t}",
"@Override\n\tpublic void setModel(PaintModel model) {\n\t\t\n\t}",
"void updateModelFromView();",
"public void restoreGraphics() {\n\n if ( g2 instanceof AimxcelGraphics2D ) {\n AimxcelGraphics2D aimxcelGraphics2D = (AimxcelGraphics2D) g2;\n aimxcelGraphics2D.popState();\n }\n else {\n if ( g2.getRenderingHints() != renderingHints ) {\n g2.setRenderingHints( renderingHints );\n }\n if ( g2.getPaint() != paint ) {\n g2.setPaint( paint );\n }\n if ( g2.getColor() != color ) {\n g2.setColor( color );\n }\n if ( g2.getStroke() != stroke ) {\n g2.setStroke( stroke );\n }\n if ( g2.getComposite() != composite ) {\n g2.setComposite( composite );\n }\n if ( g2.getTransform() != transform ) {\n g2.setTransform( transform );\n }\n if ( g2.getFont() != font ) {\n g2.setFont( font );\n }\n if ( g2.getClip() != clip ) {\n g2.setClip( clip );\n }\n if ( g2.getBackground() != background ) {\n g2.setBackground( background );\n }\n }\n }",
"@Override\n protected void replot() {\n // Get the root of the feature model\n COREFeatureModel fm = concern.getFeatureModel();\n root = fm.getRoot();\n\n // Container for the aspects defined in the concern\n aspectContainer = new COREAspectContainer(concern, this);\n aspectContainer.setElements(getAllRealisationModels());\n\n // Container for the constraints defined in the concern\n constraintContainer = new COREConstraintContainer(HorizontalStick.RIGHT, VerticalStick.BOTTOM, true);\n constraintContainer.setElements(getConstraints(root));\n\n // Container for the goals defined in the concern's impact model\n impactEditContainer = new COREImpactConcernEditContainer(concern, this);\n\n // Draw feature diagram\n redrawFeatureDiagram(true);\n\n containerLayer.addChild(aspectContainer);\n containerLayer.addChild(constraintContainer);\n containerLayer.addChild(impactEditContainer);\n }",
"private void updateGameDescriptorAfterUndo() {\n roundNumber = roundsHistory.peek().getRoundNumber();\n gameDescriptor.setTerritoryMap(roundsHistory.peek().getCopyOfMap()); //This Set the gameDescriptor Territories as copy\n gameDescriptor.setPlayersList(roundsHistory.peek().getCopyOfPlayersList()); //This Set the gameDescriptor players as copy\n updateTurnsObjectQueue();\n }",
"private void createNewDynamicModel(){\n\t\tDynamicModel dModel = new DynamicModel(currentView.getViewModel().getName());\r\n\r\n\t\t// Add the new graph to the view\r\n\t\tint modelWidth = DynamicModelView.minimumWidth; \r\n\t\tint modelHeight = DynamicModelView.minimumHeight; \r\n\t\tint viewHeight = currentView.getHeight();\r\n\t\tint pad = 8;\r\n\t\tcurrentView.addModelView(new DynamicModelView(new EntityViewConfig(pad, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t viewHeight - (modelHeight + pad), \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t modelWidth, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t modelHeight, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t EntityViewConfig.Type.DYNAMIC_MODEL), \r\n\t\t\t\t\t\t\t\t\t\t\t\t\tdModel, this, currentView));\r\n\t\tcurrentView.repaint();\r\n\t}",
"@Override\n protected void initModel() {\n bannerModel = new BannerModel();\n// homeSousuoModel = new Home\n\n// bannerModel = new BannerModel();\n// homeSousuoModel = new HomeSousuoModel();\n// izxListModelBack = new\n }",
"void updateViewFromModel();",
"void restoreAfter() {\r\n\t\t\tsurface.basemap.clear();\r\n\t\t\tsurface.basemap.putAll(basemapAfter);\r\n\t\t\tsurface.buildingmap.clear();\r\n\t\t\tsurface.buildingmap.putAll(buildingmapAfter);\r\n\t\t\tsurface.features.clear();\r\n\t\t\tsurface.features.addAll(surfaceAfter);\r\n\t\t\tsurface.buildings.clear();\r\n\t\t\tsurface.buildings.addAll(buildingsAfter);\r\n\t\t}",
"public void closeModel() {\n \t\tif (checkForSave(\"<html>Save changes before closing?</html>\")) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tresetMouseState();\r\n \r\n \t\t// clear undo history\r\n \t\tgraph.getModel().removeUndoableEditListener(undoProxy);\r\n \t\tundoProxy.discardAllEdits();\r\n \t\t// end\r\n \t\t// graph.setModel(null); //wreaks quite a bit of havoc\r\n \t\tmainWindow.removeGraph();\r\n \t\tgraph = null;\r\n \t\tcloseModel.setEnabled(false);\r\n \t\tsaveModel.setEnabled(false);\r\n \t\teditMeasures.setEnabled(false);\r\n \t\tsaveModelAs.setEnabled(false);\r\n \t\tcomponentBar.clearButtonGroupSelection(0);\r\n \t\tcomponentBar.enableButtonGroup(0, false);\r\n \t\tsetConnect.setEnabled(false);\r\n \t\tactionCopy.setEnabled(false);\r\n \t\tactionCut.setEnabled(false);\r\n \t\tactionPaste.setEnabled(false);\r\n \t\tactionDelete.setEnabled(false);\r\n \t\t// FG\r\n \t\tactionSetRight.setEnabled(false);\r\n \t\tactionRotate.setEnabled(false);\r\n \r\n \t\tsetSelect.setEnabled(false);\r\n \t\tsimulate.setEnabled(false);\r\n \t\tsolveAnalitic.setEnabled(false);\r\n \t\tsolveApp.setEnabled(false);\r\n \t\teditUserClasses.setEnabled(false);\r\n \t\teditMeasures.setEnabled(false);\r\n \t\tswitchToExactSolver.setEnabled(false);\r\n \t\t// Disables the botton to start simualtion\r\n \t\tsimulate.setEnabled(false);\r\n \t\teditSimParams.setEnabled(false);\r\n \t\teditPAParams.setEnabled(false);\r\n \t\ttakeScreenShot.setEnabled(false);\r\n \t\t// Disables show results button and measure definition\r\n \t\tshowResults.setSelected(false);\r\n \t\tshowResults.setEnabled(false);\r\n \t\tif (resultsWindow != null) {\r\n \t\t\tresultsWindow.dispose();\r\n \t\t}\r\n \t\tresultsWindow = null;\r\n \t\topenedArchive = null;\r\n \t\tmodel = new JMODELModel();\r\n \t\tmainWindow.updateTitle(null);\r\n \t\t// Free same resources by forcing a garbage collection\r\n \t\tSystem.gc();\r\n \t}",
"private void updatePrescaleService() {\n\t\ttableModel.updatePrescaleService(config);\n\t}",
"@Override\n\tpublic void updateModel() {\n\n\t\tfinal List<GbGradingSchemaEntry> schemaEntries = this.schemaView.getModelObject();\n\n\t\tfinal Map<String, Double> bottomPercents = new HashMap<>();\n\t\tfor (final GbGradingSchemaEntry schemaEntry : schemaEntries) {\n\t\t\tbottomPercents.put(schemaEntry.getGrade(), schemaEntry.getMinPercent());\n\t\t}\n\n\t\tthis.model.getObject().getGradebookInformation().setSelectedGradingScaleBottomPercents(bottomPercents);\n\n\t\tthis.configuredGradeMappingId = this.currentGradeMappingId;\n\t}",
"protected void augmentTemporaryModel(Project tmpModel) {\n }",
"private void onComponentUpdate(InheritedComponentInstanceSelDTO dto) {\n\t\tInheritedComponentInstanceSelModelData oldModel = store.findModel(ModuleInstanceSelModelData.PROPERTY_ID, dto\n\t\t\t.getComponent().getId());\n\t\tInheritedComponentInstanceSelModelData newModel = new InheritedComponentInstanceSelModelData(dto);\n\t\tstore.remove(oldModel);\n\t\tstore.add(newModel);\n\t}",
"public void setModel(Board b) { model = b; repaint(); }",
"public void prepareModel() {\n //Since many models have different scale amplitudes, we calculate a uniform scale factor for the model\n setScaleFactor();\n //Since the 3ds file does not provide normal values, we must calculate them ourselves\n calculateNormals();\n //Finally we need to setup the buffers for drawing\n setupBuffers();\n }",
"public void updateView() {\n\t\tif(columns_view != null){\n\t\t\tint rowCount = newModel.getRowCount();\n\t\t\tfor (int i = rowCount - 1; i >= 0; i--) {\n\t\t\t newModel.removeRow(i);\n\t\t\t}\n\t\t\t\n\t\t\tint columns_size = columns_view.size();\n\t\t\tfor(int i =0 ; i < columns_size;i++){\n\t\t\t\tString index = Integer.toString(i);\n\t\t\t\tString name = \"Obs \" + index;\n\t\t\t\tif(columns_view.get(i) == model.bird){\n\t\t\t\t\tname = \"Bird\";\n\t\t\t\t}\n\t\t\t\tString obstacle_x = Integer.toString(columns_view.get(i).x);\n\t\t\t\tString obstacle_y = Integer.toString(columns_view.get(i).y);\n\t\t\t\tString obstacle_width = Integer.toString(columns_view.get(i).width);\n\t\t\t\tString obstacle_height = Integer.toString(columns_view.get(i).height);\n\t\t\t\tnewModel.addRow(new Object[]{name,obstacle_x,obstacle_y,obstacle_width,obstacle_height});\n\t\t\t}\n\t\t\t//System.out.println(\"this is view1 updateview\");\n\t\t\t//System.out.println(\"columns size\" + columns_view.size());\n\t\t}\n\t\t\n\t}",
"private void fixView(final float newX, final float newY) {\n final float x = this.worldView.getX();\n final float y = this.worldView.getY();\n final float scale = this.worldView.getScale();\n final int width = this.worldView.getMasterImage().getWidth();\n final int height = this.worldView.getMasterImage().getHeight();\n\n float updatedX = Math.max(0, newX);\n float updatedY = Math.max(0, newY);\n\n\n if (width * scale + x > width) {\n updatedX = width - (width * scale);\n }\n if (height * scale + y > height) {\n updatedY = height - (height * scale);\n }\n\n this.worldView.setX(updatedX);\n this.worldView.setY(updatedY);\n\n }",
"@Override\n public void reset() {\n model.reset();\n view.resetView();\n }",
"protected synchronized void resetModelViewMatrix()\n {\n Matrix4d transform = new Matrix4d();\n // translate so that the viewer is at the origin\n Matrix4d translation = new Matrix4d();\n translation.setTranslation(myPosition.getLocation().multiply(-1.));\n // rotate to put the viewer pointing in the -z direction with the up\n // vector along the +y axis.\n Quaternion quat = Quaternion.lookAt(myPosition.getDir().multiply(-1.), myPosition.getUp());\n Matrix4d rotation = new Matrix4d();\n rotation.setRotationQuaternion(quat);\n // set the transform.\n transform.multLocal(rotation);\n transform.multLocal(translation);\n myModelViewMatrix = transform.toFloatArray();\n setInverseModelViewMatrix(transform.invert());\n clearModelToWindowTransform();\n }",
"public void changePatch(Model tempModel)\n {\n // Here you do stuff that changes patches on the synth.\n // You probably want to look at tryToSendSysex() and tryToSendMIDI()\n //\n // This method is used primariily to switch to a new patch prior to loading it\n // from the synthesizer or emitting it to the synthesizer. Many synthesizers do \n // not report their patch location information when emitting a dump to Edisyn. \n // If this is the case, you might want add some code at the end of this method which\n // assumes that the patch change and subsequent parse were successful, so you can\n // just change the patch information in your model directly here in this method. \n // You should NOT do this when changing a patch for the purpose of merging. \n // So in this case (and ONLY in this case) you should end this method with something \n // along the lines of:\n //\n // // My synth doesn't report patch info in its parsed data, so here assume that we successfully did it\n // if (!isMerging())\n // {\n // boolean midi = getSendMIDI(); // is MIDI turned off right now?\n // setSendMIDI(false); // you should always turn off MIDI prior to messing with the model so nothing gets emitted, just in case\n // model.set(\"number\", number);\n // model.set(\"bank\", bank);\n // setSendMIDI(midi); // restore to whatever state it was\n // }\n }",
"protected void prepareModel() {\n model();\n }",
"public void insertBefore(SVGElementModel parentModel, SVGElementModel newModel, SVGElementModel refModel) {\n \t\t// Sanity checks\n \t\tElement element = newModel.getElement();\n \t\tElement parentElement = parentModel.getElement();\n \t\tassert(parentElement != null);\n \t\tassert(contains(parentElement.<SVGElement>cast())) : parentModel.toString() + \" element is not in this model\";\n \t\tElement refElement = refModel != null ? refModel.getElement() : null;\n \t\tif (refElement != null) {\n \t\t\tassert(contains(refElement.<SVGElement>cast())) : refElement.toString() + \" element is not in this model\";\n \t\t}\n \t\t\n \t\tElement twin = newModel.getTwin();\n \t\tElement parentTwin = parentModel.getTwin();\n \t\tassert(parentTwin != null);\n \t\tassert(contains(parentTwin.<SVGElement>cast())) : parentModel.toString() + \" twin is not in this model\";\n \t\tElement refTwin = refModel != null ? refModel.getTwin() : null;\n \t\tif (refElement != null) {\n \t\t\tassert(contains(refTwin.<SVGElement>cast())) : refElement.toString() + \" twin is not in this model\";\n \t\t}\n \t\t\n \t\t// Update SVG models\n \t\tSVGModel owner = newModel.getOwner();\n \t\tif (owner != null) {\n \t\t\towner.remove(newModel);\n \t\t}\n \t\tadopt(newModel);\n \n \t\t// Update the DOM tree\n \t\tparentElement.insertBefore(element, refElement);\n \t\t// Update the twin DOM tree\n \t\tparentTwin.insertBefore(twin, refTwin);\n \t\t\n \t\t\n \t\tif (refModel == null) {\n \t\t\t// Update the model tree\n \t\t\tparentModel.add(newModel);\n \n \t\t\t// Update the store\n \t\t\tstore.add(parentModel, newModel, true);\n \t\t} else {\n \t\t\tint index = parentModel.indexOf(refModel);\n \t\t\t// Update the model tree\n \t\t\tparentModel.insert(newModel, index);\n \t\t\t\n \t\t\t// Update the store\n \t\t\tstore.insert(parentModel, newModel, index, true);\t\t\t\n \t\t}\n \t}",
"private void setupModel() {\n\n //Chooses which model gets prepared\n switch (id) {\n case 2:\n singlePackage = new Node();\n activeNode = singlePackage;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.package_solo)\n .build().thenAccept(renderable -> activeRenderable = renderable)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n\n case 3:\n multiPackage = new Node();\n activeNode = multiPackage;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.package_multi_new)\n .build().thenAccept(renderable -> activeRenderable = renderable)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n\n case 4:\n wagonPackage = new Node();\n activeNode = wagonPackage;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.package_car_new)\n .build().thenAccept(a -> activeRenderable = a)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n\n default:\n mailbox = new Node();\n activeNode = mailbox;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.mailbox)\n .build().thenAccept(renderable -> activeRenderable = renderable)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n }\n }",
"void recompute () {\n current_part.t_Cl = current_part.t_Cd = current_part.t_Cm = null;\n computeFlowAndRegenPlot();\n }",
"@Override\n\t\tpublic void setModel(int model) {\n\t\t\t\n\t\t}",
"public void pushModelMatrix()\r\n\t{\r\n\t\tgl.glMatrixMode(GL_MODELVIEW);\r\n\t\tgl.glPushMatrix();\r\n\t}",
"public void updateModel()\n {\n if (beanModel instanceof EnterTillPayrollPayOutBeanModel)\n {\n EnterTillPayrollPayOutBeanModel model = (EnterTillPayrollPayOutBeanModel) beanModel;\n model.setAmount(amountField.getText());\n model.setSelectedReasonCode(reasonCodeField.getSelectedIndex());\n model.setPaidTo(paidToField.getText());\n model.setEmployeeID(employeeIDField.getText());\n model.setAddressLine(0, addressLine1Field.getText());\n model.setAddressLine(1, addressLine2Field.getText());\n model.setAddressLine(2, addressLine3Field.getText());\n model.setSelectedApprovalCodeIndex(approvalCodeField.getSelectedIndex());\n model.setComment(commentField.getText());\n }\n }",
"@Override\n\tpublic void modelChanged(DShapeModel model) {\n\t\tif(model.getSelected()==true){\n\t\t\tint row = 0;\n\t\t\tfor(DShapeModel d : theModelColumn){\n\t\t\t\tif(d.getSelected()==true){\n\t\t\t\t\tsetValueAt(model.getX(),row, 0);\n\t\t\t\t\tsetValueAt(model.getY(), row, 1);\n\t\t\t\t\tsetValueAt(model.getWidth(), row, 2);\n\t\t\t\t\tsetValueAt(model.getHeight(), row, 3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\trow++;\n\t\t\t}\n\t\t\tfireTableRowsUpdated(row, row);\n\t\t}\n\t\tif(model.getDeleted()==true){\n\t\t\tint row = 0;\n\t\t\tfor(DShapeModel d : theModelColumn){\n\t\t\t\tif(d.getDeleted()==true){\n\t\t\t\t\ttheModelColumn.remove(d);\n\t\t\t\t\t//removing the entire row\n\t\t\t\t\txData.remove(row);\n\t\t\t\t\tyData.remove(row);\n\t\t\t\t\twData.remove(row);\n\t\t\t\t\thData.remove(row);\n\t\t\t\t\tfireTableRowsDeleted(row, row);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\trow++;\n\t\t\t}\n\t\t}\n\t}",
"private void updateModel() {\n // Reset the credentials background\n currentPassword.setBackground(Themes.currentTheme.dataEntryBackground());\n\n\n }",
"public void reset() {\n\t\tmodelVertices.clear();\n\t\ttextureVertices.clear();\n\t\tnormalVertices.clear();\n\t\tgroups.clear();\n\t\tsegments.clear();\n\t\tDebug.info(\"Jay3dModel\",\"OBJModel is empty\");\n\t}",
"@Override\n protected Void doInBackground() {\n DataProvider oldStore = theWindow_.getDataProvider();\n Datastore tmpStore = null;\n try {\n if (saveMode_ == null) {\n tmpStore = studio_.data().createRAMDatastore();\n } else if (saveMode_ == Datastore.SaveMode.SINGLEPLANE_TIFF_SERIES) {\n tmpStore = studio_.data().createSinglePlaneTIFFSeriesDatastore(filePath_);\n } else if (saveMode_ == Datastore.SaveMode.MULTIPAGE_TIFF) {\n // TODO: read options for parameters here\n tmpStore = studio_.data().createMultipageTIFFDatastore(filePath_, true, true);\n } else if (saveMode_ == Datastore.SaveMode.ND_TIFF) {\n tmpStore = studio_.data().createNDTIFFDatastore(filePath_);\n }\n } catch (IOException ioe) {\n studio_.logs().showError(ioe, \"Failed to open new datastore on disk\");\n return null;\n }\n\n final Datastore newStore = tmpStore;\n final DisplaySettings originalDisplaySettings = theWindow_.getDisplaySettings();\n final DisplaySettings.Builder newDisplaySettingsBuilder =\n theWindow_.getDisplaySettings().copyBuilder();\n\n // TODO: use Overlays instead\n final Roi roi = theWindow_.getImagePlus().getRoi();\n \n Coords.CoordsBuilder newSizeCoordsBuilder = studio_.data().coordsBuilder();\n for (String axis : oldStore.getAxes()) {\n newSizeCoordsBuilder.index(axis, oldStore.getNextIndex(axis) - 1);\n }\n SummaryMetadata oldMetadata = oldStore.getSummaryMetadata();\n List<String> channelNames = oldMetadata.getChannelNameList();\n if (channels_ != null) {\n List<ChannelDisplaySettings> channelDisplaySettings = new ArrayList<>();\n List<String> chNameList = new ArrayList<>();\n int index = 0;\n for (Map.Entry<String, Boolean> channel : channels_.entrySet()) {\n if (channel.getValue()) {\n chNameList.add(channel.getKey());\n channelDisplaySettings.add(originalDisplaySettings.getChannelSettings(index));\n }\n index++;\n }\n channelNames = chNameList;\n newDisplaySettingsBuilder.channels(channelDisplaySettings);\n }\n newSizeCoordsBuilder.channel(channelNames.size());\n float nrToBeCopied = 1;\n for (String axis : oldStore.getAxes()) {\n if (channels_ != null && channels_.size() > 0) {\n nrToBeCopied *= channels_.size();\n }\n if (mins_.containsKey(axis)) {\n int min = mins_.get(axis);\n int max = maxes_.get(axis);\n newSizeCoordsBuilder.index(axis, max - min);\n nrToBeCopied *= (max - min + 1);\n }\n }\n\n int width = roi == null ? oldMetadata.getImageWidth() : roi.getBounds().width;\n int height = roi == null ? oldMetadata.getImageHeight() : roi.getBounds().height;\n\n SummaryMetadata metadata = oldMetadata.copyBuilder()\n .channelNames(channelNames)\n .imageWidth(width)\n .imageHeight(height)\n .intendedDimensions(newSizeCoordsBuilder.build())\n .build();\n\n try {\n newStore.setSummaryMetadata(metadata);\n // The implementations of the store set SummaryMetadata on another thread.\n // This can lead to disasters, so we have to poll to make sure SummaryMetadata is\n // there. Copied from DefaultDataSaver.\n long startTime = System.currentTimeMillis();\n boolean timeOut = false;\n while (!timeOut && newStore.getSummaryMetadata() == null) {\n if (System.currentTimeMillis() - startTime > 10000) {\n timeOut = true;\n }\n try {\n Thread.sleep(100);\n } catch (InterruptedException e) {\n timeOut = true;\n studio_.logs().logError(e);\n }\n }\n if (timeOut) {\n studio_.logs().showError(\"Failed to save data\");\n return null;\n }\n\n newStore.setName(newName_);\n final DisplayWindow copyDisplay = studio_.displays().createDisplay(newStore);\n copyDisplay.setDisplaySettings(newDisplaySettingsBuilder.build());\n\n Iterable<Coords> unorderedImageCoords = oldStore.getUnorderedImageCoords();\n int nrCopied = 0;\n for (Coords oldCoord : unorderedImageCoords) {\n List<String> oldAxes = oldStore.getAxes();\n boolean copy = !oldAxes.contains(Coords.CHANNEL);\n for (String axis : oldStore.getAxes()) {\n if (axis.equals(Coords.CHANNEL)) {\n int index = 0;\n for (Map.Entry<String, Boolean> channel : channels_.entrySet()) {\n if (channel.getValue() && oldCoord.getIndex(axis) == index) {\n copy = true;\n continue;\n }\n index++;\n }\n }\n }\n for (String axis : oldStore.getAxes()) {\n if (copy && mins_.containsKey(axis) && maxes_.containsKey(axis)) {\n if (oldCoord.getIndex(axis) < (mins_.get(axis))) {\n copy = false;\n }\n if (oldCoord.getIndex(axis) > maxes_.get(axis)) {\n copy = false;\n }\n }\n }\n if (copy) {\n Coords.CoordsBuilder newCoordBuilder = oldCoord.copyBuilder();\n for (String axis : oldCoord.getAxes()) {\n if (axis.equals(Coords.CHANNEL)) {\n if (channels_ != null && channels_.size() > 0) {\n int chIndex = oldCoord.getIndex(axis);\n if (chIndex < oldMetadata.getChannelNameList().size()) {\n String channelName = oldMetadata.getChannelNameList().get(chIndex);\n if (channelNames.contains(channelName)) {\n int newIndex = channelNames.indexOf(channelName);\n newCoordBuilder.index(axis, newIndex);\n }\n }\n }\n }\n if (mins_.containsKey(axis)) {\n newCoordBuilder.index(axis, oldCoord.getIndex(axis) - mins_.get(axis));\n }\n }\n Image img = oldStore.getImage(oldCoord);\n Coords newCoords = newCoordBuilder.build();\n Image newImgShallow = img.copyAtCoords(newCoords);\n if (roi != null) {\n ImageProcessor ip = studio_.data().ij().createProcessor(img);\n if (ip != null) {\n ip.setRoi(roi);\n ImageProcessor copyIp = ip.crop();\n newImgShallow = studio_.data().createImage(copyIp.getPixels(), \n copyIp.getWidth(), copyIp.getHeight(), \n img.getBytesPerPixel(), img.getNumComponents(), \n newCoords, newImgShallow.getMetadata());\n } else {\n throw new DuplicatorException(\n \"Unsupported pixel type. Can only copy 8 or 16 bit images.\");\n }\n }\n newStore.putImage(newImgShallow);\n nrCopied++;\n try {\n setProgress((int) (nrCopied / nrToBeCopied * 100.0));\n } catch (IllegalArgumentException iae) {\n System.out.println(\"Value was: \" + (int) (nrCopied / nrToBeCopied * 100.0));\n }\n \n }\n }\n\n } catch (DatastoreFrozenException ex) {\n studio_.logs().showError(\"Can not add data to frozen datastore\");\n } catch (DatastoreRewriteException ex) {\n studio_.logs().showError(ex, \"Can not overwrite data\");\n } catch (DuplicatorException ex) {\n studio_.logs().showError(ex.getMessage());\n } catch (IOException ioe) {\n studio_.logs().showError(ioe, \"IOException in Duplicator plugin\");\n }\n \n try {\n newStore.freeze();\n } catch (IOException ioe) {\n studio_.logs().showError(ioe, \"IOException freezing store in Duplicator plugin\");\n }\n studio_.displays().manage(newStore);\n return null;\n }",
"public void setModel(MyGLDrawModel newModel, int id) {\n model = newModel;\n mShouldLoadTexture = true;\n resourceTextureId = id;\n }",
"@Override\n protected void createChange(BundleModel model) {\n if (getType() == AbstractPDEMarkerResolution.REMOVE_TYPE) {\n // indicates last line is purely whitespace; we need to delete the whitespace.\n IDocument doc = model.getDocument();\n try {\n IRegion lastLine = doc.getLineInformation(doc.getNumberOfLines() - 1);\n //$NON-NLS-1$\n doc.replace(//$NON-NLS-1$\n lastLine.getOffset(), //$NON-NLS-1$\n lastLine.getLength(), //$NON-NLS-1$\n \"\");\n } catch (BadLocationException e) {\n }\n } else if (getType() == AbstractPDEMarkerResolution.CREATE_TYPE) {\n // indicates last line is true content; we need to add a new line.\n IDocument doc = model.getDocument();\n try {\n String lineDelimiter = doc.getLineDelimiter(0);\n if (lineDelimiter == null) {\n //$NON-NLS-1$\n lineDelimiter = //$NON-NLS-1$\n \"\";\n }\n doc.replace(doc.getLength(), 0, lineDelimiter);\n } catch (BadLocationException e) {\n e.printStackTrace();\n }\n }\n }",
"private void setModelToChanged() {\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}",
"@Override\n\tpublic void updateProcuctModel(CollectionOfModel collectionOfModel) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tProductModel entity = procuctModelDAO.findById(Integer.parseInt(collectionOfModel.getProductId()));\n\t\t\n\t\tif(entity != null) {\n\t\t\tentity.setCompanyId(Integer.parseInt(collectionOfModel.getCompany_id()));\n\t\t\tentity.setScreenSizeId(Integer.parseInt(collectionOfModel.getModell_size_id()));\n\t\t\tentity.setProcuctInfo(collectionOfModel.getModell_info());\n\t\t\tentity.setModellTypeId(Integer.parseInt(collectionOfModel.getModell_type_id()));\n\t\t\tentity.setProcuctName(collectionOfModel.getModellName());\n\t\t\tentity.setProductPris(Integer.parseInt(collectionOfModel.getModellPris()));\n\t\t\tentity.setIsViseble(Integer.parseInt(collectionOfModel.getIsVisible()));\n\t\t\t\n\t\t}\n\t}",
"public void resetSortModel()\r\n {\r\n oldSortColumnProperty = sortColumnProperty;\r\n oldAscending = ascending;\r\n }",
"@Override\n public void loadSettings() {\n\n DefaultListModel srcModel = new DefaultListModel();\n DefaultListModel dstModel = new DefaultListModel();\n\n // always present\n srcModel.addElement(fakeSeparatorButton);\n\n Button[] buttons = ContextBar.getRegisteredButtons();\n Button[] usedButtons = ContextBar.getShared().getButtons();\n\n //\n for (Button u : usedButtons) {\n if (u == null) {\n dstModel.addElement(fakeSeparatorButton);\n } else {\n dstModel.addElement(u);\n }\n }\n\n // add all registered buttons to srcList, except those already on bar\n for (Button b : buttons) {\n int i;\n for (i = 0; i < usedButtons.length; ++i) {\n final Button u = usedButtons[i];\n if (u == null) {\n continue; // skip separator\n }\n if (u == b) {\n break;\n }\n }\n if (i == usedButtons.length) {\n StrangeEons.log.log(Level.INFO, \"added {0} ({1}) to list\", new Object[]{b.getID(), b.getName()});\n srcModel.addElement(b);\n } else {\n StrangeEons.log.log(Level.INFO, \"added {0} ({1}) to bar\", new Object[]{b.getID(), b.getName()});\n }\n }\n\n srcList.setModel(srcModel);\n dstList.setModel(dstModel);\n }",
"@Override\n public void update(EntityModel model) {\n super.update(model);\n\n }",
"public void propose(RocketModel proposedModel) {\r\n if (proposedModel.getStateEngine().getCurrentState() instanceof IdleState \r\n && stateEngine.getCurrentState() instanceof LaunchedState) {\r\n stateEngine.setIdleState();\r\n stateEngine.getCurrentState().render(this);\r\n } else if (stateEngine.getCurrentState() instanceof LaunchedState) {\r\n stateEngine.getCurrentState().render(this);\r\n } else if (proposedModel.getStateEngine().getCurrentState() instanceof ReadyState \r\n && stateEngine.getCurrentState() instanceof IdleState) {\r\n stateEngine.setReadyState();\r\n stateEngine.getCurrentState().render(this);\r\n } else if (proposedModel.getStateEngine().getCurrentState() instanceof CountingState \r\n && stateEngine.getCurrentState() instanceof ReadyState) {\r\n counter = proposedModel.getCounter();\r\n stateEngine.setCountingState();\r\n stateEngine.getCurrentState().render(this);\r\n } else if (proposedModel.getStateEngine().getCurrentState() instanceof CountingState \r\n && stateEngine.getCurrentState() instanceof CountingState) {\r\n if (proposedModel.getCounter() == 0) {\r\n stateEngine.setLaunchedState();\r\n stateEngine.getCurrentState().render(this);\r\n }\r\n counter = proposedModel.getCounter();\r\n stateEngine.getCurrentState().render(this);\r\n } else if (proposedModel.getStateEngine().getCurrentState() instanceof AbortedState \r\n && stateEngine.getCurrentState() instanceof CountingState) {\r\n stateEngine.setAbortedState();\r\n stateEngine.getCurrentState().render(this);\r\n } else if (proposedModel.getStateEngine().getCurrentState() instanceof AbortedState \r\n && stateEngine.getCurrentState() instanceof AbortedState && proposedModel.getCounter() == 0) {\r\n stateEngine.setIdleState();\r\n stateEngine.getCurrentState().render(this);\r\n }\r\n }",
"protected void copy(){\n\t\tthis.model.copy(this.color.getBackground());\n\t}",
"@Override\n\tpublic void undo() throws PGenException {\n\n\t\tif ( parent != null ){\n\t\t\tif ( newElements != null ) {\n\t\t\t\tfor ( AbstractDrawableComponent ade : newElements ) {\n\t\t\t\t\tparent.removeElement( ade );\n\t\t\t\t}\t \t\n\t\t\t}\n\n\t\t\tif ( oldElements != null ) {\n\t\t\t\tparent.add( oldElements );\n\t\t\t}\n\t\t}\n\t\telse if ( oldElements.size() == newElements.size() ){\n\t\t\tfor ( int ii = 0; ii < newElements.size(); ii++ ) {\n\t\t\t\tAbstractDrawableComponent ade = newElements.get(ii);\n\t\t\t\tif ( ade.getParent() != null && ade.getParent() instanceof DECollection ){\n\t\t\t\t\tDECollection dec = (DECollection) ade.getParent();\n\t\t\t\t\tdec.removeElement( ade );\n\t\t\t\t\tdec.add( oldElements.get( ii ));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void newPanelModel() {\n\n }",
"@Override\n public void newPanelModel() {\n\n }",
"public void endUpdate() {\n getCellLayer().getChildren().addAll(model.getAddedEdges());\n getCellLayer().getChildren().addAll(model.getAddedCells());\n\n // remove components from graph pane\n getCellLayer().getChildren().removeAll(model.getRemovedCells());\n getCellLayer().getChildren().removeAll(model.getRemovedEdges());\n\n // enable dragging of cells\n// for (Cell cell : model.getAddedCells()) {\n// mouseGestures.makeDraggable(cell);\n// }\n\n // every cell must have a parent, if it doesn't, then the graphParent is\n // the parent\n getModel().attachOrphansToGraphParent(model.getAddedCells());\n\n // remove reference to graphParent\n getModel().disconnectFromGraphParent(model.getRemovedCells());\n\n // merge added & removed cells with all cells\n getModel().merge();\n\n }",
"public void updateModel() {\n\t\tIterator<Cell> itr = iterator();\n\t\twhile(itr.hasNext()) itr.next().update();\n\t\titr = iterator();\n\t\twhile(itr.hasNext()) {\n\t\t\t(itr.next()).nextGeneration();\n\t\t}\n\t\tupdateGraph();\n\t}",
"public void openModel() {\r\n \t\tisReleased = true;\r\n \t\tif (checkForSave(\"<html>Save changes before opening a saved model?</html>\")) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tif(animationHolder != null ) {\r\n \t\t\tanimationHolder.stop();\r\n \t\t}\r\n \t\tJMODELModel tmpmodel = new JMODELModel();\r\n \t\tint state = modelLoader.loadModel(tmpmodel, mainWindow);\r\n \t\tif (state == ModelLoader.SUCCESS || state == ModelLoader.WARNING) {\r\n \t\t\tresetMouseState();\r\n \t\t\t// Avoid checkForSave again...\r\n \t\t\tif (model != null) {\r\n \t\t\t\tmodel.resetSaveState();\r\n \t\t\t}\r\n \t\t\tnewModel();\r\n \t\t\t// At this point loading was successful, so substitutes old model\r\n \t\t\t// with loaded one\r\n \t\t\tmodel = tmpmodel;\r\n \t\t\tthis.populateGraph();\r\n \t\t\tsetSelect.setEnabled(true);\r\n \t\t\tcomponentBar.clickButton(setSelect);\r\n \t\t\topenedArchive = modelLoader.getSelectedFile();\r\n \t\t\tmainWindow.updateTitle(openedArchive.getName());\r\n \t\t\t// Removes selection\r\n \t\t\tgraph.clearSelection();\r\n \t\t\t// If model contains results, enable Results Window\r\n \t\t\tif (model.containsSimulationResults()) {\r\n \t\t\t\tif (model.isParametricAnalysisEnabled()) {\r\n \t\t\t\t\tthis.setResultsWindow(new PAResultsWindow(model.getParametricAnalysisModel(), (PAResultsModel) model.getSimulationResults()));\r\n \t\t\t\t\tshowResults.setEnabled(true);\r\n \t\t\t\t} else {\r\n \t\t\t\t\tthis.setResultsWindow(new ResultsWindow(model.getSimulationResults()));\r\n \t\t\t\t\tshowResults.setEnabled(true);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tmodel.resetSaveState();\r\n \t\t\tSystem.gc();\r\n \t\t} else if (state == ModelLoader.FAILURE) {\r\n \t\t\tshowErrorMessage(modelLoader.getFailureMotivation());\r\n \t\t}\r\n \t\t// Shows warnings if any\r\n \t\tif (state == ModelLoader.WARNING) {\r\n \t\t\tnew WarningWindow(modelLoader.getLastWarnings(), mainWindow, modelLoader.getInputFileFormat(), CommonConstants.JSIM).show();\r\n \t\t}\r\n \r\n \t}",
"@Override\n public void propertyChange(PropertyChangeEvent evt) {\n modelToView(handle);\n }",
"public void setLayoutInfo(Object theLayoutInfo)\n{\n if(RMUtils.equals(theLayoutInfo, _layoutInfo)) return; // If value already set, just return\n _layoutInfoX = null;\n firePropertyChange(\"LayoutInfo\", _layoutInfo, _layoutInfo = theLayoutInfo, -1);\n}",
"private void resetAll() {\n\t\tif(mu1 != null)\n\t\t\tmodel.getView().reset(mu1);\n\t\tmu1 = null;\n\t\t\n\t\tif(mu2 != null)\n\t\t\tmodel.getView().reset(mu2);\n\t\tmu2 = null;\n\t\t\n\t\tif(functionWord != null)\n\t\t\tmodel.getView().reset(functionWord);\n\t\tfunctionWord = null;\n\t\t\n\t\tmodel.getSGCreatingMenu().reset();\n\t}",
"protected void establishTransformationModel() {\r\n\t \r\n\t\tTransformationModel transformModel ;\r\n\t\tArrayList<TransformationStack> modelTransformStacks ;\r\n\t\t\r\n\t\t\r\n\t\t// the variables needed for the profile\r\n\t\t// targetStruc = getTargetVector();\r\n\t\tsomData = soappTransformer.getSomData() ; \r\n\t\t// soappTransformer.setSomData( somApplication.getSomData() );\r\n\t\tsomApplication.setSomData(somData) ;\r\n\t\t\r\n\t\tsomData.getVariablesLabels() ;\r\n\t\t \r\n\t\t\r\n\t\t// from here we transfer...\r\n\t\tmodelTransformStacks = soappTransformer.getTransformationModel().getVariableTransformations();\r\n\t\ttransformModel = soappTransformer.getTransformationModel() ;\r\n\t\t \r\n\t\t\r\n\t\ttransformationModelImported = true;\r\n\t}",
"protected void modelChanged() {\n // create a view hierarchy\n ViewFactory f = rootView.getViewFactory();\n Document doc = editor.getDocument();\n Element elem = doc.getDefaultRootElement();\n setView(f.create(elem));\n }",
"public void divert(FreeColGameObject newSource) {\n if (displayId == sourceId) displayId = newSource.getId();\n sourceId = newSource.getId();\n }",
"@Parameterized.AfterParam\n public static void restoreAfter() {\n getApplicationContext().getResources().getDisplayMetrics().setTo(OLD_DISPLAY_METRICS);\n }",
"@Override\n protected void buildWorldRepresentation() {\n java.util.List<BasicModelEntity> worldModelEntityList = spaceExplorerModel.getWorldEntityList();\n java.util.List<CSysEntity> viewWorldEntityList = new ArrayList();\n for (int i = 0; i < worldModelEntityList.size(); i++) {\n\n BasicModelEntity basicModelEntity = worldModelEntityList.get(i);\n\n CSysEntity cSysEntity = null;\n if (basicModelEntity instanceof ModelLineEntity) {\n cSysEntity = new SeCSysLineEntity(this, (ModelLineEntity) basicModelEntity);\n cSysEntity.setDrawColor(basicModelEntity.getColor());\n// addWorldEntity(cSysLineEntity);\n } else if (basicModelEntity instanceof ModelPolyLineEntity) {\n cSysEntity = new SeCSysViewPolyLineEntity(this, (ModelPolyLineEntity) basicModelEntity);\n cSysEntity.setDrawColor(basicModelEntity.getColor());\n// addWorldEntity(seCSysViewPolylineEntity);\n }\n viewWorldEntityList.add(cSysEntity);\n }\n\n createAxis(viewWorldEntityList);\n viewWorldEntityArray = viewWorldEntityList.toArray(new BasicCSysEntity[viewWorldEntityList.size()]);\n updateCSysEntList(combinedRotatingMatrix);\n }",
"void setModel(Model model);",
"public SwapPokemonView() {\n\t\tmyController = null;\n\t\tmyModel.attach(this);\n\t\tinitComponents();\n\t}",
"@Override\n \t\t\t\tpublic void doModelPerspective() {\n \n \t\t\t\t}",
"private void normalizeModel(List<Server> servers) {\n\n for (Server server : servers) {\n ServerInstance serverInstance = getServerInstance(new ServerRef(server.getHostName(), server.getName()));\n server.setServerState(serverInstance.getServerState());\n server.setSuspendState(serverInstance.getSuspendState());\n }\n }",
"private void initialize() {\n buttonPanel1.addButton(\"Apply step and close\");\n buttonPanel1.setButtonIcon(\"Apply step and close\",new javax.swing.ImageIcon(getClass().getResource(\"/nl/astron/lofar/sas/otb/icons/16_apply.png\")));\n buttonPanel1.addButton(\"Close\");\n buttonPanel1.setButtonIcon(\"Close\",new javax.swing.ImageIcon(getClass().getResource(\"/nl/astron/lofar/sas/otb/icons/16_exit2.png\")));\n if(itsBBSStep == null){\n stepExplorerStepNameText.setEditable(true);\n }\n this.stepExplorerNSourcesList.setModel(new DefaultListModel());\n this.stepExplorerInstrumentModelList.setModel(new DefaultListModel());\n// this.stepExplorerESourcesList.setModel(new DefaultListModel());\n \n //fill the supported step operation panels\n stepOperationPanels.put(\"Predict\",null);\n stepOperationPanels.put(\"Solve\",\"nl.astron.lofar.sas.otbcomponents.bbs.stepmanagement.operations.BBSStepOperationPanelSolveImpl\");\n stepOperationPanels.put(\"Subtract\",null);\n stepOperationPanels.put(\"Correct\",null);\n \n // Fill the comboboxes (will need to be done from Database later)\n stepExplorerModifyNSourceCombobox.removeAllItems();\n stepExplorerModifyNSourceCombobox.addItem(\"CygA\");\n stepExplorerModifyNSourceCombobox.addItem(\"CasA\");\n stepExplorerModifyNSourceCombobox.addItem(\"TauA\");\n stepExplorerModifyNSourceCombobox.addItem(\"VirA\");\n stepExplorerModifyNSourceCombobox.addItem(\"HerA\");\n stepExplorerModifyNSourceCombobox.addItem(\"PerA\");\n stepExplorerModifyNSourceCombobox.addItem(\"3C123\");\n stepExplorerModifyNSourceCombobox.addItem(\"3C134\");\n stepExplorerModifyNSourceCombobox.addItem(\"3C157\");\n stepExplorerModifyNSourceCombobox.addItem(\"3C196\");\n stepExplorerModifyNSourceCombobox.addItem(\"3C219\");\n stepExplorerModifyNSourceCombobox.addItem(\"3C295\");\n stepExplorerModifyNSourceCombobox.addItem(\"3C343\");\n stepExplorerModifyNSourceCombobox.addItem(\"3C343.1\");\n stepExplorerModifyNSourceCombobox.addItem(\"3C353\");\n stepExplorerModifyNSourceCombobox.addItem(\"3C363.1\");\n stepExplorerModifyNSourceCombobox.addItem(\"3C400\");\n \n stepExplorerModifyInstrumentModelCombobox.removeAllItems();\n stepExplorerModifyInstrumentModelCombobox.addItem(\"TOTALGAIN\");\n stepExplorerModifyInstrumentModelCombobox.addItem(\"PATCHGAIN\");\n stepExplorerModifyInstrumentModelCombobox.addItem(\"BANDPASS\");\n }",
"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 updateList() \n { \n model.clear();\n for(int i = ScholarshipTask.repository.data.size() - 1; i >= 0; i--) \n {\n model.addElement(ScholarshipTask.repository.data.get(i));\n }\n }",
"@Override\n public void startup(Model model) {\n model.updateModelRep(stateID);\n }",
"private void bakeItemModels() {\n/* 754 */ Iterator<ResourceLocation> var1 = this.itemLocations.values().iterator();\n/* */ \n/* 756 */ while (var1.hasNext()) {\n/* */ \n/* 758 */ ResourceLocation var2 = var1.next();\n/* 759 */ ModelBlock var3 = (ModelBlock)this.models.get(var2);\n/* */ \n/* 761 */ if (func_177581_b(var3)) {\n/* */ \n/* 763 */ ModelBlock var4 = func_177582_d(var3);\n/* */ \n/* 765 */ if (var4 != null)\n/* */ {\n/* 767 */ var4.field_178317_b = var2.toString();\n/* */ }\n/* */ \n/* 770 */ this.models.put(var2, var4); continue;\n/* */ } \n/* 772 */ if (isCustomRenderer(var3))\n/* */ {\n/* 774 */ this.models.put(var2, var3);\n/* */ }\n/* */ } \n/* */ \n/* 778 */ var1 = this.field_177599_g.values().iterator();\n/* */ \n/* 780 */ while (var1.hasNext()) {\n/* */ \n/* 782 */ TextureAtlasSprite var5 = (TextureAtlasSprite)var1.next();\n/* */ \n/* 784 */ if (!var5.hasAnimationMetadata())\n/* */ {\n/* 786 */ var5.clearFramesTextureData();\n/* */ }\n/* */ } \n/* */ }",
"public void reset()\n\t{\n\t\t//taskTable.setFilters(new FilterPipeline());\n\t\tmodel = new TaskTableModel(projects);\n\t\ttaskTable.setModel(model);\n\t\tresetComboxes();\n\t}",
"@Override\n public Model newModel(CatalogItem item) {\n return null;\n }",
"public void reviseMObject(MObject editObjM, SchemaMtl schemaMtl) {\n\t\tif(editObjM.getId()==null) editObjM.setId(schemaMtl.nextCurrentId());\n\t\tMObject oldObjM = schemaMtl.getClassM().get(schemaMtl.getEditNodeT().getIdClass());\n\t\tschemaMtl.registerNewObj(editObjM,oldObjM);\n\t\tif(!schemaMtl.getClassM().containsKey(editObjM.getId())) schemaMtl.getClassM().put(editObjM.getId(), editObjM);\n\t}",
"public void updateViews() {\n updateViews(null);\n }",
"@Override\r\n\tpublic void reset() {\n\t\tsuper.reset();\r\n\t\tthis.setScale(0.75f);\r\n\t}",
"private void actionResetView ()\r\n\t{\r\n\t\thelperSwitchSelectOff();\r\n\t\thelperSwitchMoveOff();\r\n\r\n\t\tint tableSize = DataController.getTable().getTableSize();\r\n\r\n\t\t//---- Check if the project is empty or not\r\n\t\tif (tableSize != 0)\r\n\t\t{\r\n\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().displayPolygonStop();\r\n\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().resetImagePosition();\r\n\t\t}\r\n\r\n\t}",
"public void reload() {\n\t\tTextMeshData tmd = font.loadText(this);\n\t\tmodelLength = tmd.modelLength();\n\t\tmodelHeight = tmd.modelHeight();\n\t\tif (this.vao != null)\n\t\t\tthis.vao.delete();\n\t\tthis.vao = Loader.loadToVAO(new int[] { 3, 2 }, tmd.getVertexPositions(), tmd.getTextureCoords());\n\t}",
"public RenameModel() {\n\t\toldFileName = \"\";\n\t\tnewFileName = \"\";\n\t\terrorMessage = \"\";\n\t\tthis.isModelRun = false;\n\t}",
"public void undo() {\n\t\tparent.requestChange(new ModelChangeRequest(this.getClass(), parent,\n\t\t\t\t\"create\") {\n\t\t\t@Override\n\t\t\tprotected void _execute() throws Exception {\n\t\t\t\teditor.selectPage((CompositeActor) parent);\n\t\t\t\tif (child instanceof NamedObj) {\n\t\t\t\t\tComponentUtility.setContainer(child, null);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"private void reset() {\n \n ((Shape3D)((Group)model).getChildren().get(0)).setMaterial(red);\n ((Shape3D)((Group)model).getChildren().get(1)).setMaterial(blue);\n \n }",
"private void swapTransforms() {\n Transform tmp = workTransform;\n workTransform = userTransform;\n userTransform = tmp;\n }",
"public void upateResources() {\r\n\t\tResourceBase resourcesBase = parent.getResources();\r\n\t\tresourcesBase.getAll().forEach((key, value) -> {\r\n\t\t\tif(resources.containsKey(key))\t//ak už je vypísaná\r\n\t\t\t\tresources.get(key).updateValue();\t//aktualizuje ju to\r\n\t\t\telse{\t//ináč\r\n\t\t\t\tint need = resourcesBase.getRequired(key);\r\n\t\t\t\tint have = resourcesBase.getOwned(key);\r\n\t\t\t\tOtherResourceViewer newViewer = new OtherResourceViewer(key,need, have, parent);\t//vytvorí nový viewer \r\n\t\t\t\tresources.put(key, newViewer);\t//pridá ho do zoznamu viewerov\r\n\t\t\t\tadd(newViewer);\t//aj do panelu\r\n\t\t\t}\r\n\t\t});\r\n\t}"
] |
[
"0.61001694",
"0.60418636",
"0.59014654",
"0.5898265",
"0.5838871",
"0.57920194",
"0.57821435",
"0.5708341",
"0.5708335",
"0.56829554",
"0.5669143",
"0.5616885",
"0.55776054",
"0.55401844",
"0.547539",
"0.5458318",
"0.54467744",
"0.543986",
"0.54355395",
"0.54173106",
"0.5372565",
"0.53640074",
"0.5361438",
"0.53516954",
"0.5333783",
"0.531467",
"0.53107864",
"0.52949554",
"0.5285667",
"0.52761525",
"0.52758884",
"0.52676505",
"0.5259686",
"0.5228587",
"0.5225929",
"0.52255934",
"0.5223173",
"0.5218283",
"0.5208707",
"0.5207588",
"0.51859677",
"0.5177953",
"0.5171904",
"0.5168791",
"0.5159481",
"0.5149826",
"0.5145842",
"0.514082",
"0.513151",
"0.51303226",
"0.5124764",
"0.5121749",
"0.5106003",
"0.51042557",
"0.51004565",
"0.5099063",
"0.5097726",
"0.5091741",
"0.5086713",
"0.5076131",
"0.5075762",
"0.50678647",
"0.50632966",
"0.50560445",
"0.50483567",
"0.5043005",
"0.504185",
"0.504185",
"0.503743",
"0.50037044",
"0.49970877",
"0.49961406",
"0.49935076",
"0.49908817",
"0.49904615",
"0.49897364",
"0.49880853",
"0.49807268",
"0.49754557",
"0.49713907",
"0.49660358",
"0.4963463",
"0.49557412",
"0.49542338",
"0.49540576",
"0.49532455",
"0.49493232",
"0.49452657",
"0.49420297",
"0.4940483",
"0.49402812",
"0.4924577",
"0.4924244",
"0.49169517",
"0.49165288",
"0.49160722",
"0.4913071",
"0.49115002",
"0.49039367",
"0.49028677"
] |
0.6295424
|
0
|
Set the current model to the new one and fire an event for the change.
|
public void setCurrentModel(final Model aCurrentModel, boolean allowUndo) {
final Model saveCurrentModel = currentModel;
currentModel = aCurrentModel;
Vector<OpenSimObject> objs = new Vector<OpenSimObject>(1);
objs.add(aCurrentModel);
ObjectSetCurrentEvent evnt = new ObjectSetCurrentEvent(this, aCurrentModel, objs);
setChanged();
//ModelEvent evnt = new ModelEvent(aCurrentModel, ModelEvent.Operation.SetCurrent);
notifyObservers(evnt);
objs.clear();
if (allowUndo){
ExplorerTopComponent.addUndoableEdit(new AbstractUndoableEdit() {
public void undo() throws CannotUndoException {
super.undo();
setCurrentModel(saveCurrentModel, false);
}
public void redo() throws CannotRedoException {
super.redo();
setCurrentModel(aCurrentModel, true);
}
public boolean canUndo() {
return true;
}
public boolean canRedo() {
return true;
}
@Override
public String getRedoPresentationName() {
return "Redo Change Current Model";
}
@Override
public String getUndoPresentationName() {
return "Undo Change Current Model";
}
});
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void setModelToChanged() {\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}",
"void onModelChange();",
"protected void modelChanged() {\n // create a view hierarchy\n ViewFactory f = rootView.getViewFactory();\n Document doc = editor.getDocument();\n Element elem = doc.getDefaultRootElement();\n setView(f.create(elem));\n }",
"public void fireModelChanged() {\n if (enabled)\n for (IInifileChangeListener listener : getListeners())\n listener.modelChanged();\n }",
"public void setModel(GraphModel inputModel){\n\t\t// DO NOTHING IF THE MODEL IS ALREADY SET.\n\t\tif(inputModel == theModel)\n\t\t\treturn;\n\t\t\n\t\ttheModel = inputModel;\n\t\ttheModel.addObserver(this);\n\t}",
"public void notifyModelUpdated()\n {}",
"@Override\r\n\tpublic void setModel() {\n\t}",
"void set(Model model);",
"void updateModel() {\n updateModel(false);\n }",
"void setModel(Model model);",
"@Override\r\n\tpublic void setModel() {\n\t\tnew UpUI(context).execute();\r\n\t}",
"public void _setModel(T model) {\n _model = model;\n }",
"@Override\n public void cycleStarted(ModelEvent event)\n {\n checkForChange();\n }",
"public abstract void modelStructureChanged();",
"public void modelPropertyChange(PropertyChangeEvent evt) {\n\t\t\n\t}",
"@Override\n\t\t\t\tpublic void modelStructureChanged() {\n\n\t\t\t\t}",
"protected void handleModelChanged() {\n\t\t// refresh connections on the source edit part!\n\t\tif (isActive()) {\n//\t\t\tLink link = (Link)getModel();\n//\t\t\tEObject sourceActivity = FlowLinkUtil.getLinkSource(link); \n//\t\t\tif (sourceActivity != null) {\n//\t\t\t\tObject editPart = getViewer().getEditPartRegistry().get(sourceActivity);\n//\t\t\t\tif (editPart instanceof ActivityEditPart) {\n//\t\t\t\t\t((ActivityEditPart)editPart).refresh();\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tEObject targetActivity = FlowLinkUtil.getLinkTarget(link); \n//\t\t\tif (targetActivity != null) {\n//\t\t\t\tObject editPart = getViewer().getEditPartRegistry().get(targetActivity);\n//\t\t\t\tif (editPart instanceof ActivityEditPart) {\n//\t\t\t\t\t((ActivityEditPart)editPart).refresh();\n//\t\t\t\t}\n//\t\t\t}\n\t\t\t// If property name is children, refresh children.\n\t\t\t// If property name is size or location, refresh visuals.\n\t\t\trefreshVisuals();\n\t\t}\n\t}",
"void setModel(Model m);",
"public void updateModel() {\n\t\t// Set the mode to validation\n\t\tmode = UPDATE;\n\t\t// Traverses the source and updates the model when UML elements are\n\t\t// missing\n\t\tinspect();\n\t}",
"abstract public void handleModelEvent(ModelEvent modelEvent);",
"private void setModel(IAnnotationModel model) {\n \t\tif (fModel != model) {\n \t\t\tif (fModel != null)\n \t\t\t\tfModel.removeAnnotationModelListener(this);\n \t\t\tfModel= model;\n \t\t\tif (fModel != null) {\n \t\t\t\ttry {\n \t\t\t\t\tfIsSettingModel= true;\n \t\t\t\t\tfModel.addAnnotationModelListener(this);\n \t\t\t\t} finally {\n \t\t\t\t\tfIsSettingModel= false;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}",
"void updateModelFromView();",
"@Override\r\n\t\tpublic void userModelChanged() \r\n\t\t{\n\t\t\t\r\n\t\t}",
"@Override\r\n public void setModel(String model) {\n }",
"public void modelsChanged(IModelProviderEvent event);",
"@Override\n\tpublic void setModel(Object o) {\n\t\t\n\t}",
"public void setModel(Model m){\r\n model = m;\r\n }",
"public void setModel(AbstractModel model) {\n this.model = model;\n }",
"private void change() {\n\t\tsetChanged();\n\t\t//NotifyObservers calls on the update-method in the GUI\n\t\tnotifyObservers();\n\t}",
"public void setModel(Model model) {\n this.model = model;\n }",
"public void setModel(Model model) {\n this.model = model;\n }",
"public void setModel(Model model) {\n this.model = model;\n }",
"public void setModelObject(cbit.vcell.parser.SymbolTableEntry modelObject) throws java.beans.PropertyVetoException {\r\n\tcbit.vcell.parser.SymbolTableEntry oldValue = fieldModelObject;\r\n\tfireVetoableChange(\"modelObject\", oldValue, modelObject);\r\n\tfieldModelObject = modelObject;\r\n\tfirePropertyChange(\"modelObject\", oldValue, modelObject);\r\n}",
"@Override\n public void Update(Model model) {\n\n }",
"@Override\n\t\tpublic void setModel(int model) {\n\t\t\t\n\t\t}",
"public void managerModelModified(ManagerEvent e);",
"@Override\n public void propertyChange(PropertyChangeEvent evt) {\n modelToView(handle);\n }",
"public void setModel(Model model) {\n\t\tthis.model.copy(model);\r\n\t}",
"public void setModel(OntModel model) {\n\t\tthis.model = model;\n\t}",
"private void modelListenersNotify()\n {\n modelArray = this.toArray(new Object[this.size()]);\n notifyTableModelChange();\n notifyComboBoxModelChange(0, this.size()-1);\n }",
"void updateViewFromModel();",
"public <T extends BaseSlingModel> void setModel(final T model) {\n this.model = model;\n }",
"@Override\n public void startup(Model model) {\n model.updateModelRep(stateID);\n }",
"public void setModel(RegionModel newModel) {\n\t\tmodel = newModel;\n\t}",
"@Override\n\tpublic void setModel() {\n\t\tsuper.setModel();\n\t\tclear();\n\t}",
"public void updateCurrentValues(AnyUriModel model) {\r\n this.model = model;\r\n resetValuesFromModel();\r\n }",
"@Override\n public void update(EntityModel model) {\n super.update(model);\n\n }",
"public void setModel(Model model) {\n petal_model = model;\n }",
"@Override\n public void setChanged() {\n set(getItem());\n }",
"public void switchModel()\n {\n \tactiveModel++;\n \tif (activeModel > 1)\n \t{\n \t\tactiveModel = 0;\n \t}\n }",
"@Override\n\tpublic void setModel(String model) {\n\t\tthis.model = model;\n\t}",
"public void update() {\n tableChanged(new TableModelEvent(this));\n }",
"void addModelEventListener(PropertyChangeListener listener, Object modelelement);",
"public void fireChange() {\n fireChange(new ChangeEvent(source));\n }",
"void currentDocumentChanged(SingleDocumentModel previousModel, SingleDocumentModel currentModel);",
"private void doBeforeUpdateModel(final PhaseEvent arg0) {\n\t}",
"public void modelChanged(ModelEvent event) {\n\t\tSystem.out.println(\"CalculatorView.modelChanged(ModelEvent event)\");\n\t\tString msg = event.getAmount() + \"\";\n\t\ttextField.setText(msg);\n\t\tSystem.out.println(\"\\t\" + msg);\n\t}",
"public void startObserving() {\n if (!myModel.contains(modelObserver)) {\n myModel.addObserver(modelObserver);\n }\n }",
"@Override\n public void modelStarted(ModelEvent me)\n {\n save(me.getSource(), _startDirectory);\n }",
"public void valueChanged(TreeSelectionEvent ev) {\n controller.removeSelectionListener(modelSelectionListener);\r\n controller.setSelectedFurniture(getSelectedFurniture());\r\n controller.addSelectionListener(modelSelectionListener);\r\n }",
"public void setModel(Board b) { model = b; repaint(); }",
"@Override\n public void propertyChange(PropertyChangeEvent evt) {\n requestProcessor.post(new Runnable() {\n @Override\n public void run() {\n initModels();\n }\n });\n }",
"public void setModel(String modelName)\n\t{\n\t\tmyModel = modelName;\n\t}",
"@Override\n\t\t\tpublic void notify(Notification n) {\n\t\t\t\tif (isActive()) handleModelChanged();\n\t\t\t\trefreshAdapters();\n\t\t\t}",
"protected void fireChangeEvent (ModelProperties prop)\n {\n\tJsimEvent evt;\n\tString\t SLASH = System.getProperty (\"file.separator\");\n\tString fname = System.getProperty (\"user.home\");\n\tString xmlStr;\n\n\tif (use_xml) {\n try {\n Vector data = new Vector (); data.add (prop);\n if (generate_xml_files) {\n\t\t fname += SLASH + \"JSIM\" + SLASH + \"jsim\" + SLASH +\n\t\t\t\t\"jmessage\" + SLASH + \"change.xml\";\n\t\t xmlStr = XMLSerializer.serialize (data, fname);\n\t\t} else {\n\t\t xmlStr = XMLSerializer.serialize (data);\n\t\t}; // if\n } catch (Exception e) {\n trc.tell (\"fireChangeEvent\", e.getMessage ());\n e.printStackTrace ();\n return;\n }\n\t evt = new JsimEvent (this, EventMap.CHANGE_EVT, xmlStr);\n\t} else {\n\t evt = new JsimEvent (this, EventMap.CHANGE_EVT, prop);\n\t}; // if\n\n propCache = prop;\n\tfireJsimEvent (evt);\n \n }",
"public void update( final T model )\n\t{\n\t\tthis.dao.save( model );\n\t}",
"public static void setModel(SnagliModel model1) {\n\t\tmodel = model1;\n\t}",
"public void setModel(String model) {\r\n if (model != null) {\r\n store.put(Names.model, model);\r\n } else {\r\n \tstore.remove(Names.model);\r\n }\r\n }",
"public void notifyChange()\r\n {\r\n setChanged();\r\n notifyObservers();\r\n }",
"public void setModel(UIModelIfc model)\n {\n if(model==null)\n {\n throw new NullPointerException(\"Attempt to set \" +\n \"EnterTillPayrollPayOutBeanModel to null\");\n }\n Object oldValue = beanModel;\n if (model instanceof EnterTillPayrollPayOutBeanModel)\n {\n beanModel = (EnterTillPayrollPayOutBeanModel)model;\n updateBean();\n }\n }",
"@Override\n public void stateChanged()\n {\n if (this.systemUpdated)\n {\n inputModelReady = true;\n }\n }",
"public void setModel(String model)\n {\n this.model = model;\n }",
"public interface OnModelDataChangeListener {\n public void onChange();\n}",
"private void doAfterUpdateModel(final PhaseEvent arg0) {\n\t}",
"public void update(Observable o, Object arg) {\n if (o == model) {\n setChanged();\n notifyObservers(arg);\n }\n }",
"void addModelEventListener(UmlChangeListener listener, Object modelelement, String propertyName);",
"public void doSomeChanges() {\n\n eventBus.publish(\"our.event.coming.from.model\", \"some data passed\");\n }",
"public void setDataModel(DataModel dataModel) {\n\t\tif (dm != null) {\n\t\t\tdm.removeSelectionChangeListener(this); \n\t\t\t// move listening from old DataModel to new one.\n\t\t}\n\t\tdm = dataModel;\n\t\tif (dm != null) {\n\t\t\tdm.addSelectionChangeListener(this);\n\t\t}\n\t\trowNumbersModel.setDataModel(dm);\n\t\trebuildFormElements();\n\t}",
"void addModelEventListener(PropertyChangeListener listener, Object modelelement, String propertyName);",
"public void saveModel() {\n\t}",
"public void testAddModelElementChangeListener() {\n ModelElementChangeListenerMock listener = new ModelElementChangeListenerMock();\n instance.addModelElementChangeListener(listener);\n instance.firePropertyChangeEvent(new GuardImpl(), PropertyKind.ACTIVE, PropertyOperation.MODIFY, \"accuracy\");\n assertTrue(\"Failed to add the listener.\", listener.IsCalled());\n }",
"public synchronized void setChanged() {\n super.setChanged();\n }",
"@Override\n public void modelChange(ModelChangeEvent anEvent) {\n super.modelChange(anEvent);\n if (RoleDataSource.ITEM_LIST_PROPERTY.equals(anEvent.getPropertyName())) {\n createWidgetsForItemsAndDisplay();\n } else if (SimpleFilterEditor.FILTER_UPDATED_PROPERTY.equals(anEvent.getPropertyName())) {\n final String theSearchPattern = ((SimpleFilter) anEvent.getNewValue()).getSearchPattern();\n myBonitaDataSource.getItemFilter().setSearchPattern(theSearchPattern);\n myBonitaDataSource.reload();\n } else if(RoleDataSource.ITEM_UPDATED_PROPERTY.equals(anEvent.getPropertyName())) {\n BonitaUUID theItemUUID = (BonitaUUID)anEvent.getSource();\n if(myItemSelectionWidgets.containsKey(theItemUUID)) {\n Role theItem = (Role)anEvent.getNewValue();\n updateWidgetsForItem(theItem);\n }\n }\n }",
"void valueChanged(CalcModel model);",
"void valueChanged(CalcModel model);",
"public void setModel(String model) {\r\n this.model = model;\r\n }",
"void onModelChanged(MatchSnapshot matchSnapshot);",
"@FXML private void doSave(ActionEvent event) {\n\t\tmodel.save();\n\t}",
"public void setModel(String model) {\n this.model = model;\n }",
"@Override\n\tpublic int update(Object model) {\n\t\treturn 0;\n\t}",
"public void addModel(IAnimatorModel newModel) {\r\n this.model = newModel;\r\n }",
"@Override\n public void onChange(boolean selfChange) {\n mModel.resetLoadedState(false, true);\n mModel.startLoaderFromBackground();\n }",
"@Override\n\tpublic void setModel(DomainObject model, InfiniteProgressPanel progressPanel) {\n\t\tsuper.setModel(model, progressPanel);\n\t\tPatronVisits visitModel = (PatronVisits)model;\n\t\tsubjectsTable.updateCollection(visitModel.getSubjects());\n\t\tnamesTable.updateCollection(visitModel.getNames());\n\t\tresearchPurposeTable.updateCollection(visitModel.getResearchPurposes());\n resourcesTable.updateCollection(visitModel.getResources());\n\t}",
"public void registerAsListener(AbstractModel model){\r\n\t\tmodel.addPropertyChangeListener(this);\r\n\t}",
"public void update(E model) {\n\t\tgetHibernateTemplate().update(model);\r\n\t}",
"public final void change() {\n\t\tBSUIWindow.change_do(this);\n\t}",
"public AbstractJMFXModel(M model) {\n\t\tthis.model = model;\n\t}",
"public void openModel() {\r\n \t\tisReleased = true;\r\n \t\tif (checkForSave(\"<html>Save changes before opening a saved model?</html>\")) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tif(animationHolder != null ) {\r\n \t\t\tanimationHolder.stop();\r\n \t\t}\r\n \t\tJMODELModel tmpmodel = new JMODELModel();\r\n \t\tint state = modelLoader.loadModel(tmpmodel, mainWindow);\r\n \t\tif (state == ModelLoader.SUCCESS || state == ModelLoader.WARNING) {\r\n \t\t\tresetMouseState();\r\n \t\t\t// Avoid checkForSave again...\r\n \t\t\tif (model != null) {\r\n \t\t\t\tmodel.resetSaveState();\r\n \t\t\t}\r\n \t\t\tnewModel();\r\n \t\t\t// At this point loading was successful, so substitutes old model\r\n \t\t\t// with loaded one\r\n \t\t\tmodel = tmpmodel;\r\n \t\t\tthis.populateGraph();\r\n \t\t\tsetSelect.setEnabled(true);\r\n \t\t\tcomponentBar.clickButton(setSelect);\r\n \t\t\topenedArchive = modelLoader.getSelectedFile();\r\n \t\t\tmainWindow.updateTitle(openedArchive.getName());\r\n \t\t\t// Removes selection\r\n \t\t\tgraph.clearSelection();\r\n \t\t\t// If model contains results, enable Results Window\r\n \t\t\tif (model.containsSimulationResults()) {\r\n \t\t\t\tif (model.isParametricAnalysisEnabled()) {\r\n \t\t\t\t\tthis.setResultsWindow(new PAResultsWindow(model.getParametricAnalysisModel(), (PAResultsModel) model.getSimulationResults()));\r\n \t\t\t\t\tshowResults.setEnabled(true);\r\n \t\t\t\t} else {\r\n \t\t\t\t\tthis.setResultsWindow(new ResultsWindow(model.getSimulationResults()));\r\n \t\t\t\t\tshowResults.setEnabled(true);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tmodel.resetSaveState();\r\n \t\t\tSystem.gc();\r\n \t\t} else if (state == ModelLoader.FAILURE) {\r\n \t\t\tshowErrorMessage(modelLoader.getFailureMotivation());\r\n \t\t}\r\n \t\t// Shows warnings if any\r\n \t\tif (state == ModelLoader.WARNING) {\r\n \t\t\tnew WarningWindow(modelLoader.getLastWarnings(), mainWindow, modelLoader.getInputFileFormat(), CommonConstants.JSIM).show();\r\n \t\t}\r\n \r\n \t}",
"@Override\n\tpublic void setModel(TenantsEntity model) {\n\t\t\n\t}",
"public void updateModel()\n {\n if (beanModel instanceof EnterTillPayrollPayOutBeanModel)\n {\n EnterTillPayrollPayOutBeanModel model = (EnterTillPayrollPayOutBeanModel) beanModel;\n model.setAmount(amountField.getText());\n model.setSelectedReasonCode(reasonCodeField.getSelectedIndex());\n model.setPaidTo(paidToField.getText());\n model.setEmployeeID(employeeIDField.getText());\n model.setAddressLine(0, addressLine1Field.getText());\n model.setAddressLine(1, addressLine2Field.getText());\n model.setAddressLine(2, addressLine3Field.getText());\n model.setSelectedApprovalCodeIndex(approvalCodeField.getSelectedIndex());\n model.setComment(commentField.getText());\n }\n }"
] |
[
"0.8125214",
"0.70756316",
"0.7003216",
"0.6822307",
"0.6754423",
"0.6641935",
"0.66052556",
"0.6598733",
"0.6594401",
"0.6593583",
"0.6569775",
"0.6554758",
"0.6538006",
"0.6503231",
"0.64961505",
"0.64666617",
"0.645097",
"0.6394607",
"0.63919026",
"0.63449234",
"0.63439375",
"0.6340376",
"0.6316979",
"0.62913704",
"0.62865245",
"0.6283174",
"0.62741166",
"0.62533987",
"0.62419176",
"0.6218861",
"0.6218861",
"0.6218861",
"0.6213432",
"0.6210555",
"0.62036616",
"0.6181011",
"0.6166424",
"0.6125414",
"0.6123718",
"0.6110635",
"0.6095038",
"0.60816073",
"0.6081332",
"0.60729927",
"0.6063693",
"0.60369325",
"0.6015783",
"0.600497",
"0.60035276",
"0.59963036",
"0.59731",
"0.596542",
"0.59589404",
"0.5918919",
"0.5896752",
"0.5890394",
"0.5884815",
"0.58704144",
"0.5859556",
"0.58146393",
"0.5811229",
"0.5798598",
"0.5794807",
"0.5780571",
"0.5780533",
"0.57749987",
"0.5773745",
"0.57635117",
"0.5761066",
"0.5758737",
"0.575027",
"0.57371026",
"0.5735848",
"0.5731581",
"0.5722704",
"0.5720136",
"0.5717866",
"0.5709911",
"0.5709403",
"0.570585",
"0.57007974",
"0.56955945",
"0.56935585",
"0.568953",
"0.568953",
"0.56893957",
"0.568603",
"0.5659358",
"0.5645958",
"0.5639476",
"0.56247246",
"0.5614751",
"0.5614438",
"0.5612325",
"0.5607695",
"0.56065154",
"0.5603923",
"0.55912787",
"0.55889416",
"0.55693287"
] |
0.58904207
|
55
|
Get current model (as indicated by bold name in the explorer view) if none then the function returns null It's an error condition if this function returns null while the explorer view is nonempty
|
public Model getCurrentModel() {
return currentModel;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Object getModel() {\n\t\treturn null;\n\t}",
"public String getModel()\n\t{\n\t\treturn null;\n\t}",
"public Object getModel();",
"@Override\r\n\tpublic Object getModel() {\n\t\treturn null;\r\n\t}",
"public String getModel();",
"public static Model getSelectedModel() {\n\t\tString path = SELECTED_MODEL;\n\t\tHttpResponse<String> response = sendRequest(path);\n\t\tif(response == null) return null;\n\t\treturn getSelectedModel(response);\n\t}",
"protected E getModel ()\n\t{\n\t\treturn model;\n\t}",
"@Override\n\tpublic Object getModel() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Object getModel() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic ODocument getModelSelected() {\n\t\treturn null;\n\t}",
"public static Model getDefaultModel ()\n\t{\n\t\treturn DevelopmentModel.getModel((FileObject)null); }",
"@Override\n\tpublic Object getModelSelected() {\n\t\treturn null;\n\t}",
"Model getModel();",
"Model getModel();",
"Model getModel();",
"public OntModel getModel()\r\n\t{\r\n\t\treturn this.ONT_MODEL;\r\n\t}",
"public Model getModel () { return _model; }",
"@Override\r\n public String getModel() {\n return null;\r\n }",
"public String getModel() {\n return this.model;\r\n }",
"public String getModel()\n\t{\n\t\treturn model;\n\t}",
"public Model getModel()\n\t{\n\t\treturn this.model;\n\t}",
"@Override\r\n\tpublic Model getModel() {\n\t\treturn this.model;\r\n\t}",
"public String getModel() {\r\n return (String) store.get(Names.model);\r\n }",
"public String getModel()\n {\n return model;\n }",
"@Override\n\tpublic String getModel() {\n\t\treturn model;\n\t}",
"public Model getModel(){\r\n return model;\r\n }",
"java.lang.String getModel();",
"private EObject getRoot(Object receiver) {\r\n\t\tEObject root = null;\r\n\r\n\t\tif(receiver instanceof ISelection) {\r\n\t\t\tISelection selection = (ISelection)receiver;\r\n\t\t\tif(selection.isEmpty()) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\ttry {\r\n\t\t\t\t//this is the case where the selection is on the Project Explorer\r\n\t\t\t\tIStructuredSelection selectionstructured = (IStructuredSelection)selection;\r\n\r\n\t\t\t\tObject selectedElement = selectionstructured.getFirstElement();\r\n\r\n\t\t\t\tObject selectedAdapter = Platform.getAdapterManager().getAdapter(selectedElement, IFile.class);\r\n\r\n\r\n\t\t\t\tif(selectedAdapter instanceof IFile) {\r\n\t\t\t\t\tfinal IFile selectedFile = (IFile)selectedAdapter;\r\n\t\t\t\t\tModelSet modelSet = new ModelSet();\r\n\t\t\t\t\tModelsReader reader = new ModelsReader();\r\n\t\t\t\t\treader.readModel(modelSet);\r\n\r\n\r\n\t\t\t\t\tIPath workspacePath = selectedFile.getFullPath();\r\n\r\n\t\t\t\t\tURI workspaceURI = URI.createPlatformResourceURI(workspacePath.toString(), true);\r\n\t\t\t\t\tmodelSet.loadModels(workspaceURI);\r\n\r\n\t\t\t\t\tUmlModel openedModel = (UmlModel)modelSet.getModel(UmlModel.MODEL_ID);\r\n\t\t\t\t\tif(openedModel != null) {\r\n\t\t\t\t\t\troot = openedModel.lookupRoot();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//this is the case where the selection is on the Model Explorer\r\n\t\t\t\t\tServiceUtilsForSelection serviceUtils = ServiceUtilsForSelection.getInstance();\r\n\t\t\t\t\tUmlModel openedModel = (UmlModel)serviceUtils.getModelSet(selection).getModel(UmlModel.MODEL_ID);\r\n\t\t\t\t\tif(openedModel != null) {\r\n\t\t\t\t\t\troot = openedModel.lookupRoot();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t//Ignored: The selection cannot be used to retrieve the ServicesRegistry.\r\n\t\t\t\t//Do not log exceptions: this is just not a Papyrus/RobotML model\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn root;\r\n\t}",
"public ContainmentModel getModel()\n {\n return m_model;\n }",
"NCModel getModel();",
"public String getModel() {\r\n return model;\r\n }",
"public String getModel() {\n\t\treturn model; \n\t}",
"public Model getModel() {\n\t\treturn model;\n\t}",
"public Model getModel() {\n\t\treturn model;\n\t}",
"public Model getModel() {\n\t\treturn model;\n\t}",
"public String getModel() {\n return model;\n }",
"public String getModel() {\n return model;\n }",
"@Override\r\n\tpublic Object getModel() {\n\t\treturn searchInfo;\r\n\t}",
"public ViewObjectImpl getLovModelVO1() {\n return (ViewObjectImpl) findViewObject(\"LovModelVO1\");\n }",
"@Override\n\t\tpublic int getModel() {\n\t\t\treturn 0;\n\t\t}",
"public DefaultMutableTreeNode getModel(){\n return addToModel(parent);\n }",
"@Override\n\tpublic MenuModel getModel() {\n\t\treturn mm;\n\t}",
"@Override\n\tpublic CalEntity getModel() {\n\t\treturn model;\n\t}",
"@Override\r\n\tpublic T getModel() {\n\t\treturn model;\r\n\t}",
"public MediaModel getModel()\n\t{\n\t\treturn model;\n\t}",
"ModelData getModel();",
"public XNode getTargetModel() {\n\t\tString name = getName();\n\t\tif (\"*\".equals(name)) { // any in root selection\n\t\t\tXElement result = new XElement(\"$any\", null, _definition);\n\t\t\tresult.setSPosition(getSPosition());\n\t\t\tresult.setXDPosition(_definition.getXDPosition() + \"*\");\n\t\t\tresult._moreAttributes = 'T';\n\t\t\tresult._moreElements = 'T';\n\t\t\tresult.setUnbounded();\n\t\t\treturn result;\n\t\t}\n\t\tXMDefinition xdef = getXDPool().getXMDefinition(_refXdefName);\n\t\tif (xdef == null) { // X-definition not found\n\t\t\treturn null;\n\t\t}\n\t\tint ndx = name.indexOf('/');\n\t\tString mName = ndx > 0 ? name.substring(0, ndx) : name; //model name\n\t\tString uri;\n\t\tif (getKind() <= 1 && _parent.getXMDefinition() != xdef) {\n\t\t\t// uses or inplements\n\t\t\turi = _parent.getNSUri();\n\t\t} else {\n\t\t\turi = getNSUri();\n\t\t}\n\t\tXElement xe = (XElement) xdef.getModel(uri, mName);\n\t\tif (xe == null) {\n\t\t\tString s = mName + \"$any\";\n\t\t\txe = (XElement) xdef.getModel(getNSUri(), s);\n\t\t\tif (xe != null) {\n\t\t\t\tsetName(s);\n\t\t\t} else {\n\t\t\t\tXPool xp = (XPool) xdef.getXDPool();\n\t\t\t\ts = _refXdefName + '#' + mName;\n\t\t\t\tif (ndx > 0) {\n\t\t\t\t\tString t = name.substring(ndx);\n\t\t\t\t\tString u = \"$choice/$choice\";\n\t\t\t\t\tXMNode xn = xp.findModel(s + u + t);\n\t\t\t\t\tif (xn == null) {\n\t\t\t\t\t\tu = \"$mixed/$mixed\";\n\t\t\t\t\t\txn = xp.findModel(s + u + t);\n\t\t\t\t\t}\n\t\t\t\t\tif (xn == null) {\n\t\t\t\t\t\tu = \"$sequence/$sequence\";\n\t\t\t\t\t\txn = xp.findModel(s + u + t);\n\t\t\t\t\t}\n\t\t\t\t\tif (xn != null) {\n\t\t\t\t\t\tsetName(s + u + t);\n\t\t\t\t\t}\n\t\t\t\t\treturn (XNode) xn;\n\t\t\t\t} else {\n\t\t\t\t\tXMNode xn = xp.findModel(s + \"$choice\");\n\t\t\t\t\tif (xn != null) {\n\t\t\t\t\t\tsetName(s + \"$choice\");\n\t\t\t\t\t\treturn (XNode) xn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (xe == null) {\n\t\t\tif (mName.endsWith(\"$choice\")) { // mName may be e.g. name$choice\n\t\t\t\txe = (XElement) xdef.getModel(\n\t\t\t\t\turi,mName.substring(0,mName.length() - \"$choice\".length()));\n\t\t\t}\n\t\t}\n\t\tif (xe != null) {\n\t\t\tif(ndx > 0) {\n\t\t\t\tXMNode xn = XPool.findXMNode(xe, name.substring(ndx+1), 0, -1);\n\t\t\t\tif (xn == null) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn (XNode) xn;\n\t\t\t} else if (xe._xon > 0) {\n\t\t\t\tXMNode[] models = xe.getChildNodeModels();\n\t\t\t\tif (models.length==1 && models[0].getKind()==XMNode.XMELEMENT) {\n\t\t\t\t\treturn (XElement) models[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn xe;\n\t}",
"public interface IModelRoot extends org.eclipse.wst.sse.sieditor.core.editorfwk.IModelObject {\n\n public boolean addChangeListener(IChangeListener listener);\n\n public boolean removeChangeListener(IChangeListener listener);\n\n public void notifyListeners(IModelChangeEvent event);\n\n public IEnvironment getEnv();\n\n public IModelObject getModelObject();\n\n /**\n * \n * @return the root of all models or this if this is the root of all models\n */\n public IModelRoot getRoot();\n \n}",
"M getModel();",
"public Model getModel() {\n return model;\n }",
"public Model getModel() {\n return model;\n }",
"public Model getModel() {\n return model;\n }",
"public Model getModel() {\n return model;\n }",
"public ProjectModel getCurrentProject() {\n if (projects.size() > 0) {\n return projects.get(0);\n }\n else return null;\n }",
"public Boolean getModel () throws CGException {\n return ivModel;\n }",
"public Object getModel() {\n\t\treturn quest;\r\n\t}",
"SingleDocumentModel getCurrentDocument();",
"public Modello getModello() {\r\n\t\treturn mod;\r\n\t}",
"public Document getModel(){\n return getDocument();\n }",
"public ModelSnapshot getModel() {\n return model;\n }",
"String getModelA();",
"public ViewObjectImpl getFindYourOilVO1() {\n return (ViewObjectImpl) findViewObject(\"FindYourOilVO1\");\n }",
"public ModelElements getModelAccess() {\n\t\treturn pModel;\n\t}",
"@Override\r\n\tpublic Object getModel() {\n\t\treturn this.roomcalander;\r\n\t}",
"public SVGElementModel getRoot() {\n \t\treturn store.getRootItems().get(0);\n \t}",
"public abstract M getModel();",
"public IServiceModel getActiveModel() {\n return activeModel;\n }",
"public InMemoryNodeModel getParentModel()\n {\n return getParentModelSupport().getNodeModel();\n }",
"A getModel();",
"public TreeViewer getTreeView() {\n\t\t// on CM CubridNavigatorView navigatorView =\n\t\t// CubridNavigatorView.getNavigatorView(\"com.cubrid.cubridmanager.host.navigator\");\n\t\t// CubridNavigatorView navigatorView =\n\t\t// CubridNavigatorView.getNavigatorView(CubridQueryNavigatorView.ID);\n\t\t// return navigatorView.getViewer();\n\t\treturn null;\n\t}",
"@Override\n protected Object getModelObject()\n {\n return frame;\n }",
"public Model getModel() {\n return petal_model;\n }",
"public DefaultTreeModel getModel()\n {\n return new DefaultTreeModel(root);\n }",
"public C2291c GetViewModel() {\n return this.f14954b;\n }",
"public String getModelName()\r\n {\r\n return modelName;\r\n }",
"public RegionModel getModel() {\n\t\treturn model;\n\t}",
"private TopComponentContextSubModel getContextSubModel() {\n if (topComponentContextSubModel == null) {\n topComponentContextSubModel = new TopComponentContextSubModel();\n }\n return topComponentContextSubModel;\n }",
"public Element loadModel(String name){\n\t\tElement load = FactoryManager.getFactoryManager().getScriptManager()\r\n\t\t\t.getReadScript().getRootElement(allModels);\r\n\t\t\r\n\t\t//get the model wanted\r\n\t\tload = load.getChild(name);\r\n\t\t\r\n\t\t//return the element wanted\r\n\t\treturn load;\t\t\r\n\t}",
"@Override\n\tpublic ReportData getModel() {\n\t\treturn CurrentReportdata;\n\t}",
"public ViewMetamodel getMetamodel();",
"public EPStatementObjectModel getModel() {\n return model;\n }",
"@Override\r\n\tpublic MarcaOsEntity getModelBean() {\n\t\treturn currentBean;\r\n\t}",
"@Override\r\n\tpublic Visit getModel() {\n\t\treturn form;\r\n\t}",
"private OBOClass getModelTerm() {\n if (!this.selectionModel.getSelected().isEmpty()) {\n CharacterI c = this.selectionModel.getSelected().get(0);\n return c.getValue(charField).getOboClass();\n } else {\n return null;\n } \n }",
"@Override\n\tpublic String getModel() {\n\t\treturn \"cool model\";\n\t}",
"public Axiom getSelected() {\r\n\treturn view.getSelected();\r\n }",
"public DataModel getModel() {\n return model;\n }",
"public Behavior getModel(){\n\t\treturn (this.model);\n\t}",
"public AbstractModel getModel() {\n return model;\n }",
"public Model openDefaultModel() throws JenaProviderException {\n\t\treturn openModel(getDefaultGraphName());\n\t}",
"public ExplorerManager getExplorerManager() {\n return ExplorerManager.find(this);\n //return manager;\n }",
"@JsonIgnore\n public VM getVM() {\n if (wvm == null || wvm == WVM.Workspace) {\n return null;\n }\n switch (wvm) {\n case Version:\n return VM.Version;\n default:\n return VM.Microversion;\n }\n }",
"private IJavaModel getJavaModel() {\n\t\treturn JavaCore.create(getWorkspaceRoot());\n\t}",
"public ViewObjectImpl getEmployeesView1() {\n return (ViewObjectImpl)findViewObject(\"EmployeesView1\");\n }",
"@Override\n\tpublic TenantsEntity getModel() {\n\t\treturn null;\n\t}",
"public ViewObjectImpl getFindYourStockistVO1() {\n return (ViewObjectImpl) findViewObject(\"FindYourStockistVO1\");\n }",
"public IFile getModelFile() {\r\n \t\treturn newFileCreationPage.getModelFile();\r\n \t}",
"private DynaBean findRootModelNode(DynaBean parentContextBean) {\n\t\tif (parentContextBean != null\n\t\t\t\t&& DataStoreValidationUtil.isReadable(parentContextBean, ModelNodeWithAttributes.MODEL_NODE)) {\n\t\t\tModelNode modelNode = (ModelNode) parentContextBean.get(ModelNodeWithAttributes.MODEL_NODE);\n\t\t\tif (modelNode != null) {\n\t\t\t\tSchemaPath parentSchemaPath = modelNode.getModelNodeSchemaPath().getParent();\n\t\t\t\tSchemaNode parentSchemaNode = modelNode.getMountRegistry().getDataSchemaNode(parentSchemaPath);\n\t\t\t\tif (parentSchemaNode != null && DataStoreValidationUtil.isReadable(parentContextBean, ModelNodeWithAttributes.PARENT)) {\n\t\t\t\t\treturn findRootModelNode((DynaBean) parentContextBean.get(ModelNodeWithAttributes.PARENT));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn parentContextBean;\n\t}",
"View getActiveView();",
"public C2291c GetViewModel() {\n return this.f12125b;\n }"
] |
[
"0.67930996",
"0.66615254",
"0.65323275",
"0.64590406",
"0.644636",
"0.64301914",
"0.6365524",
"0.6360662",
"0.6360662",
"0.6334644",
"0.6320711",
"0.62225616",
"0.62083304",
"0.62083304",
"0.62083304",
"0.61688787",
"0.61647195",
"0.6161836",
"0.6135336",
"0.6123614",
"0.61200297",
"0.6117624",
"0.6104959",
"0.608976",
"0.60865027",
"0.6084939",
"0.60812956",
"0.60798234",
"0.6077773",
"0.6069445",
"0.60539955",
"0.6052357",
"0.59944504",
"0.59944504",
"0.59944504",
"0.5982164",
"0.5982164",
"0.59635353",
"0.5960295",
"0.5953303",
"0.5942141",
"0.5912832",
"0.59122926",
"0.59009147",
"0.58867055",
"0.58742166",
"0.5870674",
"0.586906",
"0.58532107",
"0.5844067",
"0.5844067",
"0.5844067",
"0.5844067",
"0.583281",
"0.5819416",
"0.5791458",
"0.5786187",
"0.5774502",
"0.57638556",
"0.57535344",
"0.57332146",
"0.5731532",
"0.5730205",
"0.5728589",
"0.5728336",
"0.5724476",
"0.57226074",
"0.5713135",
"0.5701096",
"0.56807",
"0.5672085",
"0.56570864",
"0.5655855",
"0.56400824",
"0.56367886",
"0.5628795",
"0.562857",
"0.5625642",
"0.5618704",
"0.56017387",
"0.55855536",
"0.5581234",
"0.5579541",
"0.5573598",
"0.55662346",
"0.5565851",
"0.5565756",
"0.55643636",
"0.5561482",
"0.55564946",
"0.55528736",
"0.5540487",
"0.55390745",
"0.55386674",
"0.55289865",
"0.5525785",
"0.55248785",
"0.5508608",
"0.5502558",
"0.5500018"
] |
0.6331511
|
10
|
hasModel checks if the passed in model is already loaded.
|
public boolean hasModel(Model aModel) {
for(int i=0; i<models.size(); i++){
if (models.get(i).equals(aModel))
return true;
}
return false;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"boolean hasModel();",
"boolean hasModel();",
"public boolean hasModel() {\n if (this.model == null) {\n throw new NullPointerException(\"Model not set.\");\n }\n return true;\n }",
"public boolean hasModel() {\n return false;\r\n }",
"public boolean modelPresent() {\r\n return models.size() > 0;\r\n }",
"public static boolean isModelInitialized() {\r\n return cellModel != null;\r\n }",
"boolean hasDeployedModel();",
"public boolean ifExists(Model model)\n\t{\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tCursor cursor = null;\n\t\tString checkQuery = \"SELECT \"+ KEY_NAME + \" FROM \" + TABLE_SHOP + \" WHERE \" + KEY_NAME + \"= '\"+model.getName() + \"'\";\n\t\tcursor= db.rawQuery(checkQuery,null);\n\t\tboolean exists = (cursor.getCount() > 0);\n\t\tcursor.close();\n\t\treturn exists;\n\t}",
"public boolean loadModel() throws Exception{\r\n\t\t\r\n\t\tboolean rB = false ;\r\n\t\tModelCatalogItem mcItem ;\r\n\t\t\r\n\t\t// before, we have determined name and version according to the request options (e.g. \"latest\")\r\n\t\tmcItem = soappModelCatalog.getItemByModelname( activeModel, activeVersion ); \r\n\t\t// here, an active version should always be defined, if not, the first one will be selected\r\n\t\t\r\n\t\t\r\n\t\tif (mcItem != null){\r\n\t\t\t\t\t\t\t\t\t\t\tout.print(2, \"loading resources for requested model <\"+activeModel+\">, version <\"+activeVersion+\"> ... \") ;\r\n\t\t\t\r\n\t\t\tif ((somData==null) || (somData.getData().getColumnHeaders().size()==0)){\t\t\t\t\t\t\r\n\t\t\t\tsomApplication.loadSource();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// this also sets the data\r\n\t\t\tsoappTransformer = loadSomAppTransformer(mcItem);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\trB= transformIncomingData();\r\n\t\t\t\r\n\t\t\tsoappClassifier = loadSomAppClassifier(mcItem);\r\n\r\n\t\t\trB= (soappTransformer!=null) && (soappClassifier!=null);\r\n\t\t}else{\r\n\t\t\tout.print(2, \"identification resources for requested model <\"+activeModel+\"> failed.\") ;\r\n\t\t}\r\n\t\treturn rB;\r\n\t}",
"boolean isVirtualModel(Object modelID) throws Exception;",
"public final boolean isDeclared(Model model)\n {\n String id = model.getId();\n return id != null && isDeclared(id);\n }",
"public static boolean isModel(Class<?> type) {\n\t\treturn isSubclassOf(type, Model.class);\n\t}",
"private boolean assertModelImplementation() {\r\n\t\tboolean isValid = assertNotEmpty(cmpCfg.getModelImplementation(),\r\n\t\t\t\tYValidationAspekt.IMPL_IS_MISSING);\r\n\t\tif (isValid) {\r\n\r\n\t\t\tfinal Class modelImpl = assertLoadingClass(cmpCfg.getModelImplementation(),\r\n\t\t\t\t\tYValidationAspekt.IMPL_NOT_LOADABLE);\r\n\r\n\t\t\tif (isValid = (modelImpl != null)) {\r\n\r\n\t\t\t\tif (!modelImpl.equals(cmpHandler.getModelImplementation())) {\r\n\t\t\t\t\tthrow new IllegalStateException(\"Model implementation class mismatch\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfinal Set<YValidationAspekt> _implErrors = this.validateImplementationClass(modelImpl);\r\n\r\n\t\t\t\tfor (final YValidationAspekt problem : _implErrors) {\r\n\t\t\t\t\tthis.addValidationProblem(problem);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn isValid;\r\n\t}",
"boolean hasSemanticLangidModelName();",
"public boolean addNewModel(SVMmodel newModel) {\n\n boolean canAdd = true;\n\n for(SVMmodel model : svmModels.values()) {\n if(model.containsTheSounds( true, newModel.getSounds())) {\n canAdd = false;\n }\n }\n\n if(canAdd) {\n svmModels.put(newModel.getName(), newModel);\n }\n\n return canAdd;\n }",
"boolean modelSupports(Object modelID, int modelConstant) throws Exception;",
"public boolean supports(DataModel model) {\n //this template simply returns true, replace as needed.\n return model.getData() instanceof NWBModel;\n }",
"public void loadModel(int modelId) {\n \t\tif(this.openGLModelConfiguration != null) {\r\n \t\t\tthis.fireOnModelDataEvent(this.openGLModelConfiguration, false);\r\n \t\t} else {\r\n \t\t\tcacheManager.readModelAsync(modelId, this);\r\n \t\t}\r\n \t}",
"public abstract boolean modelFileExists(String filename);",
"boolean hasModelDelta();",
"boolean isApplicable(final T model);",
"public boolean isInputModelReady()\n {\n return inputModelReady;\n }",
"boolean hasExternalAttributionModel();",
"@Override\n\tpublic boolean isLoad() {\n\t\treturn false;\n\t}",
"boolean canRender(IModel model, Entity entity);",
"public boolean isAtStart() {\n return models.indexOf(activeModel) == 0;\n }",
"protected boolean testRobotmlModelNature(Object receiver) {\r\n\t\tboolean isRobotmlModel = false;\r\n\r\n\r\n\r\n\t\tEObject root = getRoot(receiver);\r\n\t\tif(root instanceof Package) {\r\n\t\t\tPackage rootPackage = (Package)root;\r\n\t\t\tProfile profile = rootPackage.getAppliedProfile(PLASMA_PROFILE_ELEM_NAME);\r\n\t\t\treturn profile != null;\r\n\r\n\t\t\t//FIX: UMLUtil.getProfile() loads the profile into the resource set. This is not desired.\r\n\t\t\t//\r\n\t\t\t//\t\t\tProfile robotml = UMLUtil.getProfile(RobotMLPackage.eINSTANCE, root);\r\n\t\t\t//\r\n\t\t\t//\t\t\tif(((Package)root).isProfileApplied(robotml)) {\r\n\t\t\t//\t\t\t\tisRobotmlModel = true;\r\n\t\t\t//\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\treturn isRobotmlModel;\r\n\t}",
"@Override\n\tpublic boolean isLocallyLoaded(String instanceId)\n\t{\n\t\treturn m_models.isLocal(instanceId);\n\t}",
"public static boolean hasMediaItem(String id, org.semanticwb.model.SWBModel model)\r\n {\r\n return (getMediaItem(id, model)!=null);\r\n }",
"public boolean shouldLoad() {\n return load;\n }",
"public boolean isLoaded();",
"public boolean isRequired() {\n \treturn model.isRequired();\n }",
"public boolean isModelChartIsVisible();",
"@Override\n\tpublic void load(ModelInfo info) {\n\t}",
"public Boolean getModel () throws CGException {\n return ivModel;\n }",
"public static boolean hasAlbumTitle(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\treturn Base.has(model, instanceResource, ALBUMTITLE);\r\n\t}",
"private boolean isPathInModel(TreeTableModel model, TreePath path) {\n\n if (path.getPathCount() == 1) {\n return path.getLastPathComponent() == model.getRoot();\n }\n else {\n if (isPathInModel(model, path.getParentPath()) == false) {\n return false;\n }\n else {\n return model.getIndexOfChild(path.getPath()[path.getPathCount() - 2], path.getLastPathComponent()) != -1;\n }\n }\n }",
"@Override\r\n \tpublic void onModelConfigFromCache(OpenGLModelConfiguration model) {\n \t\tboolean hasNewer = getCurrentTarget().getLatestModelVersion() > \r\n \t\t\t\t\t\t model.getOpenGLModel().getModelVersion();\r\n \t\tthis.fireOnModelDataEvent(model, hasNewer);\r\n \t}",
"public boolean hasSemanticLangidModelName() {\n return ((bitField0_ & 0x00000002) != 0);\n }",
"public boolean isSetModelo() {\r\n return this.modelo != null;\r\n }",
"public boolean isPreferredTo(ModelFile model) {\n if (model == null) {\n return true;\n }\n\n // A language-specific model is preferred to a language independent\n // model.\n if (!mLanguageIndependent && model.mLanguageIndependent) {\n return true;\n }\n\n // A higher-version model is preferred.\n if (getVersion() > model.getVersion()) {\n return true;\n }\n return false;\n }",
"public boolean hasTaskContextModel() {\n\t\tFile folder = new File(folderPath);\n\t\t\n\t\tFile[] jsonFiles = folder.listFiles(jsonfilter);\n\t\t\n\t\tif ((jsonFiles.length >0)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isLoaded() {\n return _id != null;\n }",
"@Test\r\n\t@Order(2)\r\n\tvoid testModel() {\r\n\t\trobot.setModel(null);\r\n\t\tassertNotEquals(null, robot.getModel(),\"Model test failed\\nREASON: null model not allowed!\");\r\n\t}",
"public boolean validateModel(){\r\n System.out.println(\"Validated!\");\r\n return true;\r\n }",
"public void addModel(SimpleModel model) {\n Preconditions.checkState(!registered);\n Preconditions.checkNotNull(model.getFullName());\n Preconditions.checkArgument(!models.containsKey(Ascii.toLowerCase(model.getFullName())));\n Preconditions.checkArgument(!modelsById.containsKey(model.getId()));\n String fullName = model.getFullName();\n models.put(Ascii.toLowerCase(fullName), model);\n modelsById.put(model.getId(), model);\n }",
"public boolean isLoaded() {\n\t\treturn lib != null;\n\t}",
"public void testModelIntegrity() {\n \t\tStructureNode modelRoot = Ajde.getDefault().getStructureModelManager().getStructureModel().getRoot();\n \t\tassertTrue(\"root exists\", modelRoot != null);\t\n \t\t\n \t\ttry {\n \t\t\ttestModelIntegrityHelper(modelRoot);\n \t\t} catch (Exception e) {\n \t\t\tassertTrue(e.toString(), false);\t\n \t\t}\n \t}",
"@SuppressWarnings({\"unused\", \"resource\"})\n void isSatisfiableAndHasModel(int maxSizeOfModel) throws SolverException, InterruptedException {\n final BooleanFormulaManager bmgr = context.getFormulaManager().getBooleanFormulaManager();\n if (bmgr.isFalse(formulaUnderTest)) {\n failWithoutActual(\n Fact.fact(\"expected to be\", \"satisfiable\"),\n Fact.fact(\"but was\", \"trivially unsatisfiable\"));\n return;\n }\n\n try (ProverEnvironment prover = context.newProverEnvironment(ProverOptions.GENERATE_MODELS)) {\n prover.push(formulaUnderTest);\n if (!prover.isUnsat()) {\n // check whether the model exists and we can iterate over it.\n // We allow an empty model, but it must be available.\n try (Model m = prover.getModel()) {\n for (ValueAssignment v : m) {\n // ignore, we just check iteration\n }\n }\n @SuppressWarnings(\"unused\")\n List<ValueAssignment> lst = prover.getModelAssignments();\n Truth.assertThat(lst.size()).isAtMost(maxSizeOfModel);\n return; // success\n }\n }\n\n reportUnsatCoreForUnexpectedUnsatisfiableFormula();\n }",
"protected Boolean exists() {\n return nonNull(getModified()) && nonNull(getInteractionModel());\n }",
"public static void validateOveride(Model model)\r\n\t{\r\n\t\t// TODO\r\n\r\n\t}",
"public static Boolean ifModelTagExistsInPayload(GenericRecord record){\n\t\t Schema schema = record.getSchema();\n\t\t for (Schema.Field field : schema.getFields()){\n\t\t\t if (field.name().equals(Constants.MODEL_TAG)) return true;\n\t }\n\t\t return false;\n\t }",
"boolean isForceLoaded();",
"public boolean selectFromAvailableModels() throws Exception{\r\n\t\t\r\n\t\tboolean rB=false;\r\n\t\t\t\r\n\t\tbaseFolder = soappProperties.getBaseModelFolder() ;\r\n\t\t\t\t\t // sth like: \"D:/data/projects/_classifierTesting/bank2/models\"\r\n\t\t\r\n\t\tactiveModel = soappProperties.getActiveModel() ; // sth like \"bank2\" \r\n\t\t// this refers to the name of the project as it is contained in the model file!!\r\n\t\t// on first loading, a catalog of available model will be created for faster access if it does not exists\r\n\t\r\n\t\tif (activeModel.length()>0){ \r\n\t\t\t\t\t\t\t\t\t\t\tout.print(2, \"checking model catalog associated with selected project ...\") ;\r\n\t\t\tcheckCreateLocationCatalog() ;\r\n\t\t} else{\r\n\t\t\t// alternatively, we set the active model to blank here, and provide the package name ;\r\n\t\t\t// whenever the active model name is given (and existing) it will be preferred!\r\n\t\t\t \r\n\t\t\tmodelPackageName = soappProperties.getModelPackageName();\r\n\t\t\tactiveModel = getModelThroughPackage(modelPackageName ) ;\r\n\t\t}\r\n\t\t\r\n\t\t// now reading from the modelcatalog.dat\r\n\t\t\r\n\t\t/*\r\n\t \t_MODELSELECT_LATEST = 1;\r\n\t\t_MODELSELECT_FIRSTFOUND = 2;\r\n\t\t_MODELSELECT_BEST = 4;\r\n\t\t_MODELSELECT_ROBUST = 8;\r\n\t\t_MODELSELECT_VERSION = 16 ;\r\n\t\t */\r\n\t\tModelCatalogItem mcItem= null, mci = null ;\r\n\r\n\t\tif (soappModelCatalog.size()>0){\r\n\t\t\tint m=0;\r\n\t\t\tboolean mciOK=false;\r\n\t\t\t\r\n\t\t\twhile ( (mciOK==false) && (mcItem==null) && (m<soappModelCatalog.size())){\r\n\t\t\t\t\r\n\t\t\t\tif (soappProperties.getModelSelectionMode() == SomAppProperties._MODELSELECT_FIRSTFOUND){\r\n\t\t\t\t\tmci = soappModelCatalog.getItem(m);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (soappProperties.getModelSelectionMode() == SomAppProperties._MODELSELECT_LATEST){\r\n\t\t\t\t\tmci = soappModelCatalog.getLatestItem();\r\n\t\t\t\t}\r\n\t\t\t\tif (soappProperties.getModelSelectionMode() == SomAppProperties._MODELSELECT_BEST){\r\n\t\t\t\t\tmci = soappModelCatalog.getBestItem();\r\n\t\t\t\t}\r\n\t\t\t\tif (soappProperties.getModelSelectionMode() == SomAppProperties._MODELSELECT_VERSION){\r\n\t\t\t\t\tmci = soappModelCatalog.getItemByModelname( activeModel, soappProperties.preferredModelVersion ) ;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// checking whether the model contains the required fields mcItem.requiredfields\r\n\t\t\t\tif (modelCheckRequirements(mci) == false ){\r\n\t\t\t\t\tsoappModelCatalog.addToExcludedItems(mci);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tmciOK=true;\r\n\t\t\t\t\tmcItem = mci;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tm++;\r\n\t\t\t} // ->\r\n\t\t\t\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tmcItem=null;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tactiveModel = \"\" ;\r\n\t\tactiveVersion = \"\" ;\r\n\t\t\r\n\t\tif (mcItem!=null){\r\n\t\t\tactiveVersion = mcItem.modelVersion;\r\n\t\t\tactiveModel = mcItem.modelName;\r\n\t\t\trB=true;\r\n\t\t\t\r\n\t\t\tif (activeModel.length()==0){\r\n\t\t\t\trB = false;\r\n\t\t\t}\r\n\t\t\tif (activeVersion.length()==0){\r\n\t\t\t\trB = false;\r\n\t\t\t}\r\n\r\n\t\t}else{ // mcItem ?\r\n\t\t\tout.print(2,\"No matching model (by required fields) found in the list (n=\"+soappModelCatalog.size()+\") of available models.\");\r\n\t\t}\r\n\t\treturn rB;\r\n\t}",
"protected final Model loadModel(String path, RenderOptions options) {\n // Builtin models\n if (path.equals(\"builtin/generated\")) {\n return new GeneratedModel();\n }\n\n Model model = openGsonObject(Model.class, ResourceType.MODELS, path);\n if (model == null) {\n Logging.LOGGER_MAPDISPLAY.once(Level.WARNING, \"Failed to load model \" + path);\n return null;\n }\n\n // Handle overrides first\n if (model.overrides != null && !model.overrides.isEmpty()) {\n for (Model.ModelOverride override : model.overrides) {\n if (override.matches(options) && !override.model.equals(path)) {\n //System.out.println(\"MATCH \" + override.model + \" \" + options);\n return this.loadModel(override.model, options);\n }\n }\n }\n\n // Insert the parent model as required\n if (model.getParentName() != null) {\n Model parentModel = this.loadModel(model.getParentName(), options);\n if (parentModel == null || parentModel.placeholder) {\n Logging.LOGGER_MAPDISPLAY.once(Level.WARNING, \"Parent of model \" + path + \" not found: \" + model.getParentName());\n return null;\n }\n model.loadParent(parentModel);\n }\n\n // Make all texture paths absolute\n model.build(this, options);\n return model;\n }",
"boolean isLoaded();",
"@java.lang.Override\n public boolean hasObject() {\n return object_ != null;\n }",
"public StillModel loadModel(String filepath);",
"public void testGetModel() {\n System.out.println(\"getModel\");\n Wizard instance = new Wizard();\n WizardModel result = instance.getModel();\n assertNotNull(result);\n }",
"public boolean isLoaded() \n\t{\n\t return htRecords != null ;\n\t}",
"void updateModel() {\n updateModel(false);\n }",
"public void \n\t\tremove_model\n\t\t( VirtualModelFileInput model ) \n\t\t{\n\t\t\tString full_path\n\t\t\t\t= model.getAbsolutePath();\n\t\t\tSystem.out.println(full_path);\n\t\t\tif( this.snapshot_models.containsKey( full_path )){\n\t\t\t\tSystem.out.println(\"Contained.\");\n\t\t\t\tSet<File> models\n\t\t\t\t\t= this.snapshot_models.get( full_path );\n\t\t\t\tmodels.remove(model);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"That is not contained.\");\n\t\t\t}\n\t\t}",
"public boolean checkForSave(String msg) {\r\n \t\t// Checks if there's an old graph to save\r\n \t\tif (model != null && model.toBeSaved()) {\r\n \t\t\tint resultValue = JOptionPane.showConfirmDialog(mainWindow, msg, \"JMODEL - Warning\", JOptionPane.YES_NO_CANCEL_OPTION,\r\n \t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n \t\t\tif (resultValue == JOptionPane.YES_OPTION) {\r\n \t\t\t\tsaveModel();\r\n \t\t\t\treturn true;\r\n \t\t\t}\r\n \t\t\tif (resultValue == JOptionPane.CANCEL_OPTION) {\r\n \t\t\t\treturn true;\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn false;\r\n \t}",
"public boolean buildModel() {\n \treturn buildModel(false, false);\n }",
"private void initializeModel() {\n\t\t\n\t}",
"public static boolean hasResourceType(String id, org.semanticwb.model.SWBModel model)\r\n {\r\n return (getResourceType(id, model)!=null);\r\n }",
"public boolean hasUnsavedParts() { return (bSave != null ? bSave.isEnabled() : false); }",
"protected boolean supportsInteractionModel(final IRI interactionModel) {\n return getServices().getResourceService().supportedInteractionModels().contains(interactionModel);\n }",
"protected boolean isLoaded()\n {\n return m_fLoaded;\n }",
"public boolean checkLoadEnable() {\n \r\n int tableRow = sflp.getXRow() + 1; // Adjusted by 1 to account for the table header\r\n int tableColumn = sflp.getXColumn();\r\n if (tableColumn < 0) return false;\r\n \r\n TableModel model = sflp.getTable().getModel();\r\n String fieldSummary = \"\";\r\n for (int i = 0; i < tableColumn; i++) {\r\n // System.out.print(model.getColumnName(i) + (i + 1 == tableColumn ? \"\\n\" : \", \"));\r\n fieldSummary += model.getColumnName(i) + (i + 1 == tableColumn ? \"\" : \", \");\r\n }\r\n \r\n sflp.setFieldsText(fieldSummary);\r\n \r\n if (tableRow >= 1 && tableColumn >= 0) {\r\n setLoadEnabled(true);\r\n return true;\r\n } else {\r\n setLoadEnabled(false);\r\n return false;\r\n }\r\n }",
"public boolean hasObject() {\n return objectBuilder_ != null || object_ != null;\n }",
"boolean hasHas();",
"private static <T> void doWaitForTableModel(ThreadedTableModel<T, ?> model) {\n\t\twaitForSwing();\n\n\t\tboolean didWait = false;\n\t\tint waitTime = 0;\n\t\twhile (model.isBusy()) {\n\t\t\tdidWait = true;\n\t\t\twaitTime += sleep(DEFAULT_WAIT_DELAY);\n\n\t\t\t// model loading may take longer than normal waits\n\t\t\tif (waitTime >= PRIVATE_LONG_WAIT_TIMEOUT) {\n\t\t\t\tMsg.error(AbstractDockingTest.class, createStackTraceForAllThreads()); // debug\t\t\t\t\n\t\t\t\tString busyState = getBusyState(model);\n\t\t\t\tMsg.error(AbstractDockingTest.class, busyState);\n\t\t\t\tthrow new AssertException(\n\t\t\t\t\t\"Timed-out waiting for table model to load in \" + waitTime + \"ms\");\n\t\t\t}\n\t\t}\n\n\t\twaitForSwing();\n\n\t\tif (didWait) {\n\t\t\t// try again (the idea is that we may have had a small window where the model was\n\t\t\t// not busy, but more work may be pushed on)\n\t\t\twaitForTableModel(model);\n\t\t}\n\t}",
"@Override\n public boolean isAlreadyInDb () {\n try {\n load( idDevice );\n } catch ( EntityNotFoundException e ) {\n return false;\n }\n return true;\n }",
"public boolean hasTexture()\r\n\t{\r\n\t\treturn texture != null;\r\n\t}",
"@Before\n\tpublic void loadModel() {\n\t\tloader.unloadAll();\n\n\t\tmodel = loader\n\t\t\t\t.loadViaXslt(\"/net/meisen/dissertation/performance/implementations/similarity/tida/tida-model-timeSeriesSimilarityEvaluator.xml\");\n\t\tevaluator = new TimeSeriesSimilarityEvaluator(model);\n\t}",
"private void initializeModel() {\n\t\tmodel = new Model();\n\n\t\t// load up playersave\n\t\ttry {\n\t\t\tFileInputStream save = new FileInputStream(\"playersave.ser\");\n\t\t\tObjectInputStream in = new ObjectInputStream(save);\n\t\t\tmodel = ((Model) in.readObject());\n\t\t\tin.close();\n\t\t\tsave.close();\n\t\t\tSystem.out.println(\"playersave found. Loading file...\");\n\t\t}catch(IOException i) {\n\t\t\t//i.printStackTrace();\n\t\t\tSystem.out.println(\"playersave file not found, starting new game\");\n\t\t}catch(ClassNotFoundException c) {\n\t\t\tSystem.out.println(\"playersave not found\");\n\t\t\tc.printStackTrace();\n\t\t}\n\t\t\n\t\t// load up customlevels\n\t\ttry {\n\t\t\tFileInputStream fileIn = new FileInputStream(\"buildersave.ser\");\n\t\t\tObjectInputStream in = new ObjectInputStream(fileIn);\n\t\t\tmodel.importCustomLevels(((ArrayList<LevelModel>) in.readObject()));\n\t\t\tin.close();\n\t\t\tfileIn.close();\n\t\t\tSystem.out.println(\"Builder ArrayList<LevelModel> found. Loading file...\");\n\t\t}catch(IOException i) {\n\t\t\t//i.printStackTrace();\n\t\t\tSystem.out.println(\"Builder ArrayList<LevelModel> file not found, starting new game\");\n\t\t\treturn;\n\t\t}catch(ClassNotFoundException c) {\n\t\t\tSystem.out.println(\"Builder ArrayList<LevelModel> not found\");\n\t\t\tc.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t}",
"public final Boolean entryRuleModel() throws RecognitionException {\n Boolean current = false;\n\n Boolean iv_ruleModel = null;\n\n\n try {\n // PsiInternalExUnorderedGroupsTestLanguage.g:72:47: (iv_ruleModel= ruleModel EOF )\n // PsiInternalExUnorderedGroupsTestLanguage.g:73:2: iv_ruleModel= ruleModel EOF\n {\n markComposite(elementTypeProvider.getModelElementType()); \n pushFollow(FollowSets000.FOLLOW_1);\n iv_ruleModel=ruleModel();\n\n state._fsp--;\n\n current =iv_ruleModel; \n match(input,EOF,FollowSets000.FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return current;\n }",
"boolean isSetGradeModelRefs();",
"protected void prepareModel() {\n model();\n }",
"public static boolean isModelWritable(Model model) {\n if (model != null) {\n ModelSource ms = model.getModelSource();\n if (ms.isEditable()) {\n FileObject fo = (FileObject) ms.getLookup().lookup(FileObject.class);\n if (fo != null) {\n return fo.canWrite();\n }\n }\n }\n return false;\n }",
"boolean hasResource();",
"private boolean isDependedOn(ModelPath candidate) {\n Transformer<Iterable<ModelPath>, BoundModelMutator<?>> extractInputPaths = new Transformer<Iterable<ModelPath>, BoundModelMutator<?>>() {\n public Iterable<ModelPath> transform(BoundModelMutator<?> original) {\n return Iterables.transform(original.getInputs(), new Function<ModelBinding<?>, ModelPath>() {\n @Nullable\n public ModelPath apply(ModelBinding<?> input) {\n return input.getPath();\n }\n });\n }\n };\n\n Transformer<List<ModelPath>, List<ModelPath>> passThrough = Transformers.noOpTransformer();\n\n return hasModelPath(candidate, mutators.values(), extractInputPaths)\n || hasModelPath(candidate, usedMutators.values(), passThrough)\n || hasModelPath(candidate, finalizers.values(), extractInputPaths)\n || hasModelPath(candidate, usedFinalizers.values(), passThrough);\n }",
"@java.lang.Override\n public boolean hasSemanticLangidModelName() {\n return ((bitField0_ & 0x00000002) != 0);\n }",
"public boolean hasObject(){\n return _object != null;\n }",
"public void initializeModel(SongModel songmodel)\n {\n this.sm = songmodel;\n }",
"boolean hasEntity();",
"boolean hasEntity();",
"public boolean isLoaded() {\n return m_module.isLoaded();\n }",
"public synchronized boolean isLoaded() {\n\t\treturn _resourceData != null;\n\t}",
"public void openModel() {\r\n \t\tisReleased = true;\r\n \t\tif (checkForSave(\"<html>Save changes before opening a saved model?</html>\")) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tif(animationHolder != null ) {\r\n \t\t\tanimationHolder.stop();\r\n \t\t}\r\n \t\tJMODELModel tmpmodel = new JMODELModel();\r\n \t\tint state = modelLoader.loadModel(tmpmodel, mainWindow);\r\n \t\tif (state == ModelLoader.SUCCESS || state == ModelLoader.WARNING) {\r\n \t\t\tresetMouseState();\r\n \t\t\t// Avoid checkForSave again...\r\n \t\t\tif (model != null) {\r\n \t\t\t\tmodel.resetSaveState();\r\n \t\t\t}\r\n \t\t\tnewModel();\r\n \t\t\t// At this point loading was successful, so substitutes old model\r\n \t\t\t// with loaded one\r\n \t\t\tmodel = tmpmodel;\r\n \t\t\tthis.populateGraph();\r\n \t\t\tsetSelect.setEnabled(true);\r\n \t\t\tcomponentBar.clickButton(setSelect);\r\n \t\t\topenedArchive = modelLoader.getSelectedFile();\r\n \t\t\tmainWindow.updateTitle(openedArchive.getName());\r\n \t\t\t// Removes selection\r\n \t\t\tgraph.clearSelection();\r\n \t\t\t// If model contains results, enable Results Window\r\n \t\t\tif (model.containsSimulationResults()) {\r\n \t\t\t\tif (model.isParametricAnalysisEnabled()) {\r\n \t\t\t\t\tthis.setResultsWindow(new PAResultsWindow(model.getParametricAnalysisModel(), (PAResultsModel) model.getSimulationResults()));\r\n \t\t\t\t\tshowResults.setEnabled(true);\r\n \t\t\t\t} else {\r\n \t\t\t\t\tthis.setResultsWindow(new ResultsWindow(model.getSimulationResults()));\r\n \t\t\t\t\tshowResults.setEnabled(true);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tmodel.resetSaveState();\r\n \t\t\tSystem.gc();\r\n \t\t} else if (state == ModelLoader.FAILURE) {\r\n \t\t\tshowErrorMessage(modelLoader.getFailureMotivation());\r\n \t\t}\r\n \t\t// Shows warnings if any\r\n \t\tif (state == ModelLoader.WARNING) {\r\n \t\t\tnew WarningWindow(modelLoader.getLastWarnings(), mainWindow, modelLoader.getInputFileFormat(), CommonConstants.JSIM).show();\r\n \t\t}\r\n \r\n \t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic void loadModel(File model_file) throws IOException, ClassNotFoundException{\n\t\t// Load Model From File\n\t\tSystem.out.println(\"Loading Training Model. Please wait.\");\n\t\tFileInputStream fileIn = new FileInputStream(model_file);\n\t\tObjectInputStream objIn = new ObjectInputStream(fileIn); \n\t\tmClassifier = (LMClassifier<NGramProcessLM, MultivariateEstimator>) objIn.readObject();\n\t\tobjIn.close();\n\t\tisTrained = true;\n\t\tSystem.out.println(\"Loading Model. Complete.\");\n\t}",
"Model getModel();",
"Model getModel();",
"Model getModel();",
"boolean containsInstance(EObject modelElement);",
"private boolean isSupportedModelElement(ModelElement modelElement, Diagram diagram) {\n Set<Class> allowedElements = DIAGRAM_ELEMENTS_MAP.get(DeployHelper.getTypeInfo(diagram));\n for (Class<?> class1 : allowedElements) {\n if (class1.isAssignableFrom(modelElement.getClass())) {\n return true;\n }\n }\n return false;\n }",
"boolean hasObject();",
"boolean hasObject();",
"boolean hasObject();"
] |
[
"0.80109674",
"0.80109674",
"0.76452196",
"0.7392104",
"0.7049404",
"0.6421111",
"0.63844293",
"0.6257305",
"0.6130644",
"0.60424644",
"0.5862546",
"0.5736296",
"0.5736056",
"0.5719027",
"0.5704388",
"0.5677845",
"0.5658117",
"0.5647659",
"0.56255317",
"0.55301964",
"0.5519929",
"0.5500813",
"0.5383048",
"0.5327097",
"0.52698344",
"0.52504265",
"0.52476406",
"0.5233995",
"0.5227819",
"0.5214605",
"0.51890135",
"0.5184432",
"0.51805514",
"0.51750106",
"0.5143748",
"0.51303905",
"0.5125514",
"0.5125425",
"0.5124806",
"0.5119276",
"0.50843525",
"0.50839007",
"0.5078543",
"0.5076879",
"0.50693333",
"0.50550973",
"0.5055037",
"0.50432914",
"0.50356734",
"0.5026124",
"0.5013322",
"0.5002297",
"0.50014615",
"0.4978219",
"0.49689284",
"0.49633828",
"0.49616042",
"0.49579728",
"0.4947943",
"0.49455833",
"0.4942137",
"0.494168",
"0.49389875",
"0.4932446",
"0.49278557",
"0.49153465",
"0.4907629",
"0.49052528",
"0.48972556",
"0.4888222",
"0.48829347",
"0.4881632",
"0.48731366",
"0.48719323",
"0.4870747",
"0.4869475",
"0.48677236",
"0.48627582",
"0.48499635",
"0.4848763",
"0.484746",
"0.4843313",
"0.48411912",
"0.48398995",
"0.48224354",
"0.48201346",
"0.48181418",
"0.48181418",
"0.48042017",
"0.48036763",
"0.47901917",
"0.47838357",
"0.47685024",
"0.47685024",
"0.47685024",
"0.47679144",
"0.47602278",
"0.47598308",
"0.47598308",
"0.47598308"
] |
0.74685645
|
3
|
Common place to validate new object names to make sure They start with a an alphanumeric contain any combinaton of letters, numbers, _, ., but no special chars.
|
static public boolean validateName(String proposedName, boolean allowSpace)
{
Pattern p;
if (allowSpace)
p = Pattern.compile("[A-Z][A-Z0-9_. -]*", Pattern.CASE_INSENSITIVE);
else
p = Pattern.compile("[A-Z][A-Z0-9_.-]*", Pattern.CASE_INSENSITIVE);
return (p.matcher(proposedName).matches());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private boolean isNameValid(String name) {\n\n }",
"public boolean nameValidation(String username){\n return !(username.isEmpty() || !username.matches(\"[a-zA-Z0-9_-]+\"));\n }",
"private boolean isValidName(String name)\n {\n String reg = \"^[a-zA-Z]+$\";\n return name.matches(reg);\n }",
"private static boolean nameIsValid(String name) {\n if (name.length() < 4 || name.length() > 11)\n return false;\n\n for (int i = 0; i < name.length(); i++) {\n int charIndex = name.charAt(i);\n\n // Each character can only be a letter or number\n if (charIndex < 48 || (charIndex > 57 && charIndex < 65) || (charIndex > 90 && charIndex < 97) || charIndex > 122)\n return false;\n }\n\n return true;\n }",
"public boolean nameValidation(String name) {\n\t char[] chars = name.toCharArray();\n\t int tempNum = 0;\n\t for (char c : chars) {\n\t tempNum += 1;\n\t \tif(!Character.isLetter(c)) {\n\t return false;\n\t }\n\t }\n\t if (tempNum == 0)\n\t \treturn false;\n\n\t return true;\n\t}",
"private static boolean isLegalIdentifier(String str) {\n if (\"\".equals(str)) {\n return false;\n }\n if (str.charAt(0) >= '0' & str.charAt(0) <= '9') {\n return false;\n }\n\n return str.matches(\"^\\\\w+$\");\n }",
"public boolean validateName(String input)//true if valid\n\t{\n\t\t//loop through string verifying for numbers\n\t\tfor(int i = 0;i<input.length(); i++)\n\t\t{\n\t\t\tchar c = input.charAt(i);\n\t\t\t\n\t\t\tif(!Character.isAlphabetic(c))\n\t\t\t{\n\t\t\t if(c == '-' || c == ' ')\n\t\t\t\t{\n\t\t\t\treturn true;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t else return false;\n\t\t\t}\t\n\t\t\t\n\t\t}\n\t\treturn true;\n\t}",
"public boolean isValidName(String proposedName);",
"public static boolean isValidName(String name) {\r\n\t\treturn (name != null && name.matches(\"[a-zA-Z_0-9.-]+\"));\r\n\t}",
"public void validateName(Player player) {\n String originalName = player.name;\n player.name = Text.cleanName(player.name);\n if (!originalName.equals(player.name) || player.name.length() > config.maxNameLength) {\n //name cannot be blank so then replace it with some random name\n if (player.name.replace(\" \", \"\").isEmpty()) {\n player.name = pickFreeName();\n }\n }\n }",
"private boolean isAlpha(String name) {\r\n\t\treturn name.matches(\"^[a-zA-Z0-9_]*$\");\r\n\t}",
"public static boolean isNameValid(String string) {\n if (isBlankOrNull(string)) return false;\n if (string.length() > 45) return false;\n\n return string.matches(\"[a-zA-Z0-9]*\");\n }",
"@Test\n\tpublic void caseNameWithSpecialChar() {\n\t\tString caseName = \"le@d\";\n\t\ttry {\n\t\t\tCaseManagerValidator.isCharAllowed(caseName);\n\t\t} catch (ValidationException e) {\n\t\t}\n\t}",
"public InputValidator validateName_v() {\r\n \t\treturn new InputValidator(new InputValidator.CustomValidator() {\r\n \t\t\t@Override\r\n \t\t\tpublic boolean validate(String originalValue, String proposedValue) {\r\n \t\t\t\tif (! proposedValue.matches(\"[a-zA-Z_][-a-zA-Z0-9_.]*\"))\r\n \t\t\t\t\treturn false;\t// not a decent name\r\n \t\t\t\tif (proposedValue.equals(originalValue))\r\n \t\t\t\t\treturn true;\t// current name is OK\r\n \t\t\t\t// Anything else must be unique among the node names\r\n \t\t\t\treturn network.lookupNode(proposedValue, false) == null;\r\n \t\t\t}\r\n \t\t});\r\n \t}",
"public boolean isValidName(String name)\r\n {\r\n // check for illegal combinations of characters\r\n // this is probably not a complete check, but hopefully it is good enough\r\n if ( (name == null) ||\r\n (name.equals(\"\")) ||\r\n Character.isUpperCase(name.charAt(0)) ||\r\n containsSubString(name, TIGHT_BINDING) ||\r\n containsSubString(name, LOOSE_BINDING) ||\r\n containsSubString(name, SINGLE_MATCH) ||\r\n containsSubString(name, \"/\") ||\r\n containsSubString(name, \" \") ||\r\n containsSubString(name, \"\\t\") ||\r\n containsSubString(name, \"\\n\") ||\r\n name.equals(UNIQUE_NAME) )\r\n {\r\n return false;\r\n }\r\n\r\n return true;\r\n }",
"public static boolean isValidName(String str) {\n if (str != null && str.trim().equals(str) && str.matches(\"^[a-zA-Z ]*$\")){\n return true;\n }\n\n return false;\n }",
"@Test //TEST FIVE\n void testSpacesAndLowercaseBreedName()\n {\n Rabbit_RegEx rabbit_breed = new Rabbit_RegEx();\n rabbit_breed.setBreedName(\"silver fox\");\n assertTrue(rabbit_breed.getBreedName().matches(\"^[A-Za-z][a-zA-Z-][a-zA-z- ]*\"));\n }",
"public boolean validateName(String name)\n\t{\n\n\t\tif (name.matches(\"[a-zA-Z]+\"))\n\n\t\t\treturn true;\n\n\t\tmyName = DEFAULT_NAME;\n\t\treturn false;\n\t}",
"private boolean employeeNameValid(EmployeeDto newEmpDto) {\n\t\tint nameLen = (newEmpDto.getFirstName().length() + newEmpDto.getLastName().length());\n\t\treturn (nameLen >= 2) ? true : false;\n\t}",
"@Test\n\tpublic void caseNameWithWrongLength() {\n\t\tString caseName = \"le\";\n\t\ttry {\n\t\t\tCaseManagerValidator.isCharAllowed(caseName);\n\t\t\tfail();\n\t\t} catch (ValidationException e) {\n\t\t}\n\t}",
"public static boolean isNameValid(String name) {\r\n return name.matches(\"^[a-zA-Z ]+$\");\r\n }",
"public static boolean isValidNameFormat( String source )\n {\n int minNameLength = 3;\n\n return (source != null) && (source.length() >= minNameLength);\n }",
"@Test //TEST FOUR\n void testSpacesAndCapitalsBreedName()\n {\n Rabbit_RegEx rabbit_breed = new Rabbit_RegEx();\n rabbit_breed.setBreedName(\"Netherland Dwarf\");\n assertTrue(rabbit_breed.getBreedName().matches(\"^[A-Za-z][a-zA-Z-][a-zA-z- ]*\"));\n }",
"private boolean isFileNameValid(char[] chars) {\n\n\t\tfor(char Char : chars) {\n\t\t\tif (!Character.isDigit(Char) && !Character.isLetter(Char) && Char != '-' && Char != '_') {\n\t\t\t\tloadingGif.setImage(null);\n\n\t\t\t\tAlert invalidName = new Alert(Alert.AlertType.ERROR);\n\t\t\t\tinvalidName.setTitle(\"Invalid Audio File Name\");\n\t\t\t\tinvalidName.setHeaderText(\"You cannot save an audio file with the character '\" + Char + \"' in its name!\");\n\t\t\t\tinvalidName.setContentText(\"Kindly enter a different name.\");\n\t\t\t\tinvalidName.showAndWait();\t\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"@Test\r\n\tpublic void testNameInvalid() {\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"*\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"-\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"0-\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"324tggs\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"-feioj\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"/\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"@\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\" \"));\r\n\t}",
"private static boolean isValidRegattaName(String name) {\n\t\tif(name.length() == 0) {\n\t\t\tSystem.out.println(\"\\nRegatta names must be atleast one character!\"); \n\t\t\treturn false;\n\t\t}\n\n\t\tif(name.indexOf('.') == -1 && name.length() != 0) return true;\n\t\telse {\n\t\t\tSystem.out.println(\"\\nRegatta names cannot have \\'.\\' in them!\"); \n\t\t\treturn false;\n\t\t}\n\t}",
"private static boolean validName(String name) {\n return name != null && !name.strip().isBlank();\n }",
"@Test\n\tpublic void caseNameWithCorrectInput() {\n\t\tString caseName = \"led case\";\n\t\tboolean isNameValid;\n\t\ttry {\n\t\t\tisNameValid = StringNumberUtil.stringUtil(caseName);\n\t\t\tassertTrue(isNameValid);\n\t\t} catch (StringException e) {\n\t\t\tfail();\n\t\t}\n\t\t\n\t}",
"private boolean isRenameValid()\n{\n String ntext = rename_field.getText();\n if (!isValidId(ntext)) return false;\n if (ntext.equals(start_name)) return false;\n\n return true;\n}",
"public static boolean alphanumericCheck(String name)\r\n\t{\r\n\t\treturn name.matches(\"^[a-zA-Z0-9]*$\");\r\n\t}",
"public static @NotNull String validName(@NotNull String value) {\n\n // convert to lowercase\n String text = value.toLowerCase();\n\n // replace some special chars first\n text = StringUtils.replace(text, \"ä\", \"ae\");\n text = StringUtils.replace(text, \"ö\", \"oe\");\n text = StringUtils.replace(text, \"ü\", \"ue\");\n text = StringUtils.replace(text, \"ß\", \"ss\");\n\n // replace all invalid chars\n StringBuilder sb = new StringBuilder(text);\n for (int i = 0; i < sb.length(); i++) {\n char ch = sb.charAt(i);\n if (!((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9') || (ch == '_'))) {\n ch = '-';\n sb.setCharAt(i, ch);\n }\n }\n return sb.toString();\n }",
"@ParameterizedTest\n @ValueSource(strings = {\"Hello\", \"number1\", \"_underscore\", \"underscore_\", \"p.e.r.o.i.d.s\", \"\\\\Backslash\", \"Backslash\\\\\"})\n void testValid(String valid) throws IOException {\n try (Workbook wb = _testDataProvider.createWorkbook()) {\n Name name = wb.createName();\n assertDoesNotThrow(() -> name.setNameName(valid));\n }\n }",
"static String validateObjectName(String objectName, boolean allowEmptyObjectName) {\n logger.atFiner().log(\"validateObjectName('%s', %s)\", objectName, allowEmptyObjectName);\n\n if (isNullOrEmpty(objectName) || objectName.equals(PATH_DELIMITER)) {\n if (allowEmptyObjectName) {\n objectName = \"\";\n } else {\n throw new IllegalArgumentException(\n String.format(\n \"GCS path must include non-empty object name [objectName='%s',\"\n + \" allowEmptyObjectName=%s]\",\n objectName, allowEmptyObjectName));\n }\n }\n\n // We want objectName to look like a traditional file system path,\n // therefore, disallow objectName with consecutive '/' chars.\n for (int i = 0; i < (objectName.length() - 1); i++) {\n if (objectName.charAt(i) == '/' && objectName.charAt(i + 1) == '/') {\n throw new IllegalArgumentException(\n String.format(\"GCS path must not have consecutive '/' characters: '%s'\", objectName));\n }\n }\n\n // Remove leading '/' if it exists.\n if (objectName.startsWith(PATH_DELIMITER)) {\n objectName = objectName.substring(1);\n }\n\n logger.atFiner().log(\"validateObjectName -> '%s'\", objectName);\n return objectName;\n }",
"@Test //TEST FIVE\n void testSpecialCharactersRabbitName()\n {\n Rabbit_RegEx rabbit_Name = new Rabbit_RegEx();\n rabbit_Name.setRabbitName(\"Pot!at!*\"); //potat or potato w/out an o\n assertFalse(rabbit_Name.getRabbitName().matches(\"[A-Za-z-]*\"));\n }",
"static String validateBucketName(String bucketName) {\n // If the name ends with '/', remove it.\n bucketName = toFilePath(bucketName);\n\n if (isNullOrEmpty(bucketName)) {\n throw new IllegalArgumentException(\"GCS bucket name cannot be empty.\");\n }\n\n if (!BUCKET_NAME_CHAR_MATCHER.matchesAllOf(bucketName)) {\n throw new IllegalArgumentException(\n String.format(\n \"Invalid GCS bucket name '%s': bucket name must contain only 'a-z0-9_.-' characters.\",\n bucketName));\n }\n\n return bucketName;\n }",
"protected static String sanitise(final String name) {\n // Replace illegal chars with\n return name.replaceAll(\"[^\\\\w\\\\.\\\\s\\\\-#&_]\", \"_\");\n }",
"public boolean isValidName(String name) {\n\t\tif (name == null)\n\t\t\treturn false;\n\t\tif (name.matches(\".*[A-Z].*[a-zA-Z0-9]\"))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public static String getValidName(String name) {\n return name.toLowerCase(Locale.getDefault()).replace(\"_\", \"-\").replace(\".\", \"-\");\n }",
"@Test\n public void testIsValidName() {\n FieldVerifier service = new FieldVerifier();\n String name = \"toto\";\n boolean result = service.isValidName(name);\n assertEquals(true, result);\n }",
"static public String checkName(String origName) {\n String newName = sanitizeName(origName);\n\n if (!newName.equals(origName)) {\n String msg =\n _(\"The sketch name had to be modified. Sketch names can only consist\\n\" +\n \"of ASCII characters and numbers (but cannot start with a number).\\n\" +\n \"They should also be less than 64 characters long.\");\n System.out.println(msg);\n }\n return newName;\n }",
"public static boolean isValidName(String name) {\n if (name.length() == 0)\n return false;\n char ch = name.charAt(0);\n if( isNameStart(ch) == false)\n return false;\n for (int i = 1; i < name.length(); i++ ) {\n ch = name.charAt(i);\n if( isName( ch ) == false ){\n return false;\n }\n }\n return true;\n }",
"@Test //TEST TWO\n void testallLowerBreedName()\n {\n Rabbit_RegEx rabbit_breed = new Rabbit_RegEx();\n rabbit_breed.setBreedName(\"dwarfhotot\"); //Dwarf Hotot\n assertTrue(rabbit_breed.getBreedName().matches(\"^[A-Za-z][a-zA-Z-][a-zA-z- ]*\"));\n }",
"boolean isNameRequired();",
"@Test //TEST SIX\n void testSpecialCharactersBreedName()\n {\n Rabbit_RegEx rabbit_breed = new Rabbit_RegEx();\n rabbit_breed.setBreedName(\"Champagne d'Argent\");\n assertFalse(rabbit_breed.getBreedName().matches(\"^[A-Za-z][a-zA-Z- ][a-zA-z- ]*\"));\n }",
"@Test //TEST TWO\n void testlowerRabbitName()\n {\n Rabbit_RegEx rabbit_Name = new Rabbit_RegEx();\n rabbit_Name.setRabbitName(\"snowflake\");\n assertTrue(rabbit_Name.getRabbitName().matches(\"[A-Za-z-]*\"));\n }",
"private boolean checkNameChar(String name) {\n\t\tString patternStr = \"[a-zA-Z]+\";\n\t\tPattern pattern = Pattern.compile(patternStr);\n\t\tMatcher matcher = pattern.matcher(name);\n\t\tboolean matchFound = matcher.matches();\n\t\treturn matchFound;\n\t}",
"@Test //TEST FOUR\n void testOneNumberinRabbitName()\n {\n Rabbit_RegEx rabbit_Name = new Rabbit_RegEx();\n rabbit_Name.setRabbitName(\"MO0N\");\n assertFalse(rabbit_Name.getRabbitName().matches(\"[A-Za-z-]*\"));\n }",
"@Test //TEST THREE\n void testallNumbersRabbitName()\n {\n Rabbit_RegEx rabbit_Name = new Rabbit_RegEx();\n rabbit_Name.setRabbitName(\"12345\");\n assertFalse(rabbit_Name.getRabbitName().matches(\"[A-Za-z-]*\"));\n }",
"@Test\n\tvoid valid() {\n\t\tnew DistinguishNameValidator().initialize(null);\n\n\t\t// Real tests\n\t\tAssertions.assertTrue(new DistinguishNameValidator().isValid(null, null));\n\t\tAssertions.assertTrue(new DistinguishNameValidator().isValid(\"\", null));\n\t\tAssertions.assertTrue(new DistinguishNameValidator().isValid(\"0dc=com\", null));\n\t\tAssertions.assertTrue(new DistinguishNameValidator().isValid(\"dc=com\", null));\n\t\tAssertions.assertTrue(new DistinguishNameValidator().isValid(\"dc=sample,dc=com\", null));\n\t\tAssertions.assertTrue(new DistinguishNameValidator().isValid(\" ou = A , dc=sample,dc =com \", null));\n\t\tAssertions.assertTrue(new DistinguishNameValidator().isValid(\" ou = 3s34 , dc=sample,dc =com \", null));\n\t\tAssertions.assertTrue(new DistinguishNameValidator().isValid(\" ou = À:éè ù , dc=g-üfì,dc =com \", null));\n\t}",
"@Test\n public void testIsStringOnlyAlphabetAndNumbers() {\n System.out.println(\"isStringOnlyAlphabetAndNumbers\");\n String fullName = \"Ali8\";\n boolean expResult = true;\n boolean result = ValidVariables.isStringOnlyAlphabetAndNumbers(fullName);\n assertEquals(expResult, result);\n }",
"public static boolean isValidInput(String str) {\n if (str != null && str.matches(\"^[a-zA-Z0-9_]*$\")){\n return true;\n }\n\n return false;\n }",
"public boolean nameIsValid() {\n return bikeName.length() > 0 && bikeName.length() < MAX_TITLE_LENGTH;\n }",
"@Test(priority=1)\n\tpublic void checkFirstNameAndLastNameFieldValiditywithSpecialChars(){\n\t\tsignup.clearAllFields();\n\t\tsignup.enterId(\"jane@doe.com\");\n\t\tsignup.enterFirstName(\"%%&$&(^\");\n\t\tsignup.enterLastName(\"%%&$&(^\");\n\t\tsignup.clickSubmit();\n\t\tList<String> errors = signup.getErrors();\n\t\t// given page accepts special chars into the firstname and lastname fields\n\t\tAssert.assertFalse(TestHelper.isStringPresent(errors, \"Please enter your last name.\"));\n\t\tAssert.assertFalse(TestHelper.isStringPresent(errors, \"Please enter your first name.\"));\n\t}",
"@Test\r\n\tpublic void testNameValid() {\r\n\t\tassertTrue(Activity5Query.isNameCorrect(\"JANE\"));\r\n\t\tassertTrue(Activity5Query.isNameCorrect(\"John\"));\r\n\t\tassertTrue(Activity5Query.isNameCorrect(\"Mary\"));\r\n\t\tassertTrue(Activity5Query.isNameCorrect(\" Kurisu\"));\r\n\t\tassertTrue(Activity5Query.isNameCorrect(\"Bond \"));\r\n\t}",
"protected void validateFirstName(){\n Boolean firstName = Pattern.matches(\"[A-Z][a-z]{2,}\",getFirstName());\n System.out.println(nameResult(firstName));\n }",
"@Test //TEST ONE\n void testCapital1stLetterBreedName()\n {\n Rabbit_RegEx rabbit_breed = new Rabbit_RegEx();\n rabbit_breed.setBreedName(\"AmericanFuzzyLop\"); //American Fuzzy Lop, very cute!\n assertTrue(rabbit_breed.getBreedName().matches(\"^[A-Za-z][a-zA-Z-][a-zA-z- ]*\"));\n }",
"static public String sanitizeName(String origName) {\n char c[] = origName.toCharArray();\n StringBuffer buffer = new StringBuffer();\n\n // can't lead with a digit, so start with an underscore\n if ((c[0] >= '0') && (c[0] <= '9')) {\n buffer.append('_');\n }\n for (int i = 0; i < c.length; i++) {\n if (((c[i] >= '0') && (c[i] <= '9')) ||\n ((c[i] >= 'a') && (c[i] <= 'z')) ||\n ((c[i] >= 'A') && (c[i] <= 'Z')) ||\n ((i > 0) && (c[i] == '-')) ||\n ((i > 0) && (c[i] == '.'))) {\n buffer.append(c[i]);\n } else {\n buffer.append('_');\n }\n }\n // let's not be ridiculous about the length of filenames.\n // in fact, Mac OS 9 can handle 255 chars, though it can't really\n // deal with filenames longer than 31 chars in the Finder.\n // but limiting to that for sketches would mean setting the\n // upper-bound on the character limit here to 25 characters\n // (to handle the base name + \".class\")\n if (buffer.length() > 63) {\n buffer.setLength(63);\n }\n return buffer.toString();\n }",
"private void ensureValidKeyNames() {\n assertThat(Iterables.any(graphiteMockServer.content, containsPattern(\"\\\\.\\\\.\")), is(false));\n assertThat(Iterables.any(graphiteMockServer.content, containsPattern(\"\\\\[\")), is(false));\n assertThat(Iterables.any(graphiteMockServer.content, containsPattern(\"\\\\]\")), is(false));\n assertThat(Iterables.any(graphiteMockServer.content, containsPattern(\"\\\\(\")), is(false));\n assertThat(Iterables.any(graphiteMockServer.content, containsPattern(\"\\\\)\")), is(false));\n }",
"boolean validateFirstName(String First_name) {\n\t\treturn true;\n\n\t}",
"abstract void lastNameValidity();",
"@Test\n public void testIsEmptyValidName() {\n FieldVerifier service = new FieldVerifier();\n String name = \"\";\n boolean result = service.isValidName(name);\n assertEquals(false, result);\n }",
"public static boolean validateName(String name){\n return name.matches(NAME_PATTERN);\n }",
"private String preprocessName(String original){\n\t\t// Remove non-alphabetical characters from the name\n\t\toriginal = original.replaceAll( \"[^A-Za-z]\", \"\" );\n\t\t\t\t\n\t\t// Convert to uppercase to help us ignore case-sensitivity\n\t\toriginal = original.toUpperCase();\n\t\t\n\t\t// Remove all occurences of the letters outlined in step 3\n\t\toriginal = original.substring(0,1) + original.substring(1).replaceAll(\"[AEIHOUWY]\",\"\");\n\t\t\n\t\t// Return the result\n\t\treturn original;\n\t}",
"public static boolean validateUsername(String username) {\n CharSequence inputStr = username;\n Pattern pattern = Pattern.compile(\"^[a-zA-Z0-9_-]*$\");\n Matcher matcher = pattern.matcher(inputStr);\n return matcher.matches();\n }",
"private static void checkTokenName(String namedOutput) {\r\n\t\tif (namedOutput == null || namedOutput.length() == 0) {\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Name cannot be NULL or emtpy\");\r\n\t\t}\r\n\t\tfor (char ch : namedOutput.toCharArray()) {\r\n\t\t\tif ((ch >= 'A') && (ch <= 'Z')) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif ((ch >= 'a') && (ch <= 'z')) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif ((ch >= '0') && (ch <= '9')) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Name cannot be have a '\" + ch + \"' char\");\r\n\t\t}\r\n\t}",
"public void validateNameField() {\n\t\tif (nameField.getText().length() > 0) {\n\t\t\ttimeToPick.setEnabled(true);\n\t\t\tif (nameField.getText().length() > 24) {\n\t\t\t\tnameField.setText(nameField.getText().substring(0, 24));\n\t\t\t}\n\t\t\ttimeToPick.putClientProperty(\"playerName\", nameField.getText());\n\t\t} else {\n\t\t\ttimeToPick.setEnabled(false);\n\t\t}\n\t}",
"@Test\r\n public final void rawInputNamesShouldNotHaveSpaces() {\r\n \tString actual = proc.preprocessRawInputName(\" AndThis String\");\r\n \tassertEquals(\"AndThisString\", actual);\r\n }",
"private void checkIfRedName(TextField nameTextField, KeyEvent event) {\n\n final Tooltip tooltip = new Tooltip();\n tooltip.setText(\"Enter the name \");\n nameTextField.setTooltip(tooltip);\n\n nameTextField.textProperty().addListener((observable, oldValue, newValue) -> {\n if (!newValue.matches(\"\\\\sa-zA-Z*\")) {\n nameTextField.setText(newValue.replaceAll(\"[^\\\\sa-zA-Z]\", \"\")); // Allows only wirte a letters!\n }\n });\n\n\n }",
"public static boolean isValidName(String name) {\n\t\tif (name == null) {\n\t\t\treturn false;\n\t\t}\n\t\treturn name.length() > 3;\n\t}",
"private boolean validNames(String whiteName, String blackName){\n return whiteName.length() > 0 && blackName.length() > 0 &&\n !whiteName.equalsIgnoreCase(blackName);\n }",
"public boolean verifyFastName(String FastName)\r\n {\r\n FastName = FastName.trim();\r\n\r\n if(FastName == null || FastName.isEmpty() || !FastName.matches(\"[a-zA-Z]*\"))\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n }",
"static boolean verifyIDRelaxed(String id)\r\n\t{\r\n\t\tfor(int i = 0; i < id.length(); i++)\r\n\t\t{\r\n\t\t\tchar c = id.charAt(i);\r\n\t\t\tif(Character.isLetterOrDigit(c)) //isAlpha\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\telse if(c == ' ' || c == '_' || c == '-')\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn id.length() > 0;\r\n\t}",
"@Test\n public void givenFirstName_WhenShort_ShouldReturnFalse() {\n RegexTest valid = new RegexTest();\n boolean result = valid.firstName(\"Fa\");\n Assert.assertEquals(false, result);\n }",
"@Test\n\tpublic void simpleNameNormalizationTest() {\n\t\tSystem.out.println(NDLDataUtils.normalizeSimpleName(\"MacMillan, Don\"));\n\t\tSystem.out.println(NDLDataUtils.normalizeSimpleName(\"Jana, DK\"));\n\t\tSystem.out.println(NDLDataUtils.normalizeSimpleName(\"A. Kruger\"));\n\t\tSystem.out.println(NDLDataUtils.normalizeSimpleName(\"Peter axyz ac\"));\n\t\tSystem.out.println(NDLDataUtils.normalizeSimpleName(\"Peter Ãac\"));\n\t\tSystem.out.println(NDLDataUtils.normalizeSimpleName(\"Gestionnaire HAL-SU\"));\n\t\tSystem.out.println(NDLDataUtils.normalizeSimpleName(\"Christophe Penkerc'h\"));\n\t\t\n\t\tSet<String> wrongNameTokens = new HashSet<String>(2);\n\t\twrongNameTokens.add(\"phd\");\n\t\twrongNameTokens.add(\"professor\");\n\t\twrongNameTokens.add(\"of\");\n\t\twrongNameTokens.add(\"nutrition\");\n\t\tSystem.out.println(NDLDataUtils.normalizeSimpleNameByWrongNameTokens(\"A. Kruger PhD, Professor Of Nutrition\",\n\t\t\t\twrongNameTokens));\n\t}",
"public static boolean lettersCheck(String name) {\r\n\t\treturn name.matches(\"^[\\\\p{L} .'-]+$\");\r\n\t}",
"public boolean validateUserName(String name)\n\t{\n\t\tif (username.getText().length() < MIN_USERNAME_LENGTH)\n\t\t{\n\t\t\tsetWarning(\"username too short\");\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!name.matches(\"^[a-zA-Z0-9]*$\"))\n\t\t{\n\t\t\tsetWarning(\"invalid username\");\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"public InvalidOntologyName(String invalidCharacter) {\n super(String.format(\"Ontology name cannot contain %s\", invalidCharacter));\n }",
"@Test\n public void LastName_WhenShort_ShouldReturnFalse() {\n RegexTest valid = new RegexTest();\n boolean result = valid.lastName(\"jamkhandi\");\n Assert.assertEquals(false,result);\n }",
"public synchronized boolean validate(Object data) {\n if (!(data instanceof String)) {\n return false;\n }\n\n String dataString = (String) data;\n dataString = dataString.replaceAll(\"\\\\s\", \"\").replaceAll(\"-\", \"\");\n if (dataString.length() != 6) {\n return false;\n }\n\n for (Character c : dataString.substring(0, 2).toCharArray()) {\n if (!Character.isLetter(c)) {\n return false;\n }\n }\n for (Character c : dataString.substring(3, 5).toCharArray()) {\n if (!Character.isDigit(c)) {\n return false;\n }\n }\n return true;\n }",
"public String nameCheck(String name) {\n\t\twhile(true) {\n\t\t\tif(Pattern.matches(\"[A-Z][a-z]{3,10}\", name)){\n\t\t\t\treturn name;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Name should have first capital alphabet and rest small alphabets.\");\n\t\t\t\tSystem.out.println(\"Enter again: \");\n\t\t\t\tname = sc.next();\n\t\t\t}\n\t\t}\n\t}",
"public static void isValid(String fullname) \r\n\t throws FullnameException \r\n\t {\n\t if (fullname.matches(\".*\\\\d.*\")) { \r\n\t throw new FullnameException(1);\r\n\t } \r\n\t // to check special character\r\n\t if((fullname.contains(\"@\") || fullname.contains(\"#\") \r\n\t || fullname.contains(\"!\") || fullname.contains(\"~\") \r\n\t || fullname.contains(\"$\") || fullname.contains(\"%\") \r\n\t || fullname.contains(\"^\") || fullname.contains(\"&\") \r\n\t || fullname.contains(\"*\") || fullname.contains(\"(\") \r\n\t || fullname.contains(\")\") || fullname.contains(\"-\") \r\n\t || fullname.contains(\"+\") || fullname.contains(\"/\") \r\n\t || fullname.contains(\":\") || fullname.contains(\".\") \r\n\t || fullname.contains(\", \") || fullname.contains(\"<\") \r\n\t || fullname.contains(\">\") || fullname.contains(\"?\") \r\n\t || fullname.contains(\"|\"))) {\r\n\t \tthrow new FullnameException(2);\r\n\t }\r\n\t }",
"public static boolean isAlphapetic(String userInput) {\n return Pattern.matches(Constants.NAME_VALIDATION, userInput);\n }",
"abstract void firstNameValidity();",
"private void validationUsername( String name ) throws Exception {\n\t\t\t if ( name != null && name.trim().length() < 3 ) {\n\t\t\t throw new Exception( \"Le nom d'utilisateur doit contenir au moins 3 caractères.\" );\n\t\t\t }\n\t\t\t}",
"public static void checkWithoutSpecialChars(String name) throws SpecialCharsNotAllowedException{ \n \n if(!name.matches(\"^[0-9 \\\\p{L}]*$\")) throw new SpecialCharsNotAllowedException(\"The special chars in the name of entity are not allowed!\");\n }",
"@Test\n void returnsTrueIfOnlyLetters() {\n Assertions.assertTrue(new UserValidator().isValidUsername(null));\n }",
"public static void isValidNameOnCreditCard(String userInput) {\n\t\tif (!userInput.matches(\"^(?!.* )[a-zA-Z ]+$\")) {\n\t\t\tthrow new IllegalArgumentException(\"You must enter your name as it appears on the card. Please try again:\");\n\t\t}\n\t}",
"@Override\n\tpublic void validateUserName(String name) throws UserException {\n\t\t\n\t}",
"private boolean isAllCaps(String name) {\r\n for (int ndx = 0; ndx < name.length(); ndx++) {\r\n char ch = name.charAt(ndx);\r\n if (ch == '_') {\r\n // OK\r\n } else if (Character.isUpperCase(ch)) {\r\n // OK\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }",
"public void testvalidateUserName0001()\n\t{\n\t\tLoginCheck loginCheckTest = new LoginCheck();\n\t\t\n\t\tassertFalse(loginCheckTest.validateUserName(\"usrnm\"));\n\t}",
"public static boolean isSafeIdentifierName(String name, int fromIndex) {\n int i = fromIndex;\n for (; i < name.length(); i++) {\n char c = name.charAt(i);\n if (!(c == '$' || c == '@' || c == ':')) {\n break;\n }\n }\n for (; i < name.length(); i++) {\n char c = name.charAt(i);\n if (!((c >= 'a' && c <= 'z') || (c == '_') ||\n (c >= 'A' && c <= 'Z') ||\n (c >= '0' && c <= '9') ||\n (c == '?') || (c == '=') || (c == '!'))) { // Method suffixes; only allowed on the last line\n\n if (isOperator(name)) {\n return true;\n }\n\n return false;\n }\n }\n\n return true;\n }",
"public final static boolean checkNames(String playerOneName, String playerTwoName)\n\t{\n\t\tif(playerOneName.length()>15||playerOneName.length()<2||playerTwoName.length()<2||playerTwoName.length()>15) return false;\n\t\tif(!playerOneName.matches(\"[a-zA-Z]+\")||!playerTwoName.matches(\"[a-zA-Z]+\")) return false;\n\t\tif(playerOneName.substring(0,1).equals(playerTwoName.substring(0,1))) return false;\n\t\treturn true;\n\t}",
"@Test\n public void testIsInvalidChannelName() {\n System.out.println(\"isInvalidChannelName test ---\");\n String validName = \"Valid Name\";\n String invalidName1 = \"Invalid_Name\";\n String invalidName2 = \"\";\n String invalidName3 = \" \";\n String invalidName4 = \"troll<script>document.cookie='lol'</script>\";\n assertFalse(instance.isInvalidChannelName(validName));\n assertTrue(instance.isInvalidChannelName(invalidName1));\n assertTrue(instance.isInvalidChannelName(invalidName2));\n assertTrue(instance.isInvalidChannelName(invalidName3));\n assertTrue(instance.isInvalidChannelName(invalidName4));\n }",
"static public boolean isSanitaryName(String name) {\n return sanitizeName(name).equals(name);\n }",
"public static void checkWithoutSpecialChars(String name, String allowedSpecialChars) throws SpecialCharsNotAllowedException{ \n \n if(!name.matches(\"^([0-9 \\\\p{L}\" + allowedSpecialChars + \"])*$\")) throw new SpecialCharsNotAllowedException(\"The special chars (except \" + allowedSpecialChars + \") in the name of entity are not allowed!\");\n }",
"public static boolean isValidNmtoken(String nmtoken) {\n if (nmtoken.length() == 0)\n return false;\n for (int i = 0; i < nmtoken.length(); i++ ) {\n char ch = nmtoken.charAt(i);\n if( ! isName( ch ) ){\n return false;\n }\n }\n return true;\n }",
"public final boolean isValidPrefix(String prefix) {\n return prefix.matches(\"^[0-9a-zA-Z]*$\") && prefix.length() <= 20;\n }",
"public static boolean isValidName(String name) {\n if (name.matches(pattern)) {\n return true;\n } else {\n return false;\n }\n }",
"static void validateHeaderName(String headerName) {\n //Check to see if the name is null\n if (headerName == null) {\n throw new NullPointerException(\"Header names cannot be null\");\n }\n //Go through each of the characters in the name\n for (int index = 0; index < headerName.length(); index++) {\n //Actually get the character\n char character = headerName.charAt(index);\n\n //Check to see if the character is not an ASCII character\n if (character > 127) {\n throw new IllegalArgumentException(\n \"Header name cannot contain non-ASCII characters: \" + headerName);\n }\n\n //Check for prohibited characters.\n switch (character) {\n case '\\t':\n case '\\n':\n case 0x0b:\n case '\\f':\n case '\\r':\n case ' ':\n case ',':\n case ';':\n case '=':\n throw new IllegalArgumentException(\n \"Header name cannot contain the following prohibited characters: \"\n + \"=,;: \\\\t\\\\r\\\\n\\\\v\\\\f: \" + headerName);\n default:\n }\n }\n }",
"private static boolean isValidFileName(String name) {\n\t\tif(name.indexOf('.') != -1 && name.length() != 0) return true;\n\t\telse System.out.println(\"\\nFilenames must include the file's extension.\"); return false;\n\t}"
] |
[
"0.69218695",
"0.6787618",
"0.67733616",
"0.66933143",
"0.65889835",
"0.65405834",
"0.6524832",
"0.64469117",
"0.64407396",
"0.6438847",
"0.64307505",
"0.6427528",
"0.64148474",
"0.63941926",
"0.6375235",
"0.63656557",
"0.6323346",
"0.6316541",
"0.63049036",
"0.63014907",
"0.6293418",
"0.6276192",
"0.6245644",
"0.6230007",
"0.6228674",
"0.62193644",
"0.62186396",
"0.62163216",
"0.6195401",
"0.61763006",
"0.6164218",
"0.6135704",
"0.61249995",
"0.6123435",
"0.6116328",
"0.6110089",
"0.6100038",
"0.608185",
"0.6075865",
"0.6067191",
"0.6059936",
"0.60545313",
"0.60283303",
"0.6015033",
"0.59744847",
"0.59693694",
"0.59649235",
"0.5960758",
"0.5932749",
"0.5925211",
"0.59198105",
"0.589975",
"0.5899023",
"0.58902246",
"0.58763546",
"0.5868409",
"0.5854574",
"0.5833316",
"0.5831919",
"0.5828603",
"0.5818147",
"0.5815969",
"0.5802823",
"0.58001524",
"0.57901126",
"0.57641184",
"0.5763664",
"0.57610184",
"0.5745678",
"0.5722415",
"0.5718807",
"0.5704152",
"0.57041496",
"0.5699484",
"0.56990504",
"0.5696259",
"0.5693995",
"0.5690582",
"0.56889236",
"0.56886196",
"0.56881434",
"0.5684821",
"0.5679995",
"0.5671507",
"0.5661925",
"0.56604743",
"0.56567156",
"0.5655201",
"0.56537133",
"0.5648718",
"0.56467175",
"0.56425333",
"0.56345546",
"0.56229347",
"0.5608686",
"0.560857",
"0.5604335",
"0.5601854",
"0.56007785",
"0.5588819"
] |
0.6244067
|
23
|
This method loads actual models specified in the passed in OpenSimDBDescriptor
|
public void rebuild(OpenSimDBDescriptor descriptor) {
ArrayList<String> files = descriptor.getFileNames();
Model saveCurrentModel=null;
for(int i=0; i<files.size(); i++){
String nextFilename = files.get(i);
File nextFile = new File(nextFilename);
if (nextFile.exists()){
String absolutePath = nextFile.getAbsolutePath();
try {
// Display original model
((FileOpenOsimModelAction) FileOpenOsimModelAction.findObject(
(Class)Class.forName("org.opensim.view.FileOpenOsimModelAction"), true)).loadModel(absolutePath, true);
} catch (ClassNotFoundException ex) {
ex.printStackTrace();
} catch (IOException ex) {
DialogDisplayer.getDefault().notify(
new NotifyDescriptor.Message("Error opening model file "+absolutePath));
};
if (i==descriptor.getCurrentModelIndex()){
saveCurrentModel=OpenSimDB.getInstance().getCurrentModel();
}
}
}
if (saveCurrentModel!=null)
setCurrentModel(saveCurrentModel, false);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public synchronized static void loadModels() throws SchemaProviderException {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Loading OXM Models\");\n }\n\n for (SchemaVersion oxmVersion : translator.getSchemaVersions().getVersions()) {\n DynamicJAXBContext jaxbContext = nodeIngestor.getContextForVersion(oxmVersion);\n if (jaxbContext != null) {\n loadModel(oxmVersion.toString(), jaxbContext);\n }\n }\n }",
"protected void importEOModel() {\n JFileChooser fileChooser = getEOModelChooser();\n int status = fileChooser.showOpenDialog(Application.getFrame());\n\n if (status == JFileChooser.APPROVE_OPTION) {\n\n // save preferences\n FSPath lastDir = getApplication()\n .getFrameController()\n .getLastEOModelDirectory();\n lastDir.updateFromChooser(fileChooser);\n\n File file = fileChooser.getSelectedFile();\n if (file.isFile()) {\n file = file.getParentFile();\n }\n\n DataMap currentMap = getProjectController().getCurrentDataMap();\n\n try {\n URL url = file.toURI().toURL();\n\n EOModelProcessor processor = new EOModelProcessor();\n\n // load DataNode if we are not merging with an existing map\n if (currentMap == null) {\n loadDataNode(processor.loadModeIndex(url));\n }\n\n // load DataMap\n DataMap map = processor.loadEOModel(url);\n addDataMap(map, currentMap);\n\n }\n catch (Exception ex) {\n logObj.info(\"EOModel Loading Exception\", ex);\n ErrorDebugDialog.guiException(ex);\n }\n\n }\n }",
"private void load() throws DAOSysException\t\t{\n\t\tif (_debug) System.out.println(\"AL:load()\");\n\t\tAnnualLeaseDAO dao = null;\n\t\ttry\t{\n\t\t\tdao = getDAO();\n\t\t\tsetModel((AnnualLeaseModel)dao.dbLoad(getPrimaryKey()));\n\n\t\t} catch (Exception ex)\t{\n\t\t\tthrow new DAOSysException(ex.getMessage());\n\t\t}\n\t}",
"public void loadModel() throws SQLException {\n\t\tObject rs = MysqlConnection.getDbConnection().getQueryData(query);\n\t\tclassifier = (FilteredClassifier)rs;\n\t}",
"public static void loadBioPAXModel(Model model, String title, String ownerName, String db) throws Exception{\n\t\tSet<BioPAXElement> elementSet = model.getObjects();\n\t\tfor (BioPAXElement bpe : elementSet) {\n\t\t\tif (bpe instanceof Xref){\n\t\t\t\t// Process Xrefs\n\t\t\t\tprocessXREF(bpe);\n\t\t\t} else {\n\t\t\t\t// Process all Other Elements to create Node objects\n\t\t\t\tprocessElementToNode(bpe);\n\t\t\t}\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t// Process all Properties in each Element to create NDExPropertyValuePair and Edge objects\n\t}",
"@Override\n public Map<String, Object> postProcessModels(Map<String, Object> objs) {\n @SuppressWarnings(\"unchecked\")\n\t\tList<Object> models = (List<Object>) postProcessModelsEnum(objs).get(\"models\");\n for (Object _mo : models) {\n @SuppressWarnings(\"unchecked\")\n\t\t\tMap<String, Object> mo = (Map<String, Object>) _mo;\n CodegenModel cm = (CodegenModel) mo.get(\"model\");\n cm.imports = new TreeSet(cm.imports);\n for (CodegenProperty var : cm.vars) {\n // name enum with model name, e.g. StatuEnum => PetStatusEnum\n if (Boolean.TRUE.equals(var.isEnum)) {\n var.datatypeWithEnum = var.datatypeWithEnum.replace(var.enumName, cm.classname + var.enumName);\n var.enumName = cm.classname + var.enumName;\n }\n }\n }\n\n return objs;\n }",
"public void initializeModelAndSettings(String modelName, IDataAccessObject dataAccessObject, String[] trainingSettings) throws TotalADSDBMSException, TotalADSGeneralException;",
"private void initializeModel() {\n\t\tmodel = new Model();\n\n\t\t// load up playersave\n\t\ttry {\n\t\t\tFileInputStream save = new FileInputStream(\"playersave.ser\");\n\t\t\tObjectInputStream in = new ObjectInputStream(save);\n\t\t\tmodel = ((Model) in.readObject());\n\t\t\tin.close();\n\t\t\tsave.close();\n\t\t\tSystem.out.println(\"playersave found. Loading file...\");\n\t\t}catch(IOException i) {\n\t\t\t//i.printStackTrace();\n\t\t\tSystem.out.println(\"playersave file not found, starting new game\");\n\t\t}catch(ClassNotFoundException c) {\n\t\t\tSystem.out.println(\"playersave not found\");\n\t\t\tc.printStackTrace();\n\t\t}\n\t\t\n\t\t// load up customlevels\n\t\ttry {\n\t\t\tFileInputStream fileIn = new FileInputStream(\"buildersave.ser\");\n\t\t\tObjectInputStream in = new ObjectInputStream(fileIn);\n\t\t\tmodel.importCustomLevels(((ArrayList<LevelModel>) in.readObject()));\n\t\t\tin.close();\n\t\t\tfileIn.close();\n\t\t\tSystem.out.println(\"Builder ArrayList<LevelModel> found. Loading file...\");\n\t\t}catch(IOException i) {\n\t\t\t//i.printStackTrace();\n\t\t\tSystem.out.println(\"Builder ArrayList<LevelModel> file not found, starting new game\");\n\t\t\treturn;\n\t\t}catch(ClassNotFoundException c) {\n\t\t\tSystem.out.println(\"Builder ArrayList<LevelModel> not found\");\n\t\t\tc.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t}",
"public StillModel loadModel(String filepath);",
"private void loadData(){\n\t\t \n\t\t model.getDataVector().clear();\n\t\t ArrayList<Person> personList = DataBase.getInstance().getPersonList();\n\t\t for(Person person : personList){\n\t\t\t addRow(person.toBasicInfoStringArray());\n\t\t }\n\t\t \n\t }",
"public void loadModel(){\n remoteModel = new FirebaseCustomRemoteModel.Builder(dis).build();\n FirebaseModelManager.getInstance().getLatestModelFile(remoteModel)\n .addOnCompleteListener(new OnCompleteListener<File>() {\n @Override\n public void onComplete(@NonNull Task<File> task) {\n File modelFile = task.getResult();\n if (modelFile != null) {\n interpreter = new Interpreter(modelFile);\n // Toast.makeText(MainActivity2.this, \"Hosted Model loaded.. Running interpreter..\", Toast.LENGTH_SHORT).show();\n runningInterpreter();\n }\n else{\n try {\n InputStream inputStream = getAssets().open(dis+\".tflite\");\n byte[] model = new byte[inputStream.available()];\n inputStream.read(model);\n ByteBuffer buffer = ByteBuffer.allocateDirect(model.length)\n .order(ByteOrder.nativeOrder());\n buffer.put(model);\n //Toast.makeText(MainActivity2.this, dis+\"Bundled Model loaded.. Running interpreter..\", Toast.LENGTH_SHORT).show();\n interpreter = new Interpreter(buffer);\n runningInterpreter();\n } catch (IOException e) {\n // File not found?\n Toast.makeText(MainActivity2.this, \"No hosted or bundled model\", Toast.LENGTH_SHORT).show();\n }\n }\n }\n });\n }",
"private void loadModel(InputStream is, int recursivityLevel) throws IOException \r\n\t{\r\n\t\tLoadModelTask task = new LoadModelTask(is, recursivityLevel, this);\r\n\t\ttask.execute();\r\n\t\t//timeRange.setLimits(minTs, maxTs);\r\n\t\tthis.setEnabled(false);\r\n\t}",
"@Override\n\tpublic void loadModels(ZipInputStream zin)\n\t{\n\t\tf_xmls = new JointFtrXml[1];\n\t\ts_models = null;\n\t\tZipEntry zEntry;\n\t\tString entry;\n\t\t\t\t\n\t\ttry\n\t\t{\n\t\t\twhile ((zEntry = zin.getNextEntry()) != null)\n\t\t\t{\n\t\t\t\tentry = zEntry.getName();\n\t\t\t\t\n\t\t\t\tif (entry.equals(ENTRY_CONFIGURATION))\n\t\t\t\t\tloadDefaultConfiguration(zin);\n\t\t\t\telse if (entry.startsWith(ENTRY_FEATURE))\n\t\t\t\t\tloadFeatureTemplates(zin, Integer.parseInt(entry.substring(ENTRY_FEATURE.length())));\n\t\t\t\telse if (entry.startsWith(ENTRY_FRAMES))\n\t\t\t\t\tloadFrames(zin);\n\t\t\t\telse if (entry.equals(ENTRY_LEXICA))\n\t\t\t\t\tloadLexica(zin);\n\t\t\t\telse if (entry.startsWith(ENTRY_MODEL))\n\t\t\t\t\tloadStatisticalModels(zin, Integer.parseInt(entry.substring(ENTRY_MODEL.length())));\n\t\t\t\telse if (entry.startsWith(ENTRY_WEIGHTS))\n\t\t\t\t\tloadWeightVector(zin, Integer.parseInt(entry.substring(ENTRY_WEIGHTS.length())));\n\t\t\t}\t\t\n\t\t}\n\t\tcatch (Exception e) {e.printStackTrace();}\n\t}",
"@Override\n\tpublic void load(ModelInfo info) {\n\t}",
"public void load() {\n mapdb_ = DBMaker.newFileDB(new File(\"AllPoems.db\"))\n .closeOnJvmShutdown()\n .encryptionEnable(\"password\")\n .make();\n\n // open existing an collection (or create new)\n poemIndexToPoemMap_ = mapdb_.getTreeMap(\"Poems\");\n \n constructPoems();\n }",
"public abstract void loadFromDatabase();",
"@Test\n public void testLoad() throws Exception\n {\n CommonTree modelDescriptor = CommonIO.getModelDescriptor(CommonIO\n .parseModel(\"org/jactr/io/modules/pm/motor/motor-test.jactr\"));\n Collection<CommonTree> knownBuffers = ASTSupport.getTrees(modelDescriptor,\n JACTRBuilder.BUFFER);\n\n LOGGER.debug(\"Descriptor Raw : \" + modelDescriptor.toStringTree());\n for (StringBuilder line : CodeGeneratorFactory.getCodeGenerator(\"jactr\")\n .generate(modelDescriptor, true))\n LOGGER.debug(line.toString());\n\n assertEquals(\"Not the right number of buffers \" + knownBuffers, 4,\n knownBuffers.size());\n\n // we need to accept the warning for the binding of =next\n CommonIO.compilerTest(modelDescriptor, false, true);\n }",
"public static void performTests() throws ModelManagementException {\n int count = VarModel.INSTANCE.getModelCount();\n UnloadTestModelLoader loader = new UnloadTestModelLoader();\n VarModel.INSTANCE.locations().addLocation(BASE, ProgressObserver.NO_OBSERVER);\n VarModel.INSTANCE.loaders().registerLoader(loader, ProgressObserver.NO_OBSERVER);\n // no model was loaded\n Assert.assertEquals(VarModel.INSTANCE.getModelCount(), count);\n // prepare all models\n for (ModelInfo<Project> info : loader.infos()) {\n Assert.assertTrue(loader.getProject(info) == VarModel.INSTANCE.load(info));\n }\n // no model was loaded\n Assert.assertEquals(VarModel.INSTANCE.getModelCount(), count + loader.infoCount());\n\n testUnloading(loader, \"f\", \"f\"); // f is not imported so it shall be unloaded\n testUnloading(loader, \"a\"); // a is imported so it shall not be unloaded\n testUnloading(loader, \"e\"); // e is imported so it shall not be unloaded\n testUnloading(loader, \"b\"); // b is imported and imports e so it shall not be unloaded\n testUnloading(loader, \"c\"); // c is imported so it shall not be unloaded\n testUnloading(loader, \"d\"); // d is imported so it shall not be unloaded\n testUnloading(loader, \"p1\", \"p1\", \"a\"); // p1 shall be unloaded, also a\n testUnloading(loader, \"p2\", \"p2\", \"c\"); // p2 shall be unloaded, also c\n testUnloading(loader, \"p3\", \"p3\", \"b\", \"e\"); // p3 shall be unloaded, also b and transitively e\n testUnloading(loader, \"p4\", \"p4\", \"d\"); // p4 shall be unloaded, as now d is not imported from other projects\n \n VarModel.INSTANCE.loaders().unregisterLoader(loader, ProgressObserver.NO_OBSERVER);\n VarModel.INSTANCE.locations().removeLocation(BASE, ProgressObserver.NO_OBSERVER);\n }",
"public abstract void loadFile(Model mod, String fn) throws IOException;",
"public List<ModelClass> getAllModels() throws StorageIOException {\n try {\n Dao<ModelDB, String> modelDao = this.databaseHelper.getDao(ModelDB.class);\n QueryBuilder<ModelDB, String> queryBuilder = modelDao.queryBuilder();\n \n queryBuilder.orderBy(\"name\", true);\n \n List<ModelDB> entities = modelDao.query(queryBuilder.prepare());\n List<ModelClass> models = new ArrayList<ModelClass>(entities.size());\n \n for (ModelDB e : entities) {\n models.add(dbToClass(e));\n }\n\n return models;\n \n } catch (SQLException e) {\n throw new StorageIOException(\"Failed to get models\", e);\n }\n }",
"private MappedByteBuffer loadModelFile(Activity activity) throws IOException {\n AssetFileDescriptor fileDescriptor = activity.getAssets().openFd(MODEL_PATH);\n FileInputStream inputStream = new FileInputStream(fileDescriptor.getFileDescriptor());\n FileChannel fileChannel = inputStream.getChannel();\n long startOffset = fileDescriptor.getStartOffset();\n long declaredLength = fileDescriptor.getDeclaredLength();\n return fileChannel.map(FileChannel.MapMode.READ_ONLY, startOffset, declaredLength);\n }",
"private MappedByteBuffer loadModelFile(Activity activity) throws IOException {\n AssetFileDescriptor fileDescriptor = activity.getAssets().openFd(MODEL_PATH);\n FileInputStream inputStream = new FileInputStream(fileDescriptor.getFileDescriptor());\n FileChannel fileChannel = inputStream.getChannel();\n long startOffset = fileDescriptor.getStartOffset();\n long declaredLength = fileDescriptor.getDeclaredLength();\n return fileChannel.map(FileChannel.MapMode.READ_ONLY, startOffset, declaredLength);\n }",
"public List<ModelEntity> induceModelFromDb(Collection<String> messages) {\n DatabaseUtil dbUtil = new DatabaseUtil(this.helperName);\n\n return dbUtil.induceModelFromDb(messages);\n }",
"private void loadDescribedTemplateData() {\r\n if (connect == null) {\r\n System.out.println(\"<internal> DescribedTemplateCore.loadDescribedTemplateData() finds no database connection and exits\");\r\n return;\r\n }\r\n\r\n Statement statement = null;\r\n ResultSet resultSet = null;\r\n try {\r\n String strDTNum = String.valueOf(pk_described_template);\r\n statement = connect.createStatement();\r\n\r\n // acquire described template info; note: template to described_template is 1 to many, so from described_template to template is 1:1\r\n resultSet = statement.executeQuery( \"SELECT fk_version_set, fk_template, description_hash, synchronized, hash, enabled, steps \" +\r\n \"FROM described_template \" +\r\n \"JOIN template ON fk_template = pk_template \" +\r\n \"WHERE pk_described_template = \" + strDTNum );\r\n\r\n if ( resultSet.next() ) {\r\n dbDescribedTemplate.fk_version_set = resultSet.getBytes(\"fk_version_set\");\r\n dbDescribedTemplate.fk_template = resultSet.getLong(\"fk_template\");\r\n dbDescribedTemplate.description_hash = resultSet.getBytes(\"description_hash\");\r\n dbDescribedTemplate.dtSynchronized = resultSet.getBoolean(\"synchronized\");\r\n dbDescribedTemplate.template_hash = resultSet.getBytes(\"hash\");\r\n dbDescribedTemplate.enabled = resultSet.getBoolean(\"enabled\");\r\n dbDescribedTemplate.steps = resultSet.getString(\"steps\");\r\n System.out.println(\" <internal> DescribedTemplateCore.loadDescribedTemplateData() loads data from described template record \" + pk_described_template);\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n } else {\r\n throw new Exception(\"described template data not present\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"DescribedTemplateCore.loadDescribedTemplateData() exception for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n\r\n // acquire matching run info\r\n try {\r\n String strTemplateNum = String.valueOf(dbDescribedTemplate.fk_template);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT pk_run, artifacts, start_time, ready_time, end_time, passed \" +\r\n \"FROM run \" +\r\n \"WHERE fk_template = \" + strTemplateNum );\r\n while ( resultSet.next() ) {\r\n DBRun dbRun = new DBRun(resultSet.getLong(\"pk_run\"));\r\n dbRun.artifacts = resultSet.getBytes(\"artifacts\");\r\n dbRun.start_time = resultSet.getDate(\"start_time\");\r\n dbRun.ready_time = resultSet.getDate(\"ready_time\");\r\n dbRun.end_time = resultSet.getDate(\"end_time\");\r\n dbRun.passed = resultSet.getBoolean(\"passed\");\r\n dbDescribedTemplate.pkdtToDBRun.put(pk_described_template, dbRun);\r\n System.out.println(\" <internal> TemplateCore.loadTemplateData() loads data from described_template-matched run record \" + dbRun.pk_run);\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTemplateData() exception for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n } \r\n \r\n // acquire matching test_instance info; note: described_template to test_instance is 1:1\r\n try {\r\n String strDescribedTemplateNum = String.valueOf(pk_described_template);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT pk_test_instance, fk_run, due_date, phase, synchronized \" +\r\n \"FROM test_instance \" +\r\n \"WHERE fk_described_template = \" + strDescribedTemplateNum);\r\n while ( resultSet.next() ) {\r\n DBTestInstance dbTestInstance = new DBTestInstance(resultSet.getLong(\"pk_test_instance\"));\r\n dbTestInstance.fk_run = resultSet.getLong(\"fk_run\"); // null entry returns 0\r\n dbTestInstance.due_date = resultSet.getDate(\"due_date\");\r\n dbTestInstance.phase = resultSet.getInt(\"phase\");\r\n dbTestInstance.iSynchronized = resultSet.getBoolean(\"synchronized\");\r\n dbDescribedTemplate.pkdtToDBTestInstance.put(pk_described_template, dbTestInstance);\r\n System.out.println(\" <internal> TemplateCore.loadDescribedTemplateData() loads data from described_template-matched test_instance record \" + dbTestInstance.pk_test_instance);\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"DescribedTemplateCore.loadDescribedTemplateData() exception for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n } \r\n\r\n // acquire corresponding multiple lines of data\r\n try {\r\n String strPKDT = String.valueOf(dbDescribedTemplate.pk_described_template);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT pk_dt_line, line, description \" +\r\n \"FROM dt_line \" +\r\n \"WHERE fk_described_template = \" + strPKDT );\r\n while ( resultSet.next() ) {\r\n DBDTLine dtLine = new DBDTLine();\r\n dtLine.pk_dt_line = resultSet.getLong(\"pk_dt_line\"); // null entry returns 0\r\n dtLine.line = resultSet.getInt(\"line\");\r\n dtLine.dtLineDescription = resultSet.getString(\"description\");\r\n System.out.println(\" <internal> DescribedTemplateCore.loadDescribedTemplateData() loads line data from dt_line \" + dtLine.pk_dt_line);\r\n\r\n dbDescribedTemplate.pkdtToDTLine.put(dtLine.pk_dt_line, dtLine);\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"DescribedTemplateCore.loadDescribedTemplateData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n\r\n // get corresponding artifact information; not every dtLine has corresponding artifact information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKDTLine = String.valueOf(dtLine.pk_dt_line);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT is_primary, reason, pk_artifact, fk_version, fk_content, synchronized, platform, internal_build, name \" +\r\n \"FROM artifact_to_dt_line \" +\r\n \"JOIN artifact ON fk_artifact = pk_artifact \" +\r\n \"WHERE fk_dt_line = \" + strPKDTLine );\r\n if ( resultSet.next() ) {\r\n dtLine.is_primary = resultSet.getBoolean(\"is_primary\");\r\n dtLine.reason = resultSet.getString(\"reason\");\r\n dtLine.pk_artifact = resultSet.getLong(\"pk_artifact\");\r\n dtLine.pk_version = resultSet.getLong(\"fk_version\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads artifact data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n } // end for()\r\n\r\n // get corresponding version information; not every dtLine has corresponding version information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKVersion = String.valueOf(dtLine.pk_version);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT version, scheduled_release, actual_release, sort_order \" +\r\n \"FROM version \" +\r\n \"WHERE pk_version = \" + strPKVersion );\r\n if ( resultSet.next() ) {\r\n dtLine.version = resultSet.getString(\"version\");\r\n dtLine.scheduled_release = resultSet.getDate(\"scheduled_release\");\r\n dtLine.actual_release = resultSet.getDate(\"actual_release\");\r\n dtLine.sort_order = resultSet.getInt(\"sort_order\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads version data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n } // end for()\r\n\r\n // get corresponding content information; not every dtLine has corresponding content information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKArtifact = String.valueOf(dtLine.pk_artifact);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT pk_content, is_generated \" +\r\n \"FROM content \" +\r\n \"JOIN artifact ON fk_content = pk_content \" +\r\n \"WHERE pk_artifact = \" + strPKArtifact );\r\n if ( resultSet.next() ) {\r\n dtLine.pk_content = resultSet.getBytes(\"pk_content\");\r\n dtLine.is_generated = resultSet.getBoolean(\"is_generated\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads content data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n } // end for()\r\n\r\n // get corresponding component information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKVersion = String.valueOf(dtLine.pk_version);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT name \" +\r\n \"FROM component \" +\r\n \"JOIN version ON fk_component = pk_component \" +\r\n \"WHERE pk_version = \" + strPKVersion );\r\n if ( resultSet.next() ) {\r\n dtLine.componentName = resultSet.getString(\"name\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads component data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n }\r\n\r\n // get corresponding resource information; not every dtLine has corresponding resource information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKDTLine = String.valueOf(dtLine.pk_dt_line);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT hash, name, resource.description \" +\r\n \"FROM dt_line \" +\r\n \"JOIN resource ON fk_resource = pk_resource \" +\r\n \"WHERE pk_dt_line = \" + strPKDTLine );\r\n if ( resultSet.next() ) {\r\n dtLine.resourceHash = resultSet.getBytes(\"hash\");\r\n dtLine.resourceName = resultSet.getString(\"name\");\r\n dtLine.resourceDescription = resultSet.getString(\"description\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads resource data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n } // end for()\r\n }",
"public void loadModel(int modelId) {\n \t\tif(this.openGLModelConfiguration != null) {\r\n \t\t\tthis.fireOnModelDataEvent(this.openGLModelConfiguration, false);\r\n \t\t} else {\r\n \t\t\tcacheManager.readModelAsync(modelId, this);\r\n \t\t}\r\n \t}",
"private MappedByteBuffer loadModelFile(Activity activity) throws IOException {\n AssetFileDescriptor fileDescriptor = activity.getAssets().openFd(MODEL_PATH);\n FileInputStream inputStream = new FileInputStream(fileDescriptor.getFileDescriptor());\n FileChannel fileChannel = inputStream.getChannel();\n long startOffset = fileDescriptor.getStartOffset();\n long declaredLength = fileDescriptor.getDeclaredLength();\n return fileChannel.map(FileChannel.MapMode.READ_ONLY, startOffset, declaredLength);\n }",
"public void loadFromDatabase(){\r\n /**\r\n * Open the file streams to the three files\r\n * Recover the state of data structures\r\n * Close the file streams\r\n */\r\n\r\n try{\r\n //Recover the state of unfinished set from unfinished.dat\r\n unfinishedFileInputStream = new FileInputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetInputStream = new ObjectInputStream(unfinishedFileInputStream);\r\n unfinished = (Set<Task>)unfinishedSetInputStream.readObject();\r\n unfinishedSetInputStream.close();\r\n unfinishedFileInputStream.close();\r\n\r\n //Recover the state of finished list from finished.dat\r\n finishedFileInputStream = new FileInputStream(FINISHED_FILE_PATH);\r\n finishedListInputStream = new ObjectInputStream(finishedFileInputStream);\r\n finished = (ArrayList<Task>)finishedListInputStream.readObject();\r\n finishedListInputStream.close();\r\n finishedFileInputStream.close();\r\n\r\n //Recover the state of activities list from activities.dat\r\n activitiesFileInputStream = new FileInputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListInputStream = new ObjectInputStream(activitiesFileInputStream);\r\n activities = (ArrayList<Activity>)activitiesListInputStream.readObject();\r\n activitiesListInputStream.close();\r\n activitiesFileInputStream.close();\r\n\r\n generateWeeklySchedule();\r\n }\r\n catch(Exception e){\r\n System.out.println(e.getMessage());\r\n }\r\n }",
"private void loadData(){\n try (BufferedReader br = new BufferedReader(new FileReader(this.fileName))) {\n String line;\n while((line=br.readLine())!=null){\n E e = createEntity(line);\n super.save(e);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void loadModel(String filePath) {\n\n\t\tSystem.out.println(\"Loading model...\");\n\t\ttry {\n\t\t\tObjectInputStream ois = new ObjectInputStream(new FileInputStream(filePath));\n\t\t\tHMMModel HMMModel = (HMMModel)ois.readObject();\n\t\t\tN = HMMModel.N;\n\t\t\tM = HMMModel.M;\n\t\t\tpi = HMMModel.pi;\n\t\t\tA = HMMModel.A;\n\t\t\tB = HMMModel.B;\n\t\t\tois.close();\n\t\t\tSystem.out.println(\"Model loaded.\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"private boolean importModels() {\n\t\tif (!isCoupledGraphSelected()) {\n\t\t\tnew InformDialog(\"Option only allowed for Coupled Models\",null);\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\n\t\t\tJFileChooser fc = new JFileChooser();\n\t\t\tExtensionFilter exts = new ExtensionFilter();\n\t\t\texts.addExtension(\"ma\");\n\t\t\texts.addExtension(\"cdd\");\n\t\t\texts.addExtension(\"cpp\");\n\n\t\t\tfc.addChoosableFileFilter(exts);\n\n\t\t\tint returnVal = fc.showDialog(MainFrame.this, \"Import\");\n\n\t\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\t\tString inputFileName = fc.getSelectedFile().getPath();\n\n\t\t\t\ttry {\n\t\t\t\t\tFile modelFile = new File(inputFileName);\n\t\t\t\t\tgetCoupledModelEditor().importModelsFromFile(modelFile);\n\t\t\t\t}\n\t\t\t\tcatch (IOException e) {\n\t\t\t\t\tmainstatusBar.setText(\"Error importing\" + inputFileName);\n\t\t\t\t}\n\n\t\t\t\t//System.out.println(\"118111\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//this.repaint();\n\t\t\t\t//System.out.println(\"119111\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}",
"public abstract Model openModel(String graphName) throws JenaProviderException;",
"@Override\n public LiteModelWrapper loadInitializeModel() throws IOException {\n return new LiteModelWrapper(this.loadMappedFile(\"softmax_initialize_ones.tflite\"));\n }",
"DataModelOracle getDataModelOracle( Path project );",
"ScenarioModel loadScenarioModel() throws ModelSerializationException, ModelConversionException;",
"private void cargarModelo() {\n dlmLibros = new DefaultListModel<>();\n listaLibros.setModel(dlmLibros);\n }",
"private void importCatalogue() {\n\n mAuthors = importModelsFromDataSource(Author.class, getHeaderClass(Author.class));\n mBooks = importModelsFromDataSource(Book.class, getHeaderClass(Book.class));\n mMagazines = importModelsFromDataSource(Magazine.class, getHeaderClass(Magazine.class));\n }",
"ScenarioModel loadScenarioModel(InputStream inputStream) throws ModelSerializationException, ModelConversionException;",
"public void schemaBeingLoaded(SchemaDefinition sd) throws ResultException {\n \tfor(SchemaExtensionIF currext : extensions.values()){\n \t\tcurrext.schemaBeingLoaded(sd);\n \t}\n }",
"public MappedByteBuffer loadModelFile(AssetManager assetManager, String modelPath) throws IOException {\n AssetFileDescriptor fileDescriptor = assetManager.openFd(modelPath);\n FileInputStream inputStream = new FileInputStream(fileDescriptor.getFileDescriptor());\n FileChannel fileChannel = inputStream.getChannel();\n long startOffset = fileDescriptor.getStartOffset();\n long declaredLength = fileDescriptor.getDeclaredLength();\n// fileDescriptor.close();\n return fileChannel.map(FileChannel.MapMode.READ_ONLY, startOffset, declaredLength);\n }",
"public void loadAssociations() {\n\n\t\tinitListSettingNames();\n\n\t\taddDefaultAssociations();\n\t}",
"private void loadGeneratedSchema(SchemaDefinition sd) throws ResultException, DmcValueException, DmcNameClashException {\n \t\n \tfor(String schemaName : sd.dependsOnSchemaClasses.keySet()){\n \t\tString schemaClassName = sd.dependsOnSchemaClasses.get(schemaName);\n \t\t\n\t\t\tSchemaDefinition depSchema = isSchema(schemaName);\n\t\t\t\n\t\t\tif (depSchema == null){\n\t\t\t\tClass<?> schemaClass = null;\n\t\t\t\t\n try{\n \tschemaClass = Class.forName(schemaClassName);\n }\n catch(Exception e){\n \tResultException ex = new ResultException();\n \tex.result.addResult(Result.FATAL,\"Couldn't load generated schema class: \" + schemaClassName);\n ex.result.lastResult().moreMessages(e.getMessage());\n ex.result.lastResult().moreMessages(DebugInfo.extractTheStack(e));\n throw(ex);\n }\n\n try{\n \tdepSchema = (SchemaDefinition) schemaClass.newInstance();\n }\n catch(Exception e){\n \tResultException ex = new ResultException();\n \tex.result.addResult(Result.FATAL,\"Couldn't instantiate Java class: \" + schemaClassName);\n \tex.result.lastResult().moreMessages(\"This may be because the class doesn't have a constructor that takes no arguments.\");\n \tex.result.lastResult().moreMessages(\"Or it may be that the class isn't derived from SchemaDefinition.\");\n \tthrow(ex);\n }\n\n loadGeneratedSchema(depSchema);\n\t\t\t}\n\n \t}\n \t\n \tSchemaDefinition theInstance = sd.getInstance();\n \t\n manageSchemaInternal(theInstance);\n \n resolveReferences(theInstance,this);\n \n \t// Now that everything's resolved, we have some unfinished business to take care of\n \tIterator<AttributeDefinition> adl = sd.getAttributeDefList();\n \tresolveNameTypes(adl);\n }",
"private void loadLists() {\n loadSavedCourses();\n loadSavedSchedules();\n }",
"public void loadMedia() {\n MediaDBMapper mapper = new MediaDBMapper(ctx);\n\n String[] fileNames = {\n \"medved.jpg\",\n \"medved 2.jpg\",\n \"medved hnedy.jpg\",\n \"grizzly.jpg\",\n \"buk.jpg\",\n \"jedle.jpg\",\n \"jedle 2.jpg\"\n };\n\n File file = null;\n\n try {\n boolean autoCommit = getConnection().getAutoCommit();\n getConnection().setAutoCommit(false);\n\n try {\n\n for (String fileName : fileNames) {\n try {\n file = new File(\"resources\\\\\" + fileName);\n\n System.out.println(\"Opening: \" + file.getPath() + \".\");\n\n MediaEntity e = mapper.create();\n e.setName(file.getName().substring(0, file.getName().lastIndexOf('.')));\n\n mapper.loadImageFromFile(e, file.getPath());\n\n mapper.save(e);\n } catch (NullPointerException ex) {\n ex.printStackTrace();\n }\n\n// getConnection().commit();\n }\n\n } finally {\n getConnection().setAutoCommit(autoCommit);\n }\n } catch (SQLException ex) {\n ex.printStackTrace();\n// throw new RuntimeException(ex);\n }\n }",
"public void load() {\n ClassLoader loader;\n Class c;\n Mapper result;\n Method m;\n Object[] tables;\n\n if (isLoaded()) {\n return;\n }\n loader = Mapper.class.getClassLoader();\n try {\n c = loader.loadClass(name);\n } catch (ClassNotFoundException e) {\n throw new IllegalStateException(e.toString());\n }\n try {\n m = c.getMethod(\"load\", new Class[]{});\n } catch (NoSuchMethodException e) {\n throw new IllegalStateException(e.toString());\n }\n try {\n tables = (Object[]) m.invoke(null, new Object[] {});\n } catch (InvocationTargetException e) {\n throw new IllegalStateException(e.getTargetException().toString());\n } catch (IllegalAccessException e) {\n throw new IllegalStateException(e.toString());\n }\n parser = (Parser) tables[0];\n oag = (Oag) tables[1];\n }",
"@Override\n public List<VehicleModel> getVehicleModels(AuthContext context) throws DSException {\n\n isContextValidFor(context, roleId -> { if(roleId == -1) throw new DSAuthException(\"Invalid Context\"); }, 1,2,3);\n List<VehicleModel> vehicleModels = new ArrayList<>();\n try {\n List<Map<String, Object>> data = get(\"SELECT * FROM TblVehicleModel\");\n for(Map<String,Object> map: data)\n vehicleModels.add(new VehicleModel(map));\n return vehicleModels;\n } catch (SQLException e) {\n throw new DSFormatException(e.getMessage());\n }\n }",
"public boolean selectFromAvailableModels() throws Exception{\r\n\t\t\r\n\t\tboolean rB=false;\r\n\t\t\t\r\n\t\tbaseFolder = soappProperties.getBaseModelFolder() ;\r\n\t\t\t\t\t // sth like: \"D:/data/projects/_classifierTesting/bank2/models\"\r\n\t\t\r\n\t\tactiveModel = soappProperties.getActiveModel() ; // sth like \"bank2\" \r\n\t\t// this refers to the name of the project as it is contained in the model file!!\r\n\t\t// on first loading, a catalog of available model will be created for faster access if it does not exists\r\n\t\r\n\t\tif (activeModel.length()>0){ \r\n\t\t\t\t\t\t\t\t\t\t\tout.print(2, \"checking model catalog associated with selected project ...\") ;\r\n\t\t\tcheckCreateLocationCatalog() ;\r\n\t\t} else{\r\n\t\t\t// alternatively, we set the active model to blank here, and provide the package name ;\r\n\t\t\t// whenever the active model name is given (and existing) it will be preferred!\r\n\t\t\t \r\n\t\t\tmodelPackageName = soappProperties.getModelPackageName();\r\n\t\t\tactiveModel = getModelThroughPackage(modelPackageName ) ;\r\n\t\t}\r\n\t\t\r\n\t\t// now reading from the modelcatalog.dat\r\n\t\t\r\n\t\t/*\r\n\t \t_MODELSELECT_LATEST = 1;\r\n\t\t_MODELSELECT_FIRSTFOUND = 2;\r\n\t\t_MODELSELECT_BEST = 4;\r\n\t\t_MODELSELECT_ROBUST = 8;\r\n\t\t_MODELSELECT_VERSION = 16 ;\r\n\t\t */\r\n\t\tModelCatalogItem mcItem= null, mci = null ;\r\n\r\n\t\tif (soappModelCatalog.size()>0){\r\n\t\t\tint m=0;\r\n\t\t\tboolean mciOK=false;\r\n\t\t\t\r\n\t\t\twhile ( (mciOK==false) && (mcItem==null) && (m<soappModelCatalog.size())){\r\n\t\t\t\t\r\n\t\t\t\tif (soappProperties.getModelSelectionMode() == SomAppProperties._MODELSELECT_FIRSTFOUND){\r\n\t\t\t\t\tmci = soappModelCatalog.getItem(m);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (soappProperties.getModelSelectionMode() == SomAppProperties._MODELSELECT_LATEST){\r\n\t\t\t\t\tmci = soappModelCatalog.getLatestItem();\r\n\t\t\t\t}\r\n\t\t\t\tif (soappProperties.getModelSelectionMode() == SomAppProperties._MODELSELECT_BEST){\r\n\t\t\t\t\tmci = soappModelCatalog.getBestItem();\r\n\t\t\t\t}\r\n\t\t\t\tif (soappProperties.getModelSelectionMode() == SomAppProperties._MODELSELECT_VERSION){\r\n\t\t\t\t\tmci = soappModelCatalog.getItemByModelname( activeModel, soappProperties.preferredModelVersion ) ;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// checking whether the model contains the required fields mcItem.requiredfields\r\n\t\t\t\tif (modelCheckRequirements(mci) == false ){\r\n\t\t\t\t\tsoappModelCatalog.addToExcludedItems(mci);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tmciOK=true;\r\n\t\t\t\t\tmcItem = mci;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tm++;\r\n\t\t\t} // ->\r\n\t\t\t\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tmcItem=null;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tactiveModel = \"\" ;\r\n\t\tactiveVersion = \"\" ;\r\n\t\t\r\n\t\tif (mcItem!=null){\r\n\t\t\tactiveVersion = mcItem.modelVersion;\r\n\t\t\tactiveModel = mcItem.modelName;\r\n\t\t\trB=true;\r\n\t\t\t\r\n\t\t\tif (activeModel.length()==0){\r\n\t\t\t\trB = false;\r\n\t\t\t}\r\n\t\t\tif (activeVersion.length()==0){\r\n\t\t\t\trB = false;\r\n\t\t\t}\r\n\r\n\t\t}else{ // mcItem ?\r\n\t\t\tout.print(2,\"No matching model (by required fields) found in the list (n=\"+soappModelCatalog.size()+\") of available models.\");\r\n\t\t}\r\n\t\treturn rB;\r\n\t}",
"public boolean loadModel() throws Exception{\r\n\t\t\r\n\t\tboolean rB = false ;\r\n\t\tModelCatalogItem mcItem ;\r\n\t\t\r\n\t\t// before, we have determined name and version according to the request options (e.g. \"latest\")\r\n\t\tmcItem = soappModelCatalog.getItemByModelname( activeModel, activeVersion ); \r\n\t\t// here, an active version should always be defined, if not, the first one will be selected\r\n\t\t\r\n\t\t\r\n\t\tif (mcItem != null){\r\n\t\t\t\t\t\t\t\t\t\t\tout.print(2, \"loading resources for requested model <\"+activeModel+\">, version <\"+activeVersion+\"> ... \") ;\r\n\t\t\t\r\n\t\t\tif ((somData==null) || (somData.getData().getColumnHeaders().size()==0)){\t\t\t\t\t\t\r\n\t\t\t\tsomApplication.loadSource();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// this also sets the data\r\n\t\t\tsoappTransformer = loadSomAppTransformer(mcItem);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\trB= transformIncomingData();\r\n\t\t\t\r\n\t\t\tsoappClassifier = loadSomAppClassifier(mcItem);\r\n\r\n\t\t\trB= (soappTransformer!=null) && (soappClassifier!=null);\r\n\t\t}else{\r\n\t\t\tout.print(2, \"identification resources for requested model <\"+activeModel+\"> failed.\") ;\r\n\t\t}\r\n\t\treturn rB;\r\n\t}",
"private static void loadObjectRepository() {\n\n\t\ttry {\n\n\t\t\tObjectRepositoryReader reader = new ObjectRepositoryReader(GlobalContext.getAppDir(), Constants.FILENAME_OBJECT_REPO);\n\t\t\tMap<String, ObjectRepositoryRow> objectRepository = new HashMap<>();\n\t\t\twhile (reader.hasNextRow()) {\n\n\t\t\t\tObjectRepositoryRow row = (ObjectRepositoryRow) reader.nextRow();\n\t\t\t\tobjectRepository.put(row.getName(), row);\n\t\t\t}\n\n\t\t\t//sets to global context.\n\t\t\tGlobalContext.setObjectRepository(objectRepository);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void processMetadataFromLoader() {\n\n int recordCount = mdi.readInt();\n\n long currentTime = System.currentTimeMillis();\n synchronized (entities) {\n clearOldTempIndexes(currentTime);\n\n for (int i = 0; i < recordCount; i++) {\n int tempIndex = mdi.readInt();\n assert DirectProtocol.isValidTempIndex(tempIndex);\n String symbol = mdi.readCharSequence().toString().intern();\n\n ConstantIdentityKey key;\n int entityIndex = entities.get(symbol, NOT_FOUND_VALUE);\n if (entityIndex == NOT_FOUND_VALUE) {\n entityIndex = entities.size();\n key = new ConstantIdentityKey(symbol);\n entities.put(key, entityIndex);\n } else {\n key = entities.getKeyObject(symbol);\n }\n\n // Note: key is guarantied to be same object as in \"entities\" field\n tempIndexes.put(tempIndex, key);\n\n sendMetadata(symbol, entityIndex);\n }\n if (recordCount > 0) {\n lastTempIndexAdded = currentTime;\n }\n }\n }",
"private Optional<RuntimeModel> loadImportById(String id) {\n Optional<RuntimeModel> runtimeModelOp = registry.get(id);\n if (runtimeModelOp.isPresent()) {\n return runtimeModelOp;\n }\n\n Optional<String> modelPath = runtimeOptions.modelPath(id);\n if (modelPath.isPresent()) {\n return registry.registerFile(modelPath.get());\n }\n\n if (runtimeOptions.isAllowExternal()) {\n return externalImportService.registerExternalImport(id);\n }\n return Optional.empty();\n }",
"public void registerMetamodels(ResourceSet rs, IbexExecutable executable) throws IOException {\r\n\t\t\r\n\t\t// Set correct workspace root\r\n\t\tsetWorkspaceRootDirectory(rs);\r\n\t\t\r\n\t\t// Load and register source and target metamodels\r\n\t\tEPackage familiesPack = null;\r\n\t\tEPackage personsPack = null;\r\n\t\tEPackage benchmarxfamiliestopersonsPack = null;\r\n\t\t\r\n\t\tif(executable instanceof FWD_OPT) {\r\n\t\t\tResource res = executable.getResourceHandler().loadResource(\"platform:/resource/Persons/model/Persons.ecore\");\r\n\t\t\tpersonsPack = (EPackage) res.getContents().get(0);\r\n\t\t\trs.getResources().remove(res);\r\n\t\t\t\r\n\t\t\tres = executable.getResourceHandler().loadResource(\"platform:/resource/BenchmarxFamiliesToPersons/model/BenchmarxFamiliesToPersons.ecore\");\r\n\t\t\tbenchmarxfamiliestopersonsPack = (EPackage) res.getContents().get(0);\r\n\t\t\trs.getResources().remove(res);\r\n\t\t}\r\n\t\t\t\t\r\n\t\tif(executable instanceof BWD_OPT) {\r\n\t\t\tResource res = executable.getResourceHandler().loadResource(\"platform:/resource/Families/model/Families.ecore\");\r\n\t\t\tfamiliesPack = (EPackage) res.getContents().get(0);\r\n\t\t\trs.getResources().remove(res);\r\n\t\t\t\r\n\t\t\tres = executable.getResourceHandler().loadResource(\"platform:/resource/BenchmarxFamiliesToPersons/model/BenchmarxFamiliesToPersons.ecore\");\r\n\t\t\tbenchmarxfamiliestopersonsPack = (EPackage) res.getContents().get(0);\r\n\t\t\trs.getResources().remove(res);\r\n\t\t}\r\n\r\n\t\tif(familiesPack == null)\r\n\t\t\tfamiliesPack = FamiliesPackageImpl.init();\r\n\t\t\t\t\r\n\t\tif(personsPack == null)\r\n\t\t\tpersonsPack = PersonsPackageImpl.init();\r\n\t\t\r\n\t\tif(benchmarxfamiliestopersonsPack == null) {\r\n\t\t\tbenchmarxfamiliestopersonsPack = BenchmarxFamiliesToPersonsPackageImpl.init();\r\n\t\t\trs.getPackageRegistry().put(\"platform:/resource/BenchmarxFamiliesToPersons/model/BenchmarxFamiliesToPersons.ecore\", BenchmarxFamiliesToPersonsPackage.eINSTANCE);\r\n\t\t\trs.getPackageRegistry().put(\"platform:/plugin/BenchmarxFamiliesToPersons/model/BenchmarxFamiliesToPersons.ecore\", BenchmarxFamiliesToPersonsPackage.eINSTANCE);\r\n\t\t}\r\n\t\t\t\r\n\t\trs.getPackageRegistry().put(\"platform:/resource/Families/model/Families.ecore\", familiesPack);\r\n\t rs.getPackageRegistry().put(\"platform:/plugin/Families/model/Families.ecore\", familiesPack);\t\r\n\t\t\t\r\n\t\trs.getPackageRegistry().put(\"platform:/resource/Persons/model/Persons.ecore\", personsPack);\r\n\t\trs.getPackageRegistry().put(\"platform:/plugin/Persons/model/Persons.ecore\", personsPack);\r\n\t}",
"public void loadData () {\n // create an ObjectInputStream for the file we created before\n ObjectInputStream ois;\n try {\n ois = new ObjectInputStream(new FileInputStream(\"DB/Guest.ser\"));\n\n int noOfOrdRecords = ois.readInt();\n Guest.setMaxID(ois.readInt());\n System.out.println(\"GuestController: \" + noOfOrdRecords + \" Entries Loaded\");\n for (int i = 0; i < noOfOrdRecords; i++) {\n guestList.add((Guest) ois.readObject());\n //orderList.get(i).getTable().setAvailable(false);\n }\n } catch (IOException | ClassNotFoundException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }",
"@Before\n\tpublic void loadModel() {\n\t\tloader.unloadAll();\n\n\t\tmodel = loader\n\t\t\t\t.loadViaXslt(\"/net/meisen/dissertation/performance/implementations/similarity/tida/tida-model-timeSeriesSimilarityEvaluator.xml\");\n\t\tevaluator = new TimeSeriesSimilarityEvaluator(model);\n\t}",
"private void loadViewModel(String configName, String content){\n\t\tHeadHandler hHandler = new HeadHandler();\r\n\t\ttry {\r\n\t\t\thHandler.parse(content);\r\n\t\t\tif(hHandler.getFileType() == null){\r\n\t\t\t\tthrow new RuntimeException(\"Unrecognised file type\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: Add some intelligence to the process of handling this exception\r\n\t\t\tJOptionPane.showMessageDialog(this, \"Sorry, unrecognised file type. Content starts:\" + hHandler.getHead() + \"...\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tStandardHandler vHandler = HandlerFactory.getHandler(hHandler.getFileType());\r\n\t\tlogger.info(\"Found file of type:\" + hHandler.getFileType());\r\n\t\tlogger.info(\"vHandler:\" + vHandler);\r\n\t\ttry {\r\n\t\t\tvHandler.parse(content);\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: Add some intelligence to the process of handling this exception\r\n\t\t\tJOptionPane.showMessageDialog(this, \"Sorry. Unable to parse the file \" + configName, \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t}\r\n\t\t\r\n\t\tYorkEntityView newView = ViewFactory.getView(hHandler.getFileType(), this, vHandler, null);\r\n\t\tif(newView != null){\r\n\t\t\tcurrentView.addModelView(newView);\r\n\t\t}\r\n\t\t\r\n\t\trequestFocusInWindow();\r\n\t}",
"public void getInstances(String sf) throws IOException {\r\n\t\tDatabase db = new Database();\r\n\t\tthis.database = db.loadData(sf);\r\n\t}",
"public void cargarModelo() {\n\t}",
"@Test\r\n\tpublic void testModelLoading() {\n\t\tString absoluteFilePath = \"\";\r\n\t\ttry {\r\n\t\t\tabsoluteFilePath = getAbsoluteFilePath(\"simpletll.stlsimulation\");\r\n\t\t} catch (IOException e) {\r\n\t\t\tAssert.fail(\"Couldn't compute absolute file path.\");\r\n\t\t}\r\n\t\t\r\n\t\t// Load STL simulation model with ModelLoader\r\n\t\tfinal SimulationModel simulationModel = ModelLoader.load(absoluteFilePath);\r\n\t\t\r\n\t\t// Check contents of loaded STL simulation model \r\n\t\tAssert.assertNotNull(simulationModel);\r\n\t\tat.ac.tuwien.big.stl.System system = simulationModel.getSystem();\r\n\t\tAssert.assertNotNull(system);\r\n\t\tAssert.assertEquals(\"SimpleTransportationLine\", system.getName());\r\n\t}",
"abstract public boolean loadModelFromString(List<String> lines);",
"private void load() {\r\n\t\tswitch (this.stepPanel.getStep()) {\r\n\t\tcase StepPanel.STEP_HOST_GRAPH:\r\n\t\t\tloadGraph(StepPanel.STEP_HOST_GRAPH);\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_STOP_GRAPH:\r\n\t\t\tloadGraph(StepPanel.STEP_STOP_GRAPH);\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_CRITICAL_PAIRS:\r\n\t\t\tloadPairs();\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_FINISH:\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"private void loadDatabaseSettings() {\r\n\r\n\t\tint dbID = BundleHelper.getIdScenarioResultForSetup();\r\n\t\tthis.getJTextFieldDatabaseID().setText(dbID + \"\");\r\n\t}",
"public static void loadPOTables(){\n\t\ttry {\n\t\t\tfor(TableInfo tableInfo:tables.values()){\n\t\t\t\tClass c = Class.forName(DBManager.getConfiguration().getPoPackage()+\".\"+StringUtils.firstCharUpperCase(tableInfo.getTname()));\n\t\t\t\tpoClassTableMap.put(c, tableInfo);\n\t\t\t}\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@SideOnly(Side.CLIENT)\n public static void initModels() {\n }",
"protected abstract void setClueModels();",
"void setDataModelOracle( Path project,\n DataModelOracle oracle );",
"public void load() {\r\n\t\t\r\n\t\t//-- Clean\r\n\t\tthis.repositories.clear();\r\n\t\t\r\n\t\tloadInternal();\r\n\t\tloadExternalRepositories();\r\n\t\t\r\n\t}",
"public static void loadDB() throws Exception {\n\t\t// Remove previously loaded data\n\t\tcolToData.clear();\n\t\t// Load dictionary from disk\n\t\tloadDictionary();\n\t\t// Collect columns to load in parallel\n\t\tList<ColumnRef> colsToLoad = new ArrayList<ColumnRef>();\n\t\tfor (TableInfo table : CatalogManager.currentDB.nameToTable.values()) {\n\t\t\tString tableName = table.name;\n\t\t\tfor (ColumnInfo column : table.nameToCol.values()) {\n\t\t\t\tString columnName = column.name;\n\t\t\t\tcolsToLoad.add(new ColumnRef(tableName, columnName));\n\t\t\t}\n\t\t}\n\t\t// Load columns\n\t\tcolsToLoad.stream().parallel().forEach((colRef) -> {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"Loading column \" + colRef.toString());\n\t\t\t\tloadColumn(colRef);\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.err.println(\"Error loading column \" + colRef.toString());\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t});\n\t\tSystem.out.println(\"Loaded database.\");\n\t}",
"private void preloadDb() {\n String[] branches = getResources().getStringArray(R.array.branches);\n //Insertion from xml\n for (String b : branches)\n {\n dataSource.getTherapyBranchTable().insertTherapyBranch(b);\n }\n String[] illnesses = getResources().getStringArray(R.array.illnesses);\n for (String i : illnesses)\n {\n dataSource.getIllnessTable().insertIllness(i);\n }\n String[] drugs = getResources().getStringArray(R.array.drugs);\n for (String d : drugs)\n {\n dataSource.getDrugTable().insertDrug(d);\n }\n }",
"Map<String,DataSource> load(Set<String> existsDataSourceNames) throws Exception;",
"public void loadFromOBJ(Context context, String filename) {\n loadFromOBJThreaded(context, filename);\n loadObjData();\n }",
"protected final Model loadModel(String path, RenderOptions options) {\n // Builtin models\n if (path.equals(\"builtin/generated\")) {\n return new GeneratedModel();\n }\n\n Model model = openGsonObject(Model.class, ResourceType.MODELS, path);\n if (model == null) {\n Logging.LOGGER_MAPDISPLAY.once(Level.WARNING, \"Failed to load model \" + path);\n return null;\n }\n\n // Handle overrides first\n if (model.overrides != null && !model.overrides.isEmpty()) {\n for (Model.ModelOverride override : model.overrides) {\n if (override.matches(options) && !override.model.equals(path)) {\n //System.out.println(\"MATCH \" + override.model + \" \" + options);\n return this.loadModel(override.model, options);\n }\n }\n }\n\n // Insert the parent model as required\n if (model.getParentName() != null) {\n Model parentModel = this.loadModel(model.getParentName(), options);\n if (parentModel == null || parentModel.placeholder) {\n Logging.LOGGER_MAPDISPLAY.once(Level.WARNING, \"Parent of model \" + path + \" not found: \" + model.getParentName());\n return null;\n }\n model.loadParent(parentModel);\n }\n\n // Make all texture paths absolute\n model.build(this, options);\n return model;\n }",
"@PostConstruct\n public void loadSchema() throws IOException {\n\n loadDataIntoHSQL();\n\n //get the schema\n File schemaFile = resource.getFile();\n\n //parse the schema\n //Register the schema file\n TypeDefinitionRegistry typeDefinitionRegistry = new SchemaParser().parse(schemaFile);\n\n //build the wiring to connect\n RuntimeWiring wiring = buildRuntimeWiring();\n\n //Generate the schema using registered file and wiring which is nothing but reference.\n GraphQLSchema schema = new SchemaGenerator().makeExecutableSchema(typeDefinitionRegistry, wiring);\n\n //build the graphQL\n graphQL = GraphQL.newGraphQL(schema).build();\n\n List<Vehicle> list = vehicleService.findAll();\n\n for (Vehicle vehicle : list) {\n System.out.println(vehicle.getMake().toString());\n }\n\n }",
"public void reInitializeModels () {\n this.model = new ModelManager(getTypicalAddressBook(), new UserPrefs());\n this.expectedModel = new ModelManager(model.getAddressBook(), new UserPrefs());\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}",
"private void LoadingDatabaseScores() {\n\n\t\tCursor cursor = helper.getDataAll(ScoretableName);\n\n\t\t// id_counter = cursor.getCount();\n\t\tSCORE_LIST = new ArrayList<gameModel>();\n\t\twhile (cursor.moveToNext()) {\n\t\t\t// loading each element from database\n\t\t\tString ID = cursor.getString(ID_MAXSCORE_COLUMN);\n\t\t\tString Score = cursor.getString(SCORE_MAXSCORE_COLUMN);\n\n\t\t\tSCORE_LIST.add(new gameModel(ID, Integer.parseInt(Score),\n\t\t\t\t\tThumbNailFactory.create().getThumbNail(ID)));\n\n\t\t} // travel to database result\n\n\t}",
"public void loadGraph() {\n System.out.println(\"The overlay graph will be loaded from an external file\");\n try(FileInputStream fis = new FileInputStream(graphPath + OVERLAY_GRAPH);\n ObjectInputStream ois = new ObjectInputStream(fis))\n {\n graph = (MatrixOverlayGraph) ois.readObject();\n System.out.println(\"Overlay graph loaded\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n loadSupporters();\n }",
"public List<ModelDescriptor> getModelDescriptors(IProgressReporter pr) throws ModelManagerException {\n\t\tArrayList<ModelDescriptor> res = new ArrayList<ModelDescriptor>();\n\t\tString[] list = null;\n\t\ttry {\n\t\t\tlist = getFolderList();\n\t\t} catch (IOException e) {\n\t\t\tthrow new ModelManagerException(\"Listing model folders failed.\", e);\n\t\t}\n\t\t// Set loading message\n\t\tpr.init(getLoadingMessage(), list.length);\n\t\tint cnt = 0;\n\t\tfor (String modeldir : list) {\n\t\t\tpr.progress(++cnt);\n\t\t\tif (isValidModelDir(modeldir)) {\n\t\t\t\tuseModel(modeldir);\n\t\t\t\t// Check for the correct model type\n\t\t\t\tModelType mtype = ModelType.parse(getModelXMLAttribute(\"type\"));\n\t\t\t\tif (mtype == ModelType.Unknown)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tInputStream img = null;\n\t\t\t\tString imgfile = getModelXMLTagValue(\"description.image\");\n\t\t\t\tif (modelFileExists(imgfile)) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\timg = getInStream(imgfile);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// ignore\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\t\timg = getClass().getClassLoader().getResourceAsStream(\"notfound.png\");\n\t\t\t\t// Get model date\n\t\t\t\tDate d = null;\n\t\t\t\ttry {\n\t\t\t\t\td = DateFormat.getDateInstance().parse(getModelXMLTagValue(\"description.created\"));\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\td = Calendar.getInstance().getTime();\n\t\t\t\t}\n\t\t\t\tModelDescriptor md = new ModelDescriptor(modeldir, getModelXMLTagValue(\"description.name\"), mtype, img,\n\t\t\t\t\t\td);\n\t\t\t\tmd.shortDescription = getModelXMLTagValue(\"description.short\", \"\");\n\t\t\t\tres.add(md);\n\t\t\t}\n\t\t}\n\t\tpr.finish();\n\t\treturn res;\n\t}",
"private void loadDatabase()\n\t{\n\t\ttry\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Check to make sure the Bmod Database is there, if not, try \n\t\t\t\t// downloading from the website.\n\t\t\t\tif(!Files.exists(m_databaseFile))\n\t\t\t\t{\n\t\t\t\t\tFiles.createDirectories(m_databaseFile.getParent());\n\t\t\t\t\n\t\t\t\t\tbyte[] file = ExtensionPoints.readURLAsBytes(\"http://\" + Constants.API_HOST + HSQL_DATABASE_PATH);\n\t\t\t\t\tif(file.length != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tFiles.deleteIfExists(m_databaseFile);\n\t\t\t\t\t\tFiles.write(m_databaseFile, file, StandardOpenOption.CREATE, StandardOpenOption.WRITE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// make sure we have the proper scriptformat.\n\t\t\t\tsetScriptFormatCorrectly();\n\t\t\t}catch(NullPointerException|IOException ex)\n\t\t\t{\n\t\t\t\tm_logger.error(\"Could not fetch database from web.\", ex);\n\t\t\t}\n\t\t\t\n\t\n\t\t\t\n\t\t\tClass.forName(\"org.hsqldb.jdbcDriver\");\n\t\t\n\t\t\t\n\t\t\tString db = ExtensionPoints.getBmodDirectory(\"database\").toUri().getPath();\n\t\t\tconnection = DriverManager.getConnection(\"jdbc:hsqldb:file:\" + db, \"sa\", \"\");\n\t\t\t\n\t\t\t// Setup Connection\n\t\t\tCSVRecordLoader ldr = new CSVRecordLoader();\n\t\t\n\t\t\t// Load all of the building independent plugins\n\t\t\tfor(Record<?> cp : ldr.getRecordPluginManagers())\n\t\t\t{\n\t\t\t\tm_logger.debug(\"Creating table: \" + cp.getTableName());\n\t\t\t\t// Create a new table\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tgetPreparedStatement(cp.getSQLTableDefn()).execute();\n\t\t\t\t} catch(SQLException ex)\n\t\t\t\t{\n\t\t\t\t\t// Table exists\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tm_logger.debug(\"Doing index:\" + cp.getIndexDefn());\n\t\t\t\t\tif(cp.getIndexDefn() != null)\n\t\t\t\t\t\tgetPreparedStatement(cp.getIndexDefn()).execute();\n\t\t\t\t}catch(SQLException ex)\n\t\t\t\t{\t// index exists\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t} catch (Exception ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t\tif(ex instanceof DatabaseIntegrityException)\n\t\t\t\tDatabase.handleCriticalError((DatabaseIntegrityException)ex);\n\t\t\telse\n\t\t\t\tDatabase.handleCriticalError(new DatabaseIntegrityException(ex));\n\t\t}\n\t\t\n\t}",
"public void load() {\n loadDisabledWorlds();\n chunks.clear();\n for (World world : ObsidianDestroyer.getInstance().getServer().getWorlds()) {\n for (Chunk chunk : world.getLoadedChunks()) {\n loadChunk(chunk);\n }\n }\n }",
"public void test_dn_02() {\n OntModel mymod = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM, null );\n mymod.read( \"file:testing/ontology/testImport3/a.owl\" );\n \n assertEquals( \"Graph count..\", 2, mymod.getSubGraphs().size() );\n \n for (Iterator it = mymod.listImportedModels(); it.hasNext();) {\n mymod.removeSubModel( (Model) it.next() );\n }\n \n assertEquals( \"Graph count..\", 0, mymod.getSubGraphs().size() );\n }",
"@Test\n public void testORMUsageToretrieveTbsPatternSavedEntity() throws DataloadGeneratorException {\n List<TbsPatternSavedTEntity> tbsPatternSavedTEntities = getTbsPatternSavedTEntityList(TBS_SELF_SOLUTION);\n\n for(TbsPatternSavedTEntity tbsPatternSavedTEntity : tbsPatternSavedTEntities){\n if(\"td_admin\".equalsIgnoreCase(tbsPatternSavedTEntity.getOperator()))\n System.out.println(\"Operator : \" + tbsPatternSavedTEntity.getOperator() +\" -- Dataload Name\" +tbsPatternSavedTEntity.getSegment() + \"Intermediate File : \" + tbsPatternSavedTEntity.getIntermediateXml());\n }\n assertNotNull(tbsPatternSavedTEntities);\n }",
"private List<Model> getModel() {\n \r\n DataBaseTestAdapter1 mDbHelper = new DataBaseTestAdapter1(this); \r\n\t \tmDbHelper.createDatabase(); \r\n\t \tmDbHelper.open(); \r\n\t \t \r\n \t \tpure = (Pure?\"T\":\"F\");\r\n\r\n \t \tString sql =\"SELECT Code FROM \"+major+\" WHERE (Pure='All' OR Pure='\" + pure + \"') ORDER BY Year,Code\"; \r\n\t \tCursor testdata = mDbHelper.getTestData(sql); \r\n\t \tString code = DataBaseUtility1.GetColumnValue(testdata, \"Code\");\r\n\t \tlist.add(new Model(code));\r\n\t \twhile (testdata.moveToNext()){\r\n\t \t\t \r\n\t \tcode = DataBaseUtility1.GetColumnValue(testdata, \"Code\");\r\n\t \tModel temp = new Model(code);\r\n\t \t\r\n\t \tif ((code.equals(\"CommonCore1\") && SA) ||\t\t\t//name conversion\r\n\t \t\t\t(code.equals(\"CommonCore2\") && S_T) ||\r\n\t \t\t\t(code.equals(\"CommonCore3\") && A_H) ||\r\n\t \t\t\t(code.equals(\"CommonCore4\") && Free) ||\r\n\t \t\t\t(code.equals(\"SBM\") && SBM) ||\r\n\t \t\t\t(code.equals(\"ENGG\") && ENGG) ||\r\n\t \t\t\t(code.equals(\"FreeElective\") && FreeE) ||\r\n\t \t\t\t(code.equals(\"COMPElective1\") && compx1) ||\r\n\t \t\t\t((code.equals(\"COMPElective1\")|| code.equals(\"COMPElective2\")) && compx2) ||\r\n\t \t\t\t((code.equals(\"COMPElective1\")|| code.equals(\"COMPElective2\") || code.equals(\"COMPElective3\")) && compx3) ||\r\n\t \t\t\t((code.equals(\"COMPElective1\")|| code.equals(\"COMPElective2\") || code.equals(\"COMPElective3\") || code.equals(\"COMPElective4\")) && compx4) ||\r\n\t \t\t\t((code.equals(\"COMPElective1\")|| code.equals(\"COMPElective2\") || code.equals(\"COMPElective3\") || code.equals(\"COMPElective4\") || code.equals(\"COMPElective5\")) && compx5) ||\r\n\t \t\t\t(code.equals(\"COMP/ELEC/MATH1\") && CEMx1) ||\r\n\t \t\t\t((code.equals(\"COMP/ELEC/MATH1\") || code.equals(\"COMP/ELEC/MATH2\")) && CEMx2) \r\n\t \t\t\t\t\t\t\t){\r\n\t \t\t\r\n\t \t\ttemp.setSelected(true);\r\n\t \t}\r\n\t \r\n\t \tlist.add(temp);\r\n \t}\r\n\r\n\t\ttestdata.close();\r\n \tmDbHelper.close();\r\n\r\n return list;\r\n }",
"private void load(Simulation simulation) throws RiotNotFoundException {\n String name = simulation.getName();\n provOutputFileURI = simulation.getProvLocation().resolve(name + \".ttl\").toString();\n model = RDFDataMgr.loadModel(provOutputFileURI);\n localNameSpaceURI = getLocalNameSpaceURI();\n model.setNsPrefix(LOCAL_NS_PREFIX, localNameSpaceURI);\n trimRemoteNS();\n }",
"public static void load() {\n for (DataSourceSwapper each : ServiceLoader.load(DataSourceSwapper.class)) {\n loadOneSwapper(each);\n }\n }",
"@Override\r\n\tprotected void initLoad() {\n\r\n\t}",
"public void initDatabase() throws SQLException {\n\n ModelFactory factory = new ModelFactory(this.connection);\n\n StopsDao stopsData = factory.getStopsDao();\n\n ArrayList<Stop> stops = stopsData.getStopsFromCsv(getResource(\"stops.csv\"));\n\n Iterator<Stop> it = stops.iterator();\n while(it.hasNext()) {\n Stop stop = it.next();\n System.out.println(stop.toString());\n }\n\n\n /*\n ShapesDao shapesData = factory.getShapesDao();\n\n ArrayList<Shape> shapes = shapesData.getShapesFromCsv(getResource(\"shapes.csv\"));\n\n Iterator<Shape> it = shapes.iterator();\n while(it.hasNext()) {\n Shape shape = it.next();\n System.out.println(shape.toString());\n }\n\n CalendarDateDao calendarData = factory.getCalendarDatesDao();\n\n ArrayList<CalendarDate> agencies = calendarData.getCalendarDatesFromCsv(getResource(\"calendar_dates.csv\"));\n\n Iterator<CalendarDate> it = agencies.iterator();\n while(it.hasNext()) {\n CalendarDate date = it.next();\n System.out.println(date.toString());\n }\n\n AgencyDao agencyData = factory.getAgencyDao();\n agencyData.drop();\n agencyData.create();\n\n ArrayList<Agency> agencies = agencyData.getAgenciesFromCsv(getResource(\"agency.csv\"));\n\n Iterator<Agency> it = agencies.iterator();\n while(it.hasNext()) {\n Agency age = it.next();\n System.out.println(age.toString());\n agencyData.saveAgency(age);\n }\n\n RoutesDao routesDao = factory.getRouteDao();\n routesDao.drop();\n routesDao.create();\n\n ArrayList<Route> routes = routesDao.getRoutesFromCsv(getResource(\"routes.csv\"));\n\n Iterator<Route> it = routes.iterator();\n while(it.hasNext()) {\n Route route = it.next();\n System.out.println(route.toString());\n }*/\n }",
"public static void loadBioPAX(String filepath, String ownerName, String db) throws Exception{\n\t\tFile f = new File(filepath);\n\t\tString title = f.getName();\n\t\tFileInputStream fin = new FileInputStream(f);\n\t\tBioPAXIOHandler handler = new SimpleIOHandler();\n\t\tModel model = handler.convertFromOWL(fin);\n\t\tloadBioPAXModel(model, title, ownerName, db);\n\t}",
"private void ucitajDrajver()throws Exception{\r\n db.loadDriver();\r\n }",
"protected abstract void loadData();",
"public static void SetupORM(Connection con) {\n // Add all ORM models here\n User.Initialize(con);\n Milestone.Initialize(con);\n Planner.Initialize(con);\n }",
"@Override\r\n\tprotected void load() {\n\t\t\r\n\t}",
"@Override\n\t\tprotected void loadSpecification(SpecificationContext context) {\n\t\t}",
"void massiveModeLoading( File dataPath );",
"public void load() {\r\n try {\r\n project = ProjectAccessor.findFromTitle(title, conn);\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"RecordSet loadAllComponents(Record record, RecordLoadProcessor recordLoadProcessor);",
"public org.eclipse.stardust.engine.api.runtime.Models\n getModels(org.eclipse.stardust.engine.api.query.DeployedModelQuery query)\n throws org.eclipse.stardust.common.error.WorkflowException;",
"public void registerMetamodels(ResourceSet rs, IbexExecutable executable) throws IOException {\n\t\t\n\t\t// Set correct workspace root\n\t\tsetWorkspaceRootDirectory(rs);\n\t\t\n\t\t// Load and register source and target metamodels\n\t\tEPackage languagePack = null;\n\t\tEPackage henshinPack = null;\n\t\tEPackage ecorePack = null;\n\t\tEPackage emoflontohenshinPack = null;\n\t\t\n\t\tif(executable instanceof FWD_OPT) {\n\t\t\tResource res = executable.getResourceHandler().loadResource(\"platform:/resource/org.eclipse.emf.henshin.model/model/henshin.ecore\");\n\t\t\thenshinPack = (EPackage) res.getContents().get(0);\n\t\t\trs.getResources().remove(res);\n\t\t\t\n\t\t\tres = executable.getResourceHandler().loadResource(\"http://www.eclipse.org/emf/2002/Ecore\");\n\t\t\tecorePack = (EPackage) res.getContents().get(0);\n\t\t\trs.getResources().remove(res);\n\t\t\t\n\t\t\tres = executable.getResourceHandler().loadResource(\"platform:/resource/EMoflonToHenshin/model/EMoflonToHenshin.ecore\");\n\t\t\temoflontohenshinPack = (EPackage) res.getContents().get(0);\n\t\t\trs.getResources().remove(res);\n\t\t}\n\t\t\t\t\n\t\tif(executable instanceof BWD_OPT) {\n\t\t\tResource res = executable.getResourceHandler().loadResource(\"platform:/plugin/org.emoflon.ibex.tgg.language/model/Language.ecore\");\n\t\t\tlanguagePack = (EPackage) res.getContents().get(0);\n\t\t\trs.getResources().remove(res);\n\t\t\t\n\t\t\tres = executable.getResourceHandler().loadResource(\"http://www.eclipse.org/emf/2002/Ecore\");\n\t\t\tecorePack = (EPackage) res.getContents().get(0);\n\t\t\trs.getResources().remove(res);\n\t\t\t\n\t\t\tres = executable.getResourceHandler().loadResource(\"platform:/resource/EMoflonToHenshin/model/EMoflonToHenshin.ecore\");\n\t\t\temoflontohenshinPack = (EPackage) res.getContents().get(0);\n\t\t\trs.getResources().remove(res);\n\t\t}\n\n\t\tif(languagePack == null)\n\t\t\tlanguagePack = LanguagePackageImpl.init();\n\t\t\t\t\n\t\tif(henshinPack == null)\n\t\t\thenshinPack = HenshinPackageImpl.init();\n\t\t\n\t\tif(ecorePack == null)\n\t\t\tecorePack = EcorePackageImpl.init();\n\t\t\n\t\tif(emoflontohenshinPack == null) {\n\t\t\temoflontohenshinPack = EMoflonToHenshinPackageImpl.init();\n\t\t\trs.getPackageRegistry().put(\"platform:/resource/EMoflonToHenshin/model/EMoflonToHenshin.ecore\", EMoflonToHenshinPackage.eINSTANCE);\n\t\t\trs.getPackageRegistry().put(\"platform:/plugin/EMoflonToHenshin/model/EMoflonToHenshin.ecore\", EMoflonToHenshinPackage.eINSTANCE);\n\t\t}\n\t\t\t\n\t\trs.getPackageRegistry().put(\"platform:/resource/org.emoflon.ibex.tgg.language/model/Language.ecore\", languagePack);\n\t rs.getPackageRegistry().put(\"platform:/plugin/org.emoflon.ibex.tgg.language/model/Language.ecore\", languagePack);\t\n\t\t\t\n\t\trs.getPackageRegistry().put(\"platform:/resource/org.eclipse.emf.henshin.model/model/henshin.ecore\", henshinPack);\n\t\trs.getPackageRegistry().put(\"platform:/plugin/org.eclipse.emf.henshin.model/model/henshin.ecore\", henshinPack);\n\t\t\n\t\trs.getPackageRegistry().put(\"http://www.eclipse.org/emf/2002/Ecore\", henshinPack);\n\t}",
"private void readEntityRelationships() {\n List<DeployBeanPropertyAssocOne<?>> primaryKeyJoinCheck = new ArrayList<>();\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n checkMappedBy(info, primaryKeyJoinCheck);\n }\n for (DeployBeanPropertyAssocOne<?> prop : primaryKeyJoinCheck) {\n checkUniDirectionalPrimaryKeyJoin(prop);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n secondaryPropsJoins(info);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n setInheritanceInfo(info);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n if (!info.isEmbedded()) {\n registerDescriptor(info);\n }\n }\n }",
"public abstract Map<String, Object> fetchModelMap() throws ModelException;",
"ModelsFactory getModelsFactory();",
"List<ContinuingEducationModel> getModelsByCapID(CapIDModel capId, boolean isMergeRef) throws AAException, RemoteException;"
] |
[
"0.54304177",
"0.53814465",
"0.5273237",
"0.52666956",
"0.5257362",
"0.5219699",
"0.5204151",
"0.51998734",
"0.5125925",
"0.50526756",
"0.5050625",
"0.50151604",
"0.49928153",
"0.4964519",
"0.49604183",
"0.49519467",
"0.49284592",
"0.48815894",
"0.48712695",
"0.48459983",
"0.481588",
"0.481588",
"0.48125368",
"0.48113987",
"0.479362",
"0.47933966",
"0.47903714",
"0.47884214",
"0.47799698",
"0.477921",
"0.47767004",
"0.47710922",
"0.4761358",
"0.47523874",
"0.47406405",
"0.47378522",
"0.47342858",
"0.47072878",
"0.4697837",
"0.4696496",
"0.46856096",
"0.46716183",
"0.4670534",
"0.46642283",
"0.46630898",
"0.4655606",
"0.46460637",
"0.46426445",
"0.46401846",
"0.4638953",
"0.4634431",
"0.4623452",
"0.46064582",
"0.45899668",
"0.45735693",
"0.4550595",
"0.455016",
"0.45478004",
"0.45424113",
"0.454197",
"0.45379755",
"0.452898",
"0.451827",
"0.45112333",
"0.44986644",
"0.44971105",
"0.44959038",
"0.448855",
"0.44880453",
"0.44858062",
"0.448242",
"0.4479642",
"0.44762513",
"0.44748652",
"0.44593427",
"0.4455206",
"0.44541723",
"0.4449842",
"0.44473067",
"0.44411653",
"0.4438321",
"0.44351888",
"0.44339904",
"0.4429295",
"0.44225731",
"0.44213867",
"0.4419799",
"0.441545",
"0.44129264",
"0.44091913",
"0.4407176",
"0.44025296",
"0.43942255",
"0.43901956",
"0.43859577",
"0.4384653",
"0.43735936",
"0.43666127",
"0.4364006",
"0.43627194"
] |
0.6198956
|
0
|
/ Get the context = SimTK::State holder for the passed in model
|
public OpenSimContext getContext(Model model) {
OpenSimContext dContext = mapModelsToContexts.get(model);
if(dContext==null)
return createContext(model, false);
return (dContext);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public State getState() { return model.getState(); }",
"public S getCurrentState();",
"StateT getState();",
"public GameState getGameStateModel() {\n return this.gameStateModel;\n }",
"public static int\ngetLightModel(SoState state) \n{ \n\t SoLazyElement elem = getInstance(state);\n\t return elem.coinstate.lightmodel;\n}",
"private StateHolder getStateHolder() {\n return stateHolder;\n }",
"Object getState();",
"ESMFState getState();",
"StateManager getStateManager();",
"public void initModel() {\r\n this.stateEngine = new RocketStateEngine();\r\n }",
"public StatesModel getStatefulModel()\n {\n return statesModel;\n }",
"State getState();",
"State getState();",
"State getState();",
"State getState();",
"public SavedState(SavedStateMap savedStateMap, Object model) {\n this.savedStateMap = savedStateMap;\n this.displayName = savedStateMap.displayName;\n this.model = model;\n modelName = model.getClass().getName();\n\n createBean();\n BeanInfo bi = new SimpleBeanInfo();\n PropertyDescriptor[] pd;\n try {\n bi = Introspector.getBeanInfo(stateBean.getClass());\n pd = bi.getPropertyDescriptors();\n } catch (IntrospectionException ex) {\n Logger.getLogger(SavedState.class.getName()).log(Level.SEVERE, null, ex);\n ex.printStackTrace();\n }\n if (stateBean != null) {\n this.makeSynchronizers();\n }\n\n }",
"public T getState() {\r\n\t\treturn state;\r\n\t}",
"public MD2_ModelState[] getModelStates(){\n\t\treturn state;\n\t}",
"public interface Context {\n\n\tvoid goNext();\n\tvoid setState(State state);\n\tvoid execute();\n\tState getCurrent();\n}",
"public String getState()\r\n\t{\r\n\t\treturn state.getModelObjectAsString();\r\n\t}",
"protected S state() {\n return state;\n }",
"public IState getState();",
"public abstract IState createState(ISemanticObject<?> observable, IContext context) throws ThinklabException;",
"@Override\n\tpublic Context prepareModel(XDust dust, RenderChain chain, Context context,\n\t\t\tObject model) {\n\t\treturn new Context(context, context, this.getParameters());\n\t}",
"public State getState();",
"public State getState();",
"public State getMyCurrentState () {\n return myCurrentState;\n }",
"SerializableState getSampleModel(Long id) throws RemoteException;",
"public OpenSimContext createContext(Model aModel, boolean force) {\n OpenSimContext context = mapModelsToContexts.get(aModel);\n if (context ==null || force){\n OpenSimContext newContext;\n try {\n newContext = new OpenSimContext(aModel.initSystem(), aModel);\n } catch (IOException ex) {\n ErrorDialog.displayExceptionDialog(ex);\n return null;\n }\n mapModelsToContexts.put(aModel, newContext);\n context = newContext;\n }\n return context;\n }",
"public TSLexerState getState() {\r\n \t\treturn state;\r\n \t}",
"public Model getCurrentModel() {\n return currentModel;\n }",
"public IRState getStateObject()\n throws OculusException;",
"public static EntityState toModel(EntityStateSoap soapModel) {\n if (soapModel == null) {\n return null;\n }\n\n EntityState model = new EntityStateImpl();\n\n model.setStateId(soapModel.getStateId());\n model.setStateName(soapModel.getStateName());\n model.setCapitalName(soapModel.getCapitalName());\n\n return model;\n }",
"public Boolean getModel () throws CGException {\n return ivModel;\n }",
"public Model getModel () { return _model; }",
"SentenceHMMState getState() {\n\treturn state;\n }",
"public TurtleState getCurrentState() {\n\t\treturn states.peek();\n\t}",
"private State getState()\n {\n return state;\n }",
"public State getState(){return this.state;}",
"public abstract State getSourceState ();",
"public ModelSnapshot getModel() {\n return model;\n }",
"public S getState() {\r\n\t\treturn state;\r\n\t}",
"ControllerState getNewObjectState();",
"public TState getState() {\n return state;\n }",
"private Object getState() {\n\treturn null;\r\n}",
"public State GetState()\n {\n return this.state;\n }",
"public abstract <T extends BaseSlingModel> T getModel();",
"private TopComponentContextSubModel getContextSubModel() {\n if (topComponentContextSubModel == null) {\n topComponentContextSubModel = new TopComponentContextSubModel();\n }\n return topComponentContextSubModel;\n }",
"@Override\n\t\tpublic void open(Configuration config) {\n\t\t\tValueStateDescriptor<CountLangPrediction> descriptor =\n\t\t\t\t\tnew ValueStateDescriptor<>(\n\t\t\t\t\t\t\t// state name\n\t\t\t\t\t\t\t\"countLangRegressionModel\",\n\t\t\t\t\t\t\t// type information of state\n\t\t\t\t\t\t\tTypeInformation.of(CountLangPrediction.class));\n\t\t\tmodelState = getRuntimeContext().getState(descriptor);\n\t\t}",
"State getTarget();",
"public IServiceModel getActiveModel() {\n return activeModel;\n }",
"public int getCurrentState() {\n return myState;\n }",
"int getState();",
"int getState();",
"int getState();",
"int getState();",
"int getState();",
"int getState();",
"public Context() {\n\t\tstates = new ObjectStack<>();\n\t}",
"public GlobalState() {\r\n\t\t//initialize ITANet location vector\r\n\t\tint ITACount = Model.getITACount();\r\n\t\tthis.locVec = new int[ITACount];\r\n\t\tfor (int i = 0; i < ITACount; i++){\r\n\t\t\tthis.locVec[i] = Model.getITAAt(i).getInitLoc();\r\n\t\t}\r\n\r\n\t\t//initialize interruption vector\r\n\t\tint interCount = Model.getInterCount();\r\n\t\tthis.interVec = new boolean[interCount];\r\n\t\tfor(int i = 0; i < interCount; i++){\r\n\t\t\tthis.interVec[i] = false;\r\n\t\t}\r\n\t\t\r\n\t\tthis.cvMap = Model.getCVMap(); //share 'cvMap' with Model\r\n\t\tthis.srArray = Model.getSRArray();\t//share 'srArray' with Model \r\n\t\tthis.stack = new CPUStack();\r\n\t\tthis.switches = new IRQSwitch();\r\n\t}",
"public Logic(Model m){\r\n model = m;\r\n }",
"public State state();",
"public int getState();",
"public int getState();",
"public int getState();",
"public int getState();",
"LabState state();",
"public int getCurrentStateHandler() {\n return _currentStateHandler;\n }",
"java.lang.String getState();",
"public void getState();",
"public S getState() {\n return currentState;\n }",
"public E getCurrentState() {\n return present;\n }",
"IfaceState createState(int nlocal,IfaceSafetyStatus sts);",
"public State getCurrentState() {\n \t\treturn currentState;\n \t}",
"@NotNull\r\n State getState();",
"public AeBpelState getState();",
"@Nullable\n public ModelCheckpoints getState(@NotNull SModel model) {\n if (isCheckpointModel(model)) {\n // FIXME provisional fix.\n // Assume if input comes from a checkpoint, it's the one already loaded, look at\n // transients first, then among persisted. Perhaps, shall extract CP identity from the model and use it to find proper MCp.\n // Alternatively, shall keep model reference of the origin along with CP model, so that can navigate to an appropriate MCp/CpV\n // using model reference as for the general scenario. However, don't want to persist origin model ref in a CP model, and didn't\n // come up with a nice way to satisfy that (filtering model attributes are not to my liking).\n for (ModelCheckpoints mcp : myTransientCheckpoints.values()) {\n CheckpointState cps = mcp.findStateWith(model);\n if (cps != null) {\n return mcp;\n }\n }\n for (CheckpointVault cpv : myPersistedCheckpoints.values()) {\n ModelCheckpoints mcp = cpv.getCheckpointsIfOwns(model);\n if (mcp != null) {\n return mcp;\n }\n }\n return null;\n }\n ModelCheckpoints mcp = getTransientCheckpoints(model.getReference());\n if (mcp != null) {\n return mcp;\n }\n // FIXME once accessed, perhaps ModelCheckpoints instance shall be kept in myTransientCheckpoints or myExposedPersisted?\n return getPersistedCheckpoints(model).getCheckpointsFor((m, cp) -> {\n // XXX for now, expose whole ModelCheckpoints at once, although just specific CheckpointState\n // (accessed later though MC.find) would suffice\n SModel exposed = createBlankCheckpointModel(model.getReference(), null /*FIXME need distinct method to create CP model from existing*/, cp);\n new CloneUtil(m, exposed).cloneModelWithImports();\n assert exposed instanceof ModelWithAttributes;\n assert m instanceof ModelWithAttributes;\n ((ModelWithAttributes) m).forEachAttribute(((ModelWithAttributes) exposed)::setAttribute);\n myModule.addModelToKeep(exposed.getReference(), true);\n CheckpointIdentity persistedCheckpoint = readIdentityAttributes((ModelWithAttributes) m, GENERATION_PLAN, CHECKPOINT);\n CheckpointIdentity prevCheckpoint = readIdentityAttributes((ModelWithAttributes) m, PREV_GENERATION_PLAN, PREV_CHECKPOINT);\n assert cp.equals(persistedCheckpoint) : String.format(\"CP consistency issue: expected to read CP %s, but model comes with CP value %s\", cp, persistedCheckpoint);\n return new CheckpointState(exposed, prevCheckpoint, cp);\n });\n }",
"@Override\n public String getStateToken() {\n return stateToken;\n }",
"public State getState() {\n return state.get();\n }",
"StateMachineFactory getStateMachineFactory();",
"ModelData getModel();",
"protected SearchState getSearchStateFromUserContext() {\n \tSearchState searchState = null;\n \tif (UserContextService.isAvailable()) {\n \t\tsearchState = UserContextService.getSearchState();\n \t}\n \t\n if (searchState == null) {\n searchState = new SearchState();\n }\n if (UserContextService.isAvailable()) {\n UserContextService.setSearchState(searchState);\n }\n\n return searchState;\n\n }",
"protected E getModel ()\n\t{\n\t\treturn model;\n\t}",
"public Behavior getModel(){\n\t\treturn (this.model);\n\t}",
"public interface Context {\n\n Library getLibrary();\n\n void saveLibrary() throws ModelException;\n\n void saveLibrary(Path path) throws ModelException;\n\n String getVersion();\n\n Path getLibraryPath();\n\n}",
"<C, S> StateExp<C, S> createStateExp();",
"public IRStateMachine getStateMachine()\n\t\tthrows OculusException;",
"protected EnumValue getState(Object name, Kernel kernel)\n {\n KernelController controller = kernel.getController();\n ControllerContext context = controller.getContext(name, null);\n if (context == null)\n throw new IllegalStateException(\"Context not installed: \" + name);\n\n ControllerState state = context.getState();\n return new EnumValueSupport(ControllerStateMetaType.TYPE, state.getStateString());\n }",
"public State getCurrentState() {\n return currentState;\n }",
"@Override\n public void startup(Model model) {\n model.updateModelRep(stateID);\n }",
"public State getCurrentState() {\n\t\treturn currentState;\n\t}",
"public State getCurrentState() {\n\t\treturn currentState;\n\t}",
"public STATE getState() {\n\t\n\t\treturn state;\n\t}",
"public StateID GetTarget()\n {\n return targetID;\n }",
"public int getState() {return state;}",
"public int getState() {return state;}",
"String getCurrentState() {\n return context.getString(allStates[currentIdx]);\n }",
"public JelLibrarySupport(TableModel model) {\n this.model = model;\n try {\n lib.markStateDependent(\"random\", null);\n lib.markStateDependent(\"random\", new Class[]{double.class, double.class});\n lib.markStateDependent(\"ramp\", new Class[]{double.class, double.class});\n lib.markStateDependent(\"reset_ramp\", null);\n } catch (CompilationException ex) {\n ex.printStackTrace();\n }\n }",
"public TransactionState state();",
"public SimModel getSimModel() {\n return simModel;\n }"
] |
[
"0.6639926",
"0.6549087",
"0.61613023",
"0.5972188",
"0.5941198",
"0.59195954",
"0.5911545",
"0.5891988",
"0.5890759",
"0.5825639",
"0.58142245",
"0.577362",
"0.577362",
"0.577362",
"0.577362",
"0.57558066",
"0.5746234",
"0.56740826",
"0.56526005",
"0.5600403",
"0.55886626",
"0.5581569",
"0.5550372",
"0.5539958",
"0.55353594",
"0.55353594",
"0.55269784",
"0.55013233",
"0.549761",
"0.5492671",
"0.5477198",
"0.5452386",
"0.5439925",
"0.54385203",
"0.54055035",
"0.5391661",
"0.5384077",
"0.5379529",
"0.53701824",
"0.5363904",
"0.53582114",
"0.5354029",
"0.5353719",
"0.5341673",
"0.5338962",
"0.5337232",
"0.532514",
"0.53207153",
"0.5320562",
"0.5320497",
"0.532014",
"0.5312312",
"0.5304107",
"0.5304107",
"0.5304107",
"0.5304107",
"0.5304107",
"0.5304107",
"0.52823246",
"0.5281975",
"0.52715176",
"0.526345",
"0.52633595",
"0.52633595",
"0.52633595",
"0.52633595",
"0.5261899",
"0.5261503",
"0.52595896",
"0.52561456",
"0.52553815",
"0.523474",
"0.5232275",
"0.52155596",
"0.521388",
"0.5208139",
"0.51983166",
"0.51967365",
"0.5188682",
"0.5184642",
"0.5175651",
"0.51721895",
"0.5162555",
"0.51613146",
"0.51587725",
"0.5154991",
"0.51517445",
"0.5142922",
"0.51411587",
"0.5135821",
"0.5127863",
"0.5127863",
"0.5122743",
"0.5116627",
"0.5111609",
"0.5111609",
"0.51094115",
"0.5098461",
"0.50625384",
"0.5061059"
] |
0.6442887
|
2
|
Create a context to associate with the passed in model and add it to the global map.
|
public OpenSimContext createContext(Model aModel, boolean force) {
OpenSimContext context = mapModelsToContexts.get(aModel);
if (context ==null || force){
OpenSimContext newContext;
try {
newContext = new OpenSimContext(aModel.initSystem(), aModel);
} catch (IOException ex) {
ErrorDialog.displayExceptionDialog(ex);
return null;
}
mapModelsToContexts.put(aModel, newContext);
context = newContext;
}
return context;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static void addUserContext(Map<String, Object> model) {\r\n\t\tUser user = new User();\r\n\t\tuser.setUsername(SecurityContextHolder.getContext().getAuthentication().getName());\r\n\t\tmodel.put(\"user\", user);\r\n\t}",
"@Override\n\tpublic Context prepareModel(XDust dust, RenderChain chain, Context context,\n\t\t\tObject model) {\n\t\treturn new Context(context, context, this.getParameters());\n\t}",
"public OpenSimContext getContext(Model model) {\n OpenSimContext dContext = mapModelsToContexts.get(model);\n if(dContext==null)\n return createContext(model, false);\n return (dContext);\n }",
"void addParametersToModel( Map<String, String> model, Integer nIdUser );",
"protected static ToolContext createVelocityContext(VelocityEngine velocityEngine, Map model) throws Exception {\n\r\n ToolContext velocityContext = new ToolContext(velocityEngine);\r\n\r\n velocityContext.putAll(model);\r\n\r\n // Load a Configuration and publish toolboxes to the context when\r\n // necessary\r\n\r\n if (toolboxConfigResource != null) {\r\n\r\n XmlFactoryConfiguration cfg = new XmlFactoryConfiguration();\r\n\r\n URL cfgUrl;\r\n cfgUrl = toolboxConfigResource.getURL();\r\n cfg.read(cfgUrl);\r\n\r\n ToolboxFactory factory = cfg.createFactory();\r\n\r\n velocityContext.addToolbox(factory.createToolbox(Scope.APPLICATION));\r\n\r\n velocityContext.addToolbox(factory.createToolbox(Scope.REQUEST));\r\n\r\n velocityContext.addToolbox(factory.createToolbox(Scope.SESSION));\r\n\r\n }\r\n\r\n return velocityContext;\r\n }",
"@Override\n protected Context createVelocityContext(Map<String, Object> model, HttpServletRequest request,\n HttpServletResponse response) throws Exception {\n ViewToolContext ctx;\n\n ctx = new ViewToolContext(getVelocityEngine(), request, response, getServletContext());\n ctx.putAll(model);\n\n if (this.getToolboxConfigLocation() != null) {\n ToolManager tm = new ToolManager();\n tm.setVelocityEngine(getVelocityEngine());\n tm.configure(getServletContext().getRealPath(getToolboxConfigLocation()));\n if (tm.getToolboxFactory().hasTools(Scope.REQUEST)) {\n ctx.addToolbox(tm.getToolboxFactory().createToolbox(Scope.REQUEST));\n }\n if (tm.getToolboxFactory().hasTools(Scope.APPLICATION)) {\n ctx.addToolbox(tm.getToolboxFactory().createToolbox(Scope.APPLICATION));\n }\n if (tm.getToolboxFactory().hasTools(Scope.SESSION)) {\n ctx.addToolbox(tm.getToolboxFactory().createToolbox(Scope.SESSION));\n }\n }\n return ctx;\n }",
"protected void augmentModel(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\t\n\t}",
"public abstract void makeContext();",
"public static void registerInContext(Context ctx) {\n DictProto.registerInContext(ctx);\n ctx.registerProto(OBJECT_ID, DictProto.OBJECT_ID);\n }",
"void setContext(Map<String, Object> context);",
"private void createSharedSingletons(Context applicationContext) {\n\t\t// Create Active User\n\t\tActiveUserModel.createInstance(applicationContext);\n\n\t\t// Create Favorites List\n\t\tFavoriteTopicModelList.createInstance(applicationContext);\n\t\tFavoriteCommentModelList.createInstance(applicationContext);\n\n\t\t// Create Read Later list\n\t\tReadLaterTopicModelList.createInstance(applicationContext);\n\t\tReadLaterCommentModelList.createInstance(applicationContext);\n\n\t\t// Create Location Provider\n\t\tLocationProvider.getInstance(applicationContext);\n\t}",
"private void exposePluginRequestContext(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) {\n\n OpenAksessPlugin plugin = (OpenAksessPlugin) request.getAttribute(PluginDelegatingHandlerMapping.DELEGATED_PLUGIN_ATTR);\n\n if(plugin!= null) {\n model.put(PluginRequestContext.PLUGIN_REQUEST_CONTEXT_ATTRIBUTE, new DefaultPluginRequestContext(plugin, request, response, getServletContext(), model));\n }\n }",
"RegistrationContextImpl(RegistrationContext ctx) {\n this.messageLayer = ctx.getMessageLayer();\n this.appContext = ctx.getAppContext();\n this.description = ctx.getDescription();\n this.isPersistent = ctx.isPersistent();\n }",
"private TopComponentContextSubModel getContextSubModel() {\n if (topComponentContextSubModel == null) {\n topComponentContextSubModel = new TopComponentContextSubModel();\n }\n return topComponentContextSubModel;\n }",
"Context createContext();",
"Context createContext();",
"public void addModel(Model aModel, OpenSimContext context) throws IOException {\n OpenSimContext dContext = context==null?new OpenSimContext(aModel.initSystem(), aModel):context;\n models.add(aModel);\n mapModelsToContexts.put(aModel, dContext);\n SingleModelGuiElements newModelGuiElements = new SingleModelGuiElements(aModel);\n mapModelsToGuiElements.put(aModel, newModelGuiElements);\n setChanged();\n ModelEvent evnt = new ModelEvent(aModel, ModelEvent.Operation.Open);\n notifyObservers(evnt); \n setCurrentModel(aModel, false);\n //ExplorerTopComponent.addFinalEdit();\n }",
"public static void registerInContext(Context ctx) {\n Base.registerInContext(ctx);\n ctx.registerProto(OBJECT_ID, Base.OBJECT_ID);\n DictProto proto = new DictProto();\n ctx.registerObject(proto);\n // NOTE: toDict() method added to Base here, not in Base itself, to avoid circular dependency\n Base base = ObjUtils.ensureType(Base.class, ctx.getObjectProto(proto));\n base.setSlot(ctx, Str.SYM_toDict, nativeToDict);\n }",
"public DictationModel setContext(Context context) {\n this.context = context;\n return this;\n }",
"void add(T context);",
"public Contexte() {\n FactoryRegistry registry = FactoryRegistry.getRegistry();\n registry.register(\"module\", new ModuleFactory());\n registry.register(\"if\", new ConditionFactory());\n registry.register(\"template\", new TemplateFactory());\n registry.register(\"dump\", new DumpFactory());\n }",
"private void addDeveloperMap(ModelMap model) {\n List<User> developers = userDao.findDevelopers();\n//\t\tfor (User developer : developers) {\n model.addAttribute(\"developersList\", developers);\n//\t\t\tdeveloperMap.put(developer.getUserId(), developer.getUserName());\n//\t\t}\n//\n//\t\tmodel.addAttribute(\"developerMap\", developerMap);\n }",
"public OntologyMapper(Model model) {\n\tthis.model = model;\n }",
"protected ObjectModel createObjectModel(String uid, String xml) {\r\n throw new IllegalStateException(\"You must register the same object model on all sites.\");\r\n }",
"public Object createContext(ApplicationRequest request,\n ApplicationResponse response);",
"public MappedModelEVO create(MappedModelEVO evo) throws Exception {\n\t MappedModelPK local = this.server.ejbCreate(evo);\r\n MappedModelEVO newevo = this.server.getDetails(\"<UseLoadedEVOs>\");\r\n MappedModelPK pk = newevo.getPK();\r\n this.mLocals.put(pk, local);\r\n return newevo;\r\n }",
"private static Context prepareContext() {\r\n\r\n Context context = new Context();\r\n\r\n ContextProperties properties = new ContextProperties();\r\n\r\n // Context requires a name\r\n properties.setName(\"Example_Package_Context\");\r\n\r\n // description is nice\r\n properties.setDescription(\"Example package Context.\");\r\n\r\n // define the type\r\n properties.setType(\"ExampleType\");\r\n\r\n /*\r\n * Organizational Unit(s) is/are required\r\n */\r\n OrganizationalUnitRefs ous = new OrganizationalUnitRefs();\r\n\r\n // add the Organizational Unit with objid escidoc:ex3 (the ou of the\r\n // example eSciDoc representation package) to the list of\r\n // organizational Units\r\n ous.add(new OrganizationalUnitRef(\"escidoc:ex3\"));\r\n properties.setOrganizationalUnitRefs(ous);\r\n\r\n context.setProperties(properties);\r\n\r\n return context;\r\n }",
"public void init(MailetContext context);",
"Map<String, Object> getContext();",
"private MainModel() {\n jsonManager = new JsonManager(this);\n }",
"public SavedState(SavedStateMap savedStateMap, Object model) {\n this.savedStateMap = savedStateMap;\n this.displayName = savedStateMap.displayName;\n this.model = model;\n modelName = model.getClass().getName();\n\n createBean();\n BeanInfo bi = new SimpleBeanInfo();\n PropertyDescriptor[] pd;\n try {\n bi = Introspector.getBeanInfo(stateBean.getClass());\n pd = bi.getPropertyDescriptors();\n } catch (IntrospectionException ex) {\n Logger.getLogger(SavedState.class.getName()).log(Level.SEVERE, null, ex);\n ex.printStackTrace();\n }\n if (stateBean != null) {\n this.makeSynchronizers();\n }\n\n }",
"public void init(BackingMapManagerContext context);",
"public void setContextObject(Object co) {\n context = co;\n }",
"public void addToModel(Object object, StsModel model)\n\t{\n\t}",
"@Override\r\n\t\t\tprotected void saveContext() {\n\t\t\t\t\r\n\t\t\t}",
"public void initialize(Model model){\r\n\t\tArrayList<String> elements = new ArrayList<String>();\r\n\t\tfor(int i = 0; i < model.getElements().size(); i++){\r\n\t\t\telements.add(model.getElements().get(i).getId());\r\n\t\t}\r\n\t\t\r\n\t\tFeature base = new Feature(\"base\", \"mandatory\", \"root\", elements);\r\n\t\tthis.mandatoryFeatures.add(base);\r\n\t\tFeatureGroup variants = new FeatureGroup(\"variants\", \"alternative\", \"root\");\r\n\t\tthis.alternativeFeatureGroup.add(variants);\r\n\t\t\r\n\t\t//New 02/12/201/\r\n\t\tFeature newVariant = new Feature(model.getId()+\"_Variant\", \"variant\", this.alternativeFeatureGroup.get(0).getId());\r\n\t\tthis.addVariant(newVariant);\r\n\t\t//-New 02/12/201/\r\n\t}",
"public Context(Global global)\n {\n _level=0;\n _listId=0;\n _global=global;\n _textStyle=new TextStyle();\n setParagraphStyle(new ParagraphStyle());\n }",
"public FREContext createContext(String extId) {\n\t\tDLog(\"ANEAnalyticsExtension createContext extId: \" + extId);\n\t\t\n\t\tsContext = new ANEMyGamezExtensionContext();\n\t\treturn sContext;\n\t}",
"public BackingMapManagerContext getContext();",
"public Context(Model<Label> model, List<Prediction<Label>> predictions) {\n super(model, predictions);\n this.cm = new LabelConfusionMatrix(model.getOutputIDInfo(), predictions);\n }",
"public void makeContextCurrent(){\n glfwMakeContextCurrent(handle);\n }",
"private void mapContext(ManagedPlugin managedPlugin) {\n RequestMappingHandlerMapping mapper = new RequestMappingHandlerMapping();\n mapper.setApplicationContext(managedPlugin.getPluginContext());\n mapper.afterPropertiesSet();\n this.handlerMappings.add(mapper);\n this.pluginMappings.put(managedPlugin.getPlugin().getDescriptor().getId(), mapper);\n }",
"protected abstract ApplicationContext createApplicationContextImpl(\n MarinerRequestContext requestContext);",
"public ContextDaoImpl(Context context) {\n Database.setCandidateSet(context.getCandidateSet());\n Database.setVoterSet(context.getVoterSet());\n Database.setLogins(context.getLogins());\n Database.setCommissionerSet(context.getCommissionerSet());\n }",
"public CompositeContext createContext(ColorModel paramColorModel1, ColorModel paramColorModel2, RenderingHints paramRenderingHints) {\n/* 70 */ return new SunCompositeContext(this, paramColorModel1, paramColorModel2);\n/* */ }",
"private void init()\n\t{\n\t\tsetModel(new Model(Id.model, this, null));\n\t\tsetEnviroment(new Enviroment(Id.enviroment, this, model()));\n\t\tsetVaccinationCenter(new VaccinationCenter(Id.vaccinationCenter, this, model()));\n\t\tsetCanteen(new Canteen(Id.canteen, this, vaccinationCenter()));\n\t\tsetRegistration(new Registration(Id.registration, this, vaccinationCenter()));\n\t\tsetExamination(new Examination(Id.examination, this, vaccinationCenter()));\n\t\tsetVaccination(new Vaccination(Id.vaccination, this, vaccinationCenter()));\n\t\tsetWaitingRoom(new WaitingRoom(Id.waitingRoom, this, vaccinationCenter()));\n\t\tsetSyringes(new Syringes(Id.syringes, this, vaccination()));\n\t}",
"void saveContext();",
"public void addModelContentValues(T model, ContentValues values);",
"private static void setupServerContext(){\n\n serverContext.set(new ServerContext());\n serverContext.get().bgThreadIds = new int[GlobalContext.getNumTotalBgThreads()];\n serverContext.get().numShutdownBgs = 0;\n serverContext.get().serverObj = new Server();\n\n }",
"@RequestMapping(value = \"/create\", method = RequestMethod.GET)\n public final String create(final ModelMap model) {\n model.addAttribute(REGISTER, new Register());\n return \"create\";\n }",
"public TModelDetail register(TModel tModel) {\n\t\treturn register(tModel, this.getUDDINode().getApiNode());\n\t}",
"public void addModel(SimpleModel model) {\n Preconditions.checkState(!registered);\n Preconditions.checkNotNull(model.getFullName());\n Preconditions.checkArgument(!models.containsKey(Ascii.toLowerCase(model.getFullName())));\n Preconditions.checkArgument(!modelsById.containsKey(model.getId()));\n String fullName = model.getFullName();\n models.put(Ascii.toLowerCase(fullName), model);\n modelsById.put(model.getId(), model);\n }",
"private void establishContext() {\n ParcelableNote encoded = getIntent().getParcelableExtra(NOTE_EXTRA);\n mCtx = (encoded == null) ? Context.CREATE : Context.UPDATE;\n\n if (mCtx == Context.UPDATE) {\n mNote = encoded.getNote();\n mTags.addAll(mNote.tags());\n\n EditText title = findViewById(R.id.edit_note_title);\n title.setText(mNote.title());\n EditText body = findViewById(R.id.edit_note_body);\n body.setText(mNote.body());\n }\n }",
"public Context(SequenceModel<Label> model, List<Prediction<Label>> predictions) {\n super(model, predictions);\n this.cm = new LabelConfusionMatrix(model.getOutputIDInfo(), predictions);\n }",
"public PrefabContextHelper(ContextStore contextStore) {\n this.contextStore = contextStore;\n }",
"public FetchingAllDataModel() {\n\n context = AppController.getInstance().getApplicationContext();\n }",
"void add( ModelObject modelObject, Long id );",
"@Override\n\tpublic void enterStart(AplusplusParser.StartContext ctx) {\n\t\tglobalScope = new GlobalScope();\n\t\tcurrentScope = globalScope;\n\t\tsaveScope(ctx, currentScope);\n\t}",
"public Model createByUserModel(int id, Model model) {\n User user = userService.get(id);\n Set<Project> projects = user.getProjects();\n model.addAttribute(\"user\", user);\n model.addAttribute(\"myProjects\", projects);\n return model;\n }",
"private void initContext() {\n contextId = System.getProperty(CONFIG_KEY_CERES_CONTEXT, DEFAULT_CERES_CONTEXT);\n\n // Initialize application specific configuration keys\n homeDirKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_HOME);\n debugKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_DEBUG);\n configFileKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_CONFIG_FILE_NAME);\n modulesDirKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_MODULES);\n libDirsKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_LIB_DIRS);\n mainClassKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_MAIN_CLASS);\n classpathKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_CLASSPATH);\n applicationIdKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_APP);\n logLevelKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_LOG_LEVEL);\n consoleLogKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_CONSOLE_LOG);\n\n // Initialize default file and directory paths\n char sep = File.separatorChar;\n defaultRelConfigFilePath = String.format(\"%s/%s\", DEFAULT_CONFIG_DIR_NAME, configFileKey).replace('/', sep);\n defaultHomeConfigFilePath = String.format(\"${%s}/%s\", homeDirKey, defaultRelConfigFilePath).replace('/', sep);\n defaultHomeModulesDirPath = String.format(\"${%s}/%s\", homeDirKey, DEFAULT_MODULES_DIR_NAME).replace('/', sep);\n defaultHomeLibDirPath = String.format(\"${%s}/%s\", homeDirKey, DEFAULT_LIB_DIR_NAME).replace('/', sep);\n }",
"protected void augmentTemporaryModel(Project tmpModel) {\n }",
"public MyApp() {\n sContext = this;\n }",
"@Override\r\n protected void setupRequestContext(Map<String, Object> mvcModel, HttpServletRequest request) throws Exception\r\n {\r\n // This line of code is a hangover from the old system of re-parsing all of the URL information each time\r\n // a cached PageView is rendered. Currently, all the rendering relies upon the Page object being stored on\r\n // the current RequestContext so in order to ensure that rendering is successful we need to set this value.\r\n // In the future the rendering should not rely so heavily on the contents of the current RequestContext but\r\n // for now it must. However, it is possible that other view resolvers could be provided by applications that\r\n // wish to render a PageView so we must log a warning message if those view resolvers fail to set the PageView\r\n // object up correctly.\r\n if (this.pageId != null)\r\n {\r\n ThreadLocalRequestContext.getRequestContext().setPage(getObjectService().getPage(this.pageId));\r\n }\r\n else\r\n {\r\n logger.error(\"The current PageView does not have its \\\"page\\\" property set. Please ensure that the associated view resolver is calling the setPage() method when building the view!\");\r\n }\r\n }",
"private ISeesContext createSeesContext() throws RodinDBException {\n\t\tfinal IMachineRoot mch = createMachine(\"mch\");\n\t\treturn mch.createChild(ISeesContext.ELEMENT_TYPE, null, null);\n\t}",
"protected void prepareModel() {\n model();\n }",
"@ModelAttribute\n public void addAttributes(ModelMap modelMap) {\n\t\t// 나중에 db config data 읽어서 setting \n\t\tmodelMap.addAttribute(\"cache\", System.currentTimeMillis());\n\t\t\n\t\t// common code \n\t\tmodelMap.addAttribute(\"code\", JsonHelper.toJson(codeDtoMap));\n }",
"public MapView(GameModel model){\n this.model = model;\n this.images = new Images(model);\n this.visualizer = new VisualizerVisitor(this, zoomFactor);\n this.debug = new DebugVisitor(this, zoomFactor);\n this.modelMid = new DoubleVec(model.getFieldSizeX()*0.5,model.getFieldSizeY()*0.5);\n this.refPoint = modelMid;\n this.smallVisualizer = new SmallVisitor(this, 3);\n updateBoxes();\n }",
"public ScriptContext(Context context, Scriptable global)\n\t{\n\t\tthis.context = context;\n\t\tthis.global = global;\n//\t\tSystem.out.println(\"Creating new ScriptContext \" + this);\n\t}",
"public ModelRenderer(ModelSurfaceView modelSurfaceView, Context context) {\n this.main = modelSurfaceView;\n this.context = context;\n }",
"private void populateContext(final HttpServletRequest request,\n final AuthenticationDetailsImpl authenticationDetails) {\n final Context context = ContextStore.get();\n\n final String projectId =\n (String) authenticationDetails.getAttributes().get(this.getProjectIdKey());\n\n Assert.hasLength(projectId, \"projectId must not be empty\");\n\n if (this.logger.isDebugEnabled()) {\n this.logger.debug(\"Using project=[\" + projectId + \"]\");\n }\n\n final Project.Immutable project =\n SecurityControllerTemplate.findProject(context.getConfigManager(), projectId);\n\n Assert.notNull(project, \"project not found\");\n Assert.notNull(project.isOpen(), \"project must be open\");\n\n // set project in the context\n context.setProject(project);\n\n final String sessionId = request.getSession().getId();\n Assert.hasLength(sessionId, \"sessionId must be not empty\");\n\n // set sessionId in the context\n context.getSession().setId(sessionId);\n }",
"public static void initialize(Context ctx) {\n\t\tmContext = ctx;\n\t}",
"public void set_context(VariableSymbolTable context);",
"public void setUserProfile(BaseModel model, HttpServletRequest req) {\r\n\t\tHttpSession session = req.getSession();\r\n\t\tUser user = (User) session.getAttribute(\"User\");\r\n\t\tCompany company = new Company();\r\n\t\tcompany.setCompanyId(user.getCompany().getCompanyId());\r\n\t\tmodel.setCompany(company);\r\n\t\tmodel.setUserId(user.getUserId());\r\n\t\tmodel.setUserIdUpdate(user.getUserId());\r\n\t\t// model.setDateUpdate(dateUpdate);\r\n\t\tif (user.getGroupg() == null) {\r\n\t\t\tGroupg groupg = new Groupg();\r\n\t\t\tgroupg.setGroupId(1l);\r\n\t\t\tmodel.setGroupg(groupg);\r\n\t\t} else {\r\n\t\t\tmodel.setGroupg(user.getGroupg());\r\n\t\t}\r\n\t}",
"Context context();",
"Context context();",
"public void initializeModel(SongModel songmodel)\n {\n this.sm = songmodel;\n }",
"public void setContext(Context context) {\n this.contextMain = context;\n }",
"public void applyModel(ScServletData data, Object model)\n {\n }",
"private void initTreeModel() throws JellyTagException\n {\n if (getTreeModel() == null)\n {\n if (getModel() == null)\n {\n throw new MissingAttributeException(\"model\");\n }\n\n setTreeModel((HierarchicalConfiguration) getBuilderData()\n .getBeanContext().getBean(getModel()));\n }\n }",
"interface ModelToPresenter {\n\n Context getManagedContext();\n }",
"@RequestMapping(value = { \"/new\"}, method = RequestMethod.GET)\n\tpublic String newEntity(ModelMap model) {\n\t\tENTITY entity = createEntity();\n\n\t\tmodel.addAttribute(\"entity\", entity);\n\t\tmodel.addAttribute(\"edit\", false);\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipal());\n\t\treturn viewBaseLocation + \"/form\";\n\t}",
"private void fillContext(final Collection<Renderable> items,\n\t\t\tfinal VelocityContext context, final RunnerContext pContext,\n\t\t\tfinal UTF8ResourceBundle bundle) {\n\n\t\t// Let's declare variables outside of loop\n\t\tRenderable rItem = null;\n\t\tModel model = pContext.getModel();\n\t\tInstance inst = pContext.getInstance();\n\t\tHashMap<String, HashMap<String, Object>> values = new HashMap<String, HashMap<String, Object>>();\n\t\tList<Renderable> fItems = new ArrayList<Renderable>();\n\n\t\t// Let's loop over renderable items.\n\t\t//\n\t\tfor (Iterator<Renderable> i = items.iterator(); i.hasNext();) {\n\n\t\t\trItem = i.next();\n\n\t\t\taddItemToContext(rItem, context, pContext, bundle, values);\n\n\t\t\tfItems.add(rItem);\n\t\t}\n\n\t\t// Add meta data, both model and instance.\n\t\tcontext.put(\"metadata\", model.getMetaData());\n\t\tcontext.put(\"instance_metadata\", inst.getMetaData());\n\t\tcontext.put(\"instance_values\", new NodeValidatorWrapper(model, inst));\n\n\t\t// Add i18n data\n\t\tcontext.put(\"i18n\", bundle);\n\t\tcontext.put(\"locale\", pContext.getLocale());\n\t\tcontext.put(\"items\", fItems);\n\t\tcontext.put(\"context\", values);\n\n\t\tcontext.put(\"hasNext\",\n\t\t\t\tBoolean.valueOf(pContext.getStateManager().hasNext()));\n\t\tcontext.put(\"hasPrevious\",\n\t\t\t\tBoolean.valueOf(pContext.getStateManager().hasPrevious()));\n\n\t\ttry {\n\t\t\tcontext.put(\"stateId\", items.iterator().next().getId());\n\t\t} catch (Exception e) {\n\t\t\t// in case of no items, just ignore this.\n\t\t\tcontext.put(\"stateId\", \"\");\n\t\t}\n\n\t\tif (this.debug) {\n\t\t\tcontext.put(\"debug\", TRUE);\n\t\t} else {\n\t\t\tcontext.put(\"debug\", FALSE);\n\t\t}\n\n\t\tLOGGER.finest(\"Context: \" + pContext);\n\n RenderOptionsImpl localOptions = new RenderOptionsImpl(this.renderOptions);\n \n if (pContext.getProperty(\"renderOptions\") != null) {\n \t// Add specific render options\n \tLOGGER.finest(\"Rendering options: \"\n \t\t\t+ pContext.getProperty(\"renderOptions\"));\n \t\n \ttry {\n \tMap<String, String> contextOptions = (Map<String, String>) pContext.getProperty(\"renderOptions\");\n\n \tfor (String key: contextOptions.keySet()) {\n \t\t\tif (Boolean.valueOf(contextOptions.get(key))) {\n \t\t\t\tlocalOptions.enable(key);\n \t\t\t} else {\n \t\t\t\tlocalOptions.disable(key); \t\t\t\t\n \t\t\t}\n \t\t}\t\n \t} catch (ClassCastException cce) {\n \t\tLOGGER.severe(\"Couldn't cast renderoptions to map\");\n \t}\n }\n\n \tcontext.put(\"renderOptions\", localOptions);\n\n\t\t// Any errors?\n\t\tif (ActionResultImpl.FAIL.equals(pContext.getResult().toString())) {\n\t\t\tcontext.put(\"errors\", TRUE);\n\t\t} else {\n\t\t\tcontext.put(\"errors\", FALSE);\n\t\t}\n\n\t\tLOGGER.fine(\"Progress: \"\n\t\t\t\t+ pContext.getStateManager().getProgressPercentage());\n\n\t\t// add progress\n\t\tcontext.put(\"percentage_done\", Integer.valueOf(pContext\n\t\t\t\t.getStateManager().getProgressPercentage()));\n\n\t\tLOGGER.finest(\"Context filled\");\n\t}",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"public void createModel() {\r\n\t\t\r\n\t\tEObject input;\r\n\t\tURI resourceURI = EditUIUtil.getURI(getEditorInput());\r\n\t\tIEditorInput editorInput = getEditorInput();\r\n\r\n\t\tView v = getAllView(editorInput);\r\n\t\t\r\n\t\tif (editorInput instanceof ValueEditorInputAppFeature) {\r\n\t\t\tValueEditorInputAppFeature featureInput = (ValueEditorInputAppFeature) editorInput;\r\n\t\t\tinput = featureInput.getFeature();\r\n\t\t} else if (editorInput instanceof ValueEditorInputAppGroup){\r\n\t\t\tValueEditorInputAppGroup groupInput = (ValueEditorInputAppGroup) editorInput;\r\n\t\t\tinput = groupInput.getGroup();\r\n\t\t} else {\r\n\t\t\tEAppNamedItem namedInput = (EAppNamedItem) getInputObjectFromWorkspace(((URIEditorInput) editorInput)\r\n\t\t\t\t\t.getURI());\r\n\t\t\tsetPartName(namedInput.getName());\r\n\t\t\tinput = namedInput;\r\n\t\t}\r\n\r\n\t\tAppModel2EditorModelConverter instance = AppModel2EditorModelConverter.getInstance();\r\n\t\teditorModel = instance.createEditorModel(input, v);\r\n\t\t\r\n\t\tResource resource = new XMIResourceImpl(resourceURI);\r\n\t\tresource.getContents().add(editorModel);\r\n\t\teditingDomain.getResourceSet().getResources().add(resource);\r\n\t\t\r\n\t\tSettingEvaluator.initRelevantForWholeModel(v, true);\r\n\t\t\r\n\t\t//S60CTBuilder.setEditor(this);\r\n\t}",
"public abstract Context context();",
"private void setCancerModel(HttpServletRequest request) {\n String modelID = request.getParameter(\"aModelID\");\n System.out.println(\"<setCancerModel> modelID\" + modelID);\n AnimalModelManager animalModelManager = (AnimalModelManager) getBean(\"animalModelManager\");\n AnimalModel am = null;\n try {\n am = animalModelManager.get(modelID);\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n request.getSession().setAttribute(Constants.ANIMALMODEL, am);\n }",
"DatabaseController(Context context){\n helper=new MyHelper(context);\n }",
"public void _setModel(T model) {\n _model = model;\n }",
"void setModel(Model model);",
"public Class<? extends BaseContextModel> getContextModelClass() {\n\t\tif(map != null && !map.isEmpty() ){\n\t\t\treturn map.get(\"ContextModel\");\n\t\t}else {\n\t\t\ttry {\n\t\t\t\treturn Class.forName(simulationConfig\n\t\t\t\t\t\t.getString(\"models.contextmodel\"), true, classLoader).asSubclass(BaseContextModel.class);\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t}",
"public Handler<RoutingContext> findOrCreateByApp() {\n\t\treturn new Handler<RoutingContext>() {\n\t\t\t@Override\n\t\t\tpublic void handle(RoutingContext event) {\n\t\t\t\tfindOrCreateByApp(event);\n\t\t\t}\n\t\t};\n\t}",
"public Builder setContext(final Map<String, String> value) {\n _context = value;\n return this;\n }",
"public Location(Context context){\n//\t\tthis.context = context;\n\t\tinit(context);\n\t}",
"private void fillActivity(Model model, Long id) {\n\t\tList<ActivityPoint> activityPoints = activityService.fetchActivityPoints(id);\n\t\tActivity activity = activityService.fetchActivity(id);\n\t\tmodel.addAttribute(\"activityPoints\", activityPoints);\n\t\tmodel.addAttribute(\"activity\", activity);\n\t}"
] |
[
"0.6545432",
"0.61671996",
"0.57962704",
"0.57759315",
"0.57551354",
"0.57406956",
"0.56981134",
"0.56253606",
"0.5583051",
"0.55555177",
"0.54358566",
"0.5382079",
"0.5355325",
"0.528656",
"0.52814174",
"0.52814174",
"0.5267671",
"0.526548",
"0.5246297",
"0.5210854",
"0.51874435",
"0.5173273",
"0.5152147",
"0.51233804",
"0.50916415",
"0.5067737",
"0.5053689",
"0.5051693",
"0.50151324",
"0.5013502",
"0.4995822",
"0.49762478",
"0.49725193",
"0.49671587",
"0.49659306",
"0.4942283",
"0.48875248",
"0.48838937",
"0.4877109",
"0.48770234",
"0.48751464",
"0.48693544",
"0.48404384",
"0.48304638",
"0.48235634",
"0.48172176",
"0.4816216",
"0.48115346",
"0.4810259",
"0.48076856",
"0.48021367",
"0.47946924",
"0.4788435",
"0.47601148",
"0.47555324",
"0.47415134",
"0.47393122",
"0.4735733",
"0.4732438",
"0.47235763",
"0.4723398",
"0.4720385",
"0.47181302",
"0.47177383",
"0.47163334",
"0.4712127",
"0.470316",
"0.46974888",
"0.4686848",
"0.46865952",
"0.46853107",
"0.46850744",
"0.4684813",
"0.46786526",
"0.46786526",
"0.46775705",
"0.4674431",
"0.46727908",
"0.46716386",
"0.46701917",
"0.46658435",
"0.46526507",
"0.46517974",
"0.46517974",
"0.46517974",
"0.46517974",
"0.46517974",
"0.46517974",
"0.46517974",
"0.46505517",
"0.46405983",
"0.46338552",
"0.46278405",
"0.46269733",
"0.46213257",
"0.46209827",
"0.46192777",
"0.46146575",
"0.46136126",
"0.46135336"
] |
0.6443045
|
1
|
Get gui elements for passed in model
|
public SingleModelGuiElements getModelGuiElements(Model aModel) {
return mapModelsToGuiElements.get(aModel);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Object getModel();",
"public Object getGuiObject();",
"protected JPanel getModelPane() {\n JPanel result = new JPanel(new BorderLayout());\n ButtonGroup radios = new ButtonGroup();\n JPanel radioPanel = new JPanel();\n radioPanel.setLayout(new BoxLayout(radioPanel, BoxLayout.Y_AXIS));\n radioPanel.setBorder(BorderFactory.createTitledBorder(\n \"select model & object information source\"));\n\n expModelReflect = new JRadioButton(\"ReflectionFacade\");\n radios.add(expModelReflect);\n expModelReflect.setSelected(true);\n JTextArea explReflect = new JTextArea(\n \" contains the \\\"Person-Company\\\" model\\n\" + \n \" out of the OCL-Sepcification via reflection\\n\" + \n \" (Source and Binarys have to be in the same folder)\");\n explReflect.setEditable(false);\n explReflect.setOpaque(false);\n explReflect.setAlignmentX(0);\n\n expModelDummy = new JRadioButton(\"DummyFacade\");\n radios.add(expModelDummy);\n String expl = \" contains a simple model with classes A and B\\n\" + \n \" explained in the source of: \\n\" + \n \" tudresden.ocl.interp.test.ABDummyFacade\\n\" + \n \" Does not work with usage of oclType\";\n JTextArea explDummy = new JTextArea(expl);\n explDummy.setEditable(false);\n explDummy.setOpaque(false);\n explDummy.setAlignmentX(0);\n\n\tRadioListener rl = new RadioListener();\n\texpModelReflect.addActionListener(rl);\n\texpModelDummy.addActionListener(rl);\n\n radioPanel.add(expModelReflect);\n radioPanel.add(explReflect);\n radioPanel.add(expModelDummy);\n radioPanel.add(explDummy);\n\n \tclassPicture = new JLabel(getImage(\"interp/core/intern/company_class.gif\"));\n \tobjectPicture = new JLabel(getImage(\"interp/core/intern/company_object.gif\"));\n\t\n JPanel rightSide = new JPanel(new GridLayout(0, 1));\n rightSide.add(classPicture);\n rightSide.add(objectPicture);\n rightSide.setBorder(BorderFactory.createTitledBorder(\n \"The class and object information in UML\"));\n\t\n\trightSide.setPreferredSize(new Dimension(400,300));\n\t\n result.add(radioPanel,BorderLayout.WEST);\n result.add(rightSide);\n \n return panelAround(result);\n }",
"GuiView getGui();",
"Model getModel();",
"Model getModel();",
"Model getModel();",
"public String getModel();",
"LabInner innerModel();",
"DefaultListModel<E> getListModel();",
"public WidgetModel getModel() {\n return model;\n }",
"Collection<EObject> getModelElements();",
"M getModel();",
"Gui getGui();",
"ViewElement getViewElement();",
"public FrameUIModel getFrameUI()\n {\n return uiModel.getFrameUI();\n }",
"java.lang.String getModel();",
"public FormElementModel getFormElementModel();",
"public Scene getUI(UIController uicontroller);",
"public abstract List<GuiButton> getButtonList();",
"public GUIQueueElement getGuiElements(){\n\t\t//retrieve the needed sets\n\t\tSet<Drone> drones = this.getDroneSet();\n//\t\tSet<Block> blocks = this.getBlockSet(); //no blocks in the world\n\t\tSet<WorldAirport> airports = this.getAirportSet();\n\t\tSet<WorldDelivery> deliveries = this.getPackageService().getSubmittedWorldDeliveries();\n\n\t\t//generate the necessary data\n\t\tMap<String, DroneGuiState> droneGuiQueueElem = getDroneGuiStates(drones);\n\t\tSet<CubeGuiState> cubeGuiQueueElem = new HashSet<>(); //there are no blocks anymore\n\t\tSet<AirportGuiState> airportGuiQueueElem = getAirportGuiStates(airports);\n\t\tSet<DeliveryGuiState> deliveryGuiQueueElem = getDeliveryGuiStates(deliveries);\n\n\t\t//create a new entry for the queue\n\t\treturn new GUIQueueElement() {\n\t\t\t@Override\n\t\t\tpublic Map<String, DroneGuiState> getDroneStates() {\n\t\t\t\treturn droneGuiQueueElem;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Set<CubeGuiState> getCubePositions() {\n\t\t\t\treturn cubeGuiQueueElem;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Set<AirportGuiState> getAirports() {\n\t\t\t\treturn airportGuiQueueElem;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Set<DeliveryGuiState> getDeliveries(){\n\t\t\t\treturn deliveryGuiQueueElem;\n\t\t\t}\n\t\t};\n\n\t}",
"public Element loadModel(String name){\n\t\tElement load = FactoryManager.getFactoryManager().getScriptManager()\r\n\t\t\t.getReadScript().getRootElement(allModels);\r\n\t\t\r\n\t\t//get the model wanted\r\n\t\tload = load.getChild(name);\r\n\t\t\r\n\t\t//return the element wanted\r\n\t\treturn load;\t\t\r\n\t}",
"protected E getModel ()\n\t{\n\t\treturn model;\n\t}",
"interface PresenterToModel extends Model<ModelToPresenter> {\n\n\n\n\n String getNameLabel();\n\n\n String getPhotoLabel();\n\n\n String getLabelRadio0();\n\n\n String getLabelRadio1();\n\n\n String getLabelRadio2();\n\n\n String getLabelRadio3();\n\n\n String getButtonAddlabel();\n\n\n String getToastNotifyingAdded();\n\n\n void insertEvent(String Categoryname, String image);\n\n String getImageByIdSelected(int id);\n\n\n String getImage(int i);\n }",
"SourceControlInner innerModel();",
"NCModel getModel();",
"Object getComponent(WebElement element);",
"@Override\n public Object getClientGuiElement(int id, EntityPlayer player, World world,int x, int y, int z) {\n TileEntity tileEntity = world.getBlockTileEntity(x, y, z);\n if(tileEntity instanceof TileEntityBioCarbonizer){\n return new GuiBioCarbonizer(player.inventory, (TileEntityBioCarbonizer) tileEntity);\n }else if(tileEntity instanceof TileEntityBlast){\n \t \treturn new GuiBlast(player.inventory,(TileEntityBlast)tileEntity);\n \t }else if(tileEntity instanceof TileEntityIncinerator){\n \t \treturn new GuiIncinerator(player.inventory,(TileEntityIncinerator)tileEntity);\n \t }\n return null;\n\n }",
"public Behavior getModel(){\n\t\treturn (this.model);\n\t}",
"public ContainmentModel getModel()\n {\n return m_model;\n }",
"Object getComboViewerInput(T elem, EStructuralFeature feature);",
"public View getGuiView(){\n \t\n \treturn guiView;\n }",
"public Model getModel(){\r\n return model;\r\n }",
"A getModel();",
"static interface ElementSelectionListener {\n \n public void selectionChanged(MultiViewDescription oldOne, MultiViewDescription newOne);\n \n public void selectionActivatedByButton(MouseEvent e);\n \n public void selectionActivatedByButton(ActionEvent e);\n \n }",
"public List controls(){\n return controls;\n }",
"public void buildModel() {\r\n\t\tmRecursiveBoard = new RecursiveGameModelDecorator[boardSize][boardSize];\r\n\t\tmPanes = new JPanel[boardSize][boardSize];\r\n\t\t// Recursive game is composed of other games, create the actual model now\r\n\t\tfor (int i = 0; i < boardSize; i++) {\r\n\t\t\tfor (int j = 0; j < boardSize; j++) {\r\n\t\t\t\tmRecursiveBoard[i][j] = new RecursiveGameModelDecorator(new GameModel(boardSize*i+j), false);\r\n\t\t\t\tmPanes[i][j] = new JPanel();\r\n\t\t\t\tmPanes[i][j].setPreferredSize(new Dimension(105, 105));\r\n\t\t\t\tmPanes[i][j].setBorder(new LineBorder(boardSize*i+j == mTargetSubjectId ? Color.CYAN : Color.BLACK, 2));\r\n\t\t\t\tObject list = mRecursiveBoard[i][j].getBoard();\r\n\t\t if (list != null && list.getClass().isAssignableFrom(ArrayList.class)) {\r\n\t\t \tList cells = (List)list;\r\n\t\t \tfor (Object cell : cells) {\r\n\t\t \t\tif (OXOCell.class.isInstance(cell)) {\r\n\t\t \t\t\tmPanes[i][j].add(((OXOCell)cell).getUiCell());\r\n\t\t \t\t\t// This is very IMPORTANT - the play() events MUST be handled by single model, \r\n\t\t \t\t\t// and re-distributed to child models according the Recursive OXO logic.\r\n\t\t \t\t\t// Thus I have to override the default model in Cell with the common model, that is as parameter\r\n\t\t \t\t\t((OXOCell)cell).setModel(this); \r\n\t\t \t\t\t((OXOCell)cell).setSubjectId(boardSize*i+j);\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t\t }\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"Set<EObject> getAllModelElements();",
"public final native MVCArray<Element> getControls() /*-{\n return this.controls;\n }-*/;",
"TypedModel getModel();",
"public String getModel() {\n return this.model;\r\n }",
"public Model getModel () { return _model; }",
"@Override\n public void actionPerformed(ActionEvent e) {\n AbstractButton selectedButton = null;\n for (Enumeration<AbstractButton> buttons = buttonGroup.getElements(); buttons.hasMoreElements(); ) {\n AbstractButton button = buttons.nextElement();\n if (button.isSelected()) {\n selectedButton = button;\n }\n }\n\n //Model um das hinzufügen von Zeilen zu ermöglichen\n DefaultListModel<String> list = ((DefaultListModel<String>) listResults.getModel());\n //Jedes mal zuerst die Liste Leeren\n list.clear();\n if (selectedButton == radioButtonAllStyles) {\n /*\n * Erzeugt Guiausgabe der Bierarten.\n * Die id wird mit \"::\" vor dem Bierart Namen ausgeben.\n * */\n beerService.getBeerStyles()\n .forEach((k, v) -> list.addElement(k + \"::\" + v));\n } else if (selectedButton == radioButtonStyle) {\n /*\n * Erzeugt Guiausgabe der Bierarten, welche die Zeichenfolge ″search″ im Namen enthalten.\n * Die id wird mit \"::\" vor dem Bierart Namen ausgeben.\n *\n * @param searchString Zeichenfolge die enthalten sein soll\n * */\n beerService.getBeerStylesBySearchStr(textFieldArgs.getText())\n .forEach((k, v) -> list.addElement(k + \"::\" + v));\n } else if (selectedButton == radioButtonAllBeers) {\n /*\n * Gibt zeilenweise ID und Name mit \"::\" getrennt der Biere aus.\n * */\n beerService.getBeers()\n .forEach(x -> list.addElement((x.getId() + \"::\" + x.getName())));\n } else if (selectedButton == radioButtonBeerWithId) {\n /*\n * Gibt in einer Zeile ID und Namen und in einer zweiten Zeile die Beschreibung\n * des entsprechenden Bieres aus.\n *\n * @param id id nach der gesucht werden soll\n * */\n Beer beer = beerService.getBeerById(textFieldArgs.getText());\n if (beer != null) {\n list.addElement(beer.getId() + \"::\" + beer.getName());\n }\n }\n }",
"public Vue(Model model)\n {\n initAttributs();\n creerWidget();\n\n setSize(560,500);\n setVisible(true);\n setResizable(false);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n }",
"@Override\n\tpublic ElementView getComponent() {\n\t\treturn jc;\n\t}",
"ModelData getModel();",
"public abstract String getManipulatorButtonLabel();",
"public String getInputName(){\n \treturn model.getName();\n }",
"private static String getModeledElementLabel(ModeledElement element) {\n\t\treturn element.getName();\n\t}",
"@Override\n\tpublic String getModel() {\n\t\treturn model;\n\t}",
"@Override\n public Component getUiComponent() {\n return this;\n }",
"public String getModel() {\r\n return model;\r\n }",
"VirtualMachineExtensionImageInner innerModel();",
"JComponent getImpl();",
"public List<ViewConstrainsEnum> getViewConstrainsUIComponent();",
"Button getBtn();",
"public DefaultMutableTreeNode getModel(){\n return addToModel(parent);\n }",
"public DefaultListModel getListModel() {\n\t\treturn this.listModel;\r\n\t}",
"public WModelObject getElementObject()\n\t{\n\t\tWModelObject elementObject = null;\n\n\t\ttry\n\t\t{\n\t\t\t//Class objClass = Class.forName(m_elementObjectClassName);\n\t\t\t//elementObject = (WModelObject)objClass.newInstance();\n\t\t\t//elementObject.setParent(this);\n\t\t\t//return elementObject;\n\n\t\t\tClass modelObjectClass = Class.forName(m_elementObjectClassName);\n\t\t\tClass[] parameterClass = {Class.forName(\"java.lang.String\"), Class.forName(\"java.lang.String\")};\n\t\t\tConstructor constructor = modelObjectClass.getConstructor(parameterClass);\n\t\t\tObject[] parameterObj = {\"\", getImplTypeName()}; //the first parameter is blank to indicate no driver\n\t\t\t\t\t\t\t\t\t //provided this model object\n\t\t\telementObject = (WModelObject)constructor.newInstance(parameterObj);\n\t\t\telementObject.setParent(this);\n\t\t\treturn elementObject;\n\t\t}\n\t\tcatch (NoSuchMethodException e)\n\t\t{\n\t\t\tcom.ing.connector.Registrar.logError(\"Cannot load element object class for WCollection: \" + m_elementObjectClassName + \" \" + e);\n\t\t\treturn elementObject;\n\t\t}\n\t\tcatch (InvocationTargetException e)\n\t\t{\n\t\t\tcom.ing.connector.Registrar.logError(\"Cannot load element object class for WCollection: \" + m_elementObjectClassName + \" \" + e);\n\t\t\treturn elementObject;\n\t\t}\n\t\tcatch (ClassNotFoundException e)\n\t\t{\n\t\t\tcom.ing.connector.Registrar.logError(\"Cannot load element object class for WCollection: \" + m_elementObjectClassName + \" \" + e);\n\t\t\treturn elementObject;\n\t\t}\n\t\tcatch (InstantiationException e)\n\t\t{\n\t\t\tcom.ing.connector.Registrar.logError(\"Cannot instantiate element object in WCollection: \" + m_elementObjectClassName + \" \" + e);\n\t\t\treturn elementObject;\n\t\t}\n\t\tcatch (IllegalAccessException e)\n\t\t{\n\t\t\tcom.ing.connector.Registrar.logError(\"Illegal access when instantiating element object in WCollection: \" + m_elementObjectClassName + \" \" + e);\n\t\t\treturn elementObject;\n\t\t}\n\t}",
"public abstract M getModel();",
"protected ComponentModel getComponentModel()\n {\n return componentModel;\n }",
"ModelSlot getModelSlot();",
"public void setupGui(){\n \t\n \t w1 = (RadioButton) guiView.findViewById(R.id.w1); \t\t \n \t w2 = (RadioButton) guiView.findViewById(R.id.w2);\n \t w3 = (RadioButton) guiView.findViewById(R.id.w3);\n \t w4 = (RadioButton) guiView.findViewById(R.id.w4);\n \t pb = (Button) guiView.findViewById(R.id.paint_button);\n \t plus = (Button) guiView.findViewById(R.id.plus_button);\n \t minus = (Button) guiView.findViewById(R.id.minus_button);\n \t \n \t \n \t //model select listener\n \t lis =new View.OnClickListener(){\n \t\t \n public void onClick(View v){\n \t RadioButton b = (RadioButton)v;\n \t String tmp=b.getHint().toString();\n \t int i = Integer.parseInt(tmp);\n \t setModel(i); \n }\n };\n w1.setOnClickListener(lis);\n w2.setOnClickListener(lis);\n w3.setOnClickListener(lis);\n w4.setOnClickListener(lis);\n \n w1.setHintTextColor(Color.TRANSPARENT);\n w2.setHintTextColor(Color.TRANSPARENT);\n w3.setHintTextColor(Color.TRANSPARENT);\n w4.setHintTextColor(Color.TRANSPARENT);\n \n w1.setChecked(true);\n \n //paint button listener\n pb.setOnClickListener(new View.OnClickListener(){\n public void onClick(View v){ \t \n \t paintWheel();\t \n }\n }); \n \n //plus button listener\n plus.setOnClickListener(new View.OnClickListener(){\n public void onClick(View v){ \t \n \t scaleUp();\t \n }\n }); \n \n //minus button listener\n minus.setOnClickListener(new View.OnClickListener(){\n public void onClick(View v){ \t \n \t scaleDown();\t \n }\n }); \n }",
"public void setModelView(IModelView mv) {\n checkNull(mv);\n\n state = mv.getFullState();\n buttons = new HashMap<>();\n\n JCheckBox button;\n JPanel buttonContainer = new JPanel();\n //buttonContainer.setLayout(new BoxLayout(buttonContainer, BoxLayout.PAGE_AXIS));\n buttonContainer.setLayout(new GridLayout(0, 4));\n\n for (IAnimatedShape shape : state.values()) {\n button = new JCheckBox(shape.getName());\n button.setActionCommand(shape.getName());\n button.setSelected(true);\n button.addActionListener(buttonListener);\n buttonContainer.add(button);\n\n buttons.put(button.getName(), button);\n }\n\n JScrollPane listScroller;\n listScroller = new JScrollPane(buttonContainer,\n ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,\n ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n listScroller.setPreferredSize(new Dimension(50, 50));\n //listScroller.setAlignmentX(LEFT_ALIGNMENT);\n\n this.add(listScroller);\n this.setPreferredSize(new Dimension(50, 50));\n this.repaint();\n\n }",
"public TrainModelGUI getTrainGUI() {\n \treturn this.trainModelGUI;\n }",
"public GUISimulator getGui(){\n return this.gui;\n }",
"public void elementView() {\n\t\tsetTitle(\"Envío de E-mail\");\n\t\tsetLocation(370, 150);\n\t\tsetBounds(100, 100, 600, 400);\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBackground(UIManager.getColor(\"TextField.selectionBackground\"));\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tsetContentPane(contentPane);\n\t\tcontentPane.setLayout(null);\n\t\tJLabel lblNewLabel = new JLabel(model.getNameTags().get(0));\n\t\tlblNewLabel.setBounds(10, 11, 66, 14);\n\t\tcontentPane.add(lblNewLabel);\n\t\t\n\t\tto = new JTextField();\n\t\tto.setBounds(86, 8, 488, 20);\n\t\tcontentPane.add(to);\n\t\tto.setColumns(10);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(model.getNameTags().get(1));\n\t\tlblNewLabel_1.setBounds(10, 45, 66, 14);\n\t\tcontentPane.add(lblNewLabel_1);\n\t\t\n\t\tsubject = new JTextField();\n\t\tsubject.setBounds(86, 42, 488, 20);\n\t\tcontentPane.add(subject);\n\t\tsubject.setColumns(10);\n\t\t\n\t\tsend = new JButton(model.getNameButtons().get(0));\n\t\tsend.setBounds(10, 327, 89, 23);\n\t\tcontentPane.add(send);\n\t\t\n\t\tcloseProgram = new JButton(model.getNameButtons().get(1));\n\t\tcloseProgram.setBounds(213, 327, 150, 23);\n\t\tcontentPane.add(closeProgram);\n\t\t\n\t\tclearBox = new JButton(model.getNameButtons().get(2));\n\t\tclearBox.setBounds(424, 327, 150, 23);\n\t\tcontentPane.add(clearBox);\n\t\t\n\t\tscrollPane = new JScrollPane();\n\t\tscrollPane.setBounds(10, 100, 564, 203);\n\t\tcontentPane.add(scrollPane);\n\t\t\n\t\tmessage = new JTextArea();\n\t\tscrollPane.setViewportView(message);\n\t}",
"public String getModel()\n {\n return model;\n }",
"public void fillInnerParts() {\n //retrieve the filtered list of module or event.\n listPanel = new ListPanel(logic.getFilteredFocusedList(), this);\n listPanelPlaceholder.getChildren().add(listPanel.getRoot());\n\n resultDisplay = new ResultDisplay();\n resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());\n\n StatusBarFooter statusBarFooter = new StatusBarFooter(logic.getModuloFilePath());\n statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());\n\n rightPanel = new RightPanel(logic.getFocusedDisplayable(), this);\n slideWindowListPlaceholder.getChildren().add(rightPanel.getRoot());\n\n commandBox = new CommandBox(this::executeCommand);\n commandBoxPlaceholder.getChildren().add(commandBox.getRoot());\n\n if (logic.getFilteredFocusedList().size() == 0) {\n moduleButton.getStyleClass().add(\"active\");\n resultDisplay.setFeedbackToUser(\"Use the module command to get started!\");\n } else if (logic.getFilteredFocusedList().get(0) instanceof Event) {\n eventButton.getStyleClass().add(\"active\");\n } else {\n moduleButton.getStyleClass().add(\"active\");\n }\n\n }",
"List<Component> getVisualComponents(CallPeer peer);",
"UmlElement getUmlElement();",
"@Override\r\n\tpublic Model getModel() {\n\t\treturn this.model;\r\n\t}",
"public interface LazElement {\n Element getElement(Element actorTabSliderElement);\n\n String getBeanName(Object data);\n}",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"public ModelElements getModelAccess() {\n\t\treturn pModel;\n\t}",
"@Override\n\tpublic Object getClientGuiElement(int _ID, EntityPlayer _player, World _world, int _x, int _y, int _z) \n\t{\n\t\tswitch(_ID)\n\t\t{\n\t\tcase 0:\n\t\t\treturn new GuiTalentScreen();\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn null;\n\t}",
"public ResultGUI getResultGUI() {\n return resultGUI;\n }",
"public String getModel() {\n return model;\n }",
"public String getModel() {\n return model;\n }",
"GridPanel create(GridDataModel model);",
"public TrainModelGUI CreateNewGUI() {\n //Create a GUI object\n \ttrainModelGUI = new TrainModelGUI(this);\n \tsetValuesForDisplay();\n \treturn trainModelGUI;\n }",
"ViewElement createViewElement();",
"@Override\n\t\tpublic int getModel() {\n\t\t\treturn 0;\n\t\t}",
"public Tuple getModel();",
"public static DefaultListModel<String> getCanvasListModel() {\n return canvasListModel;\n }",
"private void setupGUI(){\r\n\t\t\r\n\t\tfinal GUIFactory guifactory = GUIFactory.instance();\r\n\t\tfinal MTApplication app = (MTApplication)item.getView().getRenderer();\r\n\t\tfinal float leftiness = app.getWidth()*5/6;\r\n\t\tfinal float xPos = leftiness + 5;\r\n\t\t\r\n\t\t\r\n\t\toverlay = new MTOverlayContainer( app);\r\n\t\titem.getView().getRoot().addChild( overlay);\r\n\t\t\r\n\t\t// _THE_ PANEL \r\n\t\t\r\n\t\tpnlPanel = guifactory.createPanel( leftiness, 0, app.getWidth()-leftiness, app.getHeight(),\"pnlPanel\", overlay);\t\t\t\r\n\t\t\r\n\t\t// INTERACTION PANEL\r\n\t\t\r\n\t\tpnlInteraction = guifactory.createPanel(\r\n\t\t\t\tpnlPanel.getPosition( TransformSpace.GLOBAL),\r\n\t\t\t\tpnlPanel.getWidthXY( TransformSpace.GLOBAL),\r\n\t\t\t\tpnlPanel.getHeightXY( TransformSpace.GLOBAL),\r\n\t\t\t\t\"pnlInteraction\",\r\n\t\t\t\tpnlPanel);\r\n\t\tpnlInteraction.setNoFill( true);\r\n\t\t\r\n\t\t// EDIT PANEL\r\n\t\t\r\n\t\tpnlEdit = guifactory.createPanel(\r\n\t\t\t\tpnlPanel.getPosition( TransformSpace.GLOBAL),\r\n\t\t\t\tpnlPanel.getWidthXY( TransformSpace.GLOBAL),\r\n\t\t\t\tpnlPanel.getHeightXY( TransformSpace.GLOBAL),\r\n\t\t\t\t\"pnlEdit\",\r\n\t\t\t\tpnlPanel);\r\n\t\tpnlEdit.setVisible( false);\r\n\t\tpnlEdit.setNoFill( true);\r\n\t\t\r\n\t\t\r\n\t\t// ITEM NAME TEXTAREA\r\n\t\t\r\n\t\tString itemName = item.getName();\r\n\t\tif(itemName == null || itemName.equals( \"\"))\r\n\t\t\titemName = item.getID();\r\n\t\ttxtItemName = guifactory.createTextArea(itemName, \"txtItemName\", pnlPanel);\r\n\t\ttxtItemName.setPositionGlobal(\r\n\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\txPos,\r\n\t\t\t\t\t\tpnlPanel.getPosition( TransformSpace.GLOBAL).getY() + 10\t\r\n\t\t\t\t));\r\n\r\n\r\n\t\t// PANEL PICTURE\r\n\r\n\t\tVector3D pnlInteractionPos = pnlInteraction.getPosition( TransformSpace.GLOBAL);\r\n\t\tpnlPicture = guifactory.createPanel( pnlInteractionPos.getX()+50, pnlInteractionPos.getY()+50, 100, 100, \"pnlPicture\", pnlInteraction);\r\n\t\tpnlPicture.setAnchor( PositionAnchor.CENTER);\r\n\t\tpnlPicture.setPositionGlobal(\r\n\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\tpnlInteractionPos.getX() + pnlInteraction.getWidthXY( TransformSpace.GLOBAL)/2,\r\n\t\t\t\t\t\tpnlInteractionPos.getY() + 50 + pnlPicture.getHeightXY( TransformSpace.GLOBAL)/2\r\n\t\t\t\t));\r\n\t\tpnlPicture.setTexture( GUITextures.instance().getByDevice( DeviceType.getDeviceType( device)));\r\n\t\t\r\n\t\t\r\n\t\t// POWER USAGE TEXTAREA\r\n\t\t\r\n\t\tString powerUsage = \"n/a\";\r\n\t\tif( device.getPowerUsage() != null && device.getPowerUsage().getValue() != null){\r\n\t\t\tpowerUsage = device.getPowerUsage().getValue().toString();\r\n\t\t}\r\n\t\t\r\n\t\ttxtPowerUsage = guifactory.createTextArea( \"Power usage: \" + powerUsage + \" Watts\", \"txtPowerUsage\", pnlInteraction);\r\n\t\ttxtPowerUsage.setPositionGlobal(\r\n\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\txPos,\r\n\t\t\t\t\t\tpnlInteractionPos.getY() + 140\t\t\r\n\t\t\t\t\t\t));\r\n\t\ttxtPowerUsage.setVisible( false);\r\n\t\t\r\n\t\t\r\n\t\t// ON/OFF BUTTON\r\n\t\t\r\n\t\tbtnOnOff = guifactory.createButton( \"Turn device On/Off\", \"btnOnOff\", pnlInteraction);\r\n\t\tbtnOnOff.setPosition( txtPowerUsage.getPosition( TransformSpace.GLOBAL));\r\n\t\tbtnOnOff.addGestureListener( TapProcessor.class, new BtnOnOffListener());\r\n\t\t\r\n\t\t\r\n\t\t// SUBDEVICE BUTTON PANEL\r\n\t\t\r\n\t\tpnlSubDeviceButtons = guifactory.createPanel(\r\n\t\t\t\tpnlPanel.getPosition( TransformSpace.GLOBAL).getX(),\r\n\t\t\t\tbtnOnOff.getVectorNextToComponent( 10, false).getY(),\r\n\t\t\t\tpnlPanel.getWidthXY( TransformSpace.GLOBAL),\r\n\t\t\t\tdevice.getSubDevice().size() * (btnOnOff.getHeight()+10),\r\n\t\t\t\t\"pnlSubDeviceButtons\",\r\n\t\t\t\tpnlInteraction);\r\n\t\t\r\n\t\t// SUB DEVICE BUTTONS\r\n\t\t\r\n\t\tsubDeviceButtons = new LinkedList<MTButton>();\r\n\t\tfor( int i = 0; i < device.getSubDevice().size(); i++){\r\n\t\t\t\r\n\t\t\tPhysicalDevice subDevice = device.getSubDevice().get( i);\r\n\t\t\t\r\n\t\t\t// get button's caption\r\n\t\t\tString caption = subDevice.getName();\r\n\t\t\tif(caption == null || caption.equals( \"\"))\r\n\t\t\t\tcaption = subDevice.getId();\r\n\t\t\t\r\n\t\t\tMTButton btnSubDevice = guifactory.createButton( caption, \"btnSubDevice_\" + subDevice.getId(), pnlSubDeviceButtons);\r\n\t\t\tbtnSubDevice.setPosition(\r\n\t\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\txPos,\t\r\n\t\t\t\t\t\tpnlSubDeviceButtons.getPosition( TransformSpace.GLOBAL).getY() + i*(btnSubDevice.getHeight() + 10)\r\n\t\t\t\t\t));\r\n\t\t\t\r\n\t\t\tsubDeviceButtons.add( btnSubDevice);\r\n\t\t\tbtnSubDevice.addGestureListener( TapProcessor.class, new BtnSubDeviceListener( subDevice));\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// EDIT BUTTON\r\n\t\t\r\n\t\tbtnEdit = guifactory.createButton( \"Edit\", \"btnEdit\", pnlInteraction);\r\n\t\tbtnEdit.setPosition( new Vector3D( xPos, app.getHeight() - 2*btnEdit.getHeight() - 30));\r\n\t\tbtnEdit.addGestureListener( TapProcessor.class, new BtnEditListener());\r\n\t\t\r\n\t\t\r\n\t\t// BUTTON HIDE\r\n\t\t\r\n\t\tbtnHide = guifactory.createButton( \"Hide menu\", \"btnHide\", pnlPanel);\r\n\t\tbtnHide.setPosition( new Vector3D( xPos, app.getHeight() - btnHide.getHeight() - 20));\r\n\t\tbtnHide.addGestureListener( TapProcessor.class, new BtnHideListener());\r\n\t\t\r\n\t\t\r\n\t\t///// EDIT-ELEMENTS /////\r\n\r\n\t\tchkMovePlanar = guifactory.createCheckButton( \"Move planar\", \"chkMovePlanar\", pnlEdit);\r\n\t\tchkMovePlanar.setPosition(\r\n\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\txPos,\r\n\t\t\t\t\t\ttxtItemName.getPosition( TransformSpace.GLOBAL).getY() + txtItemName.getHeightXY( TransformSpace.GLOBAL)+ 20\t\r\n\t\t\t\t));\r\n\t\tchkMovePlanar.addGestureListener( TapProcessor.class, new ChkMovePlanarListener());\r\n\r\n\t\t\r\n\t\tchkMoveY = guifactory.createCheckButton( \"Move up/down\", \"chkMoveY\", pnlEdit);\r\n\t\tchkMoveY.setPosition( chkMovePlanar.getVectorNextToComponent( 10, false));\r\n\t\tchkMoveY.addGestureListener( TapProcessor.class, new ChkMoveYListener());\r\n\r\n\t\t\r\n\t\tchkRotate = guifactory.createCheckButton( \"Rotate\", \"chkRotate\", pnlEdit);\r\n\t\tchkRotate.setPosition( chkMoveY.getVectorNextToComponent( 10, false));\r\n\t\tchkRotate.addGestureListener( TapProcessor.class, new ChkRotateListener());\r\n\r\n\t\t\r\n\t\tchkScale = guifactory.createCheckButton( \"Scale\", \"chkScale\", pnlEdit);\r\n\t\tchkScale.setPosition( chkRotate.getVectorNextToComponent( 10, false));\r\n\t\tchkScale.addGestureListener( TapProcessor.class, new ChkScaleListener());\r\n\r\n\t\t\r\n\t\tbtnChangeVisualisation = guifactory.createButton( \"Change Style\", \"btnChangeVisualisation\", pnlEdit);\r\n\t\tbtnChangeVisualisation.setPosition( chkScale.getVectorNextToComponent( 10, false));\r\n\t\tbtnChangeVisualisation.addGestureListener( TapProcessor.class, new BtnChangeVisualisationListener());\r\n\t\t\r\n\t\t\r\n\t\tbtnSave = guifactory.createButton( \"Save\", \"btnSave\", pnlEdit);\r\n\t\tbtnSave.setPosition( btnEdit.getPosition());\r\n\t\tbtnSave.addGestureListener( TapProcessor.class, new BtnSaveListener());\r\n\t}",
"@NotNull\n public Gui getGui() {\n return gui;\n }",
"public String getModel()\n\t{\n\t\treturn model;\n\t}",
"@Execute\r\n\tpublic void execute(MWindow window) {\n\t\t\r\n\tSystem.out.println(window.getChildren());\r\n//\t\tIContributionItem item = toolBarManager.find(\"hr.ante.isms.toolcontrol.user\");\r\n\t\t\r\n\r\n\t}",
"public Object getModel() {\n\t\treturn bm;\r\n\t}",
"protected void modelChanged() {\n // create a view hierarchy\n ViewFactory f = rootView.getViewFactory();\n Document doc = editor.getDocument();\n Element elem = doc.getDefaultRootElement();\n setView(f.create(elem));\n }",
"private void setupTitanoboaModelXLarge() {\n\t\t/*\n\t\t * This is less nasty than the last version, but I still don't like it. The problem is there's no good way to\n\t\t * dynamically generate the part after R.id. - there's a findViewByName but its efficiency apparently sucks.\n\t\t * Most of the improvement from the last version is from having made the model automatically set up its modules\n\t\t * which in turn set up their vertebrae, and from eliminating the actuator objects.\n\t\t */\n\n\t\ttitanoboaModel = new TitanoboaModel();\n\n\t\tModule module1 = titanoboaModel.getModules().get(0);\n\n\t\tmodule1.setBatteryLevelView((TextView) findViewById(R.id.m1_battery_level));\n\t\tmodule1.setMotorSpeedView((TextView) findViewById(R.id.m1_motor_speed));\n module1.setPressureSensorView((TextView) findViewById(R.id.m1_pressure));\n\n List<List<TextView>> module1VertebraeViews = new ArrayList<List<TextView>>();\n\n List<TextView> module1Vertebra0Views = new ArrayList<TextView>(); \n module1Vertebra0Views.add((TextView) findViewById(R.id.m1_v0_h_setpoint_angle));\n module1Vertebra0Views.add((TextView) findViewById(R.id.m1_v0_h_current_angle));\n module1Vertebra0Views.add((TextView) findViewById(R.id.m1_v0_h_sensor_calibration_high));\n module1Vertebra0Views.add((TextView) findViewById(R.id.m1_v0_h_sensor_calibration_low));\n module1Vertebra0Views.add((TextView) findViewById(R.id.m1_v0_v_setpoint_angle));\n module1Vertebra0Views.add((TextView) findViewById(R.id.m1_v0_v_current_angle));\n module1Vertebra0Views.add((TextView) findViewById(R.id.m1_v0_v_sensor_calibration_high));\n module1Vertebra0Views.add((TextView) findViewById(R.id.m1_v0_v_sensor_calibration_low));\n module1VertebraeViews.add(module1Vertebra0Views);\n\n List<TextView> module1Vertebra1Views = new ArrayList<TextView>();\n module1Vertebra1Views.add((TextView) findViewById(R.id.m1_v1_h_setpoint_angle));\n module1Vertebra1Views.add((TextView) findViewById(R.id.m1_v1_h_current_angle));\n module1Vertebra1Views.add((TextView) findViewById(R.id.m1_v1_h_sensor_calibration_high));\n module1Vertebra1Views.add((TextView) findViewById(R.id.m1_v1_h_sensor_calibration_low));\n module1Vertebra1Views.add((TextView) findViewById(R.id.m1_v1_v_setpoint_angle));\n module1Vertebra1Views.add((TextView) findViewById(R.id.m1_v1_v_current_angle));\n module1Vertebra1Views.add((TextView) findViewById(R.id.m1_v1_v_sensor_calibration_high));\n module1Vertebra1Views.add((TextView) findViewById(R.id.m1_v1_v_sensor_calibration_low));\n module1VertebraeViews.add(module1Vertebra1Views);\n\n List<TextView> module1Vertebra2Views = new ArrayList<TextView>();\n module1Vertebra2Views.add((TextView) findViewById(R.id.m1_v2_h_setpoint_angle));\n module1Vertebra2Views.add((TextView) findViewById(R.id.m1_v2_h_current_angle));\n module1Vertebra2Views.add((TextView) findViewById(R.id.m1_v2_h_sensor_calibration_high));\n module1Vertebra2Views.add((TextView) findViewById(R.id.m1_v2_h_sensor_calibration_low));\n module1Vertebra2Views.add((TextView) findViewById(R.id.m1_v2_v_setpoint_angle));\n module1Vertebra2Views.add((TextView) findViewById(R.id.m1_v2_v_current_angle));\n module1Vertebra2Views.add((TextView) findViewById(R.id.m1_v2_v_sensor_calibration_high));\n module1Vertebra2Views.add((TextView) findViewById(R.id.m1_v2_v_sensor_calibration_low));\n module1VertebraeViews.add(module1Vertebra2Views);\n\n List<TextView> module1Vertebra3Views = new ArrayList<TextView>();\n module1Vertebra3Views.add((TextView) findViewById(R.id.m1_v3_h_setpoint_angle));\n module1Vertebra3Views.add((TextView) findViewById(R.id.m1_v3_h_current_angle));\n module1Vertebra3Views.add((TextView) findViewById(R.id.m1_v3_h_sensor_calibration_high));\n module1Vertebra3Views.add((TextView) findViewById(R.id.m1_v3_h_sensor_calibration_low));\n module1Vertebra3Views.add((TextView) findViewById(R.id.m1_v3_v_setpoint_angle));\n module1Vertebra3Views.add((TextView) findViewById(R.id.m1_v3_v_current_angle));\n module1Vertebra3Views.add((TextView) findViewById(R.id.m1_v3_v_sensor_calibration_high));\n module1Vertebra3Views.add((TextView) findViewById(R.id.m1_v3_v_sensor_calibration_low));\n module1VertebraeViews.add(module1Vertebra3Views);\n\n List<TextView> module1Vertebra4Views = new ArrayList<TextView>();\n module1Vertebra4Views.add((TextView) findViewById(R.id.m1_v4_h_setpoint_angle));\n module1Vertebra4Views.add((TextView) findViewById(R.id.m1_v4_h_current_angle));\n module1Vertebra4Views.add((TextView) findViewById(R.id.m1_v4_h_sensor_calibration_high));\n module1Vertebra4Views.add((TextView) findViewById(R.id.m1_v4_h_sensor_calibration_low));\n module1Vertebra4Views.add((TextView) findViewById(R.id.m1_v4_v_setpoint_angle));\n module1Vertebra4Views.add((TextView) findViewById(R.id.m1_v4_v_current_angle));\n module1Vertebra4Views.add((TextView) findViewById(R.id.m1_v4_v_sensor_calibration_high));\n module1Vertebra4Views.add((TextView) findViewById(R.id.m1_v4_v_sensor_calibration_low));\n module1VertebraeViews.add(module1Vertebra4Views);\n\n module1.setVertebraeViews(module1VertebraeViews);\n\n Module module2 = titanoboaModel.getModules().get(1);\n\n module2.setBatteryLevelView((TextView) findViewById(R.id.m2_battery_level));\n module2.setMotorSpeedView((TextView) findViewById(R.id.m2_motor_speed));\n module2.setPressureSensorView((TextView) findViewById(R.id.m2_pressure));\n\n List<List<TextView>> module2VertebraeViews = new ArrayList<List<TextView>>();\n\n List<TextView> module2Vertebra0Views = new ArrayList<TextView>();\n module2Vertebra0Views.add((TextView) findViewById(R.id.m2_v0_h_setpoint_angle));\n module2Vertebra0Views.add((TextView) findViewById(R.id.m2_v0_h_current_angle));\n module2Vertebra0Views.add((TextView) findViewById(R.id.m2_v0_h_sensor_calibration_high));\n module2Vertebra0Views.add((TextView) findViewById(R.id.m2_v0_h_sensor_calibration_low));\n module2Vertebra0Views.add((TextView) findViewById(R.id.m2_v0_v_setpoint_angle));\n module2Vertebra0Views.add((TextView) findViewById(R.id.m2_v0_v_current_angle));\n module2Vertebra0Views.add((TextView) findViewById(R.id.m2_v0_v_sensor_calibration_high));\n module2Vertebra0Views.add((TextView) findViewById(R.id.m2_v0_v_sensor_calibration_low));\n module2VertebraeViews.add(module2Vertebra0Views);\n\n List<TextView> module2Vertebra1Views = new ArrayList<TextView>();\n module2Vertebra1Views.add((TextView) findViewById(R.id.m2_v1_h_setpoint_angle));\n module2Vertebra1Views.add((TextView) findViewById(R.id.m2_v1_h_current_angle));\n module2Vertebra1Views.add((TextView) findViewById(R.id.m2_v1_h_sensor_calibration_high));\n module2Vertebra1Views.add((TextView) findViewById(R.id.m2_v1_h_sensor_calibration_low));\n module2Vertebra1Views.add((TextView) findViewById(R.id.m2_v1_v_setpoint_angle));\n module2Vertebra1Views.add((TextView) findViewById(R.id.m2_v1_v_current_angle));\n module2Vertebra1Views.add((TextView) findViewById(R.id.m2_v1_v_sensor_calibration_high));\n module2Vertebra1Views.add((TextView) findViewById(R.id.m2_v1_v_sensor_calibration_low));\n module2VertebraeViews.add(module2Vertebra1Views);\n\n List<TextView> module2Vertebra2Views = new ArrayList<TextView>();\n module2Vertebra2Views.add((TextView) findViewById(R.id.m2_v2_h_setpoint_angle));\n module2Vertebra2Views.add((TextView) findViewById(R.id.m2_v2_h_current_angle));\n module2Vertebra2Views.add((TextView) findViewById(R.id.m2_v2_h_sensor_calibration_high));\n module2Vertebra2Views.add((TextView) findViewById(R.id.m2_v2_h_sensor_calibration_low));\n module2Vertebra2Views.add((TextView) findViewById(R.id.m2_v2_v_setpoint_angle));\n module2Vertebra2Views.add((TextView) findViewById(R.id.m2_v2_v_current_angle));\n module2Vertebra2Views.add((TextView) findViewById(R.id.m2_v2_v_sensor_calibration_high));\n module2Vertebra2Views.add((TextView) findViewById(R.id.m2_v2_v_sensor_calibration_low));\n module2VertebraeViews.add(module2Vertebra2Views);\n\n List<TextView> module2Vertebra3Views = new ArrayList<TextView>();\n module2Vertebra3Views.add((TextView) findViewById(R.id.m2_v3_h_setpoint_angle));\n module2Vertebra3Views.add((TextView) findViewById(R.id.m2_v3_h_current_angle));\n module2Vertebra3Views.add((TextView) findViewById(R.id.m2_v3_h_sensor_calibration_high));\n module2Vertebra3Views.add((TextView) findViewById(R.id.m2_v3_h_sensor_calibration_low));\n module2Vertebra3Views.add((TextView) findViewById(R.id.m2_v3_v_setpoint_angle));\n module2Vertebra3Views.add((TextView) findViewById(R.id.m2_v3_v_current_angle));\n module2Vertebra3Views.add((TextView) findViewById(R.id.m2_v3_v_sensor_calibration_high));\n module2Vertebra3Views.add((TextView) findViewById(R.id.m2_v3_v_sensor_calibration_low));\n module2VertebraeViews.add(module2Vertebra3Views);\n\n List<TextView> module2Vertebra4Views = new ArrayList<TextView>();\n module2Vertebra4Views.add((TextView) findViewById(R.id.m2_v4_h_setpoint_angle));\n module2Vertebra4Views.add((TextView) findViewById(R.id.m2_v4_h_current_angle));\n module2Vertebra4Views.add((TextView) findViewById(R.id.m2_v4_h_sensor_calibration_high));\n module2Vertebra4Views.add((TextView) findViewById(R.id.m2_v4_h_sensor_calibration_low));\n module2Vertebra4Views.add((TextView) findViewById(R.id.m2_v4_v_setpoint_angle));\n module2Vertebra4Views.add((TextView) findViewById(R.id.m2_v4_v_current_angle));\n module2Vertebra4Views.add((TextView) findViewById(R.id.m2_v4_v_sensor_calibration_high));\n module2Vertebra4Views.add((TextView) findViewById(R.id.m2_v4_v_sensor_calibration_low));\n module2VertebraeViews.add(module2Vertebra4Views);\n\n module2.setVertebraeViews(module2VertebraeViews);\n\n Module module3 = titanoboaModel.getModules().get(2);\n\n module3.setBatteryLevelView((TextView) findViewById(R.id.m3_battery_level));\n module3.setMotorSpeedView((TextView) findViewById(R.id.m3_motor_speed));\n module3.setPressureSensorView((TextView) findViewById(R.id.m3_pressure));\n\n List<List<TextView>> module3VertebraeViews = new ArrayList<List<TextView>>();\n\n List<TextView> module3Vertebra0Views = new ArrayList<TextView>();\n module3Vertebra0Views.add((TextView) findViewById(R.id.m3_v0_h_setpoint_angle));\n module3Vertebra0Views.add((TextView) findViewById(R.id.m3_v0_h_current_angle));\n module3Vertebra0Views.add((TextView) findViewById(R.id.m3_v0_h_sensor_calibration_high));\n module3Vertebra0Views.add((TextView) findViewById(R.id.m3_v0_h_sensor_calibration_low));\n module3Vertebra0Views.add((TextView) findViewById(R.id.m3_v0_v_setpoint_angle));\n module3Vertebra0Views.add((TextView) findViewById(R.id.m3_v0_v_current_angle));\n module3Vertebra0Views.add((TextView) findViewById(R.id.m3_v0_v_sensor_calibration_high));\n module3Vertebra0Views.add((TextView) findViewById(R.id.m3_v0_v_sensor_calibration_low));\n module3VertebraeViews.add(module3Vertebra0Views);\n\n List<TextView> module3Vertebra1Views = new ArrayList<TextView>();\n module3Vertebra1Views.add((TextView) findViewById(R.id.m3_v1_h_setpoint_angle));\n module3Vertebra1Views.add((TextView) findViewById(R.id.m3_v1_h_current_angle));\n module3Vertebra1Views.add((TextView) findViewById(R.id.m3_v1_h_sensor_calibration_high));\n module3Vertebra1Views.add((TextView) findViewById(R.id.m3_v1_h_sensor_calibration_low));\n module3Vertebra1Views.add((TextView) findViewById(R.id.m3_v1_v_setpoint_angle));\n module3Vertebra1Views.add((TextView) findViewById(R.id.m3_v1_v_current_angle));\n module3Vertebra1Views.add((TextView) findViewById(R.id.m3_v1_v_sensor_calibration_high));\n module3Vertebra1Views.add((TextView) findViewById(R.id.m3_v1_v_sensor_calibration_low));\n module3VertebraeViews.add(module3Vertebra1Views);\n\n List<TextView> module3Vertebra2Views = new ArrayList<TextView>();\n module3Vertebra2Views.add((TextView) findViewById(R.id.m3_v2_h_setpoint_angle));\n module3Vertebra2Views.add((TextView) findViewById(R.id.m3_v2_h_current_angle));\n module3Vertebra2Views.add((TextView) findViewById(R.id.m3_v2_h_sensor_calibration_high));\n module3Vertebra2Views.add((TextView) findViewById(R.id.m3_v2_h_sensor_calibration_low));\n module3Vertebra2Views.add((TextView) findViewById(R.id.m3_v2_v_setpoint_angle));\n module3Vertebra2Views.add((TextView) findViewById(R.id.m3_v2_v_current_angle));\n module3Vertebra2Views.add((TextView) findViewById(R.id.m3_v2_v_sensor_calibration_high));\n module3Vertebra2Views.add((TextView) findViewById(R.id.m3_v2_v_sensor_calibration_low));\n module3VertebraeViews.add(module3Vertebra2Views);\n\n List<TextView> module3Vertebra3Views = new ArrayList<TextView>();\n module3Vertebra3Views.add((TextView) findViewById(R.id.m3_v3_h_setpoint_angle));\n module3Vertebra3Views.add((TextView) findViewById(R.id.m3_v3_h_current_angle));\n module3Vertebra3Views.add((TextView) findViewById(R.id.m3_v3_h_sensor_calibration_high));\n module3Vertebra3Views.add((TextView) findViewById(R.id.m3_v3_h_sensor_calibration_low));\n module3Vertebra3Views.add((TextView) findViewById(R.id.m3_v3_v_setpoint_angle));\n module3Vertebra3Views.add((TextView) findViewById(R.id.m3_v3_v_current_angle));\n module3Vertebra3Views.add((TextView) findViewById(R.id.m3_v3_v_sensor_calibration_high));\n module3Vertebra3Views.add((TextView) findViewById(R.id.m3_v3_v_sensor_calibration_low));\n module3VertebraeViews.add(module3Vertebra3Views);\n\n List<TextView> module3Vertebra4Views = new ArrayList<TextView>();\n module3Vertebra4Views.add((TextView) findViewById(R.id.m3_v4_h_setpoint_angle));\n module3Vertebra4Views.add((TextView) findViewById(R.id.m3_v4_h_current_angle));\n module3Vertebra4Views.add((TextView) findViewById(R.id.m3_v4_h_sensor_calibration_high));\n module3Vertebra4Views.add((TextView) findViewById(R.id.m3_v4_h_sensor_calibration_low));\n module3Vertebra4Views.add((TextView) findViewById(R.id.m3_v4_v_setpoint_angle));\n module3Vertebra4Views.add((TextView) findViewById(R.id.m3_v4_v_current_angle));\n module3Vertebra4Views.add((TextView) findViewById(R.id.m3_v4_v_sensor_calibration_high));\n module3Vertebra4Views.add((TextView) findViewById(R.id.m3_v4_v_sensor_calibration_low));\n module3VertebraeViews.add(module3Vertebra4Views);\n\n module3.setVertebraeViews(module3VertebraeViews);\n\n Module module4 = titanoboaModel.getModules().get(3);\n\n module4.setBatteryLevelView((TextView) findViewById(R.id.m4_battery_level));\n module4.setMotorSpeedView((TextView) findViewById(R.id.m4_motor_speed));\n module4.setPressureSensorView((TextView) findViewById(R.id.m4_pressure));\n\n List<List<TextView>> module4VertebraeViews = new ArrayList<List<TextView>>();\n\n List<TextView> module4Vertebra0Views = new ArrayList<TextView>();\n module4Vertebra0Views.add((TextView) findViewById(R.id.m4_v0_h_setpoint_angle));\n module4Vertebra0Views.add((TextView) findViewById(R.id.m4_v0_h_current_angle));\n module4Vertebra0Views.add((TextView) findViewById(R.id.m4_v0_h_sensor_calibration_high));\n module4Vertebra0Views.add((TextView) findViewById(R.id.m4_v0_h_sensor_calibration_low));\n module4Vertebra0Views.add((TextView) findViewById(R.id.m4_v0_v_setpoint_angle));\n module4Vertebra0Views.add((TextView) findViewById(R.id.m4_v0_v_current_angle));\n module4Vertebra0Views.add((TextView) findViewById(R.id.m4_v0_v_sensor_calibration_high));\n module4Vertebra0Views.add((TextView) findViewById(R.id.m4_v0_v_sensor_calibration_low));\n module4VertebraeViews.add(module4Vertebra0Views);\n\n List<TextView> module4Vertebra1Views = new ArrayList<TextView>();\n module4Vertebra1Views.add((TextView) findViewById(R.id.m4_v1_h_setpoint_angle));\n module4Vertebra1Views.add((TextView) findViewById(R.id.m4_v1_h_current_angle));\n module4Vertebra1Views.add((TextView) findViewById(R.id.m4_v1_h_sensor_calibration_high));\n module4Vertebra1Views.add((TextView) findViewById(R.id.m4_v1_h_sensor_calibration_low));\n module4Vertebra1Views.add((TextView) findViewById(R.id.m4_v1_v_setpoint_angle));\n module4Vertebra1Views.add((TextView) findViewById(R.id.m4_v1_v_current_angle));\n module4Vertebra1Views.add((TextView) findViewById(R.id.m4_v1_v_sensor_calibration_high));\n module4Vertebra1Views.add((TextView) findViewById(R.id.m4_v1_v_sensor_calibration_low));\n module4VertebraeViews.add(module4Vertebra1Views);\n\n List<TextView> module4Vertebra2Views = new ArrayList<TextView>();\n module4Vertebra2Views.add((TextView) findViewById(R.id.m4_v2_h_setpoint_angle));\n module4Vertebra2Views.add((TextView) findViewById(R.id.m4_v2_h_current_angle));\n module4Vertebra2Views.add((TextView) findViewById(R.id.m4_v2_h_sensor_calibration_high));\n module4Vertebra2Views.add((TextView) findViewById(R.id.m4_v2_h_sensor_calibration_low));\n module4Vertebra2Views.add((TextView) findViewById(R.id.m4_v2_v_setpoint_angle));\n module4Vertebra2Views.add((TextView) findViewById(R.id.m4_v2_v_current_angle));\n module4Vertebra2Views.add((TextView) findViewById(R.id.m4_v2_v_sensor_calibration_high));\n module4Vertebra2Views.add((TextView) findViewById(R.id.m4_v2_v_sensor_calibration_low));\n module4VertebraeViews.add(module4Vertebra2Views);\n\n List<TextView> module4Vertebra3Views = new ArrayList<TextView>();\n module4Vertebra3Views.add((TextView) findViewById(R.id.m4_v3_h_setpoint_angle));\n module4Vertebra3Views.add((TextView) findViewById(R.id.m4_v3_h_current_angle));\n module4Vertebra3Views.add((TextView) findViewById(R.id.m4_v3_h_sensor_calibration_high));\n module4Vertebra3Views.add((TextView) findViewById(R.id.m4_v3_h_sensor_calibration_low));\n module4Vertebra3Views.add((TextView) findViewById(R.id.m4_v3_v_setpoint_angle));\n module4Vertebra3Views.add((TextView) findViewById(R.id.m4_v3_v_current_angle));\n module4Vertebra3Views.add((TextView) findViewById(R.id.m4_v3_v_sensor_calibration_high));\n module4Vertebra3Views.add((TextView) findViewById(R.id.m4_v3_v_sensor_calibration_low));\n module4VertebraeViews.add(module4Vertebra3Views);\n\n List<TextView> module4Vertebra4Views = new ArrayList<TextView>();\n module4Vertebra4Views.add((TextView) findViewById(R.id.m4_v4_h_setpoint_angle));\n module4Vertebra4Views.add((TextView) findViewById(R.id.m4_v4_h_current_angle));\n module4Vertebra4Views.add((TextView) findViewById(R.id.m4_v4_h_sensor_calibration_high));\n module4Vertebra4Views.add((TextView) findViewById(R.id.m4_v4_h_sensor_calibration_low));\n module4Vertebra4Views.add((TextView) findViewById(R.id.m4_v4_v_setpoint_angle));\n module4Vertebra4Views.add((TextView) findViewById(R.id.m4_v4_v_current_angle));\n module4Vertebra4Views.add((TextView) findViewById(R.id.m4_v4_v_sensor_calibration_high));\n module4Vertebra4Views.add((TextView) findViewById(R.id.m4_v4_v_sensor_calibration_low));\n module4VertebraeViews.add(module4Vertebra4Views);\n\n module4.setVertebraeViews(module4VertebraeViews);\n\t}",
"List<UIComponent> getChildren();",
"public void setUI(TrackModelUI tmUI);"
] |
[
"0.6167172",
"0.61143523",
"0.6085858",
"0.60074604",
"0.5994583",
"0.5994583",
"0.5994583",
"0.59143573",
"0.5896701",
"0.58932984",
"0.5870181",
"0.5864789",
"0.58146554",
"0.5804531",
"0.5804082",
"0.5731552",
"0.56751984",
"0.56715876",
"0.56206155",
"0.56122893",
"0.55710465",
"0.5542075",
"0.5518533",
"0.5505737",
"0.5428869",
"0.5425349",
"0.54166037",
"0.54087335",
"0.54029614",
"0.53838354",
"0.5380511",
"0.535972",
"0.5335749",
"0.53233516",
"0.5297059",
"0.528509",
"0.5284636",
"0.52820957",
"0.52820283",
"0.5279402",
"0.5275411",
"0.52590466",
"0.5254544",
"0.52504224",
"0.5240939",
"0.5239819",
"0.52381647",
"0.5236849",
"0.5231078",
"0.5220877",
"0.52171075",
"0.52074283",
"0.52034754",
"0.5199921",
"0.51972026",
"0.5195575",
"0.5193596",
"0.519082",
"0.51784706",
"0.5178416",
"0.51743346",
"0.5171036",
"0.51638746",
"0.5163316",
"0.5160868",
"0.5156861",
"0.5147837",
"0.51461303",
"0.51331943",
"0.51317704",
"0.51289165",
"0.5125337",
"0.5124172",
"0.51223755",
"0.51223755",
"0.51223755",
"0.51223755",
"0.51223755",
"0.51223755",
"0.51223755",
"0.5115504",
"0.5111647",
"0.50847834",
"0.5079508",
"0.5079508",
"0.5072331",
"0.5061488",
"0.50596076",
"0.50592566",
"0.5053234",
"0.5036963",
"0.503325",
"0.5029301",
"0.50260085",
"0.5025825",
"0.5025667",
"0.50199395",
"0.5016147",
"0.5010469",
"0.5007954"
] |
0.74740255
|
0
|
/ access modifiers changed from: protected
|
@Override // com.meizu.cloud.pushsdk.handler.p750a.C6687c
/* renamed from: a */
public void mo42871a(MessageV3 messageV3, AbstractC6735c cVar) {
if (cVar != null) {
cVar.mo43104b(messageV3);
mo42876b().mo42416b(mo42881c(), MzPushMessage.fromMessageV3(messageV3));
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n protected void prot() {\n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@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 anular() {\n\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"private abstract void privateabstract();",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\tpublic void dormir() {\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 ligar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public void smell() {\n\t\t\n\t}",
"public abstract Object mo26777y();",
"protected void h() {}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"protected abstract Set method_1559();",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public abstract void mo70713b();",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"protected Doodler() {\n\t}",
"public abstract void mo27386d();",
"@Override\n\tprotected void getExras() {\n\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}",
"private PropertyAccess() {\n\t\tsuper();\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public abstract void mo56925d();",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n protected void getExras() {\n }",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"public abstract void mo27385c();",
"@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"protected boolean func_70814_o() { return true; }",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"public abstract void mo30696a();",
"abstract int pregnancy();",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"@Override\n public void init() {\n\n }",
"@Override\n void init() {\n }",
"@Override\n\tpublic void leti() \n\t{\n\t}",
"private TMCourse() {\n\t}",
"public abstract void mo35054b();",
"@Override\n public void init() {\n }",
"@Override\n\tpublic void buscar() {\n\t\t\n\t}",
"private Infer() {\n\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tpublic void erstellen() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"public final void mo51373a() {\n }",
"protected void method_3848() {\r\n super.method_3848();\r\n }",
"protected FanisamBato(){\n\t}",
"public abstract Object mo1771a();",
"public abstract void m15813a();",
"public void gored() {\n\t\t\n\t}",
"@Override\n public void get() {}",
"@Override\n\tpublic void dibuja() {\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 }",
"private Get() {}",
"private Get() {}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"public abstract void mo27464a();",
"public abstract String mo41079d();",
"@Override\n\tpublic void classroom() {\n\t\t\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\n\tpublic void verkaufen() {\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void logic() {\n\n\t}",
"public abstract void mo102899a();",
"@SuppressWarnings(\"unused\")\n private void _read() {\n }",
"public abstract void mo42329d();",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"public void method_4270() {}",
"public abstract void mo6549b();",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void function() {\n\t\t\n\t}",
"protected void init() {\n // to override and use this method\n }"
] |
[
"0.7375736",
"0.7042321",
"0.6922649",
"0.6909494",
"0.68470824",
"0.6830288",
"0.68062353",
"0.6583185",
"0.6539446",
"0.65011257",
"0.64917654",
"0.64917654",
"0.64733833",
"0.6438831",
"0.64330196",
"0.64330196",
"0.64295477",
"0.6426414",
"0.6420484",
"0.64083177",
"0.6406691",
"0.6402136",
"0.6400287",
"0.63977665",
"0.63784796",
"0.6373787",
"0.63716805",
"0.63680965",
"0.6353791",
"0.63344383",
"0.6327005",
"0.6327005",
"0.63259363",
"0.63079315",
"0.6279023",
"0.6271251",
"0.62518364",
"0.62254924",
"0.62218183",
"0.6213994",
"0.6204108",
"0.6195944",
"0.61826825",
"0.617686",
"0.6158371",
"0.6138765",
"0.61224854",
"0.6119267",
"0.6119013",
"0.61006695",
"0.60922325",
"0.60922325",
"0.6086324",
"0.6083917",
"0.607071",
"0.6070383",
"0.6067458",
"0.60568124",
"0.6047576",
"0.6047091",
"0.60342956",
"0.6031699",
"0.6026248",
"0.6019563",
"0.60169774",
"0.6014913",
"0.6011912",
"0.59969044",
"0.59951806",
"0.5994921",
"0.599172",
"0.59913194",
"0.5985337",
"0.59844744",
"0.59678656",
"0.5966894",
"0.5966894",
"0.5966894",
"0.5966894",
"0.5966894",
"0.5966894",
"0.59647757",
"0.59647757",
"0.59616375",
"0.5956373",
"0.5952514",
"0.59497356",
"0.59454703",
"0.5941018",
"0.5934147",
"0.5933801",
"0.59318185",
"0.5931161",
"0.5929297",
"0.5926942",
"0.5925829",
"0.5924853",
"0.5923296",
"0.5922199",
"0.59202504",
"0.5918595"
] |
0.0
|
-1
|
/ access modifiers changed from: protected
|
@Override // com.meizu.cloud.pushsdk.handler.p750a.C6687c
/* renamed from: c */
public void mo42880b(MessageV3 messageV3) {
C6777d.m40835b(mo42881c(), messageV3.getUploadDataPackageName(), messageV3.getDeviceId(), messageV3.getTaskId(), messageV3.getSeqId(), messageV3.getPushTimestamp(), messageV3.getDelayedReportMillis());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n protected void prot() {\n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@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 anular() {\n\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"private abstract void privateabstract();",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\tpublic void dormir() {\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 ligar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public void smell() {\n\t\t\n\t}",
"public abstract Object mo26777y();",
"protected void h() {}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"protected abstract Set method_1559();",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public abstract void mo70713b();",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"protected Doodler() {\n\t}",
"public abstract void mo27386d();",
"@Override\n\tprotected void getExras() {\n\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}",
"private PropertyAccess() {\n\t\tsuper();\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public abstract void mo56925d();",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n protected void getExras() {\n }",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"public abstract void mo27385c();",
"@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"protected boolean func_70814_o() { return true; }",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"public abstract void mo30696a();",
"abstract int pregnancy();",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"@Override\n public void init() {\n\n }",
"@Override\n void init() {\n }",
"@Override\n\tpublic void leti() \n\t{\n\t}",
"private TMCourse() {\n\t}",
"public abstract void mo35054b();",
"@Override\n public void init() {\n }",
"@Override\n\tpublic void buscar() {\n\t\t\n\t}",
"private Infer() {\n\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tpublic void erstellen() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"public final void mo51373a() {\n }",
"protected void method_3848() {\r\n super.method_3848();\r\n }",
"protected FanisamBato(){\n\t}",
"public abstract Object mo1771a();",
"public abstract void m15813a();",
"public void gored() {\n\t\t\n\t}",
"@Override\n public void get() {}",
"@Override\n\tpublic void dibuja() {\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 }",
"private Get() {}",
"private Get() {}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"public abstract void mo27464a();",
"public abstract String mo41079d();",
"@Override\n\tpublic void classroom() {\n\t\t\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\n\tpublic void verkaufen() {\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void logic() {\n\n\t}",
"public abstract void mo102899a();",
"@SuppressWarnings(\"unused\")\n private void _read() {\n }",
"public abstract void mo42329d();",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"public void method_4270() {}",
"public abstract void mo6549b();",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void function() {\n\t\t\n\t}",
"protected void init() {\n // to override and use this method\n }"
] |
[
"0.7375736",
"0.7042321",
"0.6922649",
"0.6909494",
"0.68470824",
"0.6830288",
"0.68062353",
"0.6583185",
"0.6539446",
"0.65011257",
"0.64917654",
"0.64917654",
"0.64733833",
"0.6438831",
"0.64330196",
"0.64330196",
"0.64295477",
"0.6426414",
"0.6420484",
"0.64083177",
"0.6406691",
"0.6402136",
"0.6400287",
"0.63977665",
"0.63784796",
"0.6373787",
"0.63716805",
"0.63680965",
"0.6353791",
"0.63344383",
"0.6327005",
"0.6327005",
"0.63259363",
"0.63079315",
"0.6279023",
"0.6271251",
"0.62518364",
"0.62254924",
"0.62218183",
"0.6213994",
"0.6204108",
"0.6195944",
"0.61826825",
"0.617686",
"0.6158371",
"0.6138765",
"0.61224854",
"0.6119267",
"0.6119013",
"0.61006695",
"0.60922325",
"0.60922325",
"0.6086324",
"0.6083917",
"0.607071",
"0.6070383",
"0.6067458",
"0.60568124",
"0.6047576",
"0.6047091",
"0.60342956",
"0.6031699",
"0.6026248",
"0.6019563",
"0.60169774",
"0.6014913",
"0.6011912",
"0.59969044",
"0.59951806",
"0.5994921",
"0.599172",
"0.59913194",
"0.5985337",
"0.59844744",
"0.59678656",
"0.5966894",
"0.5966894",
"0.5966894",
"0.5966894",
"0.5966894",
"0.5966894",
"0.59647757",
"0.59647757",
"0.59616375",
"0.5956373",
"0.5952514",
"0.59497356",
"0.59454703",
"0.5941018",
"0.5934147",
"0.5933801",
"0.59318185",
"0.5931161",
"0.5929297",
"0.5926942",
"0.5925829",
"0.5924853",
"0.5923296",
"0.5922199",
"0.59202504",
"0.5918595"
] |
0.0
|
-1
|
/ access modifiers changed from: protected
|
@Override // com.meizu.cloud.pushsdk.handler.p750a.C6687c
/* renamed from: d */
public void mo42883c(MessageV3 messageV3) {
C6777d.m40828a(mo42881c(), messageV3.getUploadDataPackageName(), messageV3.getDeviceId(), messageV3.getTaskId(), messageV3.getSeqId(), messageV3.getPushTimestamp(), messageV3.getDelayedReportMillis());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n protected void prot() {\n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@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 anular() {\n\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"private abstract void privateabstract();",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\tpublic void dormir() {\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 ligar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public void smell() {\n\t\t\n\t}",
"public abstract Object mo26777y();",
"protected void h() {}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"protected abstract Set method_1559();",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public abstract void mo70713b();",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"protected Doodler() {\n\t}",
"public abstract void mo27386d();",
"@Override\n\tprotected void getExras() {\n\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}",
"private PropertyAccess() {\n\t\tsuper();\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public abstract void mo56925d();",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n protected void getExras() {\n }",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"public abstract void mo27385c();",
"@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"protected boolean func_70814_o() { return true; }",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"public abstract void mo30696a();",
"abstract int pregnancy();",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"@Override\n public void init() {\n\n }",
"@Override\n void init() {\n }",
"@Override\n\tpublic void leti() \n\t{\n\t}",
"private TMCourse() {\n\t}",
"public abstract void mo35054b();",
"@Override\n public void init() {\n }",
"@Override\n\tpublic void buscar() {\n\t\t\n\t}",
"private Infer() {\n\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tpublic void erstellen() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"public final void mo51373a() {\n }",
"protected void method_3848() {\r\n super.method_3848();\r\n }",
"protected FanisamBato(){\n\t}",
"public abstract Object mo1771a();",
"public abstract void m15813a();",
"public void gored() {\n\t\t\n\t}",
"@Override\n public void get() {}",
"@Override\n\tpublic void dibuja() {\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 }",
"private Get() {}",
"private Get() {}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"public abstract void mo27464a();",
"public abstract String mo41079d();",
"@Override\n\tpublic void classroom() {\n\t\t\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\n\tpublic void verkaufen() {\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void logic() {\n\n\t}",
"public abstract void mo102899a();",
"@SuppressWarnings(\"unused\")\n private void _read() {\n }",
"public abstract void mo42329d();",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"public void method_4270() {}",
"public abstract void mo6549b();",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void function() {\n\t\t\n\t}",
"protected void init() {\n // to override and use this method\n }"
] |
[
"0.7375736",
"0.7042321",
"0.6922649",
"0.6909494",
"0.68470824",
"0.6830288",
"0.68062353",
"0.6583185",
"0.6539446",
"0.65011257",
"0.64917654",
"0.64917654",
"0.64733833",
"0.6438831",
"0.64330196",
"0.64330196",
"0.64295477",
"0.6426414",
"0.6420484",
"0.64083177",
"0.6406691",
"0.6402136",
"0.6400287",
"0.63977665",
"0.63784796",
"0.6373787",
"0.63716805",
"0.63680965",
"0.6353791",
"0.63344383",
"0.6327005",
"0.6327005",
"0.63259363",
"0.63079315",
"0.6279023",
"0.6271251",
"0.62518364",
"0.62254924",
"0.62218183",
"0.6213994",
"0.6204108",
"0.6195944",
"0.61826825",
"0.617686",
"0.6158371",
"0.6138765",
"0.61224854",
"0.6119267",
"0.6119013",
"0.61006695",
"0.60922325",
"0.60922325",
"0.6086324",
"0.6083917",
"0.607071",
"0.6070383",
"0.6067458",
"0.60568124",
"0.6047576",
"0.6047091",
"0.60342956",
"0.6031699",
"0.6026248",
"0.6019563",
"0.60169774",
"0.6014913",
"0.6011912",
"0.59969044",
"0.59951806",
"0.5994921",
"0.599172",
"0.59913194",
"0.5985337",
"0.59844744",
"0.59678656",
"0.5966894",
"0.5966894",
"0.5966894",
"0.5966894",
"0.5966894",
"0.5966894",
"0.59647757",
"0.59647757",
"0.59616375",
"0.5956373",
"0.5952514",
"0.59497356",
"0.59454703",
"0.5941018",
"0.5934147",
"0.5933801",
"0.59318185",
"0.5931161",
"0.5929297",
"0.5926942",
"0.5925829",
"0.5924853",
"0.5923296",
"0.5922199",
"0.59202504",
"0.5918595"
] |
0.0
|
-1
|
/ access modifiers changed from: protected
|
@Override // com.meizu.cloud.pushsdk.handler.p750a.C6687c
/* renamed from: l */
public MessageV3 mo42868a(Intent intent) {
MPushMessage mPushMessage = (MPushMessage) intent.getSerializableExtra(PushConstants.MZ_PUSH_PRIVATE_MESSAGE);
return MessageV3.parse(mo42886e(intent), mo42877b(intent), mPushMessage.getTaskId(), mPushMessage);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n protected void prot() {\n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@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 anular() {\n\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"private abstract void privateabstract();",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\tpublic void dormir() {\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 ligar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public void smell() {\n\t\t\n\t}",
"public abstract Object mo26777y();",
"protected void h() {}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"protected abstract Set method_1559();",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public abstract void mo70713b();",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"protected Doodler() {\n\t}",
"public abstract void mo27386d();",
"@Override\n\tprotected void getExras() {\n\n\t}",
"private PropertyAccess() {\n\t\tsuper();\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 gravarBd() {\n\t\t\n\t}",
"public abstract void mo56925d();",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n protected void getExras() {\n }",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"public abstract void mo27385c();",
"@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"protected boolean func_70814_o() { return true; }",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"public abstract void mo30696a();",
"abstract int pregnancy();",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n void init() {\n }",
"private TMCourse() {\n\t}",
"@Override\n\tpublic void leti() \n\t{\n\t}",
"public abstract void mo35054b();",
"@Override\n public void init() {\n }",
"@Override\n\tpublic void buscar() {\n\t\t\n\t}",
"private Infer() {\n\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tpublic void erstellen() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"public final void mo51373a() {\n }",
"protected void method_3848() {\r\n super.method_3848();\r\n }",
"protected FanisamBato(){\n\t}",
"public abstract Object mo1771a();",
"public abstract void m15813a();",
"public void gored() {\n\t\t\n\t}",
"@Override\n public void get() {}",
"@Override\n\tpublic void dibuja() {\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 }",
"private Get() {}",
"private Get() {}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"public abstract void mo27464a();",
"public abstract String mo41079d();",
"@Override\n\tpublic void classroom() {\n\t\t\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\n\tpublic void verkaufen() {\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"public abstract void mo102899a();",
"@SuppressWarnings(\"unused\")\n private void _read() {\n }",
"public abstract void mo42329d();",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"public void method_4270() {}",
"public abstract void mo6549b();",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void function() {\n\t\t\n\t}",
"public abstract String mo118046b();"
] |
[
"0.73744047",
"0.7040692",
"0.692117",
"0.69076973",
"0.6844561",
"0.68277687",
"0.68048066",
"0.6581614",
"0.653803",
"0.6500888",
"0.64905626",
"0.64905626",
"0.6471316",
"0.64376974",
"0.64308083",
"0.64308083",
"0.642771",
"0.6424499",
"0.6419003",
"0.64083034",
"0.64053965",
"0.6399863",
"0.6398998",
"0.6397645",
"0.6377549",
"0.63728356",
"0.63699985",
"0.6366876",
"0.6353238",
"0.63333476",
"0.63253313",
"0.6324922",
"0.6324922",
"0.63058454",
"0.62785864",
"0.6270248",
"0.62499714",
"0.62234515",
"0.6220762",
"0.6211659",
"0.620336",
"0.61937845",
"0.618126",
"0.6174812",
"0.6157212",
"0.61370605",
"0.6121414",
"0.61183035",
"0.61175376",
"0.6100111",
"0.6091379",
"0.6091379",
"0.60856384",
"0.6083921",
"0.60691255",
"0.6068961",
"0.60650575",
"0.6054537",
"0.60455734",
"0.6045201",
"0.6033711",
"0.60293764",
"0.6024115",
"0.6017829",
"0.60143995",
"0.60133785",
"0.60101455",
"0.5994944",
"0.59942245",
"0.599371",
"0.59915304",
"0.59905994",
"0.59837806",
"0.5983637",
"0.59662336",
"0.59648055",
"0.59648055",
"0.59648055",
"0.59648055",
"0.59648055",
"0.59648055",
"0.596418",
"0.596418",
"0.59599984",
"0.5955761",
"0.5953097",
"0.5947849",
"0.5944442",
"0.59390324",
"0.5931905",
"0.59317887",
"0.59311014",
"0.5930125",
"0.5928699",
"0.5925024",
"0.59242857",
"0.5923635",
"0.59224457",
"0.5920236",
"0.5919085",
"0.5918472"
] |
0.0
|
-1
|
Getter for ArrayList sequence.
|
ArrayList<Integer> getSequence() {
return sequence;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList<Sequence> getSequenceList() {\n\t\treturn (ArrayList<Sequence>) sequences.clone();\n\t}",
"public ArrayList<T> getAsList(){\r\n return arrayList;\r\n }",
"public ArrayList getList() {\n \t\treturn list;\n \t}",
"public abstract ArrayList<Integer> getIdList();",
"public static ArrayList getList() {\r\n return ListeElem;\r\n }",
"protected Object[] getList() {\n return list;\n }",
"public ArrayList<Integer> getElements()\n {\n return this.elements;\n }",
"public abstract ArrayList<? extends Domain> read();",
"public Base[] getSeq()\n {\n return seq;\n }",
"public List<Integer> getListProperty() {\n\t\t\treturn null;\n\t\t}",
"public ArrayList() {\n\t\tthis.elements = new Object[5];\n\t\tthis.last = -1;\n\t}",
"public Item[] getList() {\n\t\treturn list;\n\t}",
"public ArrayList<E> getData() {\n\t\treturn data;\n\t}",
"ArrayList<String> returnArray() {\n\t\treturn stringArray; // Return just the array and not the Set object\n\t}",
"java.util.List<java.lang.Integer> getItemsList();",
"public ArrayList<Long> getListOfTimes()\r\n {\r\n return this.listOfTimes;\r\n }",
"public final List getList()\n {\n return this.list;\n }",
"ArrayList getAttributes();",
"public List<Integer> getList() {\n return list;\n }",
"public ArrayList<String> readItem();",
"private StudentRecord[] getList() {\r\n\t\treturn this.list;\r\n\t}",
"public java.util.List getList() {\n\t\treturn list;\n\t}",
"public ArrayList<String[]> getArr() {\r\n\t\treturn arr;\r\n\t}",
"public Object[] getList() {\n\t\treturn new Object[]{pitch, duration, velocity};\n\t}",
"public double[] sequence()\n\t{\n\t\treturn _adblSequence;\n\t}",
"public ArrayList<String> get_list_ids(){\n\t\t\treturn list_ids;\n\t\t\t\n\t\t}",
"public ArrayList<Integer> getTemp() { return temp; }",
"private ArrayList<Attribute> getAttributes() {\n\t\tif (attributes != null && attributes instanceof ArrayList)\n\t\t\treturn ((ArrayList<Attribute>) attributes);\n\t\telse {\n\t\t\tArrayList<Attribute> tmp = new ArrayList<Attribute>();\n\t\t\tif (attributes != null)\n\t\t\t\ttmp.addAll(attributes);\n\t\t\tattributes = tmp;\n\t\t\treturn tmp;\n\t\t}\n\t}",
"public ArrayList<Integer> getVector() {\n\t\tif (vector != null) {\n\t\t\treturn vector;\n\t\t} else {\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"Error accessing vector in Sentence class for rawSen= '\"\n\t\t\t\t\t\t\t+ rawSen + \"'\\n\");\n\t\t\treturn null;\n\t\t}\n\t}",
"public XSListSimpleType asList() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 0: idiv \n // 1: laload \n // LocalVariableTable:\n // Start Length Slot Name Signature\n // ----- ------ ---- ---- ------------------------------------------\n // 0 2 0 this Lcom/sun/xml/xsom/impl/ListSimpleTypeImpl;\n // \n // The error that occurred was:\n // \n // java.lang.ArrayIndexOutOfBoundsException\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }",
"public COSArray toList() \n {\n return array;\n }",
"public ArrayList<String> getData() {\n\t\treturn null;\r\n\t}",
"PropertyArray() {\n this.myArrayList = new ArrayList<>();\n }",
"public static ArrayList<Integer> getmPlayList() { return mPlayList; }",
"public final List<AbstractMessage> getSequenceAsVector() {\n\t\treturn Collections.unmodifiableList(this.messages);\n\t}",
"public abstract ArrayList<Cell> getSelfArray();",
"public ArrayList() {\n //sets an array with no length\n this.array = (E[]) new Object[0];\n }",
"java.util.List<java.lang.Integer> getItemList();",
"public ArrayList<Integer> getGen() {\n\treturn _gen;\n }",
"public DList2 list(){\r\n return this.list;\r\n }",
"public ArrayList<Long> base() {\n\t\tint _size = this.members.size();\n\t\tArrayList<Long> _returns = new ArrayList<Long>(_size);\n\t\tfor (int _index = 0; _index < _size; _index++)\n\t\t\t_returns.add(this.members.get(_index).base());\n\t\treturn _returns;\n\t}",
"public List getList() {\n return Arrays.asList(toJavaArray()); \n }",
"@Override\n public String toString() {\n return \"SimpleArrayList{\"\n + \"values=\" + Arrays.toString(values)\n + '}';\n }",
"public CopyOnWriteArrayList<Instruments> getArrInstruments(){\n\t\t\treturn this.containerOfInstruments;\n\t\t}",
"@SuppressWarnings (\"rawtypes\") public java.util.List getItems(){\n return this.items;\n }",
"public ArrayList<OrderItem> getOrderArray(){return orderInfo;}",
"public com.google.protobuf.ProtocolStringList\n getListList() {\n return list_.getUnmodifiableView();\n }",
"@java.lang.Override\n public boolean getIsList() {\n return isList_;\n }",
"@java.lang.Override\n public boolean getIsList() {\n return isList_;\n }",
"public ArrayList<Integer> getE() {\r\n return this.e;\r\n }",
"public java.util.List<java.lang.Integer>\n getItemsList() {\n return java.util.Collections.unmodifiableList(items_);\n }",
"public ArrayList<Long>\n getTimeStamps() \n {\n return pTimeStamps; \n }",
"public static final ArrayList list (Object ... items) {\r\n ArrayList sequence = new ArrayList();\r\n for (int i=0; i<items.length; i++) {\r\n sequence.add(items[i]);\r\n }\r\n return sequence;\r\n }",
"public ArrayList<String[]> getData() {\n return this.data;\n }",
"@java.lang.Override\n public boolean getIsList() {\n return isList_;\n }",
"@java.lang.Override\n public boolean getIsList() {\n return isList_;\n }",
"public java.util.List<java.lang.Integer>\n getItemsList() {\n return items_;\n }",
"public JList obtenirList() {\r\n\t\treturn list;\r\n\t}",
"@Override\n\tpublic ArrayList<String> getLecturaArrayList() {\n\t\treturn null;\n\t}",
"protected abstract List<E> getList();",
"public List getList();",
"public java.util.List<java.lang.Integer> getValueList() {\n return java.util.Collections.unmodifiableList(result.value_);\n }",
"public Integer getSequence()\n {\n return sequence;\n }",
"public ArrayList() {\n _size = 0;\n _store = (E[]) new Object[32];\n }",
"public com.google.protobuf.ProtocolStringList\n getListList() {\n return list_;\n }",
"public final /* synthetic */ ArrayList mo15452o() throws Exception {\n return m16977b(this.f13327f);\n }",
"public ArrayList[] getRows() {\r\n return rows;\r\n }",
"public static ArrayList getLines() {\n return lines;\n }",
"private List getList() {\n if(itemsList == null) {\n itemsList = new ArrayList<>();\n }\n return itemsList;\n }",
"protected List getList() {\n/* 88 */ return (List)getCollection();\n/* */ }",
"public ArrayList<Collectable> getItems(){\n return items;\n }",
"public ArrayList<pfrnd> get() {\n\t\treturn pro;\r\n\t}",
"public ArrayList <Students> getStudentList ()\n\n {\n\n // Returns studentList when called.\n return studentList;\n\n }",
"public ArrayList<Invitato> getArraylistInvitati(){\n\n\n return AssegnamentiTavolo;\n }",
"int length() {\n return this.myArrayList.size();\n }",
"public ArrayList getOrderItems() \r\n\t{\r\n\t\treturn orderItemList;\r\n\t}",
"public Integer getSeq() {\n return seq;\n }",
"public Integer getSeq() {\n return seq;\n }",
"public Integer getSeq() {\n return seq;\n }",
"public Integer getSequence() {\n return sequence;\n }",
"@Override\n\tpublic E get(int i) {\n\t\tif (i < 0 || i >= this.numberOfElements) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\telse {\n\t\t\treturn this.arrayList[i];\n\t\t}\n\t}",
"public List<Rectangulo> getLista() {\n return (lista);\n }",
"com.google.protobuf.ProtocolStringList\n getListList();",
"public static < E > ArrayList<E> readArrayList () throws IOException, ClassNotFoundException{\n ArrayList<E> outputArrayList = new ArrayList<E>();\n // åbn inputstreams på al.ser\n FileInputStream fi = new FileInputStream(\"al.ser\");\n ObjectInputStream oi = new ObjectInputStream(fi);\n // cast til arraylist af generisk type\n outputArrayList = (ArrayList<E>) oi.readObject();\n // luk inputstreams og returner\n oi.close();\n fi.close();\n return outputArrayList;\n }",
"public BasicAttributesGrammarAccess.ArrayValueElements getArrayValueAccess() {\n\t\treturn gaBasicAttributes.getArrayValueAccess();\n\t}",
"private List<SimpleComponent> list() {\n\t\treturn this.list(null);\n\t}",
"public Lista<Lado> obtener_Lista() {\n\t\treturn this.list;\n\t}",
"@Override\n\tpublic ArrayList<T> toArrayList() {\n\t\tArrayList<T> out = new ArrayList<T>();\n\t\ttoArrayListRecursive(out,root);\n\t\treturn out;\n\t}",
"public java.util.List<java.lang.Integer>\n getItemList() {\n return item_;\n }",
"public ArrayList getAttributeLists() {\n return attributeLists;\n }",
"public ArrayList<Event> getEvents(){return new ArrayList<Event>(events);}",
"ArrayMixedObject getArray() {\n\t\treturn array;\n\t}",
"public ArrayList<Coordinate> getCoordinates() {\n return coordinates;\n }",
"public abstract List<T> getList();",
"public ArrayList<Integer> getEleves(){\r\n\t\treturn this.listeEleves;\r\n\t}",
"public java.util.List<java.lang.Long> getI64ListList() {\n return java.util.Collections.unmodifiableList(result.i64List_);\n }",
"public List<?> getValue() {\n return value;\n }",
"@Override\n public List<E> asList() {\n ArrayList<E> result = null;\n\n while (top.next != null) {\n top = top.next;\n result.add(top.data);\n }\n return result;\n }",
"@Override\n\tpublic List<Arco> obtenerArcos() {\n\t\treturn arcos;\n\t}",
"@java.lang.Override\n public java.util.List<java.lang.Long>\n getValueList() {\n return value_;\n }"
] |
[
"0.7311274",
"0.6868686",
"0.6688399",
"0.6329377",
"0.6315792",
"0.6177561",
"0.6151261",
"0.61241895",
"0.60973287",
"0.60721326",
"0.6071459",
"0.60214543",
"0.5995965",
"0.5954121",
"0.595007",
"0.58984554",
"0.58746195",
"0.58638597",
"0.5860523",
"0.58574855",
"0.58573395",
"0.58537835",
"0.5848898",
"0.5841057",
"0.5832038",
"0.5804997",
"0.57901686",
"0.5787031",
"0.5760739",
"0.5760455",
"0.5757878",
"0.5751059",
"0.57482505",
"0.57349724",
"0.5705489",
"0.5698461",
"0.56881016",
"0.56856126",
"0.5671896",
"0.56671983",
"0.56628823",
"0.56612265",
"0.56556034",
"0.56430924",
"0.56241435",
"0.5617545",
"0.5611497",
"0.5605079",
"0.5605079",
"0.56020504",
"0.5601007",
"0.5598293",
"0.5592381",
"0.5591575",
"0.55886525",
"0.55886525",
"0.558312",
"0.55810624",
"0.55804783",
"0.55771863",
"0.55756205",
"0.5575589",
"0.5569244",
"0.55689937",
"0.55649376",
"0.5552318",
"0.5544948",
"0.5544768",
"0.5543966",
"0.5542706",
"0.5536219",
"0.5532264",
"0.55274206",
"0.55222535",
"0.5521803",
"0.55121285",
"0.55101806",
"0.55101806",
"0.55101806",
"0.5507764",
"0.5506207",
"0.55050737",
"0.55028147",
"0.5500251",
"0.54956704",
"0.54941994",
"0.5490918",
"0.5489755",
"0.5483355",
"0.54810655",
"0.5475569",
"0.54687476",
"0.5465836",
"0.5463641",
"0.5462188",
"0.5460984",
"0.54551935",
"0.5454539",
"0.54476637",
"0.5446313"
] |
0.774999
|
0
|
Check if the user has made an error in the input of the sequence
|
boolean checkError() {
Iterator<Integer> seq = sequence.iterator();
Iterator<Integer> in = input.iterator();
while (seq.hasNext() && in.hasNext()) {
int a = seq.next();
int b = in.next();
if (a != b) {
attempts++;
return true;
}
}
return false;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private boolean checkForWrongInput(){\n if(this.studentCode.getText().isEmpty())\n return true;\n //Check for length\n if(this.studentCode.getText().length() != 3)\n return true;\n //Check for invalid characters\n for(char c: this.studentCode.getText().toCharArray())\n if(!Character.isDigit(c))\n return true;\n\n return false;\n }",
"private static Boolean errorCheck(String Buffer){\n if(Buffer.matches(\"Y\")) return true;\n if(Buffer.matches(\"N\")) return false;\n screenClear(); //Clears the screen and applies an error message.\n return moreInput(); //Recursive repeat upon error.\n }",
"public static int check() {\r\n\t\tint num = 0;\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tnum = input.nextInt();\t\t\t// unos \r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) {\t\t\t\t// hvatanje greske\r\n\t\t\t\tSystem.out.println(\"Pogresan unos, probajte ponovo\");\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t}\r\n\t\t} while (true);\r\n\t\treturn num;\r\n\t}",
"public static int checkInput() {\r\n\t\tint num = 0;\r\n\t\tboolean error = true; // check for error\r\n\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\t// input has to be an integer and not negative number\r\n\t\t\t\tnum = input.nextInt();\r\n\t\t\t\tif (num < 0)\r\n\t\t\t\t\tthrow new InputMismatchException();\r\n\t\t\t\terror = false;\r\n\r\n\t\t\t} catch (InputMismatchException e) {\r\n\r\n\t\t\t\tSystem.out.print(\"Wrong input, try again...: \");\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t}\r\n\t\t\t// loop continue while there is an error\r\n\t\t} while (error);\r\n\r\n\t\treturn num;\r\n\t}",
"private boolean isValidInput() {\n\t\treturn true;\n\t}",
"protected abstract int isValidInput();",
"private int errorCheckingInt(String display) {\n\n\t\tint tempChoice;\n\t\tScanner input = new Scanner(System.in);\n\n\t\twhile (true) {\n\t\t\tSystem.out.print(\"\\n\" + display);\n\t\t\ttry {\n\t\t\t\ttempChoice = input.nextInt();\n\t\t\t\tif(display.equals(\"Enter number of kids: \")) { //only for kids\n\t\t\t\t\tif(tempChoice < 0)\n\t\t\t\t\t\tthrow new IllegalArgumentException(\"Error input\\n\");\n\t\t\t\t}\n\t\t\t\telse if (tempChoice < 1)\n\t\t\t\t\tthrow new IllegalArgumentException(\"Error input\\n\");\n\t\t\t\tbreak;\n\t\t\t} catch (InputMismatchException e) {\n\t\t\t\tSystem.out.println(\"Error input \\n\");\n\t\t\t\tinput.next();\n\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\t\t}\n\n\t\tinput.nextLine();\n\n\t\treturn tempChoice;\n\t}",
"public static int check() {\r\n\t\tint num = 0;\r\n\t\tboolean check = true;\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tnum = input.nextInt();\r\n\t\t\t\tif (num < 0) {\r\n\t\t\t\t\tnum = Math.abs(num);\r\n\t\t\t\t}\r\n\t\t\t\tcheck = false;\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) {\t\t\t\t\t\t// hvatanje greske i ispis da je unos pogresan\r\n\t\t\t\tSystem.out.println(\"You know it's wrong input, try again mate:\");\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t}\r\n\t\t} while (check);\r\n\t\treturn num;\r\n\t}",
"public void invalid() {\r\n\t\tSystem.out.println(\"Please enter a valid input\");\r\n\t}",
"public int checkValidate() {\n while (true) {\n if (scanner.hasNextInt()) {\n // Get input from user\n int choice = scanner.nextInt();\n scanner.nextLine(); // Remove enter key\n return choice; // Return choice\n } else {\n // Show out error if not an interger number\n System.out.println(\"Your inputted not an integer number!\");\n System.out.print(\"Choice again: \"); // Retype\n scanner.next();\n }\n }\n }",
"private boolean isInputValid() {\n return true;\n }",
"private static boolean isBadInput(String s) {\n\t\tString[] split = s.split(\"\\\\s+\");\n\t\tif (split.length != 3) {\n\t\t\tSystem.err.printf(\"Unknow length: %d\\n\", split.length);\n\t\t\treturn true;\n\t\t}\n\t\ttry {\n\t\t\tInteger.parseInt(split[0]);\n\t\t\tInteger.parseInt(split[2]);\n\t\t} catch (NumberFormatException e) {\n\t\t\tSystem.err.printf(\"Input numbers only.\\n\");\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (split[1].length() != 1) {\n\t\t\tSystem.err.printf(\"Operator should be one character.\\n\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public static void userInputError(int input) //users inputs option that is out of bounds\n\t{\n\t\tSystem.out.println(\"ERROR: Selection Out Of Bounds! \\nOption \" + input + \" Does Not Exist\"); //error message\n\t\tSystem.out.println(\"Press 'Enter' To try Again\"); // prompt to try again\n\t}",
"boolean isError() {\n if (firstChar == '5' || firstChar == '4') {\n return true;\n }\n\n return false;\n }",
"private int errorCheckingInt(String display, int lastItem) {\n\t\tint index;\n\t\tScanner input = new Scanner(System.in);\n\n\t\twhile (true) {\n\t\t\tSystem.out.print(\"\\n\" + display);\n\t\t\ttry {\n\t\t\t\tindex = input.nextInt();\n\t\t\t\tif (index < 1 || index > lastItem)\n\t\t\t\t\tthrow new IllegalArgumentException(\"Error input\\n\");\n\t\t\t\tbreak;\n\t\t\t} catch (InputMismatchException e) {\n\t\t\t\tSystem.out.println(\"Error input\\n\");\n\t\t\t\tinput.next();\n\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\t\t}\n\n\t\tinput.nextLine();\n\n\t\treturn index;\n\t}",
"public static void notValidNumberErr(){\n printLine();\n System.out.println(\" Oops! Please enter a valid task number\");\n printLine();\n }",
"private void checkUserInput() {\n }",
"public void checkInput(TextField number) {\r\n\t\ttry {\r\n\t\t\tlong num = Long.parseLong(number.getText());\r\n\t\t\tif (num < 0) \t\t\t\t\t// ako je negativan broj, pretvorit cemo ga u pozitivan\r\n\t\t\t\tnum = Math.abs(num);\r\n\t\t\tif (isValid(num)) \r\n\t\t\t\tscene2();\r\n\t\t}\r\n\t\tcatch (Exception e) {\t\t\t\t// hvatanje greske\r\n\t\t\talert(\"Wrong input, try again!\");\r\n\t\t}\r\n\t}",
"protected abstract boolean isInputValid();",
"public static int inputCheckI() {\r\n\t\tint unos = 0;\t// pocetna vrijednost\r\n\t\tboolean inputCheck = true;\t//kontrolna promjenljiva\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tunos = input.nextInt();\t//ucitavanje unosa i provjera da li je negativan broj\r\n\t\t\t\tif (unos <= 0) {\r\n\t\t\t\t\tSystem.out.println(\"Pogresan unos. Pokusajte ponovo: \");\t//ako jeste ispisi poruku\r\n\t\t\t\t\tinputCheck = true;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\telse inputCheck = false;\t//ako je sve ok, kontrolna promjenljiva false, vrati unos\t\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tcatch (InputMismatchException ex) {\t//u slucaju pogresnog unosa\r\n\t\t\t\tSystem.out.println(\"Pogresan unos. Pokusajte ponovo: \");\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t}\r\n\t\t} while (inputCheck);\r\n\t\treturn unos;\r\n\t}",
"private int getValidInteger(String msg) {\n\t\twhile (!scan.hasNextInt() || (choice = scan.nextInt()) < 1) {\n\t\t\tSystem.out\n\t\t\t\t\t.print(\"Error ---> Enter Positive Integer Value:\\n\" + msg);\n\t\t\tscan.next();\n\t\t}\n\n\t\treturn choice;\n\t}",
"public void CheckError(String s) {\r\n if (s.equals(token.get(lookAheadPossition))){\r\n System.out.println(\"Expected: \"+ s +\" at line:\"+ lookAheadPossition);\r\n lookAheadPossition=lookAheadPossition+1;\r\n }else {\r\n System.out.println(\"ERROR: at line:\"+ lookAheadPossition +\" expected-> \"+ s +\" --- \" + token.get(lookAheadPossition)+ \" <-detected.\" );\r\n System.exit(0);\r\n }\r\n }",
"private static boolean validateInput1(String[] input) {\n\t\tif (input.length != 1) {\n\t\t\tSystem.out.println(ErrorType.UNKNOWN_COMMAND);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private boolean verifySequence(String seq) {\n for (int i = 0; i < seq.length(); i++) {\n if (seq.charAt(i) != 'A' && seq.charAt(i) != 'T'\n && seq.charAt(i) != 'C' && seq.charAt(i) != 'G') {\n return false;\n }\n }\n return true;\n }",
"private static int validateInput() {\n Scanner genericInt = new Scanner(System.in);\n int number = 0;\n if (genericInt.hasNextInt()) {\n number = genericInt.nextInt();\n return number;\n }\n else {\n validateInput();\n }\n return number;\n }",
"private static String validateInputStr() {\n String str = \"\";\n Scanner genericString = new Scanner(System.in);\n if (!genericString.hasNextInt()) {\n str = genericString.nextLine();\n return str;\n }\n else {\n validateInputStr();\n }\n return str;\n }",
"public boolean validatePrescription() {\n\t\tif (dose == 0)\n\t\t\treturn false;\n\t\tif (count == 0)\n\t\t\treturn false;\n\t\tif (dosing == 0)\n\t\t\treturn false;\n\t\tif (instructions == null)\n\t\t\treturn false;\n\n\t\treturn true;\n\t}",
"public boolean checkInput();",
"protected abstract boolean checkInput();",
"public static int inputValidation(Scanner sc) {\n int number;\n do {\n System.out.println(\"enter Postive Number: \");\n while (!sc.hasNextInt()) {\n System.out.println(\"This is not a nuber.Please Enter Positive Number: \");\n sc.next();\n }\n number = sc.nextInt();\n } while (number < 0);\n\n return number;\n }",
"private void checkInput(String input)throws Exception{\n\n if (input.getBytes(\"UTF-8\").length > 255){\n throw new IOException(\"Message too long\");\n\n }\n try {\n if (Integer.parseInt(input) < 0 || Integer.parseInt(input) > 65535) {\n throw new IOException(\"Port not valid\");\n }\n }catch (NumberFormatException e){\n //nothing should happen\n }\n }",
"public static void error()\r\n {\r\n valid=false;\r\n\r\n }",
"private boolean noErrors(String semester, String year) {\n \n //check that semester and year contain valid input\n if (Semester.isSemesterCode(year + semester)) {\n \n return true;\n }\n else {\n \n JOptionPane.showMessageDialog(null, \"Either your year or semester input is invalid, please re-enter it and try again\", \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n \n return false;\n }",
"public static int inputMes(){\r\n Scanner sc = new Scanner(System.in);\r\n \r\n // creamos while-loop, si el formato del numero es incorrecto la pregunta se repute\r\n while(true){\r\n System.out.print(\"Intoduce un mes en formato numerico: \");\r\n \r\n // ponems InputMismactException si el usuario no introduce el numero entero\r\n try{\r\n mes = sc.nextInt();\r\n return mes;\r\n }\r\n \r\n catch(InputMismatchException ex){\r\n System.out.println(\"Formato incorrecto!\");\r\n sc.nextLine();\r\n } \r\n }\r\n }",
"@Override\n\tpublic boolean checkInput() {\n\t\treturn true;\n\t}",
"private void check1(){\n \n\t\tif (firstDigit != 4){\n valid = false;\n errorCode = 1;\n }\n\t}",
"@Override\n\tprotected void checkNumberOfInputs(int length) {\n\n\t}",
"private void userChoice(int x) {\n int choice;\n while (true) { // loop for validation\n try {\n choice = Integer.parseInt(sc.next());\n if (choice < 0 || choice > x) {\n System.out.println(\"Error! Please enter a valid number from the option above\");\n } else {\n this.choice = choice;\n return;\n }\n } catch (Exception e) {\n System.out.println(\"Error! Please enter a valid number from the option above\");\n }\n }\n }",
"public boolean isError(int i);",
"public void execute() {\n String input;\n boolean isInputValid;\n\n do {\n isInputValid = true;\n\n System.out.print(\"Please send me the numbers using space between them like \\\"1 2 3\\\": \");\n input = sc.nextLine();\n\n try {\n validateData(input);\n } catch (NumberFormatException e) {\n System.err.println(\"NumberFormatException \" + e.getMessage());\n isInputValid = false;\n }\n\n } while (!isInputValid);\n\n System.out.println(\"Result: \" + find(input));\n }",
"private void check3(){\n \n if (errorCode == 0){\n \n if (firstDigit * fifthDigit * ninthDigit != 24){\n valid = false;\n errorCode = 3;\n }\n }\n\t}",
"public final void invalidInput() {\n\t\tout.println(\"Command not recognized. Please try again.\");\n\t}",
"public void invalidMovePrompt() {\n\t\tinvalidPrompted = true;\n\t\tSystem.out.println(\"Invalid move. Please try again\");\n\t}",
"private void printErrorMenu() {\n System.out.println(\"Invalid input. Please check inputs and try again.\");\n }",
"public static boolean validateMenuOption(String input) {\r\n boolean valid = false;\r\n try {\r\n if (Integer.parseInt(input) < 1 || Integer.parseInt(input) > 5){\r\n System.out.println(\"**Error: Menu option not found.\\n\"\r\n +\" Please type a single digit [1-5] for menu option.\");\r\n } \r\n else {\r\n valid = true;\r\n }\r\n }\r\n catch (NumberFormatException nfe) {\r\n System.out.println(\"**Error: Only a single number can be input.\\n\"\r\n +\" Please type a single digit [1-5] for menu option.\");\r\n }\r\n return valid;\r\n }",
"public boolean errors() {\n \treturn semantErrors != 0;\n }",
"private static void check (int expected) {\n\t\tif (sym == expected) scan(); // if verified,read next\n\t\telse error(TokenCodes.tokenName[expected]+\"expected\" );\n\t\t}",
"public static int checkInt() {\n\t\tboolean is_Nb = false; int i = 0;\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\ti = Integer.parseInt(scan.nextLine());\r\n\t\t\t\tis_Nb= true;\r\n\t\t\t\tif(i<0) {\r\n\t\t\t\t\tSystem.out.println(\"Enter a positive number\");\r\n\t\t\t\t\tis_Nb = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e) {\r\n\t\t\t\tSystem.out.println(\"Enter a number\");\r\n\t\t\t}\r\n\t\t}while(!is_Nb);\r\n\t\treturn i;\r\n\t}",
"boolean inputValid(String s) {\n\n if (s.length() == 0) {\n return false;\n }\n\n //check whether there are wrong commas\n for (int ii = 1; ii < s.length() - 1; ii++) {\n if (s.charAt(ii) == ',') {\n if(!s.contains(\"log\")) {\n resS = \"There are wrong commas\";\n return false;\n }\n }\n }\n\n //check whether there are multiple points\n if(s.charAt(0)=='.' || s.charAt(s.length()-1)=='.') return false;\n for (int ii = 1; ii < s.length() - 1; ii++) {\n if (s.charAt(ii) == '.') {\n if (!Character.isDigit(s.charAt(ii - 1))) {\n resS=\"These are wrong points.\";\n return false;\n } else if (!Character.isDigit(s.charAt(ii + 1))) {\n resS=\"These are wrong points.\";\n return false;\n } else {\n for (int jj = ii + 2; jj < s.length(); jj++) {\n if (s.charAt(jj) == '.') {\n String ss = s.substring(ii + 2, jj);\n if (!(ss.contains(\"+\") || ss.contains(\"-\") || ss.contains(\"*\") || ss.contains(\"/\") || ss.contains(\"%\")\n || ss.contains(\"^\") || ss.contains(\")\"))) {\n resS=\"These are wrong points.\";\n return false;\n }\n }\n }\n }\n }\n }\n ArrayList<Token> operation = tokenize(s);\n return isNumberOrOpe(operation) && isOpePosRight(operation) && isValidparentheses(operation) && isValidTan(operation) && isLogWrong(operation);\n }",
"public abstract boolean verifyInput();",
"private static String getValidGuess(BagelGame game) {\n Scanner scan = new Scanner(System.in);\n boolean valid = false;\n String guess = \"\";\n String error;\n \n while (!valid) {\n System.out.print(\"Guess # \" + game.getGuessNum() + \" ? \");\n guess = scan.nextLine().trim();\n error = game.validateGuess(guess);\n if (error == \"\") {\n valid = true;\n } else {\n System.out.println(error);\n }\n }\n return guess;\n }",
"int main()\n{\n\n string line;\n\n while (getline(cin, line))\n {\n if (line == \"\")\n {\n cout << 0 << endl;\n continue;\n }\n\n int num = roman2num(line);\n string n_line = num2roman(num);\n\n if (line != n_line || num >= 4000)\n {\n cout << \"This is not a valid number\" << endl;\n }\n else\n {\n cout << num << endl;\n }\n }\n\n return 0;\n}",
"public static int typeValidation(int type) {\n Scanner scanner = new Scanner(System.in);\n int attempt = type;\n while (attempt > 3 || attempt < 1)// Type 4 is supposed to be people who can make employees. Computer decides that, not the user\n {\n System.out.println(\"Invalid Choice\");\n System.out.print(\" > \");\n attempt = scanner.nextInt();\n }\n return attempt;\n\n }",
"private static void exitAsInvalidInput() {\n\t\tSystem.out.println(\n\t\t\t\t\"You have entered invalid input. Exiting the system now.\");\n\t\tSystem.exit(0);\n\t}",
"public static int verif(String cadena) {\r\n Scanner l = new Scanner(System.in);\r\n int m1 = -1;\r\n do {\r\n try {\r\n System.out.println(cadena);\r\n m1 = l.nextInt();\r\n } catch (InputMismatchException e) {\r\n System.out.println(\"Valor no valido, ingrese un valor nuimerico\");\r\n }\r\n l.nextLine();\r\n } while (m1 < 0);\r\n\r\n return m1;\r\n }",
"public boolean isError() {\r\n return textErrorIndex >= 0;\r\n }",
"public static int integerValidation() {\n\t\tboolean flag = true;\n\t\tint input = 0;\n\t\tString temp = \"\";\n\t\twhile (flag) {\n\t\t\ttry {\n\t\t\t\ttemp = in.nextLine().trim();\n\t\t\t\tinput = Integer.parseInt(temp);\n\t\t\t\tflag = false;\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Please Enter a valid input\");\n\t\t\t}\n\t\t}\n\t\treturn input;\n\t}",
"private boolean isInputValid() {\n String errorMessage = \"\";\n\n if (commentField.getText() == null || commentField.getText().length() == 0) {\n errorMessage += \"Не введен комментарий!\\n\";\n }\n if (timeField.getText() == null || timeField.getText().length() == 0) {\n errorMessage += \"Не введено время выполнения задачи!\\n\";\n }\n if (errorMessage.length() == 0) {\n return true;\n } if (errorMessage.length() == 0) {\n return true;\n } else {\n // Show the error message.\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Не введены все данные!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Пожалуйста, введите все данные!\");\n alert.showAndWait();\n return false;\n }\n }",
"private static boolean validateInput2(String[] input) {\n\t\tif (input.length != 2) {\n\t\t\tSystem.out.println(ErrorType.UNKNOWN_COMMAND);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public void correctErrors();",
"private void validateInputParameters(){\n\n }",
"@Test\r\n\tpublic void testIsValidPasswordInvalidSequence()\r\n\t{\r\n\t\ttry{\r\n\t\t\tassertTrue(PasswordCheckerUtility.isValidPassword(\"AAAdd2$\"));\r\n\t\t}\r\n\t\tcatch(InvalidSequenceException e)\r\n\t\t{\r\n\t\t\tassertTrue(\"Successfully threw a InvalidSequenceExcepetion\",true);\r\n\t\t}\r\n\t}",
"static int inputCheck(Mode game){\n Scanner sc=new Scanner(System.in);\r\n int input;\r\n System.out.println(\"Your turn:\");\r\n do {\r\n input = sc.nextInt();\r\n if(input < 1 || input >9){\r\n System.out.println(\"Enter a number from 1-9\");\r\n }else if (game.filled(input)){\r\n System.out.println(\"Box is full, please enter another number\");\r\n }\r\n }while(input < 1 || input >9 || game.filled(input));\r\n return input;\r\n }",
"@Test\r\n public void Test004TakeUserInputValid()\r\n {\r\n gol.input = new Scanner(new ByteArrayInputStream(\"1 1 2 2 2 3 2 4 -1\".getBytes()));\r\n gol.takeUserInput();\r\n assertTrue(gol.grid[1][1] == 1 && gol.grid[2][2] == 1 && gol.grid[2][3] == 1 && gol.grid[2][4] == 1);\r\n }",
"public int lecturaNumero()\n {\n boolean error = false; \n int numero = 0;\n System.out.print(\">\");\n try {\n numero = lectura.nextInt();\n\n } catch (InputMismatchException ime){\n error = true; \n lectura.next();\n }\n if (!error){\n return numero; \n }else{\n return -1;\n }\n }",
"public static boolean userInput(){\n String tempInput = \"y\"; //string to hold input for bulletproofing, default length is one character\n Scanner input = new Scanner(System.in);\n\n do { //bulletproofing input\n\n if (tempInput.length() != 1){ //if looping for second time, output error message\n System.out.println(\"Unaccepted input. Please reenter.\");\n }\n\n tempInput = input.nextLine(); //take input\n\n }while(tempInput.length() != 1); //loops again if input is not single character\n\n return tempInput.charAt(0) == 'y';\n }",
"private boolean validateInput() {\n\tboolean valid = false;\n\ttry {\n\t if (paymentText == null | paymentText.getValue() == \"\") {\n\t\tpaymentText.focus();\n\t\tthrow new NullPointerException(\"paymentText fehlt\");\n\t }\n\t if (paymentBetrag == null | paymentBetrag.getValue() == \"\") {\n\t\tpaymentBetrag.focus();\n\t\tthrow new NullPointerException(\"paymentBetrag fehlt\");\n\t }\n\t if (!paymentBetrag.isEmpty()) {\n\t\t@SuppressWarnings(\"unused\")\n\t\tdouble d = Double.parseDouble(paymentBetrag.getValue());\n\t }\n\t // seems that everything was OK\n\t valid = true;\n\t} catch (NullPointerException e) {\n\t System.out.println(\"PaymentWindow - \" + e);\n\t} catch (NumberFormatException e) {\n\t // entered value is no number\n\t paymentBetrag.focus();\n\t}\n\treturn valid;\n }",
"boolean hasError();",
"boolean hasError();",
"boolean hasError();",
"private void checkRuntimeFail(String filename, int... input){\n\t\tString inputString = createInput(input);\n\t\t\n\t\tProgram prog;\n\t\tSimulator sim = null;\n\t\tMachine vm = null;\n\t\tPipedInputStream in = null;\n\t\ttry {\n\t\t\tprog = compiler.compile(new File(BASE_DIR, filename + EXT));\n\t\t\tvm = new Machine();\n\t\t\tsim = new Simulator(prog, vm);\n\t\t\tvm.clear();\n\t\t\tsim.setIn(new ByteArrayInputStream(inputString.getBytes()));\n\t\t\tin = new PipedInputStream();\n\t\t\tOutputStream out;\n\t\t\tout = new PipedOutputStream(in);\n\t\t\tsim.setOut(out);\n\t\t} catch (ParseException e) {fail(filename + \" did not generate\");\n\t\t} catch (IOException e) {\tfail(filename + \" did not generate\");}\n\t\t\n\t\ttry{\n\t\t\tsim.run();\n\t\t\tString output = \"\";\n\t\t\tint max = in.available();\n\t\t\tfor(int index = 0; index < max; index++)\n\t\t\t\toutput += (char)in.read();\n\t\t\t/** Check whether there was an error outputted. */\n\t\t\tif(!output.toLowerCase().contains(\"error: \"))\n\t\t\t\tfail(filename + \" shouldn't check but did\");\n\t\t} catch (Exception e) {\n\t\t\t// this is the expected behaviour\n\t\t}\n\t}",
"public void testInvalidInput(){\n\t\tString input = \"bye\";\n\t\tString actual = operation.processOperation(input);\n\t\tString expected = \"bye bye could not be performed\";\n\t\tassertEquals(expected,actual);\n\t}",
"public boolean applyErrors() {\n\t\t/*\n\t\tdouble erreur = Math.random(); // on genere un nombre entre 0 et 1\n\t\tSystem.out.print(this.error*erreur + \"\\n\");\n\t\tif (erreur * this.error < 0.07) { // on multiplie l'erreur aleatoire par l'error de la sonde (qui sera aussi compris entre 0 et 1)\n\t\t\treturn true;\t\t\t\t// si l'erreur finle (produit des deux erreur) est inferieur a 20%\n\t\t}\n\t\treturn false;\n\t\t*/\n\t\treturn true;\n\t}",
"private void check_displaysError() {\n onView(withId(R.id.title))\n .check(matches(withText(R.string.input_title_error)));\n onView(withId(R.id.subtitle))\n .check(matches(withText(R.string.input_subtitle_error)));\n\n // And the button to be labeled try again\n onView(withId(R.id.hint))\n .check(matches(isDisplayed()))\n .check(matches(withText(R.string.input_hint_error)));\n }",
"public static int checkUserInput(int move, Scanner scanner){\n //Catch the exceptions that the user input is not integers\n boolean bError = true;\n while(bError){\n if (scanner.hasNextInt())\n move = scanner.nextInt();\n else {\n System.out.println(\"Wrong input! Please re-enter a correct position(1-9).\");\n scanner.next();\n continue;\n }\n bError = false;\n }\n //To catch the exceptions that user's input is not in [0,9].\n while(!correctPos.contains(move)){\n System.out.println(\"Oops! Your input is not from 1-9, please enter the correct move.\");\n move =scanner.nextInt();\n }\n //To catch the exceptions that user may place a move that has been taken. \n while(Player0Pos.contains(move)||Player1Pos.contains(move)){\n System.out.println(\"Error! Your move has been taken, please enter a correct position.\");\n move =scanner.nextInt();\n }\n return move;\n \n }",
"private void inputValidation(String[] args) {\r\n\t\t// Must have two argument inputs - grammar and sample input\r\n\t\tif (args.length != 2) {\r\n\t\t\tSystem.out.println(\"Invalid parameters. Try:\\njava Main <path/to/grammar> <path/to/input>\");\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t}",
"boolean hasErrormessage();",
"public static int checkInt() {\n\n\t{\n\t\tint userInput;\n\t\tboolean validInt = false;\n\t\tuserInput = 0;\n\t\tdo\n\t\t{\n\t\t\t\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\t\n\t\t\t//checks if the next entered value is an integer\n\t\t\tif (sc.hasNextInt())\n\t\t\t{\n\t\t\t // do-while loop breaks here\n\t\t\t\tuserInput = sc.nextInt();\n\t\t\t\tvalidInt = true;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tUserInterface.displayError(\"Input is not an integer. Please enter again\");\n\t\t\t}\n\t\t}while(validInt == false);\n\t\treturn userInput;\n\t}\n\n}",
"private int getUserInput() {\n java.util.Scanner scanner = new java.util.Scanner(System.in);\n int input = scanner.nextInt();\n while(input < 1 || input > 3) {\n System.out.println(\"only enter 1 2 or 3.\");\n input = scanner.nextInt();\n }\n return input;\n }",
"@Test\n\t// exception for when user inputs negative number\n\tpublic void testHappy_throwsException_incorrectNumber() {\n\n\t\tAssertions.assertThrows(InputMismatchException.class, () -> {\n//\t ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n//\t System.setErr(new PrintStream(outputStream));\n\n\t\t\tByteArrayInputStream in = new ByteArrayInputStream(\"happy\\ntest\\n\".getBytes());\n\t\t\tSystem.setIn(in);\n\n\t\t\tMovie movie = new Movie();\n\t\t\tmovie.Play();\n\t\t});\n\t}",
"public static void validateInput(Scanner in) {\n\t\twhile (!in.hasNextInt()) {\n\t\t\tSystem.out.println(\"That's not an integer!\");\n\t\t\tin.next();\n\t\t\tSystem.out.print(\"Please try again: \");\n\t\t}\n\t}",
"boolean checkWin() {\n Iterator<Integer> seq = sequence.iterator();\n Iterator<Integer> in = input.iterator();\n\n while (seq.hasNext() && in.hasNext()) {\n seq.next();\n in.next();\n if (!seq.hasNext() && !in.hasNext()) {\n return true;\n }\n }\n return false;\n }",
"private boolean isInputValid() {\r\n String errorMessage = \"\";\r\n\r\n if (errorMessage.length() == 0) {\r\n return true;\r\n } else {\r\n// Show the error message.\r\n Dialogs.create()\r\n .title(\"Invalid Fields\")\r\n .masthead(\"Please correct invalid fields\")\r\n .message(errorMessage)\r\n .showError();\r\n return false;\r\n }\r\n }",
"private boolean validateUserInputs() {\n ArrayList<String> errors = new ArrayList();\n \n if (this.view.getContent().equals(\"\")) {\n errors.add(\"\\t - Enter a comment\");\n }\n \n if (errors.size() > 0) {\n String errorMsg = \"Unable to save new Asset.\\nDetails:\";\n for (String error : errors) {\n errorMsg += \"\\n\" + error;\n }\n JOptionPane.showMessageDialog(this.view, errorMsg, \"Unable to Save\", JOptionPane.INFORMATION_MESSAGE);\n return false;\n }\n return true;\n }",
"@Test(priority=5)\n\tpublic void validatePleaseEnterTheValueErrorMsg1()\n\t{\n\t\tc.addButton.click();\n\t\tAssert.assertTrue(c.msg.getText().equalsIgnoreCase(\"Please Enter A Value.\"));\n\t}",
"private static boolean valid_input(String user_input) {\n \n boolean output = false;\n \n if(user_input.length() == 2){\n \n output = (user_input.substring(0,1).matches(\"[0-9]\") && user_input.substring(1,2).matches(\"[a-zA-Z]\"));\n } else if (user_input.length() == 3) {\n \n output = (user_input.substring(0,2).matches(\"[1-2][0-9]\") && user_input.substring(2,3).matches(\"[a-zA-Z]\"));\n \n if(Integer.parseInt(user_input.substring(0,2))>TicTacToe.game.gridSize){\n output = false;\n }\n }\n \n return output;\n }",
"public void validateOperation(int operation) {\n\t\tif (operation < 1 || operation > 4) {\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"Please enter a valid operation between 1 and 4\");\n\t\t}\n\t}",
"public static boolean checkInputAlert(String saInput, int ilLength) throws Exception {\r\n\t\tif ( (saInput != null) && (saInput.length() > ilLength)) {\r\n\t\t\tthrow new Exception(\"The parameter's size is more than allowed length for \" + saInput);\r\n\t\t}\r\n\r\n\t\treturn checkInputAlert(saInput);\r\n\t}",
"private void validate() throws BaseException\n {\n boolean okay = true;\n\n //TODO: check the bases in seq for validity\n // If the type is RNA, the base T is not allowed\n // If the type is DNA, the base U is not allowed\n // If a disallowed type is present, set okay to false.\n \n if (!okay)\n {\n throw new BaseException();\n }\n }",
"private void correctError()\r\n\t{\r\n\t\t\r\n\t}",
"public String checkEmpty(String msg) {\n while (true) {\n String input = scanner.nextLine();\n // If input is empty and then print out error\n if (input.isEmpty()) {\n System.out.println(\"ERROR: \" + msg + \" can't be empty!\");\n System.out.print(\"Enter \" + msg + \" again: \");\n } else {\n // therwise return input\n return input;\n }\n }\n }",
"private void checkValidDFA() throws IllegalArgumentException {\n for (State s : states) {\n Set<Character> transLabels = new HashSet<>();\n for (Transition t : getTransitionsFromState(s)) {\n if (!transLabels.add(t.getLabel())) {\n throw new IllegalArgumentException(\"State \" + s + \" has more than one transition for label \" + t.getLabel());\n }\n }\n if (!transLabels.containsAll(alphabet)) {\n Set<Character> missingSet = new HashSet<>(alphabet);\n missingSet.removeAll(transLabels);\n throw new IllegalArgumentException(\"State \" + s + \" is missing a transition for label(s): \" + missingSet);\n }\n }\n }",
"private void errorCheck(String nonterminal, int number) {\r\n if (nonterminal == null || !isNonTerminal(nonterminal) || number < 0) {\r\n throw new IllegalArgumentException();\r\n }\r\n }",
"public boolean hasError();",
"public boolean possibleNextInput() {\n return _index < _input.length();\n }",
"boolean hasErrors();",
"public boolean checkInteger(String input, int gridSize)\n {\n Scanner console = new Scanner(System.in);\n boolean error = true;\n boolean value = true;\n int result = 0;\n while(error)\n {\n if(checkInput(input) == true)\n {\n result = Integer.parseInt(input);\n if(result >= 0 && result < gridSize)\n {\n error = false;\n }\n else\n {\n System.out.println(\"Please enter a value between 0 and \"+(gridSize-1));\n value = false;\n error = false;\n }\n }\n else\n {\n System.out.println(\"Wrong Input, please enter correct input\");\n value = false;\n error = false;\n }\n }\n return value;\n }",
"public static int validaEntradaOrdem() {\r\n\t\tint entrada = 0;\r\n\t\tboolean erro = false;\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\terro = false;\r\n\t\t\t\tentrada = Leitura.lerInt();\r\n\t\t\t\tif (entrada > 2 || entrada < 0) {\r\n\t\t\t\t\tVisao.erroOrdemNum();\r\n\t\t\t\t\terro = true;\r\n\t\t\t\t}\r\n\t\t\t} catch (InputMismatchException excecao) {\r\n\t\t\t\tVisao.erroOrdemNum();\r\n\t\t\t\terro = true;\r\n\t\t\t}\r\n\r\n\t\t} while (erro);\r\n\t\treturn entrada;\r\n\t}",
"@Test(priority=6)\n\tpublic void validatePleaseEnterTheValueErrorMsg2()\n\t{\n\t\tc.enterNiftyPriceField.sendKeys(\"gvd&$vdh\");\n\t\tc.addButton.click();\n\t\tAssert.assertTrue(c.msg.getText().equalsIgnoreCase(\"Please Enter A Value.\"));\n\t}",
"public int pedirNIF(){\n int NIF = 0;\n boolean validado = false;\n do{\n System.out.println(\"Introduce la NIF:\");\n try {\n NIF = Integer.parseInt(lector.nextLine());\n validado = true;\n\n if(NIF <= 0){\n validado = false;\n System.out.println(\"El NIF no puede ser un numero negativo\");\n }\n }catch (NumberFormatException nfe){\n System.out.println(\"Por favor, introduce un numero.\");\n }\n\n }while(!validado);\n return NIF;\n }"
] |
[
"0.6573091",
"0.65607804",
"0.65353096",
"0.6464509",
"0.64599633",
"0.64378136",
"0.64210343",
"0.6417111",
"0.63786185",
"0.63760674",
"0.63726425",
"0.6364851",
"0.635425",
"0.62803155",
"0.62313783",
"0.6184292",
"0.61790967",
"0.6120591",
"0.6100106",
"0.607691",
"0.60557157",
"0.60100293",
"0.59993684",
"0.5990981",
"0.5941489",
"0.5933668",
"0.5909065",
"0.5903507",
"0.590216",
"0.5900513",
"0.5893051",
"0.58688647",
"0.58577573",
"0.58551264",
"0.5853562",
"0.58384407",
"0.58358777",
"0.5821293",
"0.58212566",
"0.5813326",
"0.57817286",
"0.57814646",
"0.577437",
"0.57684654",
"0.5755936",
"0.5748317",
"0.5740621",
"0.57389706",
"0.571912",
"0.5711852",
"0.5709961",
"0.57087165",
"0.5706175",
"0.57059747",
"0.57031137",
"0.56989694",
"0.5697366",
"0.56890094",
"0.5688371",
"0.56794715",
"0.5674",
"0.5672372",
"0.5668556",
"0.56633985",
"0.5662397",
"0.5650073",
"0.5648985",
"0.5636233",
"0.5636233",
"0.5636233",
"0.563117",
"0.56311363",
"0.56254333",
"0.5610069",
"0.5596829",
"0.55936056",
"0.55823714",
"0.5576022",
"0.557326",
"0.55724627",
"0.55645186",
"0.5560114",
"0.5557595",
"0.55571485",
"0.55551106",
"0.55541915",
"0.55534655",
"0.5544694",
"0.55363244",
"0.5531295",
"0.55294704",
"0.5527499",
"0.5527496",
"0.5525609",
"0.5525241",
"0.55231404",
"0.5518455",
"0.55170625",
"0.5511919",
"0.5508954"
] |
0.73409426
|
0
|
Check if the user has won
|
boolean checkWin() {
Iterator<Integer> seq = sequence.iterator();
Iterator<Integer> in = input.iterator();
while (seq.hasNext() && in.hasNext()) {
seq.next();
in.next();
if (!seq.hasNext() && !in.hasNext()) {
return true;
}
}
return false;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public boolean checkForWin(){\n\t\t\n\t\tPlayer p = Game.getCurrPlayer();\n\t\t// if player made it to win area, player won\n\t\tif(p.won()){\n\t\t\tGame.gameWon = true;\n\t\t\tthis.network.sendWin();\n\t\t\treturn true;\n\t\t}\n\t\t// if player is the last player on the board, player won\n\t\tif(numPlayers == 1 && !p.hasBeenKicked()){\n\t\t\tGame.gameWon = true;\n\t\t\tthis.network.sendWin();\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public boolean won()\n {\n if (currentScore >= PigGame.GOAL)\n {\n return true;\n }\n \n else\n {\n return false;\n }\n }",
"public boolean hasWon(){\n boolean winStatus = false;\n if(balance >= 3000){\n winStatus = true;\n }\n return winStatus;\n }",
"@Override\n\tpublic boolean playerWon() {\n\t\treturn lastPlayerWin;\n\t}",
"private void checkWin() {\n // Check if a dialog is already displayed\n if (!this.gameOverDisplayed) {\n // Check left paddle\n if (Objects.equals(this.scoreL.currentScore, this.winCount) && (this.scoreL.currentScore != 0)) {\n if (twoUser) {\n gameOver(GeneralFunctions.TWO_1_WIN);\n } else {\n gameOver(GeneralFunctions.ONE_LOSE);\n }\n // Right paddle\n } else if (Objects.equals(this.scoreR.currentScore, this.winCount) && (this.scoreR.currentScore != 0)) {\n if (twoUser) {\n gameOver(GeneralFunctions.TWO_2_WIN);\n } else {\n gameOver(GeneralFunctions.ONE_WIN);\n }\n }\n }\n }",
"public boolean oWins() {\n\t\tif (checkWinner(LETTER_O) == 1)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public void checkWin(){\n boolean result = false;\n if(game.getTurn() > 3){\n Player currentPlayer = game.getPlayerTurn();\n int playernumber = currentPlayer.getPlayericon();\n result = game.winChecker(game.getBored(),playernumber);\n if(result == true) {\n setWinMsgBox(currentPlayer.getPlayerName() + \" Is victorious :)\",\"WIN\");\n }else if(game.getTurn() == 8 && result == false){\n setWinMsgBox(\"Too bad it is a draw, No one out smarted the other -_-\",\"DRAW\");\n }else{}\n }else{\n result = false;\n }\n }",
"public static void checkWinCondition() {\n\t\twin = false;\n\t\tif (curPlayer == 1 && arrContains(2, 4))\n\t\t\twin = true;\n\t\telse if (curPlayer == 2 && arrContains(1, 3))\n\t\t\twin = true;\n\t\tif (curPlayer == 2 && !gameLogic.Logic.arrContains(2, 4))\n\t\t\tP2P.gameLost = true;\n\t\telse if (gameLogic.Logic.curPlayer == 1 && !gameLogic.Logic.arrContains(1, 3))\n\t\t\tP2P.gameLost = true;\n\t\tif (P2P.gameLost == true) {\n\t\t\tif (gameLogic.Logic.curPlayer == 1)\n\t\t\t\tEndScreen.infoWindow.setText(\"<html><center><b><font size=25 color=black> Black player won! </font></b></center></html>\");\n\t\t\telse\n\t\t\t\tEndScreen.infoWindow.setText(\"<html><center><b><font size=25 color=black> Red player won! </font></b></center></html>\");\n\t\t}\n\t\telse\n\t\t\twin = false;\n\t}",
"private boolean checkGameStatus() {\n int res = model.getWinner();\n if (res == Model.DRAW) {\n draw();\n return false;\n } else if (res == Model.WHITE) {\n whiteScore++;\n view.getPrompt().setText(whiteName + \" win!\");\n prepareRestart();\n return false;\n } else if (res == Model.BLACK) {\n blackScore++;\n view.getPrompt().setText(blackName + \" win!\");\n prepareRestart();\n return false;\n }\n return true;\n }",
"public boolean gameWon(){\n\t\treturn Game.gameWon;\n\t}",
"public boolean playerWins(){\n return playerFoundTreasure(curPlayerRow, curPlayerCol);\n }",
"public boolean isWon() {\n return getWinningScenario() != null;\n }",
"public boolean gameOver() {\n return winner() != null;\n }",
"public boolean hasWon() {\n return this.isWinner;\n }",
"@Override\n public boolean gameOver() {\n return player1Wins() || player2Wins();\n }",
"private boolean winGame() {\n if (model.isCompleted()) {\n win.message(\"Winner\");\n return true;\n }\n return false;\n }",
"public void winGame() {\n this.isWinner = true;\n }",
"void checkWinner() {\n\t}",
"public final boolean checkForWin() {\r\n boolean result = false;\r\n String player = \"\";\r\n \r\n for (Rail rail : rails) {\r\n if (rail.isWinner()) {\r\n result = true;\r\n for(Tile tile : rail.getTiles()) {\r\n tile.setBackground(Color.GREEN);\r\n player = tile.getText();\r\n }\r\n if (player.equals(\"X\")) {\r\n winningPlayer = \"X\";\r\n this.xWins++;\r\n } else if (player.equals(\"0\")) {\r\n winningPlayer = \"0\";\r\n this.oWins++;\r\n }\r\n break;\r\n }\r\n }\r\n \r\n return result;\r\n }",
"public boolean hasWon() {\n return isGoal(curBoard);\n }",
"public boolean isWon() {\r\n\t\tif (winner(CROSS) || winner(NOUGHT))\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}",
"public boolean amIWinning(){\n if (playerScore > oppoScore) {\n return true;\n } else {\n return false;\n }\n }",
"public void win()\r\n\t{\r\n\t\tmWon = true;\r\n\t}",
"public boolean topPlayerWon() {\n return winner == 2;\n }",
"public boolean meWin(){\n return whitePieces.size() > blackPieces.size() && isWhitePlayer;\n }",
"public static boolean isGameWon() {\r\n\t\tboolean gameWon = false;\r\n\t\t\r\n\t\t//Game won for three handed game.\r\n\t\tif (Main.isThreeHanded){\r\n\t\t\tif (Utils.stringToInt(Main.player1Score) >= Main.winScoreNumb ||\r\n\t\t\t\t\tUtils.stringToInt(Main.player2Score) >= Main.winScoreNumb ||\r\n\t\t\t\t\tUtils.stringToInt(Main.player3Score) >= Main.winScoreNumb) {\r\n\t\t\t\tgameWon = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Game won for four handed single player game.\r\n\t\tif (Main.isFourHandedSingle){\r\n\t\t\tif (Utils.stringToInt(Main.player1Score) >= Main.winScoreNumb ||\r\n\t\t\t\t\tUtils.stringToInt(Main.player2Score) >= Main.winScoreNumb ||\r\n\t\t\t\t\tUtils.stringToInt(Main.player3Score) >= Main.winScoreNumb ||\r\n\t\t\t\t\tUtils.stringToInt(Main.player4Score) >= Main.winScoreNumb) {\r\n\t\t\t\tgameWon = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Game won for four handed team game.\r\n\t\tif (Main.isFourHandedTeams){\r\n\t\t\tif (Utils.stringToInt(Main.team1Score) >= Main.winScoreNumb ||\r\n\t\t\t\t\tUtils.stringToInt(Main.team2Score) >= Main.winScoreNumb) {\r\n\t\t\t\tgameWon = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Set Main variable.\r\n\t\tMain.isGameWon = gameWon;\r\n\t\t\r\n\t\treturn gameWon;\r\n\t}",
"public boolean isWinner(String username) {\n Player p = getPlayer(username);\n // Winner!\n return p != null && p.getScore() >= MyConstants.POINTS_TO_WIN;\n }",
"public boolean checkWin()\n {\n boolean won = false;\n\n // Checks for the wining condition, if true end game. Else keep running.\n if((getPerson(PLAYER).getInventory().getItems().contains(winItem) && getPerson(PLAYER).getLocation().getName().equals(STARTROOM))||(moves > MOVELIMIT)){\n won = true;\n\n // Checks if the player won, then print a player winning statement.\n if (moves > MOVELIMIT){\n System.out.println(\"Princess Peach: \"+ getPerson(PLAYER).getName() + \", you have run out of time, Rover has ran away.\");\n }\n else{\n System.out.println(\"Princess Peach:\"+ getPerson(PLAYER).getName() + \", You've found the \" + winItem.getName() + \"!\");\n printEndingStory();\n }\n\n } \n return won;\n }",
"public boolean xWins() {\n\t\tif (checkWinner(LETTER_X) == 1)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public boolean gameOver() {\r\n return didPlayerLose() || didPlayerWin();\r\n }",
"public static void checkResult() {\n\t\tint sum = PlayerBean.PLAYERONE - PlayerBean.PLAYERTWO;\n\n\t\tif (sum == 1 || sum == -2) {\n\t\t\tScoreBean.addWin();\n\t\t\tresult = \"player one wins\";\n\t\t} else {\n\t\t\tScoreBean.addLoss();\n\t\t\tresult = \"player two wins\";\n\t\t}\n\t}",
"public void checkWin() {\n if (rockList.isEmpty() && trackerRockList.isEmpty() && bigRockList.isEmpty() && bossRockList.isEmpty()) {\n if (ship.lives < 5) {\n ship.lives++;\n }\n Level++;\n LevelIntermission = true;\n LevelIntermissionCount = 0;\n }\n }",
"public boolean isGameOver() {\n return (hasHeWon(computer) || hasHeWon(user) || getAvailableStates().isEmpty());\n }",
"public boolean hasWon() {\n\t\tfor (int i = 0; i < wordToGuess.length(); i++) {\n\t\t\tchar letter = wordToGuess.charAt(i);\n\t\t\tif (!guessesMade.contains(letter)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"private boolean playerWin(Board board)\n {\n return check(board, PLAYER);\n }",
"protected boolean checkForWin() {\r\n \t\r\n if (squaresRevealed == this.width * this.height - this.mines) {\r\n finishFlags();\r\n finish(GameStateModel.WON);\r\n return true;\r\n } \t\r\n \t\r\n return false;\r\n \t\r\n }",
"@Override\n public void checkWonLost(Entity entity) {\n if (entity instanceof Player) {\n\n if (overallCoinsInGame <= 0) {\n world.won();\n }\n }\n }",
"private boolean isOver() {\n for (Player player : players) {\n if (player.getHand().length == 0) {\n System.out.println(\"Player '\" + player.getName() + \"' won!\");\n winner = player.getID();\n return true;\n }\n }\n\n return false;\n }",
"public synchronized boolean HaveWon() {\n if (maxScore <= score) {\n return true;\n }\n return false;\n }",
"boolean isGameOver();",
"boolean isGameOver();",
"@Test\r\n\tpublic final void testIsWon() {\r\n\t\tassertTrue(gameStatistics.isWon());\r\n\t\tassertFalse(gameStatisticsLoss.isWon());\r\n\t}",
"public boolean gameWon(){\n return false;\n }",
"boolean hasWin();",
"public static boolean hasWonTheGame(Player player) {\r\n FloorTile pos = null;\r\n for (int i = 0; i < board.length; i++) {\r\n for (int j = 0; j < board[i].length; j++) {\r\n if (player.getPosition() == board[i][j]) {\r\n pos = board[i][j];\r\n }\r\n }\r\n }\r\n if (goalTile == pos) {\r\n for (int i = 0; i < numOfPlayers; i++) {\r\n players[i].getPlayerProfile().incGamesPlayed();\r\n if (player == players[i]) {\r\n players[i].getPlayerProfile().incWins();\r\n } else {\r\n players[i].getPlayerProfile().incLosses();\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n return false;\r\n }",
"public boolean CheckWin(){\n\t return false;\n\t }",
"private boolean checkIfGameIsWon() {\n\t\t//loop through rows\n\t\tfor (int i = 0; i < NUMBER_OF_ROWS; i++) {\n\t\t\t//gameIsWon = this.quartoBoard.checkRow(i);\n\t\t\tif (this.quartoBoard.checkRow(i)) {\n\t\t\t\tSystem.out.println(\"Win via row: \" + (i) + \" (zero-indexed)\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//loop through columns\n\t\tfor (int i = 0; i < NUMBER_OF_COLUMNS; i++) {\n\t\t\t//gameIsWon = this.quartoBoard.checkColumn(i);\n\t\t\tif (this.quartoBoard.checkColumn(i)) {\n\t\t\t\tSystem.out.println(\"Win via column: \" + (i) + \" (zero-indexed)\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//check Diagonals\n\t\tif (this.quartoBoard.checkDiagonals()) {\n\t\t\tSystem.out.println(\"Win via diagonal\");\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public boolean hasAnyoneLost()\n {\n gameOver = false;\n if(dw.isEmpty() || de.isEmpty())\n gameOver = true;\n \n return gameOver;\n }",
"public boolean gameOver()\n {\n return checkmate()||draw()!=NOT_DRAW;\n }",
"public void gameWon()\n {\n ScoreBoard endGame = new ScoreBoard(\"You Win!\", scoreCounter.getValue());\n addObject(endGame, getWidth()/2, getHeight()/2);\n }",
"public boolean isGameOver() {\n if (!isFirstTurn) {\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS||state.score().totalPoints(TeamId.TEAM_2)>=Jass.WINNING_POINTS) {\n return true;\n }\n else {\n return false;\n }\n } \n else {return false;}\n }",
"public void gameOverCheck() {\n //users\n if (tankTroubleMap.getUsers().size() != 0) {\n tankTroubleMap.setWinnerGroup(tankTroubleMap.getUsers().get(0).getGroupNumber());\n for (int i = 1; i < tankTroubleMap.getUsers().size(); i++) {\n if (tankTroubleMap.getUsers().get(i).getGroupNumber() != tankTroubleMap.getWinnerGroup())\n return;\n }\n }\n //bots\n int firstBot = 0;\n if (tankTroubleMap.getBots().size() != 0) {\n if (tankTroubleMap.getWinnerGroup() == -1) {\n firstBot = 1;\n tankTroubleMap.setWinnerGroup(tankTroubleMap.getBots().get(0).getGroupNumber());\n }\n for (int i = firstBot; i < tankTroubleMap.getBots().size(); i++) {\n if (tankTroubleMap.getBots().get(i).getGroupNumber() != tankTroubleMap.getWinnerGroup())\n return;\n }\n }\n tankTroubleMap.setGameOver(true);\n }",
"private boolean checkIfGameIsWon() {\n\n //loop through rows\n for(int i = 0; i < NUMBER_OF_ROWS; i++) {\n //gameIsWon = this.quartoBoard.checkRow(i);\n if (this.quartoBoard.checkRow(i)) {\n System.out.println(\"Win via row: \" + (i) + \" (zero-indexed)\");\n return true;\n }\n\n }\n //loop through columns\n for(int i = 0; i < NUMBER_OF_COLUMNS; i++) {\n //gameIsWon = this.quartoBoard.checkColumn(i);\n if (this.quartoBoard.checkColumn(i)) {\n System.out.println(\"Win via column: \" + (i) + \" (zero-indexed)\");\n return true;\n }\n\n }\n\n //check Diagonals\n if (this.quartoBoard.checkDiagonals()) {\n System.out.println(\"Win via diagonal\");\n return true;\n }\n\n return false;\n }",
"public boolean isGameOver();",
"public boolean isGameOver();",
"public void win() {\n JOptionPane.showConfirmDialog(null, \"You won! You got out with \" + this.player.getGold() + \" gold!\", \"VICTORY!\", JOptionPane.OK_OPTION);\n this.saveScore();\n this.updateScores();\n this.showTitleScreen();\n }",
"public boolean hasGameEnded() {\n return winner != 0;\n }",
"public boolean isHasWinner() {\n return hasWinner;\n }",
"@Override\n public boolean gameOver() {\n //true if the board full or a winner has been found\n return getWinner() != EMPTY || isBoardFull();\n }",
"private boolean checkGameOver() {\n\t\tboolean singlePlayerWon = otherPlayer.getLife() == 0;\n\t\tboolean otherPlayerWon = singlePlayer.getLife() == 0;\n\n\t\tif (singlePlayerWon || otherPlayerWon) {\n\t\t\tthis.singlePlayer.createEndButton(singlePlayerWon);\n\t\t\tthis.singlePlayer.onGameOver();\n\t\t\tthis.otherPlayer.onGameOver();\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"private boolean gameOver()\n {\n \t//lose case\n \tif (guess_number == 0)\n \t{\n \t\twin = false;\n \t\treturn true;\n \t}\n \t//win case\n \tif (mask.compareTo(word) == 0)\n \t{\n \t\twin = true;\n \t\treturn true;\n \t}\n \t\n \treturn false;\n }",
"static boolean canWin() throws GameActionException {\n\t\tfloat difference = 1000 - rc.getTeamVictoryPoints();\n\t\tif ((rc.getTeamBullets() / 10) >= difference) {\n\t\t\trc.donate(rc.getTeamBullets());\n\t\t\treturn true;\n\t\t} else\n\t\t\treturn false;\n\t}",
"protected boolean checkWin(int pno) {\n\t\tint[] pos = playerPosition.get(pno);\n\t\tif (collectedGold.get(pno) >= map.getWin() && \n\t\t\t\tmap.lookAtTile(pos[0], pos[1]) == 'E') {\n\t\t\tremovePlayer(pno);\n\t\t\tSystem.out.println(\"Client \" + pno + \" has escaped!\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"int getWins() {return _wins;}",
"private void checkPlayerCondition()\n\t{\n\t\tif (playerExists() && PlayerAccess.getPlayer().isInExit())\n\t\t{\n\t\t\twon = true;\n\t\t}\n\t\tif (playerIsDead())\n\t\t{\n\t\t\tMapInstance.getInstance().levelRestart();\n\t\t}\n\t\tif (playerHasLost())\n\t\t{\n\t\t\tlost = true;\n\t\t}\n\t\tif (runOutOfTime())\n\t\t{\n\t\t\tPlayerAccess.getPlayer().die();\n\t\t}\n\t}",
"public boolean gameWon() {\n\t\tfor (int i = 0; i < gameBoard.length; i++) {\n\t\t for (int j = 0; j < gameBoard.length; j++) {\n\t\t \tif (gameBoard[i][j] == 'M' || gameBoard[i][j] == 'I') {\n\t\t \t\treturn false;\n\t\t \t}\n\t\t }\n\t\t}\n\t\treturn true;\n\t}",
"private static void winner()\n {\n if ((board[1] == userLetter && board[2] == userLetter && board[3] == userLetter) ||\n (board[4] == userLetter && board[5] == userLetter && board[6] == userLetter) ||\n (board[7] == userLetter && board[8] == userLetter && board[9] == userLetter) ||\n (board[1] == userLetter && board[5] == userLetter && board[9] == userLetter) ||\n (board[3] == userLetter && board[5] == userLetter && board[7] == userLetter))\n {\n showBoard();\n System.out.println(\"Player win the game\");\n System.exit(0);\n }\n }",
"boolean isWinner(GameState state, String username) throws GameStateException;",
"public static void checkWinner() {\n\t\tcontinueGame = false;\n\t\tfor (int k = 0; k < secretWordLength; k++) {\n\t\t\tif (!unseenBoard.get(k).equals(\"*\")) {\n\t\t\t\tcontinueGame = true;\n\t\t\t}\n\t\t}\n\t}",
"void win() {\n if (_game.isWon()) {\n showMessage(\"Congratulations you win!!\", \"WIN\", \"plain\");\n }\n }",
"public void checkGameStatus() {\n everyTenthGoalCongrats();\n randomPopUpBecauseICan();\n }",
"public Boolean getGameWon(){\n\t\treturn m_gameWon;\n\t\t\n\t}",
"private boolean checkGreedyWinRate() {\r\n return myTotal.get(0) > enTotal.get(0)+2 && (myself.health > 50 || myself.health > opponent.health);\r\n }",
"public void setWins() {\r\n this.wins++;\r\n }",
"public char isWon() {\n for (int y = 0; y < spaces.length; y++) {\n for (int x = 0; x < spaces[0].length; x++) {\n wonBoards[y][x] = spaces[y][x].isWon().getWinner();\n }\n }\n return isWonButForChars();\n }",
"private void checkForGameOver() {\n\t\t// if 11 rounds are over, calculate winner\n\t\tif (round == 12) {\n\t\t\tif (player1.getPoints() > player2.getPoints()) {\n\t\t\t\ttextAreaInstructions.setText(\"Game Over!! Player 1 wins!!\");\n\t\t\t} else {\n\t\t\t\ttextAreaInstructions.setText(\"Game Over!! Player 2 Wins!!\");\n\t\t\t}\n\t\t\tround = 1;\n\t\t\ttextFieldRound.setText(\"1\");\n\t\t\ttextFieldPlayerOneScore.setText(\"0\");\n\t\t\ttextFieldPlayerTwoScore.setText(\"0\");\n\t\t\tplayer1.setPoints(0);\n\t\t\tplayer2.setPoints(0);\n\t\t}\n\t}",
"public boolean gameOver() \n {\n \treturn status() != GAME_NOT_OVER;\n }",
"public boolean isWinnerMe() {\n if (gameStatus == null || userId == null) return false;\n return userId.equals(gameStatus.getWinner())\n || (getMyPlayerNumber() == 1 && getPlayerTwoPoints() == 0)\n || (getMyPlayerNumber() == 2 && getPlayerOnePoints() == 0)\n || getMyPlayerNumber() == 1 && getPlayerOnePoints() > getPlayerTwoPoints()\n || getMyPlayerNumber() == 2 && getPlayerOnePoints() < getPlayerTwoPoints();\n }",
"protected boolean isGameOver(){\n return (getShipsSunk()==10);\n }",
"private boolean isOver() {\r\n return players.size() == 1;\r\n }",
"public boolean didWin(){\n\t\tswitch(winCondition){\n\t\tcase \"catchEmAll\":\n\t\t\treturn caughtEmAll();\n\t\tdefault:\n\t\t\treturn caughtTwenty();\n\t\t}\n\t}",
"public void winGame() {\r\n if (data.gameState == 3) \r\n data.winner = 1;\r\n else if (data.gameState == 4) \r\n data.winner = 2;\r\n data.victoryFlag = true;\r\n data.gameState = 5;\r\n }",
"public boolean isGameOver(){\n return checkKingReachedEnd() || checkNoDragonsLeft() || checkIfKingSurrounded();\n }",
"public boolean checkWin() throws Exception {\r\n\t\treturn getOcean().checkWin();\r\n\t}",
"boolean GameOver() {\n\t\treturn player.isDead();\n\t}",
"public boolean isWinner() {\n\t\treturn winner;\n\t}",
"public boolean winner(){ \r\n\t\tif (rowWin() || colWin() || diagWin()){ \r\n\t\t\tchangeTurn(); \r\n\t\t\tSystem.out.println(\"Winner: \" + playerToString(currentTurn) + \"!\"); \r\n\t\t\treturn true; \r\n\t\t}\r\n\t\telse if (tie()){\r\n\t\t\tSystem.out.println(\"There is a tie.\");\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse{ \r\n\t\t\tSystem.out.println(\"No winner yet.\\n\"); \r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t}",
"public static void decidedWinner(){\n if(playerOneWon == true ){\n//\n// win.Fill(\"Player One Has Won !\");\n// new WinnerWindow().setVisible(true);\n }\n else if (playerTwoWon == true){\n// win.Fill(\"Player Two Has Won !\");\n// new WinnerWindow().setVisible(true);\n }\n else\n {\n// win.Fill(\"Match Has been Tied !\");\n// new WinnerWindow().setVisible(true);\n }\n }",
"public void checkIfWinOrDraw() {\r\n\t\tif (theModel.getIsDraw() == true) {\r\n\t\t\tDrawNum++;\r\n\t\t\tactivePlayer = winningPlayer;\r\n\t\t\t// cards go to communalPile\r\n\r\n\t\t} else {\r\n\t\t\ttheModel.winningCard(winningPlayer);\r\n\t\t\ttheModel.transferWinnerCards(winningPlayer);\r\n\t\t}\r\n\r\n\t}",
"@Override\n public boolean isWin() {\n for (Observer winner : winners) {\n if (winner.getName().equals(chosenHorse.getName())) {\n return true;\n }\n }\n return false;\n }",
"@Override\n\tpublic boolean checkWinner( int player) {\n\t\t\n\t\treturn didWin(player, -1, 0) ||\n\t\t\t\tdidWin(player, 0, -1) ||\n didWin(player, -1, -1) ||\n didWin(player, 1, -1);\n\t}",
"public boolean gameOver(){\r\n if(isGame) return (currentPlayer.getChecks() == 0 || nextPlayer.getChecks() == 0 || currentPlayer.getQueens() == 4 || nextPlayer.getQueens() == 4 || (currentPlayer.cantMove() && nextPlayer.cantMove()));\r\n return getNumChecks(WHITE) == 0 || getNumChecks(BLACK) == 0 || getNumQueens(WHITE) == 4 || getNumQueens(BLACK) == 4;\r\n }",
"public void setWon(){\n won = true;\n }",
"public boolean userStillInGame() {\n return playersInGame.contains(humanPlayer);\n }",
"public static void playerWonInc(){\r\n\t\t_playerWon++;\r\n\t}",
"public boolean gameOver(){\n\t\treturn this.lives < 1;\n\t}",
"public boolean playerWonGame(Player player) {\n if (playerWonGameWithDiagonalLine(player) || playerWonGameWithHorizontalLine(player)\n || playerWonGameWithVerticalLine(player)) {\n return true; \n }\n return false; \n \n }",
"public void win() {\n if (turn == 1) {\n p1.incrementLegs();\n if (p1.getLegs() == 5) {\n p1.incrementSets();\n p1.setLegs(0);\n p2.setSets(0);\n\n }\n if (p1LastScore > p1.getHighout()) {\n p1.setHighout(p1LastScore);\n\n }\n\n if (p1.getHighout() > OVERALL_HIGH_OUT) {\n OVERALL_HIGH_OUT = p1.getHighout();\n }\n } else if (turn == 2) {\n p2.incrementLegs();\n if (p2.getLegs() == 5) {\n p2.incrementSets();\n p2.setLegs(0);\n p1.setSets(0);\n\n }\n if (p2LastScore > p2.getHighout()) {\n p2.setHighout(p2LastScore);\n }\n\n if (p2.getHighout() > OVERALL_HIGH_OUT) {\n OVERALL_HIGH_OUT = p2.getHighout();\n }\n\n\n\n }\n changeFirstTurn();\n win = true;\n\n\n\n }",
"public boolean hasWon(int numberOfPlayers, Player player, Game game) {\n\t\tboolean hasPlayerWon = winningConditionChecker.apply(numberOfPlayers,\n\t\t\t\tplayer, game);\n\t\tif (hasPlayerWon) {\n\t\t\tSystem.out.println(player.getName() + \" has won the game with \" +\n\t\t\t\t\tname());\n\t\t}\n\t\treturn hasPlayerWon;\n\t}",
"boolean isPlayerTurn();",
"public boolean isGameOver ()\n\t{\n\t\t return lives <= 0;\n\t}"
] |
[
"0.7633371",
"0.7393082",
"0.7382032",
"0.73322445",
"0.7302629",
"0.7278821",
"0.7257874",
"0.72492397",
"0.72468704",
"0.7211396",
"0.7200699",
"0.7192122",
"0.7156309",
"0.71546125",
"0.71515465",
"0.71510994",
"0.7148361",
"0.71411896",
"0.7132758",
"0.70943534",
"0.70910764",
"0.70796937",
"0.7043424",
"0.7027207",
"0.7026019",
"0.6999684",
"0.69988537",
"0.6991023",
"0.69747585",
"0.69563466",
"0.69546044",
"0.6951169",
"0.6937692",
"0.69242626",
"0.69170034",
"0.69019616",
"0.6865213",
"0.68596405",
"0.685957",
"0.68539387",
"0.68539387",
"0.6832472",
"0.68301266",
"0.67904055",
"0.6779527",
"0.6768179",
"0.6763063",
"0.67543405",
"0.6747247",
"0.67430496",
"0.67290723",
"0.67015165",
"0.66656214",
"0.66529185",
"0.66529185",
"0.6644821",
"0.66434056",
"0.6635169",
"0.66247153",
"0.66242266",
"0.6617686",
"0.66162807",
"0.6606666",
"0.6604953",
"0.660063",
"0.6598943",
"0.6590687",
"0.65788275",
"0.6570397",
"0.65591836",
"0.65491116",
"0.6548559",
"0.65414006",
"0.65405554",
"0.6539192",
"0.65381604",
"0.6532263",
"0.6527879",
"0.65274256",
"0.65230185",
"0.65156823",
"0.6513245",
"0.6512176",
"0.6505252",
"0.6491186",
"0.64908767",
"0.6487854",
"0.64836836",
"0.64827347",
"0.64801025",
"0.6478149",
"0.6477869",
"0.64698327",
"0.64635503",
"0.64633304",
"0.64560264",
"0.64336205",
"0.64287454",
"0.64286596",
"0.6425513",
"0.6420384"
] |
0.0
|
-1
|
Method to update the user info.
|
ManageUserResponse updateUser(UserUpdateRequest user, Long userId);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void updateUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk updateUser\");\r\n\t}",
"public void updateUserDetails() {\n\t\tSystem.out.println(\"Calling updateUserDetails() Method To Update User Record\");\n\t\tuserDAO.updateUser(user);\n\t}",
"@Override\n\tpublic void updateUser(UserInfo ui) {\n\n\t}",
"private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }",
"public void updateUser(User user) {\n\t\t\r\n\t}",
"private void updateUserLogin() {\n\t\tSessionManager sessionManager = new SessionManager(\n\t\t\t\tMyApps.getAppContext());\n\n\t\tRequestParams params = new RequestParams();\n\t\tparams.add(\"user_id\", sessionManager.getUserDetail().getUserID());\n\n\t\tLog.d(\"EL\", \"userID: \" + sessionManager.getUserDetail().getUserID());\n\n\t\tKraveRestClient.post(WebServiceConstants.AV_UPDATE_USER_PROFILE_DATA_1,\n\t\t\t\tparams, new JsonHttpResponseHandler() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tJSONObject response) {\n\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tLog.d(\"EL\", \"response: \" + response.toString(2));\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\n\t\t\t\t\t\tsuper.onFailure(statusCode, headers, throwable,\n\t\t\t\t\t\t\t\terrorResponse);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}",
"@Override\n\tpublic void updateUser(User pUser) {\n\t\t\n\t}",
"String updateUserInfo(String usernameToUpdate, UserInfo userInfo);",
"private static void updateUser() {\n\t currentUser = Structure.User(currentUser);\n\t CRUDUsers.compareWithRemote(currentUser).subscribe(new SingleSubscriber<User>() {\n\t\t @Override\n\t\t public void onSuccess(User value) {\n\t\t\t\tConnection.logIn(value);\n\t\t }\n\t\t\n\t\t @Override\n\t\t public void onError(Throwable error) {\n\t\t\t logOff();\n\t\t\t App.showMessage(error.getMessage());\n\t\t }\n\t });\n }",
"@Override\n\tpublic void updateUser(user theUser) {\n\t}",
"public String update() {\r\n\t\tuserService.update(userEdit);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"update\";\r\n\t}",
"private void updateUserDetails() {\n \tUser user=CurrentSession.getCurrentUser();\n \tjLabel1.setText(\"Name:\");\n jLabel2.setText(user.getFirstName()+\" \"+user.getLastName());\n jLabel3.setText(\"Card Number:\");\n jLabel4.setText(user.getCardNumber());\n jLabel5.setText(\"Daily Calorie Intake\");\n FoodPreference fp=new FoodPreference(user.getCardNumber());\n jLabel6.setText(\"\"+fp.getUserCalories());\n jLabel7.setText(\"Monthly Expenses\");\n jLabel8.setText(\"\"+user.getExpenses());\n\n\t\t\n\t}",
"@Override\n\tpublic void updateUserProfileInfo(String name) throws Exception {\n\n\t}",
"public User update(User updatedInfo);",
"private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }",
"public void update(User user);",
"private void updateUI() {\n user = mAuth.getCurrentUser();\n if (user != null) {\n user.reload().addOnCompleteListener(userReloadListener);\n }\n }",
"public void updateUser(Person user) {\n\t\t\n\t}",
"@Override\n\tpublic int updateUserInfo(UserManageEntity info) {\n\t\treturn userManageDao.updateUserInfo(info);\n\t}",
"void update(User user);",
"void update(User user);",
"@Override\n\tpublic void updateUser(User user)\n\t{\n\n\t}",
"private void updateProfile() {\n usuario.setEmail(usuario.getEmail());\n usuario.setNome(etName.getText().toString());\n usuario.setApelido(etUsername.getText().toString());\n usuario.setPais(etCountry.getText().toString());\n usuario.setEstado(etState.getText().toString());\n usuario.setCidade(etCity.getText().toString());\n\n showLoadingProgressDialog();\n\n AsyncEditProfile sinc = new AsyncEditProfile(this);\n sinc.execute(usuario);\n }",
"public void update() throws Exception {\n\t HaUserDao.getInstance().updateUser(this);\n\t}",
"public static void update_TbUser() {\n builder = new Uri.Builder();\n builder.appendQueryParameter(\"username\", Server.owner.get_username());\n builder.appendQueryParameter(\"email\", Server.owner.get_Email());\n builder.appendQueryParameter(\"birthday\", Server.owner.get_Birthday().toString());\n builder.appendQueryParameter(\"gender\", Server.owner.get_gender() ? \"1\" : \"0\");\n builder.appendQueryParameter(\"phone\", Server.owner.get_Phone());\n builder.appendQueryParameter(\"image_source\", Server.owner.get_imageSource());\n builder.appendQueryParameter(\"conversations\", Server.owner.get_AllConversation());\n\n String url = Constant.M_HOST + Constant.M_UPDATE_USER_WITHOUT_PASS;\n String a = uService.execute(builder, url);\n }",
"private void setUser(){\n try{\n if (!mainUser.getUsername().equals(\"\")){\n this.userName.setText(mainUser.getUsername());\n }else{\n this.userName.setText(\"User\");\n }\n\n\n File file = new File(mainUser.getProfileImage());\n if (!file.exists()){\n file = new File(getClass().getResource(\"../images/eren.png\").getFile());\n }\n Image img = new Image(file.toURI().toString());\n profileImage.setImage(img);\n\n setEventLabel(\"Welcome \"+mainUser.getFname()+\" \"+mainUser.getLname()+\".\");\n }catch (NullPointerException e){\n AlertBox.alert(AlertType.ERROR, stackRoot, anchorRoot, \"There was an error while updating UserInfo\");\n }\n }",
"void update(String userName, String password, String userFullname,\r\n\t\tString userSex, int userTel, String role);",
"void updateUserById(String username, User userData);",
"public void update(User obj) {\n\t\t\n\t}",
"public String updateUser(){\n\t\tusersservice.update(usersId, username, password, department, role, post, positionId);\n\t\treturn \"Success\";\n\t}",
"@Override\n\t\tpublic void onUserProfileUpdate(User arg0) {\n\t\t\t\n\t\t}",
"public void updateUser(int uid, String name, String phone, String email, String password, int money, int credit);",
"public void updateCurrentTrempitUser() {\n\n // create the trempituser object\n TrempitUser currentUser = new TrempitUser();\n currentUser.setFullName(Profile.getCurrentProfile().getName());\n currentUser.setId(Long.valueOf(Profile.getCurrentProfile().getId()));\n\n // update the global variable so all activities can access the user\n globalState.setCurrentUser(currentUser);\n\n // insert the user to the server\n insertTrempitUserToServer(currentUser);\n\n Toast.makeText(this, \"logged in to facebook:\" + globalState.getCurrentUser().getFullName(), Toast.LENGTH_LONG).show();\n }",
"@Override\n\tpublic void update(User objetc) {\n\t\tuserDao.update(objetc);\n\t}",
"public void update(User u) {\n\r\n\t}",
"@Override\n\tpublic void onUserProfileUpdate(User updatedUser) {\n\n\t}",
"public void updateUser(User updatedUser){\n ProfileSharedPreferencesRepository.getInstance(application).updateUser(updatedUser);\n }",
"void updateUser(@Nonnull User user);",
"public void update() {\n user.setNewPassword(newPassword.getText().toString());\n user.setPassword(password.getText().toString());\n reauthenticate();\n }",
"public void updateUser(Bundle userData) {\n Bitmap profilePic = userData.getParcelable(\"userProfilePic\"); //reads in bitmap image\n setProfileImageData(profilePic); //converts bitmap image to byte[]\n firstName = userData.getString(\"userFirstName\");\n lastName = userData.getString(\"userLastName\");\n fullName = firstName + \" \" + lastName;\n sex = userData.getString(\"userSex\");\n activityLevel = userData.getString(\"userActivityLevel\");\n city = userData.getString(\"userCity\");\n country = userData.getString(\"userCountry\");\n\n userID = userData.getInt(\"userID\");\n age = userData.getInt(\"userAge\");\n heightInches = userData.getInt(\"userHeight\");\n weightLBS = userData.getInt(\"userWeight\");\n\n BMR = userData.getDouble(\"userBMR\");\n BMI = userData.getDouble(\"userBMI\");\n weightChangeGoal = userData.getDouble(\"userGoal\");\n recommendedDailyCalorieIntake = userData.getDouble(\"userCalories\");\n }",
"@Override\n\tpublic void updateUserProfile(User user) throws Exception {\n\n\t}",
"private void saveUserInformation() {\n name.setText(nameInput.getText().toString());\n\n if (name.getText().toString().isEmpty()) {\n name.setError(\"Name required\");\n name.requestFocus();\n return;\n }\n\n FirebaseUser user = mAuth.getCurrentUser();\n if (user != null) {\n if (isBname()) {\n updateName(user);\n }\n if (isBtitle()) {\n updateTitle(user);\n }\n }\n }",
"private void updateUserAccount() {\n final UserDetails details = new UserDetails(HomeActivity.this);\n //Get Stored User Account\n final Account user_account = details.getUserAccount();\n //Read Updates from Firebase\n final Database database = new Database(HomeActivity.this);\n DatabaseReference user_ref = database.getUserReference().child(user_account.getUser().getUser_id());\n user_ref.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n //Read Account Balance\n String account_balance = dataSnapshot.child(Database.USER_ACC_BALANCE).getValue().toString();\n //Read Expire date\n String expire_date = dataSnapshot.child(Database.USER_ACC_SUB_EXP_DATE).getValue().toString();\n //Read Bundle Type\n String bundle_type = dataSnapshot.child(Database.USER_BUNDLE_TYPE).getValue().toString();\n //Attach new Values to the Account Object\n user_account.setBalance(Double.parseDouble(account_balance));\n //Attach Expire date\n user_account.setExpire_date(expire_date);\n //Attach Bundle Type\n user_account.setBundle_type(bundle_type);\n //Update Local User Account\n details.updateUserAccount(user_account);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n //No Implementation\n }\n });\n }",
"private void updateUserDetailsFromView() {\n\t\tcurrentDetails.setFirstName(detailDisplay.getFirstName().getValue());\n\t\tcurrentDetails.setLastName(detailDisplay.getLastName().getValue());\n\t\tcurrentDetails.setMiddleInitial(detailDisplay.getMiddleInitial().getValue());\n\t\tcurrentDetails.setTitle(detailDisplay.getTitle().getValue());\n\t\tcurrentDetails.setEmailAddress(detailDisplay.getEmailAddress().getValue());\n\t\tcurrentDetails.setPhoneNumber(detailDisplay.getPhoneNumber().getValue());\n\t\tcurrentDetails.setActive(detailDisplay.getIsActive().getValue());\n\t\t//currentDetails.setRootOid(detailDisplay.getRootOid().getValue());\n\t\tcurrentDetails.setRole(detailDisplay.getRole().getValue());\n\t\t\n\t\tcurrentDetails.setOid(detailDisplay.getOid().getValue());\n\t\tString orgId = detailDisplay.getOrganizationListBox().getValue();\n\t\tcurrentDetails.setOrganizationId(orgId);\n\t\tResult organization = detailDisplay.getOrganizationsMap().get(orgId);\n\t\tif (organization != null) {\n\t\t\tcurrentDetails.setOrganization(organization.getOrgName());\n\t\t} else {\n\t\t\tcurrentDetails.setOrganization(\"\");\n\t\t}\n\t}",
"public void updateUser(long userID) {\n \t}",
"@Override\n\tpublic void updateOne(User u) {\n\t\tdao.updateInfo(u);\n\t}",
"public void updateUser() {\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(db.DB.connectionString, db.DB.user, db.DB.password);\n Statement stmt = conn.createStatement();\n String query = \"update users set first_name='\" + firstName + \"', \";\n query += \"last_name='\" + lastName + \"', \";\n query += \"phone_number='\" + phoneNumber + \"', \";\n query += \"email='\" + email + \"', \";\n query += \"address='\" + address + \"', \";\n query += \"id_city='\" + idCity + \"' \";\n query += \"where id_user = \" + id;\n stmt.executeUpdate(query);\n\n User updatedUser = findUser(id);\n updatedUser.setFirstName(firstName);\n updatedUser.setLastName(lastName);\n updatedUser.setPhoneNumber(phoneNumber);\n updatedUser.setEmail(email);\n updatedUser.setIdCity(idCity);\n updatedUser.setAddress(address);\n\n } catch (SQLException ex) {\n Logger.getLogger(UserController.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n clear();\n try {\n conn.close();\n } catch (Exception e) {\n /* ignored */ }\n }\n }",
"public void setUserDetails(){\n name = firebaseUser.getDisplayName();\n username.setText(name);\n\n Glide.with(this).load(firebaseUser.getPhotoUrl()).into(profileIcon);\n }",
"@Override\n\tpublic int update(UserBaseInfo userBaseInfo) {\n\t\treturn userBaseInfoMapper.update(userBaseInfo);\n\t}",
"protected void refreshUserInfo(UserInfo userInfo) {}",
"@Override\n\tpublic void updateUser(SpaceUserVO spaceUserVO) throws Exception {\n\t\t\n\t}",
"@Override\n public void onUpdate(User user) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n final AlertDialog dialog = builder.create();\n LayoutInflater layoutInflater = LayoutInflater.from(getContext());\n final CustomDialogUpdateBinding binding = DataBindingUtil.inflate(layoutInflater,\n R.layout.custom_dialog_update, null, false);\n dialog.setView(binding.getRoot());\n binding.edtUsername.setText(user.getUsername());\n binding.edtPassword.setText(user.getPassword());\n binding.edtPhone.setText(user.getPhone());\n dialog.show();\n\n // get profile and update\n binding.imgUpdate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n String UserName = binding.edtUsername.getText().toString().trim();\n String PassWord = binding.edtPassword.getText().toString().trim();\n String Phone = binding.edtPhone.getText().toString().trim();\n user.setUsername(UserName);\n user.setPassword(PassWord);\n user.setPhone(Phone);\n viewModel.update(user);\n dialog.dismiss();\n }\n });\n }",
"@Override\n\tpublic void updateUser(User curpwd) {\n\t\tuserRepository.save(curpwd);\n\t}",
"public void updateUserCapabilities() {\n\n currentUser = loginService.getLoggedInUser();\n UserPropertiesDao userPropertiesDao = db.userProperties;\n UserProperties userProperties = userPropertiesDao.findByUserId(currentUser.getId());\n SharedPreferences preferences = Objects.requireNonNull(userCapabilitiesFragment.getPreferenceManager().getSharedPreferences());\n\n userProperties.setHasKids(preferences.getBoolean(\"pref_kids\", false));\n userProperties.setHasCatAllergies(preferences.getBoolean(\"pref_cat_allergy\", false));\n userProperties.setHasDogAllergies(preferences.getBoolean(\"pref_dog_allergy\", false));\n userProperties.setGreenAreas(preferences.getBoolean(\"pref_garden\", false));\n userProperties.setFreeTime(preferences.getBoolean(\"pref_exercise\", false));\n userPropertiesDao.update(userProperties);\n }",
"public void update() throws NotFoundException {\n\tUserDA.update(this);\n }",
"@Override\r\n\tpublic int updateUser(User user, String userName) {\n\t\treturn 0;\r\n\t}",
"private void updateUserInformation(final User user, Person person, TechGalleryUser tgUser) {\n String plusEmail = user.getEmail();\n String plusPhoto = person.getImage().getUrl();\n String plusName = person.getDisplayName();\n\n String currentEmail = tgUser.getEmail();\n String currentPhoto = tgUser.getPhoto();\n String currentName = tgUser.getName();\n\n if (currentEmail == null || !currentEmail.equals(plusEmail)) {\n tgUser.setEmail(plusEmail);\n }\n if (currentPhoto == null || !currentPhoto.equals(plusPhoto)) {\n tgUser.setPhoto(plusPhoto);\n }\n if (currentName == null || !currentName.equals(plusName)) {\n tgUser.setName(plusName);\n }\n if (tgUser.getGoogleId() == null) {\n tgUser.setGoogleId(user.getUserId());\n }\n }",
"public void updateUser(User oldUser, User newUser) ;",
"public void update(User user){\n this.enabled = user.isEnabled();\n this.firstName = user.getFirstName();\n this.lastName = user.getLastName();\n this.telephone = user.getTelephone();\n this.email = user.getEmail();\n this.gender = user.getGender();\n this.roleEnum = user.getRoleEnum();\n if(!this.password.equals(user.getPassword())){\n //If a password has been changed, update timestamp\n lastPasswordResetDate = new Timestamp((new Date()).getTime());\n }else{\n lastPasswordResetDate = user.getLastPasswordResetDate();\n }\n this.password = user.getPassword();\n this.address = user.getAddress();\n this.authorities = user.authorities;\n }",
"public void update(com.conurets.inventory.model.User model) throws InventoryException {\n }",
"void setUserInfo(UserInfo info);",
"private void callUpdateProfile() {\n String userStr = CustomSharedPreferences.getPreferences(Constants.PREF_USER_LOGGED_OBJECT, \"\");\n Gson gson = new Gson();\n User user = gson.fromJson(userStr, User.class);\n LogUtil.d(\"QuyNT3\", \"Stored profile:\" + userStr +\"|\" + (user != null));\n //mNameEdt.setText(user.getName());\n String id = user.getId();\n String oldPassword = mOldPassEdt.getText().toString();\n String newPassword = mNewPassEdt.getText().toString();\n String confirmPassword = mConfirmPassEdt.getText().toString();\n String fullName = mNameEdt.getText().toString();\n String profileImage = user.getProfile_image();\n UpdateUserProfileRequest request = new UpdateUserProfileRequest(id, fullName, profileImage,\n oldPassword, newPassword, confirmPassword);\n request.setListener(callBackEvent);\n new Thread(request).start();\n }",
"void setUserInfo(final UserInfo userInfo);",
"private void setUpdateUser(entity.User value) {\n __getInternalInterface().setFieldValue(UPDATEUSER_PROP.get(), value);\n }",
"private void updateUser() {\n if (\"\".equals(txtFirstname.getText()) || \"\".equals(txtLastname.getText()) || \"\".equals(txtEmail.getText())) {\n JOptionPane.showMessageDialog(null, \"Select a user to update\");\n } else {\n try {\n //Updates record of selected user\n System.out.println(User);\n String sql = \"UPDATE Accounts SET Firstname = '\" + txtFirstname.getText() + \"', Lastname = '\" + txtLastname.getText() + \"', Email = '\" + txtEmail.getText() + \"' WHERE Username = '\" + User + \"'\";\n\n ps = con.prepareStatement(sql);\n ps.executeUpdate();\n showUserData();\n JOptionPane.showMessageDialog(null, User + \" Your information has been updated\");\n\n } catch (SQLException ex) {\n System.out.println(\"Error: \" + ex);\n Logger.getLogger(myAccount.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }",
"void updateUserPassword(User user);",
"Integer updateUserInfo(UpdateEntry updateEntry);",
"public void changeUser() {\n refreshState();\n SystemUserDTO user = null;\n SystemUserDTO systemUser = null;\n systemUser = ctrl.getSystemUser(this.inputTextUser);\n if (systemUser == null) {\n user = new SystemUserDTO(this.inputTextUser, this.inputTextFName, this.inputTextLName, this.inputTextEMail);\n ctrl.addSystemUser(user);\n } else {\n user = new SystemUserDTO(this.inputTextUser, this.inputTextFName, this.inputTextLName, this.inputTextEMail);\n ctrl.updateSystemUser(user);\n }\n refreshState();\n this.currentUser = user;\n }",
"@RequestMapping(value = \"update_user_info.do\",method = RequestMethod.POST)\r\n @ResponseBody\r\n public ServerResponse<User> updateInfo(User pageUserInfo, HttpSession session){\r\n User currentUser = (User)session.getAttribute(Constant.CURRENT_USER);\r\n if(currentUser == null){\r\n return ServerResponse.createByErrorMsg(\"User has not logged in.\");\r\n }\r\n pageUserInfo.setId(currentUser.getId());\r\n pageUserInfo.setUsername(currentUser.getUsername());\r\n ServerResponse<User> response = iUserService.updateUserInfo(pageUserInfo);\r\n if(response.isSuccess()){\r\n //response.getData() is the updateUser which has only 5 updated fields and no username\r\n response.getData().setUsername(currentUser.getUsername());\r\n session.setAttribute(Constant.CURRENT_USER,response.getData());\r\n }\r\n return response;\r\n }",
"@Override\n\tpublic void onUserInfoUpdate(boolean isOk, AirContact user)\n\t{\n\t\tif (isOk)\n\t\t{\n\t\t\ttvUserName.setText(user.getDisplayName());\n\t\t\tUtil.Toast(this, getString(R.string.talk_user_info_update_name_ok));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tUtil.Toast(this, getString(R.string.talk_user_info_update_name_fail));\n\t\t}\n\t}",
"public User updateUser(User user);",
"private void updateData() {\n user.setNewPassword(newPassword.getText().toString());\n user.setPassword(password.getText().toString());\n\n FirebaseUser firebaseUser = mAuth.getCurrentUser();\n\n if (firebaseUser == null) {\n return;\n }\n\n firebaseUser\n .updatePassword(user.getNewPassword())\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if (task.isSuccessful()) {\n newPassword.setText(Util.EMPTY);\n password.setText(Util.EMPTY);\n\n Toast.makeText(\n getContext(), getResources().getString(R.string.password_updated),\n Toast.LENGTH_SHORT\n ).show();\n }\n }\n })\n .addOnFailureListener((Activity) getContext(), new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n FirebaseCrash.report(e);\n Toast.makeText(\n getContext(),\n e.getMessage(),\n Toast.LENGTH_SHORT\n ).show();\n }\n });\n }",
"void editUser(String uid, User newUser);",
"public void populateUserInformation()\n {\n ViewInformationUser viewInformationUser = new ViewFXInformationUser();\n\n viewInformationUser.buildViewProfileInformation(clientToRegisteredClient((Client) user), nameLabel, surnameLabel, phoneLabel, emailLabel, addressVbox);\n }",
"private void updateUserInfo(String txtName) {\n\n FirebaseDatabase.getInstance().getReference().child(\"Users\").\n child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n dataSnapshot.getRef().child(\"name\").setValue(txtName);\n\n }\n @Override\n public void onCancelled(DatabaseError databaseError) {\n }\n });\n\n readInfoUser();\n\n }",
"private void updateUserInfo(final String username, String em, String status) {\r\n FirebaseDatabase.getInstance().getReference().child(\"Users\").addListenerForSingleValueEvent(new ValueEventListener() {\r\n @Override\r\n public void onDataChange(DataSnapshot dataSnapshot) {\r\n Log.d(TAG, \"onDataChange: \" + dataSnapshot);\r\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\r\n }\r\n\r\n\r\n }\r\n\r\n @Override\r\n public void onCancelled(DatabaseError databaseError) {\r\n\r\n }\r\n });\r\n progressDialog.setMessage(\"Please wait while your your profile gets updated\");\r\n progressDialog.show();\r\n final Map<String, Object> userMap = new HashMap<>();\r\n userMap.put(\"name\", Handy.getTrimmedName(username));\r\n userMap.put(\"email\", em);\r\n userMap.put(\"status\", status);\r\n Map map = new HashMap();\r\n Double v = points + 0.25;\r\n map.put(\"points\", v);\r\n map.put(\"fitnessPoint\", Handy.fitnessPoint(v));\r\n userPoints.setValue(map);\r\n databaseReference.updateChildren(userMap).addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n if (task.isSuccessful()) {\r\n userSearchNode.updateChildren(userMap);\r\n UserProfileChangeRequest profileUpdates = new UserProfileChangeRequest.Builder()\r\n .setDisplayName(Handy.getTrimmedName(username))\r\n .build();\r\n user.updateProfile(profileUpdates).addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n progressDialog.dismiss();\r\n Log.d(TAG, \"onComplete: Updated success\");\r\n Toast.makeText(EditProfileActivity.this, \"Information has been updated successfully\", Toast.LENGTH_SHORT).show();\r\n finish();\r\n }\r\n });\r\n } else {\r\n progressDialog.hide();\r\n Toast.makeText(EditProfileActivity.this, \"Sorry could not update your profile Info\", Toast.LENGTH_SHORT).show();\r\n }\r\n }\r\n });\r\n\r\n }",
"@Override\r\n\tpublic int updateUser(Users user) {\n\t\treturn 0;\r\n\t}",
"ResponseMessage updateUser(final User user);",
"@Override\n\tpublic String updateUser(String user) {\nreturn null;\n\t}",
"private void updateStudentProfileInfo() {\n\t\t\n\t\tstudent.setLastName(sLastNameTF.getText());\n\t\tstudent.setFirstName(sFirstNameTF.getText());\n\t\tstudent.setSchoolName(sSchoolNameTF.getText());\n\t\t\n\t\t//Update Student profile information in database\n\t\t\n\t}",
"@Override\r\n\tpublic boolean updateUser() {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic int update(User user) {\n\t\treturn 0;\r\n\t}",
"@Override\n public boolean updateUserPersonalInfo(String text) {\n User tmp = this.getLoggedUser();\n tmp.setPersonal_details(text);\n if(this.setLoggedUser(tmp)) System.out.print(\"done\");\n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"UPDATE user_personal_information set information = + '\" + text + \"' where user_id = \" + this.getLoggedUser().getId();\n \n int result = stmt.executeUpdate(sql);\n \n stmt.close();\n conn.close();\n if(result == 1) return true;\n else return false;\n } \n catch (SQLException ex) { ex.printStackTrace(); return false;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return false;} \n \n }",
"public boolean update(User u);",
"public void modifyUser() {\n\t\tUser selectedUser = null;\r\n\t\tselectedUser = tableUser.getSelectionModel().getSelectedItem();\r\n\t\tUser user = dataManager.findCurrentUser();\r\n\t\tif (user != null) {\r\n\t\t\tif (selectedUser != null) {\r\n\t\t\t\tframeManager.modifyUser(user, selectedUser);\r\n\t\t\t\tpesquisar();\r\n\t\t\t} else {\r\n\t\t\t\tAlertUtils.alertErroSelecionar(\"Para modificar um usuario é necessário selecionar um!\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tAlertUtils.alertSemPrivelegio();\r\n\t\t}\r\n\t}",
"private void updateHocSinh() {\n\t\thocsinh user = new hocsinh();\n\n\t\tuser.setMa(txtMa.getText());\n\t\tuser.setTen(txtTen.getText());\n\t\tuser.setTuoi(txtTuoi.getText());\n\t\tuser.setSdt(txtSdt.getText());\n\t\tuser.setDiaChi(txtDiaChi.getText());\n\t\tuser.setEmail(txtEmail.getText());\n\t\t\n\n\t\thocsinhdao.updateUser(user);\n\t}",
"@Override\n\tpublic ResponseEntity<String> updateUser() {\n\t\treturn null;\n\t}",
"UpdateUserResult updateUser(UpdateUserRequest updateUserRequest);",
"@Override\n\tpublic void updateUser(User user) {\n\t userMapper.updateUser(user);\n\t}",
"public void editProfile() {\n\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(account.getUser().toString());\n\n\t\taccount = userBo.handleProfileOption(account);\n\n\t\tif (userDAO.editProfile(account))\n\t\t\tSystem.out.println(\"User edited!\");\n\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}",
"public void setUser(UserData data) {\n user = data;\n }",
"@Override\n public void onResume() {\n super.onResume();\n setUserInfo(((MyApplication) getApplication()).getUser());\n\n UpdateUserInfo.getInstance().addOnUpdateUserInfo(\"my\", this);\n }",
"private void updateUI(FirebaseUser user)\n {\n if (user == null) return;\n // Toast.makeText(this, user.getDisplayName(), Toast.LENGTH_LONG).show();\n\n\n // Toast.makeText(this, user.getEmail(), Toast.LENGTH_LONG).show();\n // Toast.makeText(this, user.getUid(), Toast.LENGTH_LONG).show();\n // Toast.makeText(this, user.getPhotoUrl().toString(), Toast.LENGTH_LONG).show();\n SaveUserInformation(user);\n }",
"private void updateUser(String Address, String Phone_number,String needy) {\n if (!TextUtils.isEmpty(Address))\n mFirebaseDatabase.child(userId).child(\"name\").setValue(Address);\n\n if (!TextUtils.isEmpty(Phone_number))\n mFirebaseDatabase.child(userId).child(\"email\").setValue(Phone_number);\n\n if (!TextUtils.isEmpty(needy))\n mFirebaseDatabase.child(userId).child(\"email\").setValue(needy);\n }",
"@Override\n\tpublic void setUser(String sessionId, UserInfo userInfo) throws HFModuleException {\n\t\tLog.d(\"HFModuleManager\", \"setUser\");\n//\t\tif (!isCloudChannelLive()) {\n//\t\t\tthrow new HFModuleException(HFModuleException.ERR_USER_OFFLINE,\n//\t\t\t\t\t\"User is not online\");\n//\t\t}\n\t\t\n\t\tUserPayload payload = new UserPayload();\n\t\t\n//\t\tUserInfo payload = new UserInfo();\n\t\tpayload.setCellPhone(userInfo.getCellPhone());\n\t\tpayload.setDisplayName(userInfo.getDisplayName());\n\t\tpayload.setEmail(userInfo.getEmail());\n\t\tpayload.setIdNumber(userInfo.getIdNumber());\n\t\t\n\t\t//user name cannot modified in cloud service\n//\t\tpayload.setUserName(userInfo.getUserName());\n\t\t\n\t\tUserSetRequest request = new UserSetRequest();\n\t\trequest.setSessionId(sessionId);\n\t\trequest.setPayload(payload);\n\t\ttry {\n\t\t\tcloudSecurityManager.setUser(request);\n\t\t\t\n\t\t\tUserInfo savedUserInfo = userInfoDao.getUserInfoByToken(sessionId);\n\t\t\tif (savedUserInfo != null) {\n\t\t\t\tsavedUserInfo.setCellPhone(userInfo.getCellPhone());\n\t\t\t\tsavedUserInfo.setDisplayName(userInfo.getDisplayName());\n\t\t\t\tsavedUserInfo.setEmail(userInfo.getEmail());\n\t\t\t\tsavedUserInfo.setIdNumber(userInfo.getIdNumber());\n\t\t\t\tuserInfoDao.saveUserInfo(savedUserInfo);\n\t\t\t}\n\t\t} catch (CloudException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new HFModuleException(e.getErrorCode(), e.getMessage());\n\t\t}\n\t\t\n//\t\tJSONObject req = new JSONObject();\n//\t\tJSONObject pl = new JSONObject();\n//\t\ttry {\n//\n//\t\t\tif (info.getDisplayName() != null)\n//\t\t\t\tpl.put(\"displayName\", info.getDisplayName());\n//\t\t\tif (info.getUserName() != null)\n//\t\t\t\tpl.put(\"userName\", info.getUserName());\n//\t\t\tif (info.getPassword() != null)\n//\t\t\t\tpl.put(\"password\", info.getPassword());\n//\t\t\tif (info.getCellPhone() != null)\n//\t\t\t\tpl.put(\"cellPhone\", info.getCellPhone());\n//\t\t\tif (info.getEmail() != null)\n//\t\t\t\tpl.put(\"email\", info.getEmail());\n//\t\t\tif (info.getIdNumber() != null)\n//\t\t\t\tpl.put(\"idNumber\", info.getIdNumber());\n//\n//\t\t\treq.put(\"CID\", 10221);\n//\t\t\treq.put(\"SID\", getsid());\n//\t\t\treq.put(\"PL\", pl);\n//\t\t\tString rsp = HttpProxy.reqByHttpPost(req.toString());\n//\n//\t\t\tJSONObject jo = new JSONObject(rsp);\n//\t\t\tif (jo.isNull(\"RC\")) {\n//\t\t\t\tthrow new HFModuleException(HFModuleException.ERR_SET_USER,\n//\t\t\t\t\t\t\"can not set user\");\n//\t\t\t}\n//\t\t\tif (jo.getInt(\"RC\") != 1) {\n//\t\t\t\tthrow new HFModuleException(HFModuleException.ERR_SET_USER,\n//\t\t\t\t\t\t\"can not set user\");\n//\t\t\t}\n//\n//\t\t} catch (JSONException e) {\n//\t\t\tthrow new HFModuleException(HFModuleException.ERR_SET_USER,\n//\t\t\t\t\t\"can not set user\");\n//\t\t}\n\t}",
"private void channelPrivilegedUserUpdate() {\n String userKey = builder.getPersonalUser().getUserKey();\n if (channel.getPrivilegedUsers().size() != 0) {\n ArrayList<String> members = new ArrayList<>();\n for (User user : channel.getPrivilegedUsers()) {\n members.add(user.getId());\n }\n String[] membersArray = members.toArray(new String[0]);\n // send update to server\n restClient.updateChannel(server.getId(), channel.getCategories().getId(), channel.getId(), userKey,\n channel.getName(), channel.isPrivilege(), membersArray, response -> {\n });\n } else {\n channel.setPrivilege(false);\n restClient.updateChannel(server.getId(), channel.getCategories().getId(), channel.getId(), userKey,\n channel.getName(), false, null, response -> {\n });\n }\n }",
"@Override\n public void onSuccess(Uri uri) {\n UserProfileChangeRequest profileUpdate = new UserProfileChangeRequest.Builder().setDisplayName(lname).setPhotoUri(uri).build();\n currentUser.updateProfile(profileUpdate).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n //user info updated succssfully\n saveInformation();\n showMessage(\"Register Complete\");\n updateUI();\n }\n }\n });\n }",
"public void launchUpdate() {\n\n\t\tif (checkRegister() == true && psw.getText() != newpsw.getText()) {\n\t\t\tDatabase.getInstance().updateUser(newpsw.getText(), username.getText());\n\t\t\tstatus.setText(\"Account updated\");\n\t\t} else {\n\t\t\tstatus.setText(\"Password already exist or this account doesn't exist\");\n\t\t}\n\n\t}",
"private void updateName(FirebaseUser user) {\n UserProfileChangeRequest profile = new UserProfileChangeRequest.Builder()\n .setDisplayName(name.getText().toString())\n .build();\n\n user.updateProfile(profile)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(Profile.this, \"Name Updated\", Toast.LENGTH_SHORT).show();\n }\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(Profile.this, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n });\n }",
"private void updateAllUsers() {\n for(IUser user : this.bot.getClient().getUsers()) {\n this.updateUserStatus(user);\n }\n saveJSON();\n }"
] |
[
"0.778285",
"0.77313215",
"0.76914567",
"0.75619096",
"0.7555209",
"0.75261307",
"0.7479354",
"0.7465086",
"0.74551916",
"0.7437823",
"0.74336255",
"0.7375387",
"0.73432183",
"0.73153156",
"0.7305853",
"0.72574306",
"0.7252388",
"0.7242462",
"0.7237151",
"0.7234857",
"0.7234857",
"0.723172",
"0.7188445",
"0.71824276",
"0.7176843",
"0.7167672",
"0.7150535",
"0.71367174",
"0.71322066",
"0.708674",
"0.7044443",
"0.70334107",
"0.7032798",
"0.69918865",
"0.69868684",
"0.6985056",
"0.6981876",
"0.69785374",
"0.69573075",
"0.6912822",
"0.69109195",
"0.68928975",
"0.6874787",
"0.6872064",
"0.68594927",
"0.68584716",
"0.68468654",
"0.6791704",
"0.67892927",
"0.6766685",
"0.67559695",
"0.67496073",
"0.67472315",
"0.67462105",
"0.6744626",
"0.67436486",
"0.67410153",
"0.6735102",
"0.67345923",
"0.6733748",
"0.6733034",
"0.67321557",
"0.67292845",
"0.67279035",
"0.67210865",
"0.67101663",
"0.66890895",
"0.6686532",
"0.66730666",
"0.6670348",
"0.6656921",
"0.66429514",
"0.66327035",
"0.66311985",
"0.66242635",
"0.6621578",
"0.66050917",
"0.66042286",
"0.6588818",
"0.65715",
"0.6560538",
"0.65569484",
"0.6551367",
"0.65350634",
"0.6511844",
"0.6490661",
"0.648202",
"0.6477977",
"0.6477431",
"0.64751375",
"0.64748687",
"0.6457204",
"0.64484555",
"0.64463276",
"0.64339435",
"0.643169",
"0.6431216",
"0.64269155",
"0.64261544",
"0.6425632"
] |
0.6449479
|
92
|
Compile the code using the Lava compiler, execute the code and return the output
|
public static String compileAndRun(String code) throws Exception {
return run(LavaCompiler.compile(code));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public T execute() {\n return GraalCompiler.compile(this);\n }",
"private static void compileAndRun(String fileName, String code) {\n\n if(verboseCompiling) println(\"Deleting old temp files...\", warning);\n new File(fileName + \".java\").delete();\n new File(fileName + \".class\").delete();\n\n if(verboseCompiling) println(\"Creating source file...\", progErr);\n file = new File(fileName + \".java\");\n\n if(verboseCompiling) println(\"Writing code to source file...\", progErr);\n try {\n new FileWriter(file).append(code).close();\n } catch (IOException i) {\n println(\"Had an IO Exception when trying to write the code. Stack trace:\", error);\n i.printStackTrace();\n return; //Exit on error\n }\n\n if(verboseCompiling) println(\"Compiling code...\", progErr);\n //This should only ever be called if the JDK isn't installed. How you'd get here, I don't know.\n if (compiler == null) {\n println(\"Fatal Error: JDK not installed. Go to java.sun.com and install.\", error);\n return;\n }\n\n //Tries to compile. Success code is 0, so if something goes wrong, report.\n int result = -1;\n if (compileOptions.trim().equals(\"\"))\n result = compiler.run(null, out, err, file.getAbsolutePath());\n else\n //result = compiler.run(null, out, err, compileOptions, file.getAbsolutePath());\n result = compiler.run(null, out, err, \"-cp\", \"/Users/student/Desktop/bluecove-2.1.0.jar\", file.getAbsolutePath());\n //ArrayList<String> files = new ArrayList<>();\n //files.add(fileName);\n //boolean result = compiler.getTask(null, null, new ErrorReporter(), null, files, null).call();\n if (result != 0) {\n displayLog();\n //println(\"end record\", error); //End recording and pull out the message\n\n //println(\"Error type: \" + result,error);\n println(\"Failed to compile.\", warning);\n return; //Return on error\n }\n\n if(verboseCompiling) println(\"Attempting to run code...\", progErr);\n try {\n //Makes sure the JVM resets if it's already running.\n if(JVMrunning) \n kill();\n\n //Clears terminal window on main method call.\n if(clearOnMethod)\n outputText.setText(\"\");\n\n //Some String constants for java path and OS-specific separators.\n String separator = System.getProperty(\"file.separator\");\n String path = System.getProperty(\"java.home\")\n + separator + \"bin\" + separator + \"java\";\n\n //Creates a new process that executes the source file.\n ProcessBuilder builder = null;\n if(runOptions.trim().equals(\"\")) \n builder = new ProcessBuilder(path, fileName);\n else \n builder = new ProcessBuilder(path, runOptions, fileName);\n\n //Everything should be good now. Everything past this is on you. Don't mess it up.\n println(\"Build succeeded on \" + java.util.Calendar.getInstance().getTime().toString(), progErr);\n println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\", progErr); \n\n //Tries to run compiled code.\n JVM = builder.start();\n JVMrunning = true;\n\n //Links runtime out/err to our terminal window. No support for input yet.\n Reader errorReader = new InputStreamReader(JVM.getErrorStream());\n Reader outReader = new InputStreamReader(JVM.getInputStream());\n //Writer inReader = new OutputStreamWriter(JVM.getOutputStream());\n\n redirectErr = redirectIOStream(errorReader, err);\n redirectOut = redirectIOStream(outReader, out);\n //redirectIn = redirectIOStream(null, inReader);\n } catch (IOException e) {\n //JVM = builder.start() can throw this.\n println(\"IOException when running the JVM.\", progErr);\n e.printStackTrace();\n displayLog();\n return;\n }\n }",
"public static void main(String[] args) {\n File file = new File(\"./src/testcode.c\");\n \n Compiler compiler = new Compiler(file);\n compiler.compile();\n }",
"public BdsVm compile() {\n\t\tif (bdsvm != null) throw new RuntimeException(\"Code already compiled!\");\n\n\t\t// Initialize\n\t\tbdsvm = new BdsVm();\n\t\tcode = new ArrayList<>();\n\t\tbdsvm.setDebug(debug);\n\t\tbdsvm.setVerbose(verbose);\n\t\tinit();\n\n\t\t// Read file and parse each line\n\t\tlineNum = 1;\n\t\tfor (String line : code().split(\"\\n\")) {\n\t\t\t// Remove comments and labels\n\t\t\tif (isCommentLine(line)) continue;\n\n\t\t\t// Parse label, if any.Keep the rest of the line\n\t\t\tline = label(line);\n\t\t\tif (line.isEmpty()) continue;\n\n\t\t\t// Decode instruction\n\t\t\tOpCode opcode = opcode(line);\n\t\t\tString param = null;\n\t\t\tif (opcode.hasParam()) param = param(line);\n\t\t\t// Add instruction\n\t\t\taddInstruction(opcode, param);\n\t\t\tlineNum++;\n\t\t}\n\n\t\tbdsvm.setCode(code);\n\t\tif (debug) System.err.println(\"# Assembly: Start\\n\" + bdsvm.toAsm() + \"\\n# Assembly: End\\n\");\n\t\treturn bdsvm;\n\t}",
"public abstract void compile();",
"private static int compile(String filename) throws Exception {\n\t\tInputStream inp = new BufferedInputStream(new FileInputStream(filename));\n\t\tParser parser = new Parser(inp);\n\t\tjava_cup.runtime.Symbol parseTree = null;\n\t\ttry {\n\t\t\tparseTree = parser.parse();\n\t\t} catch (Throwable e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new Error(e.toString());\n\t\t} finally {\n\t\t\tinp.close();\n\t\t}\n\t\t\n\t\tDecls tree = (Decls) parseTree.value;\n\t\t\n\t\tSemantic semant = new Semantic();\n\t\tsemant.checkProg(tree);\n\t\tif (semant.hasError()) {\n\t\t\tsemant.printErrors();\n\t\t\treturn 1;\n\t\t} else {\n\t\t\t//System.out.println(\"Semant: OK\");\n\t\t\tLabel.fcount = 0;\n\t\t\t\n\t\t\tLabel topLabel = new Label(\"main\");\n\t\t\tLevel topLevel = new Level();\n\t\t\tTranslate translate = new Translate();\n\t\t\ttranslate.transProg(tree, topLabel, topLevel);\n\t\t\tList<CompileUnit> units = translate.getUnits();\n\t\t\t\n\t\t\t//=============================== Optimize =================================\n\t\t\tAnalyzer analyzer = new Analyzer();\n\t\t\tLabelEliminator le = new LabelEliminator();\n\t\t\t\n\t\t\tfor (CompileUnit u : units) {\n\t\t\t\t//System.out.println(u.getQuads().get(0));\n\t\t\t\tu.replaceBranches(analyzer);\n\t\t\t\tu.findBasicBlocks(analyzer);\n\t\t\t\tu.findLiveness(analyzer);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfor (CompileUnit u: units) {\n\t\t\t\tList<Quad> qs = u.getQuads();\n\t\t\t\tfor (Quad q: qs) {\n\t\t\t\t\tif (q instanceof MoveL)\n\t\t\t\t\t\t((MoveL)q).src.used = true;\n\t\t\t\t}\n\t\t\t\tGotoCompression.process(u);\n\t\t\t}\n\t\t\t\n\t\t\tLocalCopyPropagation lcp = new LocalCopyPropagation();\n\t\t\tDeadCodeEliminator dce = new DeadCodeEliminator();\n\t\t\tAvailableExpressionAnalyzer aea = new AvailableExpressionAnalyzer();\n\t\t\tCommonExpressionEliminator cse = new CommonExpressionEliminator();\n\t\t\tfor (CompileUnit u : units) {\n\t\t\t\tList<Quad> oldQuads = new LinkedList<Quad>();\n\t\t\t\t//int cnt = 0;\n\t\t\t\tdo {\n\t\t\t\t\toldQuads.clear();\n\t\t\t\t\toldQuads.addAll(u.getQuads());\n\t\t\t\t\t\n\t\t\t\t\tdo {\n\t\t\t\t\t\tu.findBasicBlocks(analyzer);\n\t\t\t\t\t\taea.analyze(u.getBasicBlocks());\n\t\t\t\t\t\t//System.out.println(++cnt);\n\t\t\t\t\t}\n\t\t\t\t\twhile (cse.eliminate(u));\n\n\t\t\t\t\tfor (BasicBlock bb : u.getBasicBlocks()) {\n\t\t\t\t\t\tlcp.process(bb);\n\t\t\t\t\t}\n\n\t\t\t\t\tu.findLiveness(analyzer);\n\t\t\t\t\tdce.process(u);\n\t\t\t\t\tu.findBasicBlocks(analyzer);\n\t\t\t\t\tu.findLiveness(analyzer);\n\t\t\t\t\twhile (le.eliminate(u));\n\t\t\t\t}\n\t\t\t\twhile (!u.getQuads().equals(oldQuads));\n\t\t\t}\n\t\t\t\n\t\t\t//========================================================================\n\t\t\tCodegen codegen = new Codegen();\n\t\t\tcodegen.gen(new Assem(\".data\"));\n\t\t\tcodegen.gen(new Assem(\".align 2\"));\n\t\t\tcodegen.gen(new Assem(\".globl args\"));\n\t\t\tcodegen.gen(new Assem(\"!args:\\t.space %\", (Translate.maxArgc + 1) * 4));\n\t\t\tcodegen.gen(new Assem(\".align 2\"));\n\t\t\tfor (DataFrag df: translate.getDataFrags())\n\t\t\t\tif (df.label.used)\n\t\t\t\t\tcodegen.gen(df.gen());\n\t\t\t\n\t\t\tcodegen.gen(new Assem(\".text\"));\n\t\t\tcodegen.gen(new Assem(\".align 2\"));\n\t\t\tcodegen.gen(new Assem(\".globl main\"));\n\t\t\t\n\t\t\tfor (CompileUnit u: units)\n\t\t\t\tcodegen.gen(u, new LinearScan(u, analyzer));/**/\n\n\t\t\t//System.out.println((System.nanoTime() - start) / 1000000 + \" ms\");\n\t\t\t//PrintStream out = System.out;\n\t\t\tPrintStream out = new PrintStream(new BufferedOutputStream(new FileOutputStream(\"assem.s\")));\n\t\t\tout.println(\"########################################\");\n\t\t\tout.println(\"############### CODE GEN ###############\");\n\t\t\tout.println(\"########################################\");\n\t\t\tcodegen.flush(out);\n\t\t\tout.println(\"########################################\");\n\t\t\tout.println(\"############# RUNTIME CODE #############\");\n\t\t\tout.println(\"########################################\");\n\t\t\t//Scanner scanner = new Scanner(new FileInputStream(new File(\"runtime.s\")));\n\t\t\t//while (scanner.hasNextLine()) {\n\t\t\t//\tout.println(scanner.nextLine());\n\t\t\t//}\n\t\t\t//scanner.close();\n\t\t\tout.close();\n\t\t\treturn 0;\n\t\t}\n\t}",
"public PyCode compile(String script) {\n return null;\n }",
"public static void main(String[] args) {\n //Ersetzt jetzt mal unseren Parser, Stell Dir vor\n // das Ding liest das Beispiel da oben ^^.\n final StatementNode[] statementNodes = readStatements();\n \n //Zustände:\n // - FillSymbolTable (was für Symbole [variablen, ...] gibt es)\n // - TypInferenz (Was für Typen haben die Expressions und sind die eingaben semantisch korrekt)\n // - CodeGenerierung oder Ausführung (ersetzen wir mit \"schreibe die Werte aller Variablen nach Ende der Ausführung\")\n \n \n final SymbolTabelle symbolTabelle = new SymbolTabelle();\n //IDEE 2:\n //Ich gebe Statements und Expressions nur eine Methode mit Visitor als Callback\n final StatementVisitorSymbolTabelle statementVisitorSymbolTabelle = new StatementVisitorSymbolTabelle(symbolTabelle);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorSymbolTabelle);\n }\n \n final StatementVisitorTypInferenz statementVisitorTypInferenz = new StatementVisitorTypInferenz(symbolTabelle);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorTypInferenz);\n }\n \n PseudoLaufContext laufContext = new PseudoLaufContext();\n final StatementVisitorCodeGen statementVisitorCodeGen = new StatementVisitorCodeGen(laufContext);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorCodeGen);\n }\n \n laufContext.druckeVariablen();\n \n //Zusammenfassung:\n //Reduktion des Problems darauf, den Code nur noch von einem Abhängig zu machen\n //Jetzt nur noch abhängig vom Typ des Statements\n \n \n //Problem hierbei:\n //Ich muss selbst angeben, in welchem Zustand ich bin\n //Code-Duplizierung\n }",
"void compileToJava();",
"private List<String> runCode(JasminBytecode code) throws AssembleException {\n // Turn the Jasmin code into a (hopefully) working class file\n if (code == null) {\n throw new AssembleException(\"No valid Jasmin code to assemble\");\n }\n AssembledClass aClass = AssembledClass.assemble(code);\n // Run the class and return the output\n SandBox s = new SandBox();\n s.runClass(aClass);\n return s.getOutput();\n }",
"String compile() throws IOException {\n\t\tString line = \"\";\n\t\tString[] command = {\n\t\t\t\tjavacPath,\n\t\t\t\tsavedFilePath\n\t\t};\n\t\tProcessBuilder pb=new ProcessBuilder(command);\n\t\tpb.redirectErrorStream(true);\n\t\tProcess process=pb.start();\n\t\tBufferedReader inStreamReader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(process.getInputStream())); \n\n\t\tline = inStreamReader.readLine();\n\t\tif(line == null) {\n\t\t\tline = \"\";\n\t\t\tcompiled = true;\n\t\t}\n\t\treturn line;\n\t}",
"protected void compile() throws FileNotFoundException, DebuggerCompilationException{\n String[] compileArgs = new String[5];\n String cOutFile = Integer.toString(handle);//filename + Integer.toString(handle);\n String outArg = cOutFile;\n compileArgs[0] = ocamlCompileC;\n compileArgs[1] = \"-g\";\n compileArgs[2] = filename;\n compileArgs[3] = \"-o\";\n compileArgs[4] = cOutFile;\n outFile = cOutFile;\n\n /* Start the ocamlc compiler */\n Process compileProcess;\n try{\n compileProcess = runtime.exec(compileArgs);\n }catch(IOException e){\n System.out.println(\"HERE\");\n throw new DebuggerCompilationException();\n //}catch(FileNotFoundException f){\n // throw new FileNotFoundException();\n }\n OutputStreamWriter compileWriter = new OutputStreamWriter(compileProcess.getOutputStream());\n\n InputStream processInputStream = compileProcess.getInputStream();\n\n /* Create a DebugListener to read the output */\n DebugListener compileReader = new DebugListener(processInputStream, this.observers, handle);\n\n compileReader.start();\n \n try{\n Thread.sleep(2000);\n }catch(Exception e){\n\n }\n\n }",
"@Override\n\tpublic void compile(CodeBlock c, CompilerEnvironment environment) {\n\n\t}",
"protected void runLexer()\n\t{\n\t\tString args[] = {input.getAbsolutePath(), \"*.java\", output.getAbsolutePath(), \"0\", \"full\", \"-1\", \"1.0\", \"--in_place\", \"--metadata_light\"};\n\t\tExternalOperation.callScript(\"python2.7\", lexer, args);\n\t}",
"public IRubyObject runNormally(Node scriptNode) {\n Script script = null;\n boolean compile = getInstanceConfig().getCompileMode().shouldPrecompileCLI();\n if (compile || config.isShowBytecode()) {\n script = tryCompile(scriptNode, null, new JRubyClassLoader(getJRubyClassLoader()), config.isShowBytecode());\n }\n \n if (script != null) {\n if (config.isShowBytecode()) {\n return getNil();\n }\n \n return runScript(script);\n } else {\n failForcedCompile(scriptNode);\n \n return runInterpreter(scriptNode);\n }\n }",
"public static void generateCode()\n {\n \n }",
"public CompilationObject compile(String code,\n com.microsoft.z3.Context z3Context,\n BlockingQueue<Object> messageQueue, Supplier<Boolean> symb)\n throws CompilationException, InterruptedException, ExecutionException {\n //LEX ->PARSE->COMPILE\n List<Token> codeInput = lexer.tokenise(code);\n AbstractSyntaxTree ast = parser.parse(codeInput, z3Context);\n messageQueue.add(new LogMessage(Runtime.class.getPackage().getImplementationVersion()+ \" XXXXXXXXX \"));\n messageQueue.add(new LogMessage(\"Compile starting symbolic \"+symb.get()));\n System.out.println(Runtime.class.getPackage().getImplementationVersion());\n System.out.println(\"Compiler called parse that output \" + ast.myString());\n return compile(ast, code, z3Context, messageQueue,symb);\n }",
"public static void main(String[] args) throws Exception {\n \t\n \tbyte[] fileData = Files.readAllBytes(Paths.get(new File(System.getProperty(\"user.dir\")+\"/bin/main/re/bytecode/obfuscat/pass/vm/VMRefImpl.class\").toURI()));\n \tDSLParser p = new DSLParser();\n \tMap<String, Function> functions = p.processFile(fileData);\n \tFunction refF = MergedFunction.mergeFunctions(functions, \"process\"); // functions.get(\"process\");\n \t\n \t\n \t\n \tfileData = Files.readAllBytes(Paths.get(new File(System.getProperty(\"user.dir\")+\"/bin/test/re/bytecode/obfuscat/samples/Sample8.class\").toURI()));\n \tp = new DSLParser();\n functions = p.processFile(fileData);\n \n \tFunction f = MergedFunction.mergeFunctions(functions, \"entry\");\n \t\n\t\t//HashMap<String, Object> map = new HashMap<String, Object>();\n\t\t//Function f = Obfuscat.buildFunction(\"Test\", map);\n \t\n \t\n\t\t//HashMap<String, Object> map = new HashMap<String, Object>();\n\t\t//map.put(\"data\", new byte[] { 1, 2, 3, 4 });\n\t\t//Function f = Obfuscat.buildFunction(\"KeyBuilder\", map );\n\t\n \tf = Obfuscat.applyPass(f, \"Flatten\");\n\t\tf = Obfuscat.applyPass(f, \"OperationEncode\");\n\t\t\n\t\tint[] gen = new VMCodeGenerator(new Context(System.currentTimeMillis()), f).generate();\n\n\t\tbyte[] vmcode = new byte[gen.length];\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i < gen.length; i++) {\n\t\t\tsb.append(String.format(\"%02X\", gen[i] & 0xFF));\n\t\t\tvmcode[i] = (byte) gen[i];\n\t\t}\n\n\t\tSystem.out.println(sb.toString());\n\n\t\tSystem.out.println(\"=========================================\");\n\n\t\t\n\t\tSystem.out.println(f.getBlocks().get(0));\n\t\t\n\t\tEmulateFunction eFB = new EmulateFunction(f);\n\t\tbyte[] arr = new byte[] {0, 0, 0, 0};\n\t\tSystem.out.println(\"Emulate Original => \"+eFB.run(-1, arr));\n\t\tSystem.out.println(Arrays.toString(arr));\n\t\t\n\t\tarr = new byte[] {0, 0, 0, 0};\n\t\tSystem.out.println(\"Java Reference => \"+VMRefImpl.process(vmcode, f.getData() ,new Object[]{0, arr}));\n\t\tSystem.out.println(Arrays.toString(arr));\n\n\t\t\n\t\tEmulateFunction eFRef = new EmulateFunction(refF);\n\t\tarr = new byte[] {0, 0, 0, 0};\n\t\tSystem.out.println(\"Emulated Reference => \"+eFRef.run(-1, gen, f.getData(), new Object[] {0, arr}));\n\t\tSystem.out.println(Arrays.toString(arr));\n\t\t\n\t\tEmulateFunction eFPass = new EmulateFunction(Obfuscat.applyPass(f, \"Virtualize\"));\n\t\tarr = new byte[] {0, 0, 0, 0};\n\t\tSystem.out.println(\"Emulate Pass VM => \"+eFPass.run(-1, arr ));\n\t\tSystem.out.println(Arrays.toString(arr));\n\t\t\n\n }",
"private boolean doCompile(String sourceName, String destName,\n PrintStream out, PrintStream err)\n throws DecacFatalError, LocationException {\n AbstractProgram prog = doLexingAndParsing(sourceName, err);\n\n if (prog == null) {\n LOG.info(\"Parsing failed\");\n return true;\n }\n assert(prog.checkAllLocations());\n if (compilerOptions.getParseOnly()) {\n prog.decompile(System.out);\n return false;\n }\n\n\n prog.verifyProgram(this);\n assert(prog.checkAllDecorations());\n\n if (compilerOptions.getVerificationOnly()) {\n return false;\n }\n\n addComment(\"start main program\");\n prog.codeGenProgram(this);\n addComment(\"end main program\");\n LOG.debug(\"Generated assembly code:\" + nl + program.display());\n LOG.info(\"Output file assembly file is: \" + destName);\n\n FileOutputStream fstream = null;\n try {\n fstream = new FileOutputStream(destName);\n } catch (FileNotFoundException e) {\n throw new DecacFatalError(\"Failed to open output file: \" + e.getLocalizedMessage());\n }\n\n LOG.info(\"Writing assembler file ...\");\n\n program.display(new PrintStream(fstream));\n LOG.info(\"Compilation of \" + sourceName + \" successful.\");\n return false;\n }",
"public void compile(String[] args){\n CharStream stream;\n if(args.length == 1){\n try {\n stream = new ANTLRFileStream(args[0]);\n } catch (IOException e) {\n System.err.println(\"Ocorreu um problema ao tentar ler o ficheiro \\\"\" + args[0] + \"\\\".\");\n e.printStackTrace();\n return;\n }\n } else{\n try {\n stream = new ANTLRInputStream(System.in);\n } catch (IOException e) {\n System.err.println(\"Ocorreu um problema ao tentar ler do stdin.\");\n e.printStackTrace();\n return;\n }\n }\n\n System.out.println(stream.toString());\n\n LissLexer lexer = new LissLexer(stream);\n TokenStream token = new CommonTokenStream(lexer);\n LissParser parser = new LissParser(token);\n parser.liss(this.idt,this.errorTable,this.mips);\n }",
"protected void compile(String[] args) {\n String[] commandArray = null;\n File tmpFile = null;\n\n try {\n String myos = System.getProperty(\"os.name\");\n\n\n if (myos.toLowerCase().indexOf(\"windows\") >= 0 \n && args.length > 250) {\n PrintWriter out = null;\n try {\n tmpFile = new File(\"jikes\"+(new Random(System.currentTimeMillis())).nextLong());\n out = new PrintWriter(new FileWriter(tmpFile));\n for (int i = 0; i < args.length; i++) {\n out.println(args[i]);\n }\n out.flush();\n commandArray = new String[] { command, \n \"@\" + tmpFile.getAbsolutePath()};\n } catch (IOException e) {\n throw new BuildException(\"Error creating temporary file\", e);\n } finally {\n if (out != null) {\n try {out.close();} catch (Throwable t) {}\n }\n }\n } else {\n commandArray = new String[args.length+1];\n commandArray[0] = command;\n System.arraycopy(args,0,commandArray,1,args.length);\n }\n \n try {\n Execute exe = new Execute(jop);\n exe.setAntRun(project);\n exe.setWorkingDirectory(project.getBaseDir());\n exe.setCommandline(commandArray);\n exe.execute();\n } catch (IOException e) {\n throw new BuildException(\"Error running Jikes compiler\", e);\n }\n } finally {\n if (tmpFile != null) {\n tmpFile.delete();\n }\n }\n }",
"protected final void emitCode() {\n int bytecodeSize = request.graph.method() == null ? 0 : request.graph.getBytecodeSize();\n request.compilationResult.setHasUnsafeAccess(request.graph.hasUnsafeAccess());\n GraalCompiler.emitCode(request.backend, request.graph.getAssumptions(), request.graph.method(), request.graph.getMethods(), request.graph.getFields(), bytecodeSize, lirGenRes,\n request.compilationResult, request.installedCodeOwner, request.factory);\n }",
"CD withCode();",
"public abstract void recompileRun(int opcode);",
"private void compile(SSAProgram prog, String methodName, SSAStatement s) {\n // recommended for debuggability:\n sb.append(\" # \");\n if (s.getRegister() >= 0)\n sb.append(reg(s));\n sb.append(\": \");\n sb.append(s.toString());\n sb.append(\"\\n\");\n\n SSAStatement left, right;\n String special;\n StringBuilder built = new StringBuilder();\n\n left = s.getLeft();\n right = s.getRight();\n\n switch (s.getOp()) {\n // FILLIN (this is the actual code generator!)\n case Unify:\n case Alias:\n break; // Do nothing\n case Parameter:\n int paramPos = (Integer)s.getSpecial();\n if(paramPos > 3) {\n built.append(\" lw $\" + reg(s) + \", \" + (paramPos-3)*wordSize + \"($fp)\\n\"); \n }\n break; \n case Int:\n int intValue = (Integer)s.getSpecial();\n built.append(\" li $\" + reg(s) + \", \" + intValue + \"\\n\");\n break;\n case Print:\n callerSave(-1);\n built.append(crstores);\n built.append(moveRegister(\"a0\", reg(left)));\n built.append(\" jal minijavaPrint\\n\");\n built.append(crloads);\n break;\n case Boolean:\n boolean boolValue = (Boolean)s.getSpecial();\n if(boolValue) {\n built.append(\" li $\" + reg(s) + \", \" + 1 + \"\\n\");\n } else {\n built.append(\" move $\" + reg(s) + \", $zero\\n\");\n }\n break;\n case This:\n built.append(\" move $\" + reg(s) + \", $v0\\n\");\n break;\n case Arg:\n int argPos = (Integer)s.getSpecial();\n if(argPos > 3) {\n built.append(\" sw $\" + reg(left) + \", \" + (argPos-4)*wordSize + \"($sp)\\n\"); \n } else {\n built.append(moveRegister(reg(s) ,reg(left)));\n }\n break;\n case Null:\n built.append(\" move $\" + reg(s) + \", $zero\\n\");\n break;\n case NewObj:\n callerSave(freeReg(s));\n built.append(crstores);\n special = (String)s.getSpecial();\n built.append(\" la $a0, mj__v_\" + special + \"\\n\");\n built.append(\" li $a1, \" + objectSize(prog, prog.getClass(special)) + \"\\n\");\n built.append(\" jal minijavaNew\\n\");\n built.append(\" move $\" + reg(s) + \", $v0\\n\");\n built.append(crloads);\n break;\n case NewIntArray:\n callerSave(freeReg(s));\n built.append(crstores);\n built.append(moveRegister(\"a0\", reg(left)));\n built.append(\" jal minijavaNewArray\\n\");\n built.append(\" move $\" + reg(s) + \", $v0\\n\");\n built.append(crloads);\n break;\n case Label:\n special = (String)s.getSpecial();\n built.append(\" .\" + special + \":\\n\");\n break;\n case Goto:\n special = (String)s.getSpecial();\n built.append(\" j .\" + special + \"\\n\");\n break;\n case Branch:\n special = (String)s.getSpecial();\n built.append(\" bne $\" + reg(left) + \", $zero .\" + special +\"\\n\");\n break;\n case NBranch:\n // could change to beqz\n special = (String)s.getSpecial();\n built.append(\" beq $\" + reg(left) + \", $zero, .\" + special +\"\\n\");\n break;\n case Call:\n String clasName = left.getType().toString();\n SSACall call = (SSACall)s.getSpecial();\n String funcName = call.getMethod();\n Vtable vtab = getVtable(prog, prog.getClass(clasName));\n int methodOffset = vtab.methodOffsets.get(funcName);\n callerSave(freeReg(s));\n built.append(crstores);\n built.append(\" move $v0, $\" + reg(left) + \"\\n\");\n built.append(\" lw $v1, ($v0)\\n\");\n built.append(\" lw $v1, \" + (methodOffset*wordSize) + \"($v1)\\n\");\n built.append(\" jal $v1\\n\");\n built.append(\" move $\" + reg(s) + \", $v0\\n\");\n built.append(crloads);\n break;\n case Return:\n built.append(\" move $v0, $\" + reg(left) + \"\\n\");\n built.append(\" j .ret_\" + methodName + \"\\n\");\n break;\n case Member:\n special = (String)s.getSpecial();\n String clname = left.getType().toString();\n int memOffset;\n if(clname.equals(\"int[]\")) {\n memOffset = 0;\n } else {\n memOffset = fieldOffset(prog, prog.getClass(clname), special);\n }\n if(memOffset == 0) {\n built.append(\" lw $\" + reg(s) + \", ($\" + reg(left) + \")\\n\");\n } else {\n built.append(\" lw $\" + reg(s) + \", \" + (wordSize*memOffset) + \"($\" + reg(left) + \")\\n\");\n }\n break;\n case Index:\n built.append(\" mul $v1, $\" + reg(right) + \", 4\\n\");\n built.append(\" add $v1, $v1, 4\\n\");\n built.append(\" add $v1, $v1, $\" + reg(left) + \"\\n\");\n built.append(\" lw $\" + reg(s) + \", ($v1)\\n\");\n break;\n case VarAssg:\n built.append(moveRegister(reg(s), reg(left)));\n break;\n case MemberAssg:\n special = (String)s.getSpecial();\n String className = left.getType().toString();\n int memSOffset = fieldOffset(prog, prog.getClass(className), special);\n built.append(\" sw $\" + reg(right) + \", \" + (memSOffset*wordSize) + \"($\" + reg(left) + \")\\n\");\n built.append(moveRegister(reg(s), reg(right)));\n break;\n case IndexAssg:\n SSAStatement index = (SSAStatement)s.getSpecial();\n built.append(\" mul $v1, $\" + reg(index) + \", 4\\n\");\n built.append(\" add $v1, $v1, 4\\n\");\n built.append(\" add $v1, $v1, $\" + reg(left) + \"\\n\");\n built.append(\" sw $\" + reg(right) + \", ($v1)\\n\");\n built.append(moveRegister(reg(s), reg(right)));\n break;\n case Not:\n built.append(\" seq $\" + reg(s) + \", $zero , $\" + reg(left) + \"\\n\");\n break;\n case Eq:\n built.append(\" seq $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break; \n case Ne:\n built.append(\" sne $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break;\n case Lt:\n built.append(\" slt $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break;\n case Le:\n built.append(\" sle $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break; \n case Gt:\n built.append(\" sgt $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break;\n case Ge:\n built.append(\" sge $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break;\n case And:\n built.append(\" add $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n built.append(\" seq $\" + reg(s) + \", $\" + reg(s) + \", 2\\n\");\n break;\n case Or:\n built.append(\" add $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n built.append(\" sgt $\" + reg(s) + \", $\" + reg(s) + \", 0\\n\");\n break;\n case Plus:\n built.append(\" add $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break; \n case Minus:\n built.append(\" sub $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break; \n case Mul:\n built.append(\" mul $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break; \n case Div: \n // can change this to one liner after verifying it works\n built.append(\" div $\" + reg(s) + \", $\"+ reg(left) + \", $\" + reg(right) + \"\\n\");\n //built.append(\" mflo $\" + reg(s) + \"\\n\");\n break; \n case Mod:\n // can change to one liner\n //built.append(\" div $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n //built.append(\" mfhi $\" + reg(s) + \"\\n\");\n built.append(\" rem $\" + reg(s) + \", $\"+ reg(left) + \", $\" + reg(right) + \"\\n\");\n \n break;\n case Store:\n int storeVal = (Integer)s.getSpecial();\n built.append(\" sw $\" + reg(left) + \", -\" + (storeVal+1)*wordSize + \"($fp)\\n\");\n break;\n case Load:\n int loadVal = (Integer)s.getSpecial();\n built.append(\" lw $\" + reg(s) + \", -\" + (loadVal+1)*wordSize + \"($fp)\\n\");\n break;\n default:\n throw new Error(\"Implement MIPS compiler for \" + s.getOp() + \"!\");\n }\n\n sb.append(built);\n }",
"public void exec(PyObject code) {\n }",
"@Override\n public CodeFragment visitStatements(AlangParser.StatementsContext ctx) {\n /* add library functions */\n Function f1 = new Function(\"citajcislo\", Types.LLVMCISLO);\n Function f2 = new Function(\"vypiscislo\", Types.LLVMVOID);\n f2.addArgumentLLVMType(Types.LLVMCISLO);\n Function f3 = new Function(\"vypiscisloln\", Types.LLVMVOID);\n f3.addArgumentLLVMType(Types.LLVMCISLO);\n Function f4 = new Function(\"citajznak\", Types.LLVMZNAK);\n Function f5 = new Function(\"vypisznak\", Types.LLVMVOID);\n f5.addArgumentLLVMType(Types.LLVMZNAK);\n Function f6 = new Function(\"vypisznakln\", Types.LLVMVOID);\n f6.addArgumentLLVMType(Types.LLVMZNAK);\n\n this.functions.put(\"citajcislo\", f1);\n this.functions.put(\"vypiscislo\", f2);\n this.functions.put(\"vypiscisloln\", f3);\n this.functions.put(\"citajznak\", f4);\n this.functions.put(\"vypisznak\", f5);\n this.functions.put(\"vypisznakln\", f6);\n\n ST template = this.group.getInstanceOf(\"statements\");\n\n int n = ctx.statement().size();\n for (int i = 0; i < n; i++) {\n CodeFragment statCodeFragment = visit(ctx.statement(i));\n String code = statCodeFragment.toString();\n if (!code.equals(\"\"))\n template.add(\"code\", code);\n }\n template.add(\"globals\", this.generateGlobalVariables());\n\n /* generate global strings */\n for (int i = 0; i < this.globalStrings.size(); i++) {\n template.add(\"globals\", this.globalStrings.get(i) + \"\\n\");\n }\n\n /* MAIN function errors */\n if (!this.functions.containsKey(\"MAIN\")) {\n this.addError(\"MAIN function not found\");\n return new CodeFragment(\"\");\n } else if (this.functions.get(\"MAIN\").args.size() != 0) {\n this.addError(\"MAIN function cannot take arguments\");\n return new CodeFragment(\"\");\n }\n\n return new CodeFragment(template.render());\n }",
"private CompilationObject compile(AbstractSyntaxTree ast, String code,\n com.microsoft.z3.Context z3Context,\n BlockingQueue<Object> messageQueue,\n Supplier< Boolean> symb)\n throws CompilationException, InterruptedException, ExecutionException {\n HashMap<String, ProcessNode> processNodeMap = new HashMap<>();\n // HashMap<String, ProcessNode> dependencyMap = new HashMap<>();\n\n //System.out.println(\"\\nCOMPILER \"+ast.myString()+\" symb \"+symb.get()+\"\\n\");\n for (ProcessNode node : ast.getProcesses()) {\n //messageQueue.add(new LogMessage(\"Compile starting \"+node.getIdentifier()+\" s \"+symb.get()));\n //System.out.println(\"**COMPILER** Compiler Start node = \"+ node.myString());\n processNodeMap.put(node.getIdentifier(), (ProcessNode) node.copy());\n // dependencyMap.put(node.getIdentifier(), node);\n }\n\n AbstractSyntaxTree symbAST = ast.copy(); // to be used to build symbolic models\n //??????\n\n //System.out.println(\"symb \"+symb.get());\n if (!symb.get()) {\n ast = processAtomicAST(ast, z3Context, messageQueue);\n } else {\n //expander.expand(ast, messageQueue, z3Context); // use for error detection\n ast = symbAST;\n //ast = expander.expand(ast, messageQueue, z3Context);\n //System.out.println(\" COMPILER Before ReferenceReplacer \"+ast.processes2String());\n //ast = replacer.replaceReferences(ast, messageQueue);\n // If we replace the references then we lose the assignment information\n //System.out.println(\" COMPILER After ReferenceReplacer \"+ast.processes2String());\n\n }\n //\n //\n // ??????\n //store alphabet\n Set<String> alpha = ast.getAlphabet().stream().map(x -> x.getAction()).collect(Collectors.toSet());\n //System.out.println(\"Compiler alph = \"+alpha);\n\n //Having built the final AST now build the processes\n /*System.out.println(\"**COMPILER** Entering interpreter with ast for processes -> Types \"+\n ast.getProcesses().stream().map(x->\"\\n\"+x.getIdentifier()+\"->\"+x.getType())\n .reduce(\"\",(x,y)->x+\" \"+y)); */\n Interpreter.ProcessMapFull pmf = interpreter.interpret(ast,\n messageQueue, z3Context, alpha, symb.get());\n // Optional<Map<String, ProcessModel>> processMap = interpreter.interpret(ast,\n // messageQueue, z3Context, alpha, symb.get());\n\n //System.out.println(\" **COMPILER** before operation evaluation \"+processMap.keySet());\n List<OperationResult> opResults = new ArrayList<>();\n EquationEvaluator.EquationReturn eqResults = new EquationEvaluator.EquationReturn();\n if (pmf.getIsFull()) {\n\n //System.out.println(\" isPresent \"+pmf.getProcessMap().size()+\" \"+ast.getProcesses().size());\n // if (ast.getProcesses().size() <= processMap.get().size()) {\n //System.out.println(\"equal size\"); // not sure why <= and not ==\n opResults = evaluator.evaluateOperations(\n ast.getOperations(), pmf.getProcessMap(),\n interpreter.getpetrinetInterpreter(), code, z3Context, messageQueue, alpha);\n //System.out.println(\" **COMPILER** before equation evaluation \"+processMap.keySet());\n\n // HEAVY LIFTING need thread pool\n this.eqEvaluator = new EquationEvaluator(); // need to reset equationEvaluator else !!!!\n eqResults = eqEvaluator.evaluateEquations(\n pmf.getProcessMap(),\n interpreter.getpetrinetInterpreter(),\n ast.getEquations(), // one entry per equation\n z3Context, messageQueue, alpha);\n }\n\n\n //System.out.println(\"Compiler built pn \"+ pmf.getProcessMap().size());\n return new CompilationObject(pmf.getProcessMap(), opResults, eqResults.getResults());\n }",
"TACBlock optimise(TACBlock code);",
"private int run(Iterable<String> args) throws IOException {\n Path outputErrors = null;\n boolean expectFailure = false;\n boolean expectWarnings = false;\n boolean exportTestFunctions = false;\n\n // Compiler flags we want to read.\n Path jsOutputFile = null;\n Path createSourceMap = null;\n\n // Parse flags in an ad-hoc manner.\n List<String> passThroughArgs = new ArrayList<>(1024);\n PeekingIterator<String> iargs = Iterators.peekingIterator(args.iterator());\n while (iargs.hasNext()) {\n String arg = iargs.next();\n switch (arg) {\n case \"--output_errors\":\n outputErrors = Paths.get(iargs.next());\n continue;\n case \"--expect_failure\":\n expectFailure = true;\n continue;\n case \"--expect_warnings\":\n expectWarnings = true;\n continue;\n case \"--export_test_functions\":\n exportTestFunctions = true;\n continue;\n case \"--js_output_file\":\n jsOutputFile = Paths.get(iargs.peek());\n break;\n case \"--create_source_map\":\n createSourceMap = Paths.get(iargs.peek());\n break;\n default:\n break;\n }\n passThroughArgs.add(arg);\n }\n\n // Run the compiler, capturing error messages.\n boolean failed = false;\n Compiler compiler = new Compiler();\n LightweightMessageFormatter errorFormatter = new LightweightMessageFormatter(compiler);\n errorFormatter.setColorize(true);\n JsCheckerErrorManager errorManager = new JsCheckerErrorManager(errorFormatter);\n compiler.setErrorManager(errorManager);\n Runner runner = new Runner(passThroughArgs, compiler, exportTestFunctions);\n if (runner.shouldRunCompiler()) {\n failed |= runner.go() != 0;\n }\n failed |= runner.hasErrors();\n\n // Output error messages based on diagnostic settings.\n if (!expectFailure && !expectWarnings) {\n for (String line : errorManager.stderr) {\n System.err.println(line);\n }\n System.err.flush();\n }\n if (outputErrors != null) {\n Files.write(outputErrors, errorManager.stderr, UTF_8);\n }\n if (failed && expectFailure) {\n // If we don't return nonzero, Bazel expects us to create every output file.\n if (jsOutputFile != null) {\n Files.write(jsOutputFile, EMPTY_BYTE_ARRAY);\n }\n if (createSourceMap != null) {\n Files.write(createSourceMap, EMPTY_BYTE_ARRAY);\n }\n }\n if (!failed && expectFailure) {\n System.err.println(\"ERROR: Expected failure but didn't fail.\");\n }\n return failed == expectFailure ? 0 : 1;\n }",
"public String compile () throws IOException, RhinoEvaluatorException {\n return compile(1, null);\n }",
"public static void main(String args[]) throws Exception{\r\n java.io.BufferedReader in;\r\n Yylex sc;\r\n parser p;\r\n java_cup.runtime.Symbol sroot;\r\n boolean error=false;\r\n\r\n //El primer parametro es el nombre del fichero con el programa\r\n if (args.length != 2) {\r\n System.out.println(\r\n \"Uso: java Main <nombre_fichero> <fichero_generado>\");\r\n error=true;\r\n }\r\n\r\n //Analisis lexico y sintactico\r\n\r\n if (!error) {\r\n \ttry {\r\n \t in = new java.io.BufferedReader(new java.io.FileReader(args[0]));\r\n \t sc = new Yylex(in);\r\n \t p = new parser(sc);\r\n \t sroot = p.parse();\r\n \t System.out.println(\"Análisis léxico y sintáctico correctos\");\r\n\r\n /* Codigo para el analisis semantico, empieza a computar desde el nodo raiz */\r\n S root = (S) sroot.value;\r\n root.computeAH1();\r\n System.out.println(\"Análisis semántico correcto\");\r\n /* Fin codigo analisis semantico */\r\n\r\n /* Codigo para generar codigo Java */\r\n codeGenerator(args[1], root);\r\n /* Fin codigo para generar codigo Java */\r\n \t} catch(IOException e) {\r\n \t System.out.println(\"Error abriendo fichero: \" + args[0]);\r\n \t error= true;\r\n \t}\r\n }\r\n }",
"public SortedMap<Integer,Statement> executeCompiler() throws CompilerException {\n try {\n SortedMap<Integer,Statement> code = new TreeMap<Integer,Statement>();\n this.symbolTable.clear();\n statements(code);\n return code;\n }\n catch(ParseException e) {\n if (e.currentToken!=null) {\n throw new CompilerException(CompilationErrorType.SYNTAX_ERROR,\n e.currentToken.endLine, e);\n }\n else if (this.token!=null) {\n throw new CompilerException(CompilationErrorType.SYNTAX_ERROR,\n this.token.endLine, e);\n }\n throw new CompilerException(CompilationErrorType.SYNTAX_ERROR, e);\n }\n catch(TokenMgrError e) {\n if (this.token!=null) {\n throw new CompilerException(CompilationErrorType.ILLEGAL_CHARACTER,\n this.token.endLine, e);\n }\n throw new CompilerException(CompilationErrorType.INTERNAL_LEXER_ERROR, e);\n }\n catch(Throwable e) {\n throw new CompilerException(CompilationErrorType.INTERNAL_ERROR, e);\n }\n }",
"public void generateCode() {\n new CodeGenerator(data).generateCode();\n }",
"protected Object compileAndLoad() throws IOException {\n String generatedSource = printJCodeModel();\n return compileAndLoadSource(generatedSource, TEST_CLASS_NAME);\n }",
"public void generateByteCode(Optimizer opt) {}",
"public void run() {\n if (!script.compile()) {\n Program.stop(\"ERROR: There was an error while compiling your script.\"\n + \"\\nPlease check your syntax!\", false);\n return;\n }\n commandCounter = script.input.split(\";\").length - 1;\n if (!writeMemory()) {\n Program.stop(\"ERROR: There was a fatal error while \"\n + \"writing the script into the memory!\", false);\n return;\n }\n try {\n startProcessor();\n } catch (NumberFormatException n) {\n Program.stop(\"ERROR: There was a runtime error while executing the script!\", false);\n }\n Program.stop(\"\", true);\n }",
"public void runProgram(Path p) {\n\t\ttry {\n\t\t\tFile f = new File(p.toString());\n\t\t\tString dir = f.getParent();\n\t\t\tString filename = f.getName();\n\t\t\tString currentOS = System.getProperty(\"os.name\").toLowerCase();\n\n\t\t\t//System.out.println(\"OS: \" + currentOS);\n\t\t\t\n\t\t\tif (currentOS.indexOf(\"win\") >= 0) {\n\t\t\t\tString compiled = dir.concat(\"\\\\\").concat(filename.substring(0, f.getName().lastIndexOf(\".\")).concat(\".exe\"));\n\t\t\t\t\n\t\t\t\t//System.out.println(\"Compiled File: \" + compiled);\n\n\t\t\t\tif (this.programIfExists(compiled)) {\n\t\t\t\t\tSystem.out.println(\"Finished Compiling\");\n\t\t\t\t\tProcessBuilder pb = new ProcessBuilder(\"cmd\", \"/k\", \"start\", compiled);\n\t\t\t\t\tProcess proc = pb.start();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Some compilation error occured\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse if(currentOS.indexOf(\"mac\") >= 0) {\n\t\t\t\tString compiled = dir.concat(\"\\\\\").concat(filename.substring(0, f.getName().lastIndexOf(\".\")).concat(\".out\"));\n\t\t\t\tRuntime rt = Runtime.getRuntime();\n\t\t\t\tProcess proc = rt.exec(compiled);\n\t\t\t}\n\n\t\t\telse if(currentOS.indexOf(\"nix\") >= 0 || currentOS.indexOf(\"nux\") >= 0) {\n\t\t\t\tString compiled = dir.concat(\"\\\\\").concat(filename.substring(0, f.getName().lastIndexOf(\".\")));\n\t\t\t\tRuntime rt = Runtime.getRuntime();\n\t\t\t\tProcess proc = rt.exec(compiled);\n\t\t\t}\n\t\t}\n\n\t\tcatch(Exception ex) {\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}",
"public static void main(String[] args) {\n String filePath=args[0];\n Parser parser = new Parser(filePath);\n Code code = new Code();\n SymbolTable symbol = new SymbolTable();\n initSymbol(filePath, parser, symbol);\n String fileOutputPath=filePath.replace(\".asm\",\".hack\");\n Parser parser1 = new Parser(filePath);\n\n try {\n BufferedWriter writer = new BufferedWriter(new FileWriter(fileOutputPath ,true));\n PrintWriter emptyFile = new PrintWriter(fileOutputPath);\n emptyFile.print(\"\");\n emptyFile.close();\n\n //count the num of var in the program\n int numVariables = 16;\n while (parser1.hasMoreCommands()) {\n parser1.advance();\n String type = parser1.commandType();\n StringBuilder binCommand=new StringBuilder();\n switch (type) {\n case \"A_COMMAND\":\n //get the symbol\n String commandSymbol= parser1.symbol();\n Integer address=0;\n if(isNumeric(commandSymbol)){\n address=Integer.parseInt(commandSymbol);\n }\n //check if the symbol don't exist in the symbol Table and add it\n else if (!symbol.contain(commandSymbol)) {\n symbol.addEntry(commandSymbol, numVariables);\n address=symbol.getAddress(commandSymbol);\n numVariables++;\n }\n //get the symbol value from the symbol table\n else if(symbol.contain((commandSymbol))){\n address=symbol.getAddress(commandSymbol);\n }\n\n binCommand.append(Integer.toBinaryString(address));\n int j=binCommand.length();\n for (int i = 0; i < 16 - j; i++) {\n binCommand.insert(0, \"0\");\n }\n writer.append(binCommand.toString());\n writer.append('\\n');\n binCommand.setLength(0);\n break;\n case \"C_COMMAND\":\n //write the c command\n binCommand.append(\"111\");\n binCommand.append(code.comp(parser1.comp()));\n binCommand.append(code.dest(parser1.dest()));\n binCommand.append(code.jump(parser1.jump()));\n writer.append(binCommand.toString());\n writer.append('\\n');\n binCommand.setLength(0);\n break;\n }\n }\n\n writer.close();\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n }",
"public static void main(String[] args) throws IOException {\n\r\n ParserMain Parse = new ParserMain(args);\r\n Node n_program = Parse.program();\r\n\tSystem.out.println(\"\\ninside parser: parsing end, pass tree ro type checking\\n\");\r\n CodeGener cg= new CodeGener(n_program,args[0]); ////////////////////////////////////////////////////////////////////////////////////kavita\r\n h_typeCheckingClass tp = new h_typeCheckingClass(n_program);\r\n Node result = tp.starttype(n_program);\r\n\tSystem.out.println(\"\\ninside parser: TYPE checking end, pass tree to WRITING AST\\n\");\r\n AST2word ast=new AST2word();\r\n ast.read(result, args);\r\n\r\n\r\n\r\n\r\n }",
"public void generateCode(String[] sourceCode) {\n LexicalAnalyser lexicalAnalyser = new LexicalAnalyser(Helper.getInstructionSet());\n SynaticAnalyser synaticAnalyser = new SynaticAnalyser(console);\n HashMap<Integer, Instruction> intermediateRepresentation =\n synaticAnalyser.generateIntermediateRepresentation(\n lexicalAnalyser.generateAnnotatedToken(sourceCode));\n\n if (intermediateRepresentation == null) {\n this.console.reportError(\"Terminating code generation\");\n return;\n }\n\n printCode(intermediateRepresentation);\n\n FileUtility.saveJavaProgram(null, new JavaProgramTemplate(intermediateRepresentation));\n }",
"public Object run() {\n \n try {\n try {\n \n String targetArch=JNITargetArch.getTargetArch();\n // System.out.println(\"TargetArch: \"+targetArch);\n JCALibrary jca=JCALibrary.getInstance();\n \n \n String libPath=jca.getProperty( \"gov.aps.jca.jni.epics.\"+targetArch+\n \".library.path\", \"\" );\n loadLibrary( libPath, \"Com\" );\n loadLibrary( libPath, \"ca\" );\n \n File caRepeaterPath=new File( jca.getProperty(\n \"gov.aps.jca.jni.epics.\"+targetArch+\".caRepeater.path\", \"\" ) );\n try {\n String caRepeater=\"caRepeater\";\n if( caRepeaterPath.exists() ) {\n caRepeater= ( new File( caRepeaterPath, \"caRepeater\" ) ).\n getAbsolutePath();\n \n }\n Runtime.getRuntime().exec( caRepeater );\n } catch( java.io.IOException ex ) {\n Runtime.getRuntime().exec( \"caRepeater\" );\n }\n } catch( Throwable ex2 ) {\n // System.out.println(ex2);\n }\n // System.out.println(\"Loading jca2\");\n System.loadLibrary( \"jca\" );\n \n return null; // nothing to return\n } catch( Exception ex1 ) {\n // System.out.println(ex1);\n return ex1;\n }\n }",
"public abstract String parse(String name, List<CodeLine> c, Cluster cluster, Map<String,String> subs, Assemble compiler);",
"private GenericVar run(String code) throws InterpreterException {\n\t\treturn evaluate(code);\n\t}",
"public boolean compile(String name, String source) {\n\t return compile(source);\n\t}",
"@SuppressWarnings(\"try\")\n public static <T extends CompilationResult> T compile(Request<T> r) {\n DebugContext debug = r.graph.getDebug();\n try (CompilationAlarm alarm = CompilationAlarm.trackCompilationPeriod(r.graph.getOptions())) {\n assert !r.graph.isFrozen();\n try (DebugContext.Scope s0 = debug.scope(\"GraalCompiler\", r.graph, r.providers.getCodeCache()); DebugCloseable a = CompilerTimer.start(debug)) {\n emitFrontEnd(r.providers, r.backend, r.graph, r.graphBuilderSuite, r.optimisticOpts, r.profilingInfo, r.suites);\n emitBackEnd(r.graph, null, r.installedCodeOwner, r.backend, r.compilationResult, r.factory, null, r.lirSuites);\n } catch (Throwable e) {\n throw debug.handle(e);\n }\n checkForRequestedCrash(r.graph);\n return r.compilationResult;\n }\n }",
"public void compile(String str) throws PaleoException {\n\t\trunProcess(\"javac paleo/\" + str + \".java\");\n\t\tif (erreur.length() != 0) {\n\t\t\tthrow new JavacException(erreur.toString());\n\t\t}\n\t}",
"public abstract ILanguageProtocol makeInterpreter(String source, String replQualifiedName, String... salixPath) throws IOException, URISyntaxException, Exception;",
"public String getCompiler();",
"private void runMethod(String codeDirectory,String inputFilePath,String outputFilePath,int timeLimitVal)\n {\n CodeCompile compileObject = new CodeCompile();\n CodeRun codeRunObject = new CodeRun();\n String directoryForRun = compileObject.makeFileDirectory(codeDirectory);\n String command = \"java -cp \" + directoryForRun;\n try\n {\n Process p = Runtime.getRuntime().exec(command);\n codeRunObject.giveInput(p.getOutputStream(),inputFilePath);\n\n timeLimitVal*=1000;\n String userOutputFilePath = new String();\n userOutputFilePath = compileObject.makeUserOutputfileDirectory(outputFilePath);\n boolean isTimeLimit = codeRunObject.getOutput(p.getInputStream(), timeLimitVal,userOutputFilePath);\n if (isTimeLimit)\n {\n p.waitFor();\n boolean isRuntimeError = codeRunObject.getError(p.getErrorStream(),errorImage);\n if(isRuntimeError){\n setBooleanValue();\n this.runtimeError=true;\n p.destroy();\n }\n else{\n p.waitFor();\n boolean isMatch = codeRunObject.matchOutFile(outputFilePath,userOutputFilePath,exclamationImage,yesImage,noImage);\n if(isMatch){\n setBooleanValue();\n this.isAccepted=true;\n }\n else{\n setBooleanValue();\n this.isWrongAnswer=true;\n }\n p.waitFor();\n p.destroy();\n }\n }\n else\n {\n setBooleanValue();\n this.timeLimitError=true;\n p.destroy();\n }\n }\n catch (IOException | InterruptedException e)\n {\n }\n }",
"String generateCode(\n InputSource input, String filename,\n ProgrammingLanguage programmingLanguage,\n SourceResolver resolver\n ) throws Exception;",
"public byte[] code();",
"protected boolean compile(Context ctx, CodeAttribute code, boolean fReached, ErrorList errlist)\n throws CompilerException\n {\n // this is the compilation for array access, not storing into an\n // array; that is handled by AssignExpression\n\n if (!ctx.isDebug() && isConstant() && !(getValue() instanceof Object[]))\n {\n // Expression has compiler implementation for constant values\n return super.compile(ctx, code, fReached, errlist);\n }\n\n // compilation for \"<expr>[<index>]\":\n //\n // [expr]\n // [index]\n // ?aload\n\n getArray().compile(ctx, code, fReached, errlist);\n getIndex().compile(ctx, code, fReached, errlist);\n\n Op opLoad = null;\n switch (getType().getTypeString().charAt(0))\n {\n case 'Z':\n case 'B':\n opLoad = new Baload();\n break;\n case 'C':\n opLoad = new Caload();\n break;\n case 'S':\n opLoad = new Saload();\n break;\n case 'I':\n opLoad = new Iaload();\n break;\n case 'J':\n opLoad = new Laload();\n break;\n case 'F':\n opLoad = new Faload();\n break;\n case 'D':\n opLoad = new Daload();\n break;\n case '[':\n case 'N':\n case 'L':\n case 'R':\n opLoad = new Aaload();\n break;\n default:\n throw new IllegalStateException();\n }\n code.add(opLoad);\n\n return fReached;\n }",
"public static void main(String[] args) {\n \n fillArrayList();\n getNextToken();\n parseProgram();\n\n //TODO output into file ID.java\n //This seems to work\n// File f = new File(programID+\".java\");\n// try {\n// PrintWriter write = new PrintWriter(f);\n// write.print(sb.toString());\n// write.flush();\n// write.close();\n// } catch (FileNotFoundException ex) {\n// Logger.getLogger(setTranslator.class.getName()).log(Level.SEVERE, null, ex);\n// }\n System.out.println(sb.toString());\n \n }",
"public static void main(String[] args) throws IOException {\n\t\tCharStream input = CharStreams.fromFileName(\"C:\\\\Users\\\\User\\\\eclipse-workspace\\\\Compilateur-Aisha-Liliya\\\\src\\\\test\\\\test0.txt\");\n\t\tLangageLexer lexer = new LangageLexer( input);\n\t\tLangageParser parser = new \tLangageParser(new CommonTokenStream(lexer));\n\t\tListener l =new Listener();\n\t\tparser.addParseListener(l);\n\t\t\n\t\tParseTree tree = parser.code();\n\tl.s.printTE();\n\tl.s.printTS();\n\tl.s.printQuad();\n\tl.s.printCODEOBJET();\n\t}",
"public void genCode(CodeFile code) {\n\t\t\n\t}",
"private UnifiedAst precompile(PrecompilationContext precompilationContext)\n\t\t\tthrows UnableToCompleteException {\n\t\ttry {\n\t\t\t// (0) Assert preconditions\n\t\t\tif (precompilationContext.getEntryPoints().length\n\t\t\t\t\t+ precompilationContext\n\t\t\t\t\t\t\t.getAdditionalRootTypes().length == 0) {\n\t\t\t\tthrow new IllegalArgumentException(\"entry point(s) required\");\n\t\t\t}\n\t\t\tboolean singlePermutation = precompilationContext\n\t\t\t\t\t.getPermutations().length == 1;\n\t\t\tPrecompilationMetricsArtifact precompilationMetrics = precompilationContext\n\t\t\t\t\t.getPrecompilationMetricsArtifact();\n\t\t\t/*\n\t\t\t * Do not introduce any new pass here unless it is logically a part\n\t\t\t * of one of the 6 defined stages and is physically located in that\n\t\t\t * stage.\n\t\t\t */\n\t\t\t// (1) Initialize local state\n\t\t\tjprogram = new JProgram(compilerContext.getMinimalRebuildCache());\n\t\t\t// Synchronize JTypeOracle with compile optimization behavior.\n\t\t\tjprogram.typeOracle.setOptimize(options\n\t\t\t\t\t.getOptimizationLevel() > OptionOptimize.OPTIMIZE_LEVEL_DRAFT);\n\t\t\tjsProgram = new JsProgram();\n\t\t\t// (2) Construct and unify the unresolved Java AST\n\t\t\tCompilationState compilationState = constructJavaAst(\n\t\t\t\t\tprecompilationContext);\n\t\t\t// TODO(stalcup): hide metrics gathering in a callback or subclass\n\t\t\tJsniRestrictionChecker.exec(logger, jprogram);\n\t\t\tJsInteropRestrictionChecker.exec(logger, jprogram,\n\t\t\t\t\tgetMinimalRebuildCache());\n\t\t\tlogTypeOracleMetrics(precompilationMetrics, compilationState);\n\t\t\tMemory.maybeDumpMemory(\"AstOnly\");\n\t\t\tAstDumper.maybeDumpAST(jprogram);\n\t\t\t// TODO(stalcup): is in wrong place, move to optimization stage\n\t\t\tConfigurationProperties configurationProperties = new ConfigurationProperties(\n\t\t\t\t\tmodule);\n\t\t\tEnumNameObfuscator.exec(jprogram, logger, configurationProperties,\n\t\t\t\t\toptions);\n\t\t\t// (3) Normalize the unresolved Java AST\n\t\t\t// Replace default methods by static implementations.\n\t\t\tDevirtualizeDefaultMethodForwarding.exec(jprogram);\n\t\t\t// Replace calls to native overrides of object methods.\n\t\t\tReplaceCallsToNativeJavaLangObjectOverrides.exec(jprogram);\n\t\t\tFixAssignmentsToUnboxOrCast.exec(jprogram);\n\t\t\tif (options.isEnableAssertions()) {\n\t\t\t\tAssertionNormalizer.exec(jprogram);\n\t\t\t} else {\n\t\t\t\tAssertionRemover.exec(jprogram);\n\t\t\t}\n\t\t\tif (module != null && options.isRunAsyncEnabled()) {\n\t\t\t\tReplaceRunAsyncs.exec(logger, jprogram);\n\t\t\t\tConfigurationProperties config = new ConfigurationProperties(\n\t\t\t\t\t\tmodule);\n\t\t\t\tCodeSplitters.pickInitialLoadSequence(logger, jprogram, config);\n\t\t\t}\n\t\t\tImplementClassLiteralsAsFields.exec(jprogram, shouldOptimize());\n\t\t\t// TODO(stalcup): hide metrics gathering in a callback or subclass\n\t\t\tlogAstTypeMetrics(precompilationMetrics);\n\t\t\t// (4) Construct and return a value.\n\t\t\tEvent createUnifiedAstEvent = SpeedTracerLogger\n\t\t\t\t\t.start(CompilerEventType.CREATE_UNIFIED_AST);\n\t\t\tUnifiedAst result = new UnifiedAst(options,\n\t\t\t\t\tnew AST(jprogram, jsProgram), singlePermutation,\n\t\t\t\t\tRecordRebinds.exec(jprogram));\n\t\t\tcreateUnifiedAstEvent.end();\n\t\t\treturn result;\n\t\t} catch (Throwable e) {\n\t\t\tthrow CompilationProblemReporter.logAndTranslateException(logger,\n\t\t\t\t\te);\n\t\t}\n\t}",
"@Override\n protected void codeGenMain(DecacCompiler compiler, Registres regs, Pile p) {\n }",
"public static void main(String[] args) throws Exception {\n if (args.length > 0) {\n // The last command line arg is the source file name\n String inputFile = args[args.length - 1];\n InputStream is = new FileInputStream(inputFile);\n CharStream input = CharStreams.fromStream(is);\n\n // Create the lexer and parser objects and a token stream \"pipe\" between them\n BantamJavaLexer lexer = new BantamJavaLexer(input);\n CommonTokenStream tokens = new CommonTokenStream(lexer);\n BantamJavaParser parser = new BantamJavaParser(tokens);\n\n // Launch the parser\n // https://github.com/antlr/antlr4/blob/master/doc/listeners.md\n BantamJavaParser.ProgramContext tree = parser.program();\n ParserListener listener = new ParserListener();\n ParseTreeWalker.DEFAULT.walk(listener, tree); // initiate walk of tree with listener in use of default walker\n\n ErrorReporter reporter = new ErrorReporter();\n\n // BantamJavaVisitor semantics = new SemanticAnalyzer(listener.getGlobalScope());\n BantamJavaVisitor semantics1 = new SemanticAnalyzer(reporter);\n semantics1.visit(tree);\n BantamJavaVisitor semantics2 = new SemanticAnalyzer2(reporter);\n semantics2.visit(tree);\n\n // Print the parse tree\n System.out.println(tree.toStringTree(parser)); // print tree as text <label id=\"code.tour.main.7\"/>\n\n if (reporter.getErrorCount() == 0) {\n BantamJavaVisitor codeGen = new CodeGenerator(reporter);\n codeGen.visit(tree);\n }\n }\n else {\n System.err.println(\"ERROR: No source file specified.\");\n }\n }",
"public void compile(MindFile f) {\n \t\t\n \t}",
"public final void cpp() {\n }",
"public static void main(String[] args) throws Exception {\n\n long startTime = System.currentTimeMillis();\n String inputFilePath = FILE_PATH;\n HackAssembler assembler = new HackAssembler();\n assembler.assemble(inputFilePath);\n long endTime = System.currentTimeMillis();\n System.out.println(\"Total asembly time: \"+(endTime - startTime) +\" ms\");\n\n }",
"public WorkResult execute() {\n source = new SimpleFileCollection(source.getFiles());\n classpath = new SimpleFileCollection(Lists.newArrayList(classpath));\n\n for (File file : source) {\n if (!file.getName().endsWith(\".java\")) {\n throw new InvalidUserDataException(String.format(\"Cannot compile non-Java source file '%s'.\", file));\n }\n }\n configure(compiler);\n return compiler.execute();\n }",
"private static void compileFile(String path) throws IOException {\n File f = new File(path);\n JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);\n File[] files = {f};\n Iterable<? extends JavaFileObject> compilationUnits =\n fileManager.getJavaFileObjectsFromFiles(Arrays.asList(files));\n compiler.getTask(null, fileManager, null, null, null, compilationUnits).call();\n fileManager.close();\n }",
"private boolean compileMethod(String codeDirectory){\n String fileToCompile = new String();\n int compilationResult = 0;\n CodeCompile compileObject = new CodeCompile();\n compilationResult = compileObject.CompileJavaCode(codeDirectory,errorImage);\n return (boolean) (compilationResult==0);\n }",
"public abstract int compile(byte bc[], int index);",
"public static void main(String[] args) {\n String filename = \"\";\n Node root,standard_root;\n CseElement result;\n HashMap<Integer,ArrayList<CseElement>> control_structures;\n //Initialize variable DEBUG. True when debugging.\n boolean DEBUG = false;\n ArrayList<Node> outputs;\n //Get the filename from argument\n if(DEBUG == false & args.length ==0){\n System.out.println(\"Filename expected!..\");\n }\n else{\n filename = args[0];\n \n \n //Create the AST tree from user input file\n outputs = IOEditor.getList(filename);\n root = Tree.createTree(outputs);\n if(DEBUG == true){\n //Print and check the AST when debugging\n Tree.print(root);\n System.out.println(\"\\n\"); \n }\n //Get the Standaraize tree.\n standard_root = Tree.getST(root);\n if(DEBUG == true){\n //Print and check the standarize tree when debugging\n Tree.print(standard_root);\n }\n //Create the control structures for rpal code\n control_structures = Tree.preOrderTraversal(root);\n if(DEBUG == true){\n //Print and check the control structures when debugging\n System.out.println(control_structures);\n System.out.println(\"\");\n }\n // Evaluate the RPAL code using CSE machine\n CseMachine cm = new CseMachine(control_structures);\n try {\n //Get the resulted output\n result = cm.apply(DEBUG);\n if(result == null){\n if(DEBUG == true){\n //Check the result when debugging\n System.out.println(\"Final Result:- No return value\");\n }\n }\n else if(\"env\".equals(result.type)){\n if(DEBUG == true){\n //Check the result when debugging\n System.out.println(\"Final Result:- No return value\");\n }\n }\n else{\n if(DEBUG == true){\n //Check the result when debugging\n System.out.println(result.type +\" \"+result.value);\n }\n }\n } catch (Exception ex) {\n System.out.println(\"\\n\\n\"+ex+\"\\n\\n\");\n Logger.getLogger(Rpal.class.getName()).log(Level.SEVERE, null, ex);\n }\n } \n }",
"public String program();",
"Hojas eval();",
"public Code compile(final llvm.Function fn, final ValCont k) {\n Reg r = fn.reg(type.toLLVM());\n return new llvm.Op(r, new llvm.Load(loc), k.with(r));\n }",
"public interface JavaCode {\n\n /**\n * Get an unique identification code for an object\n * TODO: This method is not reliable as hash codes are not unique, should use an UUID generator singleton instead.\n *\n * @param obj the object\n * @return the unique identification code\n */\n static int getUniqueID(Object obj) {\n return obj.hashCode();\n }\n\n /**\n * Compiles this code. If an object implements both {@link JavaCode}\n * and {@link JavaExpression}, only one of this method and\n * {@link JavaExpression#compileExpression(Subroutine, JavaScope)} should be called.\n *\n * @param subroutine the subroutine which this code belongs to\n * @param parent the parent scope of this code\n * @throws JTAException if an error occurs\n */\n void compileCode(Subroutine subroutine, JavaScope parent) throws JTAException;\n}",
"public static void main(String[] args) {\n\n\t\t// File file=new File(\"./testClasses/binarysearch.java\");\n\t\tCharStream input = null;\n\t\tif (args.length > 0) {\n\t\t\ttry {\n\t\t\t\tinput = CharStreams.fromFileName(args[0]);\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(BGSTYLE + RED + BOLD + UNDERLINE\n\t\t\t\t\t\t+ \"THE GIVEN FILE PATH IS WRONG!\" + RESET);\n\t\t\t\tSystem.out.println(YELLOW + BOLD\n\t\t\t\t\t\t+ \"IF EXECUTING THE JAR, CHECK YOUR COMMAND \"\n\t\t\t\t\t\t+ \" java -jar MJCompiler <filePath> \\n\"\n\t\t\t\t\t\t+ \"OTHERWISE CHECK THE MAIN METHOD\" + RESET);\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\n\t\t\ttry {\n\t\t\t\tinput = CharStreams.fromFileName(\"./testFiles/factorial.java\");\n\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(BGSTYLE + RED + BOLD + UNDERLINE\n\t\t\t\t\t\t+ \"THE GIVEN FILE PATH IS WRONG!!\" + RESET);\n\t\t\t\tSystem.out.println(YELLOW + BOLD\n\t\t\t\t\t\t+ \"IF EXECUTING THE JAR, CHECK YOUR COMMAND \"\n\t\t\t\t\t\t+ \" java -jar MJCompiler <filePath> \\n\"\n\t\t\t\t\t\t+ \"OTHERWISE CHECK THE MAIN METHOD\" + RESET);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tMiniJavaLexer lexer = new MiniJavaLexer(input);\n\t\tMiniJavaParser parser = new MiniJavaParser(new BufferedTokenStream(\n\t\t\t\tlexer));\n\t\tParseTree tree = parser.program();\n\t\tTrees.inspect(tree, parser);\n\n\t\t// ---------PrintVisitor-------------\n\t\tPrintVisitor pv = new PrintVisitor();\n\t\tpv.visitMiniJava(tree);\n\n\t\t// --------SymbolTableVisitor--------\n\t\tSymbolTableVisitor symbolTableVisitor = new SymbolTableVisitor();\n\t\tSymbolTable visitedST = (SymbolTable) symbolTableVisitor.visit(tree);\n\t\tif (symbolTableVisitor.getErrorFlag()) {\n\t\t\tSystem.err\n\t\t\t\t\t.println(BGSTYLE\n\t\t\t\t\t\t\t+ RED\n\t\t\t\t\t\t\t+ \"THE PROGRAM COTAINS ERRORS! \\n CHECK CONSOLE AND PARSE TREE WINDOW FOR MORE INFO!\");\n\t\t} else {\n\t\t\tvisitedST.printTable();\n\t\t\tvisitedST.resetTable();\n\n\t\t\t// ------TypeCheckVisitor\n\t\t\tTypeCheckVisitor tcv = new TypeCheckVisitor(visitedST);\n\t\t\ttcv.visit(tree);\n\t\t\tif (tcv.getErrorCount() > 0) {\n\t\t\t\tSystem.err.println(\"The Program contains \"\n\t\t\t\t\t\t+ tcv.getErrorCount() + \" Type Errors!\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"TypeChecking Done With No Errors!\");\n\t\t\t}\n\t\t}\n\n\t}",
"public static void main (String[] args){\n if (args.length != 1){ // Check if there is the input regular expression\n System.out.println(\"Usage: java REcompiler <RegExp>\");\n return;\n }\n String input = args [0]; //Get the input regular expression\n inputCharArray = input.toCharArray(); //Convert the input string into char array\n set_state (0,\"START\",0,0); //Add the start state into the list\n int i = expression(); // Call the expression()\n if (hasError == true) System.out.println(\"GRAMMER ERROR\"); // IF there is any error, display the error message\n else {\n set_state (state, \"END\", 0,0); //Add the end state into the list\n int n1 , n2;\n n1 = n2 = getStartState(); // Get the start state of the FSM\n stateList.get(0).setN1(n1); stateList.get(0).setN2(n2); // Set the 'START' state's n1 and n2 to the start state\n stateList.forEach (state -> { //Print out all the elements in the list\n System.out.println(state.getState()+\",\"+state.getStr()+\",\"+state.getN1()+\",\"+state.getN2());\n });\n }\n }",
"public String translate(Program p)\r\n\t{\r\n\t\tString headers= \"#include \\\"lcpl_runtime.h\\\" \\n\";\r\n\t\t\r\n\t\t/* static data : strings used in the program */\r\n\t\tString stringConstants;\r\n\t\t_GlobalStringRuntime gsr = new _GlobalStringRuntime();\r\n\t\tgsr.searchProgramForStrings(p);\r\n\t\tstringConstants = gsr.getStringCode();\r\n\t\t\r\n\t\t/* object layouts: pointer to RTTI followed by attributes */\r\n\t\tString objectLayouts;\r\n\t\t_Object_Layout ol = new _Object_Layout();\r\n\t\tol.generateObjectLayoutCode(p);\r\n\t\tobjectLayouts =ol.getObjLayoutCode();\r\n\t\t\r\n\t\t/* static data : class names, as strings */\r\n\t\tString classNames;\r\n\t\t_ClassName cn = new _ClassName();\r\n\t\tcn.generateClassNames(p);\r\n\t\tclassNames = cn.getClassNameCode();\r\n\t\t\r\n\t\t/* constructors */\r\n\t\tString constructorDeclarations;\r\n\t\t_ConstructDeclarations cd = new _ConstructDeclarations();\r\n\t\tcd.generateConstructDecl(p);\r\n\t\tconstructorDeclarations = cd.getConstructDeclCode();\r\n\t\t\r\n\t\t/* declaration of methods */\r\n\t\tString methodDeclarations;\r\n\t\t_MethodDeclarations md = new _MethodDeclarations();\r\n\t\tmd.generateMethodDeclCode(p);\r\n\t\tmethodDeclarations = md.getMethodDeclCode();\r\n\t\t\r\n\t\t/* runtime type information (RTTI) - class name, class size, parent class, vtable */\r\n\t\tString vtables;\r\n\t\t_RTTI_Layout rtti = new _RTTI_Layout();\r\n\t\trtti.generateLayoutCode(p);\r\n\t\tvtables = rtti.getLayoutCode();\r\n\t\t\r\n\t\t/* definitions of methods in the program, including constructors */\r\n\t\tString constructors;\r\n\t\t//\"void Main_init(struct TMain *self){ IO_init((struct TIO*)self); } \\n\";\r\n\t\t_ClassInit ci = new _ClassInit(rtti.vt, gsr.getLiterals());\r\n\t\tci.generateMethodsCode(p, rtti.getSortedClassesList());\r\n\t\tconstructors = ci.getInitMethodsCode();\r\n\t\t\r\n\t\tString startup= \"void startup(void) { struct TMain *main=__lcpl_new(&RMain); M4_Main_main(main); } \\n\";\r\n\t\tSystem.out.println(headers+stringConstants+objectLayouts+classNames+constructorDeclarations+methodDeclarations+vtables+constructors+startup);\r\n\t\t//System.out.println(stringConstants);\r\n\t\t/*\r\n\t\tSystem.out.println(\"=======headers========\");\r\n\t\tSystem.out.println(headers);\r\n\t\tSystem.out.println(\"=======stringConstanf========\");\r\n\t\tSystem.out.println(stringConstants);\r\n\t\tSystem.out.println(\"=======objectLayou========\");\r\n\t\tSystem.out.println(objectLayouts);\r\n\t\tSystem.out.println(\"=======classnames========\");\r\n\t\tSystem.out.println(classNames);\r\n\t\tSystem.out.println(\"=======constructDecl========\");\r\n\t\tSystem.out.println(constructorDeclarations);\r\n\t\tSystem.out.println(\"=======methodDecl========\");\r\n\t\tSystem.out.println(methodDeclarations);\r\n\t\tSystem.out.println(\"=======vtables========\");\r\n\t\tSystem.out.println(vtables);\r\n\t\tSystem.out.println(\"=======constructors========\");\r\n\t\tSystem.out.println(constructors);\r\n\t\tSystem.out.println(\"=======startup========\");\r\n\t\tSystem.out.println(startup);*/\r\n\t\treturn headers+stringConstants+objectLayouts+classNames+constructorDeclarations+methodDeclarations+vtables+constructors+startup;\r\n\t\t\r\n\t}",
"R execute();",
"public boolean compile(String source) {\n\t return compile(source, true);\n\t}",
"public interface Code {\n //运行结果编号\n Integer getCode();\n //运行结果描述\n String getDescription();\n String toString();\n\n}",
"public static void main(String[] args) throws Exception {\n\t\t// validate arguments\n\t\tif (args.length > 2) {\n\t\t\tSystem.err.println(\"Wrong number of arguments, expected: <file.jmm> [ <debug> ]\");\n\t\t}\n\t\tboolean debug = false;\n\t\tif (args.length == 2)\n\t\t\tdebug = Boolean.parseBoolean(args[1]);\n\n\t\t// ***** Syntactical Analysis\n\t\t// get root of Syntax Tree\n\t\tSimpleNode root = parse(args[0]);\n\t\t// Print tree to console\n\t\tif (debug) {\n\t\t\tSystem.out.println(\"\\n==== Dumping Syntax Tree ====\\n\");\n\t\t\troot.dump(\"\");\n\t\t}\n\n\t\t// ***** Semantic Analysis\n\t\t// build symbol table\n\t\tSymbolTableBuilder tableBuilder = new SymbolTableBuilder(root);\n\t\tSymbolTable symbolTable = tableBuilder.buildSymbolTable();\n\t\t// dump table in debug mode\n\t\tif (debug) {\n\t\t\tSystem.out.println(\"\\n==== Dumping SymbolTable ====\\n\");\n\t\t\tsymbolTable.dump();\n\t\t}\n\t\t// analyse\n\t\tSemanticAnalyser semanticAnalyser = new SemanticAnalyser(symbolTable, tableBuilder.getNumErrors());\n\t\tboolean noErrors = semanticAnalyser.analise(root);\n\t\tif (!noErrors)\n\t\t\tthrow new SemanticErrorException(\"Semantic Errors found\");\n\n\t\t// ***** Code Generation\n\t\t//generate code\n\t\tCodeGenerator codeGenerator = new CodeGenerator(symbolTable,root);\n\t\tcodeGenerator.generateCode();\n\t}",
"private static void compile(\n File macroFile,\n File destinationDirectory,\n String destinationPackage,\n boolean generateCode,\n Strictness strictness,\n Verbosity verbosity)\n throws ParserException, LexerException {\n\n switch (verbosity) {\n case INFORMATIVE:\n case VERBOSE:\n System.out.println(\"Compiling \\\"\" + macroFile + \"\\\"\");\n break;\n }\n\n Start ast;\n\n try {\n FileReader fr = new FileReader(macroFile);\n BufferedReader br = new BufferedReader(fr);\n PushbackReader pbr = new PushbackReader(br, 1024);\n\n switch (verbosity) {\n case VERBOSE:\n System.out.println(\" Parsing\");\n break;\n }\n\n ast = new Parser(new CustomLexer(pbr)).parse();\n\n pbr.close();\n br.close();\n fr.close();\n }\n catch (IOException e) {\n throw CompilerException.inputError(macroFile.toString(), e);\n }\n\n ObjectMacroFront.globalIndex\n = ObjectMacroFront.verifySemantics(ast, strictness, verbosity);\n\n if (generateCode) {\n ObjectMacroFront.generateIntermediateFile(verbosity,\n destinationDirectory, macroFile);\n }\n\n }",
"public String compile (int lineno, Object securityDomain) throws IOException, JavaScriptException {\n Context context = Context.enter();\n Reader reader = new InputStreamReader(program);\n Object ret = context.evaluateReader(instanceScope,\n reader,\n programName,\n lineno,\n securityDomain);\n if (ret instanceof org.mozilla.javascript.Undefined) {\n // This is really 'void'. Perhaps a separate 'compile' method\n // should be used that has 'void' as its return type, and that\n // get used by the likes of the RjsConfigCompiler\n return \"\";\n } else {\n return (String) ret;\n }\n }",
"@Converted(kind = Converted.Kind.AUTO_NO_BODY,\n source = \"${LLVM_SRC}/llvm/lib/Analysis/LoopAccessAnalysis.cpp\", line = 1508,\n FQN=\"llvm::LoopAccessInfo::analyzeLoop\", NM=\"_ZN4llvm14LoopAccessInfo11analyzeLoopEPNS_9AAResultsEPNS_8LoopInfoEPKNS_17TargetLibraryInfoEPNS_13DominatorTreeE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.analysis/llvmToClangType ${LLVM_SRC}/llvm/lib/Analysis/LoopAccessAnalysis.cpp -nm=_ZN4llvm14LoopAccessInfo11analyzeLoopEPNS_9AAResultsEPNS_8LoopInfoEPKNS_17TargetLibraryInfoEPNS_13DominatorTreeE\")\n //</editor-fold>\n private void analyzeLoop(AAResults /*P*/ AA, LoopInfo /*P*/ LI, \n /*const*/ TargetLibraryInfo /*P*/ TLI, \n DominatorTree /*P*/ DT) {\n throw new UnsupportedOperationException(\"EmptyBody\");\n }",
"public void compile(Emitter e)\n {\n for (Expression exp: args)\n {\n exp.compile(e);\n e.emitPush(\"$v0\");\n }\n\n e.emit(\"jal proc\" + name);\n\n for (int i = 0; i < args.size(); i++)\n {\n e.emitPop(\"$t0\");\n }\n }",
"public void cpu() {\n\n\t\tint bytecode;\n\t\tint v1, v2;\n\t\tint address;\n\t\twhile (true) {\n\t\t\tbytecode = code[ip++]; // fetch\n\t\t\t\n\t\t\t//Decode\n\t\t\tswitch (bytecode) {\n\t\t\t\n\t\t\tcase VMParser.PUSH:\n\t\t\t\t//System.out.println(\"PUSH\");\n\t\t\t\tpush(code[ip++]);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.POP:\n\t\t\t\t//System.out.println(\"POP\");\n\t\t\t\tpop();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.ADD:\n\t\t\t\t//System.out.println(\"ADD\");\n\t\t\t\tv2 = pop();\n\t\t\t\tv1 = pop();\n\t\t\t\tpush(v1 + v2);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.SUB:\n\t\t\t\t//System.out.println(\"SUB\");\n\t\t\t\tv2 = pop();\n\t\t\t\tv1 = pop();\n\t\t\t\tpush(v1 - v2);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.MULT:\n\t\t\t\t//System.out.println(\"MULT\");\n\t\t\t\tv2 = pop();\n\t\t\t\tv1 = pop();\n\t\t\t\tpush(v1 * v2);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.DIV:\n\t\t\t\t//System.out.println(\"DIV\");\n\t\t\t\tv2 = pop();\n\t\t\t\tv1 = pop();\n\t\t\t\tpush(v1 / v2);\n\t\t\t\tbreak;\n\n\t\t\tcase VMParser.SW:\n\t\t\t\t//System.out.println(\"SW\");\n\t\t\t\taddress = pop();\n\t\t\t\tv2 = pop();\n\t\t\t\tmemory[address] = v2;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.LW:\n\t\t\t\t//System.out.println(\"LW\");\n\t\t\t\taddress = pop();\n\t\t\t\tpush(memory[address]);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.BRANCHEQUAL:\n\t\t\t\t//System.out.println(\"BRANCHEQUAL\");\n\t\t\t\taddress = code[ip++];\n\t\t\t\tv2 = pop();\n\t\t\t\tv1 = pop();\n\t\t\t\tif (v1 == v2)\n\t\t\t\t\tip = address;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.JS:\n\t\t\t\t//System.out.println(\"JS\");\n\t\t\t\tra = ip;\n\t\t\t\taddress = pop();\n\t\t\t\tip = address;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.LRA:\n\t\t\t\t//System.out.println(\"LRA\");\n\t\t\t\tpush(ra);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.SRA:\n\t\t\t\t//System.out.println(\"SRA\");\n\t\t\t\tra = pop();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.LRV:\n\t\t\t\t//System.out.println(\"LRV\");\n\t\t\t\tpush(rv);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.SRV:\n\t\t\t\t//System.out.println(\"SRV\");\n\t\t\t\trv = pop();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.LHP:\n\t\t\t\t//System.out.println(\"LHP\");\n\t\t\t\tpush(hp);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.SHP:\n\t\t\t\t//System.out.println(\"SHP\");\n\t\t\t\thp = pop();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.LFP:\n\t\t\t\t//System.out.println(\"LFP\");\n\t\t\t\tpush(fp);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.SFP:\n\t\t\t\t//System.out.println(\"SFP\");\n\t\t\t\tfp = pop();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.CFP:\n\t\t\t\t//System.out.println(\"CFP\");\n\t\t\t\tfp = sp;\n\t\t\t\tbreak;\n\n\n\t\t\tcase VMParser.BRANCH:\n\t\t\t\t//System.out.println(\"BRANCH\");\n\t\t\t\taddress = code[ip++];\n\t\t\t\tip = address;\n\t\t\t\tbreak;\n\n\t\t\tcase VMParser.BRANCHLESS:\n\t\t\t\t//System.out.println(\"BRANCHLESS\");\n\t\t\t\taddress = code[ip++];\n\t\t\t\tv2 = pop();\n\t\t\t\tv1 = pop();\n\t\t\t\tif (v1 <= v2)\n\t\t\t\t\tip = address;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.BRANCHGREAT:\n\t\t\t\t//System.out.println(\"BRANCHGREAT\");\n\t\t\t\taddress = code[ip++];\n\t\t\t\tv2 = pop();\n\t\t\t\tv1 = pop();\n\t\t\t\tif (v1 >= v2)\n\t\t\t\t\tip = address;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.PRINT:\n\t\t\t\t//System.out.println(\"PRINT\");\n\t\t\t\tSystem.out.println(memory[sp]);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\tcase VMParser.HALT:\n\t\t\t\t//System.out.println(\"HALT\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}",
"public void executeLDR(){\n\t\tBitString destBS = mIR.substring(4, 3);\n\t\tBitString sourceBS = mIR.substring(7, 3);\n\t\tBitString offset6 = mIR.substring(10, 6);\n\n\t\tBitString wantedVal = mMemory[mRegisters[sourceBS.getValue()].getValue2sComp() + offset6.getValue2sComp()];\n\t\tmRegisters[destBS.getValue()] = wantedVal;\n\n\t\tsetConditionalCode(wantedVal);\n\t}",
"public boolean runCode ( String theCode , String routine ) throws EVASyntaxException , EVASemanticException\r\n\t{\r\n\t\t//Debug.println(\"Going to run code.\");\r\n\t\t//Debug.println(\"Routine = \" + routine );\r\n\t\t\r\n\t\t//ejecutar el segmento init (estados iniciales)\r\n\t\tint curlimit = cont[INIT]; //longitud de init\r\n\t\tfor ( int i = 0 ; i < curlimit ; i++ )\r\n\t\t{\r\n\t\t\tStringTokenizer initTokenizer = new StringTokenizer( segmento[INIT][i] , \":\" );\r\n\t\t\tif ( initTokenizer.countTokens() < 2 )\r\n\t\t\t{\r\n\t\t\t\tthrow( new EVASyntaxException(\r\n\t\t\t\t\"Too few tokens with : at INIT segment, line \" + i + \" (\" + segmento[INIT][i] + \")\" ) );\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tString reg = initTokenizer.nextToken().trim();\r\n\t\t\t\tString val = initTokenizer.nextToken().trim();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Debug.println(\"Initialization done.\");\r\n\t\t\r\n\t\tprogram_counter = getLine ( routine , CODE );\r\n\t\t\r\n\t\t//Debug.println(\"PC = \" + program_counter );\r\n\t\t\r\n\t\tif ( program_counter == -1 )\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t\t//no ejecutado\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\twhile ( runNextInstruction() ) ;\r\n\t\t\tif ( !continue_flag )\r\n\t\t\t\treturn true; //codigo ejecutado\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tcontinue_flag = false;\r\n\t\t\t\treturn false; //esto es si encontramos un continue, devolvemos \"false\" como si\r\n\t\t\t\t//no hubieramos ejecutado el código para que el parser siga ejecutando el comando.\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}",
"private Vector[] generateCode(Matrix gMatrix) throws Exception {\n cg = new CodeGenerator(gMatrix, qValue);\n cg.execute();\n while (!cg.isDone()) {\n if (Thread.interrupted()) {\n cg.cancel(true);\n throw new Exception();\n }\n }\n return cg.get();\n }",
"public static void main(String[] args)\r\n\t{\n\t\tSystem.out.println(\"Jon Heard's JVM Assembler\");\r\n\t\tSystem.out.println(\"version \" + VERSION);\r\n\t\tSystem.out.println(\"----------------------------\");\r\n\t\tSystem.out.println(\" ('-help' or '-h' for help)\");\r\n\t\tSystem.out.println(\"----------------------------\");\r\n\t\t\r\n\t\t/// Parse arguments\r\n\t\tboolean error = false;\r\n\t\tboolean helpTextPrinted = false;\r\n\t\tString sourceFileName = \"\";\t\t\r\n\t\tfor(String arg : args)\r\n\t\t{\r\n\t\t\tif(arg.startsWith(\"-\"))\r\n\t\t\t{\r\n\t\t\t\tif(arg.equals(\"-help\") || arg.equals(\"-h\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tprintHelpText();\r\n\t\t\t\t\thelpTextPrinted = true;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.err.println(\r\n\t\t\t\t\t\t\t\"ERROR: Invalid parameter '\" + arg + \"'.\");\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(!sourceFileName.equals(\"\"))\r\n\t\t\t{\r\n\t\t\t\tSystem.err.println(\"ERROR: Invalid parameter '\" + arg + \"'.\");\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tsourceFileName = arg;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(error || helpTextPrinted) return;\r\n\r\n\t\t/// Make sure we have a source file to load\r\n\t\tif(args.length < 1)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"ERROR: A sourcefile must be included.\");\r\n\t\t\tSystem.err.println(\"\\tExample: \");\r\n\t\t\tSystem.err.println(\"\\tjvmasm MySource.asm\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/// Make sure the source file exists\r\n\t\tFile sourceFile = new File(sourceFileName);\r\n\t\tif(!sourceFile.exists())\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: the source file '\" + sourceFileName +\r\n\t\t\t\t\t\"' does not exist.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/// Load the source file into a string\r\n\t\tString sourceData = UtilMethods.fileToString(sourceFileName);\r\n\t\tif(sourceData == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: Unable to load the source file '\" + sourceFileName +\r\n\t\t\t\t\t\"'.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/// Parse the source file into a ClassRep object\r\n\t\tClassParser parser = new ClassParser();\r\n\t\tClassRep classRep = parser.parseSource(sourceFileName, sourceData);\r\n\t\tif(classRep == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: Failed to parse source file '\" + sourceFileName +\r\n\t\t\t\t\t\"'.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t/// Store the ClassRep into a class file\r\n\t\tString classFileName = classRep.getName() + \".class\";\r\n\t\tif(!UtilMethods.byteArrayToFile(\r\n\t\t\t\tclassRep.getJvmBytes(), classFileName))\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: Failed to write class file '\" + classFileName +\r\n\t\t\t\t\t\"'.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t}",
"public String getCode(ClassDecl cl)\r\n\t{\r\n\t\tString testcode = \"#Region \\\"Testing code generated by KawigiEdit\\\"\\n\";\r\n\t\ttestcode += \"Module MainModule\\n\";\r\n\t\ttestcode += \"\\tSub Main()\\n\";\r\n\t\tEditorDataType returnType = cl.getMethod().getReturnType();\r\n\t\ttestcode += \"\\t\\tDim Errors As Boolean = False\\n\";\r\n\t\ttestcode += \"\\t\\tDim Answer, DesiredAnswer As \" + EditorLanguage.VB.getName(returnType) + \"\\n\";\r\n\t\ttestcode += \"\\t\\tDim Obj As \" + cl.getName() + \"\\n\";\r\n\t\ttestcode += \"\\t\\tDim Time As DateTime\\n\";\r\n\t\tif (returnType.isArrayType())\r\n\t\t{\r\n\t\t\ttestcode += \"\\t\\tDim Same As Boolean\\n\";\r\n\t\t\ttestcode += \"\\t\\tDim i As Integer\\n\";\r\n\t\t}\r\n\t\tboolean stringType = returnType.isType(EditorDataType.String);\r\n\t\tEditorDataType[] paramTypes = cl.getMethod().getParamTypes();\r\n\t\ttestcode += \"\\t\\t<%:start-tests%>\\n\";\r\n\t\tfor (int i=0; i<cl.countTests(); i++)\r\n\t\t{\r\n\t\t\ttestcode += \"\\t\\tObj = New \" + cl.getName() + \"()\\n\";\r\n\t\t\ttestcode += \"\\t\\tTime = DateTime.Now\\n\";\r\n\t\t\ttestcode += \"\\t\\tAnswer = Obj.\" + cl.getMethod().getName() + \"(\" + toTest(cl.getTest(i).getParameters(), paramTypes) + \")\\n\";\r\n\t\t\ttestcode += \"\\t\\tConsole.WriteLine(\\\"Time: \\\" & (DateTime.Now.Subtract(Time)).TotalSeconds & \\\" seconds\\\")\\n\";\r\n\t\t\ttestcode += \"\\t\\tDesiredAnswer = \" + translateObject(returnType, cl.getTest(i).getAnswer()) + \"\\n\";\r\n\t\t\ttestcode += \"\\t\\tConsole.WriteLine(\\\"Your Answer:\\\")\\n\";\r\n\t\t\tif (returnType.isArrayType())\r\n\t\t\t{\r\n\t\t\t\ttestcode += \"\\t\\tConsole.Write(\\\"{ \\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tIf (Answer.Length > 0) Then\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.Write(\" + (stringType ? \"\\\"\\\"\\\"\\\" & \" : \"\") + \"Answer(0)\" + (stringType ? \" & \\\"\\\"\\\"\\\"\" : \"\") + \")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tFor i = 1 To Answer.Length - 1\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\t\\tConsole.Write(\\\"\\t, \" + (stringType ? \"\\\"\\\"\" : \"\") + \"\\\" & Answer(i)\" + (stringType ? \" & \\\"\\\"\\\"\\\"\" : \"\") + \")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tNext\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\" }\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tElse\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"}\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tEnd If\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tConsole.WriteLine(\\\"Desired Answer:\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tConsole.Write(\\\"{ \\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tIf (DesiredAnswer.Length > 0) Then\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.Write(\" + (stringType ? \"\\\"\\\"\\\"\\\" & \" : \"\") + \"DesiredAnswer(0)\" + (stringType ? \" & \\\"\\\"\\\"\\\"\" : \"\") + \")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tFor i = 1 To DesiredAnswer.Length - 1\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\t\\tConsole.Write(\\\", \" + (stringType ? \"\\\"\\\"\" : \"\") + \"\\\" & DesiredAnswer(i)\" + (stringType ? \" & \\\"\\\"\\\"\\\"\" : \"\") + \")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tNext\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\" }\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tElse\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"}\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tEnd If\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tSame = (Answer.Length = DesiredAnswer.Length)\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tIf (Same)\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tFor i = 0 To DesiredAnswer.Length - 1\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\t\\tIf Answer(i) <> DesiredAnswer(i) Then\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\t\\t\\tSame = False\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\t\\tEnd If\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tNext\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tEnd If\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tIf Same Then\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"Match :-)\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tElse\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"DOESN'T MATCH!!!!\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tErrors = True\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tEnd If\\n\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttestcode += \"\\t\\tConsole.WriteLine(\\\"\\t\" + (stringType ? \"\\\"\\\"\" : \"\") + \"\\\" & Answer\" + (stringType ? \" & \\\"\\\"\\\"\\\"\" : \"\") + \")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tConsole.WriteLine(\\\"Desired Answer:\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tConsole.WriteLine(\\\"\\t\" + (stringType ? \"\\\"\\\"\" : \"\") +\"\\\" & DesiredAnswer\" + (stringType ? \" & \\\"\\\"\\\"\\\"\" : \"\") + \")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tIf Answer = DesiredAnswer Then\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"Match :-)\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tElse\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"DOESN'T MATCH!!!!\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tErrors = True\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tEnd If\\n\";\r\n\t\t\t}\r\n\t\t\ttestcode += \"\\t\\tConsole.WriteLine()\\n\";\r\n\t\t}\r\n\t\ttestcode += \"\\t\\t<%:end-tests%>\\n\";\r\n\t\ttestcode += \"\\t\\t\\n\\t\\tIf Errors Then\\n\";\r\n\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"Some of the test cases had errors :-(\\\")\\n\";\r\n\t\ttestcode += \"\\t\\tElse\\n\";\r\n\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"You're a stud (at least on the test data)! :-D \\\")\\n\";\r\n\t\ttestcode += \"\\t\\tEnd If\\n\";\r\n\t\ttestcode += \"\\tEnd Sub\\n\";\r\n\t\ttestcode += \"End Module\\n\";\r\n\t\ttestcode += \"#End Region\\n\";\r\n\t\treturn testcode;\r\n\t}",
"@Override\n\tpublic void compile() {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tPreprocessing p = new Preprocessing();\r\n\t\tp.ZAData();\r\n\t\t//String ZA_dir = \"C:\\\\Users\\\\manja\\\\Google Drive\\\\SJSU\\\\Year 4\\\\CS 185C\\\\Midterm 2\\\\Malware files\\\\zeroaccess\";\r\n\t\t//String[] ZA_samples = p.get_samples(ZA_dir);\r\n\t\t// HashMap<String, Integer> ZA_opcode_dict = opcode_occurrences(ZA_dir,\r\n\t\t// ZA_samples);\r\n\t\t// System.out.println(ZA_opcode_dict);\r\n\t\t//String replace_ZA_dir = \"C:\\\\Users\\\\manja\\\\Google Drive\\\\SJSU\\\\Year 4\\\\CS 185C\\\\Midterm 2\\\\Malware files\\\\replace_za\";\r\n\t\t/* HashMap<String, String> ZA_OPCODE = new HashMap<String, String>() {\r\n\t\t\t{\r\n\t\t\t\tput(\"mov\", \"A\");\r\n\t\t\t\tput(\"push\", \"B\");\r\n\t\t\t\tput(\"call\", \"C\");\r\n\t\t\t\tput(\"cmp\", \"D\");\r\n\t\t\t\tput(\"pop\", \"E\");\r\n\t\t\t\tput(\"jz\", \"F\");\r\n\t\t\t\tput(\"jnz\", \"G\");\r\n\t\t\t\tput(\"add\", \"H\");\r\n\t\t\t\tput(\"test\", \"I\");\r\n\t\t\t\tput(\"lea\", \"J\");\r\n\t\t\t\tput(\"jmp\", \"K\");\r\n\t\t\t\tput(\"retn\", \"L\");\r\n\t\t\t\tput(\"xor\", \"M\");\r\n\t\t\t\tput(\"and\", \"N\");\r\n\t\t\t\tput(\"inc\", \"O\");\r\n\t\t\t\tput(\"sub\", \"P\");\r\n\t\t\t};\r\n\t\t};\r\n\t\tp.copy_replace(ZA_dir, replace_ZA_dir, ZA_samples, ZA_OPCODE);\r\n\t\tString[] ZA_modelData = p.splittingData(replace_ZA_dir);\r\n\t\tfor (String s : ZA_modelData)\r\n\t\t\tSystem.out.println(s);\r\n\t*/\r\n\t}",
"public static void main(String[] args) throws Exception {\n\n VerbaCodePage codePage = VerbaCodePage.fromFile(null, \"SimpleSource.v\");\n StaticSpaceExpression staticSpaceExpression = new StaticSpaceExpression(codePage);\n\n }",
"public static void execute(String className) {\r\n\t\tFile clazz = new File(Constants.MAZE_CODE_DIR);\r\n\t\ttry {\r\n\t\t\tURLClassLoader classLoader = URLClassLoader.newInstance(new URL[] {clazz.toURI( )\r\n\t\t\t\t\t.toURL( )});\r\n\t\t\tClass<?> forName = Class.forName(className, true, classLoader);\r\n\t\t\tMethod declaredMethod = forName.getDeclaredMethod(\"algorithm\", new Class[0]); //$NON-NLS-1$\r\n\t\t\tdeclaredMethod.invoke(forName.newInstance( ), new Object[0]);\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tlogClass.error(\"Error: \" + e.getMessage( ) + Constants.LINE_SEPARATOR, e); //$NON-NLS-1$\r\n\t\t}\r\n\t}",
"public List<AssertionFailure> go() throws IOException,\r\n RecognitionException, CheckerExpception, InterruptedException,\r\n SMTSolverTimeoutException, UnknownResultException {\n Program p = SimpleCParserUtil.createAST(inputFile);\r\n\r\n // Add blocks to make things simpler\r\n // E.g. if(c) stmt; becomes if(c) {stmt;} else {}\r\n p = (Program) new MakeBlockVisitor().visit(p);\r\n\r\n // Do basic checks\r\n // E.g. Variables declared before use\r\n // no duplicate local variables\r\n Checker checker = new Checker();\r\n boolean success = checker.check(p);\r\n if (!success) {\r\n throw new CheckerExpception(checker.getCheckerError());\r\n }\r\n\r\n // Checks whether abstract loop abstraction is turned on\r\n if (clArgs.abstractLoops) {\r\n p = (Program) new LoopAbstractionVisitor().visit(p);\r\n } else {\r\n p = (Program) new LoopUnwinderVisitor(clArgs.unwindingAssertions,\r\n clArgs.unwindDepth).visit(p);\r\n }\r\n\r\n // Carries out predication on the program\r\n p = (Program) new PredicationVisitor().visit(p);\r\n\r\n // Carries out ssa renaming on the program\r\n p = (Program) new SSAVisitor().visit(p);\r\n\r\n // Output the program as text after being transformed (for debugging)\r\n // Comment the code below to hide the output\r\n String programText = new PrinterVisitor().visit(p);\r\n System.out.println(programText);\r\n\r\n // Collect the constraint expressions and variable names\r\n CollectConstraintsVisitor collectConstraintsVisitor = new CollectConstraintsVisitor();\r\n collectConstraintsVisitor.visit(p);\r\n\r\n // Stores the assertion failures\r\n List<AssertionFailure> assertionFailures = new ArrayList<AssertionFailure>();\r\n\r\n // Stop here if there are no assertions (properties) to check\r\n if (collectConstraintsVisitor.propertyExprs.size() == 0) {\r\n System.out.println(\"No asserts! Stopping.\");\r\n return assertionFailures;\r\n }\r\n\r\n // Convert constraints to SMTLIB string\r\n SMTLIBConverter converter = new SMTLIBConverter(collectConstraintsVisitor.variableNames,\r\n collectConstraintsVisitor.transitionExprs, collectConstraintsVisitor.propertyExprs);\r\n String smtQuery = converter.getQuery();\r\n\r\n // Submit query to SMT solver\r\n SMTQuery query = new SMTQuery(smtQuery, clArgs.timeout * 1000);\r\n String queryResult = query.go();\r\n if (queryResult == null) {\r\n throw new SMTSolverTimeoutException(\"Timeout!\");\r\n }\r\n System.out.println(\"--SMT COMPLETE--\");\r\n\r\n // Report the assertions that can be violated\r\n handleAssertionFailures(assertionFailures, collectConstraintsVisitor, queryResult);\r\n\r\n return assertionFailures;\r\n }",
"private String vmCode(ArrayList<String> accessArgs, int size, ArrayList<SystemType> signature) {\n\n if(kind == Kind.Expr) {\n // result = className(args); pc += size\n return String.format(\"%s = %s; pc += %d;\", accessArgs.get(accessArgs.size() - 1),\n call(accessArgs, size, signature), size);\n }\n\n if(kind == Kind.Bool) {\n return String.format(\"pc = %s ? %s : %s;\",\n call(accessArgs, size, signature),\n accessArgs.get(accessArgs.size() - 2), accessArgs.get(accessArgs.size() - 1));\n }\n\n // eg jumps. They know best.\n return call(accessArgs, size, signature);\n }",
"public void translateImplementation( Code code );",
"public abstract Code vreturn();",
"public void run()\n {\n mkdStack = translateMacroStack(mkdStack);\n //translate mkd to html\n translateMkdToHtml();\n //send html string to global variable\n Compiler.htmlString = htmlStackToString();\n }",
"private static Object invoke(CompileResult compileResult, BIRNode.BIRFunction function, String functionName,\n Object[] args, Class<?>[] paramTypes) {\n assert args.length == paramTypes.length;\n\n Object[] jvmArgs = populateJvmArgumentArrays(args);\n\n Object jvmResult;\n PackageManifest packageManifest = compileResult.packageManifest();\n String funcClassName = JarResolver.getQualifiedClassName(packageManifest.org().toString(),\n packageManifest.name().toString(),\n packageManifest.version().toString(),\n getClassName(function.pos.lineRange().fileName()));\n\n try {\n Class<?> funcClass = compileResult.getClassLoader().loadClass(funcClassName);\n Method method = getMethod(functionName, funcClass);\n Function<Object[], Object> func = a -> {\n try {\n return method.invoke(null, a);\n } catch (IllegalAccessException e) {\n throw new RuntimeException(\"Error while invoking function '\" + functionName + \"'\", e);\n } catch (InvocationTargetException e) {\n Throwable t = e.getTargetException();\n if (t instanceof BLangTestException) {\n throw ErrorCreator.createError(StringUtils.fromString(t.getMessage()));\n }\n if (t instanceof io.ballerina.runtime.api.values.BError) {\n throw ErrorCreator.createError(StringUtils.fromString(\n \"error: \" + ((io.ballerina.runtime.api.values.BError) t).getPrintableStackTrace()));\n }\n if (t instanceof StackOverflowError) {\n throw ErrorCreator.createError(StringUtils.fromString(\"error: \" +\n \"{ballerina}StackOverflow {\\\"message\\\":\\\"stack overflow\\\"}\"));\n }\n throw ErrorCreator.createError(StringUtils.fromString(\"Error while invoking function '\" +\n functionName + \"'\"), e);\n }\n };\n\n Scheduler scheduler = new Scheduler(false);\n FutureValue futureValue = scheduler.schedule(jvmArgs, func, null, null, new HashMap<>(),\n PredefinedTypes.TYPE_ANY, \"test\",\n new StrandMetadata(ANON_ORG, DOT, DEFAULT_MAJOR_VERSION.value, functionName));\n scheduler.start();\n if (futureValue.panic instanceof RuntimeException) {\n throw new BLangTestException(futureValue.panic.getMessage(),\n futureValue.panic);\n }\n jvmResult = futureValue.result;\n } catch (ClassNotFoundException | NoSuchMethodException e) {\n throw new RuntimeException(\"Error while invoking function '\" + functionName + \"'\", e);\n }\n\n return jvmResult;\n }",
"public static void main(String[] args) {\n\t\tNode root = null;\r\n\t\tboolean print=false; //是否打印错误信息\r\n\t\ttry {\r\n\t\t\troot = new MiniJavaParser(System.in).Goal();\r\n\t\t\t//System.out.println(\"Program parsed successfully\");\r\n\t\t}\r\n\t\tcatch (ParseException e) {\r\n\t\t\tSystem.out.println(e.toString());\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t\t// 建立符号表,判断是否重定义,是否有循环继承,是否有重载\r\n\t\tSymbolTableVisitor stv = new SymbolTableVisitor();\r\n\t\troot.accept(stv,null);\r\n\t\tif (stv.error.size()!=0) {\r\n\t\t\tSystem.out.println(\"Type error\");\r\n\t\t\t\r\n\t\t\tif (print){\r\n\t\t\t\tfor (int i=0;i<stv.error.size();i++){\r\n\t\t\t\t\tSystem.out.println(stv.error.get(i));\r\n\t\t\t\t}\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\t\r\n\t\t// 类型检查,检查各种类型是否匹配\r\n\t\tTypeCheckVisitor tcv = new TypeCheckVisitor(stv);\r\n\t\troot.accept(tcv,null);\r\n\t\tif (tcv.error.size()!=0) {\r\n\t\t\tSystem.out.println(\"Type error\");\r\n\t\t\t\r\n\t\t\tif (print){\r\n\t\t\t\tfor (int i=0;i<tcv.error.size();i++){\r\n\t\t\t\t\tSystem.out.println(tcv.error.get(i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.exit(1);\r\n\t\t} else {\r\n\t\t\t//System.out.println(\"Program type checked successfully\");\r\n\t\t}\r\n\t\t\r\n\t\t//生成Piglet代码\r\n\t\tPigletGenerateVisitor pg=new PigletGenerateVisitor(stv);\r\n\t\troot.accept(pg,null);\r\n\t}",
"public void compile(final MethodVisitor mv) {\n writeLineInfo(mv);\n if (isTailRecursive) {\n // In case of TCO don't push 'this' onto stack, as we don't want to\n // do a recursive method call!\n }\n else {\n // push 'this'\n mv.visitVarInsn(ALOAD, 0);\n }\n\n if (args != null) {\n // push new array\n mv.visitLdcInsn(args.length);\n mv.visitTypeInsn(ANEWARRAY, \"java/lang/Object\");\n // mv.visitInsn(DUP);\n for (int i = 0; i < args.length; i++) {\n mv.visitInsn(DUP);\n mv.visitLdcInsn(i);\n args[i].compile(mv);\n mv.visitInsn(AASTORE);\n }\n }\n if (isTailRecursive) {\n // update local variables for TCO re-entry\n mv.visitVarInsn(ASTORE, 1);\n // jump to first instruction of the method\n mv.visitJumpInsn(GOTO, methodEntry);\n\n }\n else {\n // classic recursive this.apply(args) invocation\n \tmv.visitMethodInsn(INVOKEINTERFACE, getName(Function.class), \"apply\",\n \"([Ljava/lang/Object;)Ljava/lang/Object;\");\n }\n }"
] |
[
"0.6850367",
"0.65904516",
"0.65240043",
"0.64722455",
"0.6366433",
"0.6365691",
"0.6284032",
"0.62275195",
"0.6050799",
"0.6003698",
"0.597407",
"0.59189916",
"0.5877601",
"0.5865632",
"0.5861501",
"0.5777998",
"0.5746916",
"0.5733209",
"0.5687163",
"0.56568146",
"0.56563187",
"0.5652729",
"0.56509167",
"0.5637309",
"0.56263745",
"0.5620393",
"0.56158453",
"0.5614584",
"0.5614338",
"0.56061924",
"0.55741745",
"0.5564173",
"0.5548899",
"0.5539553",
"0.55163234",
"0.55128807",
"0.5508696",
"0.5506511",
"0.54694635",
"0.5467949",
"0.5463757",
"0.5462425",
"0.5440506",
"0.5437077",
"0.5432076",
"0.5427712",
"0.5413894",
"0.5406806",
"0.5403531",
"0.54033184",
"0.53981864",
"0.53872883",
"0.5379486",
"0.53730184",
"0.5368631",
"0.5368178",
"0.53655946",
"0.5358183",
"0.53520215",
"0.53508896",
"0.5345948",
"0.5336291",
"0.5334379",
"0.53327185",
"0.532926",
"0.5327932",
"0.53219867",
"0.5319503",
"0.5315125",
"0.53135014",
"0.530728",
"0.5291992",
"0.5291099",
"0.5263958",
"0.52595985",
"0.5257632",
"0.524972",
"0.52340233",
"0.5231737",
"0.5222362",
"0.52150387",
"0.5214116",
"0.52133375",
"0.52044487",
"0.52022874",
"0.51975524",
"0.5193089",
"0.5189917",
"0.5188853",
"0.5174559",
"0.5159869",
"0.5151041",
"0.5145172",
"0.5124925",
"0.5122689",
"0.5118724",
"0.51129323",
"0.5109698",
"0.5102208",
"0.509769"
] |
0.73877305
|
0
|
Run a Lava Compilation
|
public static String run(Compilation compilation) throws Exception {
for (String code : compilation.jFiles) {
ClassFile classFile = new ClassFile();
classFile.getClassName();
classFile.readJasmin(new StringReader(code), "", false);
Path outputPath = tempDir.resolve(classFile.getClassName() + ".class");
try (OutputStream output = Files.newOutputStream(outputPath)) {
classFile.write(output);
}
}
return runJavaClass(tempDir, JasminTemplate.MAIN_CLASS_NAME);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static String compileAndRun(String code) throws Exception {\n\t\treturn run(LavaCompiler.compile(code));\n\t}",
"public static void main(String[] args) {\n File file = new File(\"./src/testcode.c\");\n \n Compiler compiler = new Compiler(file);\n compiler.compile();\n }",
"private static void compileAndRun(String fileName, String code) {\n\n if(verboseCompiling) println(\"Deleting old temp files...\", warning);\n new File(fileName + \".java\").delete();\n new File(fileName + \".class\").delete();\n\n if(verboseCompiling) println(\"Creating source file...\", progErr);\n file = new File(fileName + \".java\");\n\n if(verboseCompiling) println(\"Writing code to source file...\", progErr);\n try {\n new FileWriter(file).append(code).close();\n } catch (IOException i) {\n println(\"Had an IO Exception when trying to write the code. Stack trace:\", error);\n i.printStackTrace();\n return; //Exit on error\n }\n\n if(verboseCompiling) println(\"Compiling code...\", progErr);\n //This should only ever be called if the JDK isn't installed. How you'd get here, I don't know.\n if (compiler == null) {\n println(\"Fatal Error: JDK not installed. Go to java.sun.com and install.\", error);\n return;\n }\n\n //Tries to compile. Success code is 0, so if something goes wrong, report.\n int result = -1;\n if (compileOptions.trim().equals(\"\"))\n result = compiler.run(null, out, err, file.getAbsolutePath());\n else\n //result = compiler.run(null, out, err, compileOptions, file.getAbsolutePath());\n result = compiler.run(null, out, err, \"-cp\", \"/Users/student/Desktop/bluecove-2.1.0.jar\", file.getAbsolutePath());\n //ArrayList<String> files = new ArrayList<>();\n //files.add(fileName);\n //boolean result = compiler.getTask(null, null, new ErrorReporter(), null, files, null).call();\n if (result != 0) {\n displayLog();\n //println(\"end record\", error); //End recording and pull out the message\n\n //println(\"Error type: \" + result,error);\n println(\"Failed to compile.\", warning);\n return; //Return on error\n }\n\n if(verboseCompiling) println(\"Attempting to run code...\", progErr);\n try {\n //Makes sure the JVM resets if it's already running.\n if(JVMrunning) \n kill();\n\n //Clears terminal window on main method call.\n if(clearOnMethod)\n outputText.setText(\"\");\n\n //Some String constants for java path and OS-specific separators.\n String separator = System.getProperty(\"file.separator\");\n String path = System.getProperty(\"java.home\")\n + separator + \"bin\" + separator + \"java\";\n\n //Creates a new process that executes the source file.\n ProcessBuilder builder = null;\n if(runOptions.trim().equals(\"\")) \n builder = new ProcessBuilder(path, fileName);\n else \n builder = new ProcessBuilder(path, runOptions, fileName);\n\n //Everything should be good now. Everything past this is on you. Don't mess it up.\n println(\"Build succeeded on \" + java.util.Calendar.getInstance().getTime().toString(), progErr);\n println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\", progErr); \n\n //Tries to run compiled code.\n JVM = builder.start();\n JVMrunning = true;\n\n //Links runtime out/err to our terminal window. No support for input yet.\n Reader errorReader = new InputStreamReader(JVM.getErrorStream());\n Reader outReader = new InputStreamReader(JVM.getInputStream());\n //Writer inReader = new OutputStreamWriter(JVM.getOutputStream());\n\n redirectErr = redirectIOStream(errorReader, err);\n redirectOut = redirectIOStream(outReader, out);\n //redirectIn = redirectIOStream(null, inReader);\n } catch (IOException e) {\n //JVM = builder.start() can throw this.\n println(\"IOException when running the JVM.\", progErr);\n e.printStackTrace();\n displayLog();\n return;\n }\n }",
"protected void compile(String[] args) {\n String[] commandArray = null;\n File tmpFile = null;\n\n try {\n String myos = System.getProperty(\"os.name\");\n\n\n if (myos.toLowerCase().indexOf(\"windows\") >= 0 \n && args.length > 250) {\n PrintWriter out = null;\n try {\n tmpFile = new File(\"jikes\"+(new Random(System.currentTimeMillis())).nextLong());\n out = new PrintWriter(new FileWriter(tmpFile));\n for (int i = 0; i < args.length; i++) {\n out.println(args[i]);\n }\n out.flush();\n commandArray = new String[] { command, \n \"@\" + tmpFile.getAbsolutePath()};\n } catch (IOException e) {\n throw new BuildException(\"Error creating temporary file\", e);\n } finally {\n if (out != null) {\n try {out.close();} catch (Throwable t) {}\n }\n }\n } else {\n commandArray = new String[args.length+1];\n commandArray[0] = command;\n System.arraycopy(args,0,commandArray,1,args.length);\n }\n \n try {\n Execute exe = new Execute(jop);\n exe.setAntRun(project);\n exe.setWorkingDirectory(project.getBaseDir());\n exe.setCommandline(commandArray);\n exe.execute();\n } catch (IOException e) {\n throw new BuildException(\"Error running Jikes compiler\", e);\n }\n } finally {\n if (tmpFile != null) {\n tmpFile.delete();\n }\n }\n }",
"private static int compile(String filename) throws Exception {\n\t\tInputStream inp = new BufferedInputStream(new FileInputStream(filename));\n\t\tParser parser = new Parser(inp);\n\t\tjava_cup.runtime.Symbol parseTree = null;\n\t\ttry {\n\t\t\tparseTree = parser.parse();\n\t\t} catch (Throwable e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new Error(e.toString());\n\t\t} finally {\n\t\t\tinp.close();\n\t\t}\n\t\t\n\t\tDecls tree = (Decls) parseTree.value;\n\t\t\n\t\tSemantic semant = new Semantic();\n\t\tsemant.checkProg(tree);\n\t\tif (semant.hasError()) {\n\t\t\tsemant.printErrors();\n\t\t\treturn 1;\n\t\t} else {\n\t\t\t//System.out.println(\"Semant: OK\");\n\t\t\tLabel.fcount = 0;\n\t\t\t\n\t\t\tLabel topLabel = new Label(\"main\");\n\t\t\tLevel topLevel = new Level();\n\t\t\tTranslate translate = new Translate();\n\t\t\ttranslate.transProg(tree, topLabel, topLevel);\n\t\t\tList<CompileUnit> units = translate.getUnits();\n\t\t\t\n\t\t\t//=============================== Optimize =================================\n\t\t\tAnalyzer analyzer = new Analyzer();\n\t\t\tLabelEliminator le = new LabelEliminator();\n\t\t\t\n\t\t\tfor (CompileUnit u : units) {\n\t\t\t\t//System.out.println(u.getQuads().get(0));\n\t\t\t\tu.replaceBranches(analyzer);\n\t\t\t\tu.findBasicBlocks(analyzer);\n\t\t\t\tu.findLiveness(analyzer);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfor (CompileUnit u: units) {\n\t\t\t\tList<Quad> qs = u.getQuads();\n\t\t\t\tfor (Quad q: qs) {\n\t\t\t\t\tif (q instanceof MoveL)\n\t\t\t\t\t\t((MoveL)q).src.used = true;\n\t\t\t\t}\n\t\t\t\tGotoCompression.process(u);\n\t\t\t}\n\t\t\t\n\t\t\tLocalCopyPropagation lcp = new LocalCopyPropagation();\n\t\t\tDeadCodeEliminator dce = new DeadCodeEliminator();\n\t\t\tAvailableExpressionAnalyzer aea = new AvailableExpressionAnalyzer();\n\t\t\tCommonExpressionEliminator cse = new CommonExpressionEliminator();\n\t\t\tfor (CompileUnit u : units) {\n\t\t\t\tList<Quad> oldQuads = new LinkedList<Quad>();\n\t\t\t\t//int cnt = 0;\n\t\t\t\tdo {\n\t\t\t\t\toldQuads.clear();\n\t\t\t\t\toldQuads.addAll(u.getQuads());\n\t\t\t\t\t\n\t\t\t\t\tdo {\n\t\t\t\t\t\tu.findBasicBlocks(analyzer);\n\t\t\t\t\t\taea.analyze(u.getBasicBlocks());\n\t\t\t\t\t\t//System.out.println(++cnt);\n\t\t\t\t\t}\n\t\t\t\t\twhile (cse.eliminate(u));\n\n\t\t\t\t\tfor (BasicBlock bb : u.getBasicBlocks()) {\n\t\t\t\t\t\tlcp.process(bb);\n\t\t\t\t\t}\n\n\t\t\t\t\tu.findLiveness(analyzer);\n\t\t\t\t\tdce.process(u);\n\t\t\t\t\tu.findBasicBlocks(analyzer);\n\t\t\t\t\tu.findLiveness(analyzer);\n\t\t\t\t\twhile (le.eliminate(u));\n\t\t\t\t}\n\t\t\t\twhile (!u.getQuads().equals(oldQuads));\n\t\t\t}\n\t\t\t\n\t\t\t//========================================================================\n\t\t\tCodegen codegen = new Codegen();\n\t\t\tcodegen.gen(new Assem(\".data\"));\n\t\t\tcodegen.gen(new Assem(\".align 2\"));\n\t\t\tcodegen.gen(new Assem(\".globl args\"));\n\t\t\tcodegen.gen(new Assem(\"!args:\\t.space %\", (Translate.maxArgc + 1) * 4));\n\t\t\tcodegen.gen(new Assem(\".align 2\"));\n\t\t\tfor (DataFrag df: translate.getDataFrags())\n\t\t\t\tif (df.label.used)\n\t\t\t\t\tcodegen.gen(df.gen());\n\t\t\t\n\t\t\tcodegen.gen(new Assem(\".text\"));\n\t\t\tcodegen.gen(new Assem(\".align 2\"));\n\t\t\tcodegen.gen(new Assem(\".globl main\"));\n\t\t\t\n\t\t\tfor (CompileUnit u: units)\n\t\t\t\tcodegen.gen(u, new LinearScan(u, analyzer));/**/\n\n\t\t\t//System.out.println((System.nanoTime() - start) / 1000000 + \" ms\");\n\t\t\t//PrintStream out = System.out;\n\t\t\tPrintStream out = new PrintStream(new BufferedOutputStream(new FileOutputStream(\"assem.s\")));\n\t\t\tout.println(\"########################################\");\n\t\t\tout.println(\"############### CODE GEN ###############\");\n\t\t\tout.println(\"########################################\");\n\t\t\tcodegen.flush(out);\n\t\t\tout.println(\"########################################\");\n\t\t\tout.println(\"############# RUNTIME CODE #############\");\n\t\t\tout.println(\"########################################\");\n\t\t\t//Scanner scanner = new Scanner(new FileInputStream(new File(\"runtime.s\")));\n\t\t\t//while (scanner.hasNextLine()) {\n\t\t\t//\tout.println(scanner.nextLine());\n\t\t\t//}\n\t\t\t//scanner.close();\n\t\t\tout.close();\n\t\t\treturn 0;\n\t\t}\n\t}",
"public void compile(String[] args){\n CharStream stream;\n if(args.length == 1){\n try {\n stream = new ANTLRFileStream(args[0]);\n } catch (IOException e) {\n System.err.println(\"Ocorreu um problema ao tentar ler o ficheiro \\\"\" + args[0] + \"\\\".\");\n e.printStackTrace();\n return;\n }\n } else{\n try {\n stream = new ANTLRInputStream(System.in);\n } catch (IOException e) {\n System.err.println(\"Ocorreu um problema ao tentar ler do stdin.\");\n e.printStackTrace();\n return;\n }\n }\n\n System.out.println(stream.toString());\n\n LissLexer lexer = new LissLexer(stream);\n TokenStream token = new CommonTokenStream(lexer);\n LissParser parser = new LissParser(token);\n parser.liss(this.idt,this.errorTable,this.mips);\n }",
"private int run(Iterable<String> args) throws IOException {\n Path outputErrors = null;\n boolean expectFailure = false;\n boolean expectWarnings = false;\n boolean exportTestFunctions = false;\n\n // Compiler flags we want to read.\n Path jsOutputFile = null;\n Path createSourceMap = null;\n\n // Parse flags in an ad-hoc manner.\n List<String> passThroughArgs = new ArrayList<>(1024);\n PeekingIterator<String> iargs = Iterators.peekingIterator(args.iterator());\n while (iargs.hasNext()) {\n String arg = iargs.next();\n switch (arg) {\n case \"--output_errors\":\n outputErrors = Paths.get(iargs.next());\n continue;\n case \"--expect_failure\":\n expectFailure = true;\n continue;\n case \"--expect_warnings\":\n expectWarnings = true;\n continue;\n case \"--export_test_functions\":\n exportTestFunctions = true;\n continue;\n case \"--js_output_file\":\n jsOutputFile = Paths.get(iargs.peek());\n break;\n case \"--create_source_map\":\n createSourceMap = Paths.get(iargs.peek());\n break;\n default:\n break;\n }\n passThroughArgs.add(arg);\n }\n\n // Run the compiler, capturing error messages.\n boolean failed = false;\n Compiler compiler = new Compiler();\n LightweightMessageFormatter errorFormatter = new LightweightMessageFormatter(compiler);\n errorFormatter.setColorize(true);\n JsCheckerErrorManager errorManager = new JsCheckerErrorManager(errorFormatter);\n compiler.setErrorManager(errorManager);\n Runner runner = new Runner(passThroughArgs, compiler, exportTestFunctions);\n if (runner.shouldRunCompiler()) {\n failed |= runner.go() != 0;\n }\n failed |= runner.hasErrors();\n\n // Output error messages based on diagnostic settings.\n if (!expectFailure && !expectWarnings) {\n for (String line : errorManager.stderr) {\n System.err.println(line);\n }\n System.err.flush();\n }\n if (outputErrors != null) {\n Files.write(outputErrors, errorManager.stderr, UTF_8);\n }\n if (failed && expectFailure) {\n // If we don't return nonzero, Bazel expects us to create every output file.\n if (jsOutputFile != null) {\n Files.write(jsOutputFile, EMPTY_BYTE_ARRAY);\n }\n if (createSourceMap != null) {\n Files.write(createSourceMap, EMPTY_BYTE_ARRAY);\n }\n }\n if (!failed && expectFailure) {\n System.err.println(\"ERROR: Expected failure but didn't fail.\");\n }\n return failed == expectFailure ? 0 : 1;\n }",
"public abstract void compile();",
"protected void compile() throws FileNotFoundException, DebuggerCompilationException{\n String[] compileArgs = new String[5];\n String cOutFile = Integer.toString(handle);//filename + Integer.toString(handle);\n String outArg = cOutFile;\n compileArgs[0] = ocamlCompileC;\n compileArgs[1] = \"-g\";\n compileArgs[2] = filename;\n compileArgs[3] = \"-o\";\n compileArgs[4] = cOutFile;\n outFile = cOutFile;\n\n /* Start the ocamlc compiler */\n Process compileProcess;\n try{\n compileProcess = runtime.exec(compileArgs);\n }catch(IOException e){\n System.out.println(\"HERE\");\n throw new DebuggerCompilationException();\n //}catch(FileNotFoundException f){\n // throw new FileNotFoundException();\n }\n OutputStreamWriter compileWriter = new OutputStreamWriter(compileProcess.getOutputStream());\n\n InputStream processInputStream = compileProcess.getInputStream();\n\n /* Create a DebugListener to read the output */\n DebugListener compileReader = new DebugListener(processInputStream, this.observers, handle);\n\n compileReader.start();\n \n try{\n Thread.sleep(2000);\n }catch(Exception e){\n\n }\n\n }",
"void compileToJava();",
"private void runBuild(LinkedList<String> featureArgs, IFolder sourceFolder,\r\n\t\t\tIFolder buildFolder) {\r\n\r\n\t\tCPPWrapper cpp = new CPPWrapper();\r\n\r\n\t\tLinkedList<String> compilerArgs = new LinkedList<String>(featureArgs);\r\n\t\tLinkedList<String> fileList = new LinkedList<String>();\r\n\t\ttry {\r\n\t\t\tcreateBuildFolder(buildFolder);\r\n\t\t\tprepareFilesConfiguration(featureArgs, fileList, sourceFolder,\r\n\t\t\t\t\tbuildFolder, cpp);\r\n\r\n\t\t\t// If the typeChefAnalyzes conclude that the user don't want to\r\n\t\t\t// proceeed the compilation in case of error or the user only\r\n\t\t\t// wants preprocess files, return without\r\n\t\t\t// doing it.\r\n\t\t\tif (!continueCompilationFlag) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tcompilerArgs.addAll(fileList);\r\n\t\t\tcompilerArgs.add(\"-o\");\r\n\t\t\tcompilerArgs.add(buildFolder.getLocation().toOSString()\r\n\t\t\t\t\t+ File.separator + buildFolder.getName());\r\n\t\t\tcpp.runCompiler(compilerArgs);\r\n\t\t} catch (CoreException e) {\r\n\t\t\tFeatureAnalyzer.getDefault().logError(e);\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\r\n\t\tString appname=\"Miniz.apk\";\r\n\t\t\t\t\t\t\t\t\t//for creation of entrypoint providing the application and android jar\r\n\t//Options.v().setPhaseOption(\"cg.cha\",\"on\");\r\n\tSetupApplication app = new\tSetupApplication(\"android.jar\",appname);\r\n\ttry {\r\n\t \t\t app.calculateSourcesSinksEntrypoints(\"SourceAndSinks.txt\");\t\t \t\t\t\r\n\t} catch (Exception e) {\r\n\t\te.printStackTrace();\r\n }\r\n\tsoot.G.reset();\r\n\t//set soot options\r\n\tOptions.v().set_src_prec(Options.src_prec_apk);\r\n\tOptions.v().set_process_dir(Collections.singletonList(appname));\r\n\tOptions.v().set_force_android_jar(\"android.jar\");\r\n\tOptions.v().set_whole_program(true);\r\n\tOptions.v().set_allow_phantom_refs(true);\r\n\t//For Handling the Junit test cases output the result into Jimple files\r\n\tOptions.v().set_output_format(Options.output_format_J);\r\n\t//For the code execution \r\n\t//Options.v().set_output_format(Options.output_format_dex);\r\n\tOptions.v().setPhaseOption(\"cg.spark verbose:true\",\"on\");\r\n\tOptions.v().setPhaseOption(\"on-fly-cg\",\"true\");\r\n\t//Renaming dummy main method as void main(String args) for sending the cfg in VASCO\r\n\tList<Type> s = new ArrayList<Type>();\r\n\ts=Arrays.asList(new Type[]{\r\n\tsoot.ArrayType.v(soot.RefType.v(\"java.lang.String\"), 1)\r\n\t});\r\n\t//creating dummy main\r\n\tSootMethod entryPoint =app.getEntryPointCreator().createDummyMain();\r\n\tentryPoint.setName(\"main\");\r\n\tentryPoint.setParameterTypes(s);\r\n\tChain<Unit> u1=entryPoint.getActiveBody().getUnits();\r\n Unit first=u1.getFirst();\r\n //Replacing the constant intitialization of dummy main variable by randomnumber for VASCO doesnt remove any branches from dummy main\r\n Scene.v().loadClassAndSupport(\"java.lang.Math\");\r\n SootMethod sm=Scene.v().getMethod(\"<java.lang.Math: double random()>\");\r\n SootMethodRef smRef=sm.makeRef();\r\n if(first instanceof AssignStmt){\r\n \tValue lhsOp = ((AssignStmt) first).getLeftOp();\r\n Value rhsOp = ((AssignStmt) first).getRightOp();\r\n if(lhsOp instanceof Local && rhsOp instanceof Constant){\r\n \tu1.removeFirst();\r\n u1.addFirst(Jimple.v().newAssignStmt(lhsOp, Jimple.v().newStaticInvokeExpr(smRef)));\r\n }\r\n }\r\n\r\n Scene.v().loadNecessaryClasses();\r\n System.out.println(\"Class::--\"+entryPoint.getDeclaringClass()+\"\\n Dummy Main....-->\"+ entryPoint.getActiveBody());\r\n\tScene.v().setEntryPoints(Collections.singletonList(entryPoint));\r\n\tOptions.v().set_main_class(entryPoint.getDeclaringClass().getName());\r\n\tPackManager.v().runPacks();\r\n\tcg = Scene.v().getCallGraph();\r\n \t\r\n\t\r\n\t//function to get all the methods existing in the call graph\r\n\trecursive(entryPoint);\r\n\t//Printing the methods in the call graph \r\n\tfor(Entry<String, Boolean> eSet : visited.entrySet()){\r\n\t\t\tString value=eSet.getKey().toString();\r\n\t\t\tSystem.out.println(\"Methods in callg graph: \"+value);\r\n\t}\r\n\t\r\n\tList<SootMethod> unusedmethods=new ArrayList<SootMethod>();\t\r\n\tSystem.out.println(\"All::-->\");\r\n\t//Fetching all the methods in the Application and storing the unused methods in a list(unusedmethods)\r\n\tChain<SootClass> clas=Scene.v().getApplicationClasses();\r\n\tfor(SootClass abc1:clas){\r\n\t \tSootClass sClass=Scene.v().loadClassAndSupport(abc1.getName());\r\n\t \tList <SootMethod> methods=sClass.getMethods();\r\n\t\t\t \tfor(SootMethod a: methods){\r\n\t \t\tSystem.out.println( a.getSignature());\r\n\t \t\tif(visited.containsKey(a.getSignature()))\r\n\t \t\t\tcontinue;\r\n\t \t\telse{\r\n\t \t\t\t//Handling classes which extends View and the attributes are not defined in Layout.xml , Handling all init & access functions and Handler functions along with SQLiteDatabase Helper \r\n\t \t\t \t\t\tif(!(a.getSubSignature().contains(\"void <init>\") || a.getSubSignature().contains(\"void <clinit>\") || a.getSubSignature().contains(\"access$\") || a.getDeclaringClass().getSuperclass().getName().contains(\"SQLiteOpenHelper\"))){\r\n\t \t\t \t\t\t\tif(a.getDeclaringClass().getSuperclass().getName().equals(\"android.view.View\") || a.getDeclaringClass().getSuperclass().getName().contains(\"android.os.Handler\")){\r\n\t \t\t \t\t\t\t\tList<SootMethod> methodlist=a.getDeclaringClass().getSuperclass().getMethods();\r\n\t \t\t\t \t\t\t\tint flag=0;\r\n\t \t\t\t \t\t\t\tfor(SootMethod ab: methodlist){\r\n\t \t\t\t \t\t\t\t\tif(ab.getSubSignature()==a.getSubSignature()){// && !unusedmethods.contains(a))\r\n\t \t\t\t \t\t\t\t\t\tflag=1;\r\n\t \t\t\t \t\t\t\t\t\tbreak;\r\n\t \t\t\t \t\t\t\t\t}\r\n\t \t\t\t \t\t\t\t}\r\n\t \t\t\t \t\t\t\tif(flag!=1)\r\n\t \t\t\t \t\t\t\t\tunusedmethods.add(a);\r\n\t \t\t\t \t\t\t}\r\n\t \t\t \t\t\t\telse\r\n\t \t\t\t \t\t\t\tunusedmethods.add(a);\r\n\t \t\t\t\t}\r\n\t \t\t\t\t\r\n\t \t\t\t\r\n\t \t\t}\r\n\r\n\t \t}\r\n\t }\r\n\t \r\n\t //Handling the functions when the class implements interface\r\n\t List<SootMethod> delm = new ArrayList<SootMethod>();\r\n\t List<SootMethod> un=unusedmethods;\r\n\t for(SootMethod m:un){\r\n\t\t \t if(m.getDeclaringClass().getInterfaceCount()>0){\r\n\t\t\t\t\t Chain<SootClass> interfaces=m.getDeclaringClass().getInterfaces();\r\n\t\t\t\t\t for(SootClass c:interfaces){\r\n\t\t\t\t\t\t List<SootMethod> smi=c.getMethods();\r\n\t\t\t\t\t\t for(SootMethod m1:smi){\r\n\t\t\t\t\t\t\t if(m1.getName().contains(m.getName())){\r\n\t\t\t\t\t\t\t\t delm.add(m);\t\t\t\t \r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t }\r\n\t\t\t \r\n\t\t\t }\r\n\t }\r\n\t for(SootMethod m1:delm){\r\n\t\t unusedmethods.remove(m1);\r\n\t }\r\n\r\n\t //Handling Reflection methods\r\n\t for(SootMethod a: un){\r\n\t\t\tSootClass classWeNeedToLoad = a.getDeclaringClass();\r\n\t\t\tfor(Map.Entry<String,String> entry: Driver.runmethods.entrySet()){\r\n\t\t\t//\tif(!(entry.getKey().contains(classWeNeedToLoad.toString()) && a.getName().contains(entry.getValue())))\r\n\t\t\t\tif(entry.getValue().contains(a.getName()) && entry.getKey().contains(classWeNeedToLoad.toString())){\r\n\t\t\t\t\tunusedmethods.remove(a);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} \r\n\t \r\n\t //Remove the unused methods\t \r\n\t for(SootMethod a: unusedmethods){\r\n\t \tSootClass classWeNeedToLoad = a.getDeclaringClass();\r\n\t \tclassWeNeedToLoad.removeMethod(a);\r\n\t\t}\r\n\t\r\n\r\n\t//Calling Vasco for interprocedural analysis \r\n\tInterproceduralAnalysis ipa = new InterproceduralAnalysis(new EmptyReporter());\r\n\tipa.doAnalysis();\r\n\tprint();\r\n\t//Deleting the ifs with constant result\r\n\tdeleteifs(ifStmts);\r\n\t\r\n\t//Write the apk\r\n\tPackManager.v().writeOutput();\r\n}",
"public static void main(final String[] args) throws BindException, InjectionException {\n // TODO : build LocalRuntimeConfiguration\n\n /*\n final Tang tang = Tang.Factory.getTang();\n\n final JavaConfigurationBuilder cb = tang.newConfigurationBuilder();\n\n try {\n new CommandLine(cb)\n .registerShortNameOfClass(Local.class)\n .registerShortNameOfClass(TimeOut.class)\n .registerShortNameOfClass(LinearSGD_REEF.InputDir.class)\n .processCommandLine(args);\n\n } catch (final IOException ex) {\n LOG.log(Level.SEVERE, \"Configuration error: cannot load data\", ex);\n throw new RuntimeException(\"Configuration error: cannot load data\", ex);\n }\n\n final Injector injector = tang.newInjector(cb.build());\n\n final boolean isLocal = injector.getNamedInstance(Local.class);\n final int jobTimeout = injector.getNamedInstance(TimeOut.class);\n final String inputDir = injector.getNamedInstance(LinearSGD_REEF.InputDir.class);\n\n final Configuration runtimeConfiguration;\n if (isLocal) {\n LOG.log(Level.INFO, \"Running on the local runtime\");\n runtimeConfiguration = LocalRuntimeConfiguration.CONF\n .set(LocalRuntimeConfiguration.NUMBER_OF_THREADS, NUM_LOCAL_THREADS).build();\n } else {\n LOG.log(Level.INFO, \"Running on YARN\");\n runtimeConfiguration = YarnClientConfiguration.CONF.build();\n }\n\n final EvaluatorRequest computeRequest = EvaluatorRequest.newBuilder()\n .setNumber(NUM_COMPUTE_EVALUATORS)\n .setMemory(1024)\n .setNumberOfCores(4)\n .build();\n\n final Configuration dataLoadConfiguration = new DataLoadingRequestBuilder()\n .setMemoryMB(1024)\n .setInputFormatClass(TextInputFormat.class)\n .setInputPath(inputDir)\n .setNumberOfDesiredSplits(NUM_SPLITS)\n .setComputeRequest(computeRequest)\n .setDriverConfigurationModule(DriverConfiguration.CONF\n .set(DriverConfiguration.GLOBAL_LIBRARIES, EnvironmentUtils.getClassLocation(LinearSGD_Driver.class))\n .set(DriverConfiguration.ON_CONTEXT_ACTIVE, LinearSGD_Driver.ContextActiveHandler.class)\n .set(DriverConfiguration.ON_TASK_COMPLETED, LinearSGD_Driver.TaskCompletedHandler.class)\n .set(DriverConfiguration.DRIVER_IDENTIFIER, \"DataLoadingREEF\"))\n .build();\n\n final LauncherStatus status = run(runtimeConfiguration, JOB_TIMEOUT);\n */\n final Configuration runtimeConfiguration = LocalRuntimeConfiguration.CONF\n .set(LocalRuntimeConfiguration.NUMBER_OF_THREADS, NUM_LOCAL_THREADS)\n .build();\n final LauncherStatus status = run(runtimeConfiguration, TIMEOUT);\n LOG.log(Level.INFO, \"REEF job completed: {0}\", status);\n }",
"public void compile(MindFile f) {\n \t\t\n \t}",
"Lighter build();",
"@Override\n\tpublic void compile(CodeBlock c, CompilerEnvironment environment) {\n\n\t}",
"public Object run() {\n \n try {\n try {\n \n String targetArch=JNITargetArch.getTargetArch();\n // System.out.println(\"TargetArch: \"+targetArch);\n JCALibrary jca=JCALibrary.getInstance();\n \n \n String libPath=jca.getProperty( \"gov.aps.jca.jni.epics.\"+targetArch+\n \".library.path\", \"\" );\n loadLibrary( libPath, \"Com\" );\n loadLibrary( libPath, \"ca\" );\n \n File caRepeaterPath=new File( jca.getProperty(\n \"gov.aps.jca.jni.epics.\"+targetArch+\".caRepeater.path\", \"\" ) );\n try {\n String caRepeater=\"caRepeater\";\n if( caRepeaterPath.exists() ) {\n caRepeater= ( new File( caRepeaterPath, \"caRepeater\" ) ).\n getAbsolutePath();\n \n }\n Runtime.getRuntime().exec( caRepeater );\n } catch( java.io.IOException ex ) {\n Runtime.getRuntime().exec( \"caRepeater\" );\n }\n } catch( Throwable ex2 ) {\n // System.out.println(ex2);\n }\n // System.out.println(\"Loading jca2\");\n System.loadLibrary( \"jca\" );\n \n return null; // nothing to return\n } catch( Exception ex1 ) {\n // System.out.println(ex1);\n return ex1;\n }\n }",
"public static void main(String[] args) throws Exception {\n if (args.length > 0) {\n // The last command line arg is the source file name\n String inputFile = args[args.length - 1];\n InputStream is = new FileInputStream(inputFile);\n CharStream input = CharStreams.fromStream(is);\n\n // Create the lexer and parser objects and a token stream \"pipe\" between them\n BantamJavaLexer lexer = new BantamJavaLexer(input);\n CommonTokenStream tokens = new CommonTokenStream(lexer);\n BantamJavaParser parser = new BantamJavaParser(tokens);\n\n // Launch the parser\n // https://github.com/antlr/antlr4/blob/master/doc/listeners.md\n BantamJavaParser.ProgramContext tree = parser.program();\n ParserListener listener = new ParserListener();\n ParseTreeWalker.DEFAULT.walk(listener, tree); // initiate walk of tree with listener in use of default walker\n\n ErrorReporter reporter = new ErrorReporter();\n\n // BantamJavaVisitor semantics = new SemanticAnalyzer(listener.getGlobalScope());\n BantamJavaVisitor semantics1 = new SemanticAnalyzer(reporter);\n semantics1.visit(tree);\n BantamJavaVisitor semantics2 = new SemanticAnalyzer2(reporter);\n semantics2.visit(tree);\n\n // Print the parse tree\n System.out.println(tree.toStringTree(parser)); // print tree as text <label id=\"code.tour.main.7\"/>\n\n if (reporter.getErrorCount() == 0) {\n BantamJavaVisitor codeGen = new CodeGenerator(reporter);\n codeGen.visit(tree);\n }\n }\n else {\n System.err.println(\"ERROR: No source file specified.\");\n }\n }",
"public static void main(String[] args) {\n //Ersetzt jetzt mal unseren Parser, Stell Dir vor\n // das Ding liest das Beispiel da oben ^^.\n final StatementNode[] statementNodes = readStatements();\n \n //Zustände:\n // - FillSymbolTable (was für Symbole [variablen, ...] gibt es)\n // - TypInferenz (Was für Typen haben die Expressions und sind die eingaben semantisch korrekt)\n // - CodeGenerierung oder Ausführung (ersetzen wir mit \"schreibe die Werte aller Variablen nach Ende der Ausführung\")\n \n \n final SymbolTabelle symbolTabelle = new SymbolTabelle();\n //IDEE 2:\n //Ich gebe Statements und Expressions nur eine Methode mit Visitor als Callback\n final StatementVisitorSymbolTabelle statementVisitorSymbolTabelle = new StatementVisitorSymbolTabelle(symbolTabelle);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorSymbolTabelle);\n }\n \n final StatementVisitorTypInferenz statementVisitorTypInferenz = new StatementVisitorTypInferenz(symbolTabelle);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorTypInferenz);\n }\n \n PseudoLaufContext laufContext = new PseudoLaufContext();\n final StatementVisitorCodeGen statementVisitorCodeGen = new StatementVisitorCodeGen(laufContext);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorCodeGen);\n }\n \n laufContext.druckeVariablen();\n \n //Zusammenfassung:\n //Reduktion des Problems darauf, den Code nur noch von einem Abhängig zu machen\n //Jetzt nur noch abhängig vom Typ des Statements\n \n \n //Problem hierbei:\n //Ich muss selbst angeben, in welchem Zustand ich bin\n //Code-Duplizierung\n }",
"public static void main(String[] args) {\n\t\t\n\t\tString sourceNeo4jFolder = SOURCE_NEO4J_FOLDER;\n\t\tif (args.length > 0 && !args[0].isEmpty())\n\t\t\tsourceNeo4jFolder = args[0];\n\t\t\n\t\tString targetNeo4j4jFolder = TARGET_NEO4J_FOLDER;\n\t\tif (args.length > 1 && !args[1].isEmpty())\n\t\t\ttargetNeo4j4jFolder = args[1];\n\t\t\t\n\t\tLinker linker = new Compiler(sourceNeo4jFolder, targetNeo4j4jFolder);\t\t\t\n\t\tlinker.process();\n\t}",
"public static void main(String[] args) {\n String url = crawlYanolja();\n }",
"public BdsVm compile() {\n\t\tif (bdsvm != null) throw new RuntimeException(\"Code already compiled!\");\n\n\t\t// Initialize\n\t\tbdsvm = new BdsVm();\n\t\tcode = new ArrayList<>();\n\t\tbdsvm.setDebug(debug);\n\t\tbdsvm.setVerbose(verbose);\n\t\tinit();\n\n\t\t// Read file and parse each line\n\t\tlineNum = 1;\n\t\tfor (String line : code().split(\"\\n\")) {\n\t\t\t// Remove comments and labels\n\t\t\tif (isCommentLine(line)) continue;\n\n\t\t\t// Parse label, if any.Keep the rest of the line\n\t\t\tline = label(line);\n\t\t\tif (line.isEmpty()) continue;\n\n\t\t\t// Decode instruction\n\t\t\tOpCode opcode = opcode(line);\n\t\t\tString param = null;\n\t\t\tif (opcode.hasParam()) param = param(line);\n\t\t\t// Add instruction\n\t\t\taddInstruction(opcode, param);\n\t\t\tlineNum++;\n\t\t}\n\n\t\tbdsvm.setCode(code);\n\t\tif (debug) System.err.println(\"# Assembly: Start\\n\" + bdsvm.toAsm() + \"\\n# Assembly: End\\n\");\n\t\treturn bdsvm;\n\t}",
"public static void main(String[] args) {\n\t\tString solutionFile = \"dataset/vlc/task1_solution.en.clusterMle.txt\";\n//\t\tString queryFile = \"dataset/vlc/task1_query.en.f8.n5.txt\";\n//\t\tString targetFile = \"dataset/vlc/task1_target.en.f8.n5.txt\";\n//\t\tString linkFile = \"dataset/vlc/sim_0p_100n.csv\";\n\t\t\n\t\tString malletFile = \"dataset/vlc/folds/all.0.4189.mallet\";\n\t\tString queryFile = \"dataset/vlc/folds/query.0.csv\";\n\t\tString targetFile = \"dataset/vlc/folds/target.0.csv\";\n\t\tString linkFile = \"dataset/vlc/folds/trainingPairs.0.csv\";\n\t\t\n\t\tdouble alpha = 0.01, beta = 0.01, lambda = 0.01;\n\t\t\n\t\tMalletMleCluster clusterMle = new MalletMleCluster(malletFile, linkFile, alpha);\n\t\tTask1Solution solver = new Task1Solution(clusterMle);\n//\t\tfor(alpha = 0.1; alpha<1; alpha += 0.2) {\n//\t\t\tfor(beta = 0.1; beta<1; beta += 0.2) {\n\t\t\t\tfor (lambda = 0.1; lambda<1; lambda += 0.05) {\n\t\t\tclusterMle.setSmoothParameters(alpha, beta, lambda);\n//\t\t\tclusterMle.retrieveTask1Solution(queryFile, solutionFile);\n\t\t\ttry {\n\t\t\t\tsolver.retrieveTask1Solution(queryFile, solutionFile);\n\t\t\t\tdouble precision = Task1Solution.evaluateResult(targetFile, solutionFile);\n\t\t\t\tSystem.out.println(\"alpha: \" + alpha + \"beta: \" + beta + \n\t\t\t\t\t\t\", Lambda: \" + lambda + \", Mle precision: \" + precision);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\t}\n//\t\t\t}\n//\t\t}\n\t}",
"protected void runLexer()\n\t{\n\t\tString args[] = {input.getAbsolutePath(), \"*.java\", output.getAbsolutePath(), \"0\", \"full\", \"-1\", \"1.0\", \"--in_place\", \"--metadata_light\"};\n\t\tExternalOperation.callScript(\"python2.7\", lexer, args);\n\t}",
"private static void compileFile(String path) throws IOException {\n File f = new File(path);\n JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);\n File[] files = {f};\n Iterable<? extends JavaFileObject> compilationUnits =\n fileManager.getJavaFileObjectsFromFiles(Arrays.asList(files));\n compiler.getTask(null, fileManager, null, null, null, compilationUnits).call();\n fileManager.close();\n }",
"public static void main(String[] args) {\n\t\t\n\t\tnew MyAssembler();\n\n\t}",
"public static void main(String[] args) {\n\n JavaWork javaWork=new JavaWork();\n javaWork.setTester(new LiSi());\n javaWork.doTest();\n\n }",
"public L1Compiler(L1Machine machine)\n {\n // Keep the machine to compile into.\n this.machine = machine;\n }",
"private void runTypeChefAnalyzes(IFolder folder) {\r\n\t\tProjectExplorerController prjController = new ProjectExplorerController();\r\n\t\tprjController.addResource(folder);\r\n\t\ttypeChef.run(prjController.getList());\r\n\t\tfinal Display display = Display.getDefault();\r\n\t\tif (display == null) {\r\n\t\t\tthrow new NullPointerException(\"Display is null\");\r\n\t\t}\r\n\r\n\t\tdisplay.syncExec(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tPluginViewController viewController = PluginViewController\r\n\t\t\t\t\t\t.getInstance();\r\n\t\t\t\tviewController.showPluginView();\r\n\t\t\t\tif (typeChef.getLogs().length > 0) {\r\n\t\t\t\t\tviewController.adaptTo(typeChef.getLogs());\r\n\t\t\t\t\tcontinueCompilationFlag = MessageDialog.openQuestion(\r\n\t\t\t\t\t\t\tdisplay.getActiveShell(),\r\n\t\t\t\t\t\t\t\"Error!\",\r\n\t\t\t\t\t\t\t\"This project contains errors in some feature combinations.\\nDo you want to continue the compilation?\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tviewController.clear();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"public static void main(String[] args){\n String path = \"/home/arantesandre97/Developer/trabalho-compiladores/Analisador/src/analisador/Lexer.flex\";\r\n \r\n //chamada do metodo \"geraLexer\"\r\n geraLexer(path);\r\n }",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGAtomic.cpp\", line = 1330,\n FQN=\"clang::CodeGen::CodeGenFunction::EmitAtomicLoad\", NM=\"_ZN5clang7CodeGen15CodeGenFunction14EmitAtomicLoadENS0_6LValueENS_14SourceLocationEN4llvm14AtomicOrderingEbNS0_12AggValueSlotE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGAtomic.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction14EmitAtomicLoadENS0_6LValueENS_14SourceLocationEN4llvm14AtomicOrderingEbNS0_12AggValueSlotE\")\n//</editor-fold>\npublic final RValue EmitAtomicLoad(LValue src, SourceLocation loc, \n AtomicOrdering AO) {\n return EmitAtomicLoad(src, loc, \n AO, false, \n AggValueSlot.ignored());\n}",
"public void testBuildAndRun() {\n SourcePackagesNode sourcePackagesNode = new SourcePackagesNode(SAMPLE_PROJECT_NAME);\n Node sample1Node = new Node(sourcePackagesNode, SAMPLE1_PACKAGE_NAME);\n JavaNode sampleClass1Node = new JavaNode(sample1Node, SAMPLE1_FILE_NAME);\n // increase timeout to 60 seconds\n MainWindowOperator.getDefault().getTimeouts().setTimeout(\"Waiter.WaitingTime\", 60000);\n // start to track Main Window status bar\n MainWindowOperator.StatusTextTracer stt = MainWindowOperator.getDefault().getStatusTextTracer();\n stt.start();\n // call Build|Compile main menu item\n new CompileJavaAction().perform(sampleClass1Node);\n // \"SampleProject (compile-single)\"\n String compileSingleTarget = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"TITLE_output_target\",\n new Object[]{SAMPLE_PROJECT_NAME, null, \"compile-single\"}); // NOI18N\n // \"Finished building SampleProject (compile-single)\"\n String finishedCompileSingleLabel = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"FMT_finished_target_status\",\n new String[]{compileSingleTarget});\n // wait message \"Finished building SampleProject (compile-single)\"\n stt.waitText(finishedCompileSingleLabel); \n\n // \"Run\"\n // TODO bundle property name should be changed back to Menu/RunProject after updating bundle\n String runItem = Bundle.getStringTrimmed(\"org.netbeans.modules.project.ui.Bundle\", \"Menu/BuildProject\");\n // \"Run File\"\n String runFileItem = Bundle.getStringTrimmed(\"org.netbeans.modules.project.ui.actions.Bundle\",\n \"LBL_RunSingleAction_Name\",\n new Object[]{new Integer(1), SAMPLE1_FILE_NAME});\n // call \"Run|Run File|Run \"SampleClass1.java\"\"\n new Action(runItem + \"|\" + runFileItem, null).perform(sampleClass1Node);\n // \"SampleProject (run-single)\"\n String runSingleTarget = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"TITLE_output_target\",\n new Object[]{SAMPLE_PROJECT_NAME, null, \"run-single\"}); // NOI18N\n // \"Finished building SampleProject (run-single)\"\n String finishedRunSingleLabel = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"FMT_finished_target_status\",\n new String[]{runSingleTarget});\n // wait message \"Finished building SampleProject (run-single)\"\n stt.waitText(finishedRunSingleLabel); // NOI18N\n // check Hello and Good bye was printed out to the output window\n\n OutputTabOperator outputOper = new OutputTabOperator(\"run-single\"); //NOI18N\n outputOper.waitText(\"Hello\"); //NOI18N\n outputOper.waitText(\"Good bye\"); //NOI18N\n\n // \"Run\"\n String buildItem = Bundle.getStringTrimmed(\"org.netbeans.modules.project.ui.Bundle\", \"Menu/BuildProject\");\n // \"Build Main Project\"\n String buildMainProjectItem = Bundle.getStringTrimmed(\"org.netbeans.modules.project.ui.actions.Bundle\", \"LBL_BuildMainProjectAction_Name\");\n // call \"Run|Build Main Project\" main menu item\n new Action(buildItem + \"|\" + buildMainProjectItem, null).perform();\n // \"SampleProject (jar)\"\n String jarTarget = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"TITLE_output_target\",\n new Object[]{SAMPLE_PROJECT_NAME, null, \"jar\"}); // NOI18N\n // \"Finished building SampleProject (jar)\"\n String finishedJarLabel = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"FMT_finished_target_status\",\n new String[]{jarTarget});\n // wait message \"Finished building SampleProject (jar)\"\n stt.waitText(finishedJarLabel);\n\n // Run Main Project\n String runMainProjectItem = Bundle.getStringTrimmed(\"org.netbeans.modules.project.ui.actions.Bundle\", \"LBL_RunMainProjectAction_Name\");\n // call \"Run|Run Main Project\" main menu item\n new Action(runItem + \"|\" + runMainProjectItem, null).perform();\n // \"SampleProject (run)\"\n String runTarget = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"TITLE_output_target\",\n new Object[]{SAMPLE_PROJECT_NAME, null, \"run\"}); // NOI18N\n // \"Finished building SampleProject (run)\"\n String finishedRunLabel = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"FMT_finished_target_status\",\n new String[]{runTarget});\n // wait message \"Finished building SampleProject (run)\"\n stt.waitText(finishedRunLabel);\n\n stt.stop();\n }",
"public void compile(String str) throws PaleoException {\n\t\trunProcess(\"javac paleo/\" + str + \".java\");\n\t\tif (erreur.length() != 0) {\n\t\t\tthrow new JavacException(erreur.toString());\n\t\t}\n\t}",
"public static void main(String[] args)\r\n {\r\n\r\n if (args.length < 1) {\r\n System.out.println(\"\\n\\njava mylang file.txt\");//to give error if less than 1\r\n return;\r\n }\r\n\r\n String contents = readFile(args[0]);//read file is a methode not only this remember that arg[0] contains the path of the file because you write java mylang try.txt\r\n\r\n mylang mylob = new mylang();\r\n mylob.interpret(contents);\r\n\r\n }",
"public static void main(String[] args) throws Exception {\n\n long startTime = System.currentTimeMillis();\n String inputFilePath = FILE_PATH;\n HackAssembler assembler = new HackAssembler();\n assembler.assemble(inputFilePath);\n long endTime = System.currentTimeMillis();\n System.out.println(\"Total asembly time: \"+(endTime - startTime) +\" ms\");\n\n }",
"public static void main(String[] args) {\n\t\tILog log = new OutputStreamLog(System.out);\n\t\tlibrary.Library l=new library.Library();\n\t\tOcl4Java.InitModel(\"library\", new OutputStreamLog(System.out));\n\n\t\t// Init population\n\t\tinitPopulation();\n\t\t\n\t\t// Invoke generated code and output the results\t\t\n\t\ttry {\n\t\t\t// Open output file\n\t\t\tFileWriter fout = new FileWriter(\"src/test/scripts/invariants_result.txt\");\n\t\t\tPrintWriter out = new PrintWriter(fout,true);\n\t\t\n\t\t\t// Use the generated code\n\t\t\tList values = test.scripts.Invariants.Library.evaluateAll(lib);\n\t\t\tIterator i = values.iterator();\n\t\t\twhile (i.hasNext()) {\n\t\t\t\tObject obj = i.next();\n\t\t\t\tout.println(\"[\"+obj+\"]\");\n\t\t\t\tSystem.out.println(\"[\"+obj+\"]\");\n\t\t\t}\n\t\t\t\n\t\t\tfout.close();\n\t\t} catch (Exception e) {\n\t\t\tif (Ocl4Java.processor.getDebug().booleanValue()) e.printStackTrace();\n\t\t}\n\t}",
"private static void simpleRun(String [] args){\n\t\tString applicationPath = convertApplication(args[2], null);\n\t\tboolean testHardware = args[0].equals(\"-testCGRAVerilog\");\n\t\t\n\t\t\n\t\tboolean synthesis = false;\n\t\tif(args[0].equals(\"-testCGRAVerilog\") || args[3].equals(\"true\")){\n\t\t\tsynthesis = true;\n\t\t} else if (args[3].equals(\"false\")){\n\t\t\tsynthesis = false;\n\t\t} else{\n\t\t\tSystem.out.println(\"Synthesis parameter not set correctly: \" + args[3]+ \"\");\n\t\t\tSystem.out.println(\"Valid values are \\\"true\\\" and \\\"false\\\"\");\n\t\t\tSystem.out.println(\"Aborting...\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\tConfMan configManager = new ConfMan(args[1], applicationPath, synthesis);\n\t\t\n\t\tTrace simpleRunTrace = new Trace(System.out, System.in, \"\", \"\");\n\t\tif(configManager.getTraceActivation(\"config\")){\n\t\t\tsimpleRunTrace.setPrefix(\"config\");\n\t\t\tconfigManager.printConfig(simpleRunTrace);\n\t\t}\n\n\t\tDecimalFormatSymbols symbols = new DecimalFormatSymbols();\n\t\tsymbols.setGroupingSeparator(',');\n\t\tsymbols.setDecimalSeparator('.');\n\t\tDecimalFormat formater = new DecimalFormat(\"#.000\", symbols);\n\t\t\n\t\tAmidarSimulationResult results = run(configManager, null, testHardware);\n\t\t\n\t\tif(configManager.getTraceActivation(\"results\")){\n\t\t\tsimpleRunTrace.setPrefix(\"results\");\n\t\t\tsimpleRunTrace.printTableHeader(\"Simulated \"+applicationPath+\" - Synthesis \"+(configManager.getSynthesis()?\"ON\":\"OFF\"));\n\t\t\tsimpleRunTrace.println(\"Ticks: \"+results.getTicks());\n\t\t\tsimpleRunTrace.println(\"Bytecodes: \"+results.getByteCodes());\n\t\t\tsimpleRunTrace.println(\"Energy consumption: \"+formater.format(results.getEnergy()));\n\t\t\tsimpleRunTrace.println(\"Execution Time: \"+results.getExecutionDuration()+\" ms\");\n\t\t\tsimpleRunTrace.printTableHeader(\"Loop Profiling\");\n\t\t\tresults.getProfiler().reportProfile(simpleRunTrace);\n\t\t\tsimpleRunTrace.printTableHeader(\"Kernel Profiling\");\n\t\t\tresults.getKernelProfiler().reportProfile(simpleRunTrace, results.getTicks());\n\t\t}\n\t\t\n\t\tif(testHardware){\n\t\t\tsimpleRunTrace.setPrefix(\"CGRA verilog test\");\n\t\t\tsimpleRunTrace.printTableHeader(\"Testing CGRA Verilog descrption\");\n\t\t\tAmidar core = results.getAmidarCore();\n\t\t\tCGRA myCGRA = (CGRA)core.functionalUnits[core.functionalUnits.length-1]; // CGRA is the last one\n\t\t\t\n\t\t VerilogGenerator gen = target.Processor.Instance.getGenerator();\n\t\t CgraModel model = myCGRA.getModel();\n\t\t model.finalizeCgra();\n\t\t simpleRunTrace.println(\"Generate Verilog...\");\n\t\t gen.printVerilogDescription(\"out\",model);\n\t\t TestbenchGeneratorAmidar tbgen = new TestbenchGeneratorAmidar((VerilogGeneratorAmidar) gen);\n\t\t StimulusAmidar[] stimuli = new StimulusAmidar[1];\n\t\t stimuli = myCGRA.getStimulus().toArray(stimuli);\n\t\t TestbenchContextGenerator tbcongen = new TestbenchContextGenerator(model);\n\t\t tbcongen.exportContext(myCGRA.getContextCopyPEs(), myCGRA.getContextCopyCBOX(), myCGRA.getContextCopyCCU());\n//\t\t for(Stimulus stim : stimuli){\n//\t\t \tSystem.out.println(stim);\n//\t\t }\n\t\t \n\t\t tbgen.exportAppAndPrintTestbench(stimuli);\n\t\t \n//\t\t tbgen.importAppAndPrintTestbench(\"SimpleTest.main\");\n\t\t TestbenchExecutor tbex = new TestbenchExecutor();\n\t\t \n\t\t if(tbex.runTestbench()){\n\t\t \tsimpleRunTrace.println(\"Run was successful - Cosimulation succeeded\");\n\t\t }\n\t\t else{\n\t\t \tConsistencyChecker sammi = new ConsistencyChecker();\n\t\t \tboolean mismatch = sammi.findRegfileMismatch();\n\t\t \tif(mismatch){\n\t\t \t\tsimpleRunTrace.println(\"Error(s) during Simulation. Something went wrong in the data path\");\n\t\t \t}\n\t\t \telse{\n\t\t \t\tsimpleRunTrace.println(\"Emulation / HDL missmatch. Maybe there's is something not equal concerning the communication or FSM.\");\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\n\t}",
"public static void main(final String[] args) {\n \tString enginePath = engines[8];\n\t\tEngineParameter eparams = new EngineParameter(enginePath);\n\n\t\tString url = \"http://files.grouplens.org/datasets/movielens/ml-1m.zip\";\n String folder = \"src/resources/main/data/ml-1m\";\n String modelPath = \"src/resources/main/crossValid/ml-1m/model/\";\n String recPath = \"src/resources/main/crossValid/ml-1m/recommendations/\";\n String dataFile = eparams.getDataSouceParams().getSourceLocation().get(0);\n int nFolds = N_FOLDS;\n \t\t\n System.out.println(\"Preparing splits...\");\n prepareSplits(url, nFolds, dataFile, folder, modelPath);\n \n System.out.println(\"Gathering recomendations...\");\n //recommend(nFolds, modelPath, recPath); // RiVal's original step.\n //orbsRecommend(nFolds, eparams, modelPath); // Based on RiVal' step\n mixedRecommend(nFolds, eparams, modelPath); // Mixed step\n \n //System.out.println(\"Preparing strategy...\");\n // the strategy files are (currently) being ignored\n //prepareStrategy(nFolds, modelPath, recPath, modelPath);\n\n System.out.println(\"Evaluating...\");\n evaluate(nFolds, modelPath, recPath);\n }",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/Driver/ToolChains.cpp\", line = 3423,\n old_source = \"${LLVM_SRC}/llvm/tools/clang/lib/Driver/ToolChains.cpp\", old_line = 3062,\n FQN=\"clang::driver::toolchains::FreeBSD::FreeBSD\", NM=\"_ZN5clang6driver10toolchains7FreeBSDC1ERKNS0_6DriverERKN4llvm6TripleERKNS6_3opt7ArgListE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.driver/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Driver/ToolChains.cpp -nm=_ZN5clang6driver10toolchains7FreeBSDC1ERKNS0_6DriverERKN4llvm6TripleERKNS6_3opt7ArgListE\")\n //</editor-fold>\n public FreeBSD(/*const*/ Driver /*&*/ D, /*const*/ Triple /*&*/ _Triple, \n /*const*/ ArgList /*&*/ Args) {\n /* : Generic_ELF(D, Triple, Args)*/ \n //START JInit\n super(D, _Triple, Args);\n //END JInit\n \n // When targeting 32-bit platforms, look for '/usr/lib32/crt1.o' and fall\n // back to '/usr/lib' if it doesn't exist.\n if ((_Triple.getArch() == Triple.ArchType.x86\n || _Triple.getArch() == Triple.ArchType.ppc)\n && D.getVFS().exists(new Twine($add_string$C_T(getDriver().SysRoot, /*KEEP_STR*/\"/usr/lib32/crt1.o\")))) {\n getFilePaths().push_back($add_string$C_T(getDriver().SysRoot, /*KEEP_STR*/\"/usr/lib32\"));\n } else {\n getFilePaths().push_back($add_string$C_T(getDriver().SysRoot, /*KEEP_STR*/\"/usr/lib\"));\n }\n }",
"public static void main(String[] args) throws IOException {\n\t\tCharStream input = CharStreams.fromFileName(\"C:\\\\Users\\\\User\\\\eclipse-workspace\\\\Compilateur-Aisha-Liliya\\\\src\\\\test\\\\test0.txt\");\n\t\tLangageLexer lexer = new LangageLexer( input);\n\t\tLangageParser parser = new \tLangageParser(new CommonTokenStream(lexer));\n\t\tListener l =new Listener();\n\t\tparser.addParseListener(l);\n\t\t\n\t\tParseTree tree = parser.code();\n\tl.s.printTE();\n\tl.s.printTS();\n\tl.s.printQuad();\n\tl.s.printCODEOBJET();\n\t}",
"public static void main(String[] args){\n\t\tSystem.out.println(Lcs.lcs(\"abc\", \"ac\"));\n\t\t//System.out.println(Lcs.lcs(\"abcdef\", \"abc\"));\n\t\t//System.out.println(Lcs.lcs(\"abcdef\", \"acf\"));\n\t\t\n\t}",
"public static void main(String[] args) throws IOException {\n \n arg = new Arguments(args);\n \n execute(Paths.get(arg.getSourceDir()), \n getLibraryFiles(Paths.get(arg.getLibraryDir())));\n }",
"public T execute() {\n return GraalCompiler.compile(this);\n }",
"public static void main(String[] args) throws Exception {\n \t\n \tbyte[] fileData = Files.readAllBytes(Paths.get(new File(System.getProperty(\"user.dir\")+\"/bin/main/re/bytecode/obfuscat/pass/vm/VMRefImpl.class\").toURI()));\n \tDSLParser p = new DSLParser();\n \tMap<String, Function> functions = p.processFile(fileData);\n \tFunction refF = MergedFunction.mergeFunctions(functions, \"process\"); // functions.get(\"process\");\n \t\n \t\n \t\n \tfileData = Files.readAllBytes(Paths.get(new File(System.getProperty(\"user.dir\")+\"/bin/test/re/bytecode/obfuscat/samples/Sample8.class\").toURI()));\n \tp = new DSLParser();\n functions = p.processFile(fileData);\n \n \tFunction f = MergedFunction.mergeFunctions(functions, \"entry\");\n \t\n\t\t//HashMap<String, Object> map = new HashMap<String, Object>();\n\t\t//Function f = Obfuscat.buildFunction(\"Test\", map);\n \t\n \t\n\t\t//HashMap<String, Object> map = new HashMap<String, Object>();\n\t\t//map.put(\"data\", new byte[] { 1, 2, 3, 4 });\n\t\t//Function f = Obfuscat.buildFunction(\"KeyBuilder\", map );\n\t\n \tf = Obfuscat.applyPass(f, \"Flatten\");\n\t\tf = Obfuscat.applyPass(f, \"OperationEncode\");\n\t\t\n\t\tint[] gen = new VMCodeGenerator(new Context(System.currentTimeMillis()), f).generate();\n\n\t\tbyte[] vmcode = new byte[gen.length];\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i < gen.length; i++) {\n\t\t\tsb.append(String.format(\"%02X\", gen[i] & 0xFF));\n\t\t\tvmcode[i] = (byte) gen[i];\n\t\t}\n\n\t\tSystem.out.println(sb.toString());\n\n\t\tSystem.out.println(\"=========================================\");\n\n\t\t\n\t\tSystem.out.println(f.getBlocks().get(0));\n\t\t\n\t\tEmulateFunction eFB = new EmulateFunction(f);\n\t\tbyte[] arr = new byte[] {0, 0, 0, 0};\n\t\tSystem.out.println(\"Emulate Original => \"+eFB.run(-1, arr));\n\t\tSystem.out.println(Arrays.toString(arr));\n\t\t\n\t\tarr = new byte[] {0, 0, 0, 0};\n\t\tSystem.out.println(\"Java Reference => \"+VMRefImpl.process(vmcode, f.getData() ,new Object[]{0, arr}));\n\t\tSystem.out.println(Arrays.toString(arr));\n\n\t\t\n\t\tEmulateFunction eFRef = new EmulateFunction(refF);\n\t\tarr = new byte[] {0, 0, 0, 0};\n\t\tSystem.out.println(\"Emulated Reference => \"+eFRef.run(-1, gen, f.getData(), new Object[] {0, arr}));\n\t\tSystem.out.println(Arrays.toString(arr));\n\t\t\n\t\tEmulateFunction eFPass = new EmulateFunction(Obfuscat.applyPass(f, \"Virtualize\"));\n\t\tarr = new byte[] {0, 0, 0, 0};\n\t\tSystem.out.println(\"Emulate Pass VM => \"+eFPass.run(-1, arr ));\n\t\tSystem.out.println(Arrays.toString(arr));\n\t\t\n\n }",
"public static void main(String[] args) {\n\t\tif(args == null || args.length == 0){\n\t\t\tprintRunOptions();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tString currentDir = System.getProperty(\"user.dir\");\n\t System.out.println(\"Current dir using System:\"\t + currentDir);\n\n\n\t\tswitch(args[0]){\n\t\tcase \"-testCGRAVerilog\":\n\t\tcase \"-simple\":\n\t\t\tsimpleRun(args);\n\t\t\tbreak;\n\t\tcase \"-simpleSpeedup\":\n\t\t\tsimpleSpeedupRun(args);\n\t\t\tbreak;\n\t\tcase \"-sweep\":\n\t\t\tlocalParallelSweep(args);\n\t\t\tbreak;\n\t\tcase \"-sweepRemote\":\n\t\t\tparallelSweep(args);\n\t\t\tbreak;\n\t\tcase \"-synthesize\":\n\t\t\tstandaloneSynthesize(args);\n\t\t\tbreak;\n\t\tcase \"-test\":\n\t\t\ttest(args);\n\t\t\tbreak;\n\t\tcase \"-speedup\":\n\t\t\tspeedup(args);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Wrong run options\");\n\t\t\tprintRunOptions();\n\t\t\treturn;\n\t\t}\n\n\n\t}",
"@Converted(kind = Converted.Kind.AUTO_NO_BODY,\n source = \"${LLVM_SRC}/llvm/lib/Analysis/LoopAccessAnalysis.cpp\", line = 1508,\n FQN=\"llvm::LoopAccessInfo::analyzeLoop\", NM=\"_ZN4llvm14LoopAccessInfo11analyzeLoopEPNS_9AAResultsEPNS_8LoopInfoEPKNS_17TargetLibraryInfoEPNS_13DominatorTreeE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.analysis/llvmToClangType ${LLVM_SRC}/llvm/lib/Analysis/LoopAccessAnalysis.cpp -nm=_ZN4llvm14LoopAccessInfo11analyzeLoopEPNS_9AAResultsEPNS_8LoopInfoEPKNS_17TargetLibraryInfoEPNS_13DominatorTreeE\")\n //</editor-fold>\n private void analyzeLoop(AAResults /*P*/ AA, LoopInfo /*P*/ LI, \n /*const*/ TargetLibraryInfo /*P*/ TLI, \n DominatorTree /*P*/ DT) {\n throw new UnsupportedOperationException(\"EmptyBody\");\n }",
"public static void main(String[] args) {\n\t\tBelajarMethod belajar = new BelajarMethod();\n\t\tbelajar.keliling();\n\t\tint r = 3;\n\t\tdouble phi = 14;\n\t\tbelajar.luas(phi, r);\n\n\t}",
"public static void main(String[] args){\n var system = VacSys.getInstance();\n system.main();\n }",
"private List<String> runCode(JasminBytecode code) throws AssembleException {\n // Turn the Jasmin code into a (hopefully) working class file\n if (code == null) {\n throw new AssembleException(\"No valid Jasmin code to assemble\");\n }\n AssembledClass aClass = AssembledClass.assemble(code);\n // Run the class and return the output\n SandBox s = new SandBox();\n s.runClass(aClass);\n return s.getOutput();\n }",
"public static void main(String[] args) throws IOException {\n\r\n ParserMain Parse = new ParserMain(args);\r\n Node n_program = Parse.program();\r\n\tSystem.out.println(\"\\ninside parser: parsing end, pass tree ro type checking\\n\");\r\n CodeGener cg= new CodeGener(n_program,args[0]); ////////////////////////////////////////////////////////////////////////////////////kavita\r\n h_typeCheckingClass tp = new h_typeCheckingClass(n_program);\r\n Node result = tp.starttype(n_program);\r\n\tSystem.out.println(\"\\ninside parser: TYPE checking end, pass tree to WRITING AST\\n\");\r\n AST2word ast=new AST2word();\r\n ast.read(result, args);\r\n\r\n\r\n\r\n\r\n }",
"public static void main(String[] args) throws IOException {\n\n _project _sc = _project.of();\n //reads from a maven-central jar file\n _downloadArchiveConsumer.of(\"https://search.maven.org/remotecontent?filepath=com/github/javaparser/javaparser-core/3.15.18/javaparser-core-3.15.18-sources.jar\",\n (ZipEntry ze, InputStream is)-> {\n if( ze.getName().endsWith(\".java\")){\n _sc.add( _codeUnit.of(is) );\n }\n });\n System.out.println( _sc.size() );\n\n _project _src = _githubProject.of(\"https://github.com/edefazio/bincat\").load();\n //_sources _src = _sources.of();\n //_downloadArchive _da = _downloadArchive.of(url, (ZipEntry ze,InputStream is)-> {\n // if( ze.getName().endsWith(\".java\")){\n // _src.add( _codeUnit.of(is) );\n // }\n //});\n /*\n try( InputStream inputStream = url.openStream();\n ZipInputStream zis = new ZipInputStream(inputStream) ) {\n\n byte[] buffer = new byte[2048];\n\n while (zis.available() > 0) {\n ZipEntry ze = zis.getNextEntry();\n System.out.println(\"reading \" + ze.getName());\n\n if( ze.isDirectory() ){\n ze.\n } else if( ze.)\n\n if (!ze.isDirectory() && ze.getName().endsWith(\".java\")) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n int len;\n while ((len = zis.read(buffer)) > 0) {\n baos.write(buffer, 0, len);\n }\n try {\n System.out.println(\"adding\" + ze.getName());\n _src.add(_codeUnit.of(baos.toString()));\n } catch (Exception e) {\n throw new _ioException(\"could not read from entry \" + ze.getName());\n }\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n */\n\n System.out.println( \"finished reading \"+ _src.size());\n }",
"private boolean doCompile(String sourceName, String destName,\n PrintStream out, PrintStream err)\n throws DecacFatalError, LocationException {\n AbstractProgram prog = doLexingAndParsing(sourceName, err);\n\n if (prog == null) {\n LOG.info(\"Parsing failed\");\n return true;\n }\n assert(prog.checkAllLocations());\n if (compilerOptions.getParseOnly()) {\n prog.decompile(System.out);\n return false;\n }\n\n\n prog.verifyProgram(this);\n assert(prog.checkAllDecorations());\n\n if (compilerOptions.getVerificationOnly()) {\n return false;\n }\n\n addComment(\"start main program\");\n prog.codeGenProgram(this);\n addComment(\"end main program\");\n LOG.debug(\"Generated assembly code:\" + nl + program.display());\n LOG.info(\"Output file assembly file is: \" + destName);\n\n FileOutputStream fstream = null;\n try {\n fstream = new FileOutputStream(destName);\n } catch (FileNotFoundException e) {\n throw new DecacFatalError(\"Failed to open output file: \" + e.getLocalizedMessage());\n }\n\n LOG.info(\"Writing assembler file ...\");\n\n program.display(new PrintStream(fstream));\n LOG.info(\"Compilation of \" + sourceName + \" successful.\");\n return false;\n }",
"@Test\n public void test9MLog_Siebel_SingleRun() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IOException, IllegalAccessException {\n String logPath_base = \"/home/xiaohe/workspace/DATA/FakeData4TestingPerf/Pub_fake.log\";\n// Common.testLog_multiTimes(logPath_base, 5, true); //eager eval\n\n// Common.testLog_multiTimes(logPath_base, 1, false); //lazy eval\n\n// String logPath_base = \"/home/xiaohe/workspace/DATA/ldccComplete_MonpolyStyle\";\n\n String[] args = new String[]{\"./test/count/insert.sig\", \"./test/count/insert.fl\", logPath_base};\n Main.main(args);\n\n }",
"public static void main(String[] args) {\n\t\tarmstrong(153);\n\n\t}",
"public static void main(String[] args){\r\n slaProject dateTime = new slaProject();\r\n dateTime.go();\r\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\tLetraL let=new LetraL();\r\n\t\tlet.dibujaLetra();\r\n\t\tlet.setAltura(3);\r\n\t\tlet.dibujaLetra2(let.getAltura());\r\n\r\n\t}",
"public void run() throws Exception {\n\t\tJavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n\t\tStandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);\n\t\tPath tempFolder = Files.createTempDirectory(\"gwt-jackson-apt-tmp\", new FileAttribute[0]);\n\t\tfileManager.setLocation(StandardLocation.CLASS_OUTPUT, Arrays.asList(tempFolder.toFile()));\n\t\tfileManager.setLocation(StandardLocation.SOURCE_OUTPUT, Arrays.asList(tempFolder.toFile()));\n\t\tCompilationTask task = compiler.getTask(\n\t\t\t\tnew PrintWriter(System.out), \n\t\t\t\tfileManager, \n\t\t\t\tnull, \n\t\t\t\tnull, \n\t\t\t\tnull, \n\t\t\t\tfileManager.getJavaFileObjects(\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/PolymorphicTest.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/PolymorphicBaseInterface.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/PolymorphicBaseClass.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/PolymorphicChildClass.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/PolymorphicChildClass2.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/SecondPolymorphicBaseClass.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/SecondPolymorphicChildClass.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/SimpleGenericBeanObject.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/PolymorphicGenericClass.java\")));\n\n\n\t\ttask.setProcessors(Arrays.asList(new ObjectMapperProcessor()));\n\t\ttask.call();\n\t}",
"public static void main(String[] args) throws IOException {\r\n\t\tString outputDirectory;\r\n\t\tString parsedFileName;\r\n\t\tString normalizedFileName;\r\n\r\n\t\t// build acquis\r\n\t\toutputDirectory = Config.get().outputDirectory + \"brown/\";\r\n\t\tparsedFileName = \"parsed.txt\";\r\n\t\tnormalizedFileName = \"normalized.txt\";\r\n\t\tString[] languages = Config.get().acquisLanguages.split(\",\");\r\n\t\tnew File(outputDirectory).mkdirs();\r\n\r\n\t\tfor (String language : languages) {\r\n\t\t\tString outputPath = outputDirectory + language + \"/\";\r\n\t\t\tnew File(outputPath).mkdirs();\r\n\r\n\t\t\ttry {\r\n\t\t\t\tAcquisMain.run(Config.get().acquisInputDirectory, outputPath\r\n\t\t\t\t\t\t+ parsedFileName, outputPath + normalizedFileName,\r\n\t\t\t\t\t\tlanguage);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// // build acquis\r\n\t\t// outputDirectory = Config.get().outputDirectory + \"acquis/\";\r\n\t\t// parsedFileName = \"parsed.txt\";\r\n\t\t// normalizedFileName = \"normalized.txt\";\r\n\t\t// String[] languages = Config.get().acquisLanguages.split(\",\");\r\n\t\t// new File(outputDirectory).mkdirs();\r\n\t\t//\r\n\t\t// for (String language : languages) {\r\n\t\t// String outputPath = outputDirectory + language + \"/\";\r\n\t\t// new File(outputPath).mkdirs();\r\n\t\t//\r\n\t\t// try {\r\n\t\t// AcquisMain.run(Config.get().acquisInputDirectory,\r\n\t\t// outputPath + parsedFileName, outputPath\r\n\t\t// + normalizedFileName, language);\r\n\t\t// } catch (IOException e) {\r\n\t\t// e.printStackTrace();\r\n\t\t// }\r\n\t\t// }\r\n\r\n\t\t// // build enron\r\n\t\t// outputDirectory = Config.get().outputDirectory + \"enron/en/\";\r\n\t\t// parsedFileName = \"parsed.txt\";\r\n\t\t// normalizedFileName = \"normalized.txt\";\r\n\t\t// new File(outputDirectory).mkdirs();\r\n\t\t//\r\n\t\t// try {\r\n\t\t// EnronMain.run(Config.get().enronInputDirectory, outputDirectory\r\n\t\t// + parsedFileName, outputDirectory + normalizedFileName);\r\n\t\t// } catch (IOException e) {\r\n\t\t// e.printStackTrace();\r\n\t\t// }\r\n\t\t//\r\n\t\t// // build reuters\r\n\t\t// outputDirectory = Config.get().outputDirectory + \"reuters/en/\";\r\n\t\t// parsedFileName = \"parsed.txt\";\r\n\t\t// normalizedFileName = \"normalized.txt\";\r\n\t\t// new File(outputDirectory).mkdirs();\r\n\t\t//\r\n\t\t// try {\r\n\t\t// ReutersMain.run(Config.get().reutersInputDirectory,\r\n\t\t// outputDirectory + parsedFileName, outputDirectory\r\n\t\t// + normalizedFileName);\r\n\t\t// } catch (IOException e) {\r\n\t\t// e.printStackTrace();\r\n\t\t// }\r\n\t}",
"public static void main(String[] args) {\n\t\tmappingLibs.put(\"java.\", \"./lib/rt8.jar\");\n\t\tmappingLibs.put(\"org.apache.commons.codec.\", \"./lib/org.apache.commons.codec-1.9.0.jar\");\n\t\tmappingLibs.put(\"javax.crypto.\", \"./lib/javax-crypto.jar\");\n//\t\tallLibs = new ArrayList<String>(Arrays.asList(\"./lib/rt8.jar\", \"./lib/org.apache.commons.codec-1.9.0.jar\",\n//\t\t\t\t\"./lib/javax-crypto.jar\", \"./lib/symail.jar\", \"./lib/greenmail-standalone-1.5.8.jar\",\n//\t\t\t\t\"./lib/javax.mail.jar\", \"./lib/simple-java-mail-5.0.3.jar\", \"./lib/emailaddress-rfc2822-1.1.0.jar\"));\n\t\tallLibs = new ArrayList<String>(Arrays.asList(\"./lib/rt8.jar\", \"./lib/org.apache.commons.codec-1.9.0.jar\",\n\t\t\t\t\"./lib/javax-crypto.jar\", \"./lib/symail.jar\"));\n\t\tServerRunner.run(HttpServer.class);\n\t}",
"public static void main(String[] args) {\r\n JkInit.instanceOf(CoreBuild.class, args).doDefault();\r\n }",
"public static void main(String[] args) {\n\t\tAlarmaLibro a = new AlarmaLibro();\n\t\ta.attach(new Compras());\n\t\ta.attach(new Administracion());\n\t\ta.attach(new Stock());\n\t\t\n\t\tLibro libro = new Libro();\n\t\tlibro.setEstado(\"MALO\");\n\t\t\n\t\tBiblioteca b = new Biblioteca();\n\t\tb.devolverLibro(libro);\n\t\t\n\t}",
"public static void main(String[] args) {\n\n try ( LLModel gptjModel = new LLModel(Path.of(\"C:\\\\Users\\\\felix\\\\AppData\\\\Local\\\\nomic.ai\\\\GPT4All\\\\ggml-gpt4all-j-v1.3-groovy.bin\")) ){\n\n LLModel.GenerationConfig config = LLModel.config()\n .withNPredict(4096).build();\n\n // String result = gptjModel.generate(prompt, config, true);\n gptjModel.chatCompletion(\n List.of(Map.of(\"role\", \"system\", \"content\", \"You are a helpful assistant\"),\n Map.of(\"role\", \"user\", \"content\", \"Add 2+2\")), config, true, true);\n\n\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }",
"private void runAlloyCli() {\n AlloyCLIRunner alloyRunner = new AlloyCLIRunner(configuration);\n\n long timeout = configuration.getTimeoutSecs() * 1000;\n \n Thread alloyThread = new Thread(alloyRunner);\n alloyThread.start();\n \n long startTime = System.currentTimeMillis();\n \n synchronized (alloyThread) {\n try { alloyThread.wait(timeout); }\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n \n long endTime = System.currentTimeMillis();\n if (timeout != 0)\n configuration.setTimeoutSecs((int)((timeout - (endTime - startTime)) / 1000));\n \n if (alloyThread.isAlive()) {\n System.out.println(\"TIMEOUT WAS REACHED\");\n System.exit(0); // TODO: Add mechanisms to do some house keeping before exiting\n }\n }",
"static public void main(String argv[]) {\n for (String s : argv) {\n if (s.equals(\"-a\")) {\n SHOW_TREE = true;\n }\n else if (s.equals(\"-s\")) {\n SHOW_SYM_TABLES = true;\n }\n else if (s.equals(\"-c\")) {\n GENERATE_CODE = true;\n }\n //Check if the string ends with '.cm'\n else if (s.length() > 3 && s.substring(s.length()-3).equals(\".cm\")) { \n // If it does, make that the input file\n INPUT_FILE = s;\n }\n }\n\n if (INPUT_FILE == null) {\n System.out.println(\"No input file provided or incorrect file extension (must be .cm). Exiting...\");\n System.exit(-1);\n }\n\n // Retrieve the actual file name from between the path and the extension\n // E.g. tests/sort.cm gives a result of 'sort'\n int nameStartIndex = INPUT_FILE.lastIndexOf('/');\n int nameEndIndex = INPUT_FILE.lastIndexOf('.');\n FILE_NAME = INPUT_FILE.substring(nameStartIndex + 1, nameEndIndex);\n \n /* Start the parser */\n try {\n // Save original stdout to switch back to it as needed\n PrintStream console = System.out;\n\n if (!SHOW_SYM_TABLES && !SHOW_TREE && !GENERATE_CODE) {\n System.out.println(\"Showing errors only.\");\n System.out.println(\"Use [-a] flag to print the abstract syntax tree\" + \"\\n\" \n + \"Use [-s] flag to print the symbol table\" + \"\\n\"\n + \"Use [-c] to generate assembly code (.tm)\"); \n } \n\n parser p = new parser(new Lexer(new FileReader(INPUT_FILE)));\n // implement \"-a\", \"-s\", \"-c\" options\n Absyn result = (Absyn)(p.parse().value); \n \n if (result != null) {\n \n // If the '-a' flag is set, print the abstract syntax tree to a .abs file\n if (SHOW_TREE) {\n System.out.println(\"Abstract syntax tree written to '\" + FILE_NAME + \".abs'\");\n\n //Redirect stdout\n File absFile = new File(FILE_NAME + \".abs\");\n FileOutputStream absFos = new FileOutputStream(absFile);\n PrintStream absPS = new PrintStream(absFos);\n System.setOut(absPS);\n\n // Print abstract syntax tree to FILE_NAME.abs in current directory\n ShowTreeVisitor visitor = new ShowTreeVisitor();\n result.accept(visitor, 0, false); \n\n //Reset stdout\n System.setOut(console);\n }\n if (SHOW_SYM_TABLES) {\n //Redirect stdout to a .sym file \n File symFile = new File(FILE_NAME + \".sym\");\n FileOutputStream symFos = new FileOutputStream(symFile);\n PrintStream symPS = new PrintStream(symFos);\n System.setOut(symPS);\n } \n else {\n //Toss stdout output into the void while doing semantic analysis\n System.setOut(new PrintStream(OutputStream.nullOutputStream()));\n } \n\n // Perform semantic analysis\n SemanticAnalyzer analyzerVisitor = new SemanticAnalyzer();\n result.accept(analyzerVisitor, 0, false);\n\n //Restore stdout\n System.setOut(console);\n\n if (SHOW_SYM_TABLES) {\n //Print after having reported any errors\n System.out.println(\"Symbol table written to '\" + FILE_NAME + \".sym'\");\n }\n\n //Only generate code if the flag is set\n if (GENERATE_CODE) {\n\n //First, confirm that there are no syntax or semantic errors\n //HAS_ERRORS is true if there are any syntax errors or semantic errors, and false if both are error free\n HAS_ERRORS = (p.errorFound || analyzerVisitor.errorFound);\n\n if (HAS_ERRORS) {\n System.out.println(\"Cannot generate code while there are errors. Exiting...\");\n }\n else {\n //No syntax or semantic errors, proceed with code generation\n System.out.println(\"Assembly code written to '\" + FILE_NAME + \".tm'\");\n\n //Redirect stdout to .tm file\n File tmFile = new File(FILE_NAME + \".tm\");\n FileOutputStream tmFos = new FileOutputStream(tmFile);\n PrintStream tmPS = new PrintStream(tmFos);\n System.setOut(tmPS);\n\n //Perform code generation\n CodeGenerator generatorVisitor = new CodeGenerator();\n //result.accept(generatorVisitor, 0, false);\n generatorVisitor.visit(result, FILE_NAME + \".tm\");\n \n } \n }\n }\n\n } catch (FileNotFoundException e) {\n System.out.println(\"Could not find file '\" + INPUT_FILE + \"'. Check your spelling, and ensure it exists. Exiting...\");\n System.exit(-1); \n } catch (Exception e) {\n /* do cleanup here -- possibly rethrow e */\n e.printStackTrace();\n }\n }",
"public boolean compile(String name, String source) {\n\t return compile(source);\n\t}",
"public static void main(String[] args) {\n\t\tLivro l = new Livro();\n\t\tl.criaLivro(\"Estrutura de Dados\", \"Waldmar celles\", \"Academico\", 450, \"Elisilver\");\n\t\tl.fechaLivro();\n\t\tl.mostraDados();\n\t}",
"@SuppressWarnings(\"try\")\n public static <T extends CompilationResult> T compile(Request<T> r) {\n DebugContext debug = r.graph.getDebug();\n try (CompilationAlarm alarm = CompilationAlarm.trackCompilationPeriod(r.graph.getOptions())) {\n assert !r.graph.isFrozen();\n try (DebugContext.Scope s0 = debug.scope(\"GraalCompiler\", r.graph, r.providers.getCodeCache()); DebugCloseable a = CompilerTimer.start(debug)) {\n emitFrontEnd(r.providers, r.backend, r.graph, r.graphBuilderSuite, r.optimisticOpts, r.profilingInfo, r.suites);\n emitBackEnd(r.graph, null, r.installedCodeOwner, r.backend, r.compilationResult, r.factory, null, r.lirSuites);\n } catch (Throwable e) {\n throw debug.handle(e);\n }\n checkForRequestedCrash(r.graph);\n return r.compilationResult;\n }\n }",
"public static void main (String[] args) {\n\n Config config = ConfigUtils.loadConfig(\"/home/gregor/git/matsim/examples/scenarios/pt-tutorial/0.config.xml\");\n// config.controler().setLastIteration(0);\n// config.plans().setHandlingOfPlansWithoutRoutingMode(PlansConfigGroup.HandlingOfPlansWithoutRoutingMode.useMainModeIdentifier);\n// Scenario scenario = ScenarioUtils.loadScenario(config);\n// Controler controler = new Controler(scenario);\n// controler.run();\n\n\n// Config config = this.utils.loadConfig(IOUtils.extendUrl(ExamplesUtils.getTestScenarioURL(\"pt-tutorial\"), \"0.config.xml\"));\n config.controler().setLastIteration(1);\n config.plans().setHandlingOfPlansWithoutRoutingMode(PlansConfigGroup.HandlingOfPlansWithoutRoutingMode.useMainModeIdentifier);\n\n\n// try {\n Controler controler = new Controler(config);\n// final EnterVehicleEventCounter enterVehicleEventCounter = new EnterVehicleEventCounter();\n// final StageActivityDurationChecker stageActivityDurationChecker = new StageActivityDurationChecker();\n// controler.addOverridingModule( new AbstractModule(){\n// @Override public void install() {\n// this.addEventHandlerBinding().toInstance( enterVehicleEventCounter );\n// this.addEventHandlerBinding().toInstance( stageActivityDurationChecker );\n// }\n// });\n controler.run();\n }",
"public static void main(String [] args) {\n\t\tInjector injector = Guice.createInjector(new ExampleMoudle());\n\t\tApacheBike apacheBike = injector.getInstance(ApacheBike.class);\n\t\t\n\t\tapacheBike.goRace();\n\t}",
"public static void main(String args[]) throws Exception {\n obj.runLoadTest1(flag);\n }",
"public interface BuildMainSpaceAPI extends API {\n\n /**\n * Build all assets of the main code space.\n *\n * <ul>\n * <li>Compile sources and jar generated classes\n * <li>Check modules\n * <li>Generate API documentation\n * <li>Generate custom runtime image\n * </ul>\n *\n * @see #buildMainBuildModules()\n * @see #buildMainCheckModules()\n * @see #buildMainGenerateAPIDocumentation()\n * @see #buildMainGenerateCustomRuntimeImage()\n */\n default void buildMainSpace() throws Exception {\n buildMainBuildModules();\n buildMainCheckModules();\n buildMainGenerateAPIDocumentation();\n buildMainGenerateCustomRuntimeImage();\n }\n\n /** Compile and jar main modules. */\n default void buildMainBuildModules() {\n var main = bach().project().spaces().main();\n var modules = main.declarations();\n if (modules.isEmpty()) {\n log(\"Main module list is empty, nothing to build here.\");\n return;\n }\n var s = modules.size() == 1 ? \"\" : \"s\";\n say(\"Build %d main module%s: %s\", modules.size(), s, modules.toNames(\", \"));\n\n var release = main.release();\n var feature = release != 0 ? release : Runtime.version().feature();\n var classes = bach().folders().workspace(\"classes-main-\" + feature);\n\n var workspaceModules = bach().folders().workspace(\"modules\");\n Paths.deleteDirectories(workspaceModules);\n if (feature == 8) {\n bach().run(buildMainJavac(9, classes)).requireSuccessful();\n buildMainSpaceClassesForJava8(classes);\n } else {\n bach().run(buildMainJavac(release, classes)).requireSuccessful();\n }\n\n Paths.createDirectories(workspaceModules);\n var jars = new ArrayList<Jar>();\n var javacs = new ArrayList<Javac>();\n for (var declaration : modules.map().values()) {\n for (var folder : declaration.sources().list()) {\n if (!folder.isTargeted()) continue;\n javacs.add(buildMainJavac(declaration, folder, classes));\n }\n jars.add(buildMainJar(declaration, classes));\n }\n if (!javacs.isEmpty()) bach().run(javacs.stream()).requireSuccessful();\n bach().run(jars.stream()).requireSuccessful();\n }\n\n /** Check main modules. */\n default void buildMainCheckModules() {\n if (!bach().project().settings().tools().enabled(\"jdeps\")) return;\n say(\"Check main modules\");\n var main = bach().project().spaces().main();\n var modules = main.declarations();\n var jdeps = new ArrayList<JDeps>();\n for (var declaration : modules.map().values()) {\n jdeps.add(buildMainJDeps(declaration));\n }\n bach().run(jdeps.stream()).requireSuccessful();\n }\n\n /** Generate HTML pages of API documentation from main modules' source files. */\n default void buildMainGenerateAPIDocumentation() {\n if (!bach().project().settings().tools().enabled(\"javadoc\")) return;\n say(\"Generate API documentation\");\n var api = bach().folders().workspace(\"documentation\", \"api\");\n bach().run(buildMainJavadoc(api)).requireSuccessful();\n bach().run(buildMainJavadocJar(api)).requireSuccessful();\n }\n\n /** Assemble and optimize main modules and their dependencies into a custom runtime image. */\n default void buildMainGenerateCustomRuntimeImage() {\n if (!bach().project().settings().tools().enabled(\"jlink\")) return;\n say(\"Assemble custom runtime image\");\n var image = bach().folders().workspace(\"image\");\n Paths.deleteDirectories(image);\n bach().run(buildMainJLink(image));\n }\n\n default void buildMainSpaceClassesForJava8(Path classes) {\n var project = bach().project();\n var folders = project.settings().folders();\n var main = project.spaces().main();\n var classPaths = new ArrayList<Path>();\n main.declarations().toNames().forEach(name -> classPaths.add(classes.resolve(name)));\n classPaths.addAll(Paths.list(bach().folders().externalModules(), Paths::isJarFile));\n var javacs = new ArrayList<Javac>();\n for (var declaration : main.declarations().map().values()) {\n var name = declaration.name();\n var sources = declaration.sources();\n var root = sources.list().isEmpty() ? folders.root() : sources.first().path();\n var java8Files = Paths.find(root, 99, BuildMainSpaceAPI::isJava8File);\n if (java8Files.isEmpty()) continue; // skip aggregator module\n var compileSources =\n Command.javac()\n .with(\"--release\", main.release()) // 8\n .with(\"--class-path\", classPaths)\n .ifTrue(bach().is(Flag.STRICT), javac -> javac.with(\"-Xlint\").with(\"-Werror\"))\n .withAll(main.tweaks().arguments(\"javac\"))\n .with(\"-d\", classes.resolve(name))\n .withAll(java8Files);\n javacs.add(compileSources);\n }\n if (javacs.isEmpty()) return; // no javac command collected\n bach().run(javacs.stream()).requireSuccessful();\n }\n\n /** Test supplied path for pointing to a Java 8 compilation unit. */\n private static boolean isJava8File(Path path) {\n var name = Paths.name(path);\n return !path.startsWith(\".bach\") // ignore all files in `.bach` directory\n && name.endsWith(\".java\")\n && !name.equals(\"module-info.java\") // ignore module declaration compilation units\n && Files.isRegularFile(path);\n }\n\n /**\n * {@return the {@code javac} call to compile all configured modules of the main space}\n *\n * @param release the Java feature release number to compile modules for\n */\n default Javac buildMainJavac(int release, Path classes) {\n var project = bach().project();\n var main = project.spaces().main();\n return Command.javac()\n .ifTrue(release != 0, javac -> javac.with(\"--release\", release))\n .with(\"--module\", main.declarations().toNames(\",\"))\n .with(\"--module-version\", project.version())\n .forEach(\n main.declarations().toModuleSourcePaths(false),\n (javac, path) -> javac.with(\"--module-source-path\", path))\n .ifPresent(\n main.modulePaths().pruned(), (javac, paths) -> javac.with(\"--module-path\", paths))\n .ifTrue(bach().is(Flag.STRICT), javac -> javac.with(\"-Xlint\").with(\"-Werror\"))\n .withAll(main.tweaks().arguments(\"javac\"))\n .with(\"-d\", classes);\n }\n\n /** {@return the {@code javac} call to compile a specific version of a multi-release module} */\n default Javac buildMainJavac(LocalModule local, SourceFolder folder, Path classes) {\n var name = local.name();\n var project = bach().project();\n var main = project.spaces().main();\n var release = folder.release();\n var javaSourceFiles = Paths.find(folder.path(), 99, Paths::isJavaFile);\n return Command.javac()\n .with(\"--release\", release)\n .with(\"--module-version\", project.version())\n .ifPresent(\n main.modulePaths().pruned(), (javac, paths) -> javac.with(\"--module-path\", paths))\n .with(\"--class-path\", classes.resolve(name))\n .with(\"-implicit:none\") // generate classes for explicitly referenced source files\n .withAll(main.tweaks().arguments(\"javac\"))\n .withAll(main.tweaks().arguments(\"javac(\" + name + \")\"))\n .withAll(main.tweaks().arguments(\"javac(\" + release + \")\"))\n .withAll(main.tweaks().arguments(\"javac(\" + name + \"@\" + release + \")\"))\n .with(\"-d\", buildMultiReleaseClassesDirectory(name, release))\n .withAll(javaSourceFiles);\n }\n\n private Path buildMultiReleaseClassesDirectory(String module, int release) {\n return bach().folders().workspace(\"classes-mr-\" + release, module);\n }\n\n default Jar buildMainJar(LocalModule local, Path classes) {\n var project = bach().project();\n var main = project.spaces().main();\n var name = local.name();\n var file = bach().folders().workspace(\"modules\", buildMainJarFileName(name));\n var mainClass = local.reference().descriptor().mainClass();\n var jar =\n Command.jar()\n .ifTrue(bach().is(Flag.VERBOSE), command -> command.with(\"--verbose\"))\n .with(\"--create\")\n .with(\"--file\", file)\n .ifPresent(mainClass, (args, value) -> args.with(\"--main-class\", value))\n .withAll(main.tweaks().arguments(\"jar\"))\n .withAll(main.tweaks().arguments(\"jar(\" + name + \")\"));\n var baseClasses = classes.resolve(name);\n if (Files.isDirectory(baseClasses)) jar = jar.with(\"-C\", baseClasses, \".\");\n // include base resources\n for (var folder : local.resources().list()) {\n if (folder.isTargeted()) continue; // handled later\n jar = jar.with(\"-C\", folder.path(), \".\");\n }\n // add (future) targeted classes and targeted resources in ascending order\n for (int release = 9; release <= Runtime.version().feature(); release++) {\n var paths = new ArrayList<Path>();\n var isSourceTargeted = local.sources().stream(release).findAny().isPresent();\n if (isSourceTargeted) paths.add(buildMultiReleaseClassesDirectory(name, release));\n local.resources().stream(release).map(SourceFolder::path).forEach(paths::add);\n if (paths.isEmpty()) continue;\n jar = jar.with(\"--release\", release);\n for (var path : paths) jar = jar.with(\"-C\", path, \".\");\n }\n return jar;\n }\n\n default String buildMainJarFileName(String module) {\n return module + '@' + bach().project().versionNumberAndPreRelease() + \".jar\";\n }\n\n default JDeps buildMainJDeps(LocalModule local) {\n var folders = bach().folders();\n return Command.jdeps()\n .with(\"--check\", local.name())\n .with(\"--multi-release\", \"BASE\")\n .with(\"--module-path\", List.of(folders.workspace(\"modules\"), folders.externalModules()));\n }\n\n default Javadoc buildMainJavadoc(Path destination) {\n var project = bach().project();\n var main = project.spaces().main();\n return Command.javadoc()\n .with(\"--module\", main.declarations().toNames(\",\"))\n .forEach(\n main.declarations().toModuleSourcePaths(false),\n (javadoc, path) -> javadoc.with(\"--module-source-path\", path))\n .ifPresent(\n main.modulePaths().pruned(), (javadoc, paths) -> javadoc.with(\"--module-path\", paths))\n .ifTrue(bach().is(Flag.STRICT), javadoc -> javadoc.with(\"-Xdoclint\").with(\"-Werror\"))\n .withAll(main.tweaks().arguments(\"javadoc\"))\n .with(\"-d\", destination);\n }\n\n /** {@return the jar call generating the API documentation archive} */\n default Jar buildMainJavadocJar(Path api) {\n var project = bach().project();\n var file = project.name() + \"-api-\" + project.version() + \".zip\";\n return Command.jar()\n .with(\"--create\")\n .with(\"--file\", api.getParent().resolve(file))\n .with(\"--no-manifest\")\n .with(\"-C\", api, \".\");\n }\n\n default JLink buildMainJLink(Path image) {\n var project = bach().project();\n var main = project.spaces().main();\n var test = project.spaces().test();\n return Command.jlink()\n .ifPresent(main.launcher(), (jlink, launcher) -> jlink.with(\"--launcher\", launcher.value()))\n .with(\"--add-modules\", main.declarations().toNames(\",\"))\n .ifPresent(\n test.modulePaths().pruned(), (jlink, paths) -> jlink.with(\"--module-path\", paths))\n .withAll(main.tweaks().arguments(\"jlink\"))\n .with(\"--output\", image);\n }\n}",
"public static void main(String args[])\n {\n try\n {\n Date startDate = new Date();\n System.out.println(\"Job started \" + startDate);\n\n // Change the thread name so we can easily identify messages\n // from this run in the log.\n Thread t = Thread.currentThread();\n t.setName(\"RunLBL_\" + startDate.getTime());\n\n log.info(\"LBL conversion started\");\n\n RL21Convert lbl = new RL21Convert(RL21Convert.LBL);\n\n // Get a new RunConvert using our conversion class.\n RunConvert run = new RunConvert(lbl);\n\n // RunConvert.process handles all I/O and the calling\n // of the MarcConvert routines to perform the conversion.\n int rc = run.convert();\n log.info(\"LBL conversion completed - return code = \" + rc);\n System.out.println(\"Job completed \" + new java.util.Date() + \" rc = \" + rc);\n System.exit(rc);\n }\n catch (MarcParmException e)\n {\n log.error(\"MarcParmException: \" + e.getMessage(), e);\n }\n catch (Exception e)\n {\n log.error(\"Exception: \" + e.getMessage(), e);\n }\n }",
"public static void main(String[] args) {\n Parabola par1=new Parabola(1,2,3);\r\n Parabola par2=new Parabola(2,4,5);\r\n par1.afisare();\r\n par2.afisare();\r\n Parabola.mijloc(par1, par2);\r\n\t}",
"public static void main(String[] args)\n {\n /*\n * Create a new loader with default factory.\n * \n * A factory will create all rule components when loader requires them\n * Default engine is used that creates all the default constructs in:\n * org.achacha.rules.compare\n * org.achacha.rules.condition\n * org.achacha.rules.action\n * \n * RulesEngineFactoryExtension can be used to extend a default factory while keeping existing constructs\n * for basic rules the default factory provides a wide variety of comparators and action elements\n * \n * The loader uses the factory to resolve where the rule parts are loaded from\n * There are several load types (file system, in-memory string, in-memory XML)\n * Here we will configure a simple in-memory string based loader and add the\n * conditions and actions from constants\n */\n RulesEngineLoaderImplMappedString loader = new RulesEngineLoaderImplMappedString(new RulesEngineFactory());\n \n // Add a simple rule and call it 'alwaysTrue', we will execute this rule using this name\n loader.addRule(\"alwaysTrue\", SIMPLE_RULE);\n \n /*\n * Create a rules engine that uses the loader and factory we just created\n * Normally these 3 objects would be someone retained so we don't have to re-parse the rules every execution\n * However this is a tutorial example\n */\n RulesEngine engine = new RulesEngine(loader);\n \n /////////////////////////// Everything above is initialization ///////////////////////////////////////\n \n /////////////////////////// Everything below is rule execution ///////////////////////////////////////\n /*\n * Now we need to have some input for the rule to process but since were are using constants in comparison we can just pass\n * an empty input model\n * \n * We use dom4j XML Element for input\n * \n * <request>\n * <input />\n * </request>\n */\n Element request = DocumentHelper.createElement(\"request\");\n request.addElement(\"input\");\n \n /*\n * RuleContext is an object that holds the input, output, event log, etc for a given rule execution\n * The engine can create a new context for us if we specify the input for the rule\n */\n RuleContext ruleContext = engine.createContext(request);\n \n /*\n * Now that we have set up our context we can execute the rule\n * Since we used addRule above and called this rule 'alwaysTrue', this is how we invoke this rule\n * \n * NOTE:\n * you can run multiple rules sequentially against the same context\n * some actions can modify input context and some conditions can check output context\n * so rules can depend on other rules\n */\n engine.execute(ruleContext, \"alwaysTrue\");\n \n /*\n * Display the output model\n * \n * Since the action we used is:\n * \n * <Action Operator='OutputValueSet'>\"\n * <Path>/result</Path>\"\n * <Value Source='Constant'><Data>yes</Data></Value>\"\n * </Action>\"\n * \n * We get the following output model:\n * <output><result>yes</result></output>\n * \n * NOTE: The path on the output action is always relative to the output element\n */\n System.out.println(\"Output Model\\n------------\");\n System.out.println(ruleContext.getOutputModel().asXML());\n }",
"public static void main(String[] args) {\n\t\t\n\t\tchar[] buffer = \"\\\"use strict\\\";\\r\\nfunction sum(x, y){ return x + y }\".toCharArray();\n\t\tSource source = new Source(\"src\\\\test\\\\resources\\\\a.txt\", buffer);\n\t\t\n\t\tParseOption option = new ParseOption();\n\t\t\n\t\tParser parser = new Parser();\n\t\t\n\t\tparser.parse(source, option);\n\n\t}",
"public static void main(String[] args) {\n\tLibro l1=new Libro();\r\n\tl1.InfLibro(\"Gary\", 25, \"terror\");\r\n\r\n\t}",
"public void compileStarted() { }",
"public void compileStarted() { }",
"public static void main(String[] args) {\n\t\tnew Grimpan();\n\t}",
"public static void main(String[] args) {\n\t\tLivro l = new Livro();\n\t\t\n\t\tl.criaLivro(\"Estruturas de Dados usando C\", \"Waldemar Celles\", \"Academico\", 450, false, 2015);\n\t\tl.mostraEstado();\n\t}",
"public static void main(String[] args) throws IOException {\n\n SimpleDateFormat ft = new SimpleDateFormat(\"hh:mm:ss\");\n System.out.println(\"Started at \" + ft.format(new Date()));\n\n // Folder containing android apps to analyze\n final PluginId pluginId = PluginId.getId(\"idaDoctor\");\n final IdeaPluginDescriptor pluginDescriptor = PluginManager.getPlugin(pluginId);\n File experimentDirectory = new File(root_project.getBasePath());\n fileName = new File(pluginDescriptor.getPath().getAbsolutePath()+\"/resources/results.csv\");\n String smellsNeeded = args[0];\n\n FILE_HEADER = new String[StringUtils.countMatches(smellsNeeded, \"1\") + 1];\n\n DataTransmissionWithoutCompressionRule dataTransmissionWithoutCompressionRule = new DataTransmissionWithoutCompressionRule();\n DebuggableReleaseRule debbugableReleaseRule = new DebuggableReleaseRule();\n DurableWakeLockRule durableWakeLockRule = new DurableWakeLockRule();\n InefficientDataFormatAndParserRule inefficientDataFormatAndParserRule = new InefficientDataFormatAndParserRule();\n InefficientDataStructureRule inefficientDataStructureRule = new InefficientDataStructureRule();\n InefficientSQLQueryRule inefficientSQLQueryRule = new InefficientSQLQueryRule();\n InternalGetterSetterRule internaleGetterSetterRule = new InternalGetterSetterRule();\n LeakingInnerClassRule leakingInnerClassRule = new LeakingInnerClassRule();\n LeakingThreadRule leakingThreadRule = new LeakingThreadRule();\n MemberIgnoringMethodRule memberIgnoringMethodRule = new MemberIgnoringMethodRule();\n NoLowMemoryResolverRule noLowMemoryResolverRule = new NoLowMemoryResolverRule();\n PublicDataRule publicDataRule = new PublicDataRule();\n RigidAlarmManagerRule rigidAlarmManagerRule = new RigidAlarmManagerRule();\n SlowLoopRule slowLoopRule = new SlowLoopRule();\n UnclosedCloseableRule unclosedCloseableRule = new UnclosedCloseableRule();\n\n String[] smellsType = {\"DTWC\", \"DR\", \"DW\", \"IDFP\", \"IDS\", \"ISQLQ\", \"IGS\", \"LIC\", \"LT\", \"MIM\", \"NLMR\", \"PD\", \"RAM\", \"SL\", \"UC\"};\n\n FILE_HEADER[0] = \"Class\";\n\n int headerCounter = 1;\n\n for (int i = 0; i < smellsNeeded.length(); i++) {\n if (smellsNeeded.charAt(i) == '1') {\n FILE_HEADER[headerCounter] = smellsType[i];\n headerCounter++;\n }\n }\n\n CSVFormat csvFileFormat = CSVFormat.DEFAULT.withRecordSeparator(NEW_LINE_SEPARATOR);\n FileWriter fileWriter = new FileWriter(fileName);\n try (CSVPrinter csvFilePrinter = new CSVPrinter(fileWriter, csvFileFormat)) {\n csvFilePrinter.printRecord((Object[]) FILE_HEADER);\n\n for (File project : experimentDirectory.listFiles()) {\n\n if (!project.isHidden()) {\n\n // Method to convert a directory into a set of java packages.\n ArrayList<PackageBean> packages = FolderToJavaProjectConverter.convert(project.getAbsolutePath());\n\n for (PackageBean packageBean : packages) {\n\n for (ClassBean classBean : packageBean.getClasses()) {\n\n List record = new ArrayList();\n\n System.out.println(\"-- Analyzing class: \" + classBean.getBelongingPackage() + \".\" + classBean.getName());\n\n record.add(classBean.getBelongingPackage() + \".\" + classBean.getName());\n\n if (smellsNeeded.charAt(0) == '1') {\n if (dataTransmissionWithoutCompressionRule.isDataTransmissionWithoutCompression(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(1) == '1') {\n if (debbugableReleaseRule.isDebuggableRelease(RunAndroidSmellDetection.getAndroidManifest(project))) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(2) == '1') {\n if (durableWakeLockRule.isDurableWakeLock(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(3) == '1') {\n if (inefficientDataFormatAndParserRule.isInefficientDataFormatAndParser(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(4) == '1') {\n if (inefficientDataStructureRule.isInefficientDataStructure(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(5) == '1') {\n if (inefficientSQLQueryRule.isInefficientSQLQuery(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(6) == '1') {\n if (internaleGetterSetterRule.isInternalGetterSetter(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(7) == '1') {\n if (leakingInnerClassRule.isLeakingInnerClass(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(8) == '1') {\n if (leakingThreadRule.isLeakingThread(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(9) == '1') {\n if (memberIgnoringMethodRule.isMemberIgnoringMethod(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(10) == '1') {\n if (noLowMemoryResolverRule.isNoLowMemoryResolver(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(11) == '1') {\n if (publicDataRule.isPublicData(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(12) == '1') {\n if (rigidAlarmManagerRule.isRigidAlarmManager(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(13) == '1') {\n if (slowLoopRule.isSlowLoop(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(14) == '1') {\n if (unclosedCloseableRule.isUnclosedCloseable(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n csvFilePrinter.printRecord(record);\n }\n }\n }\n }\n }\n System.out.println(\"CSV file was created successfully!\");\n System.out.println(\"Finished at \" + ft.format(new Date()));\n }",
"public void compileScript() {\n // find and prepare by extension\n //\n log.info(\"Compiling script...\");\n Timer engineTimer = new Timer();\n \n engine = EngineHelper.findByFileExtension(scriptExtension, dependencyJarFiles != null && !dependencyJarFiles.isEmpty());\n \n if (engine == null) {\n throw new BlazeException(\"Unable to find script engine for file extension \" + scriptExtension + \". Maybe bad file extension or missing dependency?\");\n }\n\n log.debug(\"Using script engine {}\", engine.getClass().getCanonicalName());\n \n if (!engine.isInitialized()) {\n engine.init(context);\n }\n \n script = engine.compile(context);\n \n log.info(\"Compiled script in {} ms\", engineTimer.stop().millis());\n }",
"@Test\n public void main() {\n System.out.println(\"main\");\n String[] args = null;\n SaalHelper.main(args);\n }",
"public static void main(String[] args) {\n PAT1028 pat = new PAT1028();\r\n pat.run();\r\n \r\n }",
"public CompilationResult compile(TestConfiguration configuration) {\n TestUtilities.ensureDirectoryExists(new File(configuration.getOptions().get(\"-d\")));\n\n final StringWriter javacOutput = new StringWriter();\n DiagnosticCollector<JavaFileObject> diagnostics = new\n DiagnosticCollector<JavaFileObject>();\n\n JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);\n Iterable<? extends JavaFileObject> javaFiles =\n fileManager.getJavaFileObjects(configuration.getTestSourceFiles().toArray(new File[]{}));\n\n\n\n //Even though the method compilergetTask takes a list of processors, it fails if processors are passed this way\n //with the message:\n //error: Class names, 'org.checkerframework.checker.interning.InterningChecker', are only accepted if\n // annotation processing is explicitly requested\n //Therefore, we now add them to the beginning of the options list\n final List<String> options = new ArrayList<String>();\n options.add(\"-processor\");\n options.add(PluginUtil.join(\",\", configuration.getProcessors()));\n List<String> nonJvmOptions = new ArrayList<String>();\n for (String option : configuration.getFlatOptions()) {\n if (! option.startsWith(\"-J-\")) {\n nonJvmOptions.add(option);\n }\n }\n options.addAll(nonJvmOptions);\n\n if (configuration.shouldEmitDebugInfo()) {\n System.out.println(\"Running test using the following invocation:\");\n System.out.println(\"javac \" + PluginUtil.join(\" \", options) + \" \"\n + PluginUtil.join(\" \", configuration.getTestSourceFiles()));\n }\n\n JavaCompiler.CompilationTask task =\n compiler.getTask(javacOutput, fileManager, diagnostics, options, new ArrayList<String>(), javaFiles);\n\n /*\n * In Eclipse, std out and std err for multiple tests appear as one\n * long stream. When selecting a specific failed test, one sees the\n * expected/unexpected messages, but not the std out/err messages from\n * that particular test. Can we improve this somehow?\n */\n final Boolean compiledWithoutError = task.call();\n javacOutput.flush();\n return new CompilationResult(compiledWithoutError, javacOutput.toString(), javaFiles,\n diagnostics.getDiagnostics());\n }",
"public static void main(String args[]) throws Exception{\r\n java.io.BufferedReader in;\r\n Yylex sc;\r\n parser p;\r\n java_cup.runtime.Symbol sroot;\r\n boolean error=false;\r\n\r\n //El primer parametro es el nombre del fichero con el programa\r\n if (args.length != 2) {\r\n System.out.println(\r\n \"Uso: java Main <nombre_fichero> <fichero_generado>\");\r\n error=true;\r\n }\r\n\r\n //Analisis lexico y sintactico\r\n\r\n if (!error) {\r\n \ttry {\r\n \t in = new java.io.BufferedReader(new java.io.FileReader(args[0]));\r\n \t sc = new Yylex(in);\r\n \t p = new parser(sc);\r\n \t sroot = p.parse();\r\n \t System.out.println(\"Análisis léxico y sintáctico correctos\");\r\n\r\n /* Codigo para el analisis semantico, empieza a computar desde el nodo raiz */\r\n S root = (S) sroot.value;\r\n root.computeAH1();\r\n System.out.println(\"Análisis semántico correcto\");\r\n /* Fin codigo analisis semantico */\r\n\r\n /* Codigo para generar codigo Java */\r\n codeGenerator(args[1], root);\r\n /* Fin codigo para generar codigo Java */\r\n \t} catch(IOException e) {\r\n \t System.out.println(\"Error abriendo fichero: \" + args[0]);\r\n \t error= true;\r\n \t}\r\n }\r\n }",
"public static void main(String[] args) {\n\t\t//TODO: Hilfsmethoden rufen\n\t\t/*\n\t\tc0_vl();\n\t\tc1_vl();\n\t\tbi_vl();\n\t\tfeec();\n\t\tc0();\n\t\tc1();\n\t\t*/\n\t\tc2();\n\t\t/*\n\t\tmmcc();\n\t\t*/\n\t}",
"public void cosoleText() throws IOException\n\t{\n\t\tconsole.setText(\"\"); //Clear the current text on the console\n\t\t//Create anew Process builder with the command to compile all the projects in the current open directory\n\t\tProcessBuilder processBuilder = new ProcessBuilder(javacCommandBuilder(currentProject, currentFile)); \n\t\tProcess process = processBuilder.start(); //Start the process\n\t\t//Create and start Processes for the CCL Loader and CCLRun functions\n\t\tProcess processCCLoader = new ProcessBuilder(new String[] {\"javac\", \"-cp\", \"Class\",\"-d\", \"Class\", \"SDPRO\\\\src\\\\CompilingClassLoader.java\"} ).start();\n\t\tProcess processCCL = new ProcessBuilder(new String[] {\"javac\", \"-cp\", \"Class\",\"-d\", \"Class\", \"SDPRO\\\\src\\\\CCLRun.java\"} ).start();\n\t\t\n\t\t//If the process fails on compile\n\t\tif(process.getErrorStream().read() != -1)\n\t\t{\n\t\t\t//Get the process Error message\n\t\t\tInputStream in = process.getErrorStream();\n\t\t\t//Read the error message and paste it to the console\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(in));\n\t\t\tString line = null;\n\t\t\twhile (in.read() != -1)\n\t\t\t{\n\t\t\t\tline = br.readLine();\n\t\t\t\tconsole.append(line + \"\\n\");\n\t\t\t}\n\t\t}\n\t\t//If the CCLpader process fails to compile\n\t\tif(processCCLoader.getErrorStream().read() != -1)\n\t\t{\n\t\t\t//Get the process Error message\n\t\t\tInputStream in = processCCLoader.getErrorStream();\n\t\t\t//Read the error message and paste it to the console\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(in));\n\t\t\tString line = null;\n\t\t\twhile (in.read() != -1)\n\t\t\t{\n\t\t\t\tline = br.readLine();\n\t\t\t\tconsole.append(line + \"\\n\");\n\t\t\t}\n\t\t}\n\t\t//If the CCLRun fails to compile\n\t\tif(processCCL.getErrorStream().read() != -1)\n\t\t{\n\t\t\t//Get the process Error message\n\t\t\tInputStream in = processCCL.getErrorStream();\n\t\t\t//Read the error message and paste it to the console\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(in));\n\t\t\tString line = null;\n\t\t\twhile (in.read() != -1)\n\t\t\t{\n\t\t\t\tline = br.readLine();\n\t\t\t\tconsole.append(line + \"\\n\");\n\t\t\t}\n\t\t}\n\t\t//If the process compiles\n\t\tif(process.exitValue() == 0)\n\t\t{\n\t\t\t//Create a new thread\n\t\t\tExecutorService service = Executors.newFixedThreadPool(1);\n\t\t\t//Run the java process in a thread\n\t\t\tservice.submit(new ProcessTask(javaCommadBuilder(currentFile)));\n\t\t}\n\t}",
"@Test\n public void test4a() {\n DataSet dataSetxx = load(\"exampleBig.dnal\");\n DataSet dataSet = load(\"exampleBig.dnal\");\n \n log(\"json..\");\n Generator gen = dataSet.createGenerator();\n JSONValueGenerator visitor = new JSONValueGenerator();\n boolean b = gen.generateValues(visitor);\n// for(String s: visitor.outputL) {\n// log(s);\n// }\n \n log(\"-----\");\n CompilerImpl compiler = (CompilerImpl) this.aCompiler;\n compiler.getContext().perf.dump();\n }",
"public void runProgram(Path p) {\n\t\ttry {\n\t\t\tFile f = new File(p.toString());\n\t\t\tString dir = f.getParent();\n\t\t\tString filename = f.getName();\n\t\t\tString currentOS = System.getProperty(\"os.name\").toLowerCase();\n\n\t\t\t//System.out.println(\"OS: \" + currentOS);\n\t\t\t\n\t\t\tif (currentOS.indexOf(\"win\") >= 0) {\n\t\t\t\tString compiled = dir.concat(\"\\\\\").concat(filename.substring(0, f.getName().lastIndexOf(\".\")).concat(\".exe\"));\n\t\t\t\t\n\t\t\t\t//System.out.println(\"Compiled File: \" + compiled);\n\n\t\t\t\tif (this.programIfExists(compiled)) {\n\t\t\t\t\tSystem.out.println(\"Finished Compiling\");\n\t\t\t\t\tProcessBuilder pb = new ProcessBuilder(\"cmd\", \"/k\", \"start\", compiled);\n\t\t\t\t\tProcess proc = pb.start();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Some compilation error occured\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse if(currentOS.indexOf(\"mac\") >= 0) {\n\t\t\t\tString compiled = dir.concat(\"\\\\\").concat(filename.substring(0, f.getName().lastIndexOf(\".\")).concat(\".out\"));\n\t\t\t\tRuntime rt = Runtime.getRuntime();\n\t\t\t\tProcess proc = rt.exec(compiled);\n\t\t\t}\n\n\t\t\telse if(currentOS.indexOf(\"nix\") >= 0 || currentOS.indexOf(\"nux\") >= 0) {\n\t\t\t\tString compiled = dir.concat(\"\\\\\").concat(filename.substring(0, f.getName().lastIndexOf(\".\")));\n\t\t\t\tRuntime rt = Runtime.getRuntime();\n\t\t\t\tProcess proc = rt.exec(compiled);\n\t\t\t}\n\t\t}\n\n\t\tcatch(Exception ex) {\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tLCContest2 lc=new LCContest2();\r\n\t\t\r\n\t\tint courses[][] = { { 100, 200 }, { 200, 1300 }, { 1000, 1250 }, { 2000, 3200 } };\r\n\t\tlc.scheduleCourse(courses);\r\n\t}",
"public static void main(String[] args){\n\t\tnew VanRentalSystem().run(args[0]);\n\t}",
"public static void main(String args[])\n {\n String[] param = {\"out.println(666)\"};\n launch(param);\n //Analyzing Java APIs using logogram end\n }",
"public static void main(String[] args) {\n\t\tjflex.Main.generate(new File(\"especificacoes/miniC.lex\"));\n\t}",
"public static void compile(\n String[] arguments)\n throws ParserException, LexerException {\n\n // default destination directory is current working directory\n File destinationDirectory = new File(System.getProperty(\"user.dir\"));\n\n // default destination package is anonymous\n String destinationPackage = \"\";\n\n // default option values\n boolean generateCode = true;\n Verbosity verbosity = Verbosity.INFORMATIVE;\n Strictness strictness = Strictness.STRICT;\n\n // parse command line arguments\n ArgumentCollection argumentCollection\n = new ArgumentCollection(arguments);\n\n // handle option arguments\n for (OptionArgument optionArgument : argumentCollection\n .getOptionArguments()) {\n\n switch (optionArgument.getOption()) {\n\n case DESTINATION:\n destinationDirectory = new File(optionArgument.getOperand());\n break;\n\n case PACKAGE:\n destinationPackage = optionArgument.getOperand();\n break;\n\n case GENERATE:\n generateCode = true;\n break;\n\n case NO_CODE:\n generateCode = false;\n break;\n\n case LENIENT:\n strictness = Strictness.LENIENT;\n break;\n\n case STRICT:\n strictness = Strictness.STRICT;\n break;\n\n case QUIET:\n verbosity = Verbosity.QUIET;\n break;\n\n case INFORMATIVE:\n verbosity = Verbosity.INFORMATIVE;\n break;\n\n case VERBOSE:\n verbosity = Verbosity.VERBOSE;\n break;\n\n case VERSION:\n System.out.println(\"ObjectMacro, part of SableCC version \"\n + Version.VERSION);\n return;\n\n case HELP:\n System.out.println(\"Usage: objectmacro \"\n + Option.getShortHelpMessage() + \" file.objectmacro\");\n System.out.println(\"Options:\");\n System.out.println(Option.getLongHelpMessage());\n return;\n default:\n throw new InternalException(\n \"unhandled option \" + optionArgument.getOption());\n }\n }\n\n switch (verbosity) {\n case INFORMATIVE:\n case VERBOSE:\n System.out.println();\n System.out.println(\n \"ObjectMacro, part of SableCC version \" + Version.VERSION);\n System.out.println(\n \"by Etienne M. Gagnon <egagnon@j-meg.com> and other contributors.\");\n System.out.println();\n break;\n }\n\n // handle text arguments\n if (argumentCollection.getTextArguments().size() == 0) {\n System.out.println(\"Usage: objectmacro \"\n + Option.getShortHelpMessage() + \" file.objectmacro\");\n return;\n }\n else if (argumentCollection.getTextArguments().size() > 1) {\n throw CompilerException.invalidArgumentCount();\n }\n\n // check argument\n TextArgument textArgument\n = argumentCollection.getTextArguments().get(0);\n\n if (!textArgument.getText().endsWith(\".objectmacro\")) {\n throw CompilerException\n .invalidObjectmacroSuffix(textArgument.getText());\n }\n\n File macroFile = new File(textArgument.getText());\n\n if (!macroFile.exists()) {\n throw CompilerException.missingMacroFile(textArgument.getText());\n }\n\n if (!macroFile.isFile()) {\n throw CompilerException.macroNotFile(textArgument.getText());\n }\n\n ObjectMacroFront.compile(macroFile, destinationDirectory,\n destinationPackage, generateCode, strictness, verbosity);\n }",
"public static void main(String[] args)\r\n\t{\n\t\tSystem.out.println(\"Jon Heard's JVM Assembler\");\r\n\t\tSystem.out.println(\"version \" + VERSION);\r\n\t\tSystem.out.println(\"----------------------------\");\r\n\t\tSystem.out.println(\" ('-help' or '-h' for help)\");\r\n\t\tSystem.out.println(\"----------------------------\");\r\n\t\t\r\n\t\t/// Parse arguments\r\n\t\tboolean error = false;\r\n\t\tboolean helpTextPrinted = false;\r\n\t\tString sourceFileName = \"\";\t\t\r\n\t\tfor(String arg : args)\r\n\t\t{\r\n\t\t\tif(arg.startsWith(\"-\"))\r\n\t\t\t{\r\n\t\t\t\tif(arg.equals(\"-help\") || arg.equals(\"-h\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tprintHelpText();\r\n\t\t\t\t\thelpTextPrinted = true;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.err.println(\r\n\t\t\t\t\t\t\t\"ERROR: Invalid parameter '\" + arg + \"'.\");\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(!sourceFileName.equals(\"\"))\r\n\t\t\t{\r\n\t\t\t\tSystem.err.println(\"ERROR: Invalid parameter '\" + arg + \"'.\");\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tsourceFileName = arg;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(error || helpTextPrinted) return;\r\n\r\n\t\t/// Make sure we have a source file to load\r\n\t\tif(args.length < 1)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"ERROR: A sourcefile must be included.\");\r\n\t\t\tSystem.err.println(\"\\tExample: \");\r\n\t\t\tSystem.err.println(\"\\tjvmasm MySource.asm\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/// Make sure the source file exists\r\n\t\tFile sourceFile = new File(sourceFileName);\r\n\t\tif(!sourceFile.exists())\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: the source file '\" + sourceFileName +\r\n\t\t\t\t\t\"' does not exist.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/// Load the source file into a string\r\n\t\tString sourceData = UtilMethods.fileToString(sourceFileName);\r\n\t\tif(sourceData == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: Unable to load the source file '\" + sourceFileName +\r\n\t\t\t\t\t\"'.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/// Parse the source file into a ClassRep object\r\n\t\tClassParser parser = new ClassParser();\r\n\t\tClassRep classRep = parser.parseSource(sourceFileName, sourceData);\r\n\t\tif(classRep == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: Failed to parse source file '\" + sourceFileName +\r\n\t\t\t\t\t\"'.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t/// Store the ClassRep into a class file\r\n\t\tString classFileName = classRep.getName() + \".class\";\r\n\t\tif(!UtilMethods.byteArrayToFile(\r\n\t\t\t\tclassRep.getJvmBytes(), classFileName))\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: Failed to write class file '\" + classFileName +\r\n\t\t\t\t\t\"'.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\tlanceur8();\n\t}",
"@Override\r\n\tpublic void execute() throws BuildException {\r\n\r\n\t\tif (StringUtils.isBlank(getViewPath())) {\r\n\t\t\tthrow new BuildException(\"'viewpath' must be specified\");\r\n\t\t}\r\n\r\n\t\tSet<String> currentLoadRules = getCurrentLoadRules();\r\n\t\tlog(\"Current load rules: \" + currentLoadRules, Project.MSG_VERBOSE);\r\n\r\n\t\tString bl = determineBaseline();\r\n\t\tCcListBlcompRoots listBlRoots = new CcListBlcompRoots();\r\n\t\tlistBlRoots.setProject(getProject());\r\n\t\tlistBlRoots.setBaseline(bl);\r\n\t\tlistBlRoots.execute();\r\n\t\tlog(\"Required load rules: \" + listBlRoots.getLoadRules(),\r\n\t\t\t\tProject.MSG_VERBOSE);\r\n\t\tSet<String> toAdd = new HashSet<String>();\r\n\t\ttoAdd.addAll(listBlRoots.getLoadRules());\r\n\r\n\t\tString[] split = explicitLoadRules.split(System\r\n\t\t\t\t.getProperty(\"line.separator\"));\r\n\t\tfor (String string : split) {\r\n\t\t\ttoAdd.add(string);\r\n\t\t}\r\n\t\ttoAdd.removeAll(currentLoadRules);\r\n\t\tlog(\"Rules to add to view [\" + viewTag + \"] : \" + toAdd,\r\n\t\t\t\tProject.MSG_DEBUG);\r\n\r\n\t\tCcAddLoadRules addLoadRule = new CcAddLoadRules();\r\n\t\taddLoadRule.setProject(getProject());\r\n\t\taddLoadRule.setViewPath(getViewPath());\r\n\t\taddLoadRule.setOverwrite(true);\r\n\t\tfor (String newRule : toAdd) {\r\n\t\t\tif (!StringUtils.isEmpty(newRule)) {\r\n\t\t\t\taddLoadRule.setLoadRule(newRule);\r\n\t\t\t\taddLoadRule.execute();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"public void execute()\n throws BuildException\n {\n if (_resinHome == null)\n throw new BuildException(\"resinHome is required by jspc\");\n\n if (_rootDirectory == null)\n throw new BuildException(\"rootDirectory is required by jspc\");\n\n File resinJar = new File(_resinHome,\n \"lib\" + File.separatorChar + \"resin.jar\");\n\n if (! resinJar.exists())\n throw new BuildException(\"resinHome '\"\n + _resinHome\n + \"' does not appear to be valid\");\n\n Java java = new Java(this);\n java.setFailonerror(true);\n java.setFork(true);\n java.setJar(resinJar);\n\n List<String> args = new ArrayList<String>();\n args.add(\"jspc\");\n args.add(\"-app-dir\");\n args.add(_rootDirectory.getPath());\n\n for (String arg : args)\n java.createArg().setLine(arg);\n\n log(java.getCommandLine().toString(), _level.intValue());\n\n java.executeJava();\n }",
"@Override\n protected void codeGenMain(DecacCompiler compiler, Registres regs, Pile p) {\n }",
"public static void main(java.lang.String[] args) throws java.lang.Exception {\n java.lang.System.out.println(\"Bootstrapping mutant\");\n java.net.URL bootstrapURL = org.apache.ant.init.ClassLocator.getClassLocationURL(org.apache.ant.bootstrap.Bootstrap.class);\n java.net.URL builderURL = new java.net.URL(bootstrapURL, \"../builder/\");\n java.net.URL toolsJarURL = org.apache.ant.init.ClassLocator.getToolsJarURL();\n java.net.URL[] urls = new java.net.URL[]{ builderURL, toolsJarURL };\n java.lang.ClassLoader builderLoader = new java.net.URLClassLoader(urls);\n // org.apache.ant.init.LoaderUtils.dumpLoader(System.out,\n // builderLoader);\n java.lang.Class builderClass = java.lang.Class.forName(\"org.apache.ant.builder.Builder\", true, builderLoader);\n final java.lang.Class[] param = new java.lang.Class[]{ java.lang.Class.forName(\"[Ljava.lang.String;\") };\n final java.lang.reflect.Method main = builderClass.getMethod(\"main\", param);\n final java.lang.Object[] argument = new java.lang.Object[]{ args };\n main.invoke(null, argument);\n }"
] |
[
"0.627768",
"0.6061934",
"0.5802118",
"0.5780006",
"0.5683104",
"0.55988306",
"0.5502085",
"0.5499619",
"0.5499209",
"0.54748744",
"0.5436369",
"0.5411441",
"0.5383753",
"0.5378936",
"0.53331393",
"0.53276336",
"0.52759665",
"0.5265008",
"0.5250337",
"0.5246942",
"0.5235767",
"0.5234833",
"0.5219819",
"0.5202171",
"0.51942146",
"0.51641846",
"0.5161866",
"0.515963",
"0.5158936",
"0.5154331",
"0.5143865",
"0.5129459",
"0.51247215",
"0.5112866",
"0.5110105",
"0.5108827",
"0.510741",
"0.5105835",
"0.5097671",
"0.5091202",
"0.50868493",
"0.50758946",
"0.50733113",
"0.50714636",
"0.5063936",
"0.50635016",
"0.50596076",
"0.50573575",
"0.5041278",
"0.5039905",
"0.5036344",
"0.5032787",
"0.50327474",
"0.5028098",
"0.5019716",
"0.5000904",
"0.49942434",
"0.4988119",
"0.4985692",
"0.4977168",
"0.4968273",
"0.49529794",
"0.49480006",
"0.49448064",
"0.49447784",
"0.4943861",
"0.49412355",
"0.4937845",
"0.49333477",
"0.4924905",
"0.49199948",
"0.49137944",
"0.49094617",
"0.4905516",
"0.4902089",
"0.48973948",
"0.48881826",
"0.48881826",
"0.48796466",
"0.48770484",
"0.48746553",
"0.48572782",
"0.48551103",
"0.48453888",
"0.48432153",
"0.48415625",
"0.4839119",
"0.48373863",
"0.48338184",
"0.48305595",
"0.4823534",
"0.48234323",
"0.48230463",
"0.48192874",
"0.48144403",
"0.48129064",
"0.4811684",
"0.4809218",
"0.48060584",
"0.4804723",
"0.47995245"
] |
0.0
|
-1
|
Execute a '.class' file and return the output
|
public static String runJavaClass(Path dir, String className) throws IOException {
Process process = Runtime.getRuntime().exec(new String[] {
"java", "-cp", dir.toString(), className
});
try (InputStream in = process.getInputStream()) {
Scanner scanner = new Scanner(in);
scanner.useDelimiter("\\A");
String result = scanner.hasNext() ? scanner.next() : "";
scanner.close();
return result;
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public JPClass getParsedClass(File f) throws Exception;",
"private static void processClass(File file_name, final Histogram class_use, final Histogram method_use) {\n try {\n final InputStream object_stream=new FileInputStream(file_name);\n MethodCallEnumerator.analyzeClass(object_stream,class_use,method_use);\n object_stream.close();\n } catch (Exception e) {\n throw new IllegalStateException(\"while processing: \" + e);\n }\n }",
"public static void main(String[] args) throws FileNotFoundException, IOException {\n\t\tIOUtils.loadMethodIODeps(\"cb\");\n\t\t\n\t\tFile clazz = new File(args[0]);\n\n\t\tfinal ClassReader cr1 = new ClassReader(new FileInputStream(clazz));\n//\t\tPrintWriter pw = new PrintWriter(new FileWriter(\"z.txt\"));\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\t/*ClassWriter cw1 = new ClassWriter(ClassWriter.COMPUTE_FRAMES) {\n\t\t\t@Override\n\t\t\tprotected String getCommonSuperClass(String type1, String type2) {\n\t\t\t\ttry {\n\t\t\t\t\treturn super.getCommonSuperClass(type1, type2);\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t//\t\t\t\t\tSystem.err.println(\"err btwn \" + type1 + \" \" +type2);\n\t\t\t\t\treturn \"java/lang/Unknown\";\n\t\t\t\t}\n\t\t\t}\n\t\t};*/\n\t\t\n\t\tClassWriter cw1 = new ClassWriter(ClassWriter.COMPUTE_MAXS);\n\t\t\n\t\tcr1.accept(new ClassVisitor(Opcodes.ASM5, cw1) {\n\t\t\t@Override\n\t\t\tpublic MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn new JSRInlinerAdapter(super.visitMethod(access, name, desc, signature, exceptions), access, name, desc, signature, exceptions);\n\t\t\t}\n\t\t}, ClassReader.EXPAND_FRAMES);\n\t\t\n\t\tfinal ClassReader cr = new ClassReader(cw1.toByteArray());\n\t\tTraceClassVisitor tcv = new TraceClassVisitor(null,new Textifier(),pw);\n\t\t//ClassWriter tcv = new ClassWriter(cr, ClassWriter.COMPUTE_MAXS);\n\t\tClassVisitor cv = new ClassVisitor(Opcodes.ASM5, tcv) {\n\t\t\tString className;\n\n\t\t\t@Override\n\t\t\tpublic void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {\n\t\t\t\tsuper.visit(version, access, name, signature, superName, interfaces);\n\t\t\t\tthis.className = name;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tboolean isSynthetic = ClassInfoUtils.checkAccess(access, Opcodes.ACC_SYNTHETIC);\n\t\t\t\tboolean isNative = ClassInfoUtils.checkAccess(access, Opcodes.ACC_NATIVE);\n\t\t\t\tboolean isInterface = ClassInfoUtils.checkAccess(access, Opcodes.ACC_INTERFACE);\n\t\t\t\tboolean isAbstract = ClassInfoUtils.checkAccess(access, Opcodes.ACC_ABSTRACT);\n\t\t\t\t\n\t\t\t\tMethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions);\n\t\t\t\tif (name.equals(\"toString\") && desc.equals(\"()Ljava/lang/String;\")) {\n\t\t\t\t\treturn mv;\n\t\t\t\t} else if (name.equals(\"equals\") && desc.equals(\"(Ljava/lang/Object;)Z\")) {\n\t\t\t\t\treturn mv;\n\t\t\t\t} else if (name.equals(\"hashCode\") && desc.equals(\"()I\")) {\n\t\t\t\t\treturn mv;\n\t\t\t\t} else if (isSynthetic || isNative || isInterface || isAbstract) {\n\t\t\t\t\treturn mv;\n\t\t\t\t} else {\n\t\t\t\t\tmv = new DependencyAnalyzer(className, \n\t\t\t\t\t\t\taccess, \n\t\t\t\t\t\t\tname, \n\t\t\t\t\t\t\tdesc, \n\t\t\t\t\t\t\tsignature, \n\t\t\t\t\t\t\texceptions, \n\t\t\t\t\t\t\tmv, \n\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\tfalse, \n\t\t\t\t\t\t\ttrue, \n\t\t\t\t\t\t\ttrue);\n\t\t\t\t\t//mv = new CalleeAnalyzer(className, access, name, desc, signature, exceptions, mv, true);\n\t\t\t\t\treturn mv;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcr.accept(cv, ClassReader.EXPAND_FRAMES);\n\t\tpw.flush();\n\t}",
"String mainClass();",
"private void parse() {\n try {\n SimpleNode rootNode = jmm.parseClass(sourcefile);\n assert rootNode.is(JJTPROGRAM);\n\n SimpleNode classNode = rootNode.jjtGetChild(0);\n assert classNode.is(JJTCLASSDECLARATION);\n\n data.classNode = classNode;\n } catch (FileNotFoundException e) {\n throw new CompilationException(e);\n } catch (ParseException e) {\n throw new CompilationException(\"Parsing Error: \" + e.getMessage(), e);\n }\n }",
"@Override\n public String execute() throws Exception {\n String workingDir = System.getProperty(\"user.dir\");\n File f = new File(workingDir + \"/target/classes/text.txt\");\n fileInputStream = new FileInputStream(f);\n return SUCCESS;\n }",
"public abstract Object execute(Class clazz, Object[] args) throws IOException;",
"public static void main( String[] args )\n {\n \tString filePath = null;\n\t\tif (args.length != 0)\n\t\t\tfilePath = args[0];\n\t\ttry{\n\t\t\tProcessor processor = new Processor();\n\t\t\tIProcessOutput output = new ProcessOutputImpl();\n\t\t\tprocessor.ProcessFile(filePath);\n\t\t\toutput.processOutput();\n\t\t\t\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"Oops !! File Not Found \");\n\t\t}\n }",
"public ClassCreator(){\n\n\n\t\tScanner fin = null;\n\n\t\ttry {\n\t\t\tString[] nameHandler = fileName.split(\"\\\\.\");\n\n\t\t\tString className = nameHandler[0].replaceAll(\" |_|\\\\s$|0|1|2|3|4|5|6|7|8|9\", \"\");\n\n\n\t\t\t//Setting Up Scanners/PrintWriter\n\t\t\tfin = new Scanner(new File(fileName));\n\n\n\t\t\tPrintWriter pw = new PrintWriter(className + \".java\");\n\n\n\t\t\tString[] prop = fin.nextLine().split(\"\\t\");\n\t\t\tString[] data = fin.nextLine().split(\"\\t\");\n\n\t\t\tfor(int i = 0; i<prop.length; i++) {\n\t\t\t\tpropertyList.add(new Properties(prop[i].replaceAll(\"\\\\s\", \"\"), getDataType(data[i])));\n\t\t\t}\n\n\t\t\t//Imports\n\t\t\tpw.println(\"import java.util.Scanner;\\n\\n\");\n\t\t\t\n\t\t\t//Class Line\n\t\t\tpw.println(\"\\npublic class \" + className + \" {\");\n\n\t\t\t//Properties\n\t\t\tpw.println(\"\\n\\t//======================================================= Properties\\n\");\n\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateProperty());\n\t\t\t}\n\n\t\t\t//Constructors\n\t\t\tpw.println(\"\\n\\t//======================================================= Constructors\\n\");\n\n\t\t\t//================= Workhorse Constructor\n\t\t\tpw.print(\"\\tpublic \" + className + \"(\");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).getDataType() + \" \" + propertyList.get(i).getFieldName() + \", \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).getDataType() + \" \" \n\t\t\t\t\t+ propertyList.get(propertyList.size()-1).getFieldName() + \"){\\n\");\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateSetCall(p));\n\t\t\t}\n\t\t\tpw.println(\"\\t}\\n\");\n\n\t\t\t//================= Scanner Constructor\n\t\t\tpw.print(\"\\tpublic \" + className + \"(Scanner fin) throws Exception {\\n\");\n\t\t\tpw.println(\"\\t\\tString[] parts = fin.nextLine().split(\\\"\\\\t\\\");\");\n\t\t\tint arrayCount = 0;\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tif(p.getDataType().equals(\"int\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Integer.parseInt(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"double\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Double.parseDouble(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"long\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Long.parseLong(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"boolean\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Boolean.parseBoolean(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpw.println(p.generateSetCall(\"parts[\" + arrayCount + \"]\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tpw.println(\"\\n\\t}\");\n\n\t\t\t//Methods\n\t\t\tpw.println(\"\\n\\t//======================================================= Methods\\n\");\n\n\t\t\t\t//Equals\n\t\t\tpw.println(\"\\tpublic boolean equals(Object obj) {\");\n\t\t\tpw.println(\"\\t\\tif(!(obj instanceof \" + className + \")) return false;\");\n\t\t\tpw.println(\"\\t\\t\" + className + \" \" + className.substring(0,1).toLowerCase() + \" = (\" + className + \")obj;\");\n\t\t\tpw.println(\"\\t\\treturn getEqualsString().equals(\" + className.substring(0,1).toLowerCase() + \".getEqualsString());\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\t//EqualsHelper\n\t\t\tpw.println(\"\\n\\tprivate String getEqualsString() {\");\n\t\t\tpw.print(\"\\t\\treturn \");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).getFieldName() + \" + \\\"~\\\" + \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).getFieldName() + \";\\n\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\t//toString\n\t\t\tpw.println(\"\\n\\tpublic String toString() {\");\n\t\t\tpw.print(\"\\t\\treturn \\\"\");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).generateUpperCase() + \": \\\" + \" + propertyList.get(i).getFieldName() + \" + \\\", \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).generateUpperCase() + \": \\\" + \" + propertyList.get(propertyList.size()-1).getFieldName() + \";\\n\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\n\t\t\t//Getters/Setters\n\t\t\tpw.println(\"\\n\\t//======================================================= Getters/Setters\\n\");\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateGetter());\n\t\t\t}\n\t\t\tpw.println();\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateSetter());\n\t\t\t}\n\n\t\t\t//End of the file code\n\t\t\tpw.print(\"\\n\\n}\");\n\t\t\tfin.close();\n\t\t\tpw.close();\n\n\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\n\t\t} finally { //Checked Last after try\n\t\t\ttry {fin.close();} catch (Exception e) {} //Just Double Checking\n\n\t\t}\n\n\n\n\n\t}",
"protected void run(String classname, Vector args) throws BuildException {\r\n CommandlineJava cmdj = new CommandlineJava();\r\n cmdj.setClassname(classname);\r\n for (int i = 0; i < args.size(); i++) {\r\n cmdj.createArgument().setValue((String) args.elementAt(i));\r\n }\r\n run(cmdj);\r\n }",
"public static void execute(String className) {\r\n\t\tFile clazz = new File(Constants.MAZE_CODE_DIR);\r\n\t\ttry {\r\n\t\t\tURLClassLoader classLoader = URLClassLoader.newInstance(new URL[] {clazz.toURI( )\r\n\t\t\t\t\t.toURL( )});\r\n\t\t\tClass<?> forName = Class.forName(className, true, classLoader);\r\n\t\t\tMethod declaredMethod = forName.getDeclaredMethod(\"algorithm\", new Class[0]); //$NON-NLS-1$\r\n\t\t\tdeclaredMethod.invoke(forName.newInstance( ), new Object[0]);\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tlogClass.error(\"Error: \" + e.getMessage( ) + Constants.LINE_SEPARATOR, e); //$NON-NLS-1$\r\n\t\t}\r\n\t}",
"public JavaClass parse() throws IOException, ClassFormatException {\n try {\n if (fileOwned) {\n dataInputStream = new DataInputStream(new BufferedInputStream(new FileInputStream(\n file_name), BUF_SIZE));\n }\n /****************** Read headers ********************************/\n // Check magic tag of class file\n readID();\n // Get compiler version\n readVersion();\n /****************** Read constant pool and related **************/\n // Read constant pool entries\n readConstantPool();\n // Get class information\n readClassInfo();\n // Get interface information, i.e., implemented interfaces\n readInterfaces();\n /****************** Read class fields and methods ***************/\n // Read class fields, i.e., the variables of the class\n readFields();\n // Read class methods, i.e., the functions in the class\n readMethods();\n // Read class attributes\n readAttributes();\n }\n finally {\n if (fileOwned) {\n IOUtils.closeQuitely(dataInputStream);\n }\n }\n\n // Return the information we have gathered in a new object\n return new JavaClass(class_name_index, superclass_name_index, file_name, major, minor,\n access_flags, constant_pool, interfaces, fields, methods, attributes, JavaClass.FILE);\n }",
"public static String run(Compilation compilation) throws Exception {\n\t\tfor (String code : compilation.jFiles) {\n\t\t\tClassFile classFile = new ClassFile();\n\t\t\tclassFile.getClassName();\n\t\t\tclassFile.readJasmin(new StringReader(code), \"\", false);\n\t\t\tPath outputPath = tempDir.resolve(classFile.getClassName() + \".class\");\n\t\t\ttry (OutputStream output = Files.newOutputStream(outputPath)) {\n\t\t\t\tclassFile.write(output);\n\t\t\t}\n\t\t}\n\n\t\treturn runJavaClass(tempDir, JasminTemplate.MAIN_CLASS_NAME);\n\t}",
"private File getClassFile(String name) {\n File file = new File(\"/Users/dingchenchen/Downloads/Test.class\");\n return file;\n }",
"public static void main(String[] args) throws Exception {\n if (args.length > 0) {\n // The last command line arg is the source file name\n String inputFile = args[args.length - 1];\n InputStream is = new FileInputStream(inputFile);\n CharStream input = CharStreams.fromStream(is);\n\n // Create the lexer and parser objects and a token stream \"pipe\" between them\n BantamJavaLexer lexer = new BantamJavaLexer(input);\n CommonTokenStream tokens = new CommonTokenStream(lexer);\n BantamJavaParser parser = new BantamJavaParser(tokens);\n\n // Launch the parser\n // https://github.com/antlr/antlr4/blob/master/doc/listeners.md\n BantamJavaParser.ProgramContext tree = parser.program();\n ParserListener listener = new ParserListener();\n ParseTreeWalker.DEFAULT.walk(listener, tree); // initiate walk of tree with listener in use of default walker\n\n ErrorReporter reporter = new ErrorReporter();\n\n // BantamJavaVisitor semantics = new SemanticAnalyzer(listener.getGlobalScope());\n BantamJavaVisitor semantics1 = new SemanticAnalyzer(reporter);\n semantics1.visit(tree);\n BantamJavaVisitor semantics2 = new SemanticAnalyzer2(reporter);\n semantics2.visit(tree);\n\n // Print the parse tree\n System.out.println(tree.toStringTree(parser)); // print tree as text <label id=\"code.tour.main.7\"/>\n\n if (reporter.getErrorCount() == 0) {\n BantamJavaVisitor codeGen = new CodeGenerator(reporter);\n codeGen.visit(tree);\n }\n }\n else {\n System.err.println(\"ERROR: No source file specified.\");\n }\n }",
"public static void main (String[] args) {\n for (String arg : args) {\n if (arg.compareTo(\"-ea\") == 0) {\n MethodTest test = new MethodTest();\n test.testAttributes();\n\n ParsedClassTest test2 = new ParsedClassTest();\n test2.testAttributes();\n\n ParserTest test3 = new ParserTest();\n test3.testBasicParse();\n break;\n }\n }\n\n String path;\n // Initialisation du projet\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Enter relative path to the java file to scan\");\n\n // Input du path cible\n path = scanner.nextLine();\n\n System.out.println(\"Path : \" + path + \"\\n\");\n\n try {\n // Creation des parsers\n FileWriter classCsvWriter = new FileWriter(\"classes.csv\");\n FileWriter methodCsvWriter = new FileWriter(\"methodes.csv\");\n\n // Titre des colonnes\n classCsvWriter.append(\"chemin,class,classe_LOC,classe_CLOC,classe_DC,WMC,classe_BC\\n\");\n methodCsvWriter.append(\"chemin,class,methode,methode_LOC,methode_CLOC,methode_DC,CC,methode_BC\\n\");\n\n // Premiere appel a l'algo recursif\n parse(classCsvWriter, methodCsvWriter, path);\n\n // Finalisation des fichier csv\n classCsvWriter.flush();\n classCsvWriter.close();\n methodCsvWriter.flush();\n methodCsvWriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static void main(String[] args) {\n\n\t\t// File file=new File(\"./testClasses/binarysearch.java\");\n\t\tCharStream input = null;\n\t\tif (args.length > 0) {\n\t\t\ttry {\n\t\t\t\tinput = CharStreams.fromFileName(args[0]);\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(BGSTYLE + RED + BOLD + UNDERLINE\n\t\t\t\t\t\t+ \"THE GIVEN FILE PATH IS WRONG!\" + RESET);\n\t\t\t\tSystem.out.println(YELLOW + BOLD\n\t\t\t\t\t\t+ \"IF EXECUTING THE JAR, CHECK YOUR COMMAND \"\n\t\t\t\t\t\t+ \" java -jar MJCompiler <filePath> \\n\"\n\t\t\t\t\t\t+ \"OTHERWISE CHECK THE MAIN METHOD\" + RESET);\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\n\t\t\ttry {\n\t\t\t\tinput = CharStreams.fromFileName(\"./testFiles/factorial.java\");\n\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(BGSTYLE + RED + BOLD + UNDERLINE\n\t\t\t\t\t\t+ \"THE GIVEN FILE PATH IS WRONG!!\" + RESET);\n\t\t\t\tSystem.out.println(YELLOW + BOLD\n\t\t\t\t\t\t+ \"IF EXECUTING THE JAR, CHECK YOUR COMMAND \"\n\t\t\t\t\t\t+ \" java -jar MJCompiler <filePath> \\n\"\n\t\t\t\t\t\t+ \"OTHERWISE CHECK THE MAIN METHOD\" + RESET);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tMiniJavaLexer lexer = new MiniJavaLexer(input);\n\t\tMiniJavaParser parser = new MiniJavaParser(new BufferedTokenStream(\n\t\t\t\tlexer));\n\t\tParseTree tree = parser.program();\n\t\tTrees.inspect(tree, parser);\n\n\t\t// ---------PrintVisitor-------------\n\t\tPrintVisitor pv = new PrintVisitor();\n\t\tpv.visitMiniJava(tree);\n\n\t\t// --------SymbolTableVisitor--------\n\t\tSymbolTableVisitor symbolTableVisitor = new SymbolTableVisitor();\n\t\tSymbolTable visitedST = (SymbolTable) symbolTableVisitor.visit(tree);\n\t\tif (symbolTableVisitor.getErrorFlag()) {\n\t\t\tSystem.err\n\t\t\t\t\t.println(BGSTYLE\n\t\t\t\t\t\t\t+ RED\n\t\t\t\t\t\t\t+ \"THE PROGRAM COTAINS ERRORS! \\n CHECK CONSOLE AND PARSE TREE WINDOW FOR MORE INFO!\");\n\t\t} else {\n\t\t\tvisitedST.printTable();\n\t\t\tvisitedST.resetTable();\n\n\t\t\t// ------TypeCheckVisitor\n\t\t\tTypeCheckVisitor tcv = new TypeCheckVisitor(visitedST);\n\t\t\ttcv.visit(tree);\n\t\t\tif (tcv.getErrorCount() > 0) {\n\t\t\t\tSystem.err.println(\"The Program contains \"\n\t\t\t\t\t\t+ tcv.getErrorCount() + \" Type Errors!\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"TypeChecking Done With No Errors!\");\n\t\t\t}\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n \n fillArrayList();\n getNextToken();\n parseProgram();\n\n //TODO output into file ID.java\n //This seems to work\n// File f = new File(programID+\".java\");\n// try {\n// PrintWriter write = new PrintWriter(f);\n// write.print(sb.toString());\n// write.flush();\n// write.close();\n// } catch (FileNotFoundException ex) {\n// Logger.getLogger(setTranslator.class.getName()).log(Level.SEVERE, null, ex);\n// }\n System.out.println(sb.toString());\n \n }",
"public static void main(String[] args) throws Exception {\n Interpreter i = new Interpreter(readFile(\"yourFilePathGoesHERE\"));\n i.evalProgram();\n }",
"public IJavaClassFile getMainClass();",
"public WorkResult execute() {\n source = new SimpleFileCollection(source.getFiles());\n classpath = new SimpleFileCollection(Lists.newArrayList(classpath));\n\n for (File file : source) {\n if (!file.getName().endsWith(\".java\")) {\n throw new InvalidUserDataException(String.format(\"Cannot compile non-Java source file '%s'.\", file));\n }\n }\n configure(compiler);\n return compiler.execute();\n }",
"@Override\n public Class getJavaClass() throws IOException, ClassNotFoundException {\n open();\n URL url;\n int p = path.lastIndexOf('/');\n int p2 = path.substring(0,p-1).lastIndexOf('/');\n\n File f = new File(path.substring(0,p2));\n url = f.toURI().toURL();\n URL[] urls = new URL[1];\n urls[0] = url;\n ClassLoader loader = new URLClassLoader(urls);\n\n String cls = path.substring(p2 + 1, path.lastIndexOf('.')).replace('/', '.');\n\n if (cfile.getParentFile().getParentFile().getName().equals(\"production\")) {\n cls = cls.substring(cls.lastIndexOf('.') + 1);\n }\n\n\n\n return loader.loadClass(cls);\n }",
"public static void main(String[] args) {\n\t\tLocale.setDefault(Locale.FRENCH);\n\t\tClassPathParser parser = new ClassPathParser();\n\t\tClassPath result = parser.parse(args[0]);\n\t\tSystem.out.println(result.toString());\n\t}",
"private Path compileTestClass(\n String packageName, String classname, String classSource, Path destinationDir)\n throws FileCompiler.FileCompilerException {\n // TODO: The use of FileCompiler is temporary. Should be replaced by use of SequenceCompiler,\n // which will compile from source, once it is able to write the class file to disk.\n Path sourceFile;\n try {\n sourceFile = javaFileWriter.writeClassCode(packageName, classname, classSource);\n } catch (RandoopOutputException e) {\n throw new RandoopBug(\"Output error during flaky-test filtering\", e);\n }\n FileCompiler fileCompiler = new FileCompiler();\n fileCompiler.compile(sourceFile, destinationDir);\n return sourceFile;\n }",
"void compileClass() throws IOException {\n tagBracketPrinter(CLASS_TAG, OPEN_TAG_BRACKET);\n try {\n compileClassHelper();\n } catch (IOException e) {\n e.printStackTrace();\n }\n tagBracketPrinter(CLASS_TAG, CLOSE_TAG_BRACKET);\n\n }",
"Object run(ObjectInput objectInput) throws IOException, ClassNotFoundException;",
"public void main(ArrayList<String> files) throws IOException {\n\t\tDesignParser.CLASSES = files;\n\t\t\n\t\tthis.model = new Model();\n\n\t\tfor (String className : CLASSES) {\n//\t\t\tSystem.out.println(\"====================\");\n\t\t\t// ASM's ClassReader does the heavy lifting of parsing the compiled\n\t\t\t// Java class\n//\t\t\tSystem.out.println(\"Analyzing: \" + className);\n//\t\t\tSystem.out.println(className + \"[\");\n\t\t\tClassReader reader = new ClassReader(className);\n\t\t\t\t\t\t\n\t\t\t// make class declaration visitor to get superclass and interfaces\n\t\t\tClassVisitor decVisitor = new ClassDeclarationVisitor(Opcodes.ASM5, this.model);\n\t\t\t\n\t\t\t// DECORATE declaration visitor with field visitor\n\t\t\tClassVisitor fieldVisitor = new ClassFieldVisitor(Opcodes.ASM5, decVisitor, this.model);\n\t\t\t\n\t\t\t// DECORATE field visitor with method visitor\n\t\t\tClassVisitor methodVisitor = new ClassMethodVisitor(Opcodes.ASM5, fieldVisitor, this.model);\n\t\t\t\n\t\t\t// TODO: add more DECORATORS here in later milestones to accomplish\n\t\t\t// specific tasks\n\t\t\tClassVisitor extensionVisitor = new ExtensionVisitor(Opcodes.ASM5, methodVisitor, this.model);\n\t\t\t\n\t\t\tClassVisitor implementationVisitor = new ImplementationVisitor(Opcodes.ASM5, extensionVisitor, this.model);\n\t\t\t\t\t\t\n\t\t\tClassVisitor usesVisitor = new UsesVisitor(Opcodes.ASM5, implementationVisitor, this.model);\n\t\t\t\n\t\t\tClassVisitor compositionVisitor = new CompositionVisitor(Opcodes.ASM5, usesVisitor, this.model);\n\t\t\t\n\t\t\t// Tell the Reader to use our (heavily decorated) ClassVisitor to\n\t\t\t// visit the class\n\t\t\treader.accept(compositionVisitor, ClassReader.EXPAND_FRAMES);\n//\t\t\tSystem.out.println(\"\\n]\");\n\t\t}\n//\t\tSystem.out.println(\"End Of Code\");\n\t}",
"public void execute()\n throws BuildException {\n this.validator = new TestClassValidator.DefaultClassValidator();\n this.validator.setListener(new TestClassValidator.ClassValidatorListener() {\n public void info(String message) {\n log(\"INFO> \" + message, verbosity);\n System.out.println(\"INFO> \" + message);\n }\n\n public void warning(String message) {\n log(\"WARNING> \" + message, verbosity);\n System.out.println(\"WARNING> \" + message);\n }\n\n public void error(String message) {\n log(\"ERROR> \" + message, verbosity);\n System.out.println(\"ERROR> \" + message);\n }\n });\n\n\n if (classpath != null) {\n classpath.setProject(project);\n this.loader = new AntClassLoader(project, classpath);\n }\n\n log(TestClassValidator.BANNER, Project.MSG_VERBOSE);\n System.out.println(TestClassValidator.BANNER);\n int count = 0;\n for (int i = 0; i < filesets.size(); i++) {\n FileSet fs = (FileSet) filesets.get(i);\n\n try {\n DirectoryScanner ds = fs.getDirectoryScanner(project);\n ds.scan();\n\n String[] files = ds.getIncludedFiles();\n\n for (int k = 0; k < files.length; k++) {\n String pathname = files[k];\n if (pathname.endsWith(\".class\")) {\n String classname = pathname.substring(0, pathname.length() - \".class\".length()).replace(File.separatorChar, '.');\n processFile(classname);\n }\n }\n count += files.length;\n } catch (BuildException e) {\n if (failonerror) {\n throw e;\n } else {\n log(e.getMessage(), quiet ? Project.MSG_VERBOSE : Project.MSG_WARN);\n }\n } catch (ClassNotFoundException e) {\n if (failonerror) {\n throw new BuildException(e);\n } else {\n log(e.getMessage(), quiet ? Project.MSG_VERBOSE : Project.MSG_WARN);\n }\n }\n log(\"Number of classes: \" + count, Project.MSG_VERBOSE);\n System.out.println(\"Number of classes: \" + count);\n }\n }",
"public static void main(String[] args) throws FileNotFoundException {\n\n Scanner input;\n PrintStream output;\n\n input = determineInputSource(args);\n output = determineOutputSource(args);\n\n TurtleInterpreter turtleInterpreter = new TurtleInterpreter(input,\n output);\n\n turtleInterpreter.processCommands();\n }",
"private void installBasicClasses() {\n \tAbstractSymbol filename \n \t = AbstractTable.stringtable.addString(\"<basic class>\");\n \t\n \t// The following demonstrates how to create dummy parse trees to\n \t// refer to basic Cool classes. There's no need for method\n \t// bodies -- these are already built into the runtime system.\n \n \t// IMPORTANT: The results of the following expressions are\n \t// stored in local variables. You will want to do something\n \t// with those variables at the end of this method to make this\n \t// code meaningful.\n \n \t// The Object class has no parent class. Its methods are\n \t// cool_abort() : Object aborts the program\n \t// type_name() : Str returns a string representation \n \t// of class name\n \t// copy() : SELF_TYPE returns a copy of the object\n \n \tclass_c Object_class = \n \t new class_c(0, \n \t\t TreeConstants.Object_, \n \t\t TreeConstants.No_class,\n \t\t new Features(0)\n \t\t\t .appendElement(new method(0, \n \t\t\t\t\t TreeConstants.cool_abort, \n \t\t\t\t\t new Formals(0), \n \t\t\t\t\t TreeConstants.Object_, \n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.type_name,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.copy,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.SELF_TYPE,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \t\n \t// The IO class inherits from Object. Its methods are\n \t// out_string(Str) : SELF_TYPE writes a string to the output\n \t// out_int(Int) : SELF_TYPE \" an int \" \" \"\n \t// in_string() : Str reads a string from the input\n \t// in_int() : Int \" an int \" \" \"\n \n \tclass_c IO_class = \n \t new class_c(0,\n \t\t TreeConstants.IO,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.out_string,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg,\n \t\t\t\t\t\t\t\t TreeConstants.Str)),\n \t\t\t\t\t TreeConstants.SELF_TYPE,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.out_int,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg,\n \t\t\t\t\t\t\t\t TreeConstants.Int)),\n \t\t\t\t\t TreeConstants.SELF_TYPE,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.in_string,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.in_int,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Int,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t// The Int class has no methods and only a single attribute, the\n \t// \"val\" for the integer.\n \n \tclass_c Int_class = \n \t new class_c(0,\n \t\t TreeConstants.Int,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.val,\n \t\t\t\t\t TreeConstants.prim_slot,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t// Bool also has only the \"val\" slot.\n \tclass_c Bool_class = \n \t new class_c(0,\n \t\t TreeConstants.Bool,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.val,\n \t\t\t\t\t TreeConstants.prim_slot,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t// The class Str has a number of slots and operations:\n \t// val the length of the string\n \t// str_field the string itself\n \t// length() : Int returns length of the string\n \t// concat(arg: Str) : Str performs string concatenation\n \t// substr(arg: Int, arg2: Int): Str substring selection\n \n \tclass_c Str_class =\n \t new class_c(0,\n \t\t TreeConstants.Str,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.val,\n \t\t\t\t\t TreeConstants.Int,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.str_field,\n \t\t\t\t\t TreeConstants.prim_slot,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.length,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Int,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.concat,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg, \n \t\t\t\t\t\t\t\t TreeConstants.Str)),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.substr,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg,\n \t\t\t\t\t\t\t\t TreeConstants.Int))\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg2,\n \t\t\t\t\t\t\t\t TreeConstants.Int)),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t/* Do somethind with Object_class, IO_class, Int_class,\n Bool_class, and Str_class here */\n nameToClass.put(TreeConstants.Object_.getString(), Object_class);\n nameToClass.put(TreeConstants.IO.getString(), IO_class);\n nameToClass.put(TreeConstants.Int.getString(), Int_class);\n nameToClass.put(TreeConstants.Bool.getString(), Bool_class);\n nameToClass.put(TreeConstants.Str.getString(), Str_class);\n adjacencyList.put(TreeConstants.Object_.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.IO.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.Int.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.Bool.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.Str.getString(), new ArrayList<String>() );\n // Do the same for other basic classes\n basicClassList = new Classes(0);\n basicClassList.appendElement(Object_class);\n basicClassList.appendElement(IO_class);\n basicClassList.appendElement(Int_class);\n basicClassList.appendElement(Bool_class);\n basicClassList.appendElement(Str_class);\n \n }",
"private List<String> runCode(JasminBytecode code) throws AssembleException {\n // Turn the Jasmin code into a (hopefully) working class file\n if (code == null) {\n throw new AssembleException(\"No valid Jasmin code to assemble\");\n }\n AssembledClass aClass = AssembledClass.assemble(code);\n // Run the class and return the output\n SandBox s = new SandBox();\n s.runClass(aClass);\n return s.getOutput();\n }",
"public static void main(String[] args) throws IOException, ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n }",
"private void runMethod(String codeDirectory,String inputFilePath,String outputFilePath,int timeLimitVal)\n {\n CodeCompile compileObject = new CodeCompile();\n CodeRun codeRunObject = new CodeRun();\n String directoryForRun = compileObject.makeFileDirectory(codeDirectory);\n String command = \"java -cp \" + directoryForRun;\n try\n {\n Process p = Runtime.getRuntime().exec(command);\n codeRunObject.giveInput(p.getOutputStream(),inputFilePath);\n\n timeLimitVal*=1000;\n String userOutputFilePath = new String();\n userOutputFilePath = compileObject.makeUserOutputfileDirectory(outputFilePath);\n boolean isTimeLimit = codeRunObject.getOutput(p.getInputStream(), timeLimitVal,userOutputFilePath);\n if (isTimeLimit)\n {\n p.waitFor();\n boolean isRuntimeError = codeRunObject.getError(p.getErrorStream(),errorImage);\n if(isRuntimeError){\n setBooleanValue();\n this.runtimeError=true;\n p.destroy();\n }\n else{\n p.waitFor();\n boolean isMatch = codeRunObject.matchOutFile(outputFilePath,userOutputFilePath,exclamationImage,yesImage,noImage);\n if(isMatch){\n setBooleanValue();\n this.isAccepted=true;\n }\n else{\n setBooleanValue();\n this.isWrongAnswer=true;\n }\n p.waitFor();\n p.destroy();\n }\n }\n else\n {\n setBooleanValue();\n this.timeLimitError=true;\n p.destroy();\n }\n }\n catch (IOException | InterruptedException e)\n {\n }\n }",
"public String[] readClasses();",
"protected Object compileAndLoad() throws IOException {\n String generatedSource = printJCodeModel();\n return compileAndLoadSource(generatedSource, TEST_CLASS_NAME);\n }",
"public DataModel execute(File file) {\n\t\tGlobalEnv env = new GlobalEnv();\n\t\tFileNode fileNode = new FileNode(file);\n\n\t\tfileNode.execute(env); // TODO Consider the returned CONTROL value?\n\t\tenv.finishExecution();\n\t\t\n\t\tDataNode output = env.getCurrentOutput();\n\t\treturn new DataModel(output);\n\t}",
"public static void main(String[] args) {\n String file = System.getProperty(\"user.dir\") + \"\\\\src\\\\\" + TaskB.class.getName().replace(\".\", File.separator);\n String fileIn = file + \".java\";\n String fileOut = file + \".txt\";\n StringBuilder convert = new StringBuilder();\n try (BufferedReader reader = new BufferedReader(\n new FileReader(fileIn))) {\n Boolean commentOne = false;\n Boolean commentTwo = false;\n String chars = \"\";\n\n // text\n\n while (reader.ready()) {\n if (reader.ready()) {\n char currchar = (char) reader.read();\n chars = chars + currchar;\n\n if (chars.equals(\"/\" + \"*\")) {\n commentOne = true;\n commentTwo = true;\n convert.deleteCharAt(convert.length() - 1);\n }\n\n if (chars.equals(\"/\" + \"/\")) {\n commentOne = true;\n commentTwo = false;\n convert.deleteCharAt(convert.length() - 1);\n }\n\n // text\n\n if (!commentOne) {\n convert.append(chars.substring(chars.length() - 1));\n }\n\n if (chars.equals(\"\\r\\n\") && commentOne && !commentTwo) {\n commentOne = false;\n commentTwo = false;\n convert.append(chars);\n }\n\n if (chars.equals(\"*\" + \"/\") && commentOne && commentTwo) {\n commentOne = false;\n commentTwo = false;\n }\n chars = Character.toString(currchar);\n }\n\n /*\nmay be the end\n */\n }\n PrintWriter out = new PrintWriter(new FileWriter(fileOut));\n System.out.print(convert);\n out.print(convert);\n out.close();\n\n } catch (IOException e) {\n e.printStackTrace();\n // the end!\n }\n }",
"public static void main(String[] args) throws IOException, ClassNotFoundException {\n\t\tPayload payload = null;\n\t\ttry (FileInputStream fin = new FileInputStream(INPUT_FILE);\n\t\t\t\tObjectInputStream ois = new ObjectInputStream(fin);) {\n\t\t\tpayload = (Payload) ois.readObject();\n\t\t\tSystem.out.println(\"Payload read successfully: \" + payload);\n\t\t}\n\t}",
"public static void main(String[] args) {\n if (args.length != 2 && args.length != 3) {\n System.out.println(\"wrong args\");\n return;\n }\n try {\n String name, filename;\n if (args.length == 3) {\n if (!\"-jar\".equals(args[0])) {\n System.out.println(\"wrong flag\");\n return;\n }\n\n name = args[1];\n filename = args[2].substring(0, args[2].indexOf(\".jar\"));\n } else {\n name = args[0];\n filename = args[1];\n }\n File root = new File(filename);\n Class<?> token = Class.forName(name);\n Implementor implementor = new Implementor();\n if (args.length == 3) {\n implementor.implementJar(token, new File(args[2]));\n } else {\n implementor.implement(token, root);\n }\n } catch (ClassNotFoundException e) {\n System.out.println(\"Class not found:(\");\n } catch (ImplerException e) {\n System.out.println(\"An error occured\");\n } catch (Exception e) {\n System.out.println(\"Something wrong\");\n }\n }",
"public static void main(String[] args) {\n\t\t\n\t\tClassC c = new ClassC();\n\t\tc.display();\n\t\tc.view();\n\n\t}",
"static public void main(String argv[]) {\n String archivo_a_parsear = \"/home/maldad/repos/automatas/semantico/EjemploA/src/ejemploa/test.txt\";\n try {\n parser p = new parser(new Lexer(new FileReader(archivo_a_parsear)));\n Object result = p.parse().value; \n } catch (Exception e) {\n /* do cleanup here -- possibly rethrow e */\n e.printStackTrace();\n }\n }",
"public static void main(String[] args) {\n\t\tnew StartClass();\n\t}",
"private static byte[] instrumentClassFile(byte[] classfileBuffer) {\n String className = new ClassReader(classfileBuffer).getClassName().replace(\"/\", \".\");\n ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();\n byte[] newClassfileBuffer = new EkstaziCFT().transform(currentClassLoader, className, null, null, classfileBuffer);\n return newClassfileBuffer;\n }",
"public static void main(String argv[]) throws FileNotFoundException {\n ClassLoader classLoader = MainJava.class.getClassLoader();\n\n InputStream is = new FileInputStream(classLoader.getResource(\"file/input.txt\").getFile());\n\n EngineImplementation myEngineImplementation = new EngineImplementation();\n\n //Create object of SparkDistributor\n SparkDistributor mySparkDistributor = new SparkDistributor();\n\n myDataConsumer DataConsumer = new myDataConsumer();\n\n mySparkDistributor.setDataConsumer(DataConsumer);\n\n myEngineImplementation.setModelByInputFileStream(is);\n\n myEngineImplementation.process(mySparkDistributor);\n\n }",
"public String getClassName(String path);",
"private static boolean writeAndCompile(String className, String implement, String header, String expression) {\n\n\t\t// build the class\n\t\tString classData = String.format(classBase, className, implement, header, expression);\n\t\tString classFileName = className + \".java\";\n\n\t\t// write the .java file\n\t\ttry (PrintWriter out = new PrintWriter(path + classFileName)) {\n\t\t\tout.println(classData);\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\n\t\t// compile the file\n\t\tJavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n\t\tint result;\n\n\t\tif (compiler == null) {\n\t\t\tSystem.out.println(\"No Compiler! Trying external tools..\");\n\n\t\t\ttry {\n\t\t\t\tcom.sun.tools.javac.Main javac = new com.sun.tools.javac.Main();\n\t\t\t\tresult = javac.compile(new String[] {path + classFileName});\n\t\t\t} catch (NoClassDefFoundError e) {\n\t\t\t\tSystem.out.println(\"No external tools found!\");\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t//return false;\n\t\t} else\n\t\t\tresult = compiler.run(null, null, null, path + classFileName);\n\n\t\t// delete the .java file, just because\n\t\ttry {\n\t\t\tnew File(path + classFileName).delete();\n\n\t\t// meh, we tried\n\t\t} catch (Exception e) {}\n\n\t\t// if result is 0, compilation was successful\n\t\treturn result == 0;\n\t}",
"public static void main(String[] args) throws ClassNotFoundException, IOException, ParseException {\n\t\tEntryPoint entry= new EntryPoint();\n\t\t\t\n\t entry.mainMenu();\n\t\t\n\t\t\n\t}",
"private void processClass(String classType ) {\n\t\tif ( classType.equals(\"CommandLineTool\") ) {\n\t\t\t\tCOMMAND_LINE_TOOL = new CommandLineTool();\n\t\t}\n\t}",
"public void runit(String class_name)\n {\n runit(class_name, null);\n }",
"public static void main(String[] args)\r\n\t{\n\t\tSystem.out.println(\"Jon Heard's JVM Assembler\");\r\n\t\tSystem.out.println(\"version \" + VERSION);\r\n\t\tSystem.out.println(\"----------------------------\");\r\n\t\tSystem.out.println(\" ('-help' or '-h' for help)\");\r\n\t\tSystem.out.println(\"----------------------------\");\r\n\t\t\r\n\t\t/// Parse arguments\r\n\t\tboolean error = false;\r\n\t\tboolean helpTextPrinted = false;\r\n\t\tString sourceFileName = \"\";\t\t\r\n\t\tfor(String arg : args)\r\n\t\t{\r\n\t\t\tif(arg.startsWith(\"-\"))\r\n\t\t\t{\r\n\t\t\t\tif(arg.equals(\"-help\") || arg.equals(\"-h\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tprintHelpText();\r\n\t\t\t\t\thelpTextPrinted = true;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.err.println(\r\n\t\t\t\t\t\t\t\"ERROR: Invalid parameter '\" + arg + \"'.\");\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(!sourceFileName.equals(\"\"))\r\n\t\t\t{\r\n\t\t\t\tSystem.err.println(\"ERROR: Invalid parameter '\" + arg + \"'.\");\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tsourceFileName = arg;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(error || helpTextPrinted) return;\r\n\r\n\t\t/// Make sure we have a source file to load\r\n\t\tif(args.length < 1)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"ERROR: A sourcefile must be included.\");\r\n\t\t\tSystem.err.println(\"\\tExample: \");\r\n\t\t\tSystem.err.println(\"\\tjvmasm MySource.asm\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/// Make sure the source file exists\r\n\t\tFile sourceFile = new File(sourceFileName);\r\n\t\tif(!sourceFile.exists())\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: the source file '\" + sourceFileName +\r\n\t\t\t\t\t\"' does not exist.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/// Load the source file into a string\r\n\t\tString sourceData = UtilMethods.fileToString(sourceFileName);\r\n\t\tif(sourceData == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: Unable to load the source file '\" + sourceFileName +\r\n\t\t\t\t\t\"'.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/// Parse the source file into a ClassRep object\r\n\t\tClassParser parser = new ClassParser();\r\n\t\tClassRep classRep = parser.parseSource(sourceFileName, sourceData);\r\n\t\tif(classRep == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: Failed to parse source file '\" + sourceFileName +\r\n\t\t\t\t\t\"'.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t/// Store the ClassRep into a class file\r\n\t\tString classFileName = classRep.getName() + \".class\";\r\n\t\tif(!UtilMethods.byteArrayToFile(\r\n\t\t\t\tclassRep.getJvmBytes(), classFileName))\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: Failed to write class file '\" + classFileName +\r\n\t\t\t\t\t\"'.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t}",
"private void exec(String inputFile, String outputPath) {\n\t\tRuntime runtime = Runtime.getRuntime();\n\t\tString[] args = {\"java\", \"-jar\",freelingpath,freelingconf, outputPath, inputFile};\n\t\ttry {\n\t\t\tProcess p = runtime.exec(args);\n\t\t\tp.waitFor();\n\t\t\t//System.out.println(p.exitValue());\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public File writeDriverFile(List<Class<?>> allClasses,\n\t\t\tString driverClassName) {\n\t\tFile file = new File(getDir(), driverClassName + \".java\");\n\t\tPrintStream out = createTextOutputStream(file);\n\t\ttry {\n\t\t\toutputPackageName(out);\n\t\t\tout.println(\"import junit.framework.*;\");\n\t\t\tout.println(\"import junit.textui.*;\");\n\t\t\tout.println(\"\");\n\t\t\tout.println(\"public class \" + driverClassName\n\t\t\t\t\t+ \" extends TestCase {\");\n\t\t\tout.println(\"\");\n\t\t\tout.println(\" public static void main(String[] args) {\");\n\t\t\tout.println(\" TestRunner runner = new TestRunner();\");\n\t\t\tout\n\t\t\t\t\t.println(\" TestResult result = runner.doRun(suite(), false);\");\n\t\t\tout.println(\" if (! result.wasSuccessful()) {\");\n\t\t\tout.println(\" System.exit(1);\");\n\t\t\tout.println(\" }\");\n\t\t\tout.println(\" }\");\n\t\t\tout.println(\"\");\n\t\t\tout.println(\" public \" + driverClassName + \"(String name) {\");\n\t\t\tout.println(\" super(name);\");\n\t\t\tout.println(\" }\");\n\t\t\tout.println(\"\");\n\t\t\tout.println(\" public static Test suite() {\");\n\t\t\tout.println(\" TestSuite result = new TestSuite();\");\n\t\t\tfor (String junitTestsClassName : createdSequencesAndClasses\n\t\t\t\t\t.keySet()) {\n\t\t\t\tint numSubSuites = createdSequencesAndClasses.get(\n\t\t\t\t\t\tjunitTestsClassName).size();\n\t\t\t\tfor (int i = 0; i < numSubSuites; i++)\n\t\t\t\t\tout.println(\" result.addTest(new TestSuite(\"\n\t\t\t\t\t\t\t+ junitTestsClassName + i + \".class));\");\n\t\t\t}\n\t\t\tout.println(\" return result;\");\n\t\t\tout.println(\" }\");\n\t\t\twriteCheckException(out);\n\t\t\tout.println(\"\");\n\t\t\tout.println(\"}\");\n\t\t} finally {\n\t\t\tif (out != null)\n\t\t\t\tout.close();\n\t\t}\n\t\treturn file;\n\t}",
"void compileToJava();",
"public void execute()\n throws BuildException\n {\n if (_resinHome == null)\n throw new BuildException(\"resinHome is required by jspc\");\n\n if (_rootDirectory == null)\n throw new BuildException(\"rootDirectory is required by jspc\");\n\n File resinJar = new File(_resinHome,\n \"lib\" + File.separatorChar + \"resin.jar\");\n\n if (! resinJar.exists())\n throw new BuildException(\"resinHome '\"\n + _resinHome\n + \"' does not appear to be valid\");\n\n Java java = new Java(this);\n java.setFailonerror(true);\n java.setFork(true);\n java.setJar(resinJar);\n\n List<String> args = new ArrayList<String>();\n args.add(\"jspc\");\n args.add(\"-app-dir\");\n args.add(_rootDirectory.getPath());\n\n for (String arg : args)\n java.createArg().setLine(arg);\n\n log(java.getCommandLine().toString(), _level.intValue());\n\n java.executeJava();\n }",
"@POST\n\t@Path(\"/execute/{id}\")\n\tpublic Response execute(@PathParam(\"id\") String id, String source) throws Exception {\n\t\t// Persist\n\t\tString target = persist(id, source);\n\t\t\n\t\t// Alter stdout\n\t\tPrintStream stdout = System.out;\n\t\tPrintStream stderr = System.err;\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tPrintStream capture = new PrintStream(baos);\n\t\t\n\t\ttry {\n\t\t\tSystem.setOut(capture);\n\t\t\tSystem.setErr(capture);\n\t\n\t\t\t// Compile source file.\n\t\t\tJavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n\t\t\tint result = compiler.run(null, capture, capture, Paths.get(target.toString(), \"/Main.java\").toString());\n\t\t\t\n\t\t\tif (result == 0) { // Successful compile, execute.\n\t\t\t\t// Load and instantiate compiled class.\n\t\t\t\tWhitelistClassLoader classLoader = new WhitelistClassLoader(\n\t\t\t\t\t\tURLClassLoader.newInstance(new URL[] { new URL(Paths.get(target).toUri() +\"/\") }));\n\t\t\n\t\t\t\t// Run\n\t\t\t\t// FIXME: Execute in separate JVM.\n\t\t\t\t// FIXME: Kill off if running for too long.\n\t\t String progClass = \"Main\";\n\t\t String[] args = {};\n\t\t Class<?> clazz = classLoader.loadClass(progClass);\n\t\t Class<?> mainArgType[] = { (new String[0]).getClass() };\n\t\t Method main = clazz.getMethod(\"main\", mainArgType);\n\t\t Object argsArray[] = { args };\n\t\t main.invoke(null, argsArray);\n\t\t\t}\n\t\t\t\n\t // Return output of last successful command\n\t\t\treturn Response.ok(baos.toString()).build();\n\t\t} finally {\n\t // Replace stdout\n\t System.out.flush();\n\t System.err.flush();\n\t \n\t System.setOut(stdout);\n\t System.setErr(stderr);\n\t\t}\n\t}",
"public static void main(String[] args) throws Exception{\n\t\tParseTree tree = new ParseTree(new Information(\"C:\\\\Users\\\\Darkras\\\\Documents\\\\CPSC 449\\\\commands.jar\", \"Commands\"));\n\t\tFile f = new File(\"C:\\\\Users\\\\Darkras\\\\Documents\\\\CPSC 449\\\\commands.jar\");\n\t\tClass[] parameterTypes = new Class[]{URL.class};\n\t\tURL url = (f.toURI()).toURL();\n\t\tURLClassLoader sysloader = (URLClassLoader) ClassLoader.getSystemClassLoader();\n\t\tClass<?> sysclass = URLClassLoader.class;\n\t\tMethod method = sysclass.getDeclaredMethod(\"addURL\", parameterTypes);\n\t\tmethod.setAccessible(true);\n\t\tmethod.invoke(sysloader, new Object[]{ url });\n\t\t\n\t\tClass<?> c = Class.forName(\"Commands\");\n\t\tMethod[] methods = c.getDeclaredMethods();\n\t\t\n\t\tInformation test = new Information(\"C:\\\\Users\\\\Darkras\\\\Documents\\\\CPSC 449\\\\commands.jar\", \"Commands\");\n\t\tList<Integer[]> testList = test.properArguments(\"add\");\n\t\t\n\t\tSystem.out.println(testList);\n\t\t\n\t\t\n\t\tTreeEvaluator e = new TreeEvaluator(test);\n\t\t\n\t\ttree.grow(\"add\",1);\n\t\ttree.grow(\"5\",0);\n\t\ttree.grow(\"5\",0);\n\t\ttree.addReturnTypes();\n\t\tSystem.out.println(tree.isComplete());\n\t\tSystem.out.print(e.evaluate(tree.getRoot()));\n\t}",
"public static void main(String[] args) throws IOException {\n\t\tChildClass1 ch = new ChildClass1();\n\t\tch.getMethod();\n\t\t\n\n\t}",
"public void assemble(String filePath) throws Exception {\n\n System.out.println(\"Starting\");\n System.out.println(\"Loading Parser . . .\");\n File inputFile= new File(filePath);\n Parser parser = new Parser(inputFile);\n\n System.out.println(\"Loading SymbolTable . . . \");\n SymbolTable symbolTable = new SymbolTable();\n\n System.out.println(\"Parser first pass . . . \");\n parser.firstPass(symbolTable);\n System.out.println(\"Parser second pass . . . \");\n parser.secondPass(symbolTable);\n\n System.out.println(\"Complete\");\n\n }",
"public void buildClass(String pkgName, String className,\n\t List<Operation> operations) {\n\tList<ClassOperations> classOperations = new ArrayList<ClassOperations>();\n\n\tString visibility = \"public\";\n\tString returnType = \"void\";\n\tString parameters = \"\";\n\tString methodName = \"methodName\";\n\tString methodBody = \"return null;\";\n\n\t// Retrieve the operations.\n\tClassOperations operation;\n\tfor (Operation op : operations) {\n\t parameters = \"\";\n\t methodName = op.getName();\n\t returnType = op.getReturnType();\n\n\t // Iterating through a list of parameters\n\t for (Parameter param : op.getParameters()) {\n\t\t// Adding the parameters up\n\t\tparameters += param.getType() + \" \" + param.getName();\n\n\t\t// If not the last element in the list of parameters add a comma\n\t\tif (!param.equals(op.getParameters().get(\n\t\t\top.getParameters().size() - 1)))\n\t\t parameters += \", \";\n\t }\n\n\t if (parameters.equalsIgnoreCase(\"\"))\n\t\tmethodBody = \"return null;\";\n\t else\n\t\tmethodBody = \"System.out.println($1); return null;\";\n\t operation = new ClassOperations(visibility, returnType, methodName,\n\t\t parameters, methodBody);\n\t classOperations.add(operation);\n\t}\n\n\t// Check if the class exists\n\ttry {\n\t java.lang.reflect.Method m;\n\t m = ClassLoader.class.getDeclaredMethod(\"findLoadedClass\",\n\t\t new Class[] { String.class });\n\t m.setAccessible(true);\n\t ClassLoader cl = ClassLoader.getSystemClassLoader();\n\t Object testObject = m.invoke(cl, pkgName + \".\" + className);\n\t if (testObject != null) {\n\t\t// Something can be done after checking if the class exists or\n\t\t// not\n\t } else {\n\t\t// Something can be done after checking if the class exists or\n\t\t// not\n\t }\n\t} catch (SecurityException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t} catch (NoSuchMethodException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t} catch (IllegalArgumentException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t} catch (IllegalAccessException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t} catch (InvocationTargetException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t}\n\n\t// Build the compile time class\n\tsuper.build(pkgName, className, classOperations);\n\n\t// Refreshing the class loader for retrieving the loaded memory\n\tclassLoader = super.getClassLoader();\n }",
"private static void test1() throws ParseException, IOException {\n\t\n\tFile classFile = new File(\"/home/sebastian/workspace3.7/yuigwt/java-tools/org/sgx/gwtjavatools/delegate/JYUIDelegateMethods.java\");\n\t\n// InputStream in = ParserTest.class.getClassLoader().getResourceAsStream(\"/java-tools/org/sgx/gwtjavatools/delegate/JYUIDelegateMethods.java\");//new FileInputStream(\"test.java\");\n\n\tFileInputStream in = new FileInputStream(classFile); \n\t\n CompilationUnit cu;\n try {\n // parse the file\n cu = JavaParser.parse(in);\n } finally {\n in.close();\n }\n\n // visit and print the methods names\n new MethodVisitor().visit(cu, null);\n\n // prints the resulting compilation unit to default system output\n// System.out.println(cu.toString());\n}",
"@Override\n\tpublic abstract Classifier run ();",
"public static void main(String[] args) {\n\t\tCreateClassificationData test = new CreateClassificationData(\"originalData/Data.txt\");\n\t}",
"public static void main(String[] args) {\n File file = new File(\"./src/testcode.c\");\n \n Compiler compiler = new Compiler(file);\n compiler.compile();\n }",
"public static void main(String[] args) {\r\n\r\n\t\tif (args.length == 0) {\r\n\t\t\tlog.error(\"Specification and assembly filenames not given.\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t\telse if (args.length == 1) {\r\n\t\t\tlog.error(\"Assembly file not given.\");\r\n\t\t\tlog.error(\"Specification file: \" + args[0]);\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t\telse if (args.length > 2) {\r\n\t\t\tlog.error(\"Too many arguments provided.\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t\tif (!args[0].endsWith(\".yaml\") || !args[1].endsWith(\".asm\")) {\r\n\t\t\tlog.error(\"Input is limited to two files.\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tvar file = new FileParser(args[0], args[1]);\r\n\t\t\tvar data = file.getData();\r\n\t\t\tvar asm = new Assembler(data);\r\n\r\n\t\t\tAssembler.writeLinesToFile(\"object_code.txt\", asm.getObjectCode());\r\n\t\t} catch (FileParserException e) {\r\n\t\t\tAssembler.writeLinesToFile(\"object_code.txt\", Lists.newArrayList(e.getMessage()));\r\n\t\t\tAssembler.writeLinesToFile(\"spec_error_report.txt\", e.getErrorReport());\r\n\t\t\tSystem.exit(1);\r\n\t\t} catch (AssemblerException | IOException e) {\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t}",
"public void doClass(String callerName) throws LexemeException {\n\t\tlogMessage(\"<class>--> class ID [extends ID]{{<member>}}\");\n\t\tfunctionStack.push(\"<class>\");\n\t\tconsumeToken(); // consume class token\n\t\t// check ID token\n\t\tif (ifPeekThenConsume(\"ID_\")) {\n\t\t\t// check for optional EXTENDS_ token\n\t\t\tif (ifPeek(\"EXTENDS_\")) {\n\t\t\t\tconsumeToken();\n\t\t\t\tifPeekThenConsume(\"ID_\");\n\t\t\t}\n\t\t\t// check for left curly\n\t\t\tif (ifPeekThenConsume(\"L_CURLY_\")) {\n\n\t\t\t\twhile (ifPeek(\"PUBLIC_\") || ifPeek(\"STATIC_\") || ifPeekIsType()) {\n\t\t\t\t\t// check for optional PUBLIC_ & STATIC_ tokens\n\t\t\t\t\tif (ifPeek(\"PUBLIC_\") || ifPeek(\"STATIC_\")) {\n\t\t\t\t\t\tdoMember(\"<class>\");\n\t\t\t\t\t} else if (ifPeekIsType()) {\n\t\t\t\t\t\tdoMember(\"<class>\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// TODO check for arraytype!!\n\t\t\t\t// CHECK ClOSING CURLY\n\n\t\t\t\t// TODO uncomment line\n\t\t\t\tifPeekThenConsume(\"R_CURLY_\");\n\t\t\t}\n\n\t\t}\n\t\tlogVerboseMessage(callerName);\n\t\tfunctionStack.pop();\n\t}",
"public void exec();",
"public void run() throws Exception {\n\t\tJavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n\t\tStandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);\n\t\tPath tempFolder = Files.createTempDirectory(\"gwt-jackson-apt-tmp\", new FileAttribute[0]);\n\t\tfileManager.setLocation(StandardLocation.CLASS_OUTPUT, Arrays.asList(tempFolder.toFile()));\n\t\tfileManager.setLocation(StandardLocation.SOURCE_OUTPUT, Arrays.asList(tempFolder.toFile()));\n\t\tCompilationTask task = compiler.getTask(\n\t\t\t\tnew PrintWriter(System.out), \n\t\t\t\tfileManager, \n\t\t\t\tnull, \n\t\t\t\tnull, \n\t\t\t\tnull, \n\t\t\t\tfileManager.getJavaFileObjects(\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/PolymorphicTest.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/PolymorphicBaseInterface.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/PolymorphicBaseClass.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/PolymorphicChildClass.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/PolymorphicChildClass2.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/SecondPolymorphicBaseClass.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/SecondPolymorphicChildClass.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/SimpleGenericBeanObject.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/PolymorphicGenericClass.java\")));\n\n\n\t\ttask.setProcessors(Arrays.asList(new ObjectMapperProcessor()));\n\t\ttask.call();\n\t}",
"public static void main(String[] args) throws IOException, ClassNotFoundException {\n\r\n\t\tlaunch(args);\r\n\r\n\t}",
"@Override\n\tprotected Class<?> findClass(String name) throws ClassNotFoundException {\n\t\tFile file = new File(getSimpleName(name) + \".class\");\n FileInputStream fis = null;\n Class<?> clazz = null;\n try {\n fis = new FileInputStream(file);\n int content = 0;\n int i = 0;\n byte[] data = new byte[fis.available()];\n while ((content = fis.read()) != -1) {\n // convert to char and display it\n data[i] = (byte) content;\n i++;\n }\n clazz = defineClass(name, data, 0, data.length);\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (fis != null)\n fis.close();\n } catch (IOException ex) {\n \t\tex.printStackTrace();\n \t}\n }\n return clazz;\n\t}",
"public static void main(String[] args) {\n System.out.println(\"Class 1\");\n }",
"public static void main(String[] args) {\n\t\tFull_Package x = new Full_Package();\n\n\t\tOnline_Class acadgild = x.new Online_Class();\n\t\tSystem.out.println(acadgild);\n\t}",
"private static void compileAndRun(String fileName, String code) {\n\n if(verboseCompiling) println(\"Deleting old temp files...\", warning);\n new File(fileName + \".java\").delete();\n new File(fileName + \".class\").delete();\n\n if(verboseCompiling) println(\"Creating source file...\", progErr);\n file = new File(fileName + \".java\");\n\n if(verboseCompiling) println(\"Writing code to source file...\", progErr);\n try {\n new FileWriter(file).append(code).close();\n } catch (IOException i) {\n println(\"Had an IO Exception when trying to write the code. Stack trace:\", error);\n i.printStackTrace();\n return; //Exit on error\n }\n\n if(verboseCompiling) println(\"Compiling code...\", progErr);\n //This should only ever be called if the JDK isn't installed. How you'd get here, I don't know.\n if (compiler == null) {\n println(\"Fatal Error: JDK not installed. Go to java.sun.com and install.\", error);\n return;\n }\n\n //Tries to compile. Success code is 0, so if something goes wrong, report.\n int result = -1;\n if (compileOptions.trim().equals(\"\"))\n result = compiler.run(null, out, err, file.getAbsolutePath());\n else\n //result = compiler.run(null, out, err, compileOptions, file.getAbsolutePath());\n result = compiler.run(null, out, err, \"-cp\", \"/Users/student/Desktop/bluecove-2.1.0.jar\", file.getAbsolutePath());\n //ArrayList<String> files = new ArrayList<>();\n //files.add(fileName);\n //boolean result = compiler.getTask(null, null, new ErrorReporter(), null, files, null).call();\n if (result != 0) {\n displayLog();\n //println(\"end record\", error); //End recording and pull out the message\n\n //println(\"Error type: \" + result,error);\n println(\"Failed to compile.\", warning);\n return; //Return on error\n }\n\n if(verboseCompiling) println(\"Attempting to run code...\", progErr);\n try {\n //Makes sure the JVM resets if it's already running.\n if(JVMrunning) \n kill();\n\n //Clears terminal window on main method call.\n if(clearOnMethod)\n outputText.setText(\"\");\n\n //Some String constants for java path and OS-specific separators.\n String separator = System.getProperty(\"file.separator\");\n String path = System.getProperty(\"java.home\")\n + separator + \"bin\" + separator + \"java\";\n\n //Creates a new process that executes the source file.\n ProcessBuilder builder = null;\n if(runOptions.trim().equals(\"\")) \n builder = new ProcessBuilder(path, fileName);\n else \n builder = new ProcessBuilder(path, runOptions, fileName);\n\n //Everything should be good now. Everything past this is on you. Don't mess it up.\n println(\"Build succeeded on \" + java.util.Calendar.getInstance().getTime().toString(), progErr);\n println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\", progErr); \n\n //Tries to run compiled code.\n JVM = builder.start();\n JVMrunning = true;\n\n //Links runtime out/err to our terminal window. No support for input yet.\n Reader errorReader = new InputStreamReader(JVM.getErrorStream());\n Reader outReader = new InputStreamReader(JVM.getInputStream());\n //Writer inReader = new OutputStreamWriter(JVM.getOutputStream());\n\n redirectErr = redirectIOStream(errorReader, err);\n redirectOut = redirectIOStream(outReader, out);\n //redirectIn = redirectIOStream(null, inReader);\n } catch (IOException e) {\n //JVM = builder.start() can throw this.\n println(\"IOException when running the JVM.\", progErr);\n e.printStackTrace();\n displayLog();\n return;\n }\n }",
"public static void main(String[] args)\r\n \t\t\tthrows IOException, ClassNotFoundException\r\n \t{\r\n \t\tSystem.exit(invoke(args));\r\n \t}",
"public static void main(String args[])\n {\n LoadFileSupport sample = new LoadFileSupport();\n sample.createNewInstance(\"C:/pavan/j2eeWork/ws-studio-ie-workspace/xml-test/HTMLtoXSLProject/IncomingTimber/LoadSampleSample.xml\");\n sample.loadExistingInstance(\"C:/pavan/j2eeWork/ws-studio-ie-workspace/xml-test/HTMLtoXSLProject/IncomingTimber/LoadSampleSample.xml\");\n }",
"public static void main(String[] args)\r\n {\r\n\r\n if (args.length < 1) {\r\n System.out.println(\"\\n\\njava mylang file.txt\");//to give error if less than 1\r\n return;\r\n }\r\n\r\n String contents = readFile(args[0]);//read file is a methode not only this remember that arg[0] contains the path of the file because you write java mylang try.txt\r\n\r\n mylang mylob = new mylang();\r\n mylob.interpret(contents);\r\n\r\n }",
"public void execfile(String filename) {\n }",
"public void parse(final Path path) {\n try (FileChannel fileChannel = FileChannel.open(path, StandardOpenOption.READ)) {\n // map class file to the memory\n // by choosing big endian, high order bytes must be put to the buffer before low order bytes\n ByteBuffer byteBuffer = fileChannel.map(FileChannel.MapMode.READ_ONLY, 0, fileChannel.size())\n .order(ByteOrder.BIG_ENDIAN);\n System.out.printf(\"Classfile %s\\n\", path.toString());\n parseConstantPool(byteBuffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static void main(String[] args) throws Exception\n\t{\n\t\tFileInputStream fis= new FileInputStream(\"E:/Java_source/fileStreamTest.java\");\n\t\t\n\t\t//transform the stream class into a reader class\n\t\tInputStreamReader reader = new InputStreamReader(fis);\n\n\t\t//transform the reader class into a Bufferedreader class\n\t\tBufferedReader br = new BufferedReader(reader);\n\n\t\t//use the readLine() func of BufferedReader to read a line in the text\n\t\tString tempstr = null;\n\t\twhile((tempstr = br.readLine())!=null)\n\t\t{\n\t\t\tSystem.out.println(tempstr);\n\t\t}\n\t\t\n\t}",
"public static void main(String argv[]) {\n if (argv.length == 0) {\n System.out.println(\"Usage : java CBS <inputfile>\");\n }\n else {\n for (int i = 0; i < argv.length; i++) {\n CBS scanner = null;\n try {\n scanner = new CBS( new java.io.FileReader(argv[i]) );\n while ( !scanner.yy_atEOF ) scanner.yylex();\n }\n catch (java.io.FileNotFoundException e) {\n System.out.println(\"File not found : \\\"\"+argv[i]+\"\\\"\");\n }\n catch (java.io.IOException e) {\n System.out.println(\"IO error scanning file \\\"\"+argv[i]+\"\\\"\");\n System.out.println(e);\n }\n catch (Exception e) {\n System.out.println(\"Unexpected exception:\");\n e.printStackTrace();\n }\n }\n }\n }",
"public static void main(String[] args) {\n\t\tTest test = new Test();\n\t\ttest.leArquivo(FILENAME);\n\t\ttest.criarArquivo();\n\t}",
"public static void main(String[] args) throws FileNotFoundException {\n\t\t\t\n\t\tScanner scan = new Scanner(new File(\"input.txt\"));\n\t\t\n\t\tParser parse;\n\t\tCode code = new Code();\n\t\tSymbolTable st = new SymbolTable();\n\t\t\n\t\twhile(scan.hasNextLine()) {\n\t\t\tString inCode = scan.nextLine();\t\n\t\t\tparse = new Parser(inCode);\n\t\t}\n\t\t\n\t}",
"public static void main(String[] args) {\n\n\t\t\n\t\tSystem.out.println(\"This is my class \");\n\t}",
"public static void main(String[] args){\r\n\tif (args.length>0){\r\n\t for (String arg : args){\r\n\t\tFile f = new File(arg);\r\n\t\tif (f.exists()){\r\n\t\t System.out.println(\"Parsing '\"+ f+\"'\");\r\n\t\t RobotProgramNode prog = parseFile(f);\r\n\t\t System.out.println(\"Parsing completed \");\r\n\t\t if (prog!=null){\r\n\t\t\tSystem.out.println(\"================\\nProgram:\");\r\n\t\t\tSystem.out.println(prog);}\r\n\t\t System.out.println(\"=================\");\r\n\t\t}\r\n\t\telse {System.out.println(\"Can't find file '\"+f+\"'\");}\r\n\t }\r\n\t} else {\r\n\t while (true){\r\n\t\tJFileChooser chooser = new JFileChooser(\".\");//System.getProperty(\"user.dir\"));\r\n\t\tint res = chooser.showOpenDialog(null);\r\n\t\tif(res != JFileChooser.APPROVE_OPTION){ break;}\r\n\t\tRobotProgramNode prog = parseFile(chooser.getSelectedFile());\r\n\t\tSystem.out.println(\"Parsing completed\");\r\n\t\tif (prog!=null){\r\n\t\t System.out.println(\"Program: \\n\"+prog);\r\n\t\t}\r\n\t\tSystem.out.println(\"=================\");\r\n\t }\r\n\t}\r\n\tSystem.out.println(\"Done\");\r\n }",
"@MBeanInfo(\"Execute commands from a file\")\n String execfile(@MBeanInfo(\"Path to file\") String path);",
"public static void main(String[] args) throws IOException \n\t{\n\tFile file= new File(\"C:\\\\Users\\\\gurnoor.singh\\\\Downloads\\\\prob1.txt\");\n\tSystem.out.println(file);\n\tBufferedReader br = new BufferedReader(new FileReader(file));\n\n\t// making thread pool of 5 threads to perform execution\n\tExecutorService pool = Executors.newFixedThreadPool(5);\n\n\tString st;\n\t while ((st = br.readLine()) != null) \n\t {\n\t Runnable r=new newClass(st);\n\t pool.execute(r);\n\n\t }\n\n\n\tbr.close();\n\tpool.shutdown();\n\t}",
"public static void main(String[] args) {\n\t\tDriver driveClass = new Driver();\r\n\t\tdriveClass.runDriver();\r\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"create second class file\");\r\n\t\tSystem.out.println(\"Push added print line\");\n\t\tSystem.out.println(\"start fetch\");\n\t\tSystem.out.println(\"start fetch2\");\n\r\n\t}",
"public static void main(String[] args) throws ClassNotFoundException {\n\t\tClass cc = Class.forName(\"JUnit.Test\");\n\t\tnew Test();\n\t\t//Test test = null;//\n\t\t//new Test();\n\t\t//ClassLoadTest t = new ClassLoadTest();\n\t}",
"public void run(String[] args){\n if (args.length > 0)\n {\n try{\n InputStreamReader is = new InputStreamReader(getClass().getResourceAsStream(\"/\" + args[0]));\n BufferedReader txtReader = new BufferedReader(is);\n Scanner inputScanner = new Scanner(txtReader);\n System.out.println(String.format(\"Processing file %s\", args[0]));\n ToyRobot toyRobot = new ToyRobot();\n ToyRobotController controller = new ToyRobotController(toyRobot);\n while (inputScanner.hasNext()){\n String line = inputScanner.nextLine().toUpperCase();\n if (line.contains(Constants.COMMAND_PLACE) && Utilities.isOnTable(Utilities.getCoordinateFromInput(line))){\n controller.place(Utilities.getCoordinateFromInput(line), Utilities.getDirectionFromInput(line));\n System.out.println(String.format(\"Robot placement at %s,%s\", controller.getRobot().getCoordinates().getxCoordinate(), controller.getRobot().getCoordinates().getyCoordinate() ));;\n } else if (line.contains(Constants.COMMAND_MOVE)){\n controller.move();\n System.out.println(String.format(\"Robot moving at direction %s\", controller.getRobot().getDirection()));\n } else if ((line.contains(Constants.COMMAND_TURN_LEFT) || line.contains(Constants.COMMAND_TURN_RIGHT))){\n controller.turn(line);\n System.out.println(String.format(\"Robot changed direction to %s\", controller.getRobot().getDirection()));\n } else if (line.contains(Constants.COMMAND_REPORT)){\n controller.location();\n }\n }\n } catch (Exception e){\n System.out.println(\"No input found\");\n }\n }\n else\n {\n System.out.println(\"No input found\");\n }\n }",
"public static void main(String[] args) throws IOException {\n\t\t// creating local class objects \n\t\t\n\t}",
"public static void main(String[] args){\r\n try {\r\n AnalizadorSintactico asin = new AnalizadorSintactico(\r\n new AnalizadorLexico( new FileReader(args[0])));\r\n Object result = asin.parse().value;\r\n System.out.println(\"\\n*** Resultados finales ***\");\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }",
"public static void main(String[] args)\r\n {\r\n CommandParser parser = new CommandParser(args[0]);\r\n parser.parseFile();\r\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"add new class\");\n\n\t}",
"private Map<String, Entity> parseJavaClasses(List<Path> classFiles) {\r\n logger.trace(\"parseJavaClass\");\r\n\r\n // Instantiate walker and listener\r\n ParseTreeWalker walker = new ParseTreeWalker();\r\n Java8CustomListener listener = new Java8CustomListener();\r\n\r\n classFiles.forEach(path -> {\r\n logger.trace(\"========== Parse: \" + path.toFile().getName() + \" ==========\");\r\n\r\n try {\r\n ParseTree tree = getTree(path);\r\n\r\n // walk through class\r\n walker.walk(listener, tree);\r\n } catch (IOException e) {\r\n logger.error(\"Error while reading creating tree for: {}\", path, e);\r\n }\r\n });\r\n\r\n return listener.getEntityMap();\r\n }",
"private ArrayList<String> javaCommadBuilder(StringBuilder currentFile)\n\t{\n\t\tArrayList<String> command = new ArrayList<String>(Arrays.asList(\"java\", \"-cp\", \"Class\", \"CCLRun\"));\n\t\tcommand.add(currentFile.toString().substring(0, currentFile.toString().indexOf(\".\")));\n\t\treturn command;\n\t}",
"@Override\n\tpublic void outAClass(AClass node) {\n\t\tcreateConstructor();\n\t\tString directory = this.fileName.substring(0,\n\t\t\t\tthis.fileName.lastIndexOf(File.separatorChar));\n\t\ttry{\n\t\t\tcg.getJavaClass().dump( directory +\"/\" + node.getType().getText() + \".class\");\n\t\t}catch (IOException e ){\n\t\t\tErrorList.add(node,\"Could not save file : \" + e.getMessage() , fileName); \n\t\t}\n\t\tcurrentClass = null; \n\t}",
"public static void main(String[] args) {\n\t\tString currentClass = \"Calculator4\";\r\n\t\t//for(String currentClass: classes) {\r\n\t\t\tArrayList<String> argsList = new ArrayList<String>();\r\n\t\t\tSystem.out.println(currentClass);\r\n\t\t\targsList.add(\"-o\"); //Generated WSDL File name\r\n\t\t\targsList.add(\"XML//\" + currentClass + \"Off.wsdl\");\r\n\t\t\targsList.add(\"-l\");// Target URL\r\n\t\t\targsList.add(\"http://localhost:8080/axis/services/\"+currentClass);\r\n\t\t\targsList.add(\"mu.axistest.\"+currentClass); //Class for which to generate a WSDL. Include package.\r\n\t\t\tString[] argsar = argsList.toArray(new String[argsList.size()]);\r\n\t\t\torg.apache.axis.wsdl.Java2WSDL.main(argsar);\r\n\t\t\t//org.apache.axis.wsdl.Java2WSDL generator;\r\n\t\t//}\r\n\t}",
"String getResultClass();",
"public void Run(String filePath){\n\n //read in the input file from the user declared path\n ReadInputFile(filePath);\n\n //save data for refactoring process\n refact = inputFile;\n\n //Prompt the user and wait\n System.out.println(\"Beginning refactoring process...\\n\\n\");\n DisplaySleep();\n\n //refactor the entire async task file\n ImportLibrary();\n CacheAsyncTaskFunctions();\n HandleAysncFromOnCreate();\n HandleBuilder(LOADER_CALLBACK);\n HandleBuilder(LOADER_CLASS);\n\n //write to the new file\n try{\n PrintWriter writer = new PrintWriter(\"RefactoredOutput.java\", \"UTF-8\");\n\n for(String in: inputFile){\n writer.print(in);\n }\n writer.close();\n }\n catch(IOException ex){\n System.out.println(ex);\n }\n\n //let the user know that the program has finished running\n System.out.println(\"AsyncTask Refactoring Process Complete!\");\n }",
"public static void main(String args[]){\n //---------------------------------------------------------------------------\n SQLTagsGeneratorTable sqlTagsGeneratorTable=new SQLTagsGeneratorTable();\n ClassVariables classVariables=new ClassVariables(sqlTagsGeneratorTable);\n System.out.println(classVariables.getClassVariablesMethods());\n\t}"
] |
[
"0.6261667",
"0.62341875",
"0.6194332",
"0.60884595",
"0.6012382",
"0.5959299",
"0.5956613",
"0.59317017",
"0.5854129",
"0.5823195",
"0.57812494",
"0.5731365",
"0.57227254",
"0.56646955",
"0.56587857",
"0.56315",
"0.5628235",
"0.5606547",
"0.55756253",
"0.55745494",
"0.5572581",
"0.5553084",
"0.5549508",
"0.5485536",
"0.54785824",
"0.54482955",
"0.5435497",
"0.5429149",
"0.54228127",
"0.53733253",
"0.5372271",
"0.5366493",
"0.5365722",
"0.53627205",
"0.53603244",
"0.5359518",
"0.5347544",
"0.53384775",
"0.53216034",
"0.5319789",
"0.53181463",
"0.5300353",
"0.529636",
"0.5296255",
"0.52961653",
"0.52775335",
"0.5271615",
"0.5266478",
"0.5264979",
"0.5249795",
"0.52456194",
"0.5245261",
"0.5233844",
"0.5232817",
"0.5230545",
"0.5228702",
"0.5228285",
"0.5216345",
"0.5211273",
"0.52043843",
"0.5195185",
"0.51907384",
"0.51903",
"0.5187242",
"0.5180906",
"0.5178846",
"0.51774526",
"0.517212",
"0.5147049",
"0.5139364",
"0.51392984",
"0.5138433",
"0.51362866",
"0.5135278",
"0.51329476",
"0.5128693",
"0.5125071",
"0.511887",
"0.51183933",
"0.51156694",
"0.51147026",
"0.5112117",
"0.5109361",
"0.5105476",
"0.5094372",
"0.5088285",
"0.5085836",
"0.50829846",
"0.50796765",
"0.507755",
"0.50759065",
"0.50732845",
"0.50700116",
"0.50652426",
"0.50643533",
"0.50637263",
"0.5053543",
"0.50504637",
"0.5049362",
"0.5046743"
] |
0.62757015
|
0
|
Byte[] rawHtml = transporter.send(new HtmlRequest(url)); return new Html(rawHtml);
|
public Html downloadHtml(String url){
HtmlRequest htmlRequest = new HtmlRequest(url);
Byte[] rawHtml = transporter.send(htmlRequest.getAddress(),
htmlRequest.getContext().getBytes());
return new Html(rawHtml);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public HTML getHtml() {\n return new HTML(url, body);\n }",
"String renderHTML();",
"public String getHTML() throws Exception {\n\t\t// create object to store html source text as it is being collected\n\t\tStringBuilder html = new StringBuilder();\n\t\t// open connection to given url\n\t\tURL url = new File(urlString).toURI().toURL();\n\t\t// create BufferedReader to buffer the given url's HTML source\n\t\tBufferedReader htmlbr =\n\t\t\t\tnew BufferedReader(new InputStreamReader(url.openStream()));\n\t\tString line;\n\t\t// read each line of HTML code and store in StringBuilder\n\t\twhile ((line = htmlbr.readLine()) != null) {\n\t\t\thtml.append(line);\n\t\t}\n\t\thtmlbr.close();\n\t\t// convert StringBuilder into a String \n\t\tString stringHtml = html.toString();\n\t\t\n\t\t// preprocess the string to replace all special chars\n\t\tstringHtml.replaceAll(\"'\", \"'\");\n\t\tstringHtml.replaceAll(\"‐\", \"-\");\n\t\tstringHtml.replaceAll(\"&\", \"&\");\n\t\t\n\t\treturn stringHtml;\n\t}",
"@GET\r\n @Produces(\"text/html\")\r\n public String getHtml() {\r\n return \"<html><body>the solution is :</body></html> \";\r\n }",
"HTML createHTML();",
"public String getHtml() {\n return html;\n }",
"private static String fetchHTML(String link) {\n\t\tStringBuffer buffer = null;\n\t\ttry {\n\t\t\tURL url = new URL(getURL(link));\n\t\t\tInputStream is = url.openStream();\n\t\t\tint ptr = 0;\n\t\t\tbuffer = new StringBuffer();\n\t\t\twhile ((ptr = is.read()) != -1) {\n\t\t\t buffer.append((char)ptr);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn buffer.toString();\n\t}",
"@Test\n public void parserHtml() throws JSONException, IOException {\n }",
"public native final String html()/*-{\n\t\treturn this.html();\n\t}-*/;",
"public interface HTMLGetter {\n public Document get(String url) throws Exception;\n}",
"private void getHtmlCode() {\n\t try {\n\t Document doc = Jsoup.connect(\"http://www.example.com/\").get();\n\t Element content = doc.select(\"a\").first();\n//\t return content.text();\n\t textView.setText(content.text());\n\t } catch (IOException e) {\n\t // Never e.printStackTrace(), it cuts off after some lines and you'll\n\t // lose information that's very useful for debugging. Always use proper\n\t // logging, like Android's Log class, check out\n\t // http://developer.android.com/tools/debugging/debugging-log.html\n\t Log.e(TAG, \"Failed to load HTML code\", e);\n\t // Also tell the user that something went wrong (keep it simple,\n\t // no stacktraces):\n\t Toast.makeText(this, \"Failed to load HTML code\",\n\t Toast.LENGTH_SHORT).show();\n\t }\n\t }",
"public void setHTML(String html);",
"protected SafeHtml getInnerHtml() {\n return html;\n }",
"private String readHTML(URL url) {\n String urlContents = \"\";\n\n try {\n BufferedReader bufferedReader =\n new BufferedReader(new InputStreamReader(url.openStream()));\n StringBuilder stringBuilder = new StringBuilder();\n\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n stringBuilder.append(line).append(\"\\n\");\n }\n\n urlContents = stringBuilder.toString();\n bufferedReader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return urlContents;\n }",
"void getHTML(String req) {\n html = \"\";\n int r;\n BufferedInputStream in = null;\n BufferedInputStream imgIn = null;\n boolean retry;\n Vector imageRd = new Vector(0);\n/*\n do {\n retry = false;\n try {\n\tin = new BufferedInputStream(url.openStream(), 4096);\n\t//\t System.out.println(\"DoneOpening input stream\");\n }\n catch (IOException ioe) {\n\trbe.stats.error(\"Unable to open URL.\" , url.toExternalForm());\n\tioe.printStackTrace();\n\tretry=true;\n System.err.println(\"Set retry=true, then continue...\");\n\tcontinue;\n }\n try {\n\t \n\t //\t while(in.available() == 0){\n\t // System.out.println(\"Nothing available on input stream!\");\n\t //}\n \n\t while ((r = in.read(buffer, 0, buffer.length))!=-1) {\n\t if (r>0) {\n\t\t html = html + new String(buffer, 0, r);\n\t }\n\t //\t System.out.print(\".\");\n\t }\n\t \n }\n catch (IOException ioe) {\n\trbe.stats.error(\"Unable to read HTML from URL.\" , \n\t\t\turl.toExternalForm());\n\tretry=true;\n\tcontinue;\n }\n\n if (retry) {\n\t try {\n\t if (waitKey) {\n\t\t rbe.getKey();\n\t }\n\t else {\n\t\t sleep(1000L);\n\t }\n\t }\n\t catch (InterruptedException inte) {\n\t System.out.println(\"In getHTML, caught interrupted exception!\");\n\t return;\n\t }\t \n }\n } while (retry);\n \n try {\n in.close();\n }\n catch (IOException ioe) {\n rbe.stats.error(\"Unable to close URL.\" , url.toExternalForm());\n }\n*/\n long startTime = System.currentTimeMillis();\n byte[] res = this.clientProxy.getHTMLText(req);\n long endTime = System.currentTimeMillis();\n this.html = new String(res);\n\n //System.out.println(html);\n\n /******\n html =\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"JIGSAW-SESSION-ID=kjfljelejl_343434223_32\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"I_ID=563 \" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"I_ID=534 \" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"I_ID=564 \" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"I_ID=568 \" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\";\n ****/\n\n // Scan for image requests, and request those.\n int cur = 0;\n\n // Suppress image requests.\n if (!RBE.getImage) return;\n\n URL url = null;\n try {\n url = new URL(req);\n } catch (MalformedURLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n findImg(html, url, imgPat, srcPat, quotePat, imageRd);\n findImg(html, url, inputPat, srcPat, quotePat, imageRd);\n\n if (DEBUG > 2) {\n System.out.println(\"Found \" + imageRd.size() + \" images.\");\n }\n while (imageRd.size() > 0) {\n int max = imageRd.size();\n int min = Math.max(max - rbe.maxImageRd, 0);\n int i;\n try {\n for (i = min; i < max; i++) {\n ImageReader rd = (ImageReader) imageRd.elementAt(i);\n //\tSystem.out.println(\"EB #\" + sessionID+ \"reading image: \" + rd.imgURLStr);\n // TODO TODO FETCHING IMAGES IS BUGGY !!!!!!!\n if (!rd.readImage()) {\n if (DEBUG > 2) {\n System.out.println(\"Read \" + rd.tot + \" bytes from \" +\n rd.imgURLStr);\n }\n imageRd.removeElementAt(i);\n i--;\n max--;\n }\n }\n } catch (Exception inte) {\n System.out.println(\"In getHTML, caught exception!\");\n return;\n }\n }\n }",
"@Test\n\tpublic void testBinaryReadHtmlResponseFromProvider() throws Exception {\n\t\tHttpGet httpGet = new HttpGet(\"http://localhost:\" + ourPort + \"/Binary/html\");\n\t\thttpGet.addHeader(\"Accept\", \"text/html\");\n\n\t\tCloseableHttpResponse status = ourClient.execute(httpGet);\n\t\tString responseContent = IOUtils.toString(status.getEntity().getContent(), Charsets.UTF_8);\n\t\tstatus.close();\n\t\tassertEquals(200, status.getStatusLine().getStatusCode());\n\t\tassertEquals(\"text/html\", status.getFirstHeader(\"content-type\").getValue());\n\t\tassertEquals(\"<html>DATA</html>\", responseContent);\n\t\tassertEquals(\"Attachment;\", status.getFirstHeader(\"Content-Disposition\").getValue());\n\t}",
"@Test\n\tpublic void testHTML(){\n \tFile xml = new File(testData,\"html/htmlsidekick.html\");\n \t\n \tBuffer b = TestUtils.openFile(xml.getPath());\n\t\t\n \t// wait for end of parsing\n \tdoInBetween(new Runnable(){\n \t\t\tpublic void run(){\n \t\t\t\taction(\"sidekick-parse\",1);\n \t\t}}, \n \t\tmessageOfClassCondition(sidekick.SideKickUpdate.class),\n \t\t10000);\n\t\t\n \taction(\"sidekick-tree\");\n \tPause.pause(2000);\n\n \tHyperlinkSource src = HTMLHyperlinkSource.create();\n\t\tfinal Hyperlink h = src.getHyperlink(TestUtils.view().getBuffer(), 3319);\n\t\tassertNotNull(h);\n\t\tassertTrue(h instanceof jEditOpenFileHyperlink);\n\t\tassertEquals(67, h.getStartLine());\n\t\tassertEquals(67, h.getEndLine());\n\t\tGuiActionRunner.execute(new GuiTask() {\n\t\t\t\n\t\t\t@Override\n\t\t\tprotected void executeInEDT() throws Throwable {\n\t\t\t\th.click(TestUtils.view());\n\t\t\t}\n\t\t});\n\t\t\n\t\tassertEquals(\"jeditresource:/SideKick.jar!/index.html\",TestUtils.view().getBuffer().getPath());\n\t\t\n\t\tTestUtils.close(TestUtils.view(), TestUtils.view().getBuffer());\n\t\tTestUtils.close(TestUtils.view(), b);\n\t}",
"private static String getHTMLFile(String googleScholarURL) throws Exception {\r\n HTMLExtractor googleScholarParser = new HTMLExtractor();\r\n String rawHTMLString = googleScholarParser.getHTML(googleScholarURL);\r\n return rawHTMLString;\r\n }",
"private String getText(URL url){\n\tString parsedHtml=null;\n\ttry{\n\t\tHttpURLConnection urlConn = (HttpURLConnection) url.openConnection();\n\t\tString line = null;\n\t\tStringBuilder tmp = new StringBuilder();\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));\n\t\twhile ((line = in.readLine()) != null) {\n\t\t tmp.append(line);\n\t\t}\n\t\t \n\t\tDocument doc = Jsoup.parse(tmp.toString());\n\t\tparsedHtml = doc.title() + doc.body().text();\n\t\t\n\t}\n\tcatch(IOException e){\n\t\tSystem.out.println(\"Page not reached for: \"+url );\n\t}\n\tfinally{\n\t\treturn parsedHtml;\n\t}\n\t\n}",
"public void renderBody(HtmlStream stream) {\n }",
"@Test\n public void canReturnHtml() {\n String html = given()\n .port(7070)\n .get(\"/\")\n .then()\n .body(containsString(\"Conveyal Analysis\"))\n .extract().response().asString();\n assertThat(html, matchesSnapshot());\n }",
"@Test\n\tpublic void testBinaryOperationHtmlResponseFromProvider() throws Exception {\n\t\tHttpGet httpGet = new HttpGet(\"http://localhost:\" + ourPort + \"/Patient/html/$binaryOp\");\n\t\thttpGet.addHeader(\"Accept\", \"text/html\");\n\n\t\tCloseableHttpResponse status = ourClient.execute(httpGet);\n\t\tString responseContent = IOUtils.toString(status.getEntity().getContent(), Charsets.UTF_8);\n\t\tstatus.close();\n\t\tassertEquals(200, status.getStatusLine().getStatusCode());\n\t\tassertEquals(\"text/html\", status.getFirstHeader(\"content-type\").getValue());\n\t\tassertEquals(\"<html>DATA</html>\", responseContent);\n\t\tassertEquals(\"Attachment;\", status.getFirstHeader(\"Content-Disposition\").getValue());\n\t}",
"public void testHtml() {\r\n\r\n Map<String, String> parameters = new HashMap<String, String>();\r\n parameters.put(\"type\", \"html\");\r\n ConnectionParameters cp = new ConnectionParameters(new MockConnectionEl(parameters,\r\n \"mailto:scriptella@gmail.com?subject=Hello\"), MockDriverContext.INSTANCE);\r\n MailConnection mc = new MailConnection(cp) {\r\n @Override\r\n protected void send(MimeMessage message) {\r\n try {\r\n assertEquals(\"scriptella@gmail.com\", message.getRecipients(Message.RecipientType.TO)[0].toString());\r\n assertEquals(\"Hello\", message.getSubject());\r\n assertEquals(\"Message. *example*\",\r\n ((MimeMultipart)message.getContent()).getBodyPart(0).getContent());\r\n } catch (Exception e) {\r\n throw new IllegalStateException(e);\r\n }\r\n\r\n }\r\n };\r\n mc.executeScript(new StringResource(\"Message. $example\"), MockParametersCallbacks.SIMPLE);\r\n }",
"public String HtmlToString(String file) {\n String result = null;\n try {\n String webPage = url + file;\n URL url = new URL(webPage);\n URLConnection urlConnection = url.openConnection();\n InputStream is = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(is);\n\n int numCharsRead;\n char[] charArray = new char[1024];\n StringBuffer sb = new StringBuffer();\n while ((numCharsRead = isr.read(charArray)) > 0) {\n sb.append(charArray, 0, numCharsRead);\n }\n result = sb.toString();\n } catch (Exception ignored) {\n }\n return result;\n }",
"@Test\n public void testGetContent_2() {\n System.out.println(\"getContent\");\n MockServletResponse instance = new MockServletResponse();\n\n try (HtmlElement html = HtmlElement.niceOf(instance)) {\n html.getBody().addHeading(\"ABC:ČÁŠ\", \"cssType\");\n }\n String result = instance.toString();\n String expected = String.join(\"\\n\"\n , \"<!DOCTYPE html>\"\n , \"<html lang=\\\"en\\\">\"\n , \"\\t<head>\"\n , \"\\t\\t<meta charset=\\\"UTF-8\\\"/>\"\n , \"\\t\\t<title>Demo</title>\"\n , \"\\t</head>\"\n , \"\\t<body>\"\n , \"\\t\\t<h1 class=\\\"cssType\\\">ABC:ČÁŠ</h1>\"\n , \"\\t</body>\"\n , \"</html>\");\n assertEquals(expected, result);\n\n }",
"public String getHtmlText() {\n return htmlText;\n }",
"@Override\n protected Void doInBackground(Void... params) {\n try {\n documentoHtml = Jsoup.connect(\"http://eldolarenmexico.com/\").get();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }",
"@Override\n\tpublic void sendHtmlEmail(MimeMessage mm) {\n\t\t\n\t}",
"public MailMessage setHtml(String html) {\n this.html = html;\n return this;\n }",
"@PUT\r\n @Consumes(MediaType.TEXT_HTML)\r\n public void putHtml(String content) {\r\n }",
"@PUT\n @Consumes(MediaType.TEXT_HTML)\n public void putHtml(String content) {\n }",
"public String getHtml() {\n\t\tStringBuffer sb = new StringBuffer();\n\t\tfor(StringContainer sc : container) {\n\t\t\tsb.append(sc.getString());\n\t\t}\n\t\treturn \"<html><body>\"+sb.toString()+\"</body></html>\";\n\t}",
"public URL getHtmlDescription();",
"private String getContent(String url) throws BoilerpipeProcessingException, IOException {\n int code;\n HttpURLConnection connection = null;\n URL uri;\n do{\n uri = new URL(url);\n if(connection != null)\n connection.disconnect();\n connection = (HttpURLConnection)uri.openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setConnectTimeout(5000);\n connection.setReadTimeout(5000);\n connection.connect();\n code = connection.getResponseCode();\n if(code == 301)\n url = connection.getHeaderField( \"Location\" );\n }while (code == 301);\n\n System.out.println(url + \" :: \" + code);\n String content = null;\n if(code < 400) {\n content = ArticleExtractor.INSTANCE.getText(uri);\n }\n connection.disconnect();\n return content;\n }",
"@Override\n protected String doInBackground(Object... perams) {\n urll = perams[0].toString();//perams is an array of the vribles or things passed\n //place for html to go within scope of doinbackground\n String html2 = \"\";// html2 will have the html code filled within it\n String htmlt;\n try {\n InputStreamReader haha = new InputStreamReader(((URL) perams[0]).openStream());//input stream reader takes in an input stream!\n BufferedReader read = new BufferedReader(haha);// put the IO stream into the buffer for conversion from bytes to chars\n while ((htmlt = read.readLine()) != null) {\n if (isCancelled()) {\n html2 = \"\";\n break;\n }\n html2 = html2 + htmlt;\n }\n read.close();//closes the buffered stream\n urlandstring urlstr = new urlandstring(urll, html2);//creates a new urlandstringobject\n Message msg = Message.obtain();//creates and saves a new message instance\n msg.obj = urlstr;//puts the html variable into an object within the message\n msg.setTarget((Handler) perams[1]);//sets target to basic handler\n msg.sendToTarget(); //sends to target\n return html2;\n } catch (IOException e) {\n e.printStackTrace();\n // toast.toastpush(\"1\",urll);\n // Toast err= Toast.makeText(getApplicationContext(),\"ERROR cant open IO stream\",Toast.LENGTH_SHORT);//error message for if the io stream does not work\n // err.show();\n // Looper.loop();//for the correct implementation of thread message handling!\n return \"nope\";\n }\n }",
"public interface SafeHtmlRenderer<T> {\n\n /**\n * Renders {@code object} as safe HTML.\n */\n SafeHtml render(T object);\n\n /**\n * Renders {@code object} as safe HTML, appended directly to {@code builder}.\n */\n void render(T object, SafeHtmlBuilder builder);\n}",
"HttpContent getHttpContent();",
"@Test\n public void test() throws IOException {\n String url = \"http://blog.csdn.net/seatomorrow/article/details/48393547\";\n Readability readability = new Readability(getDoc(url)); // URL\n readability.init();\n String cleanHtml = readability.outerHtml();\n System.out.println(cleanHtml);\n }",
"public AdmClientePreferencialHTML() {\n/* 191 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 193 */ buildDocument();\n/* */ }",
"@Test\n\tpublic void testHTMLAsXML(){\n \tFile xml = new File(testData,\"html/htmlsidekick.html\");\n \t\n \tBuffer b = TestUtils.openFile(xml.getPath());\n\t\t\n \t// wait for end of parsing\n \tdoInBetween(new Runnable(){\n \t\t\tpublic void run(){\n \t\t\t\taction(\"sidekick.parser.xml-switch\",1);\n \t\t}}, \n \t\tmessageOfClassCondition(sidekick.SideKickUpdate.class),\n \t\t10000);\n\t\t\n \taction(\"sidekick-tree\");\n \tPause.pause(2000);\n\n \tHyperlinkSource src = HTMLHyperlinkSource.create();\n\t\tfinal Hyperlink h = src.getHyperlink(TestUtils.view().getBuffer(), 3319);\n\t\tassertNotNull(h);\n\t\tassertTrue(h instanceof jEditOpenFileHyperlink);\n\t\tassertEquals(67, h.getStartLine());\n\t\tassertEquals(67, h.getEndLine());\n\t\tGuiActionRunner.execute(new GuiTask() {\n\t\t\t\n\t\t\t@Override\n\t\t\tprotected void executeInEDT() throws Throwable {\n\t\t\t\th.click(TestUtils.view());\n\t\t\t}\n\t\t});\n\t\t\n\t\tassertEquals(\"jeditresource:/SideKick.jar!/index.html\",TestUtils.view().getBuffer().getPath());\n\t\t\n\t\tTestUtils.close(TestUtils.view(), TestUtils.view().getBuffer());\n\t\tTestUtils.close(TestUtils.view(), b);\n\t}",
"public interface Renderable extends Serializable {\r\n\r\n /**\r\n * Render output, normally HTML markup, to the given buffer.\r\n *\r\n * @param buffer the string buffer to render output to\r\n */\r\n public void render(HtmlStringBuffer buffer);\r\n\r\n}",
"public String create()\n {\n return createHtml();\n }",
"@PUT\r\n @Consumes(\"text/html\")\r\n public void putHtml(String content) {\r\n }",
"@DISPID(-2147417084)\n @PropGet\n java.lang.String outerHTML();",
"@SafeVarargs\n public final RestResponseAsserter bodyAsHTML(Consumer<HtmlAssert>... assertions) {\n\n return assertStringBody(\n bodyStr -> {\n extract(bodyStr);\n Stream.of(assertions)\n .forEach(\n assertion ->\n assertion.accept(\n softly.assertHtml(bodyStr, responseExtractor)));\n\n\n });\n }",
"public HTMLParser (byte[] page) {\r\n //page = parseToHTML(page);\r\n\r\n setText (page);\r\n }",
"private String escapeHtml(String html) {\n if (html == null) {\n return null;\n }\n return html.replaceAll(\"&\", \"&\").replaceAll(\"<\", \"<\").replaceAll(\n \">\", \">\");\n }",
"private String escapeHtml(String html) {\n if (html == null) {\n return null;\n }\n return html.replaceAll(\"&\", \"&\").replaceAll(\"<\", \"<\").replaceAll(\n \">\", \">\");\n }",
"public PoaMaestroMultivaloresHTML() {\n/* 253 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 255 */ buildDocument();\n/* */ }",
"public String getMessageTextAsHTML();",
"public String extractHtml(HttpURLConnection connection) {\n if (connection == null) return \"\";\n Scanner scanner = null;\n try {\n scanner = new Scanner(connection.getInputStream());\n } catch (IOException e) {\n return \"\";\n }\n scanner.useDelimiter(\"\\\\Z\");\n try {\n return scanner.next();\n } catch (Exception e) {\n return \"\";\n }\n }",
"protected void loadAdHTML(String url)\n\t{\n\t\t\n\t\tthis.adView.loadUrl(url);\n\t\tthis.broadcast(\"loadAdHTML\", url);\n\t}",
"public interface RendererLogic {\n\n /**\n * The `execute` function will render the supplied HTML page to the supplied GUI and will\n * retrieve any necessary external resources using the supplied external resource logic.\n *\n * @param htmlPage The HTML page to load into the supplied GUI.\n * @param gui The GUI to load the supplied HTML page into.\n * @throws IOException when unable to retrieve a resource.\n * @throws UnsupportedEncodingException when unable to proxy a link through\n * `http://127.0.0.1/?url=` to prevent immediate DNS look\n * ups.\n * @throws BadLocationException when unable to tokenize the supplied HTML.\n */\n void execute(HtmlPage htmlPage, Gui gui)\n throws IOException, UnsupportedEncodingException, BadLocationException;\n\n}",
"public abstract Body getBody();",
"@Override\n public String getWeb() {\n return web;\n }",
"private String escapeHtml(String html) {\r\n\t\tif (html == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn html.replaceAll(\"&\", \"&\").replaceAll(\"<\", \"<\").replaceAll(\">\", \">\");\r\n\t}",
"String getBody();",
"String getBody();",
"String getBody();",
"String getBody();",
"@Test\n public void fixedInHtmlUnit() throws Exception {\n final String html = \"<html></html>\";\n final HtmlPage page = loadPage(html);\n final Window topScope = ((Window) page.getEnclosingWindow().getScriptObject());\n topScope.put(\"str\", topScope, str_);\n topScope.put(\"text\", topScope, text_);\n topScope.put(\"expected\", topScope, expected_);\n page.executeJavaScript(src_);\n }",
"public RenderablePanel(@IsSafeHtml String html) {\n this(SafeHtmlUtils.fromTrustedString(html));\n }",
"private String escapeHtml(String html) {\r\n\t\tif (html == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn html.replaceAll(\"&\", \"&\").replaceAll(\"<\", \"<\")\r\n\t\t\t\t.replaceAll(\">\", \">\");\r\n\t}",
"public interface WebsiteDetector {\n Boolean detect( String htmlBody );\n}",
"private void getHTMLOffer(String href, int index){\r\n ArrayList<String> htmlOffer = new ArrayList<>();\r\n \r\n try{\r\n URLConnection connection = new URL(href).openConnection();\r\n connection.setRequestProperty(\"Accept-Charset\", \"UTF-8\");\r\n BufferedReader in = new BufferedReader(\r\n new InputStreamReader(connection.getInputStream()));\r\n\r\n String inputLine;\r\n while ((inputLine = in.readLine()) != null){\r\n htmlOffer.add(inputLine);\r\n }\r\n \r\n in.close();\r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(OfferGeneralInformation.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(OfferGeneralInformation.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n SaveSingleOfferHTML saveOffer = new SaveSingleOfferHTML(htmlOffer, index);\r\n }\r\n }",
"private String escapeHtml(String html) {\n\t\tif (html == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn html.replaceAll(\"&\", \"&\").replaceAll(\"<\", \"<\")\n\t\t\t\t.replaceAll(\">\", \">\");\n\t}",
"private String escapeHtml(String html) {\n\t\tif (html == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn html.replaceAll(\"&\", \"&\").replaceAll(\"<\", \"<\")\n\t\t\t\t.replaceAll(\">\", \">\");\n\t}",
"public void update(){\n\t\tresponse = buildHtml(new ArrayList<HtmlElement>(elements));\n\t}",
"public String sendGet(String url)\n\t{\n\t\t//Getting most relevant user-agent from robots.txt\n\t\tbest_match = findBestMatch();\n\t\t//Deicing whether or not to skip\n\t\tif (shouldSkip(url))\n\t\t{\n\t\t\treturn \"skipped\";\n\t\t}\n\t\tif (url.startsWith((\"https\")))\n\t\t{\n\t\t\treturn sendGetSecure(url);\n\t\t}\n\t\ttry \n\t\t{\n\t\t\t//Creating URL objects\n\t\t\tURL http_url = new URL(url);\n\t\t\t//Delaying visit if directed to by robots.txt\n\t\t\tcrawlDelay();\n\t\t\tHttpURLConnection secure_connection = (HttpURLConnection)http_url.openConnection();\n\t\t\t//Setting request method\n\t\t\tsecure_connection.setRequestMethod(\"GET\");\n\t\t\t//Sending all headers except for host (since URLConnection will take care of this)\n\t\t\tfor (String h: headers.keySet())\n\t\t\t{\n\t\t\t\tif (!h.equals(\"Host\"))\n\t\t\t\t{\n\t\t\t\t\tsecure_connection.setRequestProperty(h, headers.get(h));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Getting ResponseParser object to read in page content\n\t\t\tp = new ResponseParser(new BufferedReader(new InputStreamReader(secure_connection.getInputStream())));\n\t\t\t\n\t\t\t//Parsing all response headers from returned object\n\t\t\tMap<String,String> p_headers = p.getHeaders();\n\t\t\tMap<String, List<String>> response_headers = secure_connection.getHeaderFields();\n\t\t\tfor (Map.Entry<String, List<String>> entry : response_headers.entrySet()) \n\t\t\t{\n\t\t\t\tif (entry.getKey() == null)\n\t\t\t\t{\n\t\t\t\t\tp.setResponse(entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tp_headers.put(entry.getKey(),entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If we didn't get any headers in the response, the URL was invalid\n\t\t\tif (p.getHeaders().size() == 0)\n\t\t\t{\n\t\t\t\treturn (\"invalid url\");\n\t\t\t}\n\t\t\t\n\t\t\t//Otherwise return the contents of the returned document\n\t\t\treturn p.getData();\n\t\t\t\n\t\t} \n\t\tcatch (IOException | IllegalArgumentException e) \n\t\t{\n\t\t\treturn \"invalid url\";\n\t\t}\t\t\n//\t\ttry\n//\t\t{\n//\t\t\t//Deals with secure request\n//\t\t\tif (url.startsWith((\"https\")))\n//\t\t\t{\n//\t\t\t\treturn sendGetSecure(url);\n//\t\t\t}\n//\t\t\t//Parsing host and port from URL\n//\t\t\tURLInfo url_info = new URLInfo(url);\n//\t\t\thost = url_info.getHostName();\n//\t\t\tport = url_info.getPortNo();\n//\t\t\t\n//\t\t\t//Changing Host header if necessary\n//\t\t\theaders.put(\"Host\", host + \":\" + port);\n//\t\t\t\n//\t\t\t//Getting file path of URL\n//\t\t\tString file_path = url_info.getFilePath();\n//\t\t\t\n//\t\t\t//If we weren't able to find a host, URL is invalid\n//\t\t\tif (host == null)\n//\t\t\t{\n//\t\t\t\treturn \"invalid url\";\n//\t\t\t}\n//\t\t\t\n//\t\t\t//Delaying visits based on robots.txt crawl delay\n//\t\t\tcrawlDelay();\n//\t\t\t\n//\t\t\t//Otherwise, opening up socket and sending request with all headers\n//\t\t\tsocket = new Socket(host, port);\n//\t\t\tout = new PrintWriter(socket.getOutputStream(), true);\n//\t\t\tString message = \"GET \" + file_path + \" HTTP/1.1\\r\\n\";\n//\t\t\tfor (String header: headers.keySet())\n//\t\t\t{\n//\t\t\t\tString head = header + \": \" + headers.get(header) + \"\\r\\n\";\n//\t\t\t\tmessage = message + head;\n//\t\t\t}\n//\t\t\tout.println(message);\n//\n//\t\t\t//Creating ResponseParser object to parse the Response\n//\t\t\tp = new ResponseParser(socket);\n//\t\t\t\n//\t\t\t//If we didn't get any headers in the response, the URL was invalid\n//\t\t\tif (p.getHeaders().size() == 0)\n//\t\t\t{\n//\t\t\t\treturn (\"invalid url\");\n//\t\t\t}\n//\t\t\t//Otherwise return the contents of the returned document\n//\t\t\treturn p.getData();\n//\t\t} \n//\t\tcatch (UnknownHostException e) \n//\t\t{\n//\t\t\tSystem.err.println(\"Unknown Host Exception\");\n//\t\t\tSystem.err.println(\"Problem url is: http://www.youtube.com/motherboardtv?feature=watch&trk_source=motherboard\");\n//\t\t} \n//\t\tcatch (IOException | IllegalArgumentException e) \n//\t\t{\n//\t\t\tSystem.err.println(\"IO Exception\");;\n//\t\t}\n//\t\t//Return null for all caught exceptions (Servlet will deal with this)\n//\t\treturn null;\n\t}",
"public String parserXHtml(String html) {\r\n\t\torg.jsoup.nodes.Document document = Jsoup.parseBodyFragment(html);\r\n\t\tdocument.outputSettings().syntax(org.jsoup.nodes.Document.OutputSettings.Syntax.xml);\r\n\t\tdocument.outputSettings().charset(\"UTF-8\");\r\n\t\treturn document.toString();\r\n\t}",
"public String toString()\n {\n return getHtml();\n }",
"private static String HtmlToText(final String s) {\n final HTMLEditorKit kit = new HTMLEditorKit();\n final Document doc = kit.createDefaultDocument();\n try {\n kit.read(new StringReader(s), doc, 0);\n return doc.getText(0, doc.getLength()).trim();\n } catch (final IOException | BadLocationException ioe) {\n return s;\n }\n }",
"protected String parseAndSaveHtml() {\n\t\t// the line of the html code\n\t\tString inputLine;\n\n\t\t// creates the folder's name from the domain name\n\t\tString folderName = nameFolder();\n\t\tFile folderNameFile = new File(path + folderName);\n\n\t\t// checks if there is already a folder with the same name\n\t\tif (!existsFolder(folderNameFile)) {\n\t\t\tmakeFolder(folderNameFile);\n\t\t}\n\n\t\t// creates the file with a random unique name\n\t\tString fileName = generateFileName(folderName);\n\t\tFile file = new File(path + folderName + \"\\\\\" + fileName + \".txt\");\n\n\t\ttry {\n\t\t\t// streams which help to read from the url\n\t\t\tInputStreamReader is = new InputStreamReader(url.openStream(), \"UTF-8\");\n\t\t\tBufferedReader br = new BufferedReader(is);\n\t\t\tbr.mark(0);\n\n\t\t\t// streams which help to write from the url\n\t\t\tFileOutputStream fos = new FileOutputStream(file);\n\t\t\tOutputStreamWriter osw = new OutputStreamWriter(fos, \"UTF-8\");\n\t\t\tBufferedWriter bw = new BufferedWriter(osw);\n\n\t\t\t// reads line by line the html code\n\t\t\twhile ((inputLine = br.readLine()) != null) {\n\t\t\t\tbw.write(inputLine);\n\t\t\t\tbw.newLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tbw.close(); //closes the writer stream\n\n\t\t\treturn path + folderName + \"\\\\\" + fileName + \".txt\";\n\t\t} catch (IOException e) {\n\t\t\tfile.delete();\n\t\t\treturn null;\n\t\t}\n\n\t}",
"public void run() {\n String naverHtml = httpConnection(\"https://api.openweathermap.org/data/2.5/onecall?lat=\"+lat+\"&lon=\"+lon+\"&exclude=alerts&appid=e9e3ed325461bd506285bdb140285195&lang=kr&units=metric\");\n\n Bundle bun = new Bundle();\n bun.putString(\"HTML_DATA\", naverHtml);\n\n Message msg = handler.obtainMessage();\n msg.setData(bun);\n handler.sendMessage(msg);\n }",
"@GET\n\t@Produces(MediaType.TEXT_HTML)\n\tpublic String getHtml() {\n\t\treturn OpenstackNetProxyConstants.HTML_RESOURCE_MESSAGE_PORT;\n\t}",
"public HtmlPage(String h){\r\n\t\t//extract the hrefs:\r\n\t\tHREF.setHref(getHrefs(h));\r\n\t\t//extract the encoding:\r\n\t\t\r\n\t}",
"private String doHttpClientGet() {\n\t\t\r\n\t\tHttpGet httpGet=new HttpGet(url);\r\n\t\tHttpClient client=new DefaultHttpClient();\r\n\t\ttry {\r\n\t\t\tHttpResponse response=client.execute(httpGet);\r\n\t\t\tif(response.getStatusLine().getStatusCode()==HttpStatus.SC_OK){\r\n\t\t\t\tresult=EntityUtils.toString(response.getEntity());\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"content----->\"+result);\r\n\t\t} catch (ClientProtocolException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public void render(HtmlStringBuffer buffer);",
"public HtmlElement getOrCreateConvertedHtmlElement() {\n\t\tif (this.convertedHtmlElement == null) {\n\t\t\tthis.convertedHtmlElement = HtmlHtml.createUTF8Html();\n\t\t\tHtmlBody bodyAll = ((HtmlHtml)convertedHtmlElement).getOrCreateBody();\n\t\t\tfor (DocumentCache documentCache : documentCacheList) {\n\t\t\t\tLOG.debug(\"hack this later\");\n//\t\t\t\tHtmlElement element = documentCache.getOrCreateConvertedHtmlElement();\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn convertedHtmlElement;\n\t}",
"@Override\n\tpublic Html makeHtml(Map<String, String> attributes, Head headObj, Body bodyObj) {\n\t\treturn new Html( attributes, headObj, bodyObj );\n\t}",
"public interface HtmlEscaper {\n String escape(String string);\n}",
"String getResponse();",
"HtmlPackage getHtmlPackage();",
"public void sendHtmlEmail() throws EmailException, MalformedURLException,\n\t\t\tUnsupportedEncodingException, ParseException {\n\t\tITrustContributionServer trustContributionServer = new TrustContributionServer();\n\t\tHtmlEmail email = new HtmlEmail();\n\t\temail.setHostName(\"smtp.exmail.qq.com\");\n\n\t\t// TODO 收件人:资产管理中心全体员工;ifdept@bqjr.cn;\n\t\tString itemCode = \"v00003\";\n\t\tList<String> emailList = new ArrayList<>();\n\t\temailList = trustContributionServer.getEmailList(itemCode);\n\t\tif (emailList != null && emailList.size() != 0) {\n\t\t\tString[] toBeStored = emailList\n\t\t\t\t\t.toArray(new String[emailList.size()]);\n\t\t\temail.addTo(toBeStored);\n\t\t}\n\n\t\t// email.addTo(new String[]{\"zhiming.wu@bqjr.cn\",\"785685931@qq.com\"});\n\n\t\temail.setSmtpPort(465);\n\t\temail.setAuthenticator(new DefaultAuthenticator(\"zhiming.wu@bqjr.cn\",\n\t\t\t\t\"Wzm910712\"));\n\t\temail.setSSLOnConnect(true);\n\t\temail.setFrom(\"zhiming.wu@bqjr.cn\");\n\t\tDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tDate yestoday = getYestoday();\n\t\temail.setSubject(\"投融资部-每日中航百度报酬日报--\" + format.format(yestoday));\n\t\t/*\tString caption = new String((\"中航百度报酬日报--\").getBytes(\"GBK\"),\n\t\t\t\t\"ISO-8859-1\") + format.format(yestoday);\n\t\tString td1 = new String((\"昨日信托报酬\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td2 = new String((\"累计信托报酬\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td3 = new String((\"昨日保管费\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td4 = new String((\"累计保管费\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td5 = new String((\"昨日优先收益\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td6 = new String((\"累计优先收益\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td7 = new String((\"上月优先级本金\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td8 = new String((\"上月劣后级本金\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\n\t\tString td31 = new String((\"上月差额补足金额\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td32 = new String((\"上月保证金1\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td33 = new String((\"上月客户退货款\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td34 = new String((\"上月客户主动还款\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td35 = new String((\"M3+率\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td36 = new String((\"B3\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td37 = new String((\"M2+率\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td38 = new String((\"B2\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\n\t\t// TODO 查询出各个数据\n\t\tdouble custodianFee = 0;\n\t\tdouble priorityEarnings = 0;\n\t\tdouble trustremuneration = 0;\n\t\tMap<String, Object> map = new HashMap<>();\n\t\tmap = trustContributionServer.getDetailFromBenefitCheckDaily(partner);\n\t\tif (map != null) {\n\t\t\tcustodianFee = Double.parseDouble(map.get(\"CUSTODIANFEE\")\n\t\t\t\t\t.toString());\n\t\t\tpriorityEarnings = Double.parseDouble(map.get(\"PRIORITYEARNINGS\")\n\t\t\t\t\t.toString());\n\t\t\ttrustremuneration = Double.parseDouble(map.get(\"TRUSTREMUNERATION\")\n\t\t\t\t\t.toString());\n\t\t}\n\n\t\t// 累计信托报酬\n\t\tMap<String, Object> trustRemunerationMap = new HashMap<>();\n\t\tdouble sumOftrustRemuneration = 0;\n\t\ttrustRemunerationMap = trustContributionServer\n\t\t\t\t.getSumOfBenefitCheckDaily(partner);\n\t\tif (trustRemunerationMap != null) {\n\t\t\tsumOftrustRemuneration = Double.parseDouble(trustRemunerationMap\n\t\t\t\t\t.get(\"TRUSTREMUNERATION\").toString());\n\t\t}\n\n\t\t// 累计优先收益\n\t\tMap<String, Object> priorityEaringsMap = new HashMap<>();\n\t\tdouble sumOfpriorityEarings = 0;\n\t\tpriorityEaringsMap = trustContributionServer\n\t\t\t\t.getSumOfPriorityEarings(partner);\n\t\tif (priorityEaringsMap != null) {\n\t\t\tsumOfpriorityEarings = Double.parseDouble(priorityEaringsMap.get(\n\t\t\t\t\t\"PRIORITYEARINGS\").toString());\n\t\t}\n\n\t\t// 累计保管费\n\t\tMap<String, Object> custodianFeeMap = new HashMap<>();\n\t\tdouble sumOfcustodianFee = 0;\n\t\tcustodianFeeMap = trustContributionServer.getSumOfcustodianFee(partner);\n\t\tif (custodianFeeMap != null) {\n\t\t\tsumOfcustodianFee = Double.parseDouble(custodianFeeMap.get(\n\t\t\t\t\t\"CUSTODIANFEE\").toString());\n\t\t}\n\n\t\tMap<String, Object> benefitCheckMonthSummaryMap = new HashMap<>();\n\n\t\tdouble priorityPrincipal = 0;\n\t\t// 上月劣后级本金\n\t\tdouble inferiorPrincipal = 0;\n\t\t// 上月差额补足金额\n\t\tdouble differenceUpBalance = 0;\n\t\t// 上月保证金\n\t\tdouble serviceFee = 0;\n\t\t// 上月客户退货款\n\t\tdouble merchantsRetmoneyActual = 0;\n\t\t// 上月客户主动还款\n\t\tdouble customeDrivingRepayment = 0;\n\n\t\tbenefitCheckMonthSummaryMap = trustContributionServer\n\t\t\t\t.getdetailFromMonthSummary(partner);\n\t\tif (benefitCheckMonthSummaryMap != null) {\n\n\t\t\tpriorityPrincipal = Double.parseDouble(benefitCheckMonthSummaryMap\n\t\t\t\t\t.get(\"PRIORITYPRINCIPAL\").toString());\n\n\t\t\tinferiorPrincipal = Double.parseDouble(benefitCheckMonthSummaryMap\n\t\t\t\t\t.get(\"INFERIORPRINCIPAL\").toString());\n\n\t\t\tdifferenceUpBalance = Double\n\t\t\t\t\t.parseDouble(benefitCheckMonthSummaryMap.get(\n\t\t\t\t\t\t\t\"DIFFERENCEUPBALANCE\").toString());\n\n\t\t\tserviceFee = Double.parseDouble(benefitCheckMonthSummaryMap.get(\n\t\t\t\t\t\"SERVICEFEE\").toString());\n\n\t\t\tmerchantsRetmoneyActual = Double\n\t\t\t\t\t.parseDouble(benefitCheckMonthSummaryMap.get(\n\t\t\t\t\t\t\t\"MERCHANTSRETMONEYACTUAL\").toString());\n\n\t\t\tcustomeDrivingRepayment = Double\n\t\t\t\t\t.parseDouble(benefitCheckMonthSummaryMap.get(\n\t\t\t\t\t\t\t\"CUSTOMEDRIVINGREPAYMENT\").toString());\n\t\t}\n\n\t\t// B3=B2\n\t\tString partnerCode = \"\";\n\t\tif (partner.equalsIgnoreCase(\"众安\")) {\n\t\t\tpartnerCode = \"ZAYX\";\n\t\t}// 改为map为添加条件,做一下为null 时候的判断\n\t\t//partnerCode = \"HBYH\";// TODO delete when upload,and sql update\n\t\tMap<String, Object> resultB3Map = new HashMap<>();\n\n\t\tMap<String, Object> resultB2Map = new HashMap<>();\n\n\t\tdouble B3Part1 = 0;\n\t\tdouble B3Part2 = 0;\n\t\tresultB3Map = trustContributionServer\n\t\t\t\t.getB3Part1FromPayDaily(partnerCode);\n\n\t\tif (resultB3Map != null) {\n\t\t\tB3Part1 = Double.parseDouble((resultB3Map.get(\"PAYPRINCIPALAMT\")\n\t\t\t\t\t.toString()));\n\t\t}\n\t\tresultB2Map = trustContributionServer\n\t\t\t\t.getB3Part2FromPayDaily(partnerCode);\n\t\tif (resultB2Map != null) {\n\t\t\tB3Part2 = Double.parseDouble((resultB2Map.get(\"PAYPRINCIPALAMT\")\n\t\t\t\t\t.toString()));\n\t\t}\n\t\t\n\t\t * double B3Part1=\n\t\t * trustContributionServer.getB3Part1FromPayDaily(partnerCode);\n\t\t * \n\t\t * double B3Part2 =\n\t\t * trustContributionServer.getB3Part2FromPayDaily(partnerCode);\n\t\t \n\n\t\tBigDecimal d1 = new BigDecimal(String.valueOf(B3Part1));\n\n\t\tBigDecimal d2 = new BigDecimal(String.valueOf(B3Part2));\n\n\t\tdouble B3 = d1.add(d2).doubleValue();\n\n\t\t// A3\n\t\tint days = 90;\n\t\tMap<String, Object> A3Map = new HashMap<>();\n\t\tA3Map.put(\"partnerCode\", partnerCode);\n\t\tA3Map.put(\"days\", days);\n\n\t\tdouble fPayCapital = 0;\n\t\tdouble fUndueCapital = 0;\n\t\t// 获取大于 90 天的应付本金\n\t\tMap<String, Object> over90DaysCapitalMap1 = new HashMap<>();\n\t\tover90DaysCapitalMap1 = trustContributionServer\n\t\t\t\t.getOverDueDaysCapital1(A3Map);\n\t\tif (over90DaysCapitalMap1 != null) {\n\t\t\tfPayCapital = Double.parseDouble(over90DaysCapitalMap1.get(\n\t\t\t\t\t\"PAYPRINCIPALAMT\").toString());\n\t\t}\n\n\t\tMap<String, Object> over90DaysCapitalMap2 = new HashMap<>();\n\t\tover90DaysCapitalMap2 = trustContributionServer\n\t\t\t\t.getOverDueDaysCapital2(A3Map);\n\t\tif (over90DaysCapitalMap2 != null) {\n\t\t\tfUndueCapital = Double.parseDouble(over90DaysCapitalMap2.get(\n\t\t\t\t\t\"PAYPRINCIPALAMT\").toString());\n\t\t}\n\n\t\tBigDecimal d1Capital = new BigDecimal(String.valueOf(fPayCapital));\n\t\tBigDecimal d2Capital = new BigDecimal(String.valueOf(fUndueCapital));\n\t\tdouble allCapital = d1Capital.add(d2Capital).doubleValue();\n\n\t\tdouble A3 = 0;\n\t\t// 获取实付本金\n\t\tMap<String, Object> resultMap = new HashMap<>();\n\t\tresultMap = trustContributionServer.getA3Capital(A3Map);\n\t\tif (resultMap != null) {\n\t\t\tA3 = allCapital\n\t\t\t\t\t- Double.parseDouble((resultMap.get(\"PAYPRINCIPALAMT\")\n\t\t\t\t\t\t\t.toString()));\n\t\t}\n\n\t\tMap<String, Object> A2Map = new HashMap<>();\n\t\tdouble A2 = 0;\n\t\tA2Map.put(\"partnerCode\", partnerCode);\n\t\tint days2 = 60;\n\t\tA2Map.put(\"days\", days2);\n\n\t\t// 获取逾期60天以上的应付本金\n\t\tdouble fPayCapita1 = 0;\n\t\tdouble fUndueCapita1 = 0;\n\t\tMap<String, Object> over60DaysCapitalMap1 = new HashMap<>();\n\t\tover60DaysCapitalMap1 = trustContributionServer\n\t\t\t\t.getOverDueDaysCapital1(A2Map);\n\t\tif (over60DaysCapitalMap1 != null) {\n\t\t\tfPayCapita1 = Double.parseDouble(over60DaysCapitalMap1.get(\n\t\t\t\t\t\"PAYPRINCIPALAMT\").toString());\n\t\t}\n\n\t\tMap<String, Object> over60DaysCapitalMap2 = new HashMap<>();\n\t\tover60DaysCapitalMap2 = trustContributionServer\n\t\t\t\t.getOverDueDaysCapital2(A2Map);\n\t\tif (over60DaysCapitalMap2 != null) {\n\t\t\tfUndueCapita1 = Double.parseDouble(over60DaysCapitalMap2.get(\n\t\t\t\t\t\"PAYPRINCIPALAMT\").toString());\n\t\t}\n\n\t\tBigDecimal d1Capital1 = new BigDecimal(String.valueOf(fPayCapita1));\n\t\tBigDecimal d2Capital1 = new BigDecimal(String.valueOf(fUndueCapita1));\n\t\tdouble allCapital1 = d1Capital1.add(d2Capital1).doubleValue();\n\n\t\tMap<String, Object> resultMap2 = new HashMap<>();\n\t\tresultMap2 = trustContributionServer.getA3Capital(A2Map);\n\t\tif (resultMap2 != null) {\n\t\t\t// TODO\n\t\t\tA2 = allCapital1\n\t\t\t\t\t- Double.parseDouble((resultMap2.get(\"PAYPRINCIPALAMT\")\n\t\t\t\t\t\t\t.toString()));\n\t\t}\n\n\t\t// 获取格式化对象\n\t\tNumberFormat nt = NumberFormat.getPercentInstance();\n\t\t// 设置百分数精确度2即保留两位小数\n\t\tnt.setMinimumFractionDigits(2);\n\t\t// 最后格式化并输出\n\n\t\t// TODO\n\t\t\n\t\t * String M3= nt.format(A3/B3); String M2 = nt.format(A2/B3);\n\t\t \n\t\tString M3 = \"0.00%\";\n\t\tString M2 = \"0.00%\";\n\t\tif (B3 != 0) {\n\t\t\tM3 = nt.format(A3 / B3);\n\t\t\tM2 = nt.format(A2 / B3);\n\t\t}\n\t\t\n\n\t\tURL url = new URL(\"http://www.apache.org/images/asf_logo_wide.gif\");\n\t\t// String cid = email.embed(url, \"Apache logo\");\n\t\t\n\t\tString firstTable = \"<div>\"\n\t\t\t\t+ \"<table width=\\\"1150\\\" border=\\\"1\\\" cellspacing=\\\"0\\\">\"\n\t\t\t\t+ \"<caption>\"\n\t\t\t\t+ caption\n\t\t\t\t+ \"</caption>\"\n\t\t\t\t+ \"<tr style=\\\"background-color:#f47920\\\">\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ td1\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ td2\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ td3\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ td4\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ td5\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ td6\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ td7\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ td8\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"</tr>\"\n\t\t\t\t+ \"<tr>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ trustremuneration\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ sumOftrustRemuneration\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ custodianFee\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ sumOfcustodianFee\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ priorityEarnings\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\";*/\n\t\tStringBuilder a1RateBuilder = new StringBuilder();\n\t\ta1RateBuilder = this.getA1RateBuilder();\n\t\t\n\t\tStringBuilder a2RateBuilder = new StringBuilder();\n\t\ta2RateBuilder = this.getA2RateBuilder();\n\t\tString commonHead = \"<html>\" + \"<head>\" + \" </head>\" + \"<body>\";\n\t\tString htmlMsg = commonHead\n\t\t\t\t+ a1RateBuilder.toString()\n\t\t\t\t+\"</body>\" + \"</html>\";\n\t\temail.setHtmlMsg(htmlMsg);\n\t\temail.send();\n\t}",
"public static String HTMLText(String url) throws Exception\n\t{\n\t\tif (!isValidUrl(url))\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t\tString outs = \"\";\n\n\t\tStringBean sb = new StringBean();\n\t\tsb.setLinks(false);\n\t\tsb.setReplaceNonBreakingSpaces(true);\n\t\tsb.setCollapse(false);\n\t\tsb.setURL(url);\n\t\ttry\n\t\t{\n\t\t\touts = sb.getStrings();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t}\n\t\treturn outs;\n\t}",
"private static String getHTTPResponse(URL url){\n\t\t\n\t\tStringBuilder response = new StringBuilder();\n\t\t\n\t\ttry{\n\t\t\tURLConnection connection = url.openConnection();\n\t\t\tBufferedReader res = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n\t\t\tString responseLine;\n\t\t\t\n\t\t\twhile((responseLine = res.readLine()) != null)\n\t\t\t\tresponse.append(responseLine);\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e){System.out.println(\"Error - wrong input or service down\");}\n\t\t\n\t\treturn response.toString();\n\t}",
"public static Element parse(SafeHtml html) {\n Element e = DOM.createDiv();\n setInnerHTML(e, html);\n return DOM.getFirstChild(e);\n }",
"public static String getHTML() {\n if (create()) {\n return tag.getInnerHTML();\n }\n return \"\";\n }",
"String content();",
"public String ProcessHTMLPage(String url) {\n\t\tString htmlSource = null;\n\t\tSystem.out.println(\"processing ..\" + url);\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\ttry {\n\t\t\thtmlSource = getURLSource(url);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDocument document = Jsoup.parse(htmlSource);\n\n\t\torg.jsoup.select.Elements allElements = document.getAllElements();\n\t\tfor (Element element : allElements) {\n\t\t\tif (element.nodeName().matches(\n\t\t\t\t\t\"^.*(p|h1|h2|h3|h4|h5|h6|title|body|li|a|em|i|ins|big|bdo|b|blockquote|center|mark|small|string|sub|sup|tt|u).*$\")) {\n\t\t\t\tif (!element.ownText().isEmpty()) {\n\t\t\t\t\t// System.out.println(element.nodeName()\n\t\t\t\t\t// + \" \" + element.ownText());\n\t\t\t\t\tstringBuilder.append(element.ownText());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn stringBuilder.toString();\n\n\t}",
"public String html() {\n\t\treturn HtmlFunction.html(this);\n\t}",
"public abstract String getResponse();",
"void sendHtmlMail(String to, String subject, String content);",
"private String processHtmlDocumentFromBrowser(SessionState state, String strFromBrowser)\n\t{\n\t\tStringBuffer alertMsg = new StringBuffer();\n\t\tString text = FormattedText.processHtmlDocument(strFromBrowser, alertMsg);\n\t\tif (alertMsg.length() > 0) addAlert(state, alertMsg.toString());\n\t\treturn text;\n\t}",
"public String generatePageReportHtml(String result) {\n try {\n ContainerTag html = html(\n head(\n title(\"News Trends Stats\"),\n script().withSrc(\"https://code.jquery.com/jquery-3.2.1.slim.min.js\"),\n script().withSrc(\"https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js\"),\n script().withSrc(\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js\"),\n script().withSrc(\"https://code.highcharts.com/highcharts.js\"),\n script().withSrc(\"https://code.highcharts.com/modules/wordcloud.js\"),\n script().withType(\"text/javascript\").withSrc(\"news.js\"),\n link().withRel(\"stylesheet\").withHref(\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\"),\n link().withRel(\"stylesheet\").withHref(\"styles.css\")\n ),\n body(\n div(\n attrs(\".jumbotron\"),\n h1(\"News Trends Stats\").attr(\"class=\\\"center\\\"\")\n ),\n div(\n attrs(\".container\"),\n div(attrs(\"#result-alert-error.alert.alert-danger.hidden\"))\n .withText(\"There was a problem retrieving the data. You may have exceeded your developer account limit for the news API. Please limit the number of days and try again.\"),\n div(attrs(\"#wordMapData.hidden\")).withText(\"#dataToReplace\"),\n div(attrs(\"#wordMapContainer\")),\n div(\n attrs(\"#wordLists.row\"),\n div(attrs(\"#top20.col-md-6\")),\n div(attrs(\"#bottom20.col-md-6\"))\n )\n )\n )\n );\n\n return html.render().replace(\"#dataToReplace\", result);\n } catch (Exception e) {\n System.out.println(\"There was an exception while generating the html report: \" + e.getMessage());\n return html(body(h3(\"There was an exception while generating the html report: \" + e.getMessage()))).render();\n }\n }",
"private String getUrlContents(String theUrl) {\n StringBuilder content = new StringBuilder();\n try {\n URL url = new URL(theUrl);\n URLConnection urlConnection = url.openConnection();\n //reads the response\n BufferedReader br = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()), 8);\n String line;\n while ((line = br.readLine()) != null) {\n content.append(line + \"\\n\");\n }\n br.close();\n }catch (Exception e) {\n //error occured, usually network related\n e.printStackTrace();\n }\n return content.toString();\n }",
"private static WebDriver newHtmlUnitDiver() {\n\t\tcapabilities = new DesiredCapabilities().htmlUnit();\n\t\tcapabilities.setBrowserName(\"HtmlUnit\");\n\t\tsetCommonCapabilities();\n\n//\t\treturn new HtmlUnitDriver(capabilities);\n\t\treturn new HtmlUnitDriver(true);\n\t}",
"public void enableRawInlineHtml()\n {\n rawInlineHtmlEnabled = true;\n }",
"@Override\n public String build() {\n StringBuilder stringBuilder = new StringBuilder();\n\n // Builds the section headers.\n ArrayList<Header> headers = new ArrayList<Header>();\n headers.add(new Header(\"Content-Type\", m_ContentType.getTypeString()));\n headers.add(new Header(\"Content-Transfer-Encoding\", m_TransferEncoding.getKeyWord()));\n stringBuilder.append(Header.buildHeaders(headers)).append(\"\\r\\n\");\n\n // Encodes the body, and appends it\n switch (m_TransferEncoding) {\n case BASE64 -> stringBuilder.append(Base64.getEncoder().encodeToString(m_RawBody.getBytes()));\n case QUOTED_PRINTABLE -> stringBuilder.append(QuotedPrintable.encode(m_RawBody));\n }\n stringBuilder.append(\"\\r\\n\");\n\n // Returns the built body\n return stringBuilder.toString();\n }",
"public String getContent() {\n String s = page;\n\n // Bliki doesn't seem to properly handle inter-language links, so remove manually.\n s = LANG_LINKS.matcher(s).replaceAll(\" \");\n\n wikiModel.setUp();\n s = getTitle() + \"\\n\" + wikiModel.render(textConverter, s);\n wikiModel.tearDown();\n\n // The way the some entities are encoded, we have to unescape twice.\n s = StringEscapeUtils.unescapeHtml(StringEscapeUtils.unescapeHtml(s));\n\n s = REF.matcher(s).replaceAll(\" \");\n s = HTML_COMMENT.matcher(s).replaceAll(\" \");\n\n // Sometimes, URL bumps up against comments e.g., <!-- http://foo.com/-->\n // Therefore, we want to remove the comment first; otherwise the URL pattern might eat up\n // the comment terminator.\n s = URL.matcher(s).replaceAll(\" \");\n s = DOUBLE_CURLY.matcher(s).replaceAll(\" \");\n s = HTML_TAG.matcher(s).replaceAll(\" \");\n\n return s;\n }"
] |
[
"0.7068405",
"0.66495186",
"0.650615",
"0.6380286",
"0.635128",
"0.6348424",
"0.62575054",
"0.6058234",
"0.6014036",
"0.60092777",
"0.59635806",
"0.5909518",
"0.5866989",
"0.5851634",
"0.5826804",
"0.5817992",
"0.5745536",
"0.57155365",
"0.57146984",
"0.569443",
"0.56262493",
"0.555924",
"0.55467266",
"0.55422026",
"0.5503273",
"0.54811907",
"0.5443105",
"0.5436063",
"0.5417614",
"0.540304",
"0.53520685",
"0.5313231",
"0.5299928",
"0.5297456",
"0.52873826",
"0.5287301",
"0.5261116",
"0.5254657",
"0.5251995",
"0.52450174",
"0.5237752",
"0.52375865",
"0.5235341",
"0.5221013",
"0.519925",
"0.51992154",
"0.5197296",
"0.5197296",
"0.5192427",
"0.51859653",
"0.5179285",
"0.5174676",
"0.5169108",
"0.5168787",
"0.51605654",
"0.51556116",
"0.5150387",
"0.5150387",
"0.5150387",
"0.5150387",
"0.5143842",
"0.51430905",
"0.5128454",
"0.5123326",
"0.5108185",
"0.5104425",
"0.5104425",
"0.5098537",
"0.5090234",
"0.50893223",
"0.5075185",
"0.506481",
"0.50640655",
"0.5060933",
"0.505871",
"0.5058654",
"0.50566447",
"0.50486624",
"0.5046909",
"0.5032622",
"0.50316966",
"0.5019827",
"0.5018949",
"0.5016334",
"0.501596",
"0.5011043",
"0.4999768",
"0.49983433",
"0.49921563",
"0.49809876",
"0.49757257",
"0.4972123",
"0.49719134",
"0.49670094",
"0.4964299",
"0.49638534",
"0.4962108",
"0.49595234",
"0.49576685",
"0.49561316"
] |
0.7117852
|
0
|
Job has exceeded retry attempts or shouldReRunOnThrowable() has decided to cancel.
|
@Override
protected void onCancel(@CancelReason int cancelReason, @Nullable Throwable throwable) {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n protected RetryConstraint shouldReRunOnThrowable(@NonNull Throwable throwable, int runCount, int maxRunCount) {\n return RetryConstraint.CANCEL;\n }",
"@Override\n\t\tpublic boolean isRetry() { return false; }",
"@Override\r\n\tpublic void jobFailed(Job failedJob, Job retry) {\n\t\tgetCloudsim().log(\"WARNING: Job failed: \" + failedJob.getID());\r\n\t}",
"void cancel()\n {\n cancelled = true;\n subjobComplete = true;\n result = null;\n }",
"@Override\n\t\tpublic boolean isRetry() { return true; }",
"@Test(timeout=10000)\n public void testCancelJob() throws Exception {\n CommonClientTests.testCancelJob(client);\n }",
"@Test\n public void testLongBackoffTime() throws Exception {\n runJob(3, 2, 5, false);\n\n // Fail 3 times with a 3 second backoff factor. Wait 10 seconds. Should fail\n // because 3 + 9 = 12 > 10\n try {\n runJob(3, 3, 10, false);\n Assert.fail(\"Excepted exception\");\n } catch (AssertionError e) {\n // expected;\n }\n\n // Fail 3 times with a 3 second backoff factor. Wait 15 seconds. Should\n // succeed\n // because 3 + 9 = 12 < 15\n runJob(3, 3, 15, false);\n }",
"public boolean shouldRetryOnTimeout() {\r\n return configuration.shouldRetryOnTimeout();\r\n }",
"private void retry() {\n if (catalog == null) {\n if (--retries < 0) {\n inactive = true;\n pendingRequests.clear();\n log.error(\"Maximum retries exceeded while attempting to load catalog for endpoint \" + discoveryEndpoint\n + \".\\nThis service will be unavailabe.\");\n } else {\n try {\n sleep(RETRY_INTERVAL * 1000);\n _loadCatalog();\n } catch (InterruptedException e) {\n log.warn(\"Thread for loading CDS Hooks catalog for \" + discoveryEndpoint + \"has been interrupted\"\n + \".\\nThis service will be unavailable.\");\n }\n }\n }\n }",
"@Override\n\tpublic boolean onJobError(ApiJob job) {\n\t\treturn false;\n\t}",
"public void tryTerminate() {\n if (wip.decrementAndGet() != 0) {\n return;\n }\n if (queue.isEmpty()) {\n completableSubscriber.onCompleted();\n } else {\n completableSubscriber.onError(CompletableOnSubscribeMerge.collectErrors(queue));\n }\n }",
"@Override\n public void timeout(CellPath path) {\n retry(task, SMALL_DELAY);\n }",
"@Override\n public void timeout(CellPath path)\n {\n retry(task, SMALL_DELAY);\n }",
"void doRetry();",
"public synchronized void cancel() {\n this.executionState = JobExecutionState.CANCELLED;\n this.finished = Instant.now();\n }",
"boolean allowRetry(int retry, long startTimeOfExecution);",
"@Override\n public boolean onStopJob(com.firebase.jobdispatcher.JobParameters job) {\n // If mBackgroundTask is valid, cancel it\n //Return true to signify the job should be retried\n if (mBackgroundTask != null) mBackgroundTask.cancel(true);\n return true;\n }",
"public abstract long retryAfter();",
"protected boolean reallyCancel() throws Exception { return true; }",
"@Test\n public void testInterruption_StartingRunStopped_eventually()\n throws DefensicsRequestException, IOException, InterruptedException {\n final FuzzJobRunner fuzzJobRunner = createFuzzJobRunnerWithMockServices();\n setupMocks();\n\n final AtomicReference<RunState> runState = new AtomicReference<>(RunState.STARTING);\n\n when(suiteInstance.getState()).thenAnswer(invocation -> runState.get());\n\n // Make run state changes happen during stopRun calls.\n doAnswer(invocation -> {\n if (runState.get().equals(RunState.STARTING)) {\n // Starting run gets 409, but let's move run state internally to running.\n // NOTE: These nested exceptions are bit cumbersome here.\n runState.set(RunState.RUNNING);\n throw new DefensicsRequestException(\n \"Plugin exception\",\n new DefensicsClientException(\"409 Conflict API client exception\")\n );\n }\n\n // Second stop for RUNNING run should succeed\n if (runState.get().equals(RunState.RUNNING)) {\n runState.set(RunState.COMPLETED);\n }\n return null;\n }).when(apiService).stopRun(RUN_ID);\n\n // Cause job interrupt in 5th poll\n final AtomicInteger counter = new AtomicInteger();\n when(defensicsRun.getState()).thenAnswer((Answer<?>) invocation -> {\n if (counter.incrementAndGet() == 5) {\n throw new InterruptedException(\"Job interrupted\");\n }\n return runState.get();\n });\n\n Assert.assertThrows(\n AbortException.class,\n () -> fuzzJobRunner.run(\n jenkinsRun,\n workspace,\n launcher,\n logger,\n testplan,\n \"\",\n instanceConfiguration,\n saveResultPackage\n )\n );\n\n // STARTING state gets 409, RUNNING state gets 200\n verify(apiService, times(2)).stopRun(RUN_ID);\n verify(jenkinsRun).setResult(Result.ABORTED);\n }",
"public void testRetry() throws Exception {\n\n reportFilesProvider.createTestCrashFile();\n\n boolean didCatchException = false;\n\n try {\n // expected to timeout because the send can't complete, so set a very small timeout\n // and interval\n final long timeout = 500L;\n final long interval = 10L;\n\n uploadAndWait(timeout, interval);\n } catch (TimeoutException ex) {\n didCatchException = true;\n }\n assertTrue(didCatchException);\n // Should still be running:\n assertTrue(reportUploader.isUploading());\n assertFalse(reportManager.findReports().isEmpty());\n\n verifyZeroInteractions(mockCall);\n }",
"public void onTryFails(int currentRetryCount, Exception e) {}",
"@Override\r\n public void abortJob(JobContext context, int runState) \r\n throws IOException {\n cleanupJob(context);\r\n }",
"protected short maxRetries() { return 15; }",
"public boolean abortOnFristJobFailure() {\n return mFailOnFirstError;\n }",
"@Override\n protected void checkCanceled() {\n long l = System.currentTimeMillis();\n if (l >= myTime) {\n throw new ProcessCanceledException();\n }\n }",
"private static void testFail() throws Throwable {\n Scheduler userInt = SchedulerTHelper.getSchedulerInterface();\n\n for (int i = 0; i < jobs_fail; i++) {\n String job_path = new File(jobs_path.toURI()).getAbsolutePath() + \"/flow_fail_\" + (i + 1) +\n \".xml\";\n\n Exception exc = null;\n JobId job = null;\n try {\n job = userInt.submit(JobFactory.getFactory().createJob(job_path));\n } catch (Exception e) {\n exc = e;\n }\n Assert\n .assertTrue(\"Job \" + job_path + \" was supposed to be rejected but was created\",\n job == null);\n Assert.assertTrue(exc != null);\n }\n SchedulerTHelper.log(jobs_fail + \" invalid jobs successfully rejected\");\n }",
"public boolean retry() {\n return tries++ < MAX_TRY;\n }",
"private void cancelLaunchClientJob() {\n if (launchClientJob != null) {\n return;\n }\n\n launchClientJob = findLaunchClientJob();\n\n if (launchClientJob != null) {\n launchClientJob.cancel();\n }\n }",
"public static void cancelRefreshJob() {\n\t\ttry {\n\t\t\tScheduler sched = StdSchedulerFactory.getDefaultScheduler();\n\t\t\tSet<JobKey> jobKeys = sched.getJobKeys(jobGroupEquals(SCHEDULER_GROUP));\n\t\t\tif (jobKeys.size() > 0) {\n\t\t\t\tsched.deleteJobs(new ArrayList<JobKey>(jobKeys));\n\t\t\t\tlogger.debug(\"Found {} refresh jobs to delete from DefaulScheduler (keys={})\", jobKeys.size(), jobKeys);\n\t\t\t}\n\t\t} catch (SchedulerException e) {\n\t\t\tlogger.warn(\"Could not remove refresh job: {}\", e.getMessage());\n\t\t}\t\t\n\t}",
"@Override\n public void failure(int rc, Object error)\n {\n task.setReadPoolSelectionContext(getReply().getContext());\n switch (rc) {\n case CacheException.OUT_OF_DATE:\n /* Pool manager asked for a\n * refresh of the request.\n * Retry right away.\n */\n retry(task, 0);\n break;\n case CacheException.FILE_NOT_IN_REPOSITORY:\n case CacheException.PERMISSION_DENIED:\n fail(task, rc, error.toString());\n break;\n default:\n /* Ideally we would delegate the retry to the door,\n * but for the time being the retry is dealed with\n * by pin manager.\n */\n retry(task, RETRY_DELAY);\n break;\n }\n }",
"@Override\n public boolean continuePastError() {\n return false;\n }",
"default boolean pollOnExecutionFailed() {\n return false;\n }",
"public void mo42333a(Throwable th) {\n this.f36204P.cancel();\n this.f36205a.onError(th);\n }",
"@Test\n @MediumTest\n @DisabledTest(message = \"crbug.com/1182234\")\n @Feature({\"Payments\"})\n public void testRetryWithCustomError() throws TimeoutException {\n mPaymentRequestTestRule.triggerUIAndWait(\"buy\", mPaymentRequestTestRule.getReadyForInput());\n mPaymentRequestTestRule.clickAndWait(\n R.id.button_primary, mPaymentRequestTestRule.getReadyForUnmaskInput());\n mPaymentRequestTestRule.setTextInCardUnmaskDialogAndWait(\n R.id.card_unmask_input, \"123\", mPaymentRequestTestRule.getReadyToUnmask());\n mPaymentRequestTestRule.clickCardUnmaskButtonAndWait(\n ModalDialogProperties.ButtonType.POSITIVE,\n mPaymentRequestTestRule.getPaymentResponseReady());\n\n mPaymentRequestTestRule.retryPaymentRequest(\"{\"\n + \" error: 'ERROR'\"\n + \"}\",\n mPaymentRequestTestRule.getReadyToPay());\n\n Assert.assertEquals(\"ERROR\", mPaymentRequestTestRule.getRetryErrorMessage());\n }",
"@Override\r\n public void onRetry(int retryNo) {\n }",
"public void cancel() {\n\t\tassertRunningInJobMasterMainThread();\n\t\twhile (true) {\n\n\t\t\tExecutionState current = this.state;\n\n\t\t\tif (current == CANCELING || current == CANCELED) {\n\t\t\t\t// already taken care of, no need to cancel again\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// these two are the common cases where we need to send a cancel call\n\t\t\telse if (current == RUNNING || current == DEPLOYING) {\n\t\t\t\t// try to transition to canceling, if successful, send the cancel call\n\t\t\t\tif (startCancelling(NUM_CANCEL_CALL_TRIES)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// else: fall through the loop\n\t\t\t}\n\n\t\t\telse if (current == FINISHED) {\n\t\t\t\t// finished before it could be cancelled.\n\t\t\t\t// in any case, the task is removed from the TaskManager already\n\n\t\t\t\t// a pipelined partition whose consumer has never been deployed could still be buffered on the TM\n\t\t\t\t// release it here since pipelined partitions for FINISHED executions aren't handled elsewhere\n\t\t\t\t// covers the following cases:\n\t\t\t\t// \t\ta) restarts of this vertex\n\t\t\t\t// \t\tb) a global failure (which may result in a FAILED job state)\n\t\t\t\tsendReleaseIntermediateResultPartitionsRpcCall();\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (current == FAILED) {\n\t\t\t\t// failed before it could be cancelled.\n\t\t\t\t// in any case, the task is removed from the TaskManager already\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (current == CREATED || current == SCHEDULED) {\n\t\t\t\t// from here, we can directly switch to cancelled, because no task has been deployed\n\t\t\t\tif (cancelAtomically()) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// else: fall through the loop\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new IllegalStateException(current.name());\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void onRetry(int retryNo) {\n }",
"private static OptimisticLockingException callFailedJobListenerWithRetries(CommandExecutor commandExecutor, FailedJobListener failedJobListener) {\n try {\n commandExecutor.execute(failedJobListener);\n return null;\n } catch (OptimisticLockingException ex) {\n failedJobListener.incrementCountRetries();\n if (failedJobListener.getRetriesLeft() > 0) {\n return callFailedJobListenerWithRetries(commandExecutor, failedJobListener);\n }\n return ex;\n }\n }",
"@Override\n\tpublic boolean retry(ITestResult result) \n\t{\n\t\treturn false;\n\t}",
"@Override\n protected void onFailure(Throwable e) {\n // terminate thread\n terminate(false);\n }",
"public boolean isRetry();",
"public boolean canRunMoreExecutions(JobValidationReference job, boolean retry, long prevId);",
"@Override\n public void exceptionWhileExecutingJob(String jobId, Throwable exception) {\n LOG.exceptionWhileExecutingJob(jobId, exception);\n }",
"@Override\n public void reportJobTaskRetry(final String jobTaskId, final String retryDetails) throws JobReportingException\n {\n LOG.trace(\"Received retry report message for task {}; taking no action\", jobTaskId);\n }",
"private void cancelHeavyLifting()\n {\n }",
"@Override\r\n public void onRetry(int retryNo) {\n }",
"private void setupTimeoutJob() {\n eventLoopGroup.scheduleAtFixedRate(() -> {\n\n /*\n * We cannot wait for the request infinitely, but we also cannot remove the object\n * from the queue - FIXME in case of situation when queue of waiting objects grow to X we have to\n * brake connection.\n */\n\n Iterator<RedisQueryRequest> iterator = queue.iterator();\n int i = 0;\n long timeNow = System.currentTimeMillis();\n /*\n * we are tracking 'i' because we want to do only some work, not all the work.\n * we cannot take too much time in timeout checking.\n */\n\n while (iterator.hasNext() && i < 100) {\n RedisQueryRequest current = iterator.next();\n if (current.isTimeouted()) {\n //already been here.\n continue;\n }\n long whenRequestStarted = current.getRequestTimeStart();\n long requestTimeUntilNow = timeNow - whenRequestStarted;\n if (requestTimeUntilNow >= 1000) {\n LOG.error(\"Timeouted request detected\");\n current.markTimeouted();\n current.getCompletableFuture().completeExceptionally(new TimeoutException(\"Timeout occurred.\"));\n }\n\n i++;\n }\n\n }, 100, 100, TimeUnit.MILLISECONDS);\n }",
"java.util.concurrent.Future<CancelJobRunResult> cancelJobRunAsync(CancelJobRunRequest cancelJobRunRequest);",
"public abstract void cancel(float timeoutInSeconds)\n throws NotImplementedException, IncorrectStateException,\n TimeoutException, NoSuccessException;",
"public int retry() {\r\n\t\treturn ++retryCount;\r\n\t}",
"@Override\n public void cancel() {\n }",
"@Override\r\n public void onRetry(int retryNo) {\n }",
"@Override\r\n public void onRetry(int retryNo) {\n }",
"@Override\r\n public void onRetry(int retryNo) {\n }",
"@Test\n public void testBlobForJobFetchRetries() throws IOException {\n testBlobFetchRetries(new VoidBlobStore(), new JobID(), TRANSIENT_BLOB);\n }",
"private void doCancelJobTooFewResources\n\t\t(long now,\n\t\t JobInfo jobinfo)\n\t\tthrows IOException\n\t\t{\n\t\tString errmsg;\n\t\tif (jobinfo.Nt == 0)\n\t\t\t{\n\t\t\terrmsg =\n\t\t\t\t\"Too few resources available to assign \" +\n\t\t\t\tjobinfo.Nn + \" node\" + (jobinfo.Nn==1?\"\":\"s\") + \" and \" +\n\t\t\t\tjobinfo.Np + \" process\" + (jobinfo.Np==1?\"\":\"es\");\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\terrmsg =\n\t\t\t\t\"Too few resources available to assign \" +\n\t\t\t\tjobinfo.Nn + \" node\" + (jobinfo.Nn==1?\"\":\"s\") + \", \" +\n\t\t\t\tjobinfo.Np + \" process\" + (jobinfo.Np==1?\"\":\"es\") + \", and \" +\n\t\t\t\tjobinfo.Nt + \" CPU\" + (jobinfo.Nt==1?\"\":\"s\") + \" per process\";\n\t\t\t}\n\t\tjobinfo.frontend.cancelJob (this, errmsg);\n\t\tdoCancelJob (now, jobinfo, errmsg);\n\t\t}",
"@Override public final boolean onExceptionalCompletion(Throwable ex, CountedCompleter caller ) {\n if( _nleft != null ) _nleft.cancel(true); _nleft = null;\n if( _nrite != null ) _nrite.cancel(true); _nrite = null;\n _left = null;\n _rite = null;\n return super.onExceptionalCompletion(ex, caller);\n }",
"@SuppressLint({\"MissingPermission\"})\n public void performRetry(BitmapHunter bitmapHunter) {\n if (!bitmapHunter.isCancelled()) {\n boolean z = false;\n if (this.service.isShutdown()) {\n performError(bitmapHunter, false);\n return;\n }\n NetworkInfo networkInfo = null;\n if (this.scansNetworkChanges) {\n networkInfo = ((ConnectivityManager) Utils.getService(this.context, \"connectivity\")).getActiveNetworkInfo();\n }\n if (bitmapHunter.shouldRetry(this.airplaneMode, networkInfo)) {\n if (bitmapHunter.getPicasso().loggingEnabled) {\n Utils.log(DISPATCHER_THREAD_NAME, \"retrying\", Utils.getLogIdsForHunter(bitmapHunter));\n }\n if (bitmapHunter.getException() instanceof NetworkRequestHandler.ContentLengthException) {\n bitmapHunter.networkPolicy |= NetworkPolicy.NO_CACHE.index;\n }\n bitmapHunter.future = this.service.submit(bitmapHunter);\n return;\n }\n if (this.scansNetworkChanges && bitmapHunter.supportsReplay()) {\n z = true;\n }\n performError(bitmapHunter, z);\n if (z) {\n markForReplay(bitmapHunter);\n }\n }\n }",
"@Override\n\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"public native void setDefaultRetryTimeout (long retryTimeout) throws IOException,IllegalArgumentException;",
"protected int retryLimit() {\n return DEFAULT_RETRIES;\n }",
"@Override\n public boolean cancel(boolean mayInterruptIfRunning) {\n callable.kill();\n\n return super.cancel(mayInterruptIfRunning);\n }",
"private void rethrowIfFailed()\r\n/* 198: */ {\r\n/* 199:232 */ Throwable cause = cause();\r\n/* 200:233 */ if (cause == null) {\r\n/* 201:234 */ return;\r\n/* 202: */ }\r\n/* 203:237 */ PlatformDependent.throwException(cause);\r\n/* 204: */ }",
"void reportJobTaskRetry(final String jobTaskId, final String retryDetails) throws JobReportingException;",
"@Override\r\n\tpublic void handleFireException(Actor a, ProcessingException e) throws IllegalActionException {\n\t\tif(!ExceptionUtil.isSeverityFatal(e.getSeverity())){\r\n\t\t\tif(nbRetry < totalnbRetry){\r\n\t\t\t\tExecutionTracerService.trace(a, e.getMessage());\r\n\t\t\t\tExecutionTracerService.trace(a, \"!!!ERROR occured - Retrying step!!!\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep((long)(pausingTime*1000));\r\n\t\t\t\t} catch (InterruptedException e1) {\r\n\t\t\t\t\t// not important\r\n\t\t\t\t}\r\n\t\t\t\tnbRetry ++;\r\n\t\t\t\t //((Director) getContainer()).reportError(e);\r\n\t\t\t\ta.fire();\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tExecutionTracerService.trace(a, \"!!!All retries failed!!!\");\r\n\t\t\t\tnbRetry = 0;\r\n\t\t\t\t//CompositeActor model = (CompositeActor) ((Director) getContainer()).getContainer();\r\n\t\t\t\t//model.getManager().waitForCompletion();\r\n\t\t\t\t//model.getManager().stop();\r\n\t\t\t\tsuper.handleFireException(a, e);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tsuper.handleFireException(a, e);\r\n\t\t}\r\n\t}",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public boolean onStopJob(JobParameters jobParameters) {\n Log.d(TAG, \"Job cancelled before being completed.\");\n jobCancelled = true;\n boolean needsReschedule = isWorking;\n jobFinished(jobParameters, needsReschedule);\n return needsReschedule;\n }",
"public boolean cancel(boolean mayInterruptIfRunning)\r\n/* 351: */ {\r\n/* 352:433 */ Object result = this.result;\r\n/* 353:434 */ if ((isDone0(result)) || (result == UNCANCELLABLE)) {\r\n/* 354:435 */ return false;\r\n/* 355: */ }\r\n/* 356:438 */ synchronized (this)\r\n/* 357: */ {\r\n/* 358:440 */ result = this.result;\r\n/* 359:441 */ if ((isDone0(result)) || (result == UNCANCELLABLE)) {\r\n/* 360:442 */ return false;\r\n/* 361: */ }\r\n/* 362:445 */ this.result = CANCELLATION_CAUSE_HOLDER;\r\n/* 363:446 */ if (hasWaiters()) {\r\n/* 364:447 */ notifyAll();\r\n/* 365: */ }\r\n/* 366: */ }\r\n/* 367:451 */ notifyListeners();\r\n/* 368:452 */ return true;\r\n/* 369: */ }",
"boolean cancelJob(String jobId) throws Exception;",
"private void failWithException(final CronetException exception) {\n postTaskToExecutor(new Runnable() {\n @Override\n public void run() {\n failWithExceptionOnExecutor(exception);\n }\n });\n }",
"void cancelTimeout() {\n timeoutCancelled = true;\n if (timeout != null) {\n timeout.cancel();\n }\n }",
"public void cancel(){\r\n\t\t\r\n\t\ttry{\t\t\t\r\n\t\t\t// Stop the runnable job\r\n\t\t\trunning = false;\r\n\t\t\tjoin(1000);\r\n\t\t\t\r\n\t\t\t// Close socket\r\n\t\t\toSocket.close();\r\n\t\t\t\r\n\t\t}catch(InterruptedException e1){\r\n\t\t\tLog.e(TAG, \"terminating tread failed\", e1);\r\n\t\t}catch (IOException e2) {\r\n\t\t\tLog.e(TAG, \"cancel(), closing socket failed\", e2);\r\n\t\t}\t\r\n\t}",
"private synchronized void jobTimeout\n\t\t(Timer theTimer,\n\t\t JobFrontendRef theJobFrontend)\n\t\tthrows IOException\n\t\t{\n\t\tif (theTimer.isTriggered())\n\t\t\t{\n\t\t\tJobInfo jobinfo = getJobInfo (theJobFrontend);\n\t\t\tString errmsg =\n\t\t\t\t\"Maximum job time (\" + myJobTime + \" seconds) exceeded\";\n\t\t\tjobinfo.frontend.cancelJob (this, errmsg);\n\t\t\tdoCancelJob (System.currentTimeMillis(), jobinfo, errmsg);\n\t\t\t}\n\t\t}",
"@Override\n\t\tpublic boolean wasRetried()\n\t\t{\n\t\t\treturn false;\n\t\t}",
"private void vetoedCancelled(VetoedTriggerKey vetoedkey) {\n\t\tlogger.info(\"cancelled wainting job:\" + vetoedkey.getKey().toString() + \"\");\n\t\tJobReceiverImpl receiver = (JobReceiverImpl) jobFacade.getJobReceiver(vetoedkey.getKey().getName());\n\t\treceiver.putEvent(vetoedkey.getKey().getName(), TRIGGEREVENT.MISFIRED, new Date());\n\t\tint ilast = receiver.resultCount() - 1;\n\t\tif (ilast >= 0) {\n\t\t\tJobResultImpl result = (JobResultImpl) receiver.getJobResult(ilast);\n\t\t\tresult.setWaitexpiredAt(new Date());\n\t\t}\n\t}",
"public void onFailure(Throwable caught) {\n if (attempt > 20) {\n fail();\n }\n \n int token = getToken();\n log(\"onFailure: attempt = \" + attempt + \", token = \" + token\n + \", caught = \" + caught);\n new Timer() {\n @Override\n public void run() {\n runAsync1(attempt + 1);\n }\n }.schedule(100);\n }",
"@Override\n public void cancel() {\n }",
"protected void abortScheduledTasks() {\r\n\r\n\t\tfor (ParallelTask<?> task : scheduledSubtasks) {\r\n\t\t\ttask.cancel();\r\n\t\t}\r\n\r\n\t\tscheduledSubtasks.clear();\r\n\t}",
"public void connectCallAppAbilityFail() {\n if (needTryAgain()) {\n HiLog.error(LOG_LABEL, \"connectCallAppAbilityFail: retry.\", new Object[0]);\n if (this.mHandler == null) {\n this.mHandler = createHandler();\n }\n if (this.mHandler != null) {\n try {\n this.mHandler.sendEvent(InnerEvent.get(1000, 0, null), DELAYED_TIME_RETRY_CONNECT_INCALL_ABILITY, EventHandler.Priority.IMMEDIATE);\n } catch (IllegalArgumentException unused) {\n HiLog.error(LOG_LABEL, \"connectCallAppAbilityFail: got IllegalArgumentException.\", new Object[0]);\n }\n }\n } else {\n HiLog.error(LOG_LABEL, \"connectCallAppAbilityFail: reached max retry counts.\", new Object[0]);\n disconnectLiveCalls();\n this.mRetryConnectCallAppAbilityCount = 0;\n releaseResource();\n }\n }",
"protected void abortJobQuietly(JobData jobData) {\n abortJobQuietly(jobData.committer, jobData.jContext, jobData.tContext);\n }",
"public void retrySending()\n {\n try\n {\n EmailConfig emailConfig = getEmailConfig();\n int maxRetries = emailConfig.getMaxRetries().intValue();\n boolean saveFailedMails = emailConfig.getSaveFailedEmails();\n List messageFileList = getMessagesInFolder(IEmailConfiguration.EMAIL_RETRY_PATH);\n \n if (maxRetries > 0 && messageFileList.size()>0)\n {\n Session session = getMailSession(true);\n for (Iterator i = messageFileList.iterator(); i.hasNext();)\n {\n resendMail(session, (File)i.next(), maxRetries, saveFailedMails);\n }\n }\n }\n catch (Throwable th)\n {\n AlertLogger.warnLog(CLASSNAME,\"retrySending\",\"Error in retrySending\",th);\n }\n }",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void cancel() {\n\n }",
"public void checkCancel() throws CancellationException;",
"@objid (\"26d79ec6-186f-11e2-bc4e-002564c97630\")\n @Override\n public void performCancel() {\n }",
"@Override\n public void cancel() {\n\n }",
"public _cls_cs_retries0() {\r\n}",
"@Override\n public void onRetry ( int retryNo){\n }",
"@Override\n public void onRetry ( int retryNo){\n }",
"@Override\n public void onRetry ( int retryNo){\n }",
"public void retryRequired(){\n startFetching(query);\n }"
] |
[
"0.71963245",
"0.619233",
"0.6156959",
"0.6151319",
"0.6130715",
"0.59979653",
"0.5971644",
"0.5964502",
"0.5935099",
"0.59236825",
"0.5912186",
"0.5910525",
"0.59075147",
"0.58630323",
"0.5861215",
"0.579296",
"0.57815725",
"0.5781075",
"0.574415",
"0.57114047",
"0.5694849",
"0.56710887",
"0.5656628",
"0.561046",
"0.55619305",
"0.555391",
"0.5519302",
"0.55119926",
"0.5504796",
"0.5496979",
"0.5495863",
"0.5490902",
"0.5487932",
"0.54875225",
"0.5478999",
"0.5478672",
"0.5477333",
"0.54772097",
"0.5459429",
"0.54584754",
"0.5453477",
"0.5450027",
"0.54490036",
"0.5445805",
"0.5433717",
"0.5432428",
"0.54201996",
"0.54042435",
"0.53985447",
"0.5365458",
"0.53632516",
"0.5351437",
"0.53394324",
"0.53394324",
"0.53394324",
"0.53349483",
"0.53284997",
"0.5325905",
"0.53219837",
"0.5319495",
"0.5308969",
"0.5302463",
"0.5298967",
"0.52960086",
"0.5289233",
"0.5282227",
"0.52785146",
"0.52785146",
"0.52785146",
"0.52785146",
"0.52785146",
"0.52785146",
"0.52785146",
"0.52785146",
"0.52785146",
"0.5276257",
"0.5270467",
"0.52610785",
"0.52606785",
"0.5252968",
"0.5248112",
"0.5245154",
"0.5241621",
"0.52389646",
"0.52281606",
"0.5227733",
"0.52243567",
"0.5222359",
"0.5220208",
"0.52200073",
"0.52195245",
"0.52195245",
"0.52195245",
"0.5214911",
"0.52128845",
"0.5207415",
"0.52037865",
"0.5200721",
"0.5200721",
"0.5200721",
"0.519948"
] |
0.0
|
-1
|
make the abstract methods
|
@Override
public String getName()
{
if (amount > 1)
{
return amount + " Nickles";
}
else
{
return amount + " Nickle";
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"abstract void method();",
"@Override\n\tvoid methodabstract() {\n\t\t\n\t}",
"@Override\n\tvoid methodAbstractAndSubclassIsAbstract() {\n\t\t\n\t}",
"public void setupAbstract() {\n \r\n }",
"public abstract void afvuren();",
"@Override\n public void matiz() {\n System.out.println(\"New not Abstract method\");\n }",
"public abstract void abstractMethodToImplement();",
"public abstract void abstractone();",
"public abstract void mo102899a();",
"private abstract void privateabstract();",
"public abstract void mo4359a();",
"public abstract void mh();",
"public abstract void mo30696a();",
"public abstract void mo957b();",
"public abstract void mo70713b();",
"public abstract void alimentarse();",
"@Override\n\tpublic void anular() {\n\n\t}",
"public abstract void mo27386d();",
"public interface AbstractC14990nD {\n void ACi(View view);\n\n void ACk(View view);\n\n void ACo(View view);\n}",
"public abstract void mo35054b();",
"public abstract void mo2150a();",
"public interface AbstractC7617o0oOO {\n void OooO00o(View view);\n\n void OooO0O0(View view);\n\n void OooO0OO(View view);\n}",
"public abstract void mo27464a();",
"public abstract void mo3994a();",
"public abstract void mo56925d();",
"abstract int pregnancy();",
"public AbstractGenerateurAbstractSeule() {\r\n\t\tsuper();\r\n\t}",
"public abstract void operation();",
"public interface AbstractC7729o0ooOoo {\n void OooO00o();\n}",
"public abstract void mo42330e();",
"public abstract void method1();",
"public abstract void mo45765b();",
"abstract void sub();",
"public abstract void mo27385c();",
"public abstract void mo42331g();",
"protected abstract void work();",
"public boolean isAbstract()\n/* */ {\n/* 146 */ return false;\n/* */ }",
"public abstract Object mo26777y();",
"@Override\r\n\tprotected void abstractMethod() {\n\t\tSystem.out.println(\"I'm from the abstract method\");\r\n\t}",
"public interface AbstractC0273Ek {\n void e();\n}",
"abstract protected Set<Method> createMethods();",
"public interface AbstractC00591m {\n void A9X(C0495Jm jm);\n\n void AAI(List<RG> list);\n}",
"public abstract void mo42329d();",
"public abstract void comes();",
"public abstract String a();",
"abstract void geometryMethod();",
"abstract void fly();",
"@Override\n protected void prot() {\n }",
"public abstract void create();",
"public abstract Object mo1771a();",
"public abstract void Do();",
"abstract void m1();",
"abstract void uminus();",
"abstract void classRooms();",
"public abstract void m15813a();",
"abstract public T doSomething();",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"public abstract void action();",
"public abstract void action();",
"public abstract void action();",
"public abstract void action();",
"public abstract void mo6549b();",
"public void setAbstract() {\r\n\t\tthis.isAbstract = true;\r\n\t}",
"public abstract void t1();",
"protected abstract void switchOnCustom();",
"public abstract void peel();",
"public abstract void test();",
"public abstract void test();",
"@Override\n\tprotected void logic() {\n\n\t}",
"public interface AbstractC01264e {\n void ABn(AnonymousClass4X v, @Nullable AnonymousClass4A v2, AnonymousClass4A v3);\n\n void ABp(AnonymousClass4X v, @NonNull AnonymousClass4A v2, @Nullable AnonymousClass4A v3);\n\n void ABr(AnonymousClass4X v, @NonNull AnonymousClass4A v2, @NonNull AnonymousClass4A v3);\n\n void ADd(AnonymousClass4X v);\n}",
"public abstract void mo2624j();",
"public abstract void call();",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"@Override\n\tpublic void method2() {\n\t\tSystem.out.println(\"AbstractClass 추상메쏘드 method2()를 재정의(implement)\");\n\t}",
"public interface AbstractC2726a {\n /* renamed from: a */\n void mo36480a(int i, int i2, ImageView imageView, Uri uri);\n\n /* renamed from: a */\n void mo36481a(int i, ImageView imageView, Uri uri);\n\n /* renamed from: a */\n void mo36482a(ImageView imageView, Uri uri);\n\n /* renamed from: b */\n void mo36483b(int i, ImageView imageView, Uri uri);\n}",
"public abstract T a();",
"@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}",
"abstract protected void brew();",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public abstract void t2();",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public interface AbstractC1953c50 {\n}",
"public interface AbstractC3386kV0 {\n boolean b();\n\n void d();\n\n void dismiss();\n\n ListView f();\n}",
"public abstract void t3();",
"public abstract void mo20900UP();",
"public abstract void engineWork() throws Exception;",
"public abstract void film();",
"abstract void sayHello();",
"public abstract int a();",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"public abstract String mo9239aw();",
"@Override\r\n\tpublic boolean isAbstract() throws NotesApiException {\n\t\treturn false;\r\n\t}",
"public abstract String mo24850a();",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"public abstract String mo9091a();",
"public interface AbstractC0211Dj0 {\n void a(int i);\n}",
"public abstract void MussBeDefined();",
"public boolean isAbstract();",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"public abstract B zzjo();"
] |
[
"0.74972975",
"0.7442675",
"0.72259176",
"0.7217626",
"0.72107893",
"0.71309584",
"0.7059801",
"0.7046268",
"0.6965242",
"0.68610287",
"0.68587077",
"0.684335",
"0.6816949",
"0.6790778",
"0.6772651",
"0.67645293",
"0.6739057",
"0.6729312",
"0.6714725",
"0.6712775",
"0.6673239",
"0.6670778",
"0.66656137",
"0.66633373",
"0.6657846",
"0.6653427",
"0.6602774",
"0.66024804",
"0.6575421",
"0.655852",
"0.65374494",
"0.6527423",
"0.65137166",
"0.6497262",
"0.64920557",
"0.6487601",
"0.6486293",
"0.6481534",
"0.6477388",
"0.6466798",
"0.6437694",
"0.6429697",
"0.6427119",
"0.6421876",
"0.6411016",
"0.6406074",
"0.6404188",
"0.6378816",
"0.6366475",
"0.6362919",
"0.63469607",
"0.6342461",
"0.63401806",
"0.6326894",
"0.63143986",
"0.6314225",
"0.6304636",
"0.6297115",
"0.6297115",
"0.6297115",
"0.6297115",
"0.62962013",
"0.6291351",
"0.62746304",
"0.62653023",
"0.62584364",
"0.6252793",
"0.6252793",
"0.6249887",
"0.62366104",
"0.6211958",
"0.6207744",
"0.62043107",
"0.62027454",
"0.62003297",
"0.6190573",
"0.6181991",
"0.6181817",
"0.61779934",
"0.6177243",
"0.61699134",
"0.61699134",
"0.6168434",
"0.61594594",
"0.6157532",
"0.6156835",
"0.6146435",
"0.6145988",
"0.61444",
"0.61382717",
"0.612289",
"0.6121954",
"0.61204445",
"0.6106648",
"0.60983217",
"0.6096789",
"0.60943115",
"0.60811186",
"0.6073773",
"0.60669154",
"0.6065253"
] |
0.0
|
-1
|
Inflate the layout for this fragment
|
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
try
{
v6= inflater.inflate(R.layout.fragment_grom, container, false);
recycler_groom=(RecyclerView)v6.findViewById(R.id.recycler_groom);
}catch (Exception e)
{
}
initData();
return v6;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}",
"@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }",
"protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}",
"@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }"
] |
[
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.6625158",
"0.66195583",
"0.66164845",
"0.6608733",
"0.6596594",
"0.65928894",
"0.6585293",
"0.65842897",
"0.65730995",
"0.6571248",
"0.6569152",
"0.65689117",
"0.656853",
"0.6566686",
"0.65652984",
"0.6553419",
"0.65525705",
"0.65432084",
"0.6542382",
"0.65411425",
"0.6538022",
"0.65366334",
"0.65355957",
"0.6535043",
"0.65329415",
"0.65311074",
"0.65310687",
"0.6528645",
"0.65277404",
"0.6525902",
"0.6524516",
"0.6524048",
"0.65232015",
"0.65224624",
"0.65185034",
"0.65130377",
"0.6512968",
"0.65122765",
"0.65116245",
"0.65106046",
"0.65103024",
"0.6509013",
"0.65088093",
"0.6508651",
"0.6508225",
"0.6504662",
"0.650149",
"0.65011525",
"0.6500686",
"0.64974767",
"0.64935696",
"0.6492234",
"0.6490034",
"0.6487609",
"0.6487216",
"0.64872116",
"0.6486594",
"0.64861935",
"0.6486018",
"0.6484269",
"0.648366",
"0.6481476",
"0.6481086",
"0.6480985",
"0.6480396",
"0.64797544",
"0.647696",
"0.64758915",
"0.6475649",
"0.6474114",
"0.6474004",
"0.6470706",
"0.6470275",
"0.64702207",
"0.6470039",
"0.6467449",
"0.646602",
"0.6462256",
"0.64617974",
"0.6461681",
"0.6461214"
] |
0.0
|
-1
|
Inflate the menu; this adds items to the action bar if it is present.
|
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}",
"public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}",
"@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }"
] |
[
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.68621665",
"0.68621665",
"0.68621665",
"0.68515885",
"0.68467957",
"0.68194443",
"0.6817494",
"0.6813087",
"0.6813087",
"0.6812847",
"0.6805774",
"0.6801204",
"0.6797914",
"0.6791314",
"0.6789091",
"0.67883503",
"0.6783642",
"0.6759701",
"0.6757412",
"0.67478645",
"0.6744127",
"0.6744127",
"0.67411774",
"0.6740183",
"0.6726017",
"0.6723245",
"0.67226785",
"0.67226785",
"0.67208904",
"0.67113477",
"0.67079866",
"0.6704564",
"0.6699229",
"0.66989094",
"0.6696622",
"0.66952467",
"0.66865396",
"0.6683476",
"0.6683476",
"0.6682188",
"0.6681209",
"0.6678941",
"0.66772443",
"0.6667702",
"0.66673946",
"0.666246",
"0.6657578",
"0.6657578",
"0.6657578",
"0.6656586",
"0.66544783",
"0.66544783",
"0.66544783",
"0.66524047",
"0.6651954",
"0.6650132",
"0.66487855",
"0.6647077",
"0.66467404",
"0.6646615",
"0.66464466",
"0.66449624",
"0.6644209",
"0.6643461",
"0.6643005",
"0.66421187",
"0.6638628",
"0.6634786",
"0.6633529",
"0.6632049",
"0.6632049",
"0.6632049",
"0.66315657",
"0.6628954",
"0.66281766",
"0.6627182",
"0.6626297",
"0.6624309",
"0.6619582",
"0.6618876",
"0.6618876"
] |
0.0
|
-1
|
A private constructor for the singleton design pattern.
|
private BubbleGravityBehaviour()
{
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private Singleton()\n\t\t{\n\t\t}",
"private Singleton() {\n\t}",
"private Singleton(){}",
"private Singleton() { }",
"private SingletonObject() {\n\n\t}",
"private Singleton(){\n }",
"private SingletonSample() {}",
"private SingletonSigar(){}",
"private Singleton() {\n if (instance != null){\n throw new RuntimeException(\"Use getInstance() to create Singleton\");\n }\n }",
"private SparkeyServiceSingleton(){}",
"private LazySingleton(){}",
"private J2_Singleton() {}",
"private LazySingleton() {\n if (null != INSTANCE) {\n throw new InstantiationError(\"Instance creation not allowed\");\n }\n }",
"private LoggerSingleton() {\n\n }",
"private Instantiation(){}",
"private SingletonDoubleCheck() {}",
"private SingletonEager(){\n \n }",
"private MySingleton() {\r\n\t\tSystem.out.println(\"Only 1 object will be created\");\r\n\t}",
"private InstanceUtil() {\n }",
"private EagerInitializedSingleton() {\n\t}",
"private EagerInitializedSingleton() {\n\t}",
"private EagerlySinleton()\n\t{\n\t}",
"private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}",
"private Util()\n {\n // Empty default ctor, defined to override access scope.\n }",
"private InnerClassSingleton(){}",
"private Utils()\n {\n // Private constructor to prevent instantiation\n }",
"private SingletonAR() {\n System.out.println(Thread.currentThread().getName()\n + \": creating SingletonAR\");\n }",
"private SingletonH() {\n System.out.println(Thread.currentThread().getName()\n + \": creating SingletonH\");\n }",
"private SingletonClass() {\n x = 10;\n }",
"public SingletonVerifier() {\n }",
"private MApi() {}",
"private TagCacheManager(){\n //AssertionError不是必须的. 但它可以避免不小心在类的内部调用构造器. 保证该类在任何情况下都不会被实例化.\n //see 《Effective Java》 2nd\n throw new AssertionError(\"No \" + getClass().getName() + \" instances for you!\");\n }",
"private SingleTon() {\n\t}",
"private ResourceFactory() {\r\n\t}",
"private EagerInitializationSingleton() {\n\t}",
"private Service() {}",
"private SingleObject()\r\n {\r\n }",
"private Singleton2A(){\n\t\tif(instance != null){\n\t\t\tthrow new RuntimeException(\"One instance already created cant create other\");\n\t\t}\t\t\n\t\tSystem.out.println(\"I am private constructor\");\n\t}",
"private StreamFactory()\n {\n /*\n * nothing to do\n */\n }",
"private ObjectFactory() { }",
"private FeedRegistry() {\n // no-op for singleton pattern\n }",
"private Singleton()\r\n\t{\r\n\t\tSystem.out.println(\"1st instance of class Singleton created\");\r\n\t\tstr = \"Constructor init\";\r\n\t}",
"private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}",
"private Utils() {\n\t}",
"private Utils() {\n\t}",
"private Utility() {\n\t}",
"private QcTestRunner()\n\t{\n\t\t// To prevent external instantiation of this class\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"private LOCFacade() {\r\n\r\n\t}",
"private SingletonClass() {\n objects = new ArrayList<>();\n }",
"private SnapshotUtils() {\r\n\t}",
"private Supervisor() {\r\n\t}",
"private HabitTrackerUtils() {\n // Required empty private constructor (to prevent instantiation).\n }",
"private BusquedaMaker() {\n\t\tinit();\n\t}",
"private JsonUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }",
"private Util() {\n }",
"private PerksFactory() {\n\n\t}",
"private PermissionUtil() {\n throw new IllegalStateException(\"you can't instantiate PermissionUtil!\");\n }",
"private PropertySingleton(){}",
"public Instance() {\n }",
"private LocatorFactory() {\n }",
"private StaticData() {\n\n }",
"private PropertiesLoader() {\r\n\t\t// not instantiable\r\n\t}",
"private Util() {\n }",
"private Util() {\n }",
"Reproducible newInstance();",
"private Utils() {\n }",
"private Utils() {\n }",
"private Utils() {\n }",
"private Utils() {\n }",
"private Utils() {\n }",
"private Settings() { }",
"private Settings() {}",
"private SystemInfo() {\r\n // forbid object construction \r\n }",
"private ATCres() {\r\n // prevent to instantiate this class\r\n }",
"private ScriptInstanceManager() {\n\t\tsuper();\n\t}",
"private Registry() {\n dbgLog.fine(\"Registry constructor is called\");\n }",
"private Utils() {}",
"private Utils() {}",
"private Utils() {}",
"private Utils() {}",
"private Util() { }",
"private FlowExecutorUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }",
"private UtilsCache() {\n\t\tsuper();\n\t}",
"private JobScheduler() {\n // empty\n }",
"private SingleObject(){}",
"private FixtureCache() {\n\t}",
"private BookmarkStore() {\n }",
"private FactoryCacheValet() {\n\t\tsuper();\n\t}",
"private RequestManager() {\n\t // no instances\n\t}",
"private ServiceListingList() {\n //This Exists to defeat instantiation\n super();\n }",
"private Marinator() {\n }",
"private Marinator() {\n }",
"private Settings()\n {}",
"private WolUtil() {\n }",
"private SingleObject(){\n }",
"private LogUtil() {\r\n /* no-op */\r\n }",
"private SingletonSyncBlock() {}",
"private GeneralServicesImpl() {\r\n\t}",
"private Utility() {\n throw new IllegalAccessError();\n }",
"private TSLManager() {\n\t\tsuper();\n\t}"
] |
[
"0.8715998",
"0.86476284",
"0.8617816",
"0.8610076",
"0.84046286",
"0.8236047",
"0.8070266",
"0.79931676",
"0.79572606",
"0.7889647",
"0.7871956",
"0.78313124",
"0.7778092",
"0.77406126",
"0.7665781",
"0.7638128",
"0.75846606",
"0.75745136",
"0.7497876",
"0.74850416",
"0.74850416",
"0.7484038",
"0.7447798",
"0.7423658",
"0.7400806",
"0.7355891",
"0.72884023",
"0.7271336",
"0.7239569",
"0.7204955",
"0.71835446",
"0.71830934",
"0.71525764",
"0.71467423",
"0.713249",
"0.71090466",
"0.70923936",
"0.70919627",
"0.7088564",
"0.7070715",
"0.7058361",
"0.7052431",
"0.7048542",
"0.70430535",
"0.70430535",
"0.7020667",
"0.7015863",
"0.6968074",
"0.696549",
"0.69585985",
"0.695221",
"0.6951897",
"0.6950798",
"0.69420433",
"0.69304633",
"0.6923765",
"0.69197106",
"0.69131297",
"0.69098336",
"0.6905432",
"0.68947875",
"0.68945473",
"0.6889437",
"0.6886144",
"0.6886144",
"0.68856174",
"0.68726957",
"0.68726957",
"0.68726957",
"0.68726957",
"0.68726957",
"0.687234",
"0.6850083",
"0.6841871",
"0.6828337",
"0.6827615",
"0.682408",
"0.68198305",
"0.68198305",
"0.68198305",
"0.68198305",
"0.6819174",
"0.6814995",
"0.68057334",
"0.68039227",
"0.68011075",
"0.68001133",
"0.6799475",
"0.6797472",
"0.6796628",
"0.678577",
"0.6782824",
"0.6782824",
"0.6781042",
"0.6780652",
"0.67788684",
"0.6764101",
"0.67618805",
"0.67567605",
"0.6752372",
"0.67510563"
] |
0.0
|
-1
|
Returns the instance for the behaviour.
|
public static BubbleGravityBehaviour getInstance()
{
return INSTANCE;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public org.omg.uml.behavioralelements.commonbehavior.Instance getInstance();",
"Behavior getBehavior();",
"public Logic getBehaviorTarget ()\n {\n return _behavior.getCurrentTarget();\n }",
"public eBehavior getBehavior() {\n return behavior;\n }",
"@Override\r\n\tpublic CMObject newInstance()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn this.getClass().getDeclaredConstructor().newInstance();\r\n\t\t}\r\n\t\tcatch(final Exception e)\r\n\t\t{\r\n\t\t\tLog.errOut(ID(),e);\r\n\t\t}\r\n\t\treturn new StdBehavior();\r\n\t}",
"public T getInstance() {\n return instance;\n }",
"@Override\n public T getInstance() {\n return instance;\n }",
"public Object ai() {\n try {\n return this.ad.newInstance();\n } catch (IllegalAccessException | InstantiationException e) {\n throw new RuntimeException();\n }\n }",
"private Strategy getStrategyInstance() {\n if (strategyInstances.containsKey(strategy)) {\n return strategyInstances.get(strategy);\n } else {\n try {\n Strategy strategyInstance = strategy.getConstructor(Board.class).newInstance(board);\n strategyInstances.put(strategy, strategyInstance);\n return strategyInstance;\n } catch (Exception e) {\n System.err.println(\"Exception when intiating strategy with only board argument\");\n e.printStackTrace();\n return null;\n }\n }\n }",
"public Object ae() {\n try {\n return this.ad.newInstance();\n } catch (IllegalAccessException | InstantiationException e) {\n throw new RuntimeException();\n }\n }",
"Instance createInstance();",
"@Override\n\t\tpublic Object getInstance() {\n\t\t\treturn null;\n\t\t}",
"public Object aj() {\n try {\n return this.ad.newInstance();\n } catch (IllegalAccessException | InstantiationException e) {\n throw new RuntimeException();\n }\n }",
"public org.omg.uml.behavioralelements.commonbehavior.Instance getValue();",
"public static Ontology getInstance() {\n return theInstance;\n }",
"public static Ontology getInstance() {\n return theInstance;\n }",
"Rigger getRiggerInstance() throws Exception {\r\n Class<?> riggerClazz = Class.forName(Rigger.class.getName());\r\n Method getInstance = riggerClazz.getDeclaredMethod(\"getInstance\");\r\n getInstance.setAccessible(true);\r\n return (Rigger) getInstance.invoke(null);\r\n }",
"public BehaviorLogic createBehavior (ConfigReference<BehaviorConfig> ref)\n {\n // create the logic instance\n BehaviorConfig config = _scenemgr.getConfigManager().getConfig(BehaviorConfig.class, ref);\n BehaviorConfig.Original original = config == null ? null :\n config.getOriginal(_scenemgr.getConfigManager());\n if (original == null) {\n original = new BehaviorConfig.Original();\n }\n\n // Original will create an Idle, so we should never have a null behavior\n BehaviorLogic logic = (BehaviorLogic)_scenemgr.createLogic(original.getLogicClassName());\n logic.init(_scenemgr, original, this);\n return logic;\n }",
"@Override\n\tpublic Behavior get(BehaviorFacet facet) {\n\t\treturn BehaviorRepository.getInstance().getBuiltIn(facet);\n\t}",
"public TurtleBehaviorInterface getBehavior()\n {\n return mBehavior;\n }",
"BehaviouralModelFactory getBehaviouralModelFactory();",
"@Override\n\tpublic Object getModInstance() {\n\t\treturn null;\n\t}",
"public Behavior getModel(){\n\t\treturn (this.model);\n\t}",
"DynamicBehavior createDynamicBehavior();",
"public static Gadget getInstance(){\r\n\t\t\treturn instance;\r\n\t\t}",
"public static Main getInstance() {\n return instance;\n }",
"BehaviorConcept createBehaviorConcept();",
"public static ProphetQueuing getInstance() {\r\n\t\tif (instance_ == null) {\r\n\t\t\tswitch (policy) {\r\n\t\t\tcase FIFO:\r\n\t\t\t\tinstance_ = (ProphetQueuing) new Fifo();\r\n\t\t\t\tbreak;\r\n\t\t\tcase MOFO:\r\n\t\t\t\tinstance_ = (ProphetQueuing) new Mofo();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tBPF.getInstance().getBPFLogger()\r\n\t\t\t\t\t\t.error(TAG, \"Wrong policy in prophet routing type\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn instance_;\r\n\t}",
"public BehaviourFactoryImpl() {\n\t\tsuper();\n\t}",
"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}",
"public static Main getInstance() {\r\n return instance;\r\n }",
"public static ReportRepository GetIstance() {\n return instance;\n }",
"String getInstance()\n {\n return instance;\n }",
"public Game getNewInstance() {\n try {\n return classObj.newInstance();\n } catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(\"Error generating \" + this + \" game\");\n }\n }",
"public static UserInteraction getInstance() {\n\t\tif (sharedInstance == null) {\n\t\t\tsharedInstance = new UserInteraction();\n\t\t}\n\t\treturn sharedInstance;\n\t}",
"public TraversalStrategyFactory getInstance() {\n\t\treturn instance;\n\t}",
"public static Physics getInstance(){\n return instance;\n }",
"public static AdmBoardOptionActionFactory getInstacne() {\n\t\treturn instance;\r\n\t}",
"public edit_category_ui get_instance() {\r\n\t\t\r\n\t\treturn instance;\r\n\t}",
"public static synchronized ChoseActivity getInstance() {\n return mInstance;\n }",
"@NotNull\n public static Help getInstance() {\n return LazyHolder.INSTANCE;\n }",
"protected String getBehaviorType() {\n\t\treturn this.behaviorType;\n\t}",
"public static SingleObject getInstance(){\n return instance;\n }",
"T getInstance();",
"public RunePouchHandler getInstance() {\n return instance == null ? instance = new RunePouchHandler(this.superClass) : instance;\n }",
"public static BehaviourFactory init() {\n\t\ttry {\n\t\t\tBehaviourFactory theBehaviourFactory = (BehaviourFactory)EPackage.Registry.INSTANCE.getEFactory(BehaviourPackage.eNS_URI);\n\t\t\tif (theBehaviourFactory != null) {\n\t\t\t\treturn theBehaviourFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new BehaviourFactoryImpl();\n\t}",
"public static ScriptInstanceManager getInstance() {\n\t\tif (scriptInstance == null) {\n\t\t\tscriptInstance = new ScriptInstanceManager();\n\t\t\tLOGGER.trace(\"Creating instance of aftscriptInstance\");\n\t\t}\n\n\t\treturn scriptInstance;\n\t}",
"public static Arm getInstance() {\n if (instance == null) {\n instance = new Arm();\n }\n return instance;\n }",
"public static MetaDataManager getInstance() {\n return instance;\n }",
"static RatAppModel getInstance() {return model;}",
"public static OI getInstance() {\n\t\treturn INSTANCE;\n\t}",
"static public RSMLGUI getInstance() {return instance;}",
"public Object getOperatorInstance() {\n return operatorInstance;\n }",
"UMLBehavior createUMLBehavior();",
"public static Setup getInstance () {\n return SetupHolder.INSTANCE;\n }",
"@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public Class<? extends T> getClassToInstantiate() {\r\n return classToInstantiate;\r\n }",
"protected TriggerFactory getTriggerFactory() {\n\t\treturn this.triggerFactory;\n\t}",
"public static InfoCommand getInstance(){\n\t return instance;\n\t}",
"public static ToolRegistery getInstance(){\n\t\treturn InstanceKeeper.instance;\n\t}",
"public static MarketDataManagerImpl getInstance()\n {\n return instance;\n }",
"static public GUIAltaHabitacion obtenerInstancia(){\r\n\t\t if(altaHabitacion == null){\r\n\t\t\t altaHabitacion = new GUIAltaHabitacion();\r\n\t\t }\r\n\t\t \r\n\t\t return altaHabitacion;\r\n\t }",
"final Truerandomness defaultInstance() {\n\n\t\ttry {\n\t\t\treturn newInstance();\n\t\t} catch (Throwable t) {\n\t\t\t// hide\n\t\t}\n\n\t\t// not supported\n\t\treturn null;\n\t}",
"public RequestHandler getRequestHandlerInstance() {\n Object obj;\n try {\n obj = klass.newInstance();\n } catch (Exception e) {\n throw new RuntimeException(\"Problem during the Given class instanciation please check your contribution\", e);\n }\n if (obj instanceof RequestHandler) {\n RequestHandler rh = (RequestHandler) obj;\n rh.init(properties);\n return rh;\n }\n\n throw new RuntimeException(\"Given class is not a \" + RequestHandler.class + \" implementation\");\n }",
"@Override\r\n\tpublic ItemInstance createItemInstance() {\n\t\treturn new HpInstance();\r\n\t}",
"public T getNewInstance() {\n T value = null;\n Class<T> tClass = (Class<T>) ((ParameterizedType) this.getClass().getGenericSuperclass()).getActualTypeArguments()[0];\n try {\n value = tClass.newInstance();\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n return value;\n }",
"public static SingleObject getInstance()\r\n {\r\n return instance;\r\n }",
"@ApiModelProperty(value = \"A URI reference that identifies the specific occurrence of the problem\")\n \n public String getInstance() {\n return instance;\n }",
"public static ByaTableModel getInstance() {\n\t\treturn instance;\n\t}",
"public C4567a mo24844SC() {\n try {\n return (C4567a) this.bLp.newInstance();\n } catch (ClassCastException e) {\n throw new Error(\"Can not init animatorClazz instance\", e);\n } catch (InstantiationException e2) {\n throw new Error(\"Can not init animatorClazz instance\", e2);\n } catch (IllegalAccessException e3) {\n throw new Error(\"Can not init animatorClazz instance\", e3);\n }\n }",
"public static AsteroidFactory getInstance() {\r\n\t\treturn instance;\r\n\t}",
"public static BESDyno getInstance() {\n if (instance == null) {\n instance = new BESDyno();\n }\n return instance;\n }",
"public static GameManager getInstance() {\n return ourInstance;\n }",
"public synchronized static ApModel getInstance()\n\t{\n\t\tif (INSTANCE == null)\n\t\t\tINSTANCE = new ApModel();\n\t\treturn INSTANCE;\n\t}",
"public static Boot getInstance()\n {\n return instance;\n }",
"public AndroidModelParameterManager(IInstantiationBehavior behaviour) {\n this.behaviour = behaviour;\n this.description = \" based on behaviours of \" + behaviour;\n// this.forMethod = null; // XXX\n }",
"static OpenSamlImplementation getInstance() {\n\t\treturn instance;\n\t}",
"public int getBaseInstance() {\n return baseInstance;\n }",
"public int getBaseInstance() {\n return baseInstance;\n }",
"public static Singleton instance() {\n return Holder.instance;\n }",
"public <S> ComponentInstance<S> getComponentInstance();",
"public static test5 getinstance(){\r\n\t\t return instance;\r\n\t }",
"public IBehaviourInferenceAlgorithm getService(){\n if(registry == null) {\n \tlogger.warning(\"BehaviourInferenceAlgorithmRegistry service unbound.\");\n \treturn null;\n }\n return registry;\n }",
"public static final PikaxProcessor getInstance() {\n\t\tif (instance == null) {\n\t\t\treturn newInstance();\n\t\t}\n\t\treturn instance;\n\t}",
"public interface BehaviorPane {\n public AbstractBehavior getBehavior();\n\n void setBehavior(AbstractBehavior behavior);\n}",
"protected StateMachinesHelper getComponent() {\r\n return impl;\r\n }",
"public static Controller getInstance() { return INSTANCE; }",
"public static Elevator getInstance() {\r\n return instance;\r\n }",
"InstanceModel createInstanceOfInstanceModel();",
"public Extractor getInstance() throws Exception {\r\n return (Extractor)getInstance(label); \r\n }",
"@objid (\"19651663-f981-4f11-802a-d5d7cbd6f88a\")\n Instance getTarget();",
"public SurveyInstance createSurveyInstance() {\n return new SurveyInstance();\n }",
"public static com.tangosol.coherence.Component get_Instance()\n {\n return new com.tangosol.coherence.component.net.Security.RefAction();\n }",
"public String getCustomerBehaviorModelSpecificationInstanceReference() {\n return customerBehaviorModelSpecificationInstanceReference;\n }",
"public static NotificationPublisher getInstance() {\n return instance;\n }",
"private static Injector instance() {\n if (instance == null) {\n instance = new Injector();\n }\n \n return instance;\n }",
"public static MainActivity instance() {\n Log.d(TAG, \" instance(): called\");\n return inst;\n }",
"private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}",
"protected T getHarness() {\n\t\tif (harness ==null) {\n\t\t\tharness = createHarness();\n\t\t}\n\t\treturn harness;\n\t}",
"public Object getObject() {\n return getObject(null);\n }"
] |
[
"0.7132575",
"0.6993322",
"0.647352",
"0.64611155",
"0.6281869",
"0.6257447",
"0.62455535",
"0.61816657",
"0.6084547",
"0.6051422",
"0.5896773",
"0.58859074",
"0.579858",
"0.5797848",
"0.5794445",
"0.5794445",
"0.5757905",
"0.5716242",
"0.567084",
"0.56616175",
"0.5660641",
"0.564654",
"0.5633942",
"0.5592004",
"0.5555789",
"0.5502477",
"0.5490029",
"0.54826146",
"0.5477572",
"0.54702485",
"0.54631144",
"0.54326445",
"0.5423915",
"0.5419829",
"0.54053515",
"0.5399874",
"0.5390999",
"0.53888655",
"0.53880376",
"0.5385673",
"0.53568804",
"0.5352565",
"0.5351383",
"0.53503805",
"0.5347912",
"0.5342392",
"0.53285694",
"0.5304959",
"0.5296003",
"0.5286228",
"0.52857816",
"0.528543",
"0.52780575",
"0.52646434",
"0.52582306",
"0.5256019",
"0.52538705",
"0.52461606",
"0.5246065",
"0.524356",
"0.5243448",
"0.5232521",
"0.5221142",
"0.52197695",
"0.52170104",
"0.521451",
"0.5207898",
"0.52062404",
"0.52041894",
"0.51991093",
"0.5198263",
"0.51981586",
"0.51954615",
"0.5189324",
"0.5188563",
"0.5176391",
"0.51720804",
"0.51659244",
"0.51659244",
"0.51582277",
"0.51578397",
"0.515267",
"0.5149705",
"0.5146513",
"0.5140496",
"0.5134787",
"0.51209897",
"0.5119686",
"0.51148695",
"0.5114852",
"0.51015985",
"0.5099315",
"0.5098501",
"0.50938356",
"0.50927424",
"0.5091913",
"0.5091493",
"0.5090391",
"0.5087907",
"0.5086845"
] |
0.6450203
|
4
|
Provides the gravity behaviour for bubbles. As bubbles are not affected by gravity, it just returns the existing motion.
|
public void apply(Mover mover, CollisionComputer cc)
{
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public float getGravity()\n {\n return gravity;\n }",
"public Vector3 getGravity() {\n if (!isSupported())\n throw new UnsupportedOperationException(\"Gravity sensor not supported\");\n if (!isAvailable())\n throw new IllegalStateException(\"Gravity reading not available\");\n return gravity;\n }",
"public Vector2D getGravity(float delta){\n Vector2D deltaGravity = (Vector2D)GRAVITY.clone();\n deltaGravity.multiplyVector(delta);\n return deltaGravity;\n }",
"default Integer getGravity() {\n return null;\n }",
"int getGravity() {\n return mTn.mGravity;\n }",
"public static void applyGravity() {\n\n\t\tfor (Ball b : Panel.balls) {\n\t\t\tb.setyVelocity(b.getyVelocity() + 2);\n\t\t}\n\t}",
"public static BubbleGravityBehaviour getInstance()\n {\n return INSTANCE;\n }",
"public double getOriginalGravity() {\n\t\tdouble gravity = 0;\n\t\tfor (RecipeIngredient ri : m_ingredientList) {\n\t\t\tif (ri.getIngredient().getType() == Ingredient.Type.MALT) {\n\t\t\t\tMalt m = (Malt) ri.getIngredient();\n\t\t\t\tgravity += 1000 * (m.getGravity() - 1) * ri.getAmount();\n\t\t\t}\n\t\t}\n\t\treturn 1 + (gravity / m_batchSize) / 1000;\n\t}",
"public Motion3d getMotion() {\n return motion;\n }",
"public float getAngularDamping () {\n\t\treturn body.getAngularDamping();\n\t}",
"public float getDamping() { \n \treturn mouseJointDef.dampingRatio; \n }",
"public PVector calcGravForce (ShiffmanShip ship) {\n // -----MOUSE CONTROL-------\n //PVector mouse = new PVector(mouseX, mouseY);\n //PVector force = PVector.sub(mouse,love.getLoc()); // get distance and magnitude PVector then \n // regular center located mass\n PVector force = PVector.sub(loc,ship.getLoc()); // get distance and magnitude PVector then \n float distance = force.mag();\n distance = constrain(distance,5.0f,25.0f);\n float gravityStrength = (G * mass * ship.getMass()) / (distance * distance);\n force.normalize();\n force.mult(gravityStrength);\n return force;\n }",
"public boolean hasGravity ( ) {\n\t\treturn extract ( handle -> handle.hasGravity ( ) );\n\t}",
"public PVector calcGravForce (Lover love) {\n // -----MOUSE CONTROL-------\n //PVector mouse = new PVector(mouseX, mouseY);\n //PVector force = PVector.sub(mouse,love.getLoc()); // get distance and magnitude PVector then \n // regular center located mass\n PVector force = PVector.sub(location,love.getLoc()); // get distance and magnitude PVector then \n float distance = force.mag();\n distance = constrain(distance,5.0f,25.0f);\n float gravityStrength = (G * mass * love.getMass()) / (distance * distance); // ATTRACTION GRAVITY\n if (repel) {\n gravityStrength = gravityStrength * -1;\n }\n\n \n force.normalize();\n force.mult(gravityStrength); // attractive force\n //force.div(gravityStrength); // can we divide here to make a repelling force? ANS: NOPE (dividing with amplify\n return force;\n }",
"public void applyGravity(double delta) {\n\t\taddVelocity(0, Constants.GRAVITYSTRENGTH*delta);\n\t}",
"protected abstract void setGravityImpl( float x, float y, float z );",
"@Override\n\tpublic void onGravitySensorChanged(float[] gravity) {\n\t\t\n\t}",
"public PVector calcGravForce (Lover love) {\n // -----MOUSE CONTROL-------\n //PVector mouse = new PVector(mouseX, mouseY);\n //PVector force = PVector.sub(mouse,love.getLoc()); // get distance and magnitude PVector then \n // regular center located mass\n PVector force = PVector.sub(loc,love.getLoc()); // get distance and magnitude PVector then \n float distance = force.mag();\n distance = constrain(distance,5.0f,25.0f);\n float gravityStrength = (G * mass * love.getMass()) / (distance * distance);\n force.normalize();\n force.mult(gravityStrength);\n return force;\n }",
"public abstract float getCollisionRadius();",
"private BubbleGravityBehaviour()\n {\n\n }",
"public PVector calcGravForceMouse (ShiffmanShip ship) {\n // -----MOUSE CONTROL-------\n PVector mouse = new PVector(mouseX, mouseY);\n PVector force = PVector.sub(mouse,ship.getLoc()); // get distance and magnitude PVector then \n // regular center located mass\n //PVector force = PVector.sub(loc,love.getLoc()); // get distance and magnitude PVector then \n float distance = force.mag();\n distance = constrain(distance,5.0f,25.0f);\n float gravityStrength = (G * mass * ship.getMass()) / (distance * distance);\n force.normalize();\n force.mult(gravityStrength);\n return force;\n }",
"Double getTensionForce();",
"public Matrix gravityGradient()\n\t{\n\t\tVectorN r = this.getR();\n\t\tdouble rmag = r.mag();\n\t\tdouble r2 = rmag * rmag;\n\t\tdouble muor3 = this.mu / (r2 * rmag);\n\t\tdouble jk = 3.0 * muor3 / (r2);\n\t\tMatrix gg = new Matrix(3, 3);\n\n\t\tdouble xx = r.x[0];\n\t\tdouble yy = r.x[1];\n\t\tdouble zz = r.x[2];\n\n\t\tgg.A[0][0] = jk * xx * xx - muor3;\n\t\tgg.A[0][1] = jk * xx * yy;\n\t\tgg.A[0][2] = jk * xx * zz;\n\n\t\tgg.A[1][0] = gg.A[0][1];\n\t\tgg.A[1][1] = jk * yy * yy - muor3;\n\t\tgg.A[1][2] = jk * yy * zz;\n\n\t\tgg.A[2][0] = gg.A[0][2];\n\t\tgg.A[2][1] = gg.A[1][2];\n\t\tgg.A[2][2] = jk * zz * zz - muor3;\n\n\t\treturn gg;\n\t}",
"public void gravityPull(){\n\t\t//Starts falling by One Pixel\n\t\tbird.setY(bird.getY() + 2);\n\t}",
"public void applyGravity(Vector movement) {\n movement.add(gravity);\n }",
"public float getScaleMotionDeceleration() {\r\n\t\treturn scaleMotionDeceleration;\r\n\t}",
"@Override\n\tpublic boolean action() {\n\t\tparent.changeGravityDirection();\n\t\treturn true;\n\t\t\n\t}",
"public static void add_gravitational_acceleration( Body body ) {\r\n double x, y, z, r, a;\r\n double G = 6.671984315419034E-11; // G = NASA mu / b[0].m Orbit3D sep 2017 value\r\n Body that;\r\n\r\n if ( ap.localGravity ) {\r\n// body.currentState.ay = body.currentState.ay - smallg;\r\n } else {\r\n // go through SolarSystem ss and find gravitational accelerations due to each planet in it.\r\n for ( int n=0; n<ap.nPlanets; n++ ) {\r\n that = ap.ss.b[n];\r\n if ( body.inFreeMotion && body.num != that.num ) {\r\n x = body.currentState.x - that.currentState.x; // x distance from m\r\n y = body.currentState.y - that.currentState.y; // y distance .. ..\r\n z = body.currentState.z - that.currentState.z; // z distance .. ..\r\n r = Math.sqrt(x * x + y * y + z * z); // distance .. ..\r\n a = -(G * that.m) / (r * r); // acceleration towards that\r\n body.currentState.ax = body.currentState.ax + a * x / r; // x component of accel\r\n body.currentState.ay = body.currentState.ay + a * y / r; // y component of accel\r\n body.currentState.az = body.currentState.az + a * z / r; // z component of accel\r\n }\r\n }\r\n\r\n }\r\n }",
"public double getG();",
"public double getTimeCollisionBoundary() {\n\t\tdouble[] velocity = this.velocity.getVelocity();\n\t\tif (this.superWorld == null)\treturn Double.POSITIVE_INFINITY;\n\t\tif (velocity[0] == 0 && velocity[1] == 0)\t\treturn Double.POSITIVE_INFINITY;\n\t\t\n\t\tdouble radius = this.getRadius();\n\t\tif (this instanceof Planetoid) { Planetoid planetoid = (Planetoid) this; radius = planetoid.getRadius();}\n\t\t\n\t\tdouble edgeY;\n\t\tdouble edgeX;\n\t\tdouble mY = 0;\n\t\tdouble mX = 0;\n\t\t\n\t\tif (velocity[0] > 0){\n\t\t\tedgeX = position[0] + radius;\n\t\t\tmX = this.superWorld.getWorldWidth();\n\t\t}\n\t\telse edgeX = position[0] - radius;\n\t\tif (velocity[1] > 0){\n\t\t\tedgeY = position[1] + radius;\n\t\t\tmY = this.superWorld.getWorldHeight();\n\t\t}\n\t\telse edgeY = position[1] - radius;\n\t\t\n\t\tdouble tX = Double.POSITIVE_INFINITY;\n\t\tdouble tY = Double.POSITIVE_INFINITY;\n\t\t\n\t\tif (velocity[0] != 0){\n\t\t\ttX = (mX-edgeX)/velocity[0];\n\t\t}\n\t\tif (velocity[1] != 0){\n\t\t\ttY = (mY-edgeY)/velocity[1];\n\t\t}\n\t\t\n\t\t//Return the smallest value\n\t\treturn Math.min(tX, tY); \n\t\t\n\t}",
"public void setGravity(Vector3f gravity) {\n rBody.setGravity(Converter.convert(gravity, tempVec));\n }",
"@Override\n\tprotected float getJumpUpwardsMotion() {\n\t\treturn canFly() ? 1 : super.getJumpUpwardsMotion();\n\t}",
"@Override\n\tpublic float getAngularVelocity() {\n\t\treturn body.getAngularVelocity();\n\t}",
"public float getG() {\r\n\t\treturn g;\r\n\t}",
"protected float getMotionFactor() {\n\t\treturn super.getMotionFactor();\n\t}",
"public static void setGravity(float[] g) {\n gravity = g;\n }",
"public void act() \n {\n gravity();\n animate();\n }",
"public float getForce() { \n \treturn force; \n }",
"public void getGSpeedAfterJumpLand() {\n if(jumpState == JumpState.STATE_JUMP_DOWN && angle < 45) {\n groundSpeed = xSpeed;\n }\n else if(jumpState == JumpState.STATE_JUMP_DOWN && angle == 45) {\n if(Math.abs(xSpeed) > ySpeed) {\n groundSpeed = xSpeed; \n }\n else {\n groundSpeed = ySpeed*0.5*-Math.signum(Math.sin(angle));\n } \n } \n jumpState = JumpState.STATE_NOJUMP;\n springState = SpringState.STATE_NOSPRING;\n }",
"public boolean isGravityDownward(){\r\n\t\tif(gravityDownward){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public PVector calcGravForceMouse (Lover love) {\n // -----MOUSE CONTROL-------\n PVector mouse = new PVector(mouseX, mouseY);\n PVector force = PVector.sub(mouse,love.getLoc()); // get distance and magnitude PVector then \n // regular center located mass\n //PVector force = PVector.sub(loc,love.getLoc()); // get distance and magnitude PVector then \n float distance = force.mag();\n distance = constrain(distance,5.0f,25.0f);\n float gravityStrength = (G * mass * love.getMass()) / (distance * distance);\n force.normalize();\n force.mult(gravityStrength);\n return force;\n }",
"protected Ellipse2D.Double getDisc(){\n\t\ttheball.setFrame(this.getX(),this.getY(),diameter,diameter);\n\t\treturn this.theball;\n\t}",
"public Vector3d getVelocity() {\n return getMotion().getVelocity();\n }",
"public float getAngularVelocity () {\n\t\treturn body.getAngularVelocity();\n\t}",
"public abstract float getMovementPerTick();",
"public HoleGravity(BlackHole blackHole, float gravity) {\n\n mBlackHole = blackHole;\n mGravity = gravity;\n\n }",
"public void basicMotion() {\r\n\t\tPVector v = behavior.behavior(obj.getMotion());\r\n\t\tobj.getMotion().setVelocity(v);\r\n\t\t\r\n\t\tobj.getMotion().kinematicUpdate();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tfloat x = obj.getMotion().getPosition().x;\r\n\t\tfloat y = obj.getMotion().getPosition().y;\r\n\t\tif(y <= turnCornerMin ) {\r\n\t\t\tbehavior.setDest(turnCornerMax,turnCornerMin);\r\n\t\t\t\t\r\n\t\t}\r\n\t\tif(x >= turnCornerMax) {\r\n\t\t\tbehavior.setDest(turnCornerMax, turnCornerMax);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(y >= turnCornerMax) {\r\n\t\t\tbehavior.setDest(turnCornerMin, turnCornerMax);\r\n\t\t}\r\n\t\t\r\n\t\tif(x < turnCornerMin) {\r\n\t\t\treturn;\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\tobj.updateObjKinematics(x, y, obj.getMotion().getOrientation());\r\n\t}",
"public void gravity(int yInitial)\n\t{\n\t\tdY = dY - 4;\n\t}",
"public Vector3d getAcceleration() {\n return getMotion().getAcceleration();\n }",
"public static int getAbsoluteGravity(int gravity, int layoutDirection) {\n if (SDK_INT >= 17) {\n return Gravity.getAbsoluteGravity(gravity, layoutDirection);\n } else {\n // Just strip off the relative bit to get LEFT/RIGHT.\n return gravity & ~RELATIVE_LAYOUT_DIRECTION;\n }\n }",
"@Override\n public int getJumpMP(boolean gravity) {\n int jump = 0;\n\n if (hasShield() && (getNumberOfShields(MiscType.S_SHIELD_LARGE) > 0)) {\n return 0;\n }\n\n if (hasModularArmor()) {\n jump--;\n }\n\n for (Mounted mounted : getMisc()) {\n if (mounted.getType().hasFlag(MiscType.F_JUMP_JET) && !mounted.isDestroyed() && !mounted.isBreached()) {\n jump++;\n } else if (mounted.getType().hasFlag(MiscType.F_JUMP_BOOSTER) && !mounted.isDestroyed() && !mounted.isBreached()) {\n jump = getOriginalJumpMP();\n break;\n }\n }\n\n // apply Partial Wing bonus if we have the ability to jump\n if (jump > 0) {\n for (Mounted mount : getMisc()) {\n if (mount.getType().hasFlag(MiscType.F_PARTIAL_WING)) {\n jump += getPartialWingJumpBonus(mount);\n break;\n }\n }\n }\n\n if (gravity) {\n return applyGravityEffectsOnMP(jump);\n }\n return jump;\n }",
"private int getNewAutomaticGear() {\r\n\t\t// The speeds should be directionless. If EncVelocity works better, get Absolute\r\n\t\t// value\r\n\t\tdouble leftMotorSpeed = m_leftCIMMotor1.getSpeed();\r\n\t\tdouble rightMotorSpeed = m_rightCIMMotor1.getSpeed();\r\n\t\tdouble average = (leftMotorSpeed + rightMotorSpeed) / 2.0;\r\n\t\t\r\n\t\tif((Timer.getFPGATimestamp() - m_lastShiftTime) < 0.5) {\r\n\t\t\treturn getGear();\r\n\t\t}\r\n\t\t\r\n\t\tif (average <= RobotMap.GEAR_AUTOMATIC_DOWNSHIFT_SPEED) {\r\n\t\t\treturn 1;\r\n\t\t} else if (average > RobotMap.GEAR_AUTOMATIC_UPSHIFT_SPEED) {\r\n\t\t\treturn 2;\r\n\t\t}else {\r\n\t\t\t return getGear();\r\n\t\t}\r\n\r\n\t}",
"static int getVelocity(){return currentVelocity;}",
"public void collideBoundary() {\n\t\tif (getWorld() == null) return;\n\t\tif (getXCoordinate() < 1.01*getRadius())\n\t\t\tsetXVelocity(-getXVelocity());\n\t\tif (getXCoordinate() > getWorld().getWidth()-1.01*getRadius())\n\t\t\tsetXVelocity(-getXVelocity());\n\t\tif (getYCoordinate() < 1.01 * getRadius())\n\t\t\tsetYVelocity(-getYVelocity());\n\t\tif (getYCoordinate() > getWorld().getHeight()-1.01*getRadius())\n\t\t\tsetYVelocity(-getYVelocity());\n\t}",
"private void gunModifier()\n\t{\t\t\n\t\tif (_gunModifier == 0)\n\t\t{\n\t\t\t_gunModifier = (_gunModifierSwivel * GameState._density);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (_gunModifier == _gunModifierSwivel * GameState._density)\n\t\t\t{\n\t\t\t\t_gunModifier = -1 * (_gunModifierSwivel* GameState._density);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (_gunModifier == -1 * (_gunModifierSwivel* GameState._density))\n\t\t\t\t{\n\t\t\t\t\t_gunModifier = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void onUpdate() {\n\t\tif(!world.isRemote && !firstTick) {\n\t\t\tLCNetwork.net.sendToAllAround(new MessageSyncTNT(this), \n\t\t\t\t\tnew TargetPoint(this.dimension, this.posX, this.posY, this.posZ, 1024));\n\t\t\tfirstTick = true;\n\t\t}\n\t\t\n\t\tthis.prevPosX = this.posX;\n\t\tthis.prevPosY = this.posY;\n\t\tthis.prevPosZ = this.posZ;\n\t\tthis.motionY -= 0.03999999910593033D;\n\t\tthis.move(MoverType.SELF, this.motionX, this.motionY, this.motionZ);\n\t\tthis.motionX *= 0.9800000190734863D;\n\t\tthis.motionY *= 0.9800000190734863D;\n\t\tthis.motionZ *= 0.9800000190734863D;\n\n\t\tif (this.onGround)\n\t\t{\n\t\t\tthis.motionX *= 0.699999988079071D;\n\t\t\tthis.motionZ *= 0.699999988079071D;\n\t\t\tthis.motionY *= -0.5D;\n\t\t}\n\n\t\tif (this.fuse-- <= 0)\n\t\t{\n\t\t\tthis.setDead();\n\n\t\t\tif (!this.world.isRemote)\n\t\t\t{\n\t\t\t\tthis.explode();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.world.spawnParticle(EnumParticleTypes.SMOKE_LARGE, this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D);\n\t\t}\n\t}",
"public int getPreferredOptionsPanelGravity() {\n int rotation = getRotation();\n if (this.mInitialDisplayWidth < this.mInitialDisplayHeight) {\n if (rotation != 1) {\n return (rotation == 2 || rotation != 3) ? 81 : 8388691;\n }\n return 85;\n } else if (rotation == 1) {\n return 81;\n } else {\n if (rotation != 2) {\n return rotation != 3 ? 85 : 81;\n }\n return 8388691;\n }\n }",
"public float getBreakingImpulse() {\n return Native3DConstraint.getBreakingImpulse(getNative());\n }",
"public void onUpdate() {\n/* 150 */ this.prevPosX = this.posX;\n/* 151 */ this.prevPosY = this.posY;\n/* 152 */ this.prevPosZ = this.posZ;\n/* */ \n/* 154 */ if (this.particleAge++ >= this.particleMaxAge)\n/* */ {\n/* 156 */ setDead();\n/* */ }\n/* */ \n/* 159 */ this.motionY -= 0.04D * this.particleGravity;\n/* 160 */ moveEntity(this.motionX, this.motionY, this.motionZ);\n/* 161 */ this.motionX *= 0.9800000190734863D;\n/* 162 */ this.motionY *= 0.9800000190734863D;\n/* 163 */ this.motionZ *= 0.9800000190734863D;\n/* */ \n/* 165 */ if (this.onGround) {\n/* */ \n/* 167 */ this.motionX *= 0.699999988079071D;\n/* 168 */ this.motionZ *= 0.699999988079071D;\n/* */ } \n/* */ }",
"public abstract float getMomentOfInertia();",
"@Override\n public void executeFrameWithDeltaTime(float timeInterval, PhysicsObject physicsObject) {\n applyLimits();\n if (this.minPoint.x == this.target.getTranslationX() && physicsObject.velocity.x < 0.0)\n {\n float vx = -physicsObject.velocity.x * this.bounce;\n float vy = physicsObject.velocity.y;\n physicsObject.velocity = new PointF(vx, vy);\n doHaptic();\n }\n if (this.minPoint.y == this.target.getTranslationY() && physicsObject.velocity.y < 0.0)\n {\n float vx = physicsObject.velocity.x;\n float vy = -physicsObject.velocity.y * this.bounce;\n physicsObject.velocity = new PointF(vx, vy);\n doHaptic();\n }\n if (this.maxPoint.x == this.target.getTranslationX() && physicsObject.velocity.x > 0.0)\n {\n float vx = -physicsObject.velocity.x * this.bounce;\n float vy = physicsObject.velocity.y;\n physicsObject.velocity = new PointF(vx, vy);\n doHaptic();\n }\n if (this.maxPoint.y == this.target.getTranslationY() && physicsObject.velocity.y > 0.0)\n {\n float vx = physicsObject.velocity.x;\n float vy = -physicsObject.velocity.y * this.bounce;\n physicsObject.velocity = new PointF(vx, vy);\n doHaptic();\n }\n }",
"public Acceleration getGyAsAcceleration() {\n return new Acceleration(mGy, AccelerationUnit.METERS_PER_SQUARED_SECOND);\n }",
"float getGt();",
"public TurtleBehaviorInterface getBehavior()\n {\n return mBehavior;\n }",
"public int getMovement() {\n return movement;\n }",
"public Velocity getVelocity() {\n return this.velocity;\n }",
"public double getTimeFirstCollisionBoundary() {\n\t\tif (getWorld() == null) return Double.POSITIVE_INFINITY;\n\t\tdouble xTime = Double.POSITIVE_INFINITY;\n\t\tdouble yTime = Double.POSITIVE_INFINITY;\n\t\t\n\t\tif (this.getXVelocity() > 0)\n\t\t\txTime = (getWorld().getWidth() - getXCoordinate() - getRadius()) / getXVelocity();\n\t\tif (this.getXVelocity() < 0)\n\t\t\txTime = - ( getXCoordinate() - getRadius()) / getXVelocity();\n\t\tif (this.getXVelocity() == 0)\n\t\t\txTime = Double.POSITIVE_INFINITY;\n\t\t\n\t\tif (this.getYVelocity() > 0)\n\t\t\tyTime = (getWorld().getHeight() - getYCoordinate() -getRadius()) / getYVelocity();\n\t\tif (this.getYVelocity() < 0)\n\t\t\tyTime = - ( getYCoordinate() - getRadius()) / getYVelocity();\n\t\tif (this.getYVelocity() == 0)\n\t\t\tyTime = Double.POSITIVE_INFINITY;\n\t\t\n\t\treturn Math.min(xTime, yTime);\t\n\t}",
"Behavior getBehavior();",
"public eBehavior getBehavior() {\n return behavior;\n }",
"public final void rule__Environment__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2264:1: ( ( 'gravity' ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2265:1: ( 'gravity' )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2265:1: ( 'gravity' )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2266:1: 'gravity'\n {\n before(grammarAccess.getEnvironmentAccess().getGravityKeyword_2()); \n match(input,25,FOLLOW_25_in_rule__Environment__Group__2__Impl4825); \n after(grammarAccess.getEnvironmentAccess().getGravityKeyword_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"private float getAIMove() {\r\n\t\treturn 1.0f / 5;\r\n\t}",
"@Override\n public Point3D getValue() {\n return velocity;\n }",
"@Override\n public void update(float deltaTime) {\n this.lastPosition.set(this.position.x, this.position.y, this.position.z);\n\n this.velocity.x -= (K_M * this.velocity.x) * deltaTime;\n this.velocity.y -= (K_M * this.velocity.y) * deltaTime;\n this.velocity.z -= (K_M * this.velocity.z + GRAVITY) * deltaTime;\n\n // update position\n if (this.position.z > 0) {\n this.velocity.add(0, 0, -GRAVITY);\n }\n\n this.velocity.scl(deltaTime);\n this.position.add(this.velocity.x, this.velocity.y, this.velocity.z);\n if (this.position.z < 0) { // ball bounces on floor\n this.velocity.z = -this.velocity.z;\n this.position.z += this.velocity.z;\n\n if (this.velocity.z > 0.9f) {\n this.bounce.play(0.2f);\n }\n\n this.velocity.z -= this.velocity.z / 4;\n this.velocity.x -= this.velocity.x / 32;\n this.velocity.y -= this.velocity.y / 32;\n }\n this.velocity.scl(1 / deltaTime);\n }",
"public static float[] getGravityFromOrientation(float[] orientation) {\n\n float[] components = new float[3];\n\n float pitch = orientation[1];\n float roll = orientation[2];\n\n // Find the gravity component of the X-axis\n // = g*-cos(pitch)*sin(roll);\n components[0] = (float) -(gravity[0]\n * -Math.cos(pitch) * Math\n .sin(roll));\n\n // Find the gravity component of the Y-axis\n // = g*-sin(pitch);\n components[1] = (float) (gravity[1] * -Math\n .sin(pitch));\n\n // Find the gravity component of the Z-axis\n // = g*cos(pitch)*cos(roll);\n components[2] = (float) (gravity[2]\n * Math.cos(pitch) * Math.cos(roll));\n\n return components;\n }",
"private static Vector2 calculateAcceleration(PhysicsGameObject obj){\n Vector2 gravity = gravityForce(obj);\n Vector2 friction = frictionForce(obj);\n return new Vector2(friction.x + gravity.x,friction.y + gravity.y);\n }",
"public float getLinearDamping () {\n\t\treturn body.getLinearDamping();\n\t}",
"public MovingBehaviour getMovingBehaviour() {\n\t\treturn this.movingBehaviour;\n\t}",
"public double getDelta() {\r\n return delta;\r\n }",
"public static SpatialAccelerationReadOnly newGravitationalSpatialAcceleration(RigidBodyReadOnly rootBody, double gravity)\n {\n Vector3D gravitationalAcceleration = new Vector3D(0.0, 0.0, gravity);\n Vector3D zero = new Vector3D();\n MovingReferenceFrame bodyFixedFrame = rootBody.getBodyFixedFrame();\n ReferenceFrame worldFrame = ReferenceFrame.getWorldFrame();\n return new SpatialAcceleration(bodyFixedFrame, worldFrame, bodyFixedFrame, zero, gravitationalAcceleration);\n }",
"public double[] getPositionCollisionBoundary(){\n\t\tif (!Helper.isValidDouble(this.getTimeCollisionBoundary()) || this.superWorld == null) return null;\n\t\tdouble[] pos = new double[2];\n\t\tpos[0] = this.getPosition()[0] + (this.getVelocity()[0] * this.getTimeCollisionBoundary());\n\t\tpos[1] = this.getPosition()[1] + (this.getVelocity()[1] * this.getTimeCollisionBoundary());\n\t\t\n\t\tif (pos[0] + this.getRadius() >= this.superWorld.getWorldHeight()) pos[0]+= this.getRadius();\n\t\telse if (pos[0] - this.getRadius() >= this.superWorld.getWorldHeight()) pos[0]-= this.getRadius();\n\t\telse if (pos[1] + this.getRadius() >= this.superWorld.getWorldHeight()) pos[1]+= this.getRadius();\n\t\telse\tpos[1] -= this.getRadius();\n\t\t\t\n\t\t\n\t\treturn pos;\n\t}",
"public void calcNewPos() {\n if (!this.isDying) {\n //super.calcNewPos();\n //this.velY+=gravity;\n this.velY = 5;\n newX = posX + velX;\n newY = posY + velY;\n this.animState = monster.getNext(action, direction);\n\n collBottom = false;\n collLeftRight = false;\n } else {\n // We're dying, let's fall through the ground..\n this.newY += this.velY;\n if (deadCycleCount < 2) {\n this.animState = monster.getNext(action, direction);\n }\n }\n }",
"public Point2D.Float getVelocity() {\r\n\t\treturn velocity;\r\n\t}",
"public float getDelta() {\n\t\treturn delta;\n\t}",
"private static double calculateForce(double mass1, double mass2, double g, double distance) {\n if (distance > 0)\n return ((mass1 * mass2) * g) / (distance * distance);\n else\n return 0.0;\n }",
"public Velocity getVelocity() {\r\n return this.v.getVelocity();\r\n }",
"public void boingg(Player player) {\n if (player.getCircle().getBoundsInParent().intersects(right.getBoundsInParent())) {\n\n if ((int) player.normalVelocityX == 0) {\n player.normalVelocityX = 4;\n } else {\n player.normalVelocityX = Math.abs(player.normalVelocityX) * springiness;\n }\n\n } else if (player.getCircle().getBoundsInParent().intersects(left.getBoundsInParent())) {\n if ((int) player.normalVelocityX == 0) {\n player.normalVelocityX = -4;\n } else {\n player.normalVelocityX = Math.abs(player.normalVelocityX) * -springiness;\n }\n } else {\n player.normalVelocityX *= springiness;\n }\n\n player.normalVelocityY *= -springiness;\n player.angularVelocity *= -springiness;\n \n rectangle.setFill(AssetManager.springSkin(false));\n\n }",
"public double getDelta() {\n return delta;\n }",
"public double getCurrentVelocity( )\r\n {\r\n return Math.sqrt( this.h_velocity * this.h_velocity + this.v_velocity * this.v_velocity );\r\n }",
"public int getMotionMode() {\n\t\treturn m_motionMode;\n\t}",
"public void setGravity ( boolean gravity ) {\n\t\tinvokeSafe ( \"setGravity\" , gravity );\n\t}",
"public double getVelocity()\n {\n return velocity * FPS;\n }",
"public abstract void switchGravity() throws SlickException;",
"public void setGravity(double value) {\n\t\tmyLevel.setGravityVal(value / GRAVITY_OFFSET_VALUE);\n\t}",
"protected abstract float getFrameTimeNormalAnimation();",
"public void setGravity(int gravity) {\n mTextContainer.setGravity(gravity);\n }",
"public void onUpdate()\n {\n this.prevPosX = this.posX;\n this.prevPosY = this.posY;\n this.prevPosZ = this.posZ;\n this.motionY -= 0.03999999910593033D;\n this.moveEntity(this.motionX, this.motionY, this.motionZ);\n this.motionX *= 0.9800000190734863D;\n this.motionY *= 0.9800000190734863D;\n this.motionZ *= 0.9800000190734863D;\n\n if (this.onGround)\n {\n this.motionX *= 0.699999988079071D;\n this.motionZ *= 0.699999988079071D;\n this.motionY *= -0.5D;\n }\n\n if (this.fuse-- <= 0)\n {\n if (!this.worldObj.isRemote)\n {\n this.setDead();\n this.explode();\n }\n } else\n {\n this.worldObj.spawnParticle(\"smoke\", this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D);\n }\n }",
"protected void update(float delta)\n {\n float stiffnessScale = 1f/16f;\n\n // FORCE CALCULATIONS\n float springForceX = -owner.STIFFNESS*stiffnessScale*(position.x - desiredPosition.x);\n float dampingForceX = owner.DAMPING * velocity.x;\n float forceX = springForceX - dampingForceX;\n\n float springForceY = -owner.STIFFNESS*stiffnessScale*(position.y - desiredPosition.y);\n float dampingForceY = owner.DAMPING * velocity.y;\n float forceY = springForceY - dampingForceY;\n\n float springForceZ = -owner.STIFFNESS*stiffnessScale*(position.z - desiredPosition.z);\n float dampingForceZ = owner.DAMPING * velocity.z;\n float forceZ = springForceZ - dampingForceZ;\n\n applyForce(forceX, forceY, forceZ);\n\n\n velocity.x += acceleration.x * delta;\n velocity.y += acceleration.y * delta;\n velocity.z += acceleration.z * delta;\n\n position.x += velocity.x * delta;\n position.y += velocity.y * delta;\n position.z += velocity.z * delta;\n //only want positive Z, as that is how the alpha color on the grid is determined\n position.z = abs(position.z);\n\n //not really accurate but it works\n velocity.scl(owner.DAMPING*delta);\n if(velocity.len2() < MathUtils.FLOAT_ROUNDING_ERROR)\n {\n velocity.x = velocity.y = velocity.z = 0;\n }\n\n color.lerp(desiredColor, delta * 0.5f);\n }",
"public boolean atVelocity() {\n return false;\n }",
"public void update() {\n\t\t\n\t\t// Calculating all forces to apply to the physics shapes\n\t\tArrayList<Object[]> forces = new ArrayList<Object[]>();\n\t\tfor(PhysicsShape shape : shapes) {\n\t\t\tfor(PhysicsShape shape2 : shapes) {\n\t\t\t\tif(!(shape == shape2))\n\t\t\t\t\tforces.addAll(shape.allForcesFromShape(shape2));\n\t\t\t}\n\t\t}\n\n\t\t// Adding force of gravity to each shape, directly downward.\n\t\tfor(PhysicsShape shape : shapes) {\n\t\t\tif(!shape.equals(ground))\n\t\t\t\tforces.add(new Object[] {shape, shape.getX(), shape.getY(), shape.getMass() * 9.81f, 0 - (float) (Math.PI / 2.0) } );\n\t\t}\n\t\t\n\t\t// tester, applies sideways force to the left\n\t\tif(shapes.get(1).getY() == 200.0f) {\n\t\t\tforces.add(new Object[] {shapes.get(1), 300f, 125f, 1000f, (float) Math.PI});\n\t\t}\n\t\t\n\t\t// Applying each force to the shapes to set new vX, vY and omega values for this tick.\n\t\t// Force array is in format [PhysicsShape, x, y, magnitude, direction]\n\t\tfor(Object[] force : forces) {\n\t\t\t\n\t\t\tPhysicsShape shape = (PhysicsShape) force[0];\n\t\t\tfloat x = (float) force[1];\n\t\t\tfloat y = (float) force[2];\n\t\t\tfloat magnitude = (float) force[3];\n\t\t\tfloat direction = (float) force[4];\n\t\t\t\n\t\t\tshape.applyForce(x, y, magnitude, direction);\n\t\t}\n\t\t\n\t\t// Tells each PhysicsShape to move one tick forwards with the new vX, vY and omega values\n\t\tfor(PhysicsShape shape : shapes) {\n\t\t\tshape.act();\n\t\t}\n\t\t\n\t}",
"public static double getDelta()\n\t{\n\t\treturn delta;\n\t}",
"private double hitungG_pelukis(){\r\n return Math.sqrt(Math.pow(super.getRadius(),2)+Math.pow(tinggi,2));\r\n }"
] |
[
"0.70823556",
"0.67827374",
"0.6567245",
"0.65402436",
"0.6501717",
"0.6344685",
"0.61789805",
"0.60402143",
"0.585729",
"0.5849453",
"0.57422763",
"0.57198083",
"0.56506073",
"0.562788",
"0.5617574",
"0.5616637",
"0.56077915",
"0.5577916",
"0.55714124",
"0.55282164",
"0.5461326",
"0.54380053",
"0.5419639",
"0.54008836",
"0.53785694",
"0.5358973",
"0.5354111",
"0.53518444",
"0.5315952",
"0.5315752",
"0.5290641",
"0.5275557",
"0.52737296",
"0.5267114",
"0.52595156",
"0.5258949",
"0.5227783",
"0.52273875",
"0.522641",
"0.5200164",
"0.5192191",
"0.5191862",
"0.51895785",
"0.5172154",
"0.51596475",
"0.515069",
"0.5131684",
"0.512698",
"0.51256406",
"0.5110915",
"0.5089912",
"0.5081412",
"0.5077956",
"0.5077585",
"0.50751555",
"0.5070271",
"0.5048336",
"0.50402576",
"0.50335664",
"0.5025959",
"0.5021977",
"0.4999466",
"0.4983707",
"0.49737278",
"0.49719194",
"0.49570417",
"0.49516845",
"0.49498233",
"0.4944327",
"0.49283433",
"0.49282336",
"0.49256453",
"0.4925189",
"0.4924944",
"0.4919095",
"0.4917332",
"0.49151513",
"0.4913677",
"0.49078092",
"0.49058756",
"0.4901575",
"0.48958376",
"0.4895089",
"0.489472",
"0.48908785",
"0.48893252",
"0.48786965",
"0.48782003",
"0.48680925",
"0.48675784",
"0.48671043",
"0.48667505",
"0.48655558",
"0.48644957",
"0.48632666",
"0.4854081",
"0.4850368",
"0.48471114",
"0.4844894",
"0.4844245",
"0.48383158"
] |
0.0
|
-1
|
Explanation Inplace calculate the prefix XOR of input A. For each query [i, j], if i == 0, query result = A[j] if i != 0, query result = A[i 1] ^ A[j] Complexity Time O(N) O(1) extra space O(Q) for output
|
public int[] xorQueries(int[] A, int[][] queries) {
int[] res = new int[queries.length], q;
for (int i = 1; i < A.length; ++i)
A[i] ^= A[i - 1];
for (int i = 0; i < queries.length; ++i) {
q = queries[i];
res[i] = q[0] > 0 ? A[q[0] - 1] ^ A[q[1]] : A[q[1]];
}
return res;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private static int xorOperation(int n, int start) {\n\t\tint num = start;\n\t\tint ans = start;\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\tnum = start + 2*i;\n\t\t\tans = ans^num;\n\t\t}\n\t\treturn ans;\n\t}",
"static void findRepeating(int A[]) {\n int xor = 0;\n for (int i = 0; i < A.length; i++) {\n System.out.println(A[i]+ \" \"+ ((1 << A[i])));\n xor ^= (1 << A[i]);\n }\n System.out.println(\" xor \"+xor);\n\n System.out.println(\"The odd occurring elements are: \");\n for (int i = 0; i < A.length; i++) {\n if ((xor & (1 << A[i])) > 0) {\n System.out.printf(\"%d \", A[i]);\n xor ^= (1 << A[i]); // to avoid printing duplicates\n }\n }\n }",
"public int solution(int[] A) {\n int mid = A.length/2, res =0;\n for (int i = 0, j = mid+1; i < mid ; i++,j++)\n\t\t\t\tres = res ^ (A[i] ^ A[j]);\n\t\treturn res ^ A[mid];\n }",
"public static int singleNumberXOR(int[] nums) {\n\n int i = 0;\n for (int num : nums) {\n i ^= num;\n }\n\n return i;\n }",
"private static int[] szyfrujXOR(String str, String key) {\n int[] output = new int[str.length()];\n for(int i = 0; i < str.length(); i++) {\n int o = (Integer.valueOf(str.charAt(i)) ^ Integer.valueOf(key.charAt(i % (key.length() - 1)))) + '0';\n output[i] = o;\n }\n return output; \n }",
"static int getMissingNo (int a[], int n) \n { \n int x1 = a[0]; \n int x2 = 1; \n \n for (int i = 1; i <= n; i++) {\n if(i != n)\n x1 = x1 ^ a[i]; \n x2 = x2 ^ (i+1); \n \n }\n System.out.println(\"x2 :\"+x2);\n return (x1 ^ x2); \n \n /* //For xor of all the elements \n //in array \n for (int i = 1; i < n; i++) {\n \n System.out.print(x1+\" ^ \"+a[i]);\n x1 = x1 ^ a[i]; \n System.out.println(\"=\"+x1);\n \n }\n System.out.println(\"x1 :\"+x1);\n System.out.println(\"==\");\n //For xor of all the elements \n // from 1 to n+1 \n for (int i = 2; i <= n+1; i++) {\n \tSystem.out.print(x2+\" ^ \"+i);\n x2 = x2 ^ i; \n System.out.println(\"=\"+x2);\n }\n \n System.out.println(\"x2 :\"+x2);\n return (x1 ^ x2); */\n }",
"ArrayList<Integer> xor(ArrayList<Integer> plaintext, ArrayList<Integer> keytext) {\r\n\r\n ArrayList<Integer> solution = new ArrayList<>();\r\n\r\n int keyIndex = keytext.size();\r\n\r\n for (int i = 8; i > 0; i--) {\r\n solution.add(plaintext.get(keyIndex - i) ^ keytext.get(keyIndex - i));\r\n }\r\n\r\n return solution;\r\n }",
"public int get_odd_occurences_optimal_v2(int[] a) {\n\t\tint result = 0;\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\tresult ^= i;\n\t\t}\n\t\treturn result;\n\t}",
"public static int[] exe1(int[] arr){ // Solution O(n) in time and constant in Memory\n int nzeros=0;\n\n for (int i=0; i<arr.length; i++) {\n arr[i-nzeros] = arr[i];\n if (arr[i] == 0) {\n nzeros++;\n }\n }\n for (int i=arr.length-1; i>arr.length-nzeros-1; i--) {\n arr[i] = 0;\n }\n\n return arr;\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\tint[] a = {1,2,4,1,2};//4 = 100, 1 = 001{1^0 =1, 0^0=0, 0^1=1, 1^1=0}\r\n\t\tint result = a[0];\r\n\t\tfor(int i =1; i<a.length;i++)\r\n\t\t{\r\n\t\t\tresult=result^a[i];\r\n\t\t}\r\n\t\tSystem.out.println(\"single repeated elements is: \"+result);\r\n\t}",
"public static void main(String[] args) {\n\n\t\tint[] a = { 2, 3, 5, 6, 5, 3, 6, 2, 1 };\n\t\tint res = a[0];\n\n\t\tfor (int i = 1; i <= a.length - 1; i++)\n\n\t\t{\n\t\t\tres = res ^ a[i]; // xor -bitwise operator\n\t\t}\n\n\t\tSystem.out.println(res);\n\n\t}",
"public int singleNumber_k2_p1(int[] A) {\n int x1 = 0;\n\n for (int i : A) {\n x1 ^= i;\n }\n\n return x1;\n }",
"private long getPrefixValue(int preIndex){\n long result = 0;\n for(int index = 0; index<=preIndex;index++){\n result = result^array[index];\n }\n return result;\n }",
"public static String xor(String firstInput, String secondInput) { \n StringBuilder result = new StringBuilder();\n\n for (int i = 0; i < firstInput.length(); i++) {\n if (firstInput.charAt(i) == secondInput.charAt(i)) {\n result.append(\"0\");\n } else {\n result.append(\"1\");\n }\n }\n\n return result.toString();\n }",
"public static int method3(int temp[]) {\r\n\t\tint res = 0;\r\n\t\tfor (int i = 0; i < temp.length; i++) {\r\n\t\t\tres = res ^ temp[i];\r\n\t\t}\r\n\t\treturn res;\r\n\t}",
"int[] productExceptSelf(int[] nums) {\n int leng = nums.length;\n int[] ret = new int[leng];\n if (leng == 0)\n return ret;\n int runningprefix = 1;\n for (int i = 0; i < leng; i++) {\n ret[i] = runningprefix;\n runningprefix *= nums[i];\n }\n int runningsufix = 1;\n for (int i = leng - 1; i >= 0; i--) {\n ret[i] *= runningsufix;\n runningsufix *= nums[i];\n }\n return ret;\n }",
"public static final int[] get_XOR(){\n\t\treturn get_AND();\n\t}",
"@Override\n\tpublic void visit(BitwiseXor arg0) {\n\n\t}",
"@Override\n\tpublic void visit(BitwiseXor arg0) {\n\t\t\n\t}",
"protected void xor(final EWAHCompressedBitmap a,\n\t\t\tfinal BitmapStorage container) {\n\t\tfinal EWAHIterator i = a.getEWAHIterator();\n\t\tfinal EWAHIterator j = getEWAHIterator();\n\t\tif (!(i.hasNext() && j.hasNext())) {// this never happens...\n\t\t\tcontainer.setSizeInBits(sizeInBits());\n\t\t}\n\t\t// at this point, this is safe:\n\t\tBufferedRunningLengthWord rlwi =\n\t\t\t\tnew BufferedRunningLengthWord(i.next());\n\t\tBufferedRunningLengthWord rlwj =\n\t\t\t\tnew BufferedRunningLengthWord(j.next());\n\t\twhile (true) {\n\t\t\tfinal boolean i_is_prey = rlwi.size() < rlwj.size();\n\t\t\tfinal BufferedRunningLengthWord prey = i_is_prey ? rlwi : rlwj;\n\t\t\tfinal BufferedRunningLengthWord predator = i_is_prey ? rlwj : rlwi;\n\t\t\tif (prey.getRunningBit() == false) {\n\t\t\t\tfinal long predatorrl = predator.getRunningLength();\n\t\t\t\tfinal long preyrl = prey.getRunningLength();\n\t\t\t\tfinal long tobediscarded =\n\t\t\t\t\t\t(predatorrl >= preyrl) ? preyrl : predatorrl;\n\t\t\t\tcontainer.addStreamOfEmptyWords(predator.getRunningBit(),\n\t\t\t\t\t\ttobediscarded);\n\t\t\t\tfinal long dw_predator =\n\t\t\t\t\t\tpredator.dirtywordoffset\n\t\t\t\t\t\t\t\t+ (i_is_prey ? j.dirtyWords() : i.dirtyWords());\n\t\t\t\tcontainer.addStreamOfDirtyWords(\n\t\t\t\t\t\ti_is_prey ? j.buffer() : i.buffer(), dw_predator,\n\t\t\t\t\t\tpreyrl - tobediscarded);\n\t\t\t\tpredator.discardFirstWords(preyrl);\n\t\t\t\tprey.discardFirstWords(preyrl);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// we have a stream of 1x11\n\t\t\t\tfinal long predatorrl = predator.getRunningLength();\n\t\t\t\tfinal long preyrl = prey.getRunningLength();\n\t\t\t\tfinal long tobediscarded =\n\t\t\t\t\t\t(predatorrl >= preyrl) ? preyrl : predatorrl;\n\t\t\t\tcontainer.addStreamOfEmptyWords(!predator.getRunningBit(),\n\t\t\t\t\t\ttobediscarded);\n\t\t\t\tfinal int dw_predator =\n\t\t\t\t\t\tpredator.dirtywordoffset\n\t\t\t\t\t\t\t\t+ (i_is_prey ? j.dirtyWords() : i.dirtyWords());\n\t\t\t\tfinal long[] buf = i_is_prey ? j.buffer() : i.buffer();\n\t\t\t\tfor (int k = 0; k < preyrl - tobediscarded; ++k)\n\t\t\t\t\tcontainer.add(~buf[k + dw_predator]);\n\t\t\t\tpredator.discardFirstWords(preyrl);\n\t\t\t\tprey.discardFirstWords(preyrl);\n\t\t\t}\n\t\t\tfinal long predatorrl = predator.getRunningLength();\n\t\t\tif (predatorrl > 0) {\n\t\t\t\tif (predator.getRunningBit() == false) {\n\t\t\t\t\tfinal long nbre_dirty_prey = prey.getNumberOfLiteralWords();\n\t\t\t\t\tfinal long tobediscarded =\n\t\t\t\t\t\t\t(predatorrl >= nbre_dirty_prey) ? nbre_dirty_prey\n\t\t\t\t\t\t\t\t\t: predatorrl;\n\t\t\t\t\tfinal long dw_prey =\n\t\t\t\t\t\t\tprey.dirtywordoffset\n\t\t\t\t\t\t\t\t\t+ (i_is_prey ? i.dirtyWords() : j\n\t\t\t\t\t\t\t\t\t\t\t.dirtyWords());\n\t\t\t\t\tpredator.discardFirstWords(tobediscarded);\n\t\t\t\t\tprey.discardFirstWords(tobediscarded);\n\t\t\t\t\tcontainer.addStreamOfDirtyWords(\n\t\t\t\t\t\t\ti_is_prey ? i.buffer() : j.buffer(), dw_prey,\n\t\t\t\t\t\t\ttobediscarded);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfinal long nbre_dirty_prey = prey.getNumberOfLiteralWords();\n\t\t\t\t\tfinal long tobediscarded =\n\t\t\t\t\t\t\t(predatorrl >= nbre_dirty_prey) ? nbre_dirty_prey\n\t\t\t\t\t\t\t\t\t: predatorrl;\n\t\t\t\t\tfinal int dw_prey =\n\t\t\t\t\t\t\tprey.dirtywordoffset\n\t\t\t\t\t\t\t\t\t+ (i_is_prey ? i.dirtyWords() : j\n\t\t\t\t\t\t\t\t\t\t\t.dirtyWords());\n\t\t\t\t\tpredator.discardFirstWords(tobediscarded);\n\t\t\t\t\tprey.discardFirstWords(tobediscarded);\n\t\t\t\t\tfinal long[] buf = i_is_prey ? i.buffer() : j.buffer();\n\t\t\t\t\tfor (int k = 0; k < tobediscarded; ++k)\n\t\t\t\t\t\tcontainer.add(~buf[k + dw_prey]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// all that is left to do now is to AND the dirty words\n\t\t\tfinal long nbre_dirty_prey = prey.getNumberOfLiteralWords();\n\t\t\tif (nbre_dirty_prey > 0) {\n\t\t\t\tfor (int k = 0; k < nbre_dirty_prey; ++k) {\n\t\t\t\t\tif (i_is_prey)\n\t\t\t\t\t\tcontainer.add(i.buffer()[prey.dirtywordoffset\n\t\t\t\t\t\t\t\t+ i.dirtyWords() + k]\n\t\t\t\t\t\t\t\t^ j.buffer()[predator.dirtywordoffset\n\t\t\t\t\t\t\t\t\t\t+ j.dirtyWords() + k]);\n\t\t\t\t\telse\n\t\t\t\t\t\tcontainer.add(i.buffer()[predator.dirtywordoffset\n\t\t\t\t\t\t\t\t+ i.dirtyWords() + k]\n\t\t\t\t\t\t\t\t^ j.buffer()[prey.dirtywordoffset\n\t\t\t\t\t\t\t\t\t\t+ j.dirtyWords() + k]);\n\t\t\t\t}\n\t\t\t\tpredator.discardFirstWords(nbre_dirty_prey);\n\t\t\t}\n\t\t\tif (i_is_prey) {\n\t\t\t\tif (!i.hasNext()) {\n\t\t\t\t\trlwi = null;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\trlwi.reset(i.next());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!j.hasNext()) {\n\t\t\t\t\trlwj = null;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\trlwj.reset(j.next());\n\t\t\t}\n\t\t}\n\t\tif (rlwi != null)\n\t\t\tdischarge(rlwi, i, container);\n\t\tif (rlwj != null)\n\t\t\tdischarge(rlwj, j, container);\n\t\tcontainer.setSizeInBits(Math.max(sizeInBits(), a.sizeInBits()));\n\t}",
"public int missingNumber(int[] nums) {\n \n int result = 0;\n \n for(int i = 0; i < nums.length; i++){\n //to make for loop goes continuously, we put XOR nums.length after the loop \n result ^= nums[i] ^ i;\n }\n \n //we do XOR nums.length(i.e. n) now\n \n return result^nums.length;\n }",
"public static void xor(ImageProcessor input, ImageProcessor output) {\r\n\t\tfor (int x = 0; x < output.getWidth(); x++) {\r\n\t\t\tfor (int y = 0; y < output.getHeight(); y++) {\r\n\t\t\t\tboolean a = input.get(x, y) > 127;\r\n\t\t\t\tboolean b = output.get(x, y) > 127;\r\n\t\t\t\tboolean aXORb = (a && !b) || (!a && b);\r\n\t\t\t\toutput.set(x, y, aXORb ? WHITE : BLACK);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\tint[] A = {1,5,6,1,5};\r\n\t\tint x = 0;\r\n\t\tfor (int a : A) {\r\n\t\t\tx = x ^ a;\r\n\t\t\tSystem.out.println(\"x=\"+x +\" a=\"+a);\r\n\t\t}\r\n\t\tSystem.out.println(x);\r\n\t}",
"public ByteArrayImplementation xor(ByteArrayImplementation a) {\n int min = this.length() < a.length() ? this.length() : a.length();\n int max = this.length() > a.length() ? this.length() : a.length();\n\n byte[] result = new byte[max];\n for (int i = 0; i < min; i++) {\n result[i] = (byte) (this.getData()[i] ^ a.getData()[i]);\n }\n return new ByteArrayImplementation(result);\n }",
"static int[] xor(int[] s1, int[] s2) {\n int[] array = new int[s1.length];\n for (int i = 0; i < s1.length; i++) {\n array[i] = s1[i] ^ s2[i];\n }\n return array;\n }",
"static int[] OnepassSol1(int[]a, int n){\r\n Map<Integer, Integer> map = new HashMap<>();\r\n for (int i = 0; i < a.length; i++) {\r\n int complement = n - a[i];\r\n if (map.containsKey(complement)) {\r\n return new int[] { map.get(complement), i };\r\n }\r\n map.put(a[i], i);\r\n }\r\n int[] ans = {-1,-1};\r\n return ans;\r\n }",
"static int[] productExceptSelfSpaceOptimized(int[] nums) {\n int n = nums.length;\n int[] result = new int[n];\n Arrays.fill(result, 1);\n int curr = 1;\n\n for (int i = 0; i < n; i++) {\n result[i] *= curr;\n curr *= nums[i];\n }\n\n curr = 1;\n for (int i = n - 1; i >= 0; i--) {\n result[i] *= curr;\n curr *= nums[i];\n }\n\n return result;\n }",
"public EWAHCompressedBitmap xor(final EWAHCompressedBitmap a) {\n\t\tfinal EWAHCompressedBitmap container = new EWAHCompressedBitmap();\n\t\tcontainer.reserve(this.actualsizeinwords + a.actualsizeinwords);\n\t\txor(a, container);\n\t\treturn container;\n\t}",
"@Override\n public int findMissingNumber(int[] nums) {\n if (nums == null || nums.length == 0) {\n return 0;\n }\n int n = nums.length;\n int xor = n;\n for (int i = n - 1; i > 0; i--) {\n xor ^= i;\n }\n for (int i = 0; i < n; i++) {\n xor ^= nums[i];\n }\n return xor;\n }",
"public int[] singleNumberIII(int[] nums) {\n int bit = 0;\n for (int i : nums) {\n bit ^= i;\n }\n bit &= -bit;\n int[] ans = new int[2];\n for (int i : nums) {\n if ((i & bit) == 0) ans[0] ^= i;\n else ans[1] ^= i;\n }\n return ans;\n }",
"private int[] productExceptSelfByMathAndConstantSpace(int[] nums){\n int len = nums.length;\n int[] ret = new int[len]; // not count as extra space\n\n // prefix\n ret[0] = 1;\n for(int i = 1; i < len; i++){\n ret[i] = ret[i - 1] * nums[i - 1];\n }\n\n // right to keep the suffix product of i, and ret[i](product) = ret[i](prefix) * right(suffix); and then update right.\n int right = 1; // keep right value of ret[i]\n for(int i = len - 1; i >= 0; i--){\n ret[i] = right * ret[i]; // prefix prdocut of i(ret[i] for current i) * suffix product of i(right, actaully is 'i + 1' for current i)\n right = right * nums[i]; // suffix product of i(actually suffix product of \"i+1\" when right is used.)\n }\n\n return ret;\n }",
"public ArrBag<T> xor( ArrBag<T> other)\n {\n return this.union(other).difference(this.intersection(other));\n \n }",
"public int missingNumber(int[] nums) {\n\n int result = 0;\n\n for (int i = 1; i <= nums.length; i++) {\n result = result ^ i;\n }\n\n for (int i = 0; i < nums.length; i++) {\n result = result ^ nums[i];\n }\n\n return result;\n }",
"public void xor_nonce(byte[] text){\n for(int i = 0; i < text.length; ++i)\n text[i] ^= nonce[i];\n }",
"private int d(@Nullable K ☃) {\r\n/* 127 */ return (xq.f(System.identityHashCode(☃)) & Integer.MAX_VALUE) % this.b.length;\r\n/* */ }\r\n/* */ private int b(@Nullable K ☃, int i) {\r\n/* */ int j;\r\n/* 131 */ for (j = i; j < this.b.length; j++) {\r\n/* 132 */ if (this.b[j] == ☃) {\r\n/* 133 */ return j;\r\n/* */ }\r\n/* 135 */ if (this.b[j] == a) {\r\n/* 136 */ return -1;\r\n/* */ }\r\n/* */ }",
"public int subarrayBitwiseORs(int[] A) {\n HashSet<Integer> ans = new HashSet<>();\n HashSet<Integer> tmp1 = new HashSet<>();\n for(int x : A) {\n HashSet<Integer> tmp2 = new HashSet<>();\n tmp2.add(x);\n \n // Now OR x with every contiguous combination with x at the end\n // ie {1,2,x} --> {1|2|x}, {2|x}, {x}\n //\n // A = {1,2,4}\n // x = 4\n // tmp1 = { [2]=2, [1|2]=3 }\n // tmp2 = { 4=4, 4|[2]=6, 4|[1|2]=7 }\n // ans = { [1]=1, [2]=2, [1|2]=3, [4]=4, [2|4]=6, [1|2|4]=7 }\n for(int y : tmp1) {\n tmp2.add(x | y);\n }\n ans.addAll(tmp2);\n tmp1 = tmp2;\n }\n return ans.size();\n }",
"public final void rule__AstExpressionBitxor__OperatorAssignment_1_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25186:1: ( ( ( '^' ) ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25187:1: ( ( '^' ) )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25187:1: ( ( '^' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25188:1: ( '^' )\n {\n before(grammarAccess.getAstExpressionBitxorAccess().getOperatorCircumflexAccentKeyword_1_1_0()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25189:1: ( '^' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25190:1: '^'\n {\n before(grammarAccess.getAstExpressionBitxorAccess().getOperatorCircumflexAccentKeyword_1_1_0()); \n match(input,92,FOLLOW_92_in_rule__AstExpressionBitxor__OperatorAssignment_1_150604); \n after(grammarAccess.getAstExpressionBitxorAccess().getOperatorCircumflexAccentKeyword_1_1_0()); \n\n }\n\n after(grammarAccess.getAstExpressionBitxorAccess().getOperatorCircumflexAccentKeyword_1_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"static int[] productExceptSelf(int[] nums) {\n int n = nums.length;\n int[] prefix = new int[n];\n int[] suffix = new int[n];\n\n prefix[0] = 1;\n suffix[n - 1] = 1;\n\n for (int i = 1; i < n; i++) {\n prefix[i] = prefix[i - 1] * nums[i - 1];\n }\n\n for (int i = n - 2; i >= 0; i--) {\n suffix[i] = suffix[i + 1] * nums[i + 1];\n }\n\n int[] result = new int[n];\n for (int i = 0; i < n; i++) {\n result[i] = prefix[i] * suffix[i];\n }\n return result;\n }",
"void knot(int n,int c,int []x){\n int nplusc = n + c;\n int nplus2 = n + 2;\n x[1] = 0;\n for(int i = 2;i <= nplusc;i++){\n if((i > c) && (i < nplus2)){\n x[i] = x[i-1] + 1;\n }else{\n x[i] = x[i-1];\n }\n }\n }",
"private static void exchange(int[] A, int i, int j) {\n if(A[i] == A[j]) return;\n\n A[i] = A[i] ^ A[j];\n A[j] = A[i] ^ A[j];\n A[i] = A[i] ^ A[j];\n }",
"@ZenCodeType.Operator(ZenCodeType.OperatorType.XOR)\n default IData xor(IData other) {\n \n return notSupportedOperator(OperatorType.XOR);\n }",
"public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int lonelyNumber = 0;\n int a[] = new int[n];\n for(int a_i=0; a_i < n; a_i++){\n a[a_i] = in.nextInt();\n }\n \n for (int index = 0; index < a.length; index++) {\n lonelyNumber ^= a[index];\n }\n \n System.out.println(lonelyNumber);\n }",
"public int singleNumber2(int[] nums) {\n int res = 0;\n for (int num : nums) {\n res ^= num;\n }\n return res;\n }",
"public static void main(String[] args) {\n\t\tint[] nums = {4,1,2,1,2};\n\n\t\tint val = 0;\n\t\tfor(int i=0;i<nums.length;i++) {\n\t\t\tval^=nums[i];\n\t\t}\n\t\tSystem.out.println(val);\n\t}",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = 4;\n\t\tint numList[] = {2, 5, 3, 3};\n\t\tint oddnumList[] = new int[2];\n\t\t\n\t\tHashMap <Integer, Integer> oddnumCntMap = new HashMap <Integer, Integer> ();\n\t\tint oddnumCnt = 1;\n\t\tfor (int i=0; i<numList.length; i++) {\n\t\t\tif (oddnumCntMap.containsKey(numList[i])) {\n\t\t\t\toddnumCnt = oddnumCntMap.get(numList[i])+1;\n\t\t\t}\n\t\t\toddnumCntMap.put(numList[i], oddnumCnt);\n\t\t}\n\t\n\t\tint idx = 0;\n\t\tfor (Integer numCK : oddnumCntMap.keySet()) {\n\t\t\tif (oddnumCntMap.get(numCK)%3==1) {\n\t\t\t\toddnumList[idx++] = numCK;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint xor_result = oddnumList[0] ^ oddnumList[1];\n\t\t\n\t\tSystem.out.println(\"XOR결과--->\"+xor_result);\n\t}",
"public static int example4(int[] arr) { // O(1)\r\n\t\tint n = arr.length, prefix = 0, total = 0; // O(1), O(1), (1)\r\n\t\tfor (int j = 0; j < n; j++) { // loop from 0 to n-1 // O(n)\r\n\t\t\tprefix += arr[j];\r\n\t\t\ttotal += prefix;\r\n\t\t}\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: The method contains a (for) loop and it runs (n) times.This loop\r\n\t\t * dominates the runtime.We always aim for the worse-case and maximum time. The\r\n\t\t * answer is it is linear time of O(n) notation.\r\n\t\t * \r\n\t\t */\r\n\t}",
"public static int[] productExceptSelf(int[] nums) {\n if(nums==null || nums.length == 0)\n \t throw new IllegalArgumentException(\"Input array is either null or empty !!\");\n int N = nums.length;\n\t int[] result = new int}N];\n result}0] = 1;\n for(int l=1;l<N;l++) {\n \t if( nums}l-1]==0)\n \t\t nums}l-1] =1;\n \t result}l] = result}l-1] * nums}l-1];\n }",
"public Object visitBitwiseXorExpression(GNode n) {\n Object a, b, result;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(1));\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n result = (Long) a ^ (Long) b;\n }\n else {\n result = parens(a) + \" ^ \" + parens(b);\n }\n \n return result;\n }",
"public static int singleNumber2(int[] nums) {\n int result = 0;\n for (int i : nums) result ^= i;\n return result;\n }",
"public static boolean constantTimeEq(byte[] a, byte[] b) {\n if (a.length != b.length) {\n return false;\n }\n int result = 0;\n for (int i = 0; i < a.length; i++) {\n result |= a[i] ^ b[i];\n }\n return result == 0;\n }",
"public static void main(String [] args){\n\t\tint [] A = {0,1,1,1}; //1110\r\n\t\tint [] B = {1,0,1,0};\r\n\t\tint [] C = new Hw2p1q4().binarySum(A, B, A.length);\r\n\t\tfor(int i=A.length; i>=0; i--){\r\n\t\t\tSystem.out.print(C[i]);\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\r\n\t\tint arr[]= {0,0,4,0,0,1,2};\r\n\t\tfor(int i=0;i<arr.length;i++) {\r\n\t\tfor(int j=i;j<arr.length;j++) {\r\n\t\t\t\r\n\t\t\tif(arr[i]==0 && arr[j]!=0) {\r\n\t\t\t\t\r\n\t\t\t\tint temp=arr[j];\r\n\t\t\t\tarr[j]=arr[i];\r\n\t\t\t\tarr[i]=temp;\r\n\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\r\n\t\t\t\r\n\t\t}\r\n\t\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\tfor(int k=0;k<arr.length;k++)\r\n\t\t\tSystem.out.println(arr[k]);\r\n\t}",
"public void xorSet(HashMap<Integer, Integer> Path) {\n int[] newMM = new int[x.length]; // == MaxMatch (+) P\n\n // In Path, Not In MaxMatch\n for (int i : Path.keySet()) {\n int j = Path.get(i);\n int A = Math.min(i, j);\n int B = Math.max(i, j);\n if (MaxMatch[A] != B) { // (i,j) in Path and not in MaxMatch\n newMM[A] = B;\n V1.remove(A);\n V2.remove(B);\n\n //System.out.println(A + \" -- \" + B);\n //printFree();\n }\n }\n\n // In MaxMatch, Not In Path\n for (int i = 0; i < x.length; i++) {\n int j = MaxMatch[i];\n if (j != 0) {\n if (((Path.get(i) != null && Path.get(i) != j) || Path.get(i) == null) && (Path.get(j) != null && Path.get(j) != i) || Path.get(j) == null) {\n newMM[i] = j;\n V1.remove(i);\n V2.remove(j);\n //System.out.println(i + \" --- \" + j);\n //printFree();\n }\n }\n }\n MaxMatch = newMM;\n\n if (debug == 1) printMaxiumMatching();\n }",
"void reverseIterative(char arr[],int start) {\n // Your Logic Here\n for(int i=start;i<arr.length/2;i++)\n {\n if(arr[i] != arr[arr.length-1-i])\n {\n arr[i]^=arr[arr.length-1-i];\n arr[arr.length-1-i]^=arr[i];\n arr[i]^=arr[arr.length-1-i];\n }\n }\n}",
"private boolean slowEquals(byte[] a, byte[] b)\n {\n int diff = a.length ^ b.length;\n for(int i = 0; i < a.length && i < b.length; i++)\n diff |= a[i] ^ b[i];\n return diff == 0;\n }",
"public static void XOR() {\n System.out.println(\"---\");\n System.out.println(\"This section will create, and train a neural network with the topology of 2-2-1. That is\\n\" +\n \"there are 2 input neurons, 2 hidden neurons, and 1 output neuron. The XOR problem will be using the\\n\" +\n \"XOR_training_data.txt file to get the training data. In order to make training simpler, the 0's have\\n\" +\n \"been substituted with -1's.\");\n System.out.println(\"Training...\");\n NeuralNetwork xor = (NeuralNetwork)StochasticBackPropagation.SBP(2, 2, 1, \"XOR_training_data.txt\", 20000, 0.1, 0.05);\n System.out.println(\"Trained.\");\n\n double[] input = new double[2];\n System.out.println(\"Input: -1 -1\");\n input[0] = -1;\n input[1] = -1;\n double[] output = xor.feedForward(input);\n System.out.println(\"Expected Output: -1\");\n System.out.println(\"Actual Output: \"+Math.round(output[0])); //rounding to make output cleaner.\n\n System.out.println(\"Input: -1 1\");\n input[0] = -1;\n input[1] = 1;\n output = xor.feedForward(input);\n System.out.println(\"Expected Output: 1\");\n System.out.println(\"Actual Output: \"+Math.round(output[0]));\n\n System.out.println(\"Input: 1 -1\");\n input[0] = 1;\n input[1] = -1;\n output = xor.feedForward(input);\n System.out.println(\"Expected Output: 1\");\n System.out.println(\"Actual Output: \"+Math.round(output[0]));\n\n System.out.println(\"Input: 1 1\");\n input[0] = 1;\n input[1] = 1;\n output = xor.feedForward(input);\n System.out.println(\"Expected Output: -1\");\n System.out.println(\"Actual Output: \"+Math.round(output[0]));\n System.out.println(\"---\\n\");\n }",
"static int findOneMissingNumber(int a[]) {\n int number = 0;\n int size = a.length;\n for (int i = 0; i < size; i++)\n number ^= ((i + 1) ^ a[i]);\n number ^= (size + 1);\n return number;\n }",
"static void findTwoMissingNumber(int a[]) {\n int miss1 = 0;\n int miss2;\n int miss1miss2 = 0;\n\n int size = a.length;\n for (int i = 0; i < size; i++) {\n miss1miss2 ^= ((i + 1) ^ a[i]);\n }\n\n miss1miss2 ^= (size + 1);\n miss1miss2 ^= (size + 2);\n\n int diff = miss1miss2 & (-miss1miss2);\n\n for (int i = 0; i < size; i++) {\n if (((i + 1) & diff) > 0)\n miss1 ^= (i + 1);\n\n if ((a[i] & diff) > 0)\n miss1 ^= a[i];\n }\n\n if (((size + 1) ^ diff) > 0)\n miss1 ^= (size + 1);\n\n if (((size + 2) ^ diff) > 0)\n miss1 ^= (size + 2);\n\n miss2 = miss1miss2 ^ miss1;\n\n System.out.println(miss1);\n System.out.println(miss2);\n }",
"private int Sum0(int x) {\n int a = ROTR(2, x);\n int b = ROTR(13, x);\n int c = ROTR(22, x);\n int ret = a ^ b ^ c;\n return ret;\n }",
"public static void betterApproach(int matrix[][]){\n\t\t\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\t\tboolean auxR[] = new boolean[m];\n\t\tboolean auxC[] = new boolean[n];\n\t\t\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tauxR[i] = false;\n\t\t}\n\t\t\n\t\tfor(int j = 0;j<n;j++){\n\t\t\tauxC[j] = false;\n\t\t}\n\t\t\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tif(matrix[i][j] == 0){\n\t\t\t\t\tauxR[i] = true;\n\t\t\t\t\tauxC[j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tif(auxR[i] == true || auxC[j] == true){\n\t\t\t\t\tmatrix[i][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public int singleNumber(int[] nums) {\n int bit = 0;\n for (int i : nums) {\n bit ^= i;\n System.out.println(bit);\n }\n return bit;\n }",
"public void moveZeroes2(int[] nums) {\n int zeroCount = 0;\n int lastZeroIndex = 0;\n for(int i = 0; i < nums.length; i++) {\n if( nums[i] != 0 && zeroCount > 0) {\n nums[lastZeroIndex++] = nums[i];\n nums[i] = 0; //lazy swap, just making it 0\n zeroCount--;\n }\n if( nums[i] == 0 ) {\n if(zeroCount == 0)\n lastZeroIndex = i;\n zeroCount++;\n }\n }\n }",
"public int checkOddOccurences( int[] A ){\n\tfor (int i=0;i<A.length;i++){\n\t\tint z=0;\n\t\tfor (int j=0;j<A.length;j++){\n\t\t\tif (i != j){\n\t\t\t\tif (A[i]==A[j]){\n\t\t\t\t\tz++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (z==0){\n\t\t\treturn A[i];\n\t\t}\n\t}\n }",
"public int singleNumber(int[] nums) {\n int result = 0;\n for (int i = 0; i < nums.length; i++) {\n result ^= nums[i];\n }\n return result;\n }",
"public static void main(String[] args){\n\t\t int[] input = {1,3,0,3,0,6,0,9,23,45};\n\t\t int[] output = new ShiftAllZero().shiftZero(input);\n\t\t for (int index = 0; index < input.length; index++) {\n\t\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(output[index]);\n\t\t\t\n\t\t\t}\n\t\t \n\t\t \n\t\t \n\t \n\t }",
"private static boolean slowEquals(final byte[] a, final byte[] b) {\n int diff = a.length ^ b.length;\n for (int i = 0; i < a.length && i < b.length; i++) {\n diff |= a[i] ^ b[i];\n }\n return diff == 0;\n }",
"public int singleNumber(final List<Integer> A) {\n int a=0, b=0;\n for(int i=0;i<A.size();i++){\n int n = (a & ~A.get(i)) | (b & A.get(i));\n b = (b & ~A.get(i)) | (~a & ~b & A.get(i));\n a = n;\n }\n return a|b;\n }",
"@OperationMeta(opType = OperationType.INFIX)\n public static boolean xor(boolean b1, boolean b2) {\n return b1 ^ b2;\n }",
"public static int missingNumberBitManipulation(int[] nums) {\n if (nums == null || nums.length == 0) return -1;\n\n int missing = nums.length;\n for (int i = 0; i < nums.length; i++) {\n missing ^= i ^ nums[i];\n }\n return missing;\n }",
"private static int findMissingNumber( int[] a, int n) {\n int result = 0;\n for(int i=1; i<(n+1)+1; i++) {\n result = result ^ i;\n }\n for(int i=0; i<a.length; i++) {\n result = result ^ a[i];\n }\n return result;\n }",
"public void setZeroes(int[][] matrix) {\n int MOD = -1000000;\n //no of rows\n int m = matrix.length;\n //no of columns\n int n = matrix[0].length;\n //Iterate over the matrix\n for (int i = 0; i<m; i++)\n {\n for (int j = 0; j<n; j++)\n {\n //check if element is 0\n if(matrix[i][j] == 0)\n {\n \n //for all the values in that row i which contains the 0 element \n for (int k = 0; k < n ; k++)\n {\n //Check for non zero elements in that row \n if(matrix[i][k] !=0)\n {\n //Assign dummy value to it\n matrix[i][k] = MOD;\n }\n }\n //all the values in that column j which contains the 0 element\n for (int k=0; k< m; k++)\n { \n //Check for non zero elements in that column\n if(matrix[k][j]!=0)\n {\n //Assign dummy value to it\n matrix[k][j] = MOD;\n } \n }\n }\n }\n }\n //Iterate again for final output matrix\n for (int i = 0; i< m ; i++)\n {\n for (int j = 0; j< n; j++ )\n {\n //Check if the value of element is MOD\n if (matrix[i][j] == MOD)\n {\n //if so Change to 0\n matrix[i][j] = 0;\n }\n }\n }\n \n }",
"public static void main(String args[]) {\n Scanner in = new Scanner(System.in);\n int n=in.nextInt();\n int a[]=new int[n];\n int c=0,e=0;\n for(int i=0;i<n;i++)\n a[i]=in.nextInt();\n int b[]=new int[10];\n int d[]=new int[10];\n for(int j=0;j<n;j++)\n {\n if(a[j]==0)\n {\n b[c++]=a[j];\n }\n else\n {\n d[e++]=a[j];\n }\n }\n for(int k=0;k<=e;k++)\n a[k]=d[k];\n int f=(n-e)-1;\n for(int l=1;l<=f;l++)\n a[e+l]=0;\n for(int m=0;m<n;m++)\n System.out.print(a[m]+\" \");\n \n }",
"public void shiftLeft(int[] nums, int zeroIndex)\n {\n // shift everything 1 to the left\n for ( int i = zeroIndex; i < nums.length - 1; i++)\n {\n nums[i] = nums[i+1];\n }\n \n // put zero at last\n nums[nums.length-1] = 0;\n }",
"public static void getConsicutiveOnes(int[] arr) {\n int pointerVar;\n int i;\n int counter = 0;\n int oldCounter = 0;\n\n for (i = 0; i < arr.length; i++) {\n pointerVar = 0;\n while (pointerVar < arr.length) {\n if (arr[i] == 1 && arr[i] == arr[pointerVar]) {\n counter++;\n } else {\n counter = 0;\n }\n pointerVar++;\n }\n\n }\n System.out.println(\"Counter Value :Old counter\" + counter);\n\n }",
"private static boolean slowEquals(byte[] a, byte[] b) {\n\t int diff = a.length ^ b.length;\n\t for(int i = 0; i < a.length && i < b.length; i++)\n\t diff |= a[i] ^ b[i];\n\t return diff == 0;\n\t }",
"static int sockMerchant(int n, int[] ar) {\n int result = 0;\n for (int i = 0; i < ar.length - 1; ++i) {\n for (int j = 1; j < ar.length; ++j) {\n if (ar[i] == ar[j] && i != j) {\n if (ar[i] != 0 && ar[j] != 0) {\n result += 1;\n ar[i] = 0;\n ar[j] = 0;\n }\n }\n }\n }\n return result;\n }",
"public int singleNumber1(int[] nums) {\n\t\tif(nums == null || nums.length == 0) return 0;\n\t \n\t int n = nums.length;\n\t int ans = 0;\n\t for(int i=0; i<n; i++) {\n\t ans ^= nums[i];\n\t System.out.println(ans);\n\t }\n\t \n\t return ans;\n }",
"public static void findNumberOccurringOddTimes() {\n int arr[] = {1, 1, 2, 2, 3, 3, 3};\n int result = 0;\n for (int num : arr)\n result ^= num;\n System.out.println(\"Odd times occurring number : \" + result);\n }",
"public final void rule__AstExpressionBitxor__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17335:1: ( rule__AstExpressionBitxor__Group__0__Impl rule__AstExpressionBitxor__Group__1 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17336:2: rule__AstExpressionBitxor__Group__0__Impl rule__AstExpressionBitxor__Group__1\n {\n pushFollow(FOLLOW_rule__AstExpressionBitxor__Group__0__Impl_in_rule__AstExpressionBitxor__Group__034888);\n rule__AstExpressionBitxor__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstExpressionBitxor__Group__1_in_rule__AstExpressionBitxor__Group__034891);\n rule__AstExpressionBitxor__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public void moveZeroes(int[] nums) {\n for(int i=0; i<nums.length-1; i++) {\n if(nums[i] == 0) {\n int j=i+1;\n while(j < nums.length) {\n if(nums[j] != 0) {\n break;\n }\n j++;\n }\n //switch\n if(j < nums.length) {\n nums[i] = nums[j];\n nums[j] = 0;\n \n }\n }\n }\n }",
"int minOperations(int[] arr) {\n // Write your code here\n Set<String> set = new HashSet<>();//store visited string\n Queue<String> queue = new LinkedList<>(); // store next strs\n int counter = 0;\n\n queue.offer(getKey(arr));\n set.add(getKey(arr));\n\n while (!queue.isEmpty()) {\n int size = queue.size();\n List<String> curs = new ArrayList<>();\n while (size > 0) {\n curs.add(queue.poll());\n size--;\n }\n\n for(String cur : curs) {\n if (isIncreasing(cur)) {\n return counter;\n }\n\n for(int i = 0; i < cur.length(); i++) {\n String next = reverseString(cur, i);\n if (!set.contains(next)) {\n set.add(next);\n queue.offer(next);\n }\n }\n }\n\n counter++;\n }\n\n return counter;\n }",
"public int[] exclusive_or(int[] array1, int[] array2) {\n int L = array1.length;\n int R = array2.length;\n int[] r_array = new int[L];\n int[] e_array = { -4, -4, -4, -4 }; // -4 dient der Fehlererkennung\n\n if (L == R && L > 0) {\n for (int i = 0; i < L; i++) {\n r_array[i] = array1[i] ^ array2[i];\n }\n return r_array;\n } else\n return e_array;\n }",
"public void missingNumberEfficient2(int[] array, int n) {\n\t\t\n\t\tint X = 0;\n\t\tint Y = 0;\n\t\t\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\tX ^= array[i];\n\t\t}\n\t\t\n\t\tfor(int i = 1; i <= n; i++) {\n\t\t\tY ^= i;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Missing Number is : \" + (X ^ Y));\n\t}",
"public int get_odd_occurences_optimal_v1(int[] a) {\n\t\tHashMap<Integer, Integer> hashSet = new HashMap<>();\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\tif (hashSet.containsKey(a[i])) {\n\t\t\t\thashSet.put(a[i], hashSet.get(a[i]) + 1);\n\t\t\t} else {\n\t\t\t\thashSet.put(a[i], 1);\n\t\t\t}\n\t\t}\n\t\tfor (Integer i : hashSet.keySet()) {\n\t\t\tif (hashSet.get(i) % 2 != 0) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"public static void ThreeSum_cubic(int[] a)\r\n\t{\r\n\t for (int i = 0; i < a.length; ++i)\r\n\t {\r\n\t for (int j = i+1; j < a.length; ++j)\r\n\t {\r\n\t for (int k = j + 1; k < a.length; ++k)\r\n\t {\r\n\t if (a[i] + a[j] + a[k] == 0)\r\n\t System.out.println(\"[\" + a[i] + \",\" + a[j] + \",\" + a[k] + \"]\");\r\n\t }\r\n\t }\r\n\t }\r\n\t}",
"public int[] solution(int N, int[] P, int[] Q) {\n int[] primes = new int[N + 1];\n int[] prefixSum = new int[N + 1];\n\n for (int i = 2; i * i < N+1; i++) {\n if (primes[i] == 0) {\n int k = i + i;\n for (; k < N+1; k+=i) {\n if (primes[k] == 0) {\n primes[k] = i;\n }\n }\n }\n }\n for (int i = 4; i < N+1; i++) {\n if (primes[i] != 0 && i % primes[i] == 0 && primes[i/primes[i]] == 0) {\n prefixSum[i] = prefixSum[i - 1] + 1;\n } else {\n prefixSum[i] = prefixSum[i - 1];\n }\n }\n\n\n int[] retVal = new int[P.length];\n for (int j = 0; j < P.length; j++) {\n retVal[j] = prefixSum[Q[j]] - prefixSum[P[j] - 1];\n }\n return retVal;\n }",
"public int xorCardinality(final EWAHCompressedBitmap a) {\n\t\tfinal BitCounter counter = new BitCounter();\n\t\txor(a, counter);\n\t\treturn counter.getCount();\n\t}",
"public static void main(String[] args) {\n\n\t\tint a = 3;\n\t\tint b = 8;\n\n\t\tint xor = a ^ b;\n\t\t// now count set bits in that xor.\n\n\t\tint c = 0;\n\t\twhile (xor != 0) {\n\t\t\tint rmsbm = xor & -xor;\n\t\t\txor = xor - rmsbm;\n\t\t\tc++;\n\t\t}\n\n\t\tSystem.out.println(c);\n\n\t}",
"public void moveZeroes(int[] nums) \n {\n if ( nums == null || nums.length < 2 ) return;\n \n int pivot = nums.length - 1;\n int curr = 0;\n while ( curr < pivot )\n {\n if ( nums[curr] == 0 )\n {\n shiftLeft(nums, curr);\n pivot--;\n }\n else\n {\n curr++;\n }\n }\n }",
"public BufferedImage bitwiseXOR(BufferedImage image, BufferedImage image1) {\r\n int[][][] arr = convertToArray(image);\r\n int[][][] arr1 = convertToArray(image1);\r\n\r\n int width = arr.length, height = arr[0].length;\r\n int width1 = arr1.length, height1 = arr1[0].length;\r\n\r\n int x = (width < width1) ? width : width1; //get area to add\r\n int y = (height < height1) ? height : height1;\r\n\r\n for (int i = 0; i < y; i++) {\r\n for (int j = 0; j < x; j++) {\r\n arr[j][i][1] = arr[j][i][1] ^ arr1[j][i][1] & 0xff;\r\n arr[j][i][2] = arr[j][i][2] ^ arr1[j][i][2] & 0xff;\r\n arr[j][i][3] = arr[j][i][3] ^ arr1[j][i][3] & 0xff;\r\n }\r\n }\r\n return convertToBimage(arr);\r\n }",
"static int missingNumber(int[] nums) {\n int ret = 0;\n for(int i = 0; i < nums.length; i++) {\n ret ^= i;\n ret ^= nums[i];\n }\n return ret^=nums.length;\n }",
"void reverseH(char arr[],int start) {\nif(arr == null)\n return;\n if(start==(arr.length/2))\n return;\n \n int i=start;\n if(arr[i] != arr[arr.length-1-i])\n {\n arr[i]^=arr[arr.length-1-i];\n arr[arr.length-1-i]^=arr[i];\n arr[i]^=arr[arr.length-1-i];\n }\n reverseH(arr,start+1);\n}",
"public static void main(String[] args) {\n\t\tint a[]= {2,3,4,5,6,5,4,3,2};\r\n\t\tfor(int i:a) {\r\n \t\t\tSystem.out.print(\" \"+i);\r\n \t\t}\r\n \t\tSystem.out.println();\r\n \t\tSystem.out.print(\"Missing number \");\r\n \t\tint single=a[0];\r\n \t\tfor(int i=1;i<a.length;i++) {\r\n \t\t single=single^a[i];\r\n \t\t}\r\n \t\tSystem.out.print(single);\r\n \t\t\r\n \r\n\t}",
"int xnor(int num1, int num2)\n {\n return ~((num1 | num2) & ~(num1 & num2));\n }",
"public int singleNumber(int[] nums) {\n int ans = 0;\n for (int num : nums) {\n ans ^= num;\n }\n return ans;\n }",
"public bit xor(bit other)\n\t{\n\t\tbit xorBit = new bit();\n\t\t\n\t\tif(bitHolder.getValue() == other.getValue())\n\t\t{\n\t\t\txorBit.setValue(0);\n\t\t}else\n\t\t{\n\t\t\txorBit.setValue(1);\n\t\t}\n\t\t\n\t\treturn xorBit;\n\t}",
"private static int[] productExceptSelf(int[] nums) {\n int[] result = new int[nums.length];\n\n result[0] = 1;\n for (int i = 1; i < nums.length; i++) {\n result[i] = result[i - 1] * nums[i - 1];\n }\n\n int prodRight = 1;\n for (int j = nums.length - 2; j >= 0; j--) {\n prodRight *= nums[j + 1];\n result[j] = result[j] * prodRight;\n }\n\n return result;\n\n }",
"public static List<Integer> solution(int n) {\n List<Integer> result = new ArrayList<Integer>();\n for (int i = 0; i < (1 << n); i++) {\n result.add(i ^ (i >> 1));\n }\n return result;\n }",
"private static boolean slowEquals(byte[] a, byte[] b) {\r\n int diff = a.length ^ b.length;\r\n for (int i = 0; i < a.length && i < b.length; i++) {\r\n diff |= a[i] ^ b[i];\r\n }\r\n return diff == 0;\r\n }",
"public static void main(String[] args) {\n\n\t\tScanner s=new Scanner(System.in);\n\t\tint t=s.nextInt();\n\t\twhile(t>0)\n\t\t{\n\t\t\tStringBuilder st=new StringBuilder();\n\t\t\tint a=s.nextInt();\n\t\t\tint b=s.nextInt();\n\t\t\tString s1=Integer.toBinaryString(a);\n\t\t\tString s2=Integer.toBinaryString(b);\n\t\t\tint l1=s1.length();\n\t\t\tint l2=s2.length();\n\t\t\tif(l1<l2)\n\t\t\t{\n\t\t\t\tst.append(s1);\n\t\t\t\tfor(int i=0;i<l2-l1;i++)\n\t\t\t\t{\n\t\t\t\t\tst.append('0');\n\t\t\t\t}\n\t\t\t\ts1=st.toString();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tst.append(s2);\n\t\t\t\tfor(int i=0;i<l1-l2;i++)\n\t\t\t\t{\n\t\t\t\t\tst.append('0');\n\t\t\t\t}\n\t\t\t\ts2=st.toString();\n\t\t\t}\n\t\t\tint xor=Integer.parseInt(s1,2)^Integer.parseInt(s2,2);\n\t\t\tSystem.out.println(xor);\n\t\t\tt--;\n\t\t}\n\t}"
] |
[
"0.6246851",
"0.60140413",
"0.5826614",
"0.5800845",
"0.5688873",
"0.56875014",
"0.5666193",
"0.5653126",
"0.5651183",
"0.5640895",
"0.5637091",
"0.56225085",
"0.5605396",
"0.5593523",
"0.5498118",
"0.54976654",
"0.5459265",
"0.5433978",
"0.5428117",
"0.54215103",
"0.5407927",
"0.53492785",
"0.53161275",
"0.5315105",
"0.5302843",
"0.5280218",
"0.52792585",
"0.5196128",
"0.5170928",
"0.51288724",
"0.5116525",
"0.5090912",
"0.50780714",
"0.5071517",
"0.5061672",
"0.5054086",
"0.5051254",
"0.5040903",
"0.501997",
"0.5015632",
"0.5014023",
"0.50080854",
"0.49430665",
"0.493893",
"0.49379158",
"0.49326578",
"0.4921156",
"0.4900652",
"0.48868394",
"0.48801285",
"0.4865874",
"0.48561785",
"0.48486775",
"0.48406556",
"0.48405436",
"0.48393017",
"0.4791316",
"0.47870407",
"0.47713152",
"0.4768807",
"0.47643116",
"0.47630736",
"0.4757226",
"0.47549593",
"0.4745872",
"0.47311768",
"0.47275132",
"0.47237238",
"0.47170347",
"0.47163597",
"0.47124112",
"0.4700158",
"0.4690009",
"0.46861538",
"0.4681163",
"0.46793082",
"0.46777627",
"0.4676777",
"0.4671701",
"0.46665168",
"0.46639115",
"0.46597221",
"0.4656436",
"0.46506438",
"0.46476498",
"0.4640298",
"0.46367747",
"0.4630625",
"0.46260446",
"0.4617225",
"0.461513",
"0.46118477",
"0.4611522",
"0.4611118",
"0.4609667",
"0.46081316",
"0.46049666",
"0.4603748",
"0.45998496",
"0.45982152"
] |
0.64435947
|
0
|
Inflate the layout for this fragment
|
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_tab2, container, false);
//find webView layout
//find id
button1 = view.findViewById(R.id.buttonId1);
button2 = view.findViewById(R.id.buttonId2);
button3 = view.findViewById(R.id.buttonId3);
button4 = view.findViewById(R.id.buttonId4);
button5 = view.findViewById(R.id.buttonId5);
button6 = view.findViewById(R.id.buttonId6);
button7 = view.findViewById(R.id.buttonId7);
button8 = view.findViewById(R.id.buttonId8);
button1.setOnClickListener(this);
button2.setOnClickListener(this);
button3.setOnClickListener(this);
button4.setOnClickListener(this);
button5.setOnClickListener(this);
button6.setOnClickListener(this);
button7.setOnClickListener(this);
button8.setOnClickListener(this);
return view;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}",
"@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }",
"protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}",
"@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }"
] |
[
"0.6740675",
"0.6725193",
"0.67224836",
"0.6699259",
"0.6691596",
"0.668896",
"0.6687658",
"0.66861755",
"0.667755",
"0.66756433",
"0.6667425",
"0.66667783",
"0.6665166",
"0.66614723",
"0.66549766",
"0.665031",
"0.6643759",
"0.6639389",
"0.66378653",
"0.66345453",
"0.6626348",
"0.66202056",
"0.66176945",
"0.66094035",
"0.65976113",
"0.65937936",
"0.6585841",
"0.6585124",
"0.65741223",
"0.65721804",
"0.65698904",
"0.65695107",
"0.6569451",
"0.6568099",
"0.6565633",
"0.6554688",
"0.65533894",
"0.65447044",
"0.65432465",
"0.6542017",
"0.65385425",
"0.6537571",
"0.65369105",
"0.6535379",
"0.6533447",
"0.6533258",
"0.65316767",
"0.6529574",
"0.6528449",
"0.65262675",
"0.6525467",
"0.6525181",
"0.6524235",
"0.6523963",
"0.65187466",
"0.65138274",
"0.65137535",
"0.6513218",
"0.6513202",
"0.65115535",
"0.651113",
"0.6510943",
"0.6510124",
"0.65094703",
"0.65082514",
"0.65038425",
"0.65023196",
"0.6501983",
"0.65014684",
"0.64982104",
"0.64945936",
"0.6492533",
"0.6491023",
"0.6488248",
"0.64879525",
"0.6487852",
"0.6487744",
"0.64873713",
"0.6487171",
"0.64851",
"0.6485003",
"0.6483167",
"0.6482433",
"0.64824027",
"0.6481711",
"0.6480902",
"0.64779234",
"0.64767206",
"0.6476515",
"0.6475657",
"0.64747864",
"0.64715266",
"0.64714354",
"0.64711314",
"0.6470619",
"0.6468112",
"0.6466466",
"0.64631015",
"0.646268",
"0.6462456",
"0.64620507"
] |
0.0
|
-1
|
endregion region Private Methods
|
private void initUI(ActivityUserListBinding binding) {
userHolder = (UserParameterHolder) getIntent().getSerializableExtra(Constants.USER_PARAM_HOLDER_KEY);
// Toolbar
if(userHolder.return_types.equals("follower")) {
initToolbar(binding.toolbar, getString(R.string.user_follower_list_toolbar_name));
}else {
initToolbar(binding.toolbar, getString(R.string.user_following_list_toolbar_name));
}
// setup Fragment
setupFragment(new UserListFragment());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private stendhal() {\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n protected void getExras() {\n }",
"@Override\n protected void prot() {\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\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"protected OpinionFinding() {/* intentionally empty block */}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n public void func_104112_b() {\n \n }",
"private TMCourse() {\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"private void m50366E() {\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"public void smell() {\n\t\t\n\t}",
"public void mo38117a() {\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tprotected void getData() {\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 }",
"public void method_4270() {}",
"@Override\n protected void init() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override public int describeContents() { return 0; }",
"public void mo4359a() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"private void kk12() {\n\n\t}",
"protected void mo6255a() {\n }",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void memoria() {\n \n }",
"public void mo12628c() {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"private Singletion3() {}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"public void mo21782G() {\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 }",
"protected Problem() {/* intentionally empty block */}",
"@Override\n public void init() {\n\n }",
"public void mo21793R() {\n }",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"public final void mo91715d() {\n }",
"public void mo21779D() {\n }",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"@SuppressWarnings(\"unused\")\n private void _read() {\n }",
"private ReportGenerationUtil() {\n\t\t\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"private MApi() {}",
"private void poetries() {\n\n\t}",
"public void mo21825b() {\n }",
"public void mo115190b() {\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}",
"private static void iterator() {\n\t\t\r\n\t}",
"public void mo55254a() {\n }",
"@Override\n void init() {\n }",
"public void mo21785J() {\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"private DiscretePotentialOperations() {\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"private OMUtil() { }",
"public abstract void mo70713b();",
"protected boolean func_70814_o() { return true; }",
"@Override\n public void init() {\n }",
"private PrngFixes() {\n }"
] |
[
"0.65270585",
"0.6388565",
"0.62739754",
"0.6255089",
"0.6251729",
"0.6216305",
"0.6199533",
"0.61808753",
"0.6116142",
"0.6116142",
"0.6053167",
"0.6046995",
"0.60004693",
"0.59820765",
"0.5960422",
"0.5960422",
"0.59574",
"0.5925643",
"0.59235185",
"0.5919939",
"0.59197676",
"0.59132123",
"0.5890134",
"0.5869832",
"0.58592755",
"0.5845582",
"0.5838149",
"0.58359504",
"0.5834508",
"0.5830219",
"0.58298206",
"0.58198833",
"0.58180934",
"0.58180934",
"0.58180934",
"0.58180934",
"0.58180934",
"0.58180934",
"0.5817982",
"0.58153296",
"0.58149546",
"0.580939",
"0.58059675",
"0.58039063",
"0.5798205",
"0.57881147",
"0.57808876",
"0.5773885",
"0.5765677",
"0.57620955",
"0.57560015",
"0.575517",
"0.575517",
"0.57384485",
"0.5731976",
"0.57279366",
"0.57172817",
"0.5688272",
"0.5681309",
"0.5675067",
"0.56747544",
"0.5669623",
"0.5669623",
"0.5669623",
"0.5669623",
"0.5669623",
"0.5669623",
"0.5669623",
"0.5667311",
"0.566449",
"0.56643015",
"0.56622195",
"0.566136",
"0.56613153",
"0.56605333",
"0.5659622",
"0.56589437",
"0.5655792",
"0.56524324",
"0.56524324",
"0.56505084",
"0.56492007",
"0.5646776",
"0.5646575",
"0.56444466",
"0.56443846",
"0.56427145",
"0.56376916",
"0.5634479",
"0.56292266",
"0.56283444",
"0.56283444",
"0.5625393",
"0.56229675",
"0.56222546",
"0.5622049",
"0.56217897",
"0.562049",
"0.56151307",
"0.5614713",
"0.56139106"
] |
0.0
|
-1
|
The main entry point... your program starts here
|
public static void main(String[] args) throws java.io.IOException {
char inChar = ' ';
// Student data
String accounts[][] = { {"Rachel", "500.1", "451.45", "2"},
{"Ross", "293.23", "120.45", "7"},
{"Monica", "423.3", "400.3", "4"},
{"Chandler", "628.4", "282.67", "3"},
{"Phoebe", "345.25", "84.4", "1"},
{"Joey", "123.4", "345.3", "8"},
{"Robin", "523.6", "500.45", "3"},
{"Lily", "264.43", "323.45", "6"},
{"Marshall", "523.3", "290.3", "7"},
{"Ted", "328.4", "584.6", "3"},
{"Barney", "545.35", "233.4", "5"},
{"Spongebob","673.4", "666.3", "9"}
};
// Read student data
ArrayList<Student> stuList = new ArrayList<>();
for(int i = 0; i < accounts.length; i++) {
Student stu = new Student(accounts[i][0], Double.valueOf(accounts[i][1]), Double.valueOf(accounts[i][2]), Integer.valueOf(accounts[i][3]));
stuList.add(stu);
}
// // test-Print
// System.out.println("****Print Student Info****");
//
// for(Student stu : stuList) {
// stu.show();
// }
// Construct an ArrayList to read commands
ArrayList<Character> comList = new ArrayList<>();
do {
System.out.println("*****Enter choice 'c' to get the number of students in each grade level, then press <enter>*****");
System.out.println("*****Enter choice 'p' to get the 2D-map of the stops, then press <enter>*****");
System.out.println("*****Enter choice 'h' to get the last three commands(when commands are more than three), then press <enter>*****");
System.out.println("*****Enter choice 'q' to quit, then press <enter>*****");
inChar = (char) System.in.read();
// Read '\r' and '\n' and do nothing
System.in.read();
System.in.read();
// Read commands
comList.add(inChar);
// React to input and take appropriate action
switch (inChar) {
// Calculate how many students are in each grade level and list the results
case 'c':
System.out.println("*****Calculate Student Info****");
int count_elementery = 0;
int count_middle = 0;
for(Student stu : stuList) {
if ( stu.getGrade() >= 1 && stu.getGrade() <= 6)
count_elementery++;
else if (stu.getGrade() >= 7 && stu.getGrade() <= 9)
count_middle++;
}
System.out.println("Number of students in Elementery Grade Level(1-6): " + count_elementery);
System.out.println("Number of students in Middle Grade Level(7-9): " + count_middle);
break;
// Print a region map (2D) that shows where a bus would need to stop for student pick-up/drop-off.
// Allow custom map displays by grade level (i.e. Elementary (1-6), Middle (7-8), or All).
case 'p':
System.out.println("****Print 2D Region Map****");
//Generate 2D-Map
SwingUtilities.invokeLater(() -> {
// ScatterPlot obj = new ScatterPlot(stuList);
// obj.myplot();
ScatterPlot2 obj = new ScatterPlot2(stuList);
obj.main();
obj.setSize(800, 400);
obj.setLocationRelativeTo(null);
// obj.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
});
break;
// Print a history of the last three commands
case 'h':
System.out.println("****Print Command History*****");
System.out.println("Last Three Command History:"+ comList.get(comList.size()-2) + "," + comList.get(comList.size()-3) + "," + comList.get(comList.size()-4));
break;
}
}
// Exit on quit
while (inChar != 'q');
System.out.println("Quiting...");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static void main() {\n \n }",
"public static void main()\n\t{\n\t}",
"public static void main (String []args){\n }",
"public static void main(String[]args) {\n\t\n\t\t\n\n}",
"public static void main(){\n\t}",
"public static void main(String[] args) {\n \n \n \n\t}",
"public static void main(String[] args) {\r\n// Use for unit testing\r\n }",
"public static void main(String []args){\n\n }",
"public static void main(String[] args) {\r\n \r\n }",
"public static void main(String[] args) {\r\n \r\n }",
"public static void main(String[] args) {\n\t \t\n\t \t\n\t }",
"public static void main(String []args){\n }",
"public static void main(String []args){\n }",
"public static void main() {\n }",
"public static void main(String[] args) {\n \n \n \n \n }",
"public static void main(String[] args) {\n \n\n }",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main (String args[]) {\n\t\t\n }",
"public static void main(String[] args){\n\t\t\n\t\t\n \t}",
"public static void main(String[] args) {\n // TODO code application logic here\n // some testing? or actually we can't run it standalone??\n }",
"public static void main(String[] args) {\n \r\n\t}",
"public static void main(String[] args)\r\t{",
"public static void main(String[] args) {}",
"public static void main(String[] args) {}",
"public static void main (String[] args) {\r\n\t\t \r\n\t\t}",
"public static void main (String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n \n \n }",
"public static void main(String[] args) {\n \n \n }",
"public static void main(String[] args) {\n\t \t\n\t \t\n\t}",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n \n\t}",
"public static void main(String[] args) {\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\n\t\t\n\t\t\n\t}",
"public static void main(String args[]){\n\t\t\n\t\n\t}",
"static void main(String[] args)\n {\n }",
"public static void main (String[]args) throws IOException {\n }",
"public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"public static void main (String [] args){\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t}",
"public static void main(String[] args){\n \t\n }",
"public static void main(String[] args) \n\t{\n\t\t\n\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n \n }",
"public static void main(String args[]) throws Exception\n {\n \n \n \n }",
"static void main(String[] args) {\n }",
"public static void main(String[] args) {\n \n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n \n\t}",
"public static void main(String[]args) {\n\t}",
"public static void main(String[] args) {\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n \n\t\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\n\t}",
"public static void main(String[] args) {\n\n\t\t\n\t}",
"public static void main(String[] args)\r\n {\n \r\n \r\n }",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}"
] |
[
"0.7852616",
"0.77244306",
"0.7689179",
"0.7655419",
"0.76532686",
"0.76419336",
"0.76225054",
"0.7614188",
"0.76087534",
"0.76087534",
"0.7597549",
"0.7562496",
"0.7562496",
"0.7556103",
"0.7554594",
"0.7545742",
"0.7520332",
"0.7520332",
"0.75178415",
"0.7511442",
"0.7509346",
"0.75019395",
"0.7489763",
"0.74777967",
"0.74777967",
"0.74755114",
"0.74519825",
"0.7449045",
"0.7449045",
"0.74481124",
"0.7447106",
"0.7447106",
"0.7447106",
"0.7447106",
"0.7447106",
"0.7447106",
"0.74350345",
"0.7434687",
"0.7434069",
"0.74297583",
"0.7417993",
"0.7403494",
"0.7387302",
"0.73830116",
"0.7382177",
"0.73779726",
"0.73779726",
"0.73779726",
"0.73779726",
"0.7377444",
"0.7377146",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.73707485",
"0.7368794",
"0.73664665",
"0.736628",
"0.73642343",
"0.7362837",
"0.7362837",
"0.7362837",
"0.7362837",
"0.73559296",
"0.7355807",
"0.7352432",
"0.7349874",
"0.7349405",
"0.7345739",
"0.7342937",
"0.73418003",
"0.7340653",
"0.7340653",
"0.7340653",
"0.7340653",
"0.7340653",
"0.7340653"
] |
0.0
|
-1
|
NOTE: The following input values will be used for testing your solution.
|
public static void main(String[] args) {
System.out.println(nonRepeating("abcab")); // should return 'c'
System.out.println(nonRepeating("abab")); // should return null
System.out.println(nonRepeating("aabbbc")); // should return 'c'
System.out.println(nonRepeating("aabbdbc")); // should return 'd'
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void solution() {\n\t\t\n\t}",
"@Override\n protected long getTestSolution() {\n return 100024;\n }",
"public static void main(String[] args) {\n Random rand = new Random(47);\n int i, j, k;\n // Choose Value from 1 t0 100\n j = rand.nextInt(100) + 1;\n print(\"j : \" + j);\n k = rand.nextInt(100) + 1;\n print(\"k : \" + k);\n i = j + k;\n print(\" J + k : \" + i);\n i = j - k;\n print(\" j - k : \" + i );\n i = k / j;\n print(\" k /j : \" + i);\n i = k * j;\n print(\"k * j : \" + i );\n i = k%j;\n print(\" k % j\" + i);\n //Floating-point number tests\n float u , v ,w; //Applies to dubles,too\n v = rand.nextFloat();\n print(\"v : \" + v);\n w = rand.nextFloat();\n print(\"w : \" + w);\n u = v + w;\n print(\"v + w :\" + u);\n u = v - w;\n print(\"v - w :\" + u);\n u = v * w;\n print(\"v * w :\" + u);\n u = v / w;\n print(\"u / w: \" + u);\n //The follwing also works for char,\n // byte, short , int , long and double;\n u +=v;\n print(\"u + = v : \" + u);\n u -= v;\n print(\" u -= v: \" + u);\n u *= v;\n print(\"u *= v : \" + u);\n u /= v;\n print(\"u /= v :\" + v);\n }",
"public void get_InputValues(){\r\n\tA[1]=-0.185900;\r\n\tA[2]=-0.85900;\r\n\tA[3]=-0.059660;\r\n\tA[4]=-0.077373;\r\n\tB[1]=30.0;\r\n\tB[2]=19.2;\r\n\tB[3]=13.8;\r\n\tB[4]=22.5;\r\n\tC[1]=4.5;\r\n\tC[2]=12.5;\r\n\tC[3]=27.5;\r\n\tD[1]=16.0;\r\n\tD[2]=10.0;\r\n\tD[3]=7.0;\r\n\tD[4]=5.0;\r\n\tD[5]=4.0;\r\n\tD[6]=3.0;\r\n\t\r\n}",
"public static String solution() {\r\n\t\treturn \"73162890\";\r\n\t}",
"@Test\n\tpublic void testStartingIndicesRegression(){\n\t\tassertLeftmostStartingIndices(\"5,1,7,3,2|-..xxx$1..x...xxx$3....-xx........\", 0, 6, 8, 18, 22);\n\t\tassertRightmostStartingIndices(\"7,5|.......xxx$1....xxx$2..-\", 6, 14);\n\t\t\n\t}",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int no_cases = scanner.nextInt();\n for (int i = 0; i < no_cases; i++) {\n int n = scanner.nextInt();\n int[] input = new int[n];\n for(int j = 0; j < n; j++) {\n input[j] = scanner.nextInt();\n }\n System.out.printf(\"%.2f\\n\", getExpectedValue(input));\n }\n }",
"public static void main(String[] args) {\n\t\t\n\t\tString data = \"\\r\\n\" + \n\t\t\t\t\"3\\r\\n\" + \n\t\t\t\t\"5 2\\r\\n\" + \n\t\t\t\t\"13 32\\r\\n\" + \n\t\t\t\t\"100 1000\";\n\t\t\n\t\tScanner sc = new Scanner(data);\n\t\t\n\t\tint T = sc.nextInt();\n\t\tfor(int test_case = 1; test_case<=T; ++test_case) {\n\t\t\tint minji = sc.nextInt();\n\t\t\tint treasure = sc.nextInt();\n\t\t\tint answer = 0;\n\t\t\t\n\t\t\tint start = (minji<=treasure)? minji : treasure;\n\t\t\tint target = (minji>treasure)? minji : treasure;\n\t\t\t\n\t\t\tint line = 1;\n\t\t\tint left = 1;\n\t\t\tint right =1;\n\t\t\t\n\t\t\tint startLine = 0;\n\t\t\tint targetLine = 0;\n\t\t\t\n\t\t\twhile(startLine == 0 || targetLine == 0) {\n\t\t\t\tif(left <= start && right>= start) \n\t\t\t\t\tstartLine = line;\n\t\t\t\t\n\t\t\t\tif(left <= target && right>= target) {\n\t\t\t\t\ttargetLine = line;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tleft += line;\n\t\t\t\tright += (line + 1);\n\t\t\t\t\n\t\t\t\t++line;\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(startLine + \" \" + targetLine);\n\t\t\t\n\t\t\tleft = start;\n\t\t\tright = start;\n\t\t\tline = startLine;\n\t\t\t\n\t\t\twhile(answer == 0) {\n\t\t\t\tif(targetLine == line) {\n\t\t\t\t\tif(left<=target && right>=target) {\n\t\t\t\t\t\tanswer = targetLine - startLine;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tanswer = targetLine - startLine + Math.min(Math.abs(target - left),Math.abs(right - target));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//System.out.println(left);\n\t\t\t\t\n\t\t\t\tleft += line;\n\t\t\t\tright += (line + 1);\n\t\t\t\t\n\t\t\t\t++line;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"#\" + test_case + \" \" + answer);\n\t\t}\n\t}",
"@Override\n public String solve() {\n int LIMIT = 50 * NumericHelper.ONE_MILLION_INT;\n int[] nCount = new int[LIMIT+1];\n for(long y = 1; y<= LIMIT; y++) {\n for(long d= (y+3)/4; d<y; d++) { // +3 is to make d atleast 1\n long xSq = (y+d) * (y+d);\n long ySq = y * y;\n long zSq = (y-d) * (y-d);\n\n long n = xSq - ySq - zSq;\n\n if(n<0) {\n continue;\n }\n\n if(n>=LIMIT) {\n break;\n }\n\n\n nCount[(int)n]++;\n\n }\n }\n\n int ans = 0;\n for(int i = 1; i<LIMIT; i++) {\n if(nCount[i] == 1) {\n //System.out.print(i +\",\");\n ans++;\n }\n }\n\n return Integer.toString(ans);\n }",
"public static void main(String[] args) {\n\t\t\n\t\t// 10 Tests: \n\t\tList<Integer> a1 = new List<>();\n\t\tList<Integer> b1 = new List<>(1, new List<>(2, new List<>(3, new List<>())));\n\t\t\n\t\tList<Integer> a2 = new List<>(1, new List<>(2, new List<>(3, new List<>())));\n\t\tList<Integer> b2 = new List<>();\n\t\t\n\t\tList<Integer> a3 = new List<>();\n\t\tList<Integer> b3 = new List<>();\n\t\t\n\t\tList<Integer> a4 = new List<>(1, new List<>(2, new List<>(3, new List<>())));\n\t\tList<Integer> b4 = new List<>(4, new List<>(5, new List<>(6, new List<>())));\n\t\t\n\t\tList<Integer> a5 = new List<>(4, new List<>(5, new List<>(6, new List<>())));\n\t\tList<Integer> b5 = new List<>(1, new List<>(2, new List<>(3, new List<>())));\n\t\t\n\t\tList<Integer> a6 = new List<>(1, new List<>(4, new List<>(6, new List<>()))); \n\t\tList<Integer> b6 = new List<>(5, new List<>(6, new List<>(9, new List<>())));\n\t\t\n\t\tList<Integer> a7 = new List<>(-6, new List<>(-5, new List<>(-4, new List<>())));\n\t\tList<Integer> b7 = new List<>(-3, new List<>(-2, new List<>(-1, new List<>())));\n\t\t\n\t\tList<Integer> a8 = new List<>(-2, new List<>(-1, new List<>(0, new List<>())));\n\t\tList<Integer> b8 = new List<>(-1, new List<>(0, new List<>(1, new List<>(2, new List<>()))));\n\t\t\n\t\tList<Integer> a9 = new List<>(-1, new List<>(0, new List<>(1, new List<>())));\n\t\tList<Integer> b9 = new List<>(3, new List<>(4, new List<>(5, new List<>())));\n\t\t\n\t\tList<Integer> a10 = new List<>(-1, new List<>(0, new List<>(1, new List<>())));\n\t\tList<Integer> b10 = new List<>(-1, new List<>(0, new List<>(1, new List<>())));\n\t\t\n\t\tSystem.out.println(unique(a1, b1));\n\t\tSystem.out.println(unique(a2, b2));\n\t\tSystem.out.println(unique(a3, b3));\n\t\tSystem.out.println(unique(a4, b4));\n\t\tSystem.out.println(unique(a5, b5));\n\t\tSystem.out.println(unique(a6, b6));\n\t\tSystem.out.println(unique(a7, b7));\n\t\tSystem.out.println(unique(a8, b8));\n\t\tSystem.out.println(unique(a9, b9));\n\t\tSystem.out.println(unique(a10, b10));\n\t\t\n\t}",
"public static void main(String[] args) {\n\n\n\n double numberOfgallons = 5;\n\n double gallonstolitter = numberOfgallons*3.785;\n\n\n String result = numberOfgallons + \" gallons equal to: \"+gallonstolitter+ \" liters\";\n System.out.println(result);\n\n //=============================================\n /* 2. write a java program that converts litters to gallons\n 1 gallon = 3.785 liters\n 1 litter = 1/3.785\n*/\n\n /*double litter1 = 1/3.785;\n double l =10;\n double gallon1 = l*litter1;\n\n System.out.println(gallon1);\n //======================================================\n*/\n /*\n 3. manually calculate the following code fragements:\n\t\t\t\t1. int a = 200;\n\t\t\t\t\tint b = -a++ + - --a * a-- % 2\n\t\t\t\t\tb = ?\n\n */\n\n\n double numberOfLiters = 100;\n\n double LiterstoGallons = numberOfLiters/3.785;\n\n String result2 = numberOfLiters+\" liters equal to \"+LiterstoGallons+\" galons\";\n\n System.out.println(result2);\n\n\n\n\n\n\n\n\n\n\n\n\n\n int a = 200;\n int b = -a++ + - --a * a-- % 2;\n // b = -200 + - 200* 200%2 = -200;\n\n int x = 300;\n int y = 400;\n int z = x+y-x*y+x/y;\n // z= 300+400-300*400+300/400=700-120000+0(cunki int kimi qebul edir)= -119300;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n }",
"public static void main(String[] args) {\n String input_one = \"Fourscore and seven years ago our fathers brought forth on this continent a new nation, conceived in liberty and dedicated to the proposition that all men are created equal. Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battlefield of that war. We have come to dedicate a portion of that field as a final resting-place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this. But, in a larger sense, we cannot dedicate — we cannot consecrate — we cannot hallow — this ground. The brave men, living and dead, who struggled here have consecrated it, far above our poor power to add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before us — that from these honored dead we take increased devotion to that cause for which they gave the last full measure of devotion — that we here highly resolve that these dead shall not have died in vain — that this nation shall have a new birth of freedom and that government of the people, by the people, for the people, shall not perish from the earth.\";\r\n String input_two = \"Oh, say can you see, by the dawn's early light,What so proudly we hailed at the twilight's last gleaming?Whose broad stripes and brightstars,through the perilous fight,O'er the ramparts we watched, were so gallantly streaming?And the rockets' red glare, the bombs bursting in air,Gave proof through the night that our flag was still there.O say, does that star-spangled banner yet waveO'er the land of the free and the home of the brave?On the shore, dimly seen through the mists of the deep,Wherethe foe's haughty host in dread silence reposes,What isthatwhichthe breeze, o'er the towering steep,As it fitfully blows, now conceals, now discloses?Now it catches the gleam of the morning's first beam,In full glory reflected now shines on the stream:'Tis the starspangled banner! O long may it waveO'er the land of the free and the home of the brave. And where is that band who so vauntingly swore That the havoc of war and the battle's confusionA home and a country should leaveus no more?Their blood has wiped out their foulfootstep'spollution.Norefuge could save the hireling and slaveFrom the terror of flight, or the gloom of the grave:And the star-spangled banner in triumph doth waveO'er theland of the free and the home of the brave.Oh! thus be it ever, when freemen shall stand Between their loved homes and the war's desolation!Blest with victory and peace, may the heaven-rescued land Praise the Power that hath made and preserved us a nation.Then conquer we must, for our cause it is just,And this be our motto: In God is our trust. And the star-spangled banner forever shall waveO'er the land of the free and the home of \";\r\n\r\n String input_upper = input_one.toUpperCase();\r\n String input_upper2 = input_two.toUpperCase();\r\n // System.out.println(input_upper);\r\n String[] pattern = { \"FREE\", \"BRAVE\", \"NATION\" };\r\n // Brute Force algorithm\r\n System.out.println();\r\n System.out.println(\"**************************** OUTPUT OF FIRST INPUT FILE: *****************************\");\r\n System.out.println();\r\n System.out.println(\"\\t\\t\\t\\t\\tBRUTE FORCE ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n BF_Search bf = new BF_Search();\r\n long bf_startTime = System.nanoTime();\r\n for (int i = 0; i < pattern.length; i++) {\r\n bf.brute_force_search(input_upper, pattern[i]);\r\n }\r\n long bf_endTime = System.nanoTime();\r\n bf.printBF_Comparison();\r\n System.out.println(\"It took: \" + (bf_endTime - bf_startTime) + \" nanoseconds\");\r\n\r\n // Knuth Moris Pratt algorithm\r\n System.out.println(\"\\t\\t\\t\\t\\tKNUTH MORIS PRATT ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n KMP_Search kmp = new KMP_Search();\r\n long kmp_startTime = System.nanoTime();\r\n for (int i = 0; i < pattern.length; i++) {\r\n kmp.KMPSearch(pattern[i], input_upper);\r\n if (i == pattern.length - 1) {\r\n kmp.printKM_Comparisons();\r\n }\r\n }\r\n long kmp_endTime = System.nanoTime();\r\n System.out.println(\"It took: \" + (kmp_endTime - kmp_startTime) + \" nanoseconds\");\r\n\r\n // Boyer Moore algorithm\r\n System.out.println();\r\n System.out.println(\"\\t\\t\\t\\t\\tBOYER MOORE ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n BM_Search bm = new BM_Search();\r\n char[] bm_input = input_upper.toCharArray();\r\n char[] bm_pattern = new char[] {};\r\n long bm_startTime = System.nanoTime();\r\n for (String i : pattern) {\r\n bm_pattern = i.toCharArray();\r\n bm.bm_search(bm_input, bm_pattern);\r\n if (pattern[pattern.length - 1] == i) {\r\n bm.printBM_Comparison();\r\n }\r\n }\r\n long bm_endTime = System.nanoTime();\r\n System.out.println(\"It took: \" + (bm_endTime - bm_startTime) + \" nanoseconds\");\r\n\r\n // Rabin Karp algorithm\r\n System.out.println(\"\\t\\t\\t\\t\\tRABIN KARP ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n RKA_Search rk = new RKA_Search();\r\n int q = 101;\r\n long rk_startTime = System.nanoTime();\r\n for (int i = 0; i < pattern.length; i++) {\r\n rk.rka_search(pattern[i], input_upper, q);\r\n if (i == pattern.length - 1) {\r\n rk.printRKA_Comparison();\r\n }\r\n }\r\n long rk_endTime = System.nanoTime();\r\n System.out.println(\"It took: \" + (rk_endTime - rk_startTime) + \" nanoseconds\");\r\n System.out.println();\r\n System.out.println(\"************************* OUTPUT OF SECOND INPUT FILE: *******************************\");\r\n // Brute Force algorithm\r\n System.out.println();\r\n // System.out.println();\r\n System.out.println(\"\\t\\t\\t\\t\\tBRUTE FORCE ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n BF_Search bf2 = new BF_Search();\r\n long bf_startTime1 = System.nanoTime();\r\n for (int i = 0; i < pattern.length; i++) {\r\n bf.brute_force_search(input_upper2, pattern[i]);\r\n }\r\n long bf_endTime2 = System.nanoTime();\r\n bf2.printBF_Comparison();\r\n System.out.println(\"It took: \" + (bf_endTime2 - bf_startTime1) + \" nanoseconds\");\r\n\r\n // Knuth Moris Pratt algorithm\r\n System.out.println(\"\\t\\t\\t\\t\\tKNUTH MORIS PRATT ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n KMP_Search kmp2 = new KMP_Search();\r\n long kmp_startTime1 = System.nanoTime();\r\n for (int i = 0; i < pattern.length; i++) {\r\n kmp2.KMPSearch(pattern[i], input_upper2);\r\n if (i == pattern.length - 1) {\r\n kmp2.printKM_Comparisons();\r\n }\r\n }\r\n long kmp_endTime2 = System.nanoTime();\r\n System.out.println(\"It took: \" + (kmp_endTime2 - kmp_startTime1) + \" nanoseconds\");\r\n\r\n // Boyer Moore algorithm\r\n System.out.println(\"\\t\\t\\t\\t\\tBOYER MOORE ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n BM_Search bm2 = new BM_Search();\r\n char[] bm_input2 = input_upper.toCharArray();\r\n char[] bm_pattern2 = new char[] {};\r\n long bm_startTime1 = System.nanoTime();\r\n for (String i : pattern) {\r\n bm_pattern2 = i.toCharArray();\r\n bm.bm_search(bm_input2, bm_pattern2);\r\n if (pattern[pattern.length - 1] == i) {\r\n bm2.printBM_Comparison();\r\n }\r\n }\r\n long bm_endTime2 = System.nanoTime();\r\n System.out.println(\"It took: \" + (bm_endTime2 - bm_startTime1) + \" nanoseconds\");\r\n\r\n // Rabin Karp algorithm\r\n System.out.println(\"\\t\\t\\t\\t\\tRABIN KARP ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n RKA_Search rk2 = new RKA_Search();\r\n int q2 = 101;\r\n long rk_startTime1 = System.nanoTime();\r\n for (int i = 0; i < pattern.length; i++) {\r\n rk2.rka_search(pattern[i], input_upper2, q2);\r\n if (i == pattern.length - 1) {\r\n rk2.printRKA_Comparison();\r\n }\r\n }\r\n long rk_endTime2 = System.nanoTime();\r\n System.out.println(\"It took: \" + (rk_endTime2 - rk_startTime1) + \" nanoseconds\");\r\n }",
"@Test\n @Order(1)\n void algorithms() {\n \n Combination initialComb = new Combination();\n for (int i = 0; i < assignementProblem.getAssignmentData().getLength(); i++) {\n initialComb.add((long) i + 1);\n }\n assignementProblem.setInCombination(initialComb);\n executeAlgo(SearchTestUtil.ALGO.TABU);\n executeAlgo(SearchTestUtil.ALGO.RECUIT);\n }",
"@Test\n\tpublic void testCorporateTrainingOfPositiveCostValues() \n\t{\n\t\tTraining GetOrderValue = new CorporateTraining(15, \"Oracle\", 10000, 100); \t//upcasting\n\t\tassertEquals(1000000,GetOrderValue.getOrderValues(),0);\n\t}",
"public static void main(String[] args) {\n\t\t\tScanner myScanner = new Scanner(System.in);\r\n\t\t\tint n= myScanner.nextInt();\r\n\t\t\t//check all the options, from 1 (because in case of 0 its obivious) until the number n\r\n\t\t\tfor(int a=1;a<=n;a=a+1){\r\n\t\t\t\tfor(int b=1;b<=n;b=b+1)\r\n\t\t\t\t\tfor(int c=1;c<=n;c=c+1)\r\n\t\t\t\t\t\tif((a*a+b*b==c*c)&(a<=b))\r\n\t\t\t\t\t\t\tSystem.out.println(a+\" \"+b+\" \"+c);\r\n\t\t\t}\r\n\t\t\t\r\n // ----------------- write your code ABOVE this line only ---------\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t/*80\r\n\t\tint matches = 3162;\r\n\t\tint results = 1218;\r\n\t\tint pairs = 146;\r\n\t\t*/\r\n\t\t//70\r\n\t\t/*int matches = 3302;\r\n\t\tint results = 909;\r\n\t\tint pairs = 59;*/\r\n\r\n\t\tfor(int i=1;i<=10;i++)\r\n\t\t{\r\n\t\t\tdouble b = (0.1*i)*((matches*3)+(results*3)+(pairs*3));\r\n\t\t\tSystem.out.print(Math.round(b)+\",\");\r\n\t\t}\t\r\n\t\r\n\t}",
"public static void main(String[] args) {\n // Q1: number of hours in a day (byte)\n byte numberOfHoursInaDay =24;\n System.out.println(\"\\nnumberOfHoursInaDay:24 \");\n // Q2.Max.no of days in an year\n short maxNumberOfTheDayInaYear = 366;\n System.out.println(\"\\nmaxNumberOfTheDaysInaYear:366\");\n // Q3.Total number of employees in an organization\n int totalNumberOfEmployeesInIbm = 50000;\n System.out.println(\"\\ntotalNumberOfEmployeesInIbm:50000\");\n //Q4.Population in a country\n long numberOfPopulation = 2000000000L;\n System.out.println(\"\\nnumberOfPopulation : 2000000000L\");\n //Q5.Interest rate\n float interestRate = 1.9f;\n System.out.println(\"\\\\nCurrent interest rate:\\\" + interestRate\");\n //Q6. Balance in a bank account\n long accountBalance = 50000000L;\n System.out.println(\"\\naccountBalance = 50000000L\");\n boolean doesTheSunRiseFromTheWest = true;\n System.out.println(\"doesTheSunRiseFromTheWest? : \" + doesTheSunRiseFromTheWest);\n\n // Q7.Initials of your name\n char firstInitial = 'S';\n char lastInitial = 'M';\n System.out.println(\"My initials: \" +firstInitial + lastInitial);\n\n\n\n\n\n }",
"public static void main(String[] args) {\n Homework1 hw1 = new Homework1();\n\n System.out.println(\"===Problem 1===\");\n hw1.problem1();\n\n System.out.println(\"===Problem 2===\");\n System.out.println(hw1.topInt(1.5));\n System.out.println(hw1.topInt(5.1));\n System.out.println(hw1.topInt(1.0));\n System.out.println(hw1.topInt(-4.2));\n\n\n System.out.println(\"===Problem 3===\");\n hw1.draw4x4('-');\n hw1.draw4x4('4');\n\n System.out.println(\"===Problem 4===\");\n System.out.println(hw1.citationName(\"Alastair\", \"Reynolds\"));\n System.out.println(hw1.citationName(\"Grace\", \"Hopper\"));\n\n System.out.println(\"===Problem 5===\");\n System.out.println(String.valueOf(hw1.min3(1.0, 2.0, 3.0)));\n System.out.println(String.valueOf(hw1.min3(4.0, 3.0, 2.0)));\n System.out.println(String.valueOf(hw1.min3(0.5, 0.1, 0.5)));\n \n System.out.println(\"===Problem 6===\");\n System.out.println(hw1.fibonacci(0));\n System.out.println(hw1.fibonacci(1));\n System.out.println(hw1.fibonacci(2));\n System.out.println(hw1.fibonacci(3));\n System.out.println(hw1.fibonacci(10));\n System.out.println(hw1.fibonacci(25));\n \n \n System.out.println(\"===Problem 7===\");\n //System.out.println(hw1.isPalindrome(\"racecar\"));\n //System.out.println(hw1.isPalindrome(\"cat\"));\n //System.out.println(hw1.isPalindrome(\"hannah\"));\n //System.out.println(hw1.isPalindrome(\"saippuakivikauppias\"));\n }",
"@Test\n public void test() {\n Assert.assertEquals(0.83648556F, Problem232.solve(/* change signature to provide required inputs */));\n }",
"public static void main(String[] args) {\n MaxDistance max = new MaxDistance();\n //int arr[] = {9, 2, 3, 4, 5, 6, 7, 8, 18, 0};\n\n //int arr[] = {3, 5, 4, 2};\n //int arr[] = {3,2,1};\n //int arr[] = {1,10};\n int arr[] = {100, 100, 100}; //return 0, not checking equal value\n \n //int arr[] = { 83564666, 2976674, 46591497, 24720696, 16376995, 63209921, 25486800, 49369261, 20465079, 64068560, 7453256, 14180682, 65396173, 45808477, 10172062, 28790225, 82942061, 88180229, 62446590, 77573854, 79342753, 2472968, 74250054, 17223599, 47790265, 24757250, 40512339, 24505824, 30067250, 82972321, 32482714, 76111054, 74399050, 65518880, 94248755, 76948016, 76621901, 46454881, 40376566, 13867770, 76060951, 71404732, 21608002, 26893621, 27370182, 35088766, 64827587, 67610608, 90182899, 66469061, 67277958, 92926221, 58156218, 44648845, 37817595, 46518269, 44972058, 27607545, 99404748, 39262620, 98825772, 89950732, 69937719, 78068362, 78924300, 91679939, 52530444, 71773429, 57678430, 75699274, 5835797, 74160501, 51193131, 47950620, 4572042, 85251576, 49493188, 77502342, 3244395, 51211050, 44229120, 2135351, 47258209, 77312779, 37416880, 59038338, 96069936, 20766025, 35497532, 67316276, 38312269, 38357645, 41600875, 58590177, 99257528, 99136750, 4796996, 84369137, 54237155, 64368327, 94789440, 40718847, 12226041, 80504660, 8177227, 85151842, 36165763, 72764013, 36326808, 80969323, 22947547, 76322099, 7536094, 18346503, 65759149, 45879388, 53114170, 92521723, 15492250, 42479923, 20668783, 64053151, 68778592, 3669297, 73903133, 28973293, 73195487, 64588362, 62227726, 17909010, 70683505, 86982984, 64191987, 71505285, 45949516, 28244755, 33863602, 18256044, 25110337, 23997763, 81020611, 10135495, 925679, 98158797, 73400633, 27282156, 45863518, 49288993, 52471826, 30553639, 76174500, 28828417, 41628693, 80019078, 64260962, 5577578, 50920883, 16864714, 54950300, 9267396, 56454292, 40872286, 33819401, 75369837, 6552946, 26963596, 22368984, 43723768, 39227673, 98188566, 1054037, 28292455, 18763814, 72776850, 47192134, 58393410, 14487674, 4852891, 44100801, 9755253, 37231060, 42836447, 38104756, 77865902, 67635663, 43494238, 76484257, 80555820, 8632145, 3925993, 81317956, 12645616, 23438120, 48241610, 20578077, 75133501, 46214776, 35621790, 15258257, 20145132, 32680983, 94521866, 43456056, 19341117, 29693292, 38935734, 62721977, 31340268, 91841822, 22303667, 96935307, 29160182, 61869130, 33436979, 32438444, 87945655, 43629909, 88918708, 85650550, 4201421, 11958347, 74203607, 37964292, 56174257, 20894491, 33858970, 45292153, 22249182, 77695201, 34240048, 36320401, 64890030, 81514017, 58983774, 88785054, 93832841, 12338671, 46297822, 26489779, 85959340 };\n\n //int arr[] = { 46158044, 9306314, 51157916, 93803496, 20512678, 55668109, 488932, 24018019, 91386538, 68676911, 92581441, 66802896, 10401330, 57053542, 42836847, 24523157, 50084224, 16223673, 18392448, 61771874, 75040277, 30393366, 1248593, 71015899, 20545868, 75781058, 2819173, 37183571, 94307760, 88949450, 9352766, 26990547, 4035684, 57106547, 62393125, 74101466, 87693129, 84620455, 98589753, 8374427, 59030017, 69501866, 47507712, 84139250, 97401195, 32307123, 41600232, 52669409, 61249959, 88263327, 3194185, 10842291, 37741683, 14638221, 61808847, 86673222, 12380549, 39609235, 98726824, 81436765, 48701855, 42166094, 88595721, 11566537, 63715832, 21604701, 83321269, 34496410, 48653819, 77422556, 51748960, 83040347, 12893783, 57429375, 13500426, 49447417, 50826659, 22709813, 33096541, 55283208, 31924546, 54079534, 38900717, 94495657, 6472104, 47947703, 50659890, 33719501, 57117161, 20478224, 77975153, 52822862, 13155282, 6481416, 67356400, 36491447, 4084060, 5884644, 91621319, 43488994, 71554661, 41611278, 28547265, 26692589, 82826028, 72214268, 98604736, 60193708, 95417547, 73177938, 50713342, 6283439, 79043764, 52027740, 17648022, 33730552, 42851318, 13232185, 95479426, 70580777, 24710823, 48306195, 31248704, 24224431, 99173104, 31216940, 66551773, 94516629, 67345352, 62715266, 8776225, 18603704, 7611906 };\n\n int n = arr.length;\n int maxDiff = max.maxIndexDiff(arr, n);\n System.out.println(maxDiff);\n }",
"public static void main(String[] args) {\n\t\t\n\t int a, b;\n\t int arr[] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 };\n\t int range[][]={{3,7}, {4,6}, {5,5}};\n\n\t for (int i = 0; i < range.length; i++){\n\t \t\n\t \ta = range[i][0];\n\t \tb = range[i][1];\n\n\t\t\tfor(int j = 0; j < (b-a)/2; j++){\n\t\t\t\tint temp = arr[a-1+j];\n\t\t\t\tarr[a-1+j] =arr[b-1-j]; \n\t\t\t\tarr[b-1-j] = temp;\n\t\t\t}\n\t }\n\n\t\tSystem.out.print (\"결과 : \"+\"[ \");\n\t\t\n\t\tfor(int i=0; i<arr.length ; i++ ) {\n\t\t\tSystem.out.print (arr[i] + \" \" );\n\n\t\t}\n\t\tSystem.out.print (\"]\");\n\t}",
"public static void main(String[] args) {\n\t\tint array0[] = new int[0];\r\n\t\tint array3[] = new int[3];\r\n\t\tint array5[] = new int[5];\r\n\t\tint array15[] = new int[15];\r\n\t\tint array16[] = new int[16];\r\n\t\tint array17[] = new int[17];\r\n\t\tint array19[] = new int[19];\r\n\t\tint array20[] = new int[20];\r\n\t\tint array200[] = new int[200];\r\n\t\tint array1000[] = new int[1000];\r\n\r\n\t\t// iX => integer with value X\r\n\t\tint i0 = 0;\r\n\t\tint i20 = 20;\r\n\t\tint i1 = 1;\r\n\t\tint i2 = 2;\r\n\t\tint i3 = 3;\r\n\t\tint i4 = 4;\r\n\t\tint i_5 = -5;\r\n\t\tint p = i2 * i_5; // p is [-10,-10]\r\n\r\n\t\tarray0[0] = 5; // Illegal upper bound\r\n\r\n\t\tarray0[1] = 5; // Illegal upper bound\r\n\r\n\t\tarray5[p] = 5; // Illegal lower bound\r\n\r\n\t\tp = 2 * i2; // p is [4,4]\r\n\r\n\t\tarray5[p] = 5; // Good\r\n\r\n\t\tp *= p; // p is [16,16]\r\n\r\n\t\tarray16[p] = 5; // Illegal upper bound (legal index range is 0-15)\r\n\r\n\t\tarray17[p] = 5; // Good\r\n\r\n\t\tp = i2 * i3; // p is [6,6]\r\n\r\n\t\tboolean b = args.length == 0;\r\n\r\n\t\tif (b) {\r\n\t\t\tp = p * i3; // p is [18,18]\r\n\t\t}\r\n\r\n\t\t// now p is [6,18]\r\n\r\n\t\tarray17[p] = 5; // Potentially illegal upper bound\r\n\t\tarray19[p] = 5; // Good\r\n\r\n\t\tp = 2; // p is [2,2]\r\n\r\n\t\tfor (int i = 0; i < 5; i++) {\r\n\t\t\tp *= 2;\r\n\t\t}\r\n\r\n\t\t// now p is [2,INF]\r\n\r\n\t\tarray19[p] = 5; // Potentially illegal upper bound // TODO problem\r\n\r\n\t\tp = p - 4; // p is [-2,INF]\r\n\r\n\t\tarray1000[p] = 5; // Potentially illegal lower and upper bounds\r\n\r\n\t\tp = 2; // p is [2,2]\r\n\r\n\t\tfor (int i = 0; i < 5; i++) {\r\n\t\t\tarray3[i] = 5; // Potentially illegal upper bound\r\n\t\t\tarray16[i] = 5; // Good\r\n\t\t\tp *= -2;\r\n\t\t}\r\n\r\n\t\tint i = 5, j = 10;\r\n\r\n\t\tif (b) {\r\n\t\t\ti = 15;\r\n\t\t\tj = 20;\r\n\t\t}\r\n\r\n\t\t// now i is [5,15], j is [10,20]\r\n\r\n\t\tif (i != j) {\r\n\t\t\tarray16[j] = 5; // Potentially illegal upper bound\r\n\t\t} else {\r\n\t\t\tarray16[j] = 5; // Good\r\n\t\t}\r\n\r\n\t\t// p is [-INF,INF]\r\n\r\n\t\tarray1000[p] = 5; // Potentially illegal lower and upper bounds\r\n\r\n\t}",
"public static void main(String[] args) {\n String res = \"1\";\r\n for (int i = 0; i < 100; i++) res += '0';\r\n MAX = new BigInteger(res);\r\n generate(\"1\", 1, 1);\r\n generate(\"2\", 1, 4);\r\n generate(\"3\", 1, 9);\r\n Arrays.sort(values);\r\n// System.out.println(count);\r\n\r\n// for (int i = 0; i < 100; i++) {\r\n// System.out.println(values[i]);\r\n// }\r\n\r\n\r\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n try {\r\n String line = br.readLine();\r\n int K = Integer.parseInt(line);\r\n for (int i = 1; i <= K; i++) {\r\n String[] v = br.readLine().split(\" \");\r\n BigInteger A = new BigInteger(v[0]);\r\n BigInteger B = new BigInteger(v[1]);\r\n\r\n int p1 = Arrays.binarySearch(values, A);\r\n if (p1 < 0) {\r\n p1 = -p1 - 1;\r\n }\r\n int p2 = Arrays.binarySearch(values, B);\r\n if (p2 < 0) {\r\n p2 = -p2 - 1;\r\n } else {\r\n p2++;\r\n }\r\n int result = p2 - p1;\r\n //System.out.println(p1 + \" \" + p2);\r\n System.out.println(\"Case #\" + i + \": \" + result);\r\n\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\r\n }\r\n }",
"public static void main(String[] args)\n {\n int[][] ints;\n int[][] ints1;\n\n\n\n\n ints = new int[][]{\n {1, 2, 3, 4, 5, 6, 7, 8, 9},\n {10, 11, 12, 13, 14, 15, 16, 17, 18},\n {19, 20, 21, 22, 23, 24, 25, 26, 27},\n {28, 29, 30, 31, 32, 33, 34, 35, 36},\n {37, 38, 39, 40, 41, 42, 43, 44, 45},\n {46, 47, 48, 49, 50, 51, 52, 53, 54},\n {55, 56, 57, 58, 59, 60, 61, 62, 63},\n {64, 65, 66, 67, 68, 69, 70, 0, 71},\n {73, 74, 75, 76, 77, 78, 79, 80, 72}\n };\n\n ints = new int[][]{\n {1,0},\n {2,3},\n };\n ints1 = new int[][]{\n {1, 2, 3},\n {4, 5, 6},\n {7, 0, 8}\n };\n\n ints1 = new int[][]{\n {1, 2, 3},\n {4, 8, 5},\n {7, 0, 6}\n };\n ints = new int[][]{\n {5, 0, 4},\n {2, 3, 8},\n {7,1,6}\n };\n ints1 = new int[][]{\n {1, 6, 4},\n {7, 0, 8},\n {2, 3, 5}\n };\n\n ints1 = new int[][]{\n {6, 0, 5},\n {8, 7, 4},\n {3, 2, 1}\n };\n ints1 = new int[][]{\n {11, 0, 4, 7},\n {2, 15, 1, 8},\n {5, 14, 9, 3},\n {13, 6, 12, 10 }\n };\n\n\n ints1 = new int[][]{\n {14, 13, 5, 3},\n {0, 1, 8, 12},\n {6, 2, 4, 10},\n {11, 9, 15, 7 }\n };\n\n ints1 = new int[][]{\n {8, 4, 7},\n {1,5,6},\n {3,2,0}\n };\n\n\n ints1 = new int[][]{\n {8, 4, 7},\n {1,5,6},\n {3,2,0}\n };\n\n\n ints = new int[][]{\n {1, 2, 3},\n {4, 6,5},\n {7, 8,0}\n };\n ints1 = new int[][]{\n {8, 4, 7},\n {1,5,6},\n {3,2,0}\n };\n ints = new int[][]{\n {1,0},\n {2,3},\n };\n System.out.println(System.currentTimeMillis());\n Board board = new Board(ints);\n Solver solution = new Solver(board);\n\n for (Board el :solution.solution())\n {\n System.out.println(el);\n }\n System.out.println(System.currentTimeMillis());\n\n\n }",
"private void generateSolution() {\n\t\t// TODO\n\n\t}",
"public static void main(String[] args) {\n /* *************** */\n /* * QUESTION 7 * */\n /* *************** */\n /* *************** */\n\n for(double p=0; p<1; p+=0.1){\n for(double q=0; q<1; q+=0.1){\n int res_1 = 0;\n int res_2 = 0;\n for(int i=0; i<100; i++){\n Graph graph_1 = new Graph();\n graph_1.generate_full_symmetric(p, q, 100);\n //graph_2.setVertices(new ArrayList<>(graph_1.getVertices()));\n Graph graph_2 = (Graph) deepCopy(graph_1);\n res_1+=graph_1.resolve_heuristic_v1().size();\n res_2+=graph_2.resolve_heuristic_v2();\n }\n res_1/=100;\n System.out.format(\"V1 - f( %.1f ; %.1f) = %s \\n\", p, q, res_1);\n res_2/=100;\n System.out.format(\"V2 - f( %.1f ; %.1f) = %s \\n\", p, q, res_2);\n }\n }\n\n }",
"@Override\n public void computeSatisfaction() {\n\n }",
"public static void main(String[] args) {\n\t\tSolution sl=new Solution();\r\n\t\t/*ListNode l1=new ListNode(2);\r\n\t\tListNode l2=new ListNode(-1);\r\n\t\tl2.next=new ListNode(1);\r\n\t\tl2.next.next=new ListNode(3);\r\n\t\tListNode l3= sl.mergeTwoLists(l1, l2);\r\n\t\twhile(l3!=null)\r\n\t\t{System.out.println(l3.val);\r\n\t\tl3=l3.next;\r\n\t\t}*/\r\n\t\tString a=\"1ab2\",b=\"ab12\";\r\n\t\tSystem.out.println(sl.isRotate(a,b));\r\n\t\t//System.out.println(sl.canConstruct(ran, mag));\r\n\t\t//System.out.println(sl.myAtoi(\" 10522545459\"));\r\n\t}",
"public static void main(String[] args) {\n int T, O, G, D;\n for ( T=0; T<10; T++ ) {\n for ( O=0; O<10; O++ ){\n for ( G=0; G<10; G++ ){\n for ( D=0; D<10; D++ ){\n if ((T*100+O*10+O)*4 == (G*1000+O*100+O*10+D)) {\n if (T!=O && T!=G && T!=D && O!=G && O!=D && G!=D) {\n System.out.println(\"T is \"+T+\",\"+ \"O is \"+O+\",\"+ \"G is \"\n +G+\",\"+ \"D is \"+D+\".\" );\n }\n }\n }\n }\n }\n } \n }",
"public static void main(String... args) {\n\n Set<Long> As = new HashSet<>();\n int N = 100;\n for (long p = -N; p <= N; ++p) {\n for (long q = -N; q <= p; ++q) {\n for (long r = -N; r <= q; ++r) {\n if (r==0 || p==0 || q==0)\n continue;\n\n long nom = r*p*q;\n long den = r*p + r*q + p*q;\n\n if (den != 0 && nom % den==0 && (nom^den)>=0) {\n long A = nom/den;\n\n if (A==nom) {\n As.add(A);\n System.out.printf(\"A=%d (p=%d, q=%d, r=%d)\\n\", A, p, q, r);\n }\n }\n }\n }\n }\n Long[] aa = As.toArray(new Long[As.size()]);\n Arrays.sort(aa);\n System.out.printf(\"============\\n\");\n System.out.printf(\"A(%d)=%s\\n\", aa.length, Arrays.toString(aa));\n\n for (long a = 1; a < 100; ++a) {\n if (isAlexandrian(a))\n System.out.printf(\"A=%dn\", a);\n }\n }",
"public static void main(String [] args)\r\n {\r\n // testing for denominator of 0\r\n //Rational [] array = {new Rational(), new Rational(12, 0)};\r\n \r\n // testing for add and compare method passing in null for another\r\n Rational [] array = {new Rational(), new Rational(12, -34)};\r\n array[1] = null;\r\n //Rational addRational = array[0].add(array[1]); // add\r\n int compareRational = array[0].compareTo(array[1]); // compareTo\r\n \r\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tint T = sc.nextInt();\t\t\r\n\t\tfor(int test_case = 0; test_case < T; test_case++) {\r\n\t\t\tint number = sc.nextInt();\t\t\t\r\n\t\t\tint[] stones = new int[number];\r\n\t\t\tint location = 0;\r\n\t\t\tint max_leap = 0;\r\n\t\t\tfor(int i = 0; i < number; i++){\r\n\t\t\t\tstones[i] = sc.nextInt();\r\n\t\t\t}\r\n\t\t\tmax_leap = sc.nextInt();\r\n\t\t\t\r\n\t\t\tfor(int k = 0; k < number; k++) {\r\n\t\t\t\tif(k == 0) {\r\n\t\t\t\t\tif(location + max_leap < stones[k]) {\r\n\t\t\t\t\t\tAnswer = -1;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif(stones[k-1] + max_leap < stones[k]) {\r\n\t\t\t\t\t\tAnswer = -1;\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\tif(location + max_leap < stones[k]) {\r\n\t\t\t\t\tAnswer++;\r\n\t\t\t\t\tlocation = stones[k-1];\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tif(k == number - 1) {\r\n\t\t\t\t\tif(location + max_leap >= stones[k]) {\r\n\t\t\t\t\t\tAnswer++;\r\n\t\t\t\t\t\tlocation = stones [k];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Print the answer to standard output(screen).\r\n\t\t\tSystem.out.println(\"Case #\"+(test_case+1));\r\n\t\t\tSystem.out.println(Answer);\r\n\t\t\tAnswer = 0;\t\t\t\t\r\n\t\t}\r\n\t}",
"public static void main(String[] args) throws FileNotFoundException, IOException\n\t\t\t{\n\t\t\t\tFileInputStream fis_x = new FileInputStream(\"D:\\\\Downloads\\\\testvalue13\\\\lable.txt\");\n\t\t\t\tScanner scanner_x = new Scanner(fis_x);\n\t\t\t\tFileInputStream fis_y = new FileInputStream(\"D:\\\\Downloads\\\\testvalue13\\\\out_r.txt\");\n\t\t\t\tScanner scanner_y = new Scanner(fis_y);\n\t\t\t\tdouble TP = 0;\n\t\t\t\tdouble TN = 0;\n\t\t\t\tdouble FP = 0;\n\t\t\t\tdouble FN = 0;\n\t\t\t\twhile (scanner_x.hasNext() && scanner_y.hasNext())\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble x1 = scanner_x.nextDouble();\n\t\t\t\t\t\tdouble y1 = scanner_y.nextDouble();\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * String[] tempArray_x =new String[] {\"\"}; tempArray_x\n\t\t\t\t\t\t * = scanner_x.nextLine().trim().split(\" \");\n\t\t\t\t\t\t * //System.out.println(\"set_x: \"+Arrays.toString(\n\t\t\t\t\t\t * tempArray_x));\n\t\t\t\t\t\t * \n\t\t\t\t\t\t * String[] tempArray_y = new String[] {\"\"}; tempArray_y\n\t\t\t\t\t\t * = scanner_y.nextLine().trim().split(\" \");\n\t\t\t\t\t\t * //System.out.println(\"set_y: \"+Arrays.toString(\n\t\t\t\t\t\t * tempArray_y));\n\t\t\t\t\t\t * \n\t\t\t\t\t\t * String x=\"\"; String y=\"\"; double t=0; for (int i=0;\n\t\t\t\t\t\t * i<tempArray_x.length; i++) { x=tempArray_x[i]; } int\n\t\t\t\t\t\t * x1=Integer.parseInt(x);\n\t\t\t\t\t\t * //System.out.print(\"x:\"+x+\"\\r\\n\"); for (int j=0;\n\t\t\t\t\t\t * j<tempArray_y.length; j++) { y=tempArray_y[j];} int\n\t\t\t\t\t\t * y1=Integer.parseInt(y);\n\t\t\t\t\t\t */\n\t\t\t\t\t\t// System.out.print(\"y:\"+y+\"\\r\\n\");\n\n\t\t\t\t\t\t// if(x1==1)TP=TP+1;\n\t\t\t\t\t\t// if(x.equals(y))TP=TP+1;\n\t\t\t\t\t\tif ((x1 == y1) && (x1 == 1))\n\t\t\t\t\t\t\tTP = TP + 1;\n\t\t\t\t\t\tif ((x1 == y1) && (x1 == -1))\n\t\t\t\t\t\t\tTN = TN + 1;\n\t\t\t\t\t\tif ((x1 == -1) && (y1 == 1))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tFP = FP + 1;\n\t\t\t\t\t\t\t\t// System.out.print(\"(x1==0)&&(y1==1)\"+FP+\"\\r\\n\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif ((x1 == 1) && (y1 == -1))\n\t\t\t\t\t\t\tFN = FN + 1;\n\n\t\t\t\t\t}\n\t\t\t\tSystem.out.print(\"TP:\" + TP + \"\\r\\n\");\n\t\t\t\tSystem.out.print(\"TN:\" + TN + \"\\r\\n\");\n\t\t\t\tSystem.out.print(\"FP:\" + FP + \"\\r\\n\");\n\t\t\t\tSystem.out.print(\"FN:\" + FN + \"\\r\\n\");\n\t\t\t\tdouble A0 = (TP + TN) / 238;\n\t\t\t\tdouble P0 = TP / (TP + FP);\n\t\t\t\tdouble R0 = TP / (TP + FN);\n\t\t\t\tdouble F0 = 2 * P0 * R0 / (P0 + R0);\n\t\t\t\tSystem.out.print(\"准确率A0=\" + A0);\n\t\t\t\tSystem.out.print(\"\\r\\n\");\n\t\t\t\tSystem.out.print(\"精确率P0=\" + P0);\n\t\t\t\tSystem.out.print(\"\\r\\n\");\n\t\t\t\tSystem.out.print(\"召回率R0=\" + R0);\n\t\t\t\tSystem.out.print(\"\\r\\n\");\n\t\t\t\tSystem.out.print(\"F0=\" + F0);\n\t\t\t\tSystem.out.print(\"\\r\\n\");\n\n\t\t\t\tscanner_x.close();\n\t\t\t\tscanner_y.close();\n\t\t\t}",
"@Test\n public void testSolution() {\n assertSolution(\"425\", \"input-day01-2018.txt\");\n }",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n //array to store continous solutions\n \tint[] cont = new int[10];\n \t//array to store non-continuous\n \tint[] nonCont = new int[10];\n int resCont;\n int resNonCont;\n int inputs;\n inputs = Integer.parseInt(sc.nextLine());\n \n //go through the amount of solutions\n for (int i = 0; i < inputs; i++) {\n \tString inputString;\n \tint[] arr = new int[10];\n \tint indexMax = Integer.parseInt(sc.nextLine());\n \t\n \t//tokenize input values;\n \t//all entries are separated by a space\n \tinputString = sc.nextLine();\n \tint arrIndex=0;\n \t\tStringTokenizer st = new StringTokenizer(inputString);\n \t\twhile(st.hasMoreTokens()) {\n \t\t\tarr[arrIndex] = Integer.parseInt(st.nextToken());\n \t\t\tarrIndex++;\n \t\t}\n \t\t\n \t\t//continuous solution\n \tresCont = maxSubarrayContiguous(arr);\n \t//non-continuous solution\n \tresNonCont = maxSubarrayNonContiguous(arr);\n \t\n \t//add continuous solutions to array\n \tcont[i] = resCont;\n \t//add non-continuous solutions to array\n \tnonCont[i] = resNonCont;\n \t\n }\n \n //print out entries\n \tfor(int i = 0; i < inputs; i++) {\n \t\tSystem.out.print(cont[i] + \" \");\n \t\tSystem.out.print(nonCont[i]);\n \t\tSystem.out.println();\n \t}\n \t\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}",
"private void EvalFitness(){\r\n _FitVal=0;\r\n for(int i=0; i<7;i++)\r\n for(int j=i+1;j<8;j++){\r\n if( _Data[i]==_Data[j]) _FitVal++;\r\n if(j-i==Math.abs(_Data[i]-_Data[j])) _FitVal++;\r\n }\r\n }",
"@Test\n\tpublic void test() {\n\t\tTestUtil.testEquals(new Object[][]{\n\t\t\t\t{4, 2, 7, 1, 3},\n\t\t\t\t{3, 3, 5, 2, 1},\n\t\t\t\t{15, 2, 4, 8, 2}\n\t\t});\n\t}",
"@Test\n public void testGetSoilValsFromOthPara() throws IOException, Exception {\n HashMap<String, Object> data = new HashMap<String, Object>();\n AcePathfinderUtil.insertValue(data, \"sllb\", \"30\");\n AcePathfinderUtil.insertValue(data, \"slsnd\", \"20\");\n AcePathfinderUtil.insertValue(data, \"slcly\", \"50\");\n AcePathfinderUtil.insertValue(data, \"sloc\", \"2\");\n AcePathfinderUtil.insertValue(data, \"sllb\", \"50\");\n AcePathfinderUtil.insertValue(data, \"slsnd\", \"30\");\n AcePathfinderUtil.insertValue(data, \"slcly\", \"40\");\n AcePathfinderUtil.insertValue(data, \"sloc\", \"1\");\n ArrayList vars = new ArrayList();\n vars.add(\"all\");\n \n HashMap<String, Object> expectedData = new HashMap<String, Object>();\n expectedData.put(\"slll\", Arrays.asList(new String[] {\"0.297\", \"0.243\"}));\n expectedData.put(\"sldul\", Arrays.asList(new String[] {\"0.419\", \"0.376\"}));\n expectedData.put(\"slsat\", Arrays.asList(new String[] {\"0.514\", \"0.471\"}));\n expectedData.put(\"sksat\", Arrays.asList(new String[] {\"0.205\", \"0.216\"}));\n expectedData.put(\"slbdm\", Arrays.asList(new String[] {\"1.29\", \"1.40\"}));\n// AcePathfinderUtil.insertValue(expectedData, \"sllb\", \"30\");\n// AcePathfinderUtil.insertValue(expectedData, \"slll\", \"0.297\");\n// AcePathfinderUtil.insertValue(expectedData, \"sldul\", \"0.419\");\n// AcePathfinderUtil.insertValue(expectedData, \"slsat\", \"0.514\");\n// AcePathfinderUtil.insertValue(expectedData, \"sksat\", \"2.05\");\n// AcePathfinderUtil.insertValue(expectedData, \"slbdm\", \"1.29\");\n// AcePathfinderUtil.insertValue(expectedData, \"sllb\", \"50\");\n// AcePathfinderUtil.insertValue(expectedData, \"slll\", \"0.243\");\n// AcePathfinderUtil.insertValue(expectedData, \"sldul\", \"0.376\");\n// AcePathfinderUtil.insertValue(expectedData, \"slsat\", \"0.471\");\n// AcePathfinderUtil.insertValue(expectedData, \"sksat\", \"2.16\");\n// AcePathfinderUtil.insertValue(expectedData, \"slbdm\", \"1.40\");\n// ArrayList<HashMap<String, String>> expectedLayers = MapUtil.getBucket(expectedData, \"soil\").getDataList();\n\n HashMap<String, ArrayList<String>> result = SoilHelper.getSoilValsFromOthPara(data, \"PTSAXTON2006\", vars);\n \n assertEquals(\"getSoilValsFromOthPara: All case is incorrect \", expectedData, result);\n \n log.info(\"getSoilValsFromOthPara() output: {}\", result.toString());\n }",
"public static void main(String[] args) {\n int value = 5;\n int ab= 0;\n int ac=0;\n int ad=0;\n int ae=0;\n int af=0;\n int ag=0;\n int am=0;\n int az=0;\n int x = 0;\n int y = 0;\n int z = 0;\n int a = 0;\n int b = 0;\n int c = 0;\n int d = 0;\n int e = 0;\n x= value%2;\n ab=value/2;\n y= ab % 2;\n ac = ab/2;\n z = ac % 2;\n ad= ac/2;\n a = ad % 2;\n ae = ad/2;\n b = ae % 2;\n af= ae/2;\n c = af % 2;\n ag= af/2;\n d= ag % 2;\n am=ag/2;\n e = am %2;\n\n System.out.println(e+\"\"+d+\"\"+c+\"\"+b+\"\"+a+\"\"+z+\"\"+y+\"\"+x);\n\n\n\n\n\n\n\n }",
"public static void main(String[] args) {\n\t\tArrayList<Integer> primelist = sieve(7071);\n\t\tArrayList<Double> second = new ArrayList<Double>();\n\t\tfor(int one : primelist) \n\t\t\tsecond.add(Math.pow(one, 2));\n\t\tArrayList<Double> third = new ArrayList<Double>();\n\t\tprimelist = sieve(368);\n\t\tfor(int one : primelist)\n\t\t\tthird.add(Math.pow(one, 3));\n\t\tArrayList<Double> fourth = new ArrayList<Double>();\n\t\tprimelist = sieve(84);\n\t\tfor(int one : primelist)\n\t\t\tfourth.add(Math.pow(one, 4));\n\n\t\tArrayList<Double> possibilities = new ArrayList<Double>();\n\t\tfor (int k = fourth.size() - 1; k >=0 ; k--) {\n\t\t\tfor (int j = 0; j < third.size(); j++) {\n\t\t\t\tdouble sum = fourth.get(k) + third.get(j);\n\t\t\t\tif (sum > 50000000)\n\t\t\t\t\tbreak;\n\t\t\t\telse {\n\t\t\t\t\tfor (int i = 0; i < second.size(); i++) {\n\t\t\t\t\t\tdouble nextsum = sum + second.get(i);\n\t\t\t\t\t\tif (nextsum > 50000000)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// I am not sure whether it can be proved that the sum is unique.\n\t\t\t\t\t\t\tif (!possibilities.contains(nextsum))\n\t\t\t\t\t\t\t\tpossibilities.add(nextsum);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint totalcount = possibilities.size();\n\t\tSystem.out.println(totalcount);\n\t}",
"public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tint a[] = {2,1,3,-4,-2};\n\t\t//int a[] = {1 ,2, 3, 7, 5};\n\t\tboolean found = false;\n\t\t\n\t\t//this will solve in o n^2\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\tint sum = 0;\n\t\t\tfor(int j = i ; j< a.length ; j++){\n\t\t\t\tsum += a[j] ;\n\t\t\t\tif(sum == 0){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(found)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t// link : https://www.youtube.com/watch?v=PSpuM9cimxA&list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s&index=49\n\t\tSystem.out.println(found + \" found\");\n\t\tfound = false;\n\t\t//solving with O of N with the help sets\n\t\t// x + 0 = y\n\t\tSet<Integer> set = new HashSet<>();\n\t\tint sum = 0;\n\t\tfor(int element : a){\n\t\t\tset.add(sum);\n\t\t\tsum += element;\n\t\t\tif(set.contains(sum)){\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(set);\n\t\t\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t\tfound = false;\n\t\t// when the sum of subarray is K\n\t\t\n\t\t//solving with O of N with the help sets\n\t\t//x + k = y >>>\n\t\tSet<Integer> set1 = new HashSet<>();\n\t\tint k = 12;\n\t\tint summ = 0;\n\t\tfor(int element : a){\n\t\t\tset1.add(summ);\n\t\t\tsumm += element;\n\t\t\tif(set1.contains(summ - k)){ // y - k = x(alredy presnt or not)\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(set1);\n\t\tSystem.out.println();\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t}",
"public static void main(String args[] ) throws Exception {\n String l[] = br.readLine().split(\" \");\n long N = Long.parseLong(l[0]);\n long S = Long.parseLong(l[1]);\n long E = Long.parseLong(l[2]);\n TreeMap<Long,Long> t1 = new TreeMap<Long,Long>();\n TreeMap<Long,Long> t2 = new TreeMap<Long,Long>();\n for(int i=0;i<N;i++) {\n String s[] = br.readLine().split(\" \");\n long x = Long.parseLong(s[0]);\n long p = Long.parseLong(s[1]);\n t1.put((x-p),(x+p));\n }\n ArrayList<Long> l1 = new ArrayList<Long>(t1.keySet());\n ArrayList<Long> l2 = new ArrayList<Long>(t1.values());\n long c = l1.get(0);\n long d = l2.get(0);\n for(int i=1;i<t1.size();i++)\n {\n if(l1.get(i)<=d)\n d = Math.max(d,l2.get(i));\n else\n {\n \n t2.put(c,d);\n c = l1.get(i);\n d = l2.get(i);\n }\n \n }\n t2.put(c,d);\n int i;\n long ans = 0;\n l1=new ArrayList<Long>(t2.keySet());\n l2=new ArrayList<Long>(t2.values());\n \n \n for(i=0;i<l1.size();i++)\n {\n if(S>=E)\n {\n S=E;\n break;\n }\n if(l1.get(i)<=S && S<=l2.get(i))\n S = l2.get(i);\n \n else if(S<=l1.get(i) && E>=l2.get(i))\n {\n ans+=l1.get(i)-S;\n S = l2.get(i);\n \n }\n else if(S<=l1.get(i) && E>=l1.get(i) && E<=l2.get(i))\n {\n ans+=l1.get(i)-S;\n S = E;\n }\n else if(S<=l1.get(i) && E<=l1.get(i))\n {\n ans+=E-S;\n S = E;\n }\n }\n if(S<E)\n ans+=E-S;\n pw.println(ans);\n \n pw.close();\n }",
"@Test\n public void testFindOrientedPairs() {\n System.out.println(\"findOrientedPairs\");\n \n CCGeneticDrift instance = new CCGeneticDrift();\n String input = \"6 3 1 6 5 -2 4\";\n List<Integer> numbers = instance.inputStringToIntegerList(input);\n String expResult = \"[1 -2, 3 -2]\";\n List result = instance.findOrientedPairs(numbers);\n assertEquals(result.toString(), expResult);\n assertEquals(result.size(), 2);\n }",
"public static void main(String[] args) {\n\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\tint A = scan.nextInt();\r\n\t\tint B = scan.nextInt();\r\n\t\tlong x = scan.nextInt();\r\n\t\tlong y = scan.nextInt();\r\n\t\tlong z = scan.nextInt();\r\n\t\t\r\n\t\tlong requiredA = x * 2 + y;\r\n\t\tlong requiredB = y + z * 3;\r\n\t\t\r\n\t\tlong neededA = Math.max(0, requiredA - A);\r\n\t\tlong neededB = Math.max(0, requiredB - B);\r\n\t\tSystem.out.print(neededA + neededB);\r\n\t}",
"@Test\r\n public void test5() {\r\n String[] words = new String[] {\r\n \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"F\", \"B\", \"H\", \"I\", \"J\", \"K\"\r\n };\r\n \r\n Assert.assertEquals(shortestDistanceBetween(words, \"B\", \"F\"), 1);\r\n Assert.assertEquals(shortestDistanceBetween(words, \"A\", \"E\"), 4);\r\n Assert.assertEquals(shortestDistanceBetween(words, \"I\", \"A\"), 9);\r\n }",
"public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n int p=sc.nextInt();\n int q=sc.nextInt();\n long i=0;\n String S=null;\n String substring1=null;\n String substring2=null;\n long square=0;\n int fsquare=0;\n int ssquare=0;\n int sum=0;\n int v=0;\n for(i=p;i<=q;i++)\n {\n square=squar(i);\n S=Long.toString(square);\n \n if(square<=9)\n { S=0+S; }\n int length=S.length();\n int d=length/2;\n String lsquare=S.substring(0,d);\n String rsquare=S.substring(d);\n fsquare=Integer.parseInt(lsquare);\n ssquare=Integer.parseInt(rsquare);\n sum=fsquare+ssquare;\n if(sum==i)\n {\n System.out.print(i);\n System.out.print(\" \");\n v=1;\n } \n } \n if(v==0)\n {\n System.out.print(\"INVALID RANGE\");\n } \n \n }",
"int main()\n{\n int f_amt,f_dis,f_shp,s_amt,s_dis,s_shp,a_amt,a_dis,a_shp,f_tot,s_tot,a_tot;\n std::cin>>f_amt>>f_dis>>f_shp>>s_amt>>s_dis>>s_shp>>a_amt>>a_dis>>a_shp;\n f_dis=(f_amt/100)*f_dis;\n s_dis=(s_amt/100)*s_dis;\n a_dis=(a_amt/100)*a_dis;\n f_tot=(f_amt-f_dis)+f_shp;\n s_tot=(s_amt-s_dis)+s_shp;\n a_tot=(a_amt-a_dis)+a_shp;\n std::cout<<\"In Flipkart Rs.\"<<f_tot;\n std::cout<<\"\\nIn Snapdeal Rs.\"<<s_tot;\n std::cout<<\"\\nIn Amazon Rs.\"<<a_tot;\n if((f_tot<s_tot)&&(f_tot<a_tot)||(f_tot==s_tot)&&(f_tot<a_tot)){\n std::cout<<\"\\nHe will prefer Flipkart\";\n }\n else if((s_tot<f_tot)&&(s_tot<a_tot)||(s_tot==a_tot)&&(s_tot<f_tot)){\n std::cout<<\"\\nHe will prefer Snapdeal\";\n \n }\n else if((a_tot<f_tot)&&(a_tot<s_tot)){\n std::cout<<\"\\nHe will prefer Amazon\";\n }\n}",
"@Test\n public void testSolution() throws Exception {\n assertEquals(4, new Task5().solution(4, new int[]{1, 2, 3}));\n // 1. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n // 2. 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n // 3. 2, 2, 1, 1, 1, 1, 1, 1, 1, 1\n // 4. 2, 2, 2, 1, 1, 1, 1, 1, 1\n // 5. 2, 2, 2, 2, 1, 1, 1, 1\n // 6. 2, 2, 2, 2, 2, 1, 1\n // 7. 2, 2, 2, 2, 2, 2\n // 8. 5, 1, 1, 1, 1, 1, 1, 1\n // 9. 5, 2, 1, 1, 1, 1, 1\n // 10. 5, 2, 2, 1, 1, 1\n // 11. 5, 2, 2, 2, 1\n // 12. 5, 5, 1, 1\n // 13. 5, 5, 2\n assertEquals(13, new Task5().solution(12, new int[]{1, 2, 5}));\n // 1. 2, 2, 2, 2, 2, 2\n // 2. 5, 5, 2\n assertEquals(2, new Task5().solution(12, new int[]{2, 5}));\n }",
"public static void main(String[] args) {\n\n int oldCapacity = 4;\n System.out.println(oldCapacity + (oldCapacity >> 1));\n\n /*Solution solution = new Solution();\n// System.out.println(solution.numRollsToTarget(2, 6, 7));\n\n int[] ints = solution.loudAndRich(new int[][]{\n *//* {1, 0},\n {2, 1},\n {3, 1},\n {3, 7},\n {4, 3},\n {5, 3},\n {6, 3}\n }, new int[]{3, 2, 5, 4, 6, 1, 7, 0});*//*\n\n }, new int[]{0, 1});\n Printer.print(ints);*/\n }",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint t=scan.nextInt();\n\t\tfor(int l=0;l<t;l++)\n\t\t{\n\t\tint s=scan.nextInt();\n\t\tlong[] a=new long[s];\n\t\tfor(int i=0;i<s;i++)\n\t\t\ta[i]=scan.nextLong();\n\t\tsell=new boolean[s];\n\t\t\n\t\tif(reverse(a)||equal(a)||a.length<=1)\n\t\t{\n\t\t\tSystem.out.println(\"0\");\n\t\t\tcontinue;\n\t\t\t\n\t\t}\n\t\tgen(a);\n\t\tSystem.out.println(profit(a));\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\n\t\tlong min=s.nextLong(),max=s.nextLong(),sum=0;\n\t\tboolean[] arr=new boolean[(int)(max-min+1)];\n\t\tfor(int i=2;;i++) {\n\t\t\tlong p=(long) Math.pow(i, 2),add=p;\n\t\t\tif((p-min)>=arr.length) break;\n\t\t\t//\t\t\tif((p-min)<0) continue;\n\t\t\t//\t\t\tif(p==1) continue;\n\t\t\twhile((p-min)<arr.length) {\n\t\t\t\t//\t\t\t\tSystem.out.println(p);\n\t\t\t\tif(!((p-min)<0)) arr[(int)(p-min)]=true;\n\t\t\t\tp+=add;\n\t\t\t}\n\t\t}\n\t\t//\t\tSystem.out.println(Arrays.toString(arr));\n\t\tfor(int i=0;i<arr.length;i++) if(!arr[i]) sum++;\n\t\tSystem.out.println(sum);\n\t}",
"public static void main(String[] args) {\n\t\tint a, b, c;\r\n\t\t\r\n\t\tfor(a = 1; a <= 20; a++) {\r\n\t\t\tfor(b = 1; b <= 20; b++) {\r\n\t\t\t\tfor(c = 1; c <= 20; c++) {\r\n\t\t\t\t\tif ( (c*c) == (a*a)+(b*b) && (a+b+c) <=20 )\r\n\t\t\t\t\t\tSystem.out.printf(\"%2d,%5d,%10d\\n\",a,b,c);\r\n\t\t\t\t} //%와 d사이에있는 2는 2칸 띄어쓰기 %d는 정수형\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void main(String[] args) throws Exception {\n\t\tfor(int i=200;i<=1200;i+=200){\n\t\t\tString inputPath=\"\";\n\t\t\t\n\t\t\t/*inputPath=\"/home/Hadoop/桌面/files/\"+i+\"/result-std-logSize\";\n\t\t\tSystem.out.println(\"Level:\"+i+\",std-LogSize:\");\n\t\t\tvalue(inputPath);*/\n\t\t\t/*inputPath=\"/home/Hadoop/桌面/files/\"+i+\"/result-origin\";\n\t\t\tSystem.out.println(\"origin:\");\n\t\t\tvalue(inputPath);*/\n\t\t\t\n\t\t\tinputPath=\"/home/Hadoop/桌面/files/\"+i+\"/result-mixedTime-test1\";\n\t\t\tSystem.out.println(\"level\"+i+\", mixedTime:\");\n\t\t\tvalue(inputPath);\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\t\n\t\t\t/*inputPath=\"/home/Hadoop/桌面/files/\"+i+\"/result-std-0\";\n\t\t\tSystem.out.println(\"std-0:\");\n\t\t\tvalue(inputPath);\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\tinputPath=\"/home/Hadoop/桌面/files/\"+i+\"/result-std\";\n\t\t\tSystem.out.println(\"Level:\"+i+\",std:\");\n\t\t\tvalue(inputPath);\n\t\t\t\n\t\t\tinputPath=\"/home/Hadoop/桌面/files/\"+i+\"/result-square\";\n\t\t\tSystem.out.println(\"Level:\"+i+\",square:\");\n\t\t\tvalue(inputPath);\n\t\t\t\n\t\t\tinputPath=\"/home/Hadoop/桌面/files/\"+i+\"/result-line\";\n\t\t\tSystem.out.println(\"Level:\"+i+\",line:\");\n\t\t\tvalue(inputPath);\n\t\t\t*/\n\t\t\t\n\t\t}\n \n }",
"public static void main(String[] args) {\n ArrayList<Character> actual=new ArrayList<>();\n actual.add('R');\n actual.add('G');\n actual.add('B');\n actual.add('Y');\n ArrayList<Character> guess=new ArrayList<>();\n guess.add('G');\n guess.add('G');\n guess.add('R');\n guess.add('R');\n ArrayList<Character> hitLists=new ArrayList<>();\n ArrayList<Character> pseudoLists=new ArrayList<>();\n int hits=0;\n int pseudoHits=0;\n for(int i=0;i<4;i++)\n {\n \t if(actual.get(i)==guess.get(i))\n \t {\n \t\t hits++;\n \t\t hitLists.add(actual.get(i));\n \t }\n }\n for(int i=0;i<4;i++)\n {\n \t char g=guess.get(i);\n \t if(g!=actual.get(i)&&!hitLists.contains(g)&&actual.contains(g))\n { \n\t pseudoLists.add(g);\n }\n }\n for(int i=0;i<pseudoLists.size();i++)\n { char g=pseudoLists.get(i);\n \t int actualOccs=numOccurences(g,actual);\n \t int guessOccs=numOccurences(g,guess);\n \t \n\t\tif(guessOccs==actualOccs)\n \t {\n \t\t pseudoHits++; \n \t }\n\t\telse{\n\t\t\tpseudoHits+=Math.min(guessOccs,actualOccs);\n\t\t}\t \n System.out.println(g);\n }\n \n \n System.out.println(hits+\" hits \"+pseudoHits+\" pseudoHits\");\n\t}",
"public static void main(String[] args) throws Exception {\n \n Scanner scn=new Scanner(System.in);\n int n1=scn.nextInt();\n \n int[] a1=new int[n1];\n for(int i=0;i<a1.length;i++){\n a1[i]=scn.nextInt();\n }\n \n int n2=scn.nextInt();\n int[] a2=new int[n2];\n for(int i=0;i<a2.length;i++){\n a2[i]=scn.nextInt();\n }\n \n int[] diff=new int[n2];\n int c=0;\n \n int i=a1.length-1;\n int j=a2.length-1;\n int k=diff.length-1;\n \n while(k >= 0){\n int d=0;\n int a1v= i >= 0? a1[i]: 0;\n \n if(a2[j] +c >= a1v){\n d= a2[j] + c -a1v;\n c=0;\n }else{\n d= a2[j] + c + 10 -a1v;\n c=-1;\n }\n \n diff[k] = d;\n \n i--;\n j--;\n k--;\n }\n \n int idx = 0;\n while(idx < diff.length){\n if(diff[idx] == 0){\n idx++;\n }else{\n break;\n }\n }\n \n while(idx < diff.length){\n System.out.println(diff[idx]);\n idx++;\n }\n \n\n \n \n}",
"@Test\n\tvoid test() {\n\t\tassertEquals(0, solution1.solution(2147483647));\n\t\tassertEquals(1, solution1.solution(5));\n\t}",
"public static void main(String[] args) {\n\t\tString pol1=\"1x^3+3x^2+7x^1+21x^0\";\r\n\t\tString pol2=\"1x^2+7x^0\";\r\n\t\tString adunare=\"+1x^3+4x^2+7x^1+28x^0\";\r\n\t\tString scadere=\"+1x^3+2x^2+7x^1+14x^0\";\r\n\t\tString inmultire=\"+1x^5+3x^4+14x^3+42x^2+49x^1+147x^0\";\r\n\t\tString restul=\"\";\r\n\t\tString catul=\"+1.0x^1+3.0x^0\";\r\n\t\tString derivare=\"+3x^2+6x^1+7x^0\";\r\n\t\tString integrare=\"+0.25x^4+1.0x^3+3.5x^2+21.0x^1\";\r\n\t\tPolinom p1=new Polinom();\r\n\t\tPolinom p2=new Polinom();\r\n\t\tPolinom p1copie=new Polinom();\r\n\t\ttry {\r\n\t\t\tp1=p1.crearePolinom(pol1, 3);\r\n\t\t\tp1copie=p1.crearePolinom(pol1, 3);\r\n\t\t\tp2=p2.crearePolinom(pol2, 2);\r\n\t\t} catch (IllegalInputException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\r\n\t\tPolinom p3=p1.adunarePolinom(p2, 4);\r\n\t\tString rezAdunare=p3.afisPolinomIntreg();\r\n\t\tPolinom p4=p1.scaderePolinom(p2, 4);\r\n\t\tString rezScadere=p4.afisPolinomIntreg();\r\n\t\tPolinom p5=p1.inmultirePolinom(p2, 6);\r\n\t\tString rezInmultire=p5.afisPolinomIntreg();\r\n\t\tString cat=p1.impartirePolinom(p2, 3, 2);\r\n\t\tString rest=p1copie.impartirePolinom(p2, 3, 2);\r\n\t\tPolinom p7=p1.derivarePolinom(3);\r\n\t\tString rezDerivare=p7.afisPolinomReal();\r\n\t\tPolinom p8=p1.integrarePolinom(4);\r\n\t\tString rezIntegrare=p8.afisPolinomReal();\r\n\t\t\r\n\t\tassert adunare!=rezAdunare : \"Nu se verifica adunarea!\";\r\n\t\tassert scadere!=rezScadere : \"Nu se verifica scaderea!\";\r\n\t\tassert inmultire!=rezInmultire : \"Nu se verifica inmultirea!\";\r\n\t\tassert derivare!=rezDerivare : \"Nu se verifica derivarea!\";\r\n\t\tassert integrare!=rezIntegrare : \"Nu se verifica integrarea!\";\r\n\t\tassert catul!=cat : \"Nu se verifica adunarea!\";\r\n\t\tassert restul!=rest : \"Nu se verifica adunarea!\";\r\n\t\t\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\tSystem.out.print(\"Enter No. disks :\");\n\t\tint number=scan.nextInt();\n\t\tif(number<=0){\n\t\t\tSystem.out.println(\"Please Enter a Valid Number\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tint strSize=((int)Math.pow(2,number))-1;\n\t\tString str[]=new String[strSize];\n\t\tString result[]=new TowerOfHanoiSolution().getTOHSolution(number,\"A\",\"B\",\"C\",str);\n\t\tfor(int i=0;i<strSize;i++){\n\t\tSystem.out.println(result[i]);\n\t\t}\n\t\tscan.close();\n\t}",
"public static void main(String[] args) {\n\t\tRandom rand = new Random();\n\t\tint first = rand.nextInt(7);\n\t\tint second = rand.nextInt(7);\n\t\tint third = rand.nextInt(7);\n\t\t\n\t\tint middle = rand.nextInt(741);\n\t\t\n\t\tint last = rand.nextInt(9999);\n\t\t\n\t\tString middleString= Integer.toString(middle);\n\t\tString lastString = Integer.toString(last); \n\t\tString firstString = Integer.toString(first);\n\t\tString secondString = Integer.toString(second);\n\t\tString thirdString = Integer.toString(third);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\twhile (middleString.length()<3) {\n\t\t\tmiddleString = \"0\" + middleString;\n\t\t\t\n\t\t}\n\t\t\n\t\twhile (lastString.length()<4){\n\t\t\tlastString = \"0\" + lastString;\n\t\t}\n\t\t\n\t\tSystem.out.println(firstString + secondString + thirdString + \"-\"+ middleString +\"-\"+ lastString);\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tFibonocciseries fibObj=new Fibonocciseries();\n\t\tList<Integer> value = fibObj.fibmeth(21);\n\t\tSystem.out.println(value.toString());\n\t\t\t\n\t\tCharacterCount charCountObj=new CharacterCount();\n\t\tString[] xyz = { \"a\",\"b\",\"a\",\"c\",\"b\",\"c\",\"b\"};\n\t\tList<Integer> result1 = charCountObj.charCount(xyz);\n\t\tSystem.out.println(result1.toString());\n\t\t\n\t\t\n\t\tFizzBuzzPgm fizzBuzzObj=new FizzBuzzPgm();\n\t\tint[] Fizzbuzzvalues = {10,3,5,15};\n\t\tList<String> fzzBuzzReuslt = fizzBuzzObj.fizzBuzzMethod(Fizzbuzzvalues);\n\t\t\n\t\tDuplicateString duplicateObj=new DuplicateString();\n\t\tString[] DuplicateValues= {\"abc\",\"mno\",\"xyz\",\"pqr\",\"xyz\",\"def\",\"mno\"};\n\t\tList<String> DuplicateResult=duplicateObj.DuplicateMethod(DuplicateValues);\n\t\tSystem.out.println(DuplicateResult.toString());\n\t\t\n\t\tPalindromePgm PalindromeObj=new PalindromePgm();\n\t\tList<String> PalindromeResult=PalindromeObj.PalindromeMethod(24);\n\t\tSystem.out.println(PalindromeResult.toString());\n\t\t\n\t\tCalculatorPgm addVal = new CalculatorPgm();\n\t\tint resultAdd = addVal.add(20,10);\n\t\tSystem.out.println(\"Calc prgm add output=\"+resultAdd);\n\t\t\n\t\tCalculatorPgm subVal = new CalculatorPgm();\n\t\tint resultsub = subVal.add(300,10);\n\t\tSystem.out.println(\"Calc prgm sub output=\"+resultsub);\n\t\t\n\t\tCalculatorPgm divVal = new CalculatorPgm();\n\t\tint resultdiv = divVal.add(400,10);\n\t\tSystem.out.println(\"Calc prgm div output=\"+resultdiv);\n\t\t\n\t\t\n\t\t\n\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tint i, x=4,w=9,q;\r\n\t\tfor(i=-1;i<20;i+=3) {\r\n\t\t\tx++;\r\n\t\t\tfor(q=4;q<11;q++) {\r\n\t\t\t\tdo {\r\n\t\t\t\t\ti=+3;\r\n\t\t\t\t\tw=sizeof(i);\r\n\t\t\t\t\ti=x+w;\r\n\t\t\t\t\tx=w+i;\r\n\t\t\t\t\t\t\r\n\t\t\t\t} while (x<15);\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"x:\"+x+\"i:\"+i);\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tint[] arr = new int[]{10,9,3,7,4,1,0};\r\n\t\tList g = Arrays.asList(arr);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t/*List arrayList = new ArrayList();\r\n\t\t//arrayList.\r\n\t\t\r\n\t\tArrays.sort(arr);*/\r\n\r\n // use add() method to add elements in the list\r\n\t\tArrayList<Integer> arrlist = new ArrayList<Integer>(8);\r\n arrlist.add(0);\r\n arrlist.add(25);\r\n arrlist.add(10);\r\n arrlist.add(15);\r\n \r\n \r\n //Logic for Least missing number\r\n for(int l=0;l<arrlist.size();l++){\r\n\t\t\tif(arrlist.contains(l)){\r\n\t\t\t\tcontinue;\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"value not present==\"+l);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n \r\n //Logic for Max missing number\r\n Collections.sort(arrlist,Collections.reverseOrder());\r\n System.out.println(arrlist);\r\n\r\n \r\n for(int b=arrlist.get(0);;b--){\r\n \t if(arrlist.contains(b)){\r\n \t\t continue;\r\n \t }else {\r\n\t\t\t\tSystem.out.println(\"value not present==\"+b);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n \t \r\n }\r\n \r\n //USING java 8 features\r\n //Remove empty strings \r\n List<String> strings = Arrays.asList(\"abc\", \"\", \"bc\", \"efg\", \"abcd\",\"\", \"jkl\");\r\n List<String> filtered = strings.stream().filter(string -> !string.isEmpty()).collect(Collectors.toList());\r\n System.out.println(\"String filtered list\"+filtered);\r\n \r\n //get list of unique squares\r\n List<Integer> numbers = Arrays.asList(3, 2, 2, 3, 7, 3, 5);\r\n \r\n List<Integer> squaresList = numbers.stream().map( i -> i*i).distinct().collect(Collectors.toList());\r\n System.out.println(\"Uniue squreslist\"+squaresList);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.1 ===============\\n\");\n\t\t/*\n\t\tO X O X O X O \n\t\tX O X O X O X \n\t\tO X O X O X O \n\t\tX O X O X O X \n\t\tO X O X O X O \n\t\tX O X O X O X \n\t\tO X O X O X O \n\t\t*/\n\t\t// Pattern1 Start\n\t\tint size = 7;\n\t\n\t\tfor (int j=0;j<size;j++) {\n\t\t\tfor (int i=0;i<size;i++) {\n\t\t\t\tif((i+j)%2==0) \n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"O \");\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.print(\"X \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}\t\n\t\t// Pattern1 End\n\t\tSystem.out.println(\"\\n============== Prog.2 ===============\\n\");\n\t\t/*\n\t\t* * * * * * * * * \n\t\t* * * * * * * \n\t\t * * * * * * \n\t\t * * * * * \n\t\t * * * * \n\t\t * * * \n\t\t * * * \n\t\t * * \n\t\t * \n\t\t * \n\t\t *\n\t\t * */\n\t\t// Pattern 2 Start\n\t\tint maxNum;\n\t\tint arr[] = {8,2,4,1,13,7,5,3};\n\t\tSystem.out.print(\"Length of array: \"+arr.length+\"\\nValues in Array:\");\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\tSystem.out.print(arr[i]+\" \");\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\t\n\t\tfor (int i=0;i<arr.length-1;i++) {\n\t\t\tif (arr[i]>arr[i+1]) {\n\t\t\t\tint tmp=arr[i+1]; // small value in tmp\n\t\t\t\tarr[i+1]=arr[i]; // large value\n\t\t\t\tarr[i]=tmp;\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\tSystem.out.print(arr[i]+\" \");\n\t\t}\n\t\tmaxNum=Array.getInt(arr, arr.length-1);\n\t\tSystem.out.print(\"\\nMax number in array: \"+maxNum+\"\\n\\n\");\n\t\t\n\t\t\n\t\tfor (int j=0;j<maxNum;j++) {\n\t\t\tfor (int i=0;i<arr.length;i++) {\n\t\t\t\tif (j>=arr[i]) {\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.print(\"* \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}\n\t\t// Pattern 2 End\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.3 ===============\\n\");\n\t\t\n\t\t// Pattern 3 Start\n\t\t\n\t\t// Find missing value without using sorting\n\t\tint arr2[] = {4,5,10,2,9,3,1,11,6,8};\n\t\tint total=0;\n\t\tfor (int i=0;i<arr2.length;i++) {\n\t\t\ttotal=total+arr2[i];\n\t\t}\n\t\tSystem.out.print(\"Array size: \"+arr2.length+\" & Array sum is: \"+total);\n\t\t\n\t\t// Pattern 3 End\n\t\tSystem.out.println(\"\\n============== Prog.4 ===============\\n\");\n\t\t// Pattern 4 Start\n\t\t/*\n\t\t *\n\t\t **\n\t\t ***\n\t\t ****\n\t\t ******\n\t\t * */\n\t\tint range=5;\n\t\tfor (int i=0;i<range;i++) {\n\t\t\tfor (int j=0;j<=i;j++) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\t\n\t\t// Pattern 4 End\n\t\tSystem.out.println(\"\\n============== Prog.5 ===============\\n\");\n\t\t// Pattern 5 Start\n\t\t/*\n\t\t *\n\t\t * *\n\t\t * * *\n\t\t * * * *\n\t\t * * * * *\n\t\t * */\n\t\tint prog5Length=5;\n\t\tfor (int i=1;i<=prog5Length;i++) {\n\t\t\tfor (int j=4;j>=i;j--) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(int j=1;j<=i;j++) {\n\t\t\t\tSystem.out.print(\" *\");\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\t\n\t\t// Pattern 5 End\n\t\tSystem.out.println(\"\\n============== Prog.6 ===============\\n\");\n\t\t/*\n\t\t *\n\t\t * *\n\t\t * * *\n\t\t * * * * \n\t\t* * * * *\n\t\t * * * *\n\t\t * * *\n\t\t * *\n\t\t * \n\t\t * */\n\t\t// Pattern 6 Start\n\t\tint prog6Size=15;\n\t\tfor(int i=1;i<=prog6Size/2;i++) {\n\t\t\tfor(int j=(prog6Size/2)-1;j>=i;j--) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int k=1;k<=i;k++) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\t\n\t\t}\n\t\tfor(int i=1;i<=(prog6Size/2)-1;i++) {\n\t\t\tfor(int j=1;j<=i;j++) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int k=(prog6Size/2)-1;k>=i;k--) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\t\n\t\t}\n\t\t// Pattern 6 End\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.7 ===============\\n\");\n\t\t/*\n\t\t * Print integer line using 2D array, Ex.\n\t\t * 1\n\t\t * 2\n\t\t * 3\n\t\t * 4\n\t\t * 5\n\t\t * */\n\t\t// Pattern 7 Start\n\t\tint row=5,col=1;\n\t\tint[][] my2DArray=new int[row][col];\n\t\tmy2DArray[0][0]=1;\n\t\tmy2DArray[1][0]=2;\n\t\tmy2DArray[2][0]=3;\n\t\tmy2DArray[3][0]=4;\n\t\tmy2DArray[4][0]=5;\n\t\tfor(int i=0;i<row;i++) {\n\t\t\tSystem.out.println(my2DArray[i][0]);\n\t\t}\n\t\t// Pattern 7 End\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.8 ===============\\n\");\n\t\t/*\n\t\t *\n *\n *\n *\n *\n\t\t* */\n\t\t// Pattern 8 Start\n\t\tint prog8Size=5;\n\t\tfor (int m=1;m<=prog8Size;m++) {\n\t\t\tfor (int i=prog8Size-1;i>m-1;i--) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}System.out.print(\" *\\n\");\n\t\t}\n\t\t// Pattern 8 End\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.9 ===============\\n\");\n\t\t// Pattern 9 Start\n\t\t\n\t\t// Pattern 9 End\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.10 ===============\\n\");\n\t\t// Pattern 10 Start\n\t\t\n\t\t// Pattern 10 End\n\t\t\n\t}",
"private void testDifferentKValues()\r\n\t{\r\n\t\tLinkedHashMap<Integer, LinkedHashMap<Integer, Double>> energies;\r\n\r\n\t\tif (isEType) {\r\n\t\t\tenergies = ENERGIES_E;\r\n\t\t} else {\r\n\t\t\tenergies = ENERGIES_A;\r\n\t\t}\r\n\r\n\t\tfor (Map.Entry<Integer, LinkedHashMap<Integer, Double>> entry : energies.entrySet()) {\r\n\t\t\t\r\n\t\t\titerationsGoneThrough++;\r\n\t\t\tint percent = (int) ((iterationsGoneThrough / numberOfKIterations) * 80 + 20);\r\n\t\t\tmultiThreadingObj.myPublish(\"msg Generating assignments: \" + percent + \"%\");\r\n\t\t\tmultiThreadingObj.myPublish(\"val \" + percent);\r\n\t\t\t\r\n\t\t\tcurrentK = entry.getKey();\r\n\t\t\tenergiesForCurrentK = entry.getValue();\r\n\t\t\t\r\n\t\t\ttestDifferentJRangesForConstantK();\r\n\t\t}\r\n\t}",
"public static void main(String[] args){\n int[] nums = {10, 15, 3, 7};\n System.out.println(solution2(nums, 17));\n System.out.println(solution2(nums, 25));\n System.out.println(solution2(nums, 11));\n }",
"public static void main(String[] args) {\n\t\t\tSystem.out.println(\"Question 1\");\r\n\t\t\tfloat a = 5240.5f;\r\n\t\t\tfloat b = 10970.055f;\r\n\t\t\tint x = (int) a;\r\n\t\t\tint y = (int) b;\r\n\t\t\tSystem.out.println(x);\r\n\t\t\tSystem.out.println(y + \"\\n\");\r\n\r\n\t\t\t// Question 2:\r\n\t\t\tSystem.out.println(\"Question 2\");\r\n\t\t\tint a1 = random.nextInt(100000);\r\n\t\t\tSystem.out.printf(\"%05d\", a1);\r\n\t\t\tSystem.out.println(\"\\n\");\r\n\r\n\t\t\t// Question 3:\r\n\t\t\tSystem.out.println(\"Question 3\");\r\n\t\t\tint b1 = a1 % 100;\r\n\t\t\tSystem.out.println(\"Hai số cuối của a1: \" + b1);\r\n\t\t\tSystem.out.println(\"\\n\");\r\n\r\n\t\t\tQuestion4();\r\n\r\n\t\t\tExercise2();\r\n\r\n\t\t\tSystem.out.println(\"\\n\");\r\n\r\n\t\t\t// Exercise 3:\r\n\t\t\tSystem.out.println(\"Exercise3\");\r\n\t\t\t// Question 1:\r\n\t\t\tSystem.out.println(\"Question 1:\");\r\n\t\t\tInteger salary = 5000;\r\n\t\t\tfloat salaryf = salary;\r\n\t\t\tSystem.out.printf(\"%.2f\", salaryf);\r\n\r\n\t\t\t// Question 2:\r\n\t\t\tSystem.out.println(\"Question 2:\");\r\n\t\t\tString value = \"1234567\";\r\n\t\t\tint a2 = Integer.parseInt(value);\r\n\t\t\tSystem.out.println(a2);\r\n\r\n\t\t\t// Question 3:\r\n\t\t\tSystem.out.println(\"Question 3:\");\r\n\t\t\tInteger value1 = 1234567;\r\n\t\t\tint a3 = value1.intValue();\r\n\t\t\tSystem.out.println(a3);\r\n\t\t\tSystem.out.println(\"\\n\");\r\n\r\n\t\t\t// Exercise 4:\r\n\t\t\tSystem.out.println(\"Exercise 4:\");\r\n\t\t\t// Question 1:\r\n\t\t\tSystem.out.println(\"Question 1\");\r\n\t\t\tSystem.out.println(\"Mời bạn nhập họ và tên: \");\r\n\t\t\tString nhapGiaTri1 = scanner.nextLine();\r\n\t\t\tString nhapGiaTri = scanner.nextLine();\r\n\t\t\tint count = 1;\r\n\t\t\tint j;\r\n\t\t\tfor (j = 0; j < nhapGiaTri.length(); j++) {\r\n\t\t\t\tif (nhapGiaTri.charAt(j) != ' ') {\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Độ dài của chuỗi ký tự nhapGiaTri: \" + count);\r\n\t\t\tSystem.out.println(\"\\n\");\r\n\r\n\t\t\t// Question 2:\r\n\t\t\tSystem.out.println(\"Question 2\");\r\n\t\t\tSystem.out.println(\"Mời bạn nhập chuỗi ký tự 1: \");\r\n\t\t\tString s1 = scanner.next();\r\n\t\t\tSystem.out.println(\" \");\r\n\t\t\tSystem.out.println(\"Mời bạn nhập chuỗi ký tự 2: \");\r\n\t\t\tString s2 = scanner.next();\r\n\t\t\tSystem.out.println(\"Kết quả khi nối hai xâu kí tự s1 và s2: \" + s1 + s2);\r\n\t\t\tSystem.out.println(\"\\n\");\r\n\r\n\t\t\t// Question 3:\r\n\t\t\tSystem.out.println(\"Mời bạn nhập họ tên: \");\r\n\t\t\tString hoTen1 = scanner.nextLine();\r\n\t\t\tString hoTen2 = scanner.nextLine();\r\n\t\t\tString hoTen = hoTen2.substring(0, 1).toUpperCase() + hoTen2.substring(1);\r\n\t\t\tSystem.out.println(hoTen);\r\n\t\t\tSystem.out.println(\"\\n\");\r\n\r\n\t\t\t// question 4:\r\n\t\t\tString name;\r\n\t\t\tSystem.out.println(\"Nhập tên: \");\r\n\t\t\tname = scanner.nextLine();\r\n\t\t\tname = name.toUpperCase();\r\n\t\t\tfor (int i = 0; i < name.length(); i++) {\r\n\t\t\t\tSystem.out.println(\"Ký tự thứ \" + i + \" là: \" + name.charAt(i));\r\n\t\t\t}\r\n\r\n\t\t\t// question 5:;\r\n\t\t\tSystem.out.println(\"Nhập họ: \");\r\n\t\t\tString firstName = scanner.nextLine();\r\n\t\t\tSystem.out.println(\"Nhập tên: \");\r\n\t\t\tString lastName = scanner.nextLine();\r\n\t\t\tSystem.out.println(\"Họ tên đầy đủ: \" + firstName.concat(lastName));\r\n\r\n\t\t\t// question 6:\r\n\t\t\tSystem.out.println(\"Nhập họ: \");\r\n\t\t\tString firstName1 = scanner.nextLine();\r\n\t\t\tSystem.out.println(\"Nhập tên: \");\r\n\t\t\tString lastName1 = scanner.nextLine();\r\n\t\t\tSystem.out.println(\"Họ tên đầy đủ: \" + firstName.concat(lastName));\r\n\r\n\t\t\t// question 7:\r\n\r\n\t\t\tString fullName;\r\n\t\t\tSystem.out.println(\"Nhập họ tên đầy đủ\");\r\n\t\t\tfullName = scanner.nextLine();\r\n\t\t\t// remove space characters\r\n\t\t\tfullName = fullName.trim();\r\n\t\t\tfullName = fullName.replaceAll(\"\\\\s+\", \" \");\r\n\t\t\tSystem.out.println(fullName);\r\n\t\t\tString[] words = fullName.split(\" \");\r\n\t\t\tfullName = \"\";\r\n\t\t\tfor (String word : words) {\r\n\t\t\t\tString firstCharacter = word.substring(0, 1).toUpperCase();\r\n\t\t\t\tString leftCharacter = word.substring(1);\r\n\t\t\t\tword = firstCharacter + leftCharacter;\r\n\t\t\t\tfullName += word + \" \";\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Họ tên sau khi chuẩn hóa: \" + fullName);\r\n\r\n\t\t\t// question 8:\r\n\t\t\tString[] groupNames = { \"Java with VTI\", \"Cách qua môn gia va\", \"Học Java có khó không?\" };\r\n\t\t\tfor (String groupName : groupNames) {\r\n\t\t\t\tif (groupName.contains(\"Java\")) {\r\n\t\t\t\t\tSystem.out.println(groupName);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Question 9:\r\n\t\t\tString[] groupNames1 = { \"Java\", \"C#\", \"C++\" };\r\n\t\t\tfor (String groupName : groupNames) {\r\n\t\t\t\tif (groupName.equals(\"Java\")) {\r\n\t\t\t\t\tSystem.out.println(groupName);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// question 10:\r\n\t\t\tString x1, x2, reversex1 = \"\";\r\n\t\t\tSystem.out.println(\"Nhập chuỗi 1\");\r\n\t\t\tx1 = scanner.nextLine();\r\n\t\t\tSystem.out.println(\"Nhập chuỗi 2\");\r\n\t\t\tx2 = scanner.nextLine();\r\n\t\t\tfor (int i = x1.length() - 1; i >= 0; i--) {\r\n\t\t\t\treversex1 += x1.substring(i, i + 1);\r\n\t\t\t}\r\n\t\t\tif (x2.equals(reversex1)) {\r\n\t\t\t\tSystem.out.println(\"Đây là chuỗi đảo ngược !\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Đây không phải chuỗi đảo ngược\");\r\n\t\t\t}\r\n\r\n\t\t\t// question 11:\r\n\t\t\tSystem.out.println(\"Mời bạn nhập vào một chuỗi: \");\r\n\t\t\tString str = scanner.nextLine();\r\n\t\t\tint count1 = 0;\r\n\t\t\tfor (int i = 0; i < str.length(); i++) {\r\n\t\t\t\tif ('a' == str.charAt(i)) {\r\n\t\t\t\t\tcount1++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(count);\r\n\r\n\t\t\t// question 12:\r\n\t\t\tString daoNguoc = \"\";\r\n\t\t\tSystem.out.println(\"Nhập chuỗi 1\");\r\n\t\t\tString x3 = scanner.nextLine();\r\n\t\t\tfor (int i = x3.length() - 1; i >= 0; i--) {\r\n\t\t\t\tdaoNguoc += x3.charAt(i);\r\n\t\t\t}\r\n\t\t\tSystem.out.println(daoNguoc);\t\t\t\r\n\t\t\t\r\n\t\t}",
"public static void main(String[] args) {\n double weightKilograms = 26.2;\n\n double weightGrams = WeightConverter.convertKilogramToGrams(weightKilograms);\n double weightTones = WeightConverter.convertKilogramToTones(weightKilograms);\n double weightMilligrams = WeightConverter.convertKilogramToMilligrams(weightKilograms);\n\n System.out.printf(\"%.2f kg it's %.2f grams, %.4f tons, %.2f Milligrams\\n\", weightKilograms, weightGrams, weightTones, weightMilligrams);\n\n //second: area of ring\n double radiusFirst = 24;\n double radiusSecond = 12;\n double area = AreaCalculator.calculateRingArea(radiusFirst, radiusSecond);\n System.out.println(\"area of ring \" + Double.toString(area));\n\n //third: swap 2 numbers\n int firstNumber = 5;\n int secondNumber = 23;\n Swapper swapper = new Swapper(firstNumber, secondNumber);\n System.out.println(\"before swap: \" + swapper.toString());\n swapper.swapInt();\n System.out.println(\"after swap: \" + swapper.toString());\n\n //fourth: increase or not sequence\n int sequence = 1357;\n boolean increase = CheckerSequence.increaseSequence(sequence);\n System.out.println(\"sequence is increase \" + increase);\n\n\n //fifth: sum and multiplication numbers\n int number = 23324;\n int multiplication = CountNumbers.multiplyNumbers(number);\n int sum = CountNumbers.addNumbers(number);\n System.out.println(\"multiplication of numbers: \" + multiplication + \"\\nsum of numbers: \" + sum);\n\n\n //sixth: Arithmetic and Geometric Mean\n number = 123123;\n double s = Means.findArithmeticMean(number);\n System.out.println(\"Arithmetic mean of numbers: \" + s);\n s = Means.findGeometricMean(number);\n System.out.println(\"Geometric mean of numbers: \" + s);\n\n //seventh:\n int numberForReverse = 1234567;\n numberForReverse = Reverse.reverseNumber(numberForReverse);\n System.out.println(numberForReverse);\n }",
"public static void main(String[] args) {\n int upperBound = 20;\n int lowerBound = 0;\n int operandCount = 5;\n boolean isHaveAddition = true;\n boolean isHaveSubtraction = true;\n boolean isHaveMultiplication = true;\n boolean isHaveDivision = true;\n int formulaCount = 1;\n int decimalPrecision = 3;\n\n //Store the generated results\n List<String> formulas;\n List<String> results;\n\n Generator generator = new Generator(upperBound, lowerBound,\n operandCount, isHaveAddition, isHaveSubtraction,\n isHaveMultiplication, isHaveDivision, formulaCount, decimalPrecision);\n\n formulas = generator.getFormulas();\n results = generator.getResults();\n\n for (int i = 0; i < formulaCount; i++) {\n System.out.println(formulas.get(i) + \" = \" + results.get(i));\n }\n\n }",
"public static void main(String[] args) {\n int arr[] = {479,758,315,472,730,101,460,619,510,612,8};\n System.out.println(\"find subset sum Top down: \"+findEqualSumSubsetTopDown(arr,arr.length));\n System.out.println(\"find subset sum Bottom Up: \"+findEqualSumSubsetBottomUp(arr,arr.length));\n\t}",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int T = sc.nextInt();\n for (int Q = 0; Q < T; Q++) {\n \tint N = sc.nextInt();\n \tint M = sc.nextInt();\n \tint[][] m = new int[M][3];\n \tfor (int i = 0; i < M; i++) {\n \t\tm[i][0] = sc.nextInt();\n \t\tif (m[i][0] == 1) {\n \t\t\t//合并x和y所在的集合\n \t\t\tm[i][1] = sc.nextInt();\n\t\t\t\t\tm[i][2] = sc.nextInt();\n\t\t\t\t\t\n\t\t\t\t}else if(m[i][0] == 2){\n\t\t\t\t\t//将x提出来成立新的集合\n\t\t\t\t\tm[i][1] = sc.nextInt();\n\t\t\t\t\t\n\t\t\t\t}else if(m[i][0] == 3){\n\t\t\t\t\t//输出x所在集合的正整数个数\n\t\t\t\t\tm[i][1] = sc.nextInt();\n\t\t\t\t\tSystem.out.println(i);\n\t\t\t\t}\n \t}\n }\n\t}",
"@Test\n public void test() {\n Assert.assertEquals(3L, Problem162.solve(/* change signature to provide required inputs */));\n }",
"public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t//(20,10)(30,18)\n\t\tint x1=0,y1=10,x2,y2,i=0;\n\t\t\n\t\t/*System.out.print(\"Enter the X1 : \");\n\t\tx1 = sc.nextInt();\n\t\tSystem.out.print(\"Enter the Y1 : \");\n\t\ty1 = sc.nextInt();*/\n\t\t\n\t\t\n\t\t/*System.out.print(\"Enter the X2 : \");\n\t\tx2 = sc.nextInt();\n\t\tSystem.out.print(\"Enter the Y2 : \");\n\t\ty2 = sc.nextInt();\n\t\tint dellY, dellX;\n\t\tdellX =x2 - x1;\n\t\tdellY=y2 -y1;\n\t\tint dInitial, dNew, dellD;\n\t\tdInitial = 2*dellY - dellX;\n\t\tdNew = dInitial;\n\t\tdellD = 2*(dellY - dellX);\n\t\t\n//\t\tint a,b;\n\t\tSystem.out.println(\"Dell Of X : \"+dellX);\n\t\tSystem.out.println(\"Dell Of Y : \"+dellY);\n\t\tSystem.out.println(\"D initial : \"+dInitial);\n\t\tSystem.out.println(\"D new value : \"+dNew);\n\t\t*/\n\t\t\n\t\t\n\t\tint R = 1- 10;\n\t\tint pK =R;\n\t\tint pK1 =R;\n\t\t\n\t\tSystem.out.println(\"(index ) ( P_k ) ( P_k1 ) (X_k+1 ) ( Y_k+1 ) ( X , Y ) \");\n\t\tSystem.out.println();\n\t\t\n\t\tSystem.out.println(\" \"+i+\" \"+pK+\" \"+pK1+\" \"+2*x1+\" \"+2*y1+\" (\"+x1+\",\"+y1+\")\");\n\t\t//x++;\n\t\twhile(!(x1>=y1)) {\n\t\t\ti++;\n\t\t\t\n\t\t\t\n\t\t\tif(pK<0) {\n\t\t\t\tx1++;\n\t\t\t\tpK1 =pK + 2*x1 + 1;\n\t\t\t\t//System.out.println(\"pK1= \"+pK+\" + \"+2*x1+\"+\"+1);\n\t\t\t\tSystem.out.println(\" \"+i+\" \"+pK+\" \"+\"pK1= \"+pK+\" + \"+2*x1+\"+\"+1+\"=\"+pK1+\" \"+2*x1+\" \"+2*y1+\" (\"+x1+\",\"+y1+\")\");\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\ty1--;\n\t\t\t\tx1++;\n\t\t\t\tpK1 = pK + 2*x1 + 1 - 2*y1;\n\t\t\t\t//System.out.println(\"pK1= \"+pK+\" + \"+2*x1+\"+\"+1+\"-\"+2*y1);\n\t\t\t\tSystem.out.println(\" \"+i+\" \"+pK+\" \"+\"pK1= \"+pK+\" + \"+2*x1+\"+\"+1+\"=\"+pK1+\" \"+2*x1+\" \"+2*y1+\" (\"+x1+\",\"+y1+\")\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tpK = pK1;\n\t\t\t\n\t\t\t\n\t\t}\n\n\t}",
"public void test4Draft(){\n assertEquals( 4, $computeRange.$list().size());\n //System.out.println( $computeRange.list$Normalized() );\n assertEquals( 4, $computeRange.$listNormalized().size());\n //System.out.println($computeRange.fill(\"multiply10to20\",10,20,\"*\"));\n }",
"public static void main(String[] args) {\n int[] test1 = {1};\n int[] test2 = {0, 10};\n int[] test3 = {1,3,6};\n SolutionSmallestRange1 solutionSmallestRange1 = new SolutionSmallestRange1();\n System.out.println(solutionSmallestRange1.smallestRangeI(test1, 0));\n System.out.println(solutionSmallestRange1.smallestRangeI(test2, 2));\n System.out.println(solutionSmallestRange1.smallestRangeI(test3, 3));\n \n\t}",
"@Test\n void find() {\n\n assertEquals(3, FindOutlier.find(ints1));\n assertEquals(1, FindOutlier.find(ints2));\n assertEquals(17, FindOutlier.find(ints3));\n assertEquals(2, FindOutlier.find(ints4));\n assertEquals(44, FindOutlier.find(ints5));\n assertEquals(1000, FindOutlier.find(ints6));\n assertEquals(-3, FindOutlier.find(ints7));\n assertEquals(-35, FindOutlier.find(ints8));\n assertEquals(-1 * Integer.MAX_VALUE, FindOutlier.find(ints9));\n assertEquals(-20, FindOutlier.find(ints10));\n assertEquals(-44, FindOutlier.find(ints11));\n assertEquals(1, FindOutlier.find(ints12));\n assertEquals(0, FindOutlier.find(ints13));\n }",
"@Test\r\n\tpublic void testInput2() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"5432.00\"), 1, \"drugs\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"6199.81\"));\r\n\t}",
"public static void main(String[] args) throws Exception{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t//int n = sc.nextInt();\n\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\t\n\t\t//System.out.print(n);\n\t\tString input1 = null;\n\t\tString input2 = null;\n\t\tint arr1[] = new int[n];\n\t\tint arr2[] = new int[n];\n\t\t\n\t\tinput1 = br.readLine();\n\t\tinput2 = br.readLine();\n\t\t\n\t\t\n\t\tString tokens1[] = input1.split(\"\\\\s+\");\n\t\tString tokens2[] = input2.split(\"\\\\s+\");\n\t\t\n\t\tfor(int i =0;i<n;i++)\n\t\t{\n\t\t\tarr1[i] = Integer.parseInt(tokens1[i]); \n\t\t\tarr2[i] = Integer.parseInt(tokens2[i]); \n\t\t}\n\t\t\n\t\tHashMap<Integer, Integer> array1 = new HashMap<>();\n\t\tHashMap<Integer, Integer> array2 = new HashMap<>();\n\t\t\n\t\tfor(int i = 0;i<n;i++)\n\t\t{\n\t\t\tarray1.put(arr1[i], i);\n\t\t\tarray2.put(arr2[i], i);\n\t\t}\n\t\tint diff[] = new int[n];\n\t\t\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tdiff[i] = Math.abs(i - array2.get(arr1[i]));\n\t\t}\n\t\tint min = diff[0];\n\t\tint minIndex = 0;\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tif(diff[i] < min)\n\t\t\t{\n\t\t\t\tmin = diff[i];\n\t\t\t\tminIndex = i;\n\t\t\t}\n\t\t\telse if(diff[i] == min)\n\t\t\t{\n\t\t\t\tif(arr1[i] < arr1[minIndex])\n\t\t\t\t{\n\t\t\t\t\tminIndex = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(arr1[minIndex]);\n\t\t\n\t}",
"public static void main(String[] args) {\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tString[] input = sc.nextLine().split(\" \");\r\n\t\tint a = Math.max(Integer.valueOf(input[0]), Integer.valueOf(input[1]));\r\n\t\tint b = Math.min(Integer.valueOf(input[0]), Integer.valueOf(input[1]));\r\n\t\tint N = Integer.valueOf(sc.nextLine());\r\n\t\tList<String> inputList = new ArrayList<String>(N);\r\n\t\twhile (N > 0) {\r\n\t\t\tinputList.add(sc.nextLine());\r\n\t\t\tN--;\r\n\t\t}\r\n\t\tint i = 0;\r\n\t\twhile (i < inputList.size()) {\r\n\t\t\tinput = inputList.get(i).split(\" \");\r\n\r\n\t\t\tif (input[0].equals(\"R\")) {\r\n\t\t\t\tint p = Math.max(Integer.valueOf(input[1]), Integer.valueOf(input[2]));\r\n\t\t\t\tint q = Math.min(Integer.valueOf(input[1]), Integer.valueOf(input[2]));\r\n\t\t\t\tif (p <= a && q <= b)\r\n\t\t\t\t\tSystem.out.println(\"YES\");\r\n\t\t\t\telse {\r\n\t\t\t\t\tdouble sumPower = Math.pow(p, 2) + Math.pow(q, 2);\r\n\t\t\t\t\tdouble diffPower = Math.pow(p, 2) - Math.pow(q, 2);\r\n\t\t\t\t\tif (p > a && b >= (((2 * p * q * a) + (diffPower * Math.pow(sumPower - Math.pow(a, 2), 0.5))) / sumPower))\r\n\t\t\t\t\t\tSystem.out.println(\"YES\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tSystem.out.println(\"NO\");\r\n\t\t\t\t}\r\n\t\t\t} else if (input[0].equals(\"C\")) {\r\n\t\t\t\tif (((22 / 7) * Math.pow(Integer.valueOf(input[1]), 2)) < a * b)\r\n\t\t\t\t\tSystem.out.println(\"YES\");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.println(\"NO\");\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tsc.close();\r\n\t}",
"@Test\r\n public void gallonsCauldronHolds() {\r\n \r\n System.out.println(\"gallonsCauldronHolds\");\r\n \r\n //Test #1\r\n System.out.println(\"Test case #1\"); \r\n \r\n double diameter = 50;\r\n double depth = 25;\r\n \r\n SceneControl instance = new SceneControl();\r\n \r\n double expResult = 212.500;\r\n double result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #2\r\n System.out.println(\"Test case #2\");\r\n \r\n diameter = 15;\r\n depth = -12;\r\n \r\n expResult = -1;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #3\r\n System.out.println(\"Test case #3\");\r\n \r\n diameter = -5;\r\n depth = 20;\r\n \r\n expResult = -1;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #4\r\n System.out.println(\"Test case #4\");\r\n \r\n diameter = 0;\r\n depth = 30;\r\n \r\n expResult = -1;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #5\r\n System.out.println(\"Test case #5\");\r\n \r\n diameter = 14;\r\n depth = 0;\r\n \r\n expResult = -1;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #6\r\n System.out.println(\"Test case #6\");\r\n \r\n diameter = 1;\r\n depth = 12;\r\n \r\n expResult = .041;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #7\r\n System.out.println(\"Test case #7\");\r\n \r\n diameter = 20;\r\n depth = 1;\r\n \r\n expResult = 1.36;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x1 = sc.nextInt();\n\t\tint y1 = sc.nextInt();\n\t\tint x2 = sc.nextInt();\n\t\tint y2 = sc.nextInt();\n\t\tint x3 = sc.nextInt();\n\t\tint y3 = sc.nextInt();\n\t\tint resultX = 0;\n\t\tint resultY = 0;\n\t\tif (x1 == x2) {\n\t\t\tresultX = x3;\n\t\t} else if (x1 == x3) {\n\t\t\tresultX = x2;\n\t\t} else {\n\t\t\tresultX = x1;\n\t\t}\n\t\tif (y1 == y2) {\n\n\t\t\tresultY = y3;\n\t\t} else if (y1 == y3) {\n\n\t\t\tresultY = y2;\n\t\t} else {\n\t\t\tresultY = y1;\n\t\t}\n\t\tSystem.out.println(resultX+\" \"+resultY);\n\t}",
"public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint t = in.nextInt();\n\t\twhile( t-- > 0 )\n\t\t{\n\t\t\tint n = in.nextInt();\n\t\t\tint m = in.nextInt();\n\t\t\tString s[] = new String[n];\n\t\t\tfor( int i = 0 ; i < n ; i++ )\n\t\t\t{\n\t\t\t\ts[i] = in.next();\n\t\t\t}\n\t\t\tArrayList<Point> p = new ArrayList<>();\n\t\t\tfor(int i = 0 ; i < n ; i++ )\n\t\t\t{\n\t\t\t\tfor(int j = 0 ; j < m ; j++)\n\t\t\t\t{\n\t\t\t\t\tif(s[i].charAt(j) == '1')\n\t\t\t\t\t{\n\t\t\t\t\t\tp.add(new Point(i,j));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n//\t\t\tfor(int i = 0 ; i < p.size() ;i++ )\n//\t\t\t{\n//\t\t\t\tSystem.out.println(p.get(i).x +\" \" + p.get(i).y );\n//\t\t\t}\n\t\t\t\n\t\t\tHashMap<Integer,Integer> map = new HashMap<>();\n\t\t\tfor(int i = 1 ; i < p.size() ; i++ )\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(int i = 0 ; i < p.size() ;i++ )\n\t\t\t{\n\t\t\t\tfor(int j = i + 1 ; j < p.size() ; j++ )\n\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\t\tPoint p1 = p.get(i);\n\t\t\t\t\t\tPoint p2 = p.get(j);\n\t\t\t\t\t\tint d = Math.abs(p1.x - p2.x) + Math.abs(p1.y - p2.y);\n\t\t\t\t\t\tif(!map.containsKey(d))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmap.put(d, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmap.put(d, map.get(d) + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 1 ; i <= n + m - 2 ; i++)\n\t\t\t{\n\t\t\t\tif (map.containsKey(i))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(map.get(i)+ \" \");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(0 + \" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\n\t\tScanner scanner=new Scanner(System.in);\n\t\tint noOftestCases = scanner.nextInt();\n\t\t\n\t\tfor (int p = 0; p < noOftestCases; p++) {\n\t\t\tint buffer[]=new int[100001];\n\t\t\tint size = scanner.nextInt();\n\t\t\t//int x[]=new int[size];\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tint temp=scanner.nextInt();\n\t\t\t\tbuffer[temp%100000]++;\n\t\t\t}\n\t\t\tint kSmallest = scanner.nextInt();\n\t\t\tint i=0;\n\t\t\twhile(kSmallest>0){\n\t\t\t\ti++;\n\t\t\t\tif(buffer[i]!=0)\n\t\t\t\t\tkSmallest-=buffer[i];\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(i);\n\t\t\t\n\t\t}\n\t}",
"public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\nSystem.out.println(\"请输入三个比较的整数\");\nint x=sc.nextInt();\nint y=sc.nextInt();\nint z=sc.nextInt();\nBiJiao bi=new BiJiao();\nSystem.out.println(\"最大值为:\"+bi.Max(x, y, z));\nSystem.out.println(\"最小值为:\"+bi.Min(x, y, z));\nsc.close();\n\t}",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint lope_cnt \t\t= sc.nextInt();\n\t\tint[] lope_weight \t= new int[lope_cnt];\n\t\tint max = 0;\n\t\t\n\t\tfor(int i=0;i<lope_cnt;i++) {\n\t\t\tlope_weight[i] = sc.nextInt();\n\t\t}\n\t\t\n\t\tArrays.sort(lope_weight);\n\n\t\tmax = lope_weight[lope_cnt-1];//제일 중량이 큰 밧줄의 최대값\n\t\t\n\t\tfor(int i=0;i<lope_cnt;i++) {//중량을 나눴을 때의 최대 값\n\t\t\tif(max < (lope_weight[i]*(lope_cnt-i)) ) max = lope_weight[i]*(lope_cnt-i);\n\t\t}\n\t\t\n\t\tSystem.out.println(max);\n\t}",
"@Test\n public void allAggregateDeltaBarICsTest1() {\n String text = \"wnylazlzeqntfpwtsmabjqinaweaocfewgpsrmyluadlybfgaltgljrlzaaxvjehhygggdsrygvnjmpyklvyilykdrphepbfgdspjtaap\"\n + \"sxrpayholutqfxstptffbcrkxvvjhorawfwaejxlgafilmzrywpfxjgaltdhjvjgtyguretajegpyirpxfpagodmzrhstrxjrpirlbfgkhhce\"\n + \"wgpsrvtuvlvepmwkpaeqlstaqolmsvjwnegmzafoslaaohalvwfkttfxdrphepqobqzdqnytagtrhspnmprtfnhmsrmznplrcijrosnrlwgds\"\n + \"bylapqgemyxeaeucgulwbajrkvowsrhxvngtahmaphhcyjrmielvqbbqinawepsxrewgpsrqtfqpveltkfkqiymwtqssqxvchoilmwkpzermw\"\n + \"eokiraluaammkwkownrawpedhcklrthtftfnjmtfbftazsclmtcssrlluwhxahjeagpmgvfpceggluadlybfgaltznlgdwsglfbpqepmsvjha\"\n + \"lwsnnsajlgiafyahezkbilxfthwsflgkiwgfmtrawtfxjbbhhcfsyocirbkhjziixdlpcbcthywwnrxpgvcropzvyvapxdrogcmfebjhhsllu\"\n + \"aqrwilnjolwllzwmncxvgkhrwlwiafajvgzxwnymabjgodfsclwneltrpkecguvlvepmwkponbidnebtcqlyahtckk\";\n\n double[] expected = new double[21];\n expected[0] = 1.0954174743;\n expected[1] = 1.1125173954;\n expected[2] = 1.1146111504;\n expected[3] = 1.108666275;\n expected[4] = 1.0755653613;\n expected[5] = 1.1417354205;\n expected[6] = 1.9012065203;\n expected[7] = 1.0759283377;\n expected[8] = 1.0989061133;\n expected[9] = 1.104109589;\n expected[10] = 1.1004143115;\n expected[11] = 1.1254979729;\n expected[12] = 1.0689223058;\n expected[13] = 1.9305533534;\n expected[14] = 1.1191791383;\n expected[15] = 1.0702718676;\n expected[16] = 1.0317716939;\n expected[17] = 1.1070718802;\n expected[18] = 1.023832697;\n expected[19] = 1.1145645646;\n expected[20] = 1.9334400427;\n\n double[] actuals = this.ic.allAggregateDeltaBarICs(text);\n\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], actuals[i], 0.01);\n }\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"\"+(int)(Math.log(Integer.MAX_VALUE)/ Math.log(3)));\n//\t\tint[] arr = { 5, 3, 1, 2, 4 };\n\t\tint[] arr = ArrayUtils.buildIntArrayNoDup(6, 0,20);\n//\t\tint[] arr = ArrayUtils.generateIntArrayWithDup(6, 0,20);\n//\t\tint[] arr = { 3, 3, 7, 19, 16, 13 };\n\t\tprint(arr);\n\t\tSystem.out.println(\"\" + toStr(findNextRighClosestGreaterDis(arr)));\n\t}",
"public static void main(String[] args) throws Exception{\n Scanner scan = new Scanner(System.in);\n //DecimalFormat form = new DecimalFormat(\"0.000\");\n \n int n = scan.nextInt();\n for(int i = 0; i < n; i++)\n {\n int nAnt = scan.nextInt();\n double xMax = -1000;\n double xMin = 1000;\n double yMax = -1000;\n double yMin = 1000;\n for(int j = 0; j < nAnt; j++)\n {\n double x = scan.nextDouble();\n double y = scan.nextDouble();\n if(x > xMax)\n xMax = x;\n if(x < xMin)\n xMin = x;\n if(y > yMax)\n yMax = y;\n if(y < yMin)\n yMin = y;\n }\n double xLen = xMax - xMin;\n double yLen = yMax - yMin;\n String area = \"\"+(xLen * yLen);\n String per = \"\"+(xLen * 2 + yLen * 2);\n System.out.println(\"Case \"+(i+1)+\": Area \"+area+\", Perimeter \"+per);\n }\n System.exit(0);\n }",
"public static void main(String[] args) {\n StringBuilder result = new StringBuilder();\n Scanner sc = new Scanner(System.in);\n int testCaseCount = sc.nextInt();\n\n for(int t = 0; t < testCaseCount; t++) {\n int m = sc.nextInt();\n int n = sc.nextInt();\n int[][] grid = new int[m][n];\n gridData = new int[m][n];\n for (int i = 0; i < m; i++) {\n for(int j = 0; j < n; j++) { \n gridData[i][j] = Integer.MAX_VALUE;\n grid[i][j] = sc.nextInt();\n }\n }\n if (t != 0) {\n result.append(\"\\n\");\n }\n result.append(orangesRotting(grid));\n }\n// int[][] grid = {{2,1,1},{0,1,1},{1,0,1}};\n System.out.print(result);\n }",
"public static void main(String[] args) throws IOException {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint tc = sc.nextInt();\n\n\t\tfor (int num = 1; num <= tc; num++) {\n\t\t\tint n = sc.nextInt();\n\t\t\tString str = \"\";\n\t\t\tint arr[] = new int[n];\n\t\t\tboolean flag = false;\n\t\t\tboolean visit[]=new boolean[1001];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = sc.nextInt();\n\t\t\t\tif (!flag && arr[i] == 0)\n\t\t\t\t\tflag = true;\n\t\t\t\tstr += arr[i];\n\t\t\t}\n\t\t\tif (flag) {\n\t\t\t\tint ans = 0;\n\t\t\t\tboolean p=false;\n\t\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\t\tfor (int j = 0; j + i <= n; j++) {\n\t\t\t\t\t\t\tint tmp = Integer.parseInt(str.substring(j, j + i));\n\t\t\t\t\t\t\tvisit[tmp]=true;\n\t\t\t\t\t}\n\t\t\t\t\tint amount=(int)Math.pow(10, i);\n\t\t\t\t\tfor(int k=0;k<amount;k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!visit[k])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tans=k;\n\t\t\t\t\t\t\tp=true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(p)\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"#\" + num + \" \" + ans);\n\t\t\t} else\n\t\t\t\tSystem.out.println(\"#\" + num + \" \" + 0);\n\t\t}\n\t}",
"public static void main(String args[]) {\n\n // aacd(1,1,3,4) amd(1,13,4) kcd(11,3,4)\n // Note : 1,1,34 is not valid as we don't have values corresponding\n // to 34 in alphabet\n int[] arr = {1, 1, 3, 4};\n printAllInterpretations(arr);\n\n // aaa(1,1,1) ak(1,11) ka(11,1)\n int[] arr2 = {1, 1, 1};\n printAllInterpretations(arr2);\n\n // bf(2,6) z(26)\n int[] arr3 = {2, 6};\n printAllInterpretations(arr3);\n\n // ab(1,2), l(12)\n int[] arr4 = {1, 2};\n printAllInterpretations(arr4);\n\n // a(1,0} j(10)\n int[] arr5 = {1, 0};\n printAllInterpretations(arr5);\n\n // \"\" empty string output as array is empty\n int[] arr6 = {};\n printAllInterpretations(arr6);\n\n // abba abu ava lba lu\n int[] arr7 = {1, 2, 2, 1};\n printAllInterpretations(arr7);\n }",
"public static void main(String[] args) {\n Scanner in = new Scanner (System.in);\n int n = in.nextInt(), k = in.nextInt();\n int[] t = new int[n]; for ( int i = 0; i < n; ++i ) { t[i] = in.nextInt(); }\n\n int special = 0;\n // the chapter might be numbered '1', but we need to index the vector\n for ( int chapter = 0, page = 1, nextChapterPage; chapter < n; ++chapter, page = nextChapterPage ) {\n int problemsInChapter = t[chapter], pagesInChapter = ( problemsInChapter + k - 1 ) / k;\n nextChapterPage = page + pagesInChapter;\n if ( page > problemsInChapter )\n continue;\n for ( int problem = 1, nextPageProblem; page < nextChapterPage; ++page, problem = nextPageProblem ) {\n nextPageProblem = problem + k;\n if ( page >= problem && page < nextPageProblem && page <= problemsInChapter )\n ++special;\n }\n }\n System.out.println (special);\n }",
"public static void main(String[] args) throws IOException{\n Reader sc = new Reader();\n \n int n=sc.nextInt();\n int m=sc.nextInt();\n \n int ans[]=new int[n];\n \n for(int i=0;i<m;i++)\n {\n int l=sc.nextInt();\n int r=sc.nextInt();\n // indexing is 1 based.\n l--;\n r--;\n \n ans[l]++;\n if(r!=n-1)\n {\n ans[r+1]--;\n \n } \n \n }\n \n int s=0;\n int max=0;\n for(int i=0;i<n;i++)\n {\n s+=ans[i];\n ans[i]=s;\n if(s>max)\n {\n max=s;\n }\n }\n \n int brr[]=new int[max+1];\n for(int i=0;i<n;i++)\n {\n brr[ans[i]]++;\n \n }\n \n s=0;\n for(int i=max;i>=0;i--)\n {\n s+=brr[i];\n brr[i]=s;\n \n }\n \n int q=sc.nextInt();\n for(int i=0;i<q;i++)\n {\n int x=sc.nextInt();\n if(x>max)\n {\n System.out.println(0);\n }\n else\n \tSystem.out.println(brr[x]);\n }\n \n\t}",
"public static void main(String[] args) throws Exception {\n int arr[]= {7,9,88,-33,2,12,6,1};\n Arrays.sort(arr);\n /*for(int i=0; i<arr.length; i++)\n \t System.out.print(arr[i]+\", \");\n System.out.println(\"\\n DESC\");\n System.out.print(\"{ \");\n for(int i=arr.length-1; i>=0; i--) {\n \t if(arr[i]==arr[0])\n \t System.out.print(arr[i]);\n \t else \n \t\t System.out.print(arr[i]+\", \");\n }*/\n // System.out.print(\" }\");\n \n int[] ar= {6,2,2,5,2,2,1};\n int startIndex=0;\n int lastIndex=ar.length-1;\n //a is sumRight,b = sumLeft\n int a=0,b=0;\n /* while(true) {\n \t \n \t if(b>a) \n \t\t //1+2+2=+5\n \t\t a+=ar[lastIndex--];\n \t else \n \t\t //6+2+2\n \t\t\t b+=ar[startIndex++];\n \t\tif(startIndex>lastIndex) {\n \t\t\tSystem.out.println(startIndex);\n \t\t\tif(a==b)\n \t\t\t\tbreak;\n \t\t\t else\n \t\t\t throw new Exception(\"not a valid array\");\n \t\t\t\n \t\t}\n \t\t\t \n \t\t\n }\n System.out.println(lastIndex);\n */\n \n \n while(true) {\n \t \n \t if(b>a)\n \t\t a+= ar[lastIndex--];\n \t else\n b+=ar[startIndex++];\n \t if(startIndex>lastIndex) {\n \t\t if(a==b)\n \t\t\t break;\n \t }\n }\n System.out.println(lastIndex);\n\t}",
"public static void main(String[] args) {\n Scanner scn = new Scanner(System.in);\n\t\tint n = new.nextInt();\n\t\tint v1=1,v2=0,v3=0;\n\t\tfor(int a=n;a>=1;a--){\n\t\t\tv3=v2+v1;\n\t\t\tSystem.out.print(v3+\"\\t\");\n\t\t\tv1=v2;\n\t\t\tv2=v3;\n\t\t}\n\t}",
"@Test\n\tpublic void testHappyPath() {\n\t\texpected.add(new int[]{94133,94133});\n\t\texpected.add(new int[]{94200,94299});\n\t\texpected.add(new int[]{94600,94699});\n\t\t\n\t\t//interger arrays for happy path\n\t\tint[] a1 = new int[] {94133,94133}, a2 = {94200,94299}, a3 = {94600,94699};\n\n\t\tint canShip1 = 94199, canShip2 = 94300, canShip3 = 65532;\n\t\t\n\t\t//\n\t\tint cantShip1 = 94133, cantShip2 = 94650, cantShip3 = 94230, cantShip4 = 94600, cantShip5 = 94299;\n\t\t\n\t\tSystem.out.println(\"********************************** Start testHappyPath() **********************************\");\n\t\t\n\t\tSystem.out.print(\"Input ZipCode Ranges:---------------> \");\n\t\tZipCodeUtil.printZipRange(a1, a2, a3);\n\t\t\n\t\ttry{\n\t\t\tmergedZips = ZipCodeUtil.getInstance().mergeUniqueRanges(a1, a2, a3);\n\t\t\t\n\t\t\tSystem.out.println(\"<----------------------- :Output \");\n\t\t\t\n\t\t\tfor(int[] range : mergedZips){\n\t\t\t\tZipCodeUtil.printZipRange(range);\t\n\t\t\t}\n\t\t\t\n\t\t\tAssert.assertArrayEquals(expected.toArray(), mergedZips.toArray());\n\n\t\t\tSystem.out.println(\"<----------------------- :ZipCode Range\");\n\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\tSystem.out.println(\"----------------- Test ZipCodes -------------------\");\n\n\t\t\tAssert.assertTrue(\"Can ship to: \"+ canShip1, ZipCodeUtil.getInstance().canShipTo(canShip1));\n\t\t\tSystem.out.println(\"Can ship to: \"+ canShip1 +\" \"+ ZipCodeUtil.getInstance().canShipTo(canShip1));\n\t\t\t\n\t\t\tAssert.assertTrue(\"Can ship to: \"+ canShip2, ZipCodeUtil.getInstance().canShipTo(canShip2));\n\t\t\tSystem.out.println(\"Can ship to: \"+ canShip2 +\" \"+ ZipCodeUtil.getInstance().canShipTo(canShip2));\n\t\t\t\n\t\t\tAssert.assertTrue(\"Can ship to: \"+ canShip3, ZipCodeUtil.getInstance().canShipTo(canShip3));\n\t\t\tSystem.out.println(\"Can ship to: \"+ canShip3 +\" \"+ ZipCodeUtil.getInstance().canShipTo(canShip3));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip1, ZipCodeUtil.getInstance().canShipTo(cantShip1));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip1 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip1));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip2, ZipCodeUtil.getInstance().canShipTo(cantShip2));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip2 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip2));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip3, ZipCodeUtil.getInstance().canShipTo(cantShip3));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip3 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip3));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip4, ZipCodeUtil.getInstance().canShipTo(cantShip4));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip4 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip4));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip5 , ZipCodeUtil.getInstance().canShipTo(cantShip5));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip5 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip5));\n\t\t\t\n\t\t\tSystem.out.println(\"----------------- End Test ZipCodes -------------------\");\n\n\t\t\n\t\t} catch(InvalidZipCode e){\n\t\t\tSystem.err.println(e.getErrorCode() + \" - \" + e.getMessage());\n\t\t\tAssert.fail(e.getErrorCode() + \" - \" + e.getMessage());\n\t\t}finally{\n\n\t\t\tSystem.out.println(\"********************************** End testHappyPath() **********************************\");\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tint arr[] = takeInput();\r\n\t\tint temp[] = new int[fact(arr.length)];\r\n\t\tint k = -1;\r\n\t\tint val = scn.nextInt(), ans = 0;\r\n\r\n\t\tif (arr.length > 0 && arr.length < 1000) {\r\n\t\t\tfor (int i = 0; i < arr.length; i++) {\r\n\t\t\t\tans = sumExceptthis(arr, arr[i], val, i);\r\n\t\t\t\tif (ans != -1) {\r\n\t\t\t\t\ttemp[++k] = (int) Math.min(arr[i], ans);\r\n\t\t\t\t\ttemp[++k] = (int) Math.max(arr[i], ans);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// System.out.println((int) Math.min(arr[i], ans) + \" and \" +\r\n\t\t\t\t// (int)Math.max(arr[i], ans));\r\n\t\t\t\t// System.out.println(arr[i] + \" and \" + ans);\r\n//\t\t\t\telse\r\n//\t\t\t\t\tSystem.out.println(\"sorry\");\r\n\r\n\t\t\t}\r\n\t\t\t// display(temp);\r\n\t\t\twork(temp);\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\tint orgnum1=1634,orgnum;\r\n\t\tfloat res=0,rem=0;\r\n\t\torgnum=orgnum1;\r\n\t\r\n\t\twhile(orgnum!=0)\r\n\t\t{\r\n\t\trem=(orgnum%10);\t\r\n\t\tres+=(rem*rem*rem);\r\n\t\torgnum/=10;\r\n\t\t}\r\n\t\tSystem.out.println(\"res\"+ res + \" \"+ orgnum+\" n value\"+orgnum1);\r\n if(orgnum1==res)\r\n \tSystem.out.println(\"arms strong\");\r\n else\r\n \t System.out.println(\"not arms strong\");\r\n \t \r\n\t}",
"@Test\n public void shouldSolveProblem2() {\n assertThat(sumOfEvenFibonacciValuesNotExceeding(90)).isEqualTo(2 + 8 + 34);\n assertThat(sumOfEvenFibonacciValuesNotExceeding(4_000_000)).isEqualTo(4_613_732);\n }",
"@Test\n public void testCheckTriType() {\n System.out.println(\"checkTriType\");\n double[] a = {1 , 5 , 4 , 100};\n double[] b = {1 , 5 , 3 , 5 };\n double[] c = {1 , 8 , 2 , 6 };\n SVV01 instance = new SVV01();\n String[] expResult = {\"Equilateral Triangle\",\"Isosceles Triangle\",\"Scalene\",\"Invalid\"};\n \n for ( int i = 0 ; i < 4 ; i++ ){\n String result = instance.checkTriType(a[i], b[i], c[i]);\n assertEquals(expResult[i], result);\n }\n }",
"@Test\n\tpublic void testExponentialSearch() {\n\t}"
] |
[
"0.6080465",
"0.587108",
"0.58327943",
"0.57671106",
"0.5751493",
"0.574261",
"0.56744576",
"0.564408",
"0.5630122",
"0.5628605",
"0.56180316",
"0.5608336",
"0.56032133",
"0.5592197",
"0.5568777",
"0.55612934",
"0.5560857",
"0.55532104",
"0.5544653",
"0.5524433",
"0.55243534",
"0.552422",
"0.55090743",
"0.54981464",
"0.5488334",
"0.54717445",
"0.5458345",
"0.5458134",
"0.5453762",
"0.54520744",
"0.5451366",
"0.5444612",
"0.5442754",
"0.5436835",
"0.54337734",
"0.54287875",
"0.5427222",
"0.5421994",
"0.54113394",
"0.5409819",
"0.5405159",
"0.54025245",
"0.5401411",
"0.53993744",
"0.5384651",
"0.5380668",
"0.5379506",
"0.5379303",
"0.5379105",
"0.53759086",
"0.5371903",
"0.5370596",
"0.5369911",
"0.53694266",
"0.5367771",
"0.5367411",
"0.5364374",
"0.53587806",
"0.53579897",
"0.53550446",
"0.5347873",
"0.5347463",
"0.53447276",
"0.5344161",
"0.53422177",
"0.5341608",
"0.533928",
"0.53358996",
"0.53333306",
"0.5330114",
"0.53290296",
"0.5328614",
"0.5325785",
"0.53247255",
"0.5323278",
"0.5322929",
"0.532006",
"0.53186715",
"0.53166014",
"0.53159887",
"0.5312003",
"0.5311914",
"0.53118294",
"0.5310627",
"0.53102744",
"0.53027177",
"0.5301335",
"0.52984256",
"0.5297168",
"0.5295724",
"0.5294613",
"0.5293464",
"0.529122",
"0.5289443",
"0.5286171",
"0.5283013",
"0.52820307",
"0.5281338",
"0.5280427",
"0.52774054",
"0.52762324"
] |
0.0
|
-1
|
Implement your solution below.
|
public static Character nonRepeating(String s) {
Map<Character, Integer> charCount = new HashMap<>();
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
if (charCount.containsKey(c)) {
charCount.put(c, charCount.get(c) + 1);
} else {
charCount.put(c, 1);
}
}
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
if (charCount.get(c) == 1) {
return c;
}
}
return null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void solution() {\n\t\t\n\t}",
"@Override\r\n\tpublic void solve() {\n\t\t\r\n\t}",
"private void generateSolution() {\n\t\t// TODO\n\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n public void computeSatisfaction() {\n\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}",
"@Override\n\tpublic void challenge7() {\n\n\t}",
"public void smell() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void challenge9() {\n\n\t}",
"@Override\n\tpublic void challenge17() {\n\n\t}",
"public interface IKataSolution\n extends IKataCommonSolution {\n\n public enum ACTION {\n TURN_LEFT, TURN_RIGHT, FORWARD, STAY\n }\n\n public enum ORIENTATION {\n UP (270), DOWN(90), LEFT(0), RIGHT(180);\n public int angle;\n ORIENTATION (int _angle) {\n angle = _angle;\n }\n public ORIENTATION moveLeft () {\n switch (this) {\n case UP: return LEFT;\n case DOWN: return RIGHT;\n case LEFT: return DOWN;\n case RIGHT: return UP;\n }\n return this;\n }\n public ORIENTATION moveRight () {\n switch (this) {\n case UP: return RIGHT;\n case DOWN: return LEFT;\n case LEFT: return UP;\n case RIGHT: return DOWN;\n }\n return this;\n }\n }\n\n public enum ITEM {\n EMPTY, PLANT, ANIMAL, END\n }\n\n public abstract class Animal {\n /**\n * Number of plants the animal ate\n */\n public int points;\n /**\n * Method to react to changing environmental conditions\n *\n * @param orientation animal's current orientation\n * @param view item currently in front of animal\n * @return action to do\n */\n public abstract ACTION react (ORIENTATION orientation, ITEM view);\n }\n\n /**\n * Factory method for an animal\n *\n * @param count count of animals to create\n * @param lastGeneration array of 'Animal' from last generation\n * @return array of 'Animal' instances\n */\n public abstract Animal[] createGeneration (int count, Animal[] lastGeneration);\n\n /**\n * If true, last generation will be visualized\n */\n public boolean visualizeLastGeneration ();\n\n /**\n * Defines how many generations of evolution should be tested\n * (minimum is 100, maximum is 10000)\n *\n * @return count of generations to test\n */\n public int countOfGenerations ();\n}",
"@Override\n\tpublic void challenge14() {\n\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void challenge6() {\n\n\t}",
"@Override\n\tpublic void challenge8() {\n\n\t}",
"private Solution() { }",
"private Solution() { }",
"@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\tpublic void apply() {\n\t\t\n\t}",
"@Override\n protected long getTestSolution() {\n return 100024;\n }",
"protected OpinionFinding() {/* intentionally empty block */}",
"public void verliesLeven() {\r\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 sacrifier() {\n\t\t\n\t}",
"@Override\n\tpublic void challenge11() {\n\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"private void kk12() {\n\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"private boolean solutionChecker() {\n\t\t// TODO\n\t\treturn false;\n\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"public void redibujarAlgoformers() {\n\t\t\n\t}",
"@Override\n public void handleSolution(String solution,long time) {\n \n }",
"public void findSolution() {\n\n\t\t// TODO\n\t}",
"@Override\r\n\tpublic void compute() {\n\t\t\r\n\t}",
"public void working()\n {\n \n \n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n public String solve() {\n int LIMIT = 50 * NumericHelper.ONE_MILLION_INT;\n int[] nCount = new int[LIMIT+1];\n for(long y = 1; y<= LIMIT; y++) {\n for(long d= (y+3)/4; d<y; d++) { // +3 is to make d atleast 1\n long xSq = (y+d) * (y+d);\n long ySq = y * y;\n long zSq = (y-d) * (y-d);\n\n long n = xSq - ySq - zSq;\n\n if(n<0) {\n continue;\n }\n\n if(n>=LIMIT) {\n break;\n }\n\n\n nCount[(int)n]++;\n\n }\n }\n\n int ans = 0;\n for(int i = 1; i<LIMIT; i++) {\n if(nCount[i] == 1) {\n //System.out.print(i +\",\");\n ans++;\n }\n }\n\n return Integer.toString(ans);\n }",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"public void logic(){\r\n\r\n\t}",
"public void mo4359a() {\n }",
"public final void mo51373a() {\n }",
"public void mo38117a() {\n }",
"private DiscretePotentialOperations() {\r\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"abstract int pregnancy();",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void challenge10() {\n\n\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"public void perder() {\n // TODO implement here\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"protected void mo6255a() {\n }",
"@Override\n public void apply() {\n }",
"public static String solution() {\r\n\t\treturn \"73162890\";\r\n\t}",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"@Override\n\tpublic void exams() {\n\t\t\n\t}",
"protected Problem() {/* intentionally empty block */}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\r\n\tprotected void processCost() {\n\r\n\t}",
"@Override\n public List<Vertex> solution(){\n return solution;\n }",
"@Override\n\t\tpublic void reduce() {\n\t\t\t\n\t\t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"public void mo21792Q() {\n }",
"private stendhal() {\n\t}",
"@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void satisfy() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"public void mo6081a() {\n }",
"public static void main(String args[]) throws Exception\n {\n \n \n \n }",
"public abstract void mo70713b();",
"public void mo21785J() {\n }",
"@Override\n\tpublic void challenge15() {\n\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"protected abstract String answer();",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"private void level7() {\n }",
"private Solution() {\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n public void run() {\n basicEditor.createEdge(); // replaced Bibianas method with Moritz Roidl, Orthodoxos Kipouridis\r\n }",
"public void affichageSolution() {\n\t\t//On commence par retirer toutes les traces pré-existantes du labyrinthe\n\t\tfor (int i = 0 ; i < this.laby.getHauteur() ; i++) {\n\t\t\tfor (int j = 0 ; j < this.laby.getLargeur() ; j++) {\n\t\t\t\tif (this.laby.getLabyrinthe()[i][j] instanceof Trace) {\n\t\t\t\t\tthis.laby.getLabyrinthe()[i][j] = new Case();\n\t\t\t\t\t((JLabel)grille.getComponents()[i*this.laby.getLargeur()+j]).setIcon(this.laby.getLabyrinthe()[i][j].imageCase(themeJeu));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//On parcourt toutes les cases du labyrinthe. Si on trouve un filon non extrait dont le chemin qui le sépare au mineur est plus petit que shortestPath, on enregistre la longueur du chemin ainsi que les coordonnees de ledit filon\n\t\tint shortestPath = Integer.MAX_VALUE;\n\t\tint[] coordsNearestFilon = {-1,-1};\n\t\tfor (int i=0 ; i < this.laby.getHauteur() ; i++) {\n\t\t\tfor (int j=0 ; j < this.laby.getLargeur() ; j++) {\n\t\t\t\tif (this.laby.getLabyrinthe()[i][j] instanceof Filon && ((Filon)this.laby.getLabyrinthe()[i][j]).getExtrait() == false) {\n\t\t\t\t\tif (this.laby.solve(j,i) != null) {\n\t\t\t\t\t\tint pathSize = this.laby.solve(j,i).size();\n\t\t\t\t\t\tif (pathSize < shortestPath) {\n\t\t\t\t\t\t\tshortestPath = pathSize;\n\t\t\t\t\t\t\tcoordsNearestFilon[0] = j;\n\t\t\t\t\t\t\tcoordsNearestFilon[1] = i;\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\n\t\t//Si il n'y a plus de filon non extrait atteignable, on cherche les coordonnes de la clef\n\t\tif (coordsNearestFilon[0] == -1) {\n\t\t\tcoordsNearestFilon = this.laby.getCoordsClef();\n\t\t\t//Si il n'y a plus de filon non extrait atteignable et que la clef a deja ouvert la porte, on cherche les coordonnes de la sortie\n\t\t\tif (coordsNearestFilon == null)\tcoordsNearestFilon = this.laby.getCoordsSortie();\n\t\t}\n\n\t\t//On cree une pile qui contient des couples de coordonnees qui correspondent a la solution, puis on depile car le dernier element est l'objectif vise\n\t\tStack<Integer[]> solution = this.laby.solve(coordsNearestFilon[0], coordsNearestFilon[1]);\n\t\tsolution.pop();\n\n\t\t//Tant que l'on n'arrive pas au premier element de la pile (cad la case ou se trouve le mineur), on depile tout en gardant l'element depile, qui contient les coordonnees d'une trace que l'on dessine en suivant dans la fenetre\n\t\twhile (solution.size() != 1) {\n\t\t\tInteger[] coordsTmp = solution.pop();\n\t\t\tTrace traceTmp = new Trace();\n\t\t\tthis.laby.getLabyrinthe()[coordsTmp[1]][coordsTmp[0]] = new Trace();\n\t\t\t((JLabel)grille.getComponents()[coordsTmp[1]*this.laby.getLargeur()+coordsTmp[0]]).setIcon(traceTmp.imageCase());\n\t\t}\n\t\tSystem.out.println(\"\\n========================================== SOLUTION =====================================\\n\");\n\t\tthis.affichageLabyrinthe();\n\t}",
"@Override\n\tpublic void trabajar() {\n\n\t}",
"void aprovarAnalise();"
] |
[
"0.6768142",
"0.6282288",
"0.62196845",
"0.61990964",
"0.60912627",
"0.6011783",
"0.5985179",
"0.5936904",
"0.58896285",
"0.5867924",
"0.5858776",
"0.58347464",
"0.58206606",
"0.5800501",
"0.57240075",
"0.572284",
"0.5718453",
"0.57143205",
"0.57134277",
"0.5706609",
"0.5701443",
"0.5691206",
"0.5690229",
"0.5690229",
"0.56851107",
"0.56712896",
"0.56657994",
"0.56570596",
"0.563935",
"0.5633295",
"0.56297535",
"0.56297535",
"0.5618899",
"0.5618802",
"0.56115043",
"0.5605027",
"0.5582368",
"0.55806875",
"0.556946",
"0.55651903",
"0.55623406",
"0.5549552",
"0.5531409",
"0.55132127",
"0.5505705",
"0.5498145",
"0.5484345",
"0.54757637",
"0.5459917",
"0.54562026",
"0.54390645",
"0.5433257",
"0.5433257",
"0.5432188",
"0.54279256",
"0.54191345",
"0.5412347",
"0.5405975",
"0.54056513",
"0.5402032",
"0.53913283",
"0.5389849",
"0.5387778",
"0.5385645",
"0.5380854",
"0.53786415",
"0.5368307",
"0.53655815",
"0.53562135",
"0.534921",
"0.53479904",
"0.5340686",
"0.5338076",
"0.53360325",
"0.5311179",
"0.5305497",
"0.5305118",
"0.5299112",
"0.52910376",
"0.5271524",
"0.5268195",
"0.52656287",
"0.52633244",
"0.5262686",
"0.5250074",
"0.52457297",
"0.5244458",
"0.52404064",
"0.5225214",
"0.52243286",
"0.5221839",
"0.5221505",
"0.52102405",
"0.5209338",
"0.5207932",
"0.52005017",
"0.52005017",
"0.5200149",
"0.5196509",
"0.5194244",
"0.51918733"
] |
0.0
|
-1
|
TODO: Warning this method won't work in the case the id fields are not set
|
@Override
public boolean equals(Object object) {
if (!(object instanceof Owner)) {
return false;
}
Owner other = (Owner) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void setId(Integer id) { this.id = id; }",
"private Integer getId() { return this.id; }",
"public void setId(int id){ this.id = id; }",
"public void setId(Long id) {this.id = id;}",
"public void setId(Long id) {this.id = id;}",
"public void setID(String idIn) {this.id = idIn;}",
"public void setId(int id) { this.id = id; }",
"public void setId(int id) { this.id = id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public void setId(long id) { this.id = id; }",
"public void setId(long id) { this.id = id; }",
"public int getId(){ return id; }",
"public int getId() {return id;}",
"public int getId() {return Id;}",
"public int getId(){return id;}",
"public void setId(long id) {\n id_ = id;\n }",
"private int getId() {\r\n\t\treturn id;\r\n\t}",
"public Integer getId(){return id;}",
"public int id() {return id;}",
"public long getId(){return this.id;}",
"public int getId(){\r\n return this.id;\r\n }",
"@Override public String getID() { return id;}",
"public Long id() { return this.id; }",
"public Integer getId() { return id; }",
"@Override\n\tpublic Integer getId() {\n return id;\n }",
"@Override\n public Long getId () {\n return id;\n }",
"@Override\n public long getId() {\n return id;\n }",
"public Long getId() {return id;}",
"public Long getId() {return id;}",
"public String getId(){return id;}",
"@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}",
"public Integer getId() { return this.id; }",
"@Override\r\n public int getId() {\n return id;\r\n }",
"@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}",
"public int getId() {\n return id;\n }",
"public long getId() { return _id; }",
"public int getId() {\n/* 35 */ return this.id;\n/* */ }",
"public long getId() { return id; }",
"public long getId() { return id; }",
"public void setId(Long id) \n {\n this.id = id;\n }",
"@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}",
"public void setId(String id) {\n this.id = id;\n }",
"@Override\n\tpublic void setId(Long id) {\n\t}",
"public Long getId() {\n return id;\n }",
"public long getId() { return this.id; }",
"public int getId()\n {\n return id;\n }",
"public void setId(int id){\r\n this.id = id;\r\n }",
"protected abstract String getId();",
"@Test\r\n\tpublic void testSetId() {\r\n\t\tbreaku1.setId(5);\r\n\t\texternu1.setId(6);\r\n\t\tmeetingu1.setId(7);\r\n\t\tteachu1.setId(8);\r\n\r\n\t\tassertEquals(5, breaku1.getId());\r\n\t\tassertEquals(6, externu1.getId());\r\n\t\tassertEquals(7, meetingu1.getId());\r\n\t\tassertEquals(8, teachu1.getId());\r\n\t}",
"@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}",
"public int getID() {return id;}",
"public int getID() {return id;}",
"public String getId() { return id; }",
"public String getId() { return id; }",
"public String getId() { return id; }",
"@Override\n public int getField(int id) {\n return 0;\n }",
"public int getId ()\r\n {\r\n return id;\r\n }",
"public int getId(){\r\n return localId;\r\n }",
"public void setId(Long id)\n/* */ {\n/* 66 */ this.id = id;\n/* */ }",
"void setId(int id) {\n this.id = id;\n }",
"@Override\n public Integer getId() {\n return id;\n }",
"@Override\n\tpublic Object selectById(Object id) {\n\t\treturn null;\n\t}",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"@Override\n public int getId() {\n return id;\n }",
"@Override\n public int getId() {\n return id;\n }",
"public void setId(int id)\n {\n this.id=id;\n }",
"@Override\r\n public int getID()\r\n {\r\n\treturn id;\r\n }",
"@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}",
"public int getId()\r\n {\r\n return id;\r\n }",
"public void setId(Long id){\n this.id = id;\n }",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"final protected int getId() {\n\t\treturn id;\n\t}",
"public abstract Long getId();",
"@Override\n public long getId() {\n return this.id;\n }",
"public void setId(Long id) \r\n {\r\n this.id = id;\r\n }",
"public String getId(){ return id.get(); }",
"public void setId(long id){\n this.id = id;\n }",
"public void setId(long id){\n this.id = id;\n }",
"@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }",
"public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }",
"public Long getId() \n {\n return id;\n }",
"@Override\n\tpublic void setId(int id) {\n\n\t}",
"public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }",
"@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}",
"public int getID(){\n return id;\n }",
"public String getID(){\n return Id;\n }",
"public int getId()\n {\n return id;\n }"
] |
[
"0.6893012",
"0.6836114",
"0.67019653",
"0.66372806",
"0.66372806",
"0.65897155",
"0.65749645",
"0.65749645",
"0.65715593",
"0.65715593",
"0.65715593",
"0.65715593",
"0.65715593",
"0.65715593",
"0.6557948",
"0.6557948",
"0.65415126",
"0.65214056",
"0.65128523",
"0.6484641",
"0.6473491",
"0.64238894",
"0.64159226",
"0.641386",
"0.63989466",
"0.6364057",
"0.6352782",
"0.6347942",
"0.63445175",
"0.6321274",
"0.6315944",
"0.6298331",
"0.6289866",
"0.6289866",
"0.6280222",
"0.6268834",
"0.6263404",
"0.6262361",
"0.6260325",
"0.62562025",
"0.62525773",
"0.6248666",
"0.6244097",
"0.6244097",
"0.6240389",
"0.6236627",
"0.6236627",
"0.6228308",
"0.6219926",
"0.62170756",
"0.6216491",
"0.62086207",
"0.62054634",
"0.61998713",
"0.6199115",
"0.61896425",
"0.61864936",
"0.61864936",
"0.6186184",
"0.6186184",
"0.6186184",
"0.6182088",
"0.6181062",
"0.61723566",
"0.61716026",
"0.6163693",
"0.61627716",
"0.61588794",
"0.6154449",
"0.6154449",
"0.6154449",
"0.6154449",
"0.6154449",
"0.6154449",
"0.6154449",
"0.61526424",
"0.61526424",
"0.6138601",
"0.6131248",
"0.6126135",
"0.6124427",
"0.61013985",
"0.61011",
"0.61011",
"0.61005044",
"0.61000377",
"0.60997367",
"0.6096409",
"0.6096036",
"0.6092533",
"0.60888046",
"0.60888046",
"0.60884815",
"0.60877126",
"0.60860056",
"0.60728115",
"0.60694075",
"0.6069278",
"0.6067362",
"0.6066771",
"0.60666025"
] |
0.0
|
-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
|
113 use dfs recursive
|
public List<List<Integer>> pathSum(TreeNode root, int sum) {
if(root==null)
return res;
dfs(root, sum, new ArrayList<Integer>());
return res;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void dfs(){\n // start from the index 0\n for (int vertex=0; vertex<v; vertex++){\n // check visited or not\n if (visited[vertex]==false){\n Explore(vertex);\n }\n }\n }",
"@Override\n public void dfs() {\n\n }",
"public void dfs (String input)\r\n\t {\r\n\t\t \tNode root_dfs = new Node (input);\r\n\t\t \tNode current = new Node(root_dfs.getState());\r\n\t\t \t\r\n\t\t\tArrayList<String> visited = new ArrayList<String>();\r\n\t\t\tArrayList<String> children = new ArrayList<String>();\r\n\t\t\tStack<Node> stack_dfs = new Stack<Node>();\r\n\t\t\t\r\n\t\t\tint nodes_popped = 0;\r\n\t\t\tint stack_max_size = 0;\r\n\t\t\tint stack_size = 0;\r\n\t\t\tcurrent.cost = 0;\r\n\t\t\t\r\n\t\t\tgoal_dfs = isGoal(current.getState());\r\n\t\t\t\r\n\t\t\twhile(!goal_dfs)\r\n\t\t\t{\r\n\t\t\t\tvisited.add(current.getState());\r\n\t\t\t\tchildren = Successor.findChildren(current.getState());\r\n\t\t\t\t\r\n\t\t\t\tfor (String a : children)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (visited.contains(a))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tNode nino = new Node(a);\r\n\t\t\t\t\t\tcurrent.children_nodes.add(nino);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tint cost = isCost(current.getState(), nino.getState());\r\n\t\t\t\t\t\tnino.cost = cost;\r\n\t\t\t\t\t\tnino.parent = current;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Repeated state check\r\n\t\t\t\t\t\tif (!stack_dfs.contains(nino))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tstack_dfs.add(nino);\r\n\t\t\t\t\t\t\tstack_size++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Popping off the stack. LIFO architecture\r\n\t\t\t\tcurrent = stack_dfs.pop();\r\n\t\t\t\tnodes_popped++;\r\n\t\t\t\t\r\n\t\t\t\tif (stack_size > stack_max_size)\r\n\t\t\t\t{\r\n\t\t\t\t\tstack_max_size = stack_size;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tstack_size--;\r\n\t\t\t\tgoal_dfs = isGoal(current.getState());\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tgoal_dfs = false;\r\n\t\t\tSystem.out.println(\"DFS Solved!!\");\r\n\t\t\tSolution.performSolution(current, root_dfs, nodes_popped, stack_max_size);\r\n\t }",
"private static void iddfs(State curr, int depth) {\n for(int i = 0; i <= depth; i++) {\r\n\r\n if(curr.isGoalState()) \r\n System.out.println(i+\":\"+curr.getOrderedPair()+\" Goal\");//initial is goal state\r\n else\r\n System.out.println(i+\":\"+curr.getOrderedPair());//initial\r\n\r\n curr.close.add(curr);\r\n State currState = curr;\r\n while(!currState.isGoalState()) {\r\n if(currState.depth < i)\r\n curr.buildStack(currState.getSuccessors(currState));\r\n System.out.print(i+\":\");\r\n curr.printHelp(currState, 5);\r\n if(!curr.open.isEmpty()) {\r\n currState = curr.open.get(curr.open.size()-1);\r\n curr.close.add(curr.open.remove(curr.open.size()-1));\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n if(currState.isGoalState()) {\r\n System.out.println(i+\":\"+currState.getOrderedPair() + \" Goal\");\r\n curr.printPath(currState);\r\n return;\r\n }\r\n curr.open.clear(); curr.close.clear();\r\n }\r\n }",
"static void dfs(int node) {\n for (int adj : adjList[node]) {\n if (adj != firstParents[node]) {\n firstParents[adj] = node;\n depth[adj] = depth[node] + 1;\n maxDepth = Math.max(maxDepth, depth[adj]);\n dfs(adj);\n }\n }\n }",
"public void dfs()\n{\n Stack s=new Stack();\n s.push(this.rootNode);\n rootNode.visited=true;\n printNode(rootNode);\n while(!s.isEmpty())\n {\n Node n=(Node)s.peek();\n Node child=getUnvisitedChildNode(n);\n if(child!=null)\n {\n child.visited=true;\n printNode(child);\n s.push(child);\n }\n else\n {\n s.pop();\n }\n }\n //Clear visited property of nodes\n clearNodes();\n}",
"private boolean helperDFS(Node current){\n\n if(expandedNode.size() == 999){\n //limit has been reached. jump out of recursion.\n expandedNode.add(current);\n System.out.println(\"No solution found.\");\n printExpanded(expandedNode);\n System.exit(0);\n return false;\n }\n\n boolean b = cycleCheck(current,expandedNode);\n\n if(!b){\n expandedNode.add(current);\n }else{\n return false;\n }\n\n if(current.getDigit().getDigitString().equals(goalNode.getDigit().getDigitString())){\n //goal reached.\n //expandedNode.add(current);\n solutionPath(current);\n printExpanded(expandedNode);\n System.exit(0);\n }\n\n //Now make the children.\n\n if(!forbidden.contains(current.getDigit().getDigitString())){\n\n if(current.getDigit().last_changed != 0){\n\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n\n //+1 child first digit\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n }\n\n if(current.getDigit().last_changed != 1){\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n\n //+1 child\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n }\n\n if(current.getDigit().last_changed != 2){\n if ((Integer.parseInt(current.getDigit().getThird_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n //+1 child\n if ((Integer.parseInt(current.getDigit().getThird_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n }\n }\n return false;\n }",
"private void DFS() {\n\t\tfor(Node node: nodeList) {\r\n\t\t\tif(!node.isVisited())\r\n\t\t\t\tdfsVisit(node);\r\n\t\t}\r\n\t}",
"private static void dfsBribe(int n, List<Integer>[] ch, long[] w) {\n if (ch[n].size() == 0){\n In[n] = w[n];\n OutD[n] = Long.MAX_VALUE;\n OutU[n] = 0;\n }\n //recurrance case: non.leaf, do dfs for all subordinates then calculate In, OutUp & OutDown.\n else{\n for (int c:ch[n])\n dfsBribe(c, ch, w); //running once for each child thereby O(N)\n In[n] = w[n];\n for (int c:ch[n]){ //O(N) running time\n In[n] += OutU[c];\n OutU[n] += Math.min(In[c], OutD[c]);\n OutD[n] += Math.min(In[c], OutD[c]);\n }\n OutD[n] += delta(n, ch); //add delta for no in Children\n }\n\n }",
"@Test\n public void dfsRecursiveTest() {\n Map<String, List<String>> graph = new HashMap<>();\n graph.put(\"A\", Lists.newArrayList(\"B\", \"S\"));\n graph.put(\"B\", Lists.newArrayList(\"A\"));\n graph.put(\"C\", Lists.newArrayList(\"D\", \"E\", \"F\", \"S\"));\n graph.put(\"D\", Lists.newArrayList(\"C\"));\n graph.put(\"E\", Lists.newArrayList(\"C\", \"H\"));\n graph.put(\"F\", Lists.newArrayList(\"C\", \"G\"));\n graph.put(\"G\", Lists.newArrayList(\"F\", \"H\", \"S\"));\n graph.put(\"H\", Lists.newArrayList(\"E\", \"G\"));\n graph.put(\"S\", Lists.newArrayList(\"A\", \"C\", \"G\"));\n\n List<String> traversal = new DFSRecursive().runDFS(\"A\", graph);\n\n Assert.assertEquals(Lists.newArrayList(\"A\", \"B\", \"S\", \"C\", \"D\", \"E\", \"H\", \"G\", \"F\"), traversal);\n }",
"private int dfs(int[][] matrix, int i, int j, int d) {\n if (i < 0 || j < 0 || i == matrix.length || j == matrix[0].length || matrix[i][j] != 0)\n return 0;\n if (dp[i][j][d] > 0) return dp[i][j][d];\n timeComplexityCount++;\n maxI = Math.max(maxI, i);\n int res;\n if (d == 1)\n res = Math.max(dfs(matrix, i, j + 1, 1), dfs(matrix, i, j + 1, 2));\n else if (d == 0)\n res = Math.max(dfs(matrix, i, j - 1, 0), dfs(matrix, i, j - 1, 2));\n else\n res = Math.max(dfs(matrix, i + 1, j, 0), Math.max(dfs(matrix, i + 1, j, 1), dfs(matrix, i + 1, j, 2)));\n dp[i][j][d] = res + 1;\n return res + 1;\n }",
"private static int dfs( int n, int level, int min ) {\n\n if (n == 0 || level >= min) return level; //returns only number of perfect squares\n\n for (int i = (int) Math.sqrt(n); i > 0; i--) { //Math.sqrt = same as prime-sieve of prime numbers\n\n min = dfs(n - ((int) Math.pow(i, 2)), level + 1, min);\n\n }\n return min;\n }",
"private static void dfsRecursive(Node node) {\n\t\t//if the node state isn't undiscovered it has already been accounted for\n\t\tif(node == null || node.state != Node.State.UNDISCOVERED) {\n\t\t\treturn;\n\t\t}\n\t\tnode.state = Node.State.DISCOVERED;\n\n\t\t//process node\n\t\tSystem.out.print(node.name + \" -> \");\n\t\t\n\t\tfor(Edge e : node.edges) {\n\t\t\tdfsRecursive(e.getNeighbor(node));\n\t\t}\n\t\t\t\n\t\t//finished with this node\n\t\tnode.state = Node.State.COMPLETE;\n\t}",
"public void dfs (Node node) {\r\n\t\t\r\n\t\tSystem.out.print(node.data+\" \");\r\n\t\tList<Node> adding = node.getPartners();\r\n\t\tnode.visited = true;\r\n\t\t\tfor(int loop=0; loop<adding.size(); loop++) {\r\n\t\t\t\tNode n = adding.get(loop);\r\n\t\t\t\t\tif (n!=null && !n.visited) {\r\n\t\t\t\t\t\tdfs(n);\r\n\t\t\t\t\t} // if loop ends here\r\n\t\t\t\t\t\r\n\t\t\t} // for loop ends here\r\n\t\t\r\n\t}",
"public static void dfs(Node n,String ch){\n Stack<Node> st=new Stack(); // stack for storing path\n int freq=n.freq; // recording root freq to avoid it adding in path encoding\n find_path_and_encode(st,n,ch,freq);\n }",
"void DFS() {\n \t\n \t// Mark all the vertices as not visited(set as false by default in java) \n \tboolean visited[] = new boolean[V];\n \t\n \t// Call the recursive helper function to print DFS traversal \n // starting from all vertices one by one \n \tfor (int i=0; i<V; i++) { \n \t\t if (visited[i] == false)\n \t\t\t DFSUtil(i, visited);\n \t}\n }",
"public DFS()\n {\n\n\n writeLock = lock.writeLock();\n readLock = lock.readLock();\n\n recoverINodes();\n\n createDir(\"/\"); // add a root if it does not exist .\n\n }",
"public void dfs() {\n int currentVertexIndex = 0;\r\n dfsStack.push(0);\r\n vertexList[0].wasVisited = true;\r\n System.out.println(vertexList[dfsStack.peek()]);\r\n while (dfsStack.top != -1) {\r\n\r\n\r\n currentVertexIndex = this.getAdjUnvisitedVert(dfsStack.peek());\r\n if (currentVertexIndex != -1) {\r\n dfsStack.push(currentVertexIndex);\r\n vertexList[currentVertexIndex].wasVisited = true;\r\n System.out.println(vertexList[dfsStack.peek()]);\r\n\r\n\r\n } else {\r\n currentVertexIndex = dfsStack.pop();\r\n\r\n }\r\n }\r\n// reset wasVisted\r\n for (Vertex x : vertexList) {\r\n x.wasVisited = false;\r\n }\r\n }",
"private static void dfs(State curr) {\n curr.buildStack(curr.getSuccessors(curr));\r\n \r\n if(curr.isGoalState()) \r\n System.out.println(curr.getOrderedPair()+\" Goal\");//initial is goal state\r\n else\r\n System.out.println(curr.getOrderedPair());//initial\r\n \r\n curr.close.add(curr);\r\n while(!curr.open.isEmpty()&&!curr.isGoalState()) {\r\n curr.buildStack(curr.getSuccessors(curr));\r\n curr.printHelp(curr, 4);\r\n curr = curr.open.get(curr.open.size()-1);\r\n curr.close.add(curr.open.remove(curr.open.size()-1));\r\n }\r\n \r\n if(curr.isGoalState()) {\r\n System.out.println(curr.getOrderedPair() + \" Goal\");\r\n curr.printPath(curr);\r\n }\r\n }",
"public void DFS() {\r\n\t\tSet<Vertex> visited = new HashSet<Vertex>();\r\n\r\n\t\t// Create a stack for DFS\r\n\t\tStack<Vertex> stack = new Stack<Vertex>();\r\n\r\n\t\tDFS(this.vertices[3], visited, stack); // DFS starting with 40\r\n\r\n\t\t// Call the helper function to print DFS traversal\r\n\t\t// starting from all vertices one by one\r\n\t\tfor (int i = 0; i < N; ++i)\r\n\t\t\tif (!visited.contains(this.vertices[i]))\r\n\t\t\t\tDFS(this.vertices[i], visited, stack);\r\n\t}",
"private void dfs(Node s, HashSet<Integer> visited) {\n\t\tif(visited.contains(s.id)) {\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(s.id);\n\t\tvisited.add(s.id);\n\t\tfor(Node n :s.adj) {\n\t\t\tdfs(n,visited);\n\t\t}\n\t}",
"public void dfs() {\n\t\tfor (Vertice v : vertices) {\n\t\t\tv.setVisited(false);\n\t\t}\n\t\tfor (Vertice v : vertices) {\n\t\t\tif (!v.getVisited()) {\n\t\t\t\tVisitar(v, -1);\n\t\t\t}\n\t\t}\n\t}",
"public void DFS() {\r\n for (int i = 0; i < vertexNum; i++) {\r\n DFS(i);\r\n }\r\n }",
"public AbstractGraph<V>.Tree dfs(int v);",
"public AbstractGraph<V>.Tree dfs(int v);",
"private void dfs(String s, int leftCount, int rightCount, int openCount, int index, StringBuilder sb, Set<String> res) {\n if (index == s.length()) {\n if (leftCount == 0 && rightCount == 0 && openCount == 0) res.add(sb.toString());\n return;\n }\n if (leftCount < 0 || rightCount < 0 || openCount < 0) return;\n int len = sb.length();\n if (s.charAt(index) == '(') {\n dfs(s, leftCount - 1, rightCount, openCount, index + 1, sb, res);\n dfs(s, leftCount, rightCount, openCount + 1, index + 1, sb.append('('), res);\n } else if (s.charAt(index) == ')') {\n dfs(s, leftCount, rightCount - 1, openCount, index + 1, sb, res);\n dfs(s, leftCount, rightCount, openCount - 1, index + 1, sb.append(')'), res);\n } else {\n dfs(s, leftCount, rightCount, openCount, index + 1, sb.append(s.charAt(index)), res);\n }\n sb.setLength(len);\n }",
"private boolean dfs(int n, int[] P) { // 0 is empty, 1 is false, 2 is true\n if (P[n] != 0) {\n if (P[n] == 1) {\n return false;\n }\n else {\n return true;\n }\n }\n\n if (n == 1) {\n P[1] = 2;\n //return true;\n }\n else if (n == 2) {\n P[2] = 2;\n //return true;\n }\n else if (n == 3) {\n P[3] = 1;\n //return false;\n }\n else {\n boolean res = dfs(n-2, P) && dfs(n-3, P) || dfs(n-3, P) && dfs(n-4, P);\n P[n] = res ? 2 : 1;\n }\n\n return P[n] == 2;\n\n //P[n] = P[n-2] + P[n-3] == 4 || P[n-3] + P[n-4] == 4 ? 2 : 1;\n //boolean res = dfs(n-2, P) && dfs(n-3, P) || dfs(n-3, P) && dfs(n-4, P);\n //P[n] = res ? 2 : 1;\n //return res;\n }",
"static boolean dfs(TreeNode root) {\n Stack<TreeNode> stack = new Stack<TreeNode>();\n stack.push(root);\n while (!stack.isEmpty()) {\n TreeNode node = (TreeNode) stack.pop();\n if (node == null)\n continue;\n\n System.out.println(\"Checking node \" + node.data);\n if (isGoal(node)) {\n System.out.println(\"\\nFound goal node \" + node.data);\n return true;\n }\n stack.addAll(node.getChildren());\n // dump(stack);\n }\n return false;\n }",
"private static void dfs(int idx, boolean[] visited, boolean[] isbreak) {\n\t\tif(idx==N) {\n\t\t\t//System.out.println(\"����������\");\n\t\t\tint cnt=0;\n\t\t\tfor(int i=0; i<N; i++) {\n\t\t\t\tif(isbreak[i]) cnt++; \n\t\t\t}\n\t\t\tans=Math.max(ans, cnt);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(isbreak[idx]) {\n\t\t\tdfs(idx+1, visited, isbreak); return;\n\t\t}\n\t\t\n\t\tboolean flag = false;\n\t\tfor(int i=0; i<N; i++) {\n\t\t\t//System.out.println(\"i:\"+i);\n\t\t\tif(i==idx) continue;\n\t\t\t\n\t\t\tif(!isbreak[i]) {\n\t\t\t\tflag=true;\n\t\t\t\t/*System.out.println(i+\"�� ģ��\");\n\t\t\t\tSystem.out.println(\"ġ����\");\n\t\t\t\tSystem.out.println(list.get(idx).inner+\" \"+list.get(idx).weight);\n\t\t\t\tSystem.out.println(list.get(i).inner+\" \"+list.get(i).weight);*/\n\t\t\t\tlist.get(idx).inner-=list.get(i).weight;\n\t\t\t\tlist.get(i).inner-=list.get(idx).weight;\n\t\t\t\t/*System.out.println(\"ġ����\");\n\t\t\t\tSystem.out.println(list.get(idx).inner+\" \"+list.get(idx).weight);\n\t\t\t\tSystem.out.println(list.get(i).inner+\" \"+list.get(i).weight);*/\n\t\t\t\tif(list.get(i).inner <= 0) isbreak[i]=true;\n\t\t\t\tif(list.get(idx).inner <= 0) isbreak[idx]=true;\n\t\t\t\t\n\n\t\t\t\tdfs(idx+1,visited,isbreak);\n\t\t\t\t\n\t\t\t\tlist.get(idx).inner+=list.get(i).weight;\n\t\t\t\tlist.get(i).inner+=list.get(idx).weight;\n\t\t\t\tif(list.get(i).inner > 0) isbreak[i]=false;\n\t\t\t\tif(list.get(idx).inner > 0) isbreak[idx]=false;\n\t\t\t}\n\t\t}\n\t\tif(!flag) {\n\t\t\tint cnt=0;\n\t\t\tfor(int i=0; i<N; i++) {\n\t\t\t\tif(isbreak[i]) cnt++; \n\t\t\t}\n\t\t\tans=Math.max(ans, cnt);\n\t\t\treturn;\n\t\t}\n\t\t\n\t}",
"public MyArrayList<MyArrayList<Node>> DFSRecursive() {\n t = 0;\n for (int i = 0; i < nodes.size(); i++) {\n Node node = nodes.get(i);\n // reset all nodes in the graph to the initial DFS state\n node.setColor(Color.WHITE);\n node.setD(0);\n node.setParent(null);\n }\n MyArrayList<MyArrayList<Node>> components = new MyArrayList<>();\n for (int i = 0; i < nodes.size(); i++) {\n Node node = nodes.get(i);\n if (node.getColor() == Color.WHITE) {\n MyArrayList<Node> component = new MyArrayList<>();\n this.dfsVisitRecursive(node, component);\n components.add(component);\n }\n }\n return components;\n }",
"public void solve() throws IOException {\n int n = ni(); \n int ax = ni(), ay = ni(), bx = ni(), by = ni(), cx = ni(), cy = ni(); \n boolean[][] visited = new boolean[n + 1][n + 1];\n if (dfs(n,ax,ay,bx,by,cx,cy,visited))\n System.out.println(\"YES\");\n else\n System.out.println(\"NO\");\n }",
"private void DepthFirstSearch(Node current){\n helperDFS( current );\n }",
"int dfs(String wheel, Set<String> deadendSet, Set<String> visited, String target, int depth) {\n\t\t// System.out.printf(\"dfs visit: %2s (depth: %d)\\n\", wheel, depth);\n\t\t++numDFSCalls;\n\t\t// scanner.nextLine();\n\n\t\tif (deadendSet.contains(wheel)) return Integer.MAX_VALUE;\n\t\tif (wheel.equals(target)) return 0;\n\n\t\tvisited.add(wheel);\n\t\tint d = Integer.MAX_VALUE;\n\t\tfor (String next : nextState(wheel)) {\n\t\t\tif (!visited.contains(next)) {\n\t\t\t\tint d1 = dfs(next, deadendSet, visited, target, depth+1);\n\t\t\t\td = Math.min(d, d1);\n\t\t\t}\n\t\t}\n\t\tvisited.remove(wheel);\n\n\t\treturn d < Integer.MAX_VALUE ? ++d : d;\n\t}",
"private static void dfsComponents() {\r\n\t\tprintThis(\"Standard DFS Demo (the input graph must be UNDIRECTED)\");\r\n\t\tfor (int i = 0; i < V; i++) { // for each vertex i in [0..V-1]\r\n\t\t\tif (dfs_num[i] == DFS_WHITE) { // if that vertex is not visited yet\r\n\t\t\t\tSystem.out.printf(\"Component %d:\", ++numComp);\r\n\t\t\t\tdfs(i);\r\n\t\t\t\tSystem.out.printf(\"\\n\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.printf(\"There are %d connected components\\n\", numComp);\r\n\t}",
"private void recursiveDfs(Node position, StringBuilder sb) {\r\n\t\tsb.append(position.getValue());\r\n\t\tif (position.getLeftChild() != null) {\r\n\t\t\tsb.append(\"-L-\");\r\n\t\t\trecursiveDfs(position.getLeftChild(), sb);\r\n\t\t}\r\n\t\tif (position.getMiddleChild() != null) {\r\n\t\t\tsb.append(\"-M-\");\r\n\t\t\trecursiveDfs(position.getMiddleChild(), sb);\r\n\t\t}\r\n\t\tif (position.getRightChild() != null) {\r\n\t\t\tsb.append(\"-R-\");\r\n\t\t\trecursiveDfs(position.getRightChild(), sb);\r\n\t\t}\r\n\t}",
"private static void dfs(int x, int y) {\n arr[x][y] = 1;\n area++;\n \n for(int i=0; i<4; i++) {\n int nx = x + dx[i];\n int ny = y + dy[i];\n \n if(0 <= nx && nx < m && 0 <= ny && ny < n) {\n if(arr[nx][ny] == 0)\n dfs(nx, ny);\n }\n }\n\t\t\n\t}",
"private int dfs(TreeNode node, TreeNode target, int K, List<Integer> res) {\r\n if (node == null) return -1;\r\n\r\n if (node.val == target.val) {\r\n // add nodes from current subtree\r\n addNodes(node, K, res);\r\n return 0;\r\n }\r\n\r\n int left = dfs(node.left, target, K, res);\r\n int right = dfs(node.right, target, K, res);\r\n \r\n // at most one of left and right could be not -1\r\n if (right != -1) {\r\n // current node is k far from target\r\n if (K == right + 1) res.add(node.val);\r\n // target is in the right subtree, add nodes in left subtree\r\n else addNodes(node.left, K - right - 2, res);\r\n return right + 1;\r\n }\r\n\r\n if (left != -1) {\r\n // current node is k far from target\r\n if (K == left + 1) res.add(node.val);\r\n // target is in the left subtree, add nodes in right subtree\r\n else addNodes(node.right, K - left - 2, res);\r\n return left + 1;\r\n }\r\n\r\n // both left and right are - 1\r\n return -1;\r\n }",
"public List<Long> depthTraverse(){\n return depthTraverseGen(null);\n }",
"private void dfsVisitRecursive(Node node, MyArrayList<Node> component) {\n t++;\n node.setD(t);\n node.setColor(Color.GRAY);\n component.add(node);\n for (int i = 0; i < node.getAdjacencyList().size(); i++) {\n Node u = node.getAdjacencyList().get(i);\n if (u.getColor() == Color.WHITE) {\n u.setParent(node);\n this.dfsVisitRecursive(u, component);\n }\n }\n node.setColor(Color.BLACK);\n t++;\n node.setF(t);\n }",
"public MyArrayList<MyArrayList<Node>> DFS() {\n t = 0;\n for (int i = 0; i < nodes.size(); i++) {\n Node node = nodes.get(i);\n // reset all nodes in the graph to the initial DFS state\n node.setColor(Color.WHITE);\n node.setD(0);\n node.setF(0);\n node.setParent(null);\n }\n MyArrayList<MyArrayList<Node>> components = new MyArrayList<>();\n for (int i = 0; i < nodes.size(); i++) {\n Node node = nodes.get(i);\n if (node.getColor() == Color.WHITE) {\n // each time we start from a vertex here we are starting a new DFS component\n MyArrayList<Node> component = new MyArrayList<>();\n dfsVisit(node, component);\n components.add(component);\n }\n }\n return components;\n }",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint V = sc.nextInt();\n\t\tint E = sc.nextInt();\n\n\t\tList<Integer>[]adjList = new ArrayList[10010];\n\t\tList<Integer>[]reverseAdjList = new ArrayList[10010];\n\n\t\tList<List<Integer>>scc = new ArrayList<List<Integer>>();\n\t\tint visited[] = new int[10010];\n\n\t\tfor(int i = 1 ; i <= V ; i++){\n\t\t\tadjList[i] = new ArrayList<Integer>();\n\t\t\treverseAdjList[i] = new ArrayList<Integer>();\n\t\t}\n\n\t\tfor(int i = 1 ; i <= E ; i++){\n\n\t\t\tint start = sc.nextInt();\n\t\t\tint end = sc.nextInt();\n\t\t\tadjList[start].add(end);\n\t\t\treverseAdjList[end].add(start);\n\t\t}\n\n\n\t\t//선작업 DFS 스택에 담음.\n\t\tStack <Integer>stack = new Stack<Integer>();\n\t\tfor(int i = 1 ; i <= V ; i++){\n\t\t\tif(visited[i] == 0){\n\t\t\t\tdfs(i,visited,stack,adjList);\n\t\t\t}\n\t\t}\n\n\n\t\t//후작업 역 DFS\n\t\tvisited = new int[10010];\n\n\t\tint r = 0;\n\t\twhile(!stack.isEmpty()){\n\n\t\t\tint here = stack.peek();\n\t\t\tstack.pop();\n\t\t\tif(visited[here] == 1){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tscc.add(new ArrayList<Integer>());\n\t\t\t++r;\n\t\t\treverseDFS(here, r-1, visited, scc, reverseAdjList);\n\n\t\t}\n\n\t\tSystem.out.println(r);\n\t\tfor(int i = 0 ; i < r ; i++){\n\t\t\tList <Integer>temp = scc.get(i);\n\t\t\tCollections.sort(temp);\n\t\t}\n\n\t\tscc.sort(new Comparator<List<Integer>>() {\n\t\t\t@Override\n\t\t\tpublic int compare(List<Integer> o1, List<Integer> o2) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif(o1.get(0)< o2.get(0)){\n\t\t\t\t\treturn -1;\n\t\t\t\t}else if(o1.get(0) > o2.get(0)){\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\n\t\t\tfor(List <Integer>list : scc){\n\t\t\t\tfor(int i = 0 ; i < list.size() ; i++){\n\t\t\t\t\tSystem.out.print(list.get(i) + \" \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"-1\");\n\t\t\t}\n\n\t}",
"public static int dfs(TreeNode root, int sum){\n\t\tif(root.left == null && root.right == null){\r\n\t\t\treturn 10*sum + root.val;\r\n\t\t\t//result.add(sum);\r\n\t\t}\r\n\t\tif(root.left != null && root.right == null){\r\n\t\t\treturn dfs(root.left, 10*sum+root.val);\r\n\t\t}\r\n\t\tif(root.right != null && root.left == null){\r\n\t\t\treturn dfs(root.right, 10*sum+root.val);\r\n\t\t}\r\n\t\t//if(root.left != null && root.right != null){\r\n\t\t\treturn dfs(root.left, 10*sum+root.val)+dfs(root.right, 10*sum+root.val);\r\n\t\t//}\r\n\t\t//for(int i = 0; i < result.size(); i++){\r\n\t\t\t//System.out.print( result.get(i) + \"->\");\r\n\t\t//}\r\n\t}",
"public static void dfs(TreeNode root) {\n Stack<TreeNode> stack = new Stack<TreeNode>();\n stack.push(root);\n root.visited = true;\n System.out.println(root.val);\n while (!stack.isEmpty()){\n TreeNode node = stack.peek();\n TreeNode child=getUnVisitedChiledNode(node);\n if (child!=null){\n child.visited=true;\n System.out.println(child.val);\n stack.push(child);\n }else {\n stack.pop();\n }\n }\n }",
"public void dfs(Vertex<T> start) {\n\t\t\t// DFS uses Stack data structure\n\t\t\tStack<Vertex<T>> stack = new Stack<Vertex<T>>();\n\t\t\tstart.visited = true;\n\t\t\tstack.push(start);\n\t\t\tprintNode(start);\n\t\t\twhile (!stack.isEmpty()) {\n\t\t\t\tVertex<T> n = stack.peek();\n\t\t\t\tVertex<T> child = getUnvisitedChildren(n);\n\t\t\t\tif (child != null) {\n\t\t\t\t\tchild.visited = true;\n\t\t\t\t\tstack.push(child);\n\t\t\t\t\tprintNode(child);\n\t\t\t\t} else {\n\t\t\t\t\tstack.pop();\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"private List<List<Integer>> dfs(int[][] graph, int start, Map<Integer, List<List<Integer>>> memo) {\n if (start == graph.length - 1) {\n return Collections.singletonList(Collections.singletonList(start));\n } else {\n List<List<Integer>> cur = new ArrayList<>();\n for (int dep : graph[start]) {\n List<List<Integer>> next = dfs(graph, dep, memo);\n for (List<Integer> path : next) {\n List<Integer> temp = new ArrayList<>();\n temp.add(start);\n temp.addAll(path);\n cur.add(temp);\n }\n }\n return memo.put(start, cur);\n }\n }",
"static void dfs(int u) { // DFS for normal usage: as graph traversal\r\n\t\t\t\t\t\t\t\t// algorithm\r\n\t\tSystem.out.printf(\" %d\", u); // this vertex is visited\r\n\t\tdfs_num[u] = DFS_BLACK; // important step: we mark this vertex as\r\n\t\t\t\t\t\t\t\t// visited\r\n\t\tfor (int j = 0; j < AdjList[u].size(); j++) {\r\n\t\t\tEdge v = AdjList[u].get(j); // v is a (neighbor,\r\n\t\t\t\t\t\t\t\t\t\t// weight) pair\r\n\t\t\tif (dfs_num[v.to] == DFS_WHITE) // important check to avoid\r\n\t\t\t\t\t\t\t\t\t\t\t// cycle\r\n\t\t\t\tdfs(v.to); // recursively visits unvisited neighbors v of\r\n\t\t\t\t\t\t\t// vertex u\r\n\t\t}\r\n\t}",
"public static void dfsRecursion(gNode[] G, boolean[] visited, int[] path, int s){\n\t\tvisited[s] =true;\n\t\tfor(gNode t = G[s]; t!=null; t=t.dest){\n\t\t\tif(!visited[t.item]){\n\t\t\t\tpath[t.item]=s;\n\t\t\t\tdfsRecursion(G, visited, path, t.item);\n\t\t\t}\n\t\t}\t\n\t}",
"static void DFS(int Node)\n {\n\n visit[Node] = true;\n for (int i = 1; i < ver+1; i++) {\n\n\n if (map[Node][i] == 1 && visit[i] == false) {\n DFS(i);\n }\n\n }\n\n\n }",
"int solve(int p, int current) {\n int id = getId(p, current);\n if (p >= 0 && memo.containsKey(id)) {\n return memo.get(id);\n }\n List<Integer> adjList = adj.get(current);\n int n = adjList.size();\n if (n == 0) {\n throw new RuntimeException();\n }\n if ((n == 2 && p >= 0) || (n == 1 && p < 0)) {\n // should cut the nodes under current\n int ans = getDepth(p, current) - 1;\n // System.out.println(\"ans(\" + p + \",\" + current + \")=\" + ans);\n memo.put(id, ans);\n return ans;\n }\n if (n == 1) {\n // System.out.println(\"ans(\" + p + \",\" + current + \")=nochild\");\n return 0;\n }\n int ans = Integer.MAX_VALUE;\n\n for (int i = 0; i < n; i++) {\n int a = adjList.get(i);\n if (a == p) {\n continue;\n }\n for (int j = i + 1; j < n; j++) {\n int b = adjList.get(j);\n if (b == p) {\n continue;\n }\n // try a & b combo\n int tmp = solve(current, a);\n tmp += solve(current, b);\n for (int k = 0; k < n; k++) {\n int c = adjList.get(k);\n if (c != a && c != b && c != p) {\n tmp += getDepth(current, c);\n }\n }\n ans = Math.min(ans, tmp);\n }\n }\n memo.put(id, ans);\n // System.out.println(\"ans(\" + p + \",\" + current + \")=\" + ans);\n return ans;\n }",
"public String DFS(int g) {\n\t\t//TODO\n\t}",
"public Stack<Integer> dfs(Maze tmp) {\n \n int tmpx = tmp.positionX();\n int tmpy = tmp.positionY();\n Stack<Integer> s = new Stack<Integer>();\n while (!tmp.gameOver()) {\n choosedirection(s, tmp);\n while (!s.isEmpty() && !tmp.gameOver()) {\n if (s.peek() == 0) {\n if (tmp.right()) {\n s.push(1);\n } else if (tmp.up()) {\n s.push(0);\n } else if (tmp.left()) {\n s.push(3);\n } else {\n this.stackpop(s, tmp);\n }\n } else if (s.peek() == 1) {\n if (tmp.down()) {\n s.push(2);\n } else if (tmp.right()) {\n s.push(1);\n } else if (tmp.up()) {\n s.push(0);\n } else {\n this.stackpop(s, tmp);\n }\n } else if (s.peek() == 2) {\n if (tmp.left()) {\n s.push(3);\n } else if (tmp.down()) {\n s.push(2);\n } else if (tmp.right()) {\n s.push(1);\n } else {\n this.stackpop(s, tmp);\n }\n } else if (s.peek() == 3) {\n if (tmp.up()) {\n s.push(0);\n } else if (tmp.left()) {\n s.push(3);\n } else if (tmp.down()) {\n s.push(2);\n } else {\n this.stackpop(s, tmp);\n }\n\n }\n\n }\n }\n\n Stack<Integer> stack = new Stack<Integer>();\n while (!s.isEmpty()) {\n stack.push(s.pop());\n }\n\n tmp.setLocation(tmpx, tmpy);\n return stack;\n\n }",
"public static void dfs(Node[] node, int index, int count, int[] visited){\n if(index == 30){\n min = Math.min(min, count);\n return;\n }\n if(min != Integer.MAX_VALUE && min < count){\n return;\n }\n\n // if visited then return\n if(visited[index] == 1){\n return;\n }\n visited[index] = 1;\n for(int i = 1; i <= 6; i++){\n int newIndex = index + i;\n if(newIndex > 30){\n break;\n }\n if(node[newIndex].next != -1){\n //if there is snake or ladder at next index\n dfs(node, node[newIndex].next, count + 1, visited);\n }else{\n // no snake or ladder just moved next\n dfs(node, newIndex, count + 1, visited);\n }\n }\n visited[index] = 0;\n }",
"public void dfs(int row, int col, int num) {\n\t\tvisited[row][col] = num; \n\t\tcnt ++;\n\t\t\n\t\t//go left\n\t\tif (isValid(row, col-1) && isFree(row, col, 1))\n\t\t\tdfs(row, col-1, num);\n\t\t\n\t\t//go up\n\t\tif (isValid(row-1, col) && isFree(row, col, 2))\n\t\t\tdfs(row-1, col, num);\n\t\t\n\t\t//go right\n\t\tif (isValid(row, col+1) && isFree(row, col, 4))\n\t\t\tdfs(row, col+1, num);\n\t\t\n\t\t//go down\n\t\tif (isValid(row+1, col) && isFree(row, col, 8))\n\t\t\tdfs(row+1, col, num);\n\t}",
"public static void main(String[] args) {\n\t\tint answer = 0;\r\n\t\t\t\t\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tint t = sc.nextInt();\r\n\t\t\r\n\t\t\r\n\t\twhile (t>0) {\r\n\t\t\tint n = sc.nextInt();\r\n\t\t\tint[] arr = new int[n+1];\r\n\t\t\tboolean[] visited = new boolean[n+1]; \r\n\t\t\tt--;\r\n\t\t\tfor(int i=1;i<=n;i++) {\r\n\t\t\t\tarr[i] = sc.nextInt();\r\n\t\t\t\tvisited[i] = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor(int i=1;i<=n;i++) {\r\n\t\t\t\tif (visited[i]==false) {\r\n\t\t\t\t\tdfs(arr,visited,i);\r\n\t\t\t\t\tanswer ++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(answer);\r\n\t\t\tanswer = 0;\r\n\t\t}\r\n\t\t\r\n\t}",
"public void dfsPrint(Node start){\n Stack<Node> stack = new Stack<>();\n Set<Node> visited = new HashSet<>(); //we can use integer for better space\n\n stack.push(start);\n while (!stack.isEmpty()){\n Node curr = stack.pop();\n if(!visited.contains(curr)){\n visited.add(curr);\n //do something\n }\n for(Node n: curr.adj){\n if(!visited.contains(n)){\n stack.push(n);\n }\n }\n }\n }",
"private boolean dfs(String word, int idx, TrieNode parent) {\n if (idx == word.length()) {//since it's parent node so idx cannot be len - 1\n return parent.isLeaf;\n }\n if (word.charAt(idx) == '.') {\n for (TrieNode curr : parent.map.values()) {\n boolean res = dfs(word, idx + 1, curr);\n if (res) return true;\n }\n } else {\n if (parent.map.containsKey(word.charAt(idx))) {\n return dfs(word, idx + 1, parent.map.get(word.charAt(idx)));\n }\n }\n return false;\n}",
"private void dfs(TrieNode node, List<String> prev, String current) {\n if (node.isLeaf) {\n prev.add(current);\n }\n\n for (int i = 0; i < 26; i++) {\n TrieNode child = node.children[i];\n if (child != null) {\n char c = (char) ('A' + i);\n dfs(child, prev, current + c);\n\n }\n\n\n }\n }",
"public void depthFirstSearch() {\n List<Vertex> visited = new ArrayList<Vertex>();\r\n // start the recursive depth first search on the current vertex\r\n this.dfs(visited);\r\n }",
"private int dfsInOrderIterativeSol(TreeNode root, int k) {\n // Corner Case\n if (root == null) {\n return 0;\n }\n\n Stack<TreeNode> stack = new Stack<>();\n TreeNode node = root;\n int countNum = 0;\n\n while (!stack.isEmpty() || node != null) {\n if (node != null) {\n stack.push(node); // just like the recursion\n node = node.left;\n } else {\n TreeNode curNode = stack.pop();\n countNum++;\n if (countNum == k) {\n return curNode.val;\n }\n node = curNode.right;\n }\n }\n return 0;\n\n // // push nodes till the left end\n // while (root != null) {\n // stack.push(root);\n // root = root.left;\n // }\n\n // while (k != 0) {\n // TreeNode curNode = stack.pop();\n // k -= 1;\n // if (k == 0) {\n // return curNode.val;\n // }\n\n // TreeNode rightNode = curNode.right;\n // // push the right node till the left end still!!!\n // while(rightNode != null) {\n // stack.push(rightNode);\n // rightNode = rightNode.left;\n // }\n // }\n\n // return 0; // never hit if k is valid and root is not null\n }",
"void calculating(int depth);",
"void DFS(Node root) {\n\t\tStack<Node> s = new Stack<Node>();\n\t\ts.add(root);\n\n\t\twhile(!s.isEmpty()) {\n\t\t\tNode n = s.pop();\n\t\t\tif (n != null) {\n\t\t\t\tSystem.out.print(n.data + \",\");\n\t\t\t\ts.push(n.right);\n\t\t\t\ts.push(n.left);\n\t\t\t}\n\t\t}\n\t}",
"public void dfs(int v) {\n marked[v] = true;\n onStack[v] = true;\n for (DirectedEdge e : G.incident(v)) {\n int w = e.to();\n if (hasCycle())\n return;\n else if (!marked[w]) {\n parent[w] = v;\n dfs(w);\n } else if (onStack[w]) {\n cycle = new Stack<>();\n cycle.push(w);\n for (int u = v; u != w; u = parent[u])\n cycle.push(u);\n cycle.push(w);\n return;\n }\n }\n onStack[v] = false;\n reversePost.push(v);\n }",
"public static void depthFirstSearchRecursive(ArrayList<Node> graph) {\n\t\tSystem.out.println(\"DFS Recursive:\");\n\t\tif(graph.size() == 0) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tGraphUtils.cleanGraph(graph);\n\t\t\n\t\tfor(Node node : graph) {\n\t\t\tdfsRecursive(node);\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\tGraphUtils.cleanGraph(graph);\n\t}",
"static void dfs(Node current, Set<Node> visited) {\n System.out.print(\"Node \" + current.val + \", \");\n\n // adds the current node to the set of already visited nodes\n visited.add(current);\n\n // loops over the neighbours of the current node\n for (Node neighbour: current.neighbours) {\n\n // if the neighbour has not been already visited\n if (! visited.contains(neighbour)) {\n\n // recursively processes the neighbour\n dfs(neighbour, visited);\n }\n }\n }",
"private void GreedySearch(){\n\n Queue<Node> expanded = new LinkedList<>();\n ArrayList<Node> fringe = new ArrayList<>();\n ArrayList<Node> fringeTemp = new ArrayList<>();\n\n\n Node current = startNode;\n\n while(expanded.size() < 1000){\n\n if(current.getDigit().getDigitString().equals(goalNode.getDigit().getDigitString())){\n //goal is reached.\n solutionPath(current);\n expanded.add(current);\n printExpanded(expanded);\n System.exit(0);\n }\n\n\n boolean b = cycleCheck(current,expanded);\n\n if(!b) {\n expanded.add(current);\n }\n\n if(!b){\n\n if(current.getDigit().last_changed != 0){\n\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n\n //+1 child first digit\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n\n }\n }\n\n if(current.getDigit().last_changed != 1){\n\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n\n //+1 child\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n }\n\n if(current.getDigit().last_changed != 2){\n if ((Integer.parseInt(current.getDigit().getThird_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n //+1 child\n if ((Integer.parseInt(current.getDigit().getThird_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n }\n\n }\n\n\n\n for(Node n : fringe){\n heuristicSetter(n);\n\n }\n\n fringeTemp.addAll(fringe);\n //now all the nodes in fringe have the heuristic value.\n //We can get the last added minm\n Node minm;\n if(fringeTemp.size() != 0){\n minm = fringeTemp.get(0);\n }else{\n break;\n }\n for(int i = 1; i<fringeTemp.size(); i++){\n if(fringeTemp.get(i).getHeuristic() <= minm.getHeuristic()){\n minm = fringeTemp.get(i);\n }\n }\n\n //now we have the minm for the next stage.\n current = minm;\n fringeTemp.remove(minm);\n fringe.clear();\n }\n\n //While loop ends\n System.out.println(\"No solution found.\");\n printExpanded(expanded);\n\n\n\n }",
"private List<Integer> dfsRecursive(LinkedList<Integer> list, \r\n String seq, int length, int point, int requiredSize) {\r\n \r\n List<Integer> neighbors = generateAdjacentCells(point, seq);\r\n if (length == requiredSize) {\r\n return list;\r\n }\r\n if (neighbors.size() == 0) {\r\n return new LinkedList<Integer>();\r\n }\r\n for (int n: neighbors) {\r\n this.togglePosMark(n);\r\n length += elementAtPos(n).length();\r\n list.addLast(n);\r\n \r\n List<Integer> result = dfsRecursive(list, seq.substring(\r\n elementAtPos(n).length(), seq.length()), length, n, requiredSize);\r\n \r\n if (result.size() == 0) {\r\n length -= elementAtPos(n).length();\r\n this.togglePosMark(list.removeLast());\r\n }\r\n else {\r\n return result;\r\n }\r\n }\r\n return new LinkedList<Integer>();\r\n }",
"boolean dfs(int node, Map<Integer, List<Integer>> graph, boolean[] visited, Set<Integer> dfsPath) {\n if(dfsPath.contains(node))\n return false;\n\n // If this node is already visited via some other source node then avoid checking further again\n if(visited[node])\n return true;\n\n dfsPath.add(node);\n visited[node] = true;\n\n for(int adjVertex : graph.get(node)) {\n if(!dfs(adjVertex, graph, visited, dfsPath)) {\n return false;\n }\n }\n\n dfsPath.remove(node);\n return true;\n }",
"private int findAllPathsUtil(int s, int t, boolean[] isVisited, List<Integer> localPathList,int numOfPath,LinkedList<Integer>[] parent )\n {\n\n if (t==s) {\n numOfPath++;\n return numOfPath;\n }\n isVisited[t] = true;\n\n for (Integer i : parent[t]) {\n if (!isVisited[i]) {\n localPathList.add(i);\n numOfPath =findAllPathsUtil(s,i , isVisited, localPathList,numOfPath,parent);\n localPathList.remove(i);\n }\n }\n isVisited[t] = false;\n return numOfPath;\n }",
"private static boolean dfs(char[][] board, int r, int c) {\n if (r == 9)\n return true;\n\n // return here and line 57 is because you will backtrack to the very beginning once a solution is found\n if (c == 9)\n return dfs(board, r + 1, 0);\n\n if (board[r][c] == '.') {\n // try each number\n for (int k = 1; k <= 9; k++) {\n board[r][c] = Character.forDigit(k, 10);\n if (isValid(board, r, c)) {\n // when find the solution should return true to avoid any more backtrack search\n if (dfs(board, r, c + 1))\n return true;\n }\n board[r][c] = '.';\n }\n } else {\n return dfs(board, r, c + 1);\n }\n return false;\n }",
"public int depth ();",
"private void dfs(DigrafoAristaPonderada G, int v) {\n enPila[v] = true;\n marcado[v] = true;\n for (AristaDirigida a : G.ady(v)) {\n int w = a.hacia();\n\n // short circuit if directed ciclo found\n if (ciclo != null) return;\n\n //found new vertex, so recur\n else if (!marcado[w]) {\n aristaHacia[w] = a;\n dfs(G, w);\n }\n\n // trace back directed ciclo\n else if (enPila[w]) {\n ciclo = new Pila<AristaDirigida>();\n while (a.desde() != w) {\n ciclo.push(a);\n a = aristaHacia[a.desde()];\n }\n ciclo.push(a);\n return;\n }\n }\n\n enPila[v] = false;\n }",
"static void dfs(int[][] G){\n\t\tStack<Integer> s = new Stack<Integer>();\n\t\tfor (int ver_start=0; ver_start<N; ver_start++){\n\t\t\tif (visited[ver_start]) continue;\n\t\t\ts.push(ver_start);\n\t\t\tvisited[ver_start] = true;\n\n\t\t\twhile(!s.isEmpty()){\n\t\t\t\tint vertex = s.pop();\n\t\t\t\tSystem.out.print((vertex+1) + \" \");\n\t\t\t\tfor (int i=0; i<N; i++){\n\t\t\t\t\tif (G[vertex][i] == 1 && !visited[i]){\n\t\t\t\t\t\t// find neigbor of current vertex and not visited\n\t\t\t\t\t\t// add into the stack\n\t\t\t\t\t\ts.push(i);\n\t\t\t\t\t\tvisited[i] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"private void dfsVisit(Node node, MyArrayList<Node> component) {\n Stack<Node> stack = new Stack<Node>();\n Node v = node;\n // while there are still nodes in the stack to be processed\n while (v != null) {\n if (v.getColor() == Color.WHITE) {\n t++;\n v.setD(t);\n v.setColor(Color.GRAY);\n // when we turn a vertex gray, we add it to the current component\n component.add(v);\n // we push this to the stack again and when we reach a gray vertex in the stack,\n // we know that all of its children have been processed and we can assign a finishing time\n stack.push(v);\n for (int i = 0; i < v.getAdjacencyList().size(); i++) {\n Node u = v.getAdjacencyList().get(i);\n if (u.getColor() == Color.WHITE) {\n u.setParent(v);\n stack.push(u);\n }\n }\n } else if (v.getColor() == Color.GRAY){\n // if the node in the stack is already gray, then we know we have finished all of its children\n // and it can be turned black\n t++;\n v.setF(t);\n v.setColor(Color.BLACK);\n }\n v = stack.pop();\n }\n }",
"public static void main(String[] args) {\n\n BDNode a = new BDNode(\"A\");\n BDNode b = new BDNode(\"B\");\n BDNode c = new BDNode(\"C\");\n BDNode d = new BDNode(\"D\");\n BDNode e = new BDNode(\"E\");\n\n a.link(b);\n a.link(d);\n b.link(a);\n b.link(c);\n b.link(e);\n c.link(b);\n c.link(d);\n d.link(a);\n d.link(c);\n d.link(e);\n e.link(b);\n e.link(d);\n\n BDNode target = e;\n\n/*\n // BFS\n Queue<BDNode> queue = new LinkedList<>();\n queue.offer(a);\n\n while(!queue.isEmpty()) {\n BDNode n = queue.poll();\n n.visit();\n System.out.println(n); // 찾는 여정 출력\n\n if(n.equals(target)) {\n System.out.println(\"BFS Found! \" + n);\n break;\n }\n\n for (BDNode l : n.links) {\n if(l.isVisited()) continue;\n if (queue.contains(l)) continue;\n queue.offer(l);\n }\n\n // 위랑 같은 표현\n// n.links.stream()\n// .filter(l -> !queue.contains(l))\n// .forEach(queue::offer);\n }\n*/\n\n // DFS\n Stack<BDNode> stack = new Stack<>();\n stack.push(a);\n\n while(!stack.isEmpty()) {\n BDNode n = stack.pop();\n n.visit();\n System.out.println(n); // 찾는 여정 출력\n\n if (n.equals(target)) {\n System.out.println(\"DFS Found! \" + n);\n break;\n }\n\n for (BDNode l : n.links) {\n if (l.isVisited()) continue;\n if (stack.contains(l)) continue;\n\n stack.push(l);\n }\n }\n\n\n }",
"public List<List<Integer>> subsets(int[] nums) {\n int size = nums.length;\n if (size == 0) {\n return new LinkedList();\n }\n\n List<List<Integer>> res = new LinkedList<>();\n dfs(nums, 0, new LinkedList<Integer>(), res);\n return res;\n\n }",
"private DFSResult dfs(HashSet<Integer> exploredEdges, int letter) {\r\n int nLoops = 0;\r\n int nNodes = 0;\r\n int maxConnectedLetter = 0;\r\n int maxConnections = -1;\r\n\r\n Stack<Integer> chain = new Stack<>();\r\n\r\n matrix[letter][letter] = 1;\r\n chain.push(letter);\r\n\r\n while(!chain.isEmpty()) {\r\n int u = chain.pop();\r\n nNodes++;\r\n\r\n int nConnections = 0;\r\n\r\n Iterator it = getIterator(u);\r\n\r\n Integer vertex;\r\n\r\n while((vertex = it.next()) != null) {\r\n nConnections++;\r\n\r\n if(exploredEdges.contains(this.matrix[u][vertex])) {\r\n continue;\r\n }\r\n\r\n exploredEdges.add(this.matrix[u][vertex]);\r\n\r\n if(matrix[vertex][vertex] == 0) {\r\n matrix[vertex][vertex] = 1;\r\n chain.push(vertex);\r\n } else if(matrix[vertex][vertex] == 1) {\r\n nLoops++;\r\n }\r\n }\r\n\r\n if(nConnections > maxConnections) {\r\n maxConnections = nConnections;\r\n maxConnectedLetter = u;\r\n }\r\n }\r\n\r\n return new DFSResult(nLoops, nNodes, maxConnectedLetter);\r\n }",
"int DFS(int i, int j) {\n if (dp[i][j] != 0)\n return dp[i][j];\n\n int steps = 0;\n int trial = 0;\n if (i < dp.length - 1 && matrix[i][j] < matrix[i+1][j]) {\n trial = DFS(i + 1, j);\n if (trial > steps)\n steps = trial;\n }\n if (i > 0 && matrix[i][j] < matrix[i-1][j]) {\n trial = DFS(i - 1, j);\n if (trial > steps)\n steps = trial;\n }\n if (j < dp[0].length - 1 && matrix[i][j] < matrix[i][j+1]) {\n trial = DFS(i, j + 1);\n if (trial > steps)\n steps = trial;\n }\n if (j > 0 && matrix[i][j] < matrix[i][j-1]) {\n trial = DFS(i, j - 1);\n if (trial > steps)\n steps = trial;\n }\n\n dp[i][j] = steps + 1;\n return dp[i][j];\n }",
"public static void dfs(int a, Vertex [] v){\n assert !v[a].visited;\n\n v[a].visited = true;\n\n // traverse over all the outgoing edges\n\n for(int b : v[a].edges){\n v[b].d = Math.max(v[b].d , v[a].d + 1);\n v[b].in --;\n\n if(v[b].in == 0 && !v[b].visited){\n dfs(b,v);\n }\n }\n\n\n }",
"private int dfs(TreeNode root, int sum) {\n if (root == null) return sum;\n int rsum = dfs(root.right, sum);\n root.val += rsum;\n return dfs(root.left, root.val);\n }",
"private void DFSUtil(graph copy,node_data n) {\n\t\tn.setTag(1);\n\t\tCollection<edge_data> temp = copy.getE(n.getKey());\n\t\tif (temp != null) {\n\t\t\tfor (edge_data edge : temp) {\n\t\t\t\tif (copy.getNode(edge.getDest()) != null && copy.getE(edge.getDest()) != null && copy.getNode(edge.getDest()).getTag() == 0) {\n\t\t\t\t\tDFSUtil(copy,copy.getNode(edge.getDest()));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static void solve(int caseNo) throws IOException{\n String[] nTemps = br.readLine().split(\" \");\n int n = Integer.parseInt(nTemps[0]), aDis = Integer.parseInt(nTemps[1]), bDis = Integer.parseInt(nTemps[2]);\n //int n = 5*(int)1e5, aDis = 1, bDis = 1;\n allNodes = new Node[n];\n for(int itr = 0; itr < n; itr++){\n allNodes[itr] = new Node(itr);\n }\n //Step 1: Create Connections\n nTemps = br.readLine().split(\" \");\n for(int itr = 0; itr < n-1; itr++){\n int parent = Integer.parseInt(nTemps[itr])-1, child = itr+1;\n //int parent = itr, child = itr+1;\n allNodes[parent].children.add(allNodes[child]);\n }\n //Step 2: Find aDis & bDis Depth children count.\n DFS.clear();\n depthStack.clear();\n calculateDepths(allNodes[0], aDis, 0);\n depthStack.clear();\n DFS.clear();\n calculateDepths(allNodes[0], bDis, 1);\n //Step 3: Do Your Thing!\n double tAns = 0;\n for(int itr = 0; itr < n; itr++){\n tAns+=(long)dp[itr][0]*n;\n tAns+=(long)dp[itr][1]*n;\n tAns-=(long)dp[itr][0]*dp[itr][1];\n }\n tAns/=Math.pow(n, 2);\n ans.append(\"Case #\"+caseNo+\": \"+String.valueOf(tAns)+\"\\n\");\n }",
"private void doDFSRecursive(int vertex) {\n markVisited(vertex);\n\n for (Integer adjacentVertex : graph.getAdjacentVertices(vertex)) {\n if (!isVisitedNode(adjacentVertex)) {\n System.out.print(adjacentVertex + \" \");\n doDFSRecursive(adjacentVertex);\n }\n }\n }",
"public static Tree solve() {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n\n int[] arrayNode = new int[n + 1];\n for (int i = 1; i <= n; i++) {\n arrayNode[i] = scan.nextInt();\n }\n\n Color[] arrayColor = new Color[n + 1];\n for (int i = 1; i <= n; i++) {\n if (scan.nextInt() == 0) {\n arrayColor[i] = Color.RED;\n } else {\n arrayColor[i] = Color.GREEN;\n }\n }\n\n List<Integer>[] adjacentsList = new List[n + 1];\n for (int i = 1; i <= n; i++) {\n adjacentsList[i] = new ArrayList<Integer>();\n }\n\n for (int i = 0; i < n - 1; i++) {\n int x = scan.nextInt();\n int y = scan.nextInt();\n\n adjacentsList[x].add(y);\n adjacentsList[y].add(x);\n }\n\n scan.close();\n\n List<Integer>[] childrenList = new List[n + 1];\n for (int i = 1; i <= n; i++) {\n childrenList[i] = new ArrayList<Integer>();\n }\n\n int[] depths = new int[n + 1];\n boolean[] visited = new boolean[n + 1];\n\n Queue<Integer> queue = new LinkedList<Integer>();\n depths[1] = 0;\n queue.offer(1);\n while (!queue.isEmpty()) {\n int head = queue.poll();\n\n if (visited[head]) {\n continue;\n }\n visited[head] = true;\n\n for (int adjacent : adjacentsList[head]) {\n if (!visited[adjacent]) {\n childrenList[head].add(adjacent);\n depths[adjacent] = depths[head] + 1;\n queue.offer(adjacent);\n }\n }\n }\n\n Tree[] nodes = new Tree[n + 1];\n for (int i = 1; i <= n; i++) {\n if (childrenList[i].isEmpty()) {\n nodes[i] = new TreeLeaf(arrayNode[i], arrayColor[i], depths[i]);\n } else {\n nodes[i] = new TreeNode(arrayNode[i], arrayColor[i], depths[i]);\n }\n }\n for (int i = 1; i <= n; i++) {\n for (int child : childrenList[i]) {\n ((TreeNode) nodes[i]).addChild(nodes[child]);\n }\n }\n return nodes[1];\n }",
"public void dfs(DirectedGraph graph, int node){\n onStack[node] = true;\n // marked the node as visited\n marked[node] = true;\n // traverse through the neigh of the node\n for(int neigh: graph.adj[node]){\n // if the cycle stack is not empty then we have cycle\n if (this.hasCycle()) return;\n else if (!marked[neigh]){\n // assign node as neigh parent to check cycle later\n parent[neigh] = node;\n // traverse through unvisited node\n dfs(graph,neigh);\n // if neigh is already visited and onstack then trace back to\n // check if the parent of node is the same as neigh\n }else if (onStack[neigh]){\n// System.out.println(\"neigh = \"+ neigh + \" node = \"+ node);\n // put all the vertex in the cycle to the stack\n int v = node;\n cycle.push(v);\n while(v != neigh){\n v = parent[v];\n cycle.push(v);\n }\n if(cycle.size() < 3) cycle = new Stack<>();\n else {\n System.out.print(\"The cycle is \");\n for (int vertex : cycle) System.out.print(vertex + \",\");\n System.out.println();\n }\n\n }\n }\n onStack[node] = false;\n }",
"static int recursion(int steps, int arrLen, int index, int[][] dp) {\n\n if (steps == 0 && index == 0) {\n return 1;\n }\n\n // extra base condition is index> steps , because we cannot return from there at all.\n if (steps == 0 || index < 0 || index >= arrLen || index > steps) return 0;\n\n if (dp[steps][index] != -1) return dp[steps][index];\n\n int ans = 0;\n\n // we can go either left , right or stay there itself.\n ans = (ans + recursion(steps - 1, arrLen, index, dp)) % MOD;\n ans = (ans + recursion(steps - 1, arrLen, index + 1, dp)) % MOD;\n ans = (ans + recursion(steps - 1, arrLen, index - 1, dp)) % MOD;\n dp[steps][index] = ans % MOD;\n return dp[steps][index];\n }",
"void DFS(int v) {\n // Mark all the vertices as not visited(set as\n // false by default in java)\n boolean visited[] = new boolean[V];\n\n // Call the recursive helper function to print DFS traversal\n DFSUtil(v, visited);\n }",
"public boolean dfs_iterative_util(LinkedList<Integer>[] graph, boolean[] visited, int s){\n Stack<Integer> fringe = new Stack<Integer>();\n Set<Integer> currStack = new HashSet<Integer>();\n \n fringe.push(s);\n currStack.add(s);\n \n while(!fringe.isEmpty()){\n int curr = fringe.pop();\n if(currStack.contains(curr))\n return false;\n visited[curr] = true;\n currStack.add(curr);\n if(graph[curr] != null){\n Iterator<Integer> itr = graph[curr].iterator();\n while(itr.hasNext()){\n int n = itr.next();\n \n if(!visited[n]){\n fringe.push(n);\n }\n }\n currStack.remove(curr);\n }\n \n }\n \n return true;\n }",
"private void getSizeDfs(int nodeIdx, int parentNodeIdx){\r\n\t\tsubTreeSize[nodeIdx] = 1;\t\t//include this node\r\n\t\tmaxSubTreeSize[nodeIdx] = 0;\t//exclude this node\r\n\t\t\r\n\t\t//recursively get the size of children and add up\r\n\t\tfor(Integer idx: cities[nodeIdx].adjacentNodeIndices){\r\n\t\t\tif(parentNodeIdx == idx || visited[idx]) continue;\r\n\t\t\t\r\n\t\t\tgetSizeDfs(idx, nodeIdx);\r\n\t\t\tsubTreeSize[nodeIdx] += subTreeSize[idx];\r\n\t\t\t\r\n\t\t\tif(subTreeSize[idx] > maxSubTreeSize[nodeIdx])\r\n\t\t\t\tmaxSubTreeSize[nodeIdx] = subTreeSize[idx];\r\n\t\t}\r\n\t}",
"private void dfsVisit(Node node) {\n\t\tStack<Node>stack = new Stack<>();\r\n\t\tstack.push(node); //add source node to queue\r\n\t\twhile(!stack.isEmpty()) {\r\n\t\t\tNode presentNode = stack.pop();\r\n\t\t\tpresentNode.setVisited(true);\r\n\t\t\tSystem.out.print(presentNode.getName()+\" \");\r\n\t\t\tfor(Node neighbor: presentNode.getNeighbors()) { //for each neighbor of present node\r\n\t\t\t\tif(!neighbor.isVisited()) { //if neighbor is not visited then add it to queue\r\n\t\t\t\t\tstack.push(neighbor);\r\n\t\t\t\t\tneighbor.setVisited(true);\r\n\t\t\t\t}\r\n\t\t\t}//end of for loop\r\n\t\t}//end of while loop\r\n\t\t\r\n\t}",
"public void DFS(List<List<Integer>> result, List<Integer> temp, int n, int start){\n for(int i = start; i * i <= n; i++){\n //we skip undividable factor\n if(n%i != 0) continue;\n \n //found a pair of factor, we can add them to temp list to build a valid factor combination\n List<Integer> copy = new ArrayList<Integer>(temp);\n //since i <= n/i, we will add i first, then n/i\n copy.add(i);\n copy.add(n/i);\n result.add(copy);\n \n //then we try to decompose larger n/i factor, and our later factors shall not be > i, since i has been inserted into list \n temp.add(i);\n DFS(result, temp, n/i, i);\n temp.remove(temp.size() - 1);\n }\n }",
"static void dfs(int x, int p, int f, int s, int v, int c) {\n\t\t\n\t\tif (p >= mins[0] && f >= mins[1] && s >= mins[2] && v >= mins[3]) {\n\t\t\tif (c<min) {\n\t\t\t\tres = new int[list.size()];\n\t\t\t\tfor (int i=0;i<list.size();i++) {\n\t\t\t\t\tres[i] = list.get(i);\n\t\t\t\t}\n\t\t\t\tmin = c;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tSystem.out.println(list);\n\t\tfor (int i = x; i < N; i++) {\n\t\t\tif (!visited[i]) {\n\t\t\t\tlist.add(i);\n\t\t\t\tvisited[i] = true;\n\t\t\t\tdfs(i + 1, p + info[i][0], f + info[i][1], s + info[i][2], v + info[i][3], c + info[i][4]);\n\t\t\t\tlist.remove(list.size() - 1);\n\t\t\t\tvisited[i] = false;\n\t\t\t}\n\t\t}\n\t}",
"private void depthFirstSearch(Slot start, ArrayList<Pair<Slot, Slot>> moves, HashMap<Slot, Slot> parents) {\n boolean[][] visitedSlots = new boolean[Board.MAX_ROW][Board.MAX_COLUMN];\n\n setSlotsAsNotVisited(visitedSlots);\n\n Stack<Slot> dfsStack = new Stack<>();\n int color = start.getColor();\n\n dfsStack.push(start);\n Slot previous = start;\n\n boardObject.setSlotColor(boardObject.getSlot(start.getRow(), start.getColumn()), Slot.EMPTY);\n\n while (!dfsStack.empty()) {\n Pair<Slot, Slot> next;\n Slot current = dfsStack.pop();\n\n if (!visitedSlots[current.getRow()][current.getColumn()] && !current.equals(previous)) {\n if (!current.equals(start)) {\n visitedSlots[current.getRow()][current.getColumn()] = true;\n }\n\n next = new Pair<>(start, current);\n\n moves.add(next);\n }\n\n Slot up = getUp(current);\n Slot down = getDown(current);\n Slot left = getLeft(current);\n Slot right = getRight(current);\n\n if (left != null && !visitedSlots[left.getRow()][left.getColumn()]) {\n if (!isChild(current, left, parents)) {\n dfsStack.push(left);\n parents.put(left, current);\n }\n }\n\n if (down != null && !visitedSlots[down.getRow()][down.getColumn()]) {\n if (!isChild(current, down, parents)) {\n dfsStack.push(down);\n parents.put(down, current);\n }\n }\n\n if (right != null && !visitedSlots[right.getRow()][right.getColumn()]) {\n if (!isChild(current, right, parents)) {\n dfsStack.push(right);\n parents.put(right, current);\n }\n }\n\n if (up != null && !visitedSlots[up.getRow()][up.getColumn()]) {\n if (!isChild(current, up, parents)) {\n dfsStack.push(up);\n parents.put(up, current);\n }\n }\n\n previous = current;\n }\n\n boardObject.setSlotColor(boardObject.getSlot(start.getRow(), start.getColumn()), color);\n }",
"public void doDfsIterative(Graph g, int s) {\n boolean[] myVisited = new boolean[8];\n Stack<Integer> stack = new Stack<>();\n stack.push(s);\n myVisited[s] = true;\n while (!stack.isEmpty()) {\n int top = stack.pop();\n System.out.print(\"[\" + top + \"] \");\n for (int e : g.adj[top]) {\n if (!myVisited[e]) {\n stack.push(e);\n myVisited[e] = true;\n }\n }\n }\n\n }",
"static int paths_usingRecursion(int[][] matrix) {\n\t\treturn paths(matrix, 0, 0);\n\t}",
"public void dfs(LinkedList<Node>[] adjList){\n Set<Integer> visited = new HashSet<>();\n\n for(LinkedList<Node> node: adjList){\n Node curr = node.getFirst();\n if(!visited.contains(curr)){\n ArrayList<Integer> components = new ArrayList<>();\n components = getConnectedComponets(curr, visited, components);\n System.out.printf(\"do something %s\", components.toString());\n }\n }\n }",
"private boolean dfs(int[][] maze, boolean[][] visited, int[] start, int[] destination) {\n\t\tif(Arrays.equals(start, destination)) return true;\n\t\tint i = start[0];\n\t\tint j = start[1];\n\t\tif(visited[i][j])\n\t\t\treturn false;\n\t\tvisited[i][j] = true;\n\t\tBiPredicate<Integer, Integer> roll = (rowInc, colInc) -> {\n\t\t\tint ii = i, jj = j;\n\t\t\twhile(ii >= 0 && ii <= maze.length - 1 && jj >= 0 && jj <= maze[0].length - 1 && maze[ii][jj] != 1) {\n\t\t\t\tii += rowInc;\n\t\t\t\tjj += colInc;\n\t\t\t}\n\t\t\treturn dfs(maze, visited, new int[] {ii - rowInc, jj - colInc}, destination)\n\t\t};\n\t\tif(roll.test(1, 0)) return true;\n\t\tif(roll.test(-1, 0)) return true;\n\t\tif(roll.test(0, 1)) return true;\n\t\tif(roll.test(0, -1)) return true;\n\t\t\n\t\treturn false;\n\t}",
"public static void main(String[] args){\n LinkedListDeque<String> lld = new LinkedListDeque<>();\n lld.addFirst(\"Hello\");\n lld.addLast(\"Java\");\n lld.addLast(\"!\");\n\n String s0 = lld.getRecursive(0);\n String s1 = lld.getRecursive(1);\n String s2 = lld.getRecursive(2);\n System.out.println(s0 + s1 + s2);\n System.out.println(lld.getRecursive(556));\n //lld.getRecursive(2);\n }",
"private void visitDFS(Dot node, Set< Dot > visited ) {\n\n board.getNeighbors( node ).forEach( nbr -> {\n if ( !visited.contains( nbr ) ) {\n visited.add( nbr );\n visitDFS( nbr, visited );\n }\n } );\n }",
"public int depthFirstSearch(List<Integer>[] adj){\n int connected = 0;\n for(int i = 0; i < n; i++){\n if(visited[i] == false){\n connected ++;\n dfsRecursive(adj, i);\n }\n }\n return connected;\n }",
"private boolean dfs(String word, TrieNode parent) {\n if (word.length() == 0) {//since it's parent node so idx cannot be len - 1\n return parent.isLeaf;\n }\n boolean firstMatch = word.length() > 0 && (parent.map.containsKey(word.charAt(0)) || word.charAt(0) == '.');\n if (word.length() > 1 && word.charAt(1) == '*') {\n if(word.charAt(0) == '.') {\n boolean tmp = false;\n for (TrieNode curr : parent.map.values()) {\n tmp = tmp || firstMatch && dfs(word, curr);\n }\n return tmp || firstMatch && dfs(word.substring(2), parent); //match || no match\n } else {\n return firstMatch && (dfs(word, parent.map.get(word.charAt(0))) || dfs(word.substring(2), parent.map.get(word.charAt(0))));\n }\n } else {\n if (word.charAt(0) == '.') {\n boolean tmp = false;\n for (TrieNode curr : parent.map.values()) {\n tmp = tmp || firstMatch && dfs(word.substring(1), curr);\n }\n return tmp;\n } else {\n return firstMatch && dfs(word.substring(1), parent.map.get(word.charAt(0)));\n }\n }\n }",
"int getRecursionDepth();"
] |
[
"0.72431463",
"0.705093",
"0.6852191",
"0.6771606",
"0.6740965",
"0.6728702",
"0.6693006",
"0.6662907",
"0.66604024",
"0.66506356",
"0.66316736",
"0.6571372",
"0.65510374",
"0.65175444",
"0.6512816",
"0.6492601",
"0.64302105",
"0.64253694",
"0.6417105",
"0.6352658",
"0.63384336",
"0.63012123",
"0.63010275",
"0.6296982",
"0.6296982",
"0.6293005",
"0.6288743",
"0.62883174",
"0.6285529",
"0.62848544",
"0.62712395",
"0.624457",
"0.6218003",
"0.62120587",
"0.6180445",
"0.6170082",
"0.61675894",
"0.61168987",
"0.61070234",
"0.60898006",
"0.60649854",
"0.60642976",
"0.60615265",
"0.60548663",
"0.60409254",
"0.60353106",
"0.60318786",
"0.6012936",
"0.60126764",
"0.6006422",
"0.599953",
"0.5997448",
"0.5981594",
"0.59787947",
"0.5975806",
"0.5963847",
"0.5961536",
"0.59572935",
"0.59442097",
"0.5943039",
"0.5940289",
"0.5925765",
"0.59209543",
"0.59154254",
"0.59056187",
"0.58988893",
"0.5892169",
"0.58892477",
"0.5886018",
"0.5883232",
"0.588306",
"0.5874557",
"0.5869846",
"0.58692306",
"0.5860651",
"0.585893",
"0.5839042",
"0.58361846",
"0.58137816",
"0.58095545",
"0.58060014",
"0.5804459",
"0.5800477",
"0.5795564",
"0.5793761",
"0.5791097",
"0.5785462",
"0.5779087",
"0.57769763",
"0.57726467",
"0.57718545",
"0.5769825",
"0.5763715",
"0.57628816",
"0.57587403",
"0.5748293",
"0.5736532",
"0.572787",
"0.5723746",
"0.5722019",
"0.5715862"
] |
0.0
|
-1
|
isMoment = 1 ??????
|
public static String getUrl(int id,int type,int isMoment) {
return SnsConstants.URL_GUANWANG+"?id="+id+"&type="+type+"&isMoment="+isMoment;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public boolean isLastMoment() {\n return isLastMoment;\n }",
"private Moment() {}",
"boolean hasInstant();",
"double angMomentum();",
"boolean hasDesiredTime();",
"boolean isSetValuePeriod();",
"boolean hasDuration();",
"public boolean isPM() {\n\tif (end != null)\n\t return end.isAfter(LocalTime.NOON) || end.equals(LocalTime.NOON);\n\treturn false;\n\n }",
"public boolean hasInstant() {\n return instant_ != null;\n }",
"boolean isSetDuration();",
"boolean isSetDuration();",
"boolean isSetDuration();",
"boolean hasTime();",
"boolean hasTime();",
"boolean hasDateTime();",
"boolean isSetTimeInterval();",
"boolean hasEndTime();",
"public boolean isWholeDuration ()\r\n {\r\n if (!getNotes().isEmpty()) {\r\n Note note = (Note) getNotes().get(0);\r\n\r\n return note.getShape().isMeasureRest();\r\n }\r\n\r\n return false;\r\n }",
"boolean isSetFractionalMinimum();",
"boolean getFromDayNull();",
"private boolean compareMomenta(int[] a, int[] b){\n return ((a[0] == b[0]) &&\n (a[1]) == b[1]) ;\n }",
"boolean mo61579as(float f);",
"boolean isOneTime();",
"public boolean isDuration() {\n return false;\n }",
"boolean hasTimeBoltBBoltC();",
"boolean isAtom(Formula f);",
"public boolean isNowTime_in_period(){\r\n if (isTimeWith_in_Interval((LocalTime.now()).format(formatter),openTime,closeTime)) {\r\n // System.out.println(\"hi this works\");\r\n return true;\r\n } else {\r\n \r\n return false;\r\n }\r\n }",
"boolean hasTimeBoltABoltB();",
"boolean hasContinuousDay();",
"public boolean hasTime() {\n return this.timeWrapper.isPresent();\n }",
"boolean hasTimeBoltHBoltE();",
"boolean hasTimeSpoutBoltF();",
"boolean hasStartTime();",
"public boolean isOne() {\n\n return realPart == 1d && imaginaryPart == 0d;\n }",
"public boolean aDy() {\n return true;\n }",
"private boolean checkTime(){\n\t\treturn false;\r\n\t}",
"boolean hasDepositEndTime();",
"private boolean temMunicao() {\n\t\t\n\t\tif (round<1) {\n\t\t\tsetSemMunicao(true);\n\t\t\treturn false;\n\t\t\t\n\t\t}else \n\t\t\tsetSemMunicao(false);\n\t\t\n\t\t\n\t\treturn true;\n\t}",
"public boolean isTime() {\n return false;\n }",
"boolean mo61590s(double d);",
"public boolean hasValidToMillis() {\n return fieldSetFlags()[5];\n }",
"boolean hasVotingEndTime();",
"private boolean diaHabilDomingoPlacaA(int diaActual){\n\t\treturn diaActual == DOMINGO;\n\t}",
"public boolean isPeriodic() {\n return period != 0;\n }",
"public boolean isSimpleMantissaFormat() {\n return _simpleMantissaFormat;\n }",
"protected boolean isFinished() {\n\tif(this.motionMagicEndPoint >0) {\n \tif(Math.abs(RobotMap.motorLeftTwo.get() )< 0.09 && Math.abs(RobotMap.motorRightTwo.get() )> -0.09&& Timer.getFPGATimestamp()-starttime > 10) {\n \t\treturn true;\n \t}\n\t}\n\t\n return false;\n }",
"public boolean hasValidFromMillis() {\n return fieldSetFlags()[4];\n }",
"boolean isSetSignalPeriod();",
"boolean isBeating();",
"public boolean hasInstant() {\n return instantBuilder_ != null || instant_ != null;\n }",
"public boolean isAM() {\n\tif (start != null)\n\t return start.isBefore(LocalTime.NOON);\n\treturn false;\n }",
"boolean isMet();",
"public abstract void isBargein(long ms, boolean success);",
"public boolean isMeasureTime() ;",
"boolean hasSolverTimeLimitSeconds();",
"public boolean hasDesiredTime() {\n return desiredTime_ != null;\n }",
"public boolean isMet();",
"public boolean hasMillis() {\n return fieldSetFlags()[1];\n }",
"boolean hasStartDate();",
"boolean typeIsTimed() {\n return true;\n }",
"boolean getDayNull();",
"boolean hasTimestamp();",
"boolean hasTimestamp();",
"boolean hasTimestamp();",
"boolean hasTimestamp();",
"boolean hasTimestamp();",
"boolean hasTimestamp();",
"boolean hasTimestamp();",
"public boolean isPM() {\n return isPM;\n }",
"public boolean isTransition() {\n/* 4839 */ return this.isTransition;\n/* */ }",
"boolean isNewInterval();",
"public static boolean emaMomentumExists(Stock stock, String date, boolean fractal) {\r\n\t\t\tdate = stock.getClosestDate(date);\r\n\r\n\t\t\tint timePeriod = stock.getTimePeriod();\r\n\t\t\tint startingIndex = stock.getDates().indexOf(date) - timePeriod + 1;\r\n\t\t\tint endingIndex = stock.getDates().indexOf(date);\r\n\t\t\tdouble rateOfChange = 0;\r\n\t\t\tdouble previousRateOfChange = 0;\r\n\t\t\tdouble[] ratesOfChange = new double[timePeriod];\r\n\t\t\tfor (int i = startingIndex; i < endingIndex; i++) {\r\n\t\t\t\tString iDate1 = stock.getDates().get(i);\r\n\t\t\t\tString iDate2 = stock.getDates().get(i + 1);\r\n\t\t\t\tdouble ema1 = stock.getEMA(iDate1);\r\n\t\t\t\tdouble ema2 = stock.getEMA(iDate2);\r\n\t\t\t\tdouble emaFifty1 = stock.getFiftyEMA(iDate1);\r\n\t\t\t\tdouble emaFifty2 = stock.getFiftyEMA(iDate2);\r\n\t\t\t\tdouble hist1 = ema1 - emaFifty1;\r\n\t\t\t\tdouble hist2 = ema2 - emaFifty2;\r\n\t\t\t\tdouble change = hist2 - hist1;\r\n\t\t\t\tratesOfChange[i - startingIndex] = change;\r\n\t\t\t}\r\n\r\n\t\t\tdouble multiplier = (2.0 / (double) (timePeriod + 1));\r\n\t\t\tpreviousRateOfChange = ratesOfChange[0];\r\n\t\t\tdouble ema = 0;\r\n\t\t\tfor (int i = 1; i < ratesOfChange.length; i++) {\r\n\t\t\t\trateOfChange = ratesOfChange[i];\r\n\t\t\t\tema = ((rateOfChange - previousRateOfChange) * multiplier) + previousRateOfChange;\r\n\t\t\t\tpreviousRateOfChange = ema;\r\n\t\t\t}\r\n\r\n\t\t\tif (!fractal && postiveCross(stock, date, stock.getTimePeriod()) && ema > .04) { \r\n\t\t\t\treturn true;\r\n\t\t\t} else if (fractal && ema > 0) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}",
"boolean getToDayNull();",
"boolean isSetBegin();",
"boolean hasMPValue();",
"public boolean func_isInTheFuture() {\n if(TimeUtils.compareWithNow(startTime) >= 0)\n return true;\n return false;\n }",
"boolean validConsecutiveMotion(IMotion m1);",
"public boolean isMonotonic() {\r\n // TODO -- redefine for functions in Functions.java\r\n return monotonic ;\r\n }",
"boolean isSetFractional();",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Momenten)) {\r\n return false;\r\n }\r\n Momenten other = (Momenten) object;\r\n if ((this.momid == null && other.momid != null) || (this.momid != null && !this.momid.equals(other.momid))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"boolean isSetRecurrenceDuration();",
"boolean hasToDay();",
"public boolean isFirstCycle() {\n return cycle == 0;\n }",
"boolean hasTimeSpoutBoltA();",
"boolean isDelayed();",
"boolean hasFromDay();",
"private double getRotationMomentum()\n\t{\n\t\treturn getRotation() * this.currentMomentMass;\n\t}",
"@Override\r\n public Boolean isOne(Ring ring) {\r\n return (re.isOne(ring) && im.isZero(ring));\r\n }",
"boolean hasDouble();",
"boolean hasTimeBoltCBoltD();",
"boolean isIsInitial();",
"boolean isNilFractionalMinimum();",
"boolean getFractional();",
"boolean isSetDate();",
"public boolean usesTime() {\n return uhrzeit != null;\n }",
"private boolean isMomentOfRegret(int p, int[] stepV) {\n\t\tif (p > r + 1) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// we can go back k step and choose r out of k\n return (p <= r + 1) && (stepV[p] != ConstantValue.IMPOSSIBLE_VALUE);\n\n }",
"public boolean kiemTraPSToiGian(){\n if (timUSCLN(tuSo,mauSo) == 1){\n return true;\n }else {\n return false;\n }\n }",
"public Momentum() {\r\n m1 = m2 = v1 = v2 = p1 = p2 = comx = cv = 0.0;\r\n xp1 = 0.0;\r\n xp2 = 900.0;\r\n m1 = 2.0;\r\n m2 = 1.0;\r\n v1 = 1.0;\r\n v2 = -1.0;\r\n\r\n //m1 = m2 = 1.0;\r\n //v1 = 2.0;\r\n //v2 = -4.0;\r\n d = dc = 8.0;\r\n }",
"boolean hasErrorTime();",
"boolean hasBeginDate();",
"boolean mo61581e(double d, boolean z);"
] |
[
"0.64703053",
"0.6342975",
"0.57966125",
"0.5666652",
"0.5614856",
"0.56019443",
"0.5593805",
"0.5482443",
"0.547135",
"0.5469606",
"0.5469606",
"0.5469606",
"0.54422015",
"0.54422015",
"0.54274124",
"0.53197825",
"0.5319119",
"0.5312219",
"0.5306146",
"0.5278175",
"0.52757776",
"0.5264977",
"0.52588856",
"0.5245281",
"0.52233845",
"0.52201575",
"0.5211525",
"0.5203301",
"0.5198459",
"0.5186291",
"0.5184191",
"0.51808727",
"0.51676023",
"0.515416",
"0.51513195",
"0.5139649",
"0.51292336",
"0.51291037",
"0.5119771",
"0.5118674",
"0.51146424",
"0.51142365",
"0.50873405",
"0.50834095",
"0.5074122",
"0.5071368",
"0.5067636",
"0.5056018",
"0.505537",
"0.5052203",
"0.50514853",
"0.5044003",
"0.50336224",
"0.503132",
"0.5026455",
"0.5021532",
"0.501234",
"0.5008691",
"0.49994075",
"0.49972028",
"0.49955508",
"0.49937287",
"0.49937287",
"0.49937287",
"0.49937287",
"0.49937287",
"0.49937287",
"0.49937287",
"0.4978175",
"0.49757287",
"0.4965398",
"0.49574757",
"0.495196",
"0.49499542",
"0.49458337",
"0.49446923",
"0.49396598",
"0.49351138",
"0.49250263",
"0.4917029",
"0.49169266",
"0.4911778",
"0.49095777",
"0.4907596",
"0.4904303",
"0.489926",
"0.48963055",
"0.48914737",
"0.48785713",
"0.48664808",
"0.4863861",
"0.48629126",
"0.48625833",
"0.48577145",
"0.48531708",
"0.4852728",
"0.48501346",
"0.48462328",
"0.4846144",
"0.484378",
"0.48428234"
] |
0.0
|
-1
|
Create repositories (group, remote, hosted) when trackingId is present. Otherwise create normal remote repository with specified name.
|
private ProxyCreationResult createRepo( String trackingId, URL url, String name )
throws IndyDataException
{
UrlInfo info = new UrlInfo( url.toExternalForm() );
UserPass up = UserPass.parse( ApplicationHeader.authorization, httpRequest, url.getAuthority() );
String baseUrl = getBaseUrl( url );
logger.debug( ">>>> Create repo: trackingId=" + trackingId + ", name=" + name );
ProxyCreationResult result = repoCreator.create( trackingId, name, baseUrl, info, up,
LoggerFactory.getLogger( repoCreator.getClass() ) );
ChangeSummary changeSummary =
new ChangeSummary( ChangeSummary.SYSTEM_USER, "Creating HTTProx proxy for: " + info.getUrl() );
RemoteRepository remote = result.getRemote();
if ( remote != null )
{
storeManager.storeArtifactStore( remote, changeSummary, false, true, new EventMetadata() );
}
HostedRepository hosted = result.getHosted();
if ( hosted != null )
{
storeManager.storeArtifactStore( hosted, changeSummary, false, true, new EventMetadata() );
}
Group group = result.getGroup();
if ( group != null )
{
storeManager.storeArtifactStore( group, changeSummary, false, true, new EventMetadata() );
}
return result;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void createRepository(String projectKey, String repoName, String parentProjectKey) throws VersionControlException;",
"private void createNewRepository() {\n\t\tRepositoryConfiguration conf = repositorySettingsJPanel\n\t\t\t\t.getRepositoryConfiguration();\n\n\t\t/*\n\t\t * if (RepositoryType.HTTP.equals(conf.getType())) { new\n\t\t * MessageDialog(this, \"TBD\",\n\t\t * \"The support for HTTP repository is not implemented yet\"\n\t\t * ).setVisible(true); return; }\n\t\t */\n\n\t\tif (!validateRepositoryConfiguration(conf)) {\n\t\t\t// fixme igor; mark what is wrong!!\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tContextHolder.getInstance().getApplicationConfiguration()\n\t\t\t\t\t.addRepositoryConfiguration(conf);\n\t\t} catch (AddRepositoryException e) {\n\t\t\tnew MessageDialog(this, \"Cannot create new repository\",\n\t\t\t\t\te.getMessage()).setVisible(true);\n\t\t\treturn;\n\t\t}\n\n\t\tAppEventsManager.getInstance().fireRepositoriesChanagedEvent(this);\n\t\tdispose();\n\t}",
"WithCreate withRepoUrl(String repoUrl);",
"private ArtifactRepository createRepository( String url, String repositoryId )\n {\n // snapshots vs releases\n // offline = to turning the update policy off\n\n //TODO: we'll need to allow finer grained creation of repositories but this will do for now\n\n String updatePolicyFlag = ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS;\n\n String checksumPolicyFlag = ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN;\n\n ArtifactRepositoryPolicy snapshotsPolicy =\n new ArtifactRepositoryPolicy( true, updatePolicyFlag, checksumPolicyFlag );\n\n ArtifactRepositoryPolicy releasesPolicy =\n new ArtifactRepositoryPolicy( true, updatePolicyFlag, checksumPolicyFlag );\n\n return artifactRepositoryFactory.createArtifactRepository( repositoryId, url, defaultArtifactRepositoryLayout,\n snapshotsPolicy, releasesPolicy );\n }",
"public synchronized Repository createRepository(String currentUser, String name)\n\t\t\tthrows IOException, DuplicateFileException {\n\n\t\tif (isAnonymousUser(currentUser)) {\n\t\t\tthrow new UserAccessException(\"Anonymous user not permitted to create repository\");\n\t\t}\n\n\t\tvalidateUser(currentUser);\n\n\t\tif (!NamingUtilities.isValidProjectName(name)) {\n\t\t\tthrow new IOException(\"Invalid repository name: \" + name);\n\t\t}\n\t\tif (repositoryMap.containsKey(name)) {\n\t\t\tthrow new DuplicateFileException(\"Repository named \" + name + \" already exists\");\n\t\t}\n\n\t\tFile f = new File(rootDirFile, NamingUtilities.mangle(name));\n\t\tif (!f.mkdir()) {\n\t\t\tthrow new IOException(\"Failed to make directory for \" + f.getAbsolutePath());\n\t\t}\n\n\t\tRepository rep = new Repository(this, currentUser, f, name);\n\t\tlog(name, null, \"repository created\", currentUser);\n\t\trepositoryMap.put(name, rep);\n\t\treturn rep;\n\t}",
"public GitRemote getRemote(String aName) { return new GitRemote(aName); }",
"@Override\n\t\t\tpublic void run(@Nonnull ProgressIndicator indicator)\n\t\t\t{\n\t\t\t\tLOG.info(\"Creating GitHub repository\");\n\t\t\t\tindicator.setText(\"Creating GitHub repository...\");\n\t\t\t\tfinal String url = createGithubRepository(project, githubInfo.getAuthData(), name, description,\n\t\t\t\t\t\tisPrivate);\n\t\t\t\tif(url == null)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tLOG.info(\"Successfully created GitHub repository\");\n\n\t\t\t\t// creating empty git repo if git is not initialized\n\t\t\t\tLOG.info(\"Binding local project with GitHub\");\n\t\t\t\tif(!gitDetected)\n\t\t\t\t{\n\t\t\t\t\tLOG.info(\"No git detected, creating empty git repo\");\n\t\t\t\t\tindicator.setText(\"Creating empty git repo...\");\n\t\t\t\t\tif(!createEmptyGitRepository(project, root, indicator))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tGitRepositoryManager repositoryManager = GitUtil.getRepositoryManager(project);\n\t\t\t\tfinal GitRepository repository = repositoryManager.getRepositoryForRoot(root);\n\t\t\t\tLOG.assertTrue(repository != null, \"GitRepository is null for root \" + root);\n\n\t\t\t\tfinal String remoteUrl = GithubUrlUtil.getGitHost() + \"/\" + githubInfo.getUser().getLogin() + \"/\" +\n\t\t\t\t\t\tname + \".git\";\n\t\t\t\tfinal String remoteName = finalExternalRemoteDetected ? \"github\" : \"origin\";\n\n\t\t\t\t//git remote add origin git@github.com:login/name.git\n\t\t\t\tLOG.info(\"Adding GitHub as a remote host\");\n\t\t\t\tindicator.setText(\"Adding GitHub as a remote host...\");\n\t\t\t\tif(!addGithubRemote(project, root, remoteName, remoteUrl, repository))\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// create sample commit for binding project\n\t\t\t\tif(!performFirstCommitIfRequired(project, root, repository, indicator, name, url))\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t//git push origin master\n\t\t\t\tLOG.info(\"Pushing to github master\");\n\t\t\t\tindicator.setText(\"Pushing to github master...\");\n\t\t\t\tif(!pushCurrentBranch(project, repository, remoteName, remoteUrl, name, url))\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tGithubNotifications.showInfoURL(project, \"Successfully shared project on GitHub\", name, url);\n\t\t\t}",
"TRepo createRepo();",
"@Override\n public CreateRepositoryResult createRepository(CreateRepositoryRequest request) {\n request = beforeClientExecution(request);\n return executeCreateRepository(request);\n }",
"private void createRepository(URL repository) throws IOException, ProcessingException {\n if(repository.getPath().equals(\"/\"))\n throw new ProcessingException(\"Illegal repository name\");\n try {\n exec(buildSvnWithUsername(\"proplist \"+repository),new File(\".\"),\"N/A\");\n } catch (ProcessingException e) {\n // directory doesn't exist\n URL parent;\n if(repository.getPath().endsWith(\"/\"))\n parent = new URL(repository, \"..\");\n else\n parent = new URL(repository, \".\");\n createRepository(parent);\n\n listener.info(repository+\" doesn't exist. creating\");\n exec(buildSvnWithUsername(\"mkdir -m \\\"\"+commitMessage+\"\\\" \"+repository),new File(\".\"),\"Failed to create directory\");\n }\n }",
"public void createRepository() throws VcsException {\n final FossilSimpleCommand fossilCommand = new FossilSimpleCommand(myProject, myRepoPath.getParentFile(), FCommandName.new_);\n fossilCommand.addParameters(myRepoPath.getPath());\n String result = fossilCommand.run();\n result = result.replace(\"\\r\", \"\");\n final String[] split = result.split(\"\\n\");\n final List<String> lines = new ArrayList<String>(3);\n for (String line : split) {\n if (! StringUtil.isEmptyOrSpaces(line)) {\n lines.add(line.trim());\n }\n }\n\n if (lines.size() != 3) {\n throw new FossilException(\"Can not parse 'new' output: '\" + result + \"'\");\n }\n final String[] expectedHeaders = {\"project-id:\", \"server-id:\", \"admin-user:\"};\n for (int i = 0; i < lines.size(); i++) {\n final String line = lines.get(i);\n if (! line.startsWith(expectedHeaders[i])) {\n throw new FossilException(\"Can not parse 'new' output, line #\" + (i + 1) + \": '\" + result + \"'\");\n }\n }\n myProjectId = new String(lines.get(0).substring(expectedHeaders[0].length() + 1));\n myServerId = new String(lines.get(1).substring(expectedHeaders[1].length()) + 1);\n final String userPswd = lines.get(2).substring(expectedHeaders[2].length()).trim();\n final int idxSpace = userPswd.indexOf(' ');\n if (idxSpace == -1) {\n throw new FossilException(\"Can not parse 'new' output, user-password area: '\" + result + \"'\");\n }\n myUserName = new String(userPswd.substring(0, idxSpace));\n final int quot1 = userPswd.indexOf('\"', idxSpace + 1);\n int quot2 = -1;\n if (quot1 >= 0) {\n quot2 = userPswd.indexOf('\"', quot1 + 1);\n }\n if (quot1 == -1 || quot2 == -1) {\n throw new FossilException(\"Can not parse 'new' output, user-password area: '\" + result + \"'\");\n }\n myPassword = userPswd.substring(quot1 + 1 , quot2);\n }",
"interface WithRepoUrl {\n /**\n * Specifies the repoUrl property: The repo url of the source control..\n *\n * @param repoUrl The repo url of the source control.\n * @return the next definition stage.\n */\n WithCreate withRepoUrl(String repoUrl);\n }",
"public Repository createRepository(String fileServerName, \r\n \t\tString displayName,\r\n \t\tString folderSystemName, \r\n \t\tString repoName, \r\n \t\tString fileDatabasePath,\r\n \t\tString defaultFolderDispalyName) throws LocationAlreadyExistsException\r\n {\r\n\r\n\t\t// create the file server\r\n\t\tfileServer = fileServerService.createFileServer(fileServerName);\r\n\t\tfileServer.setId(1l);\r\n\r\n\t\t// create the file database\r\n\t\tDefaultFileDatabaseInfo fileDatabaseInfo = new DefaultFileDatabaseInfo(fileServer.getId(),\r\n\t\t\t\tdisplayName, folderSystemName, fileDatabasePath, defaultFolderDispalyName, \"uniqueFolderName\");\r\n\t\tFileDatabase fileDatabase = fileServerService.createFileDatabase(fileDatabaseInfo);\r\n\t\t\r\n\t\t// create the repository\r\n\t\trepository = repositoryService.createRepository(repoName, fileDatabase);\r\n\t\trepository.setId(1l);\r\n\t\t\r\n\t\treturn repository;\r\n }",
"GitRemote(String aName) { _name = aName; }",
"@Test\n\tpublic void createRepo() throws NoFilepatternException, GitAPIException, IOException {\n\t\t\n\t\t\n\t\tFile baseDir = Files.createTempDir(\"gitrepo\");\n\t\tFile gitDir = new File(baseDir, \".git\");\n\n\t\tRepository repo = new FileRepositoryBuilder().setGitDir(gitDir).setWorkTree(baseDir).build();\n\t\trepo.create();\n\n\t\tGit git = new Git(repo);\n\n\t\tFiles.write(\"Nothing\", new File(baseDir,\"my.sample\"));\n\t\t\n\t\tgit.add().addFilepattern(\"*.sample\").call();\n\t\tgit.commit().setMessage(\"first commit\").call();\n\t\t\n\t\tgit.branchCreate().setName(\"new-branch\").call();\n\t\tgit.checkout().setName(\"new-branch\").call();\n\t\t\n\t\tList<Ref> branches = git.branchList().call();\n\t\t\n\t\tSystem.out.println(\"Branches: \"+branches);\n\t\t\n\t\tAssert.assertTrue(\"clean up\",Files.deleteAll(baseDir));\n\t}",
"@Test\n public void testOnlyOneRepoPerName() throws IOException, DuplicateRepoNameException, RepositoryNotFoundException {\n ConfigDatabase.instance().addRepo(testRepo1);\n assert testRepo1.getName().equals(testRepo1a.getName()); // conflicting names\n try {\n ConfigDatabase.instance().addRepo(testRepo1a);\n fail(\"An exception should have been raised because a repo with this name already exists\");\n } catch (DuplicateRepoNameException dke) {\n /* This should happen - fail otherwise */\n }\n assertEquals(testRepo1.getCRSID(), ConfigDatabase.instance().getRepoByName(\"test-repo-name1\").getCRSID());\n }",
"private static ArtifactRepository createLocalRepository( Embedder embedder, Settings settings,\n CommandLine commandLine )\n throws ComponentLookupException\n {\n ArtifactRepositoryLayout repositoryLayout =\n (ArtifactRepositoryLayout) embedder.lookup( ArtifactRepositoryLayout.ROLE, \"default\" );\n\n ArtifactRepositoryFactory artifactRepositoryFactory =\n (ArtifactRepositoryFactory) embedder.lookup( ArtifactRepositoryFactory.ROLE );\n\n String url = settings.getLocalRepository();\n\n if ( !url.startsWith( \"file:\" ) )\n {\n url = \"file://\" + url;\n }\n\n ArtifactRepository localRepository = new DefaultArtifactRepository( \"local\", url, repositoryLayout );\n\n boolean snapshotPolicySet = false;\n\n if ( commandLine.hasOption( CLIManager.OFFLINE ) )\n {\n settings.setOffline( true );\n\n snapshotPolicySet = true;\n }\n\n if ( !snapshotPolicySet && commandLine.hasOption( CLIManager.UPDATE_SNAPSHOTS ) )\n {\n artifactRepositoryFactory.setGlobalUpdatePolicy( ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS );\n }\n\n if ( commandLine.hasOption( CLIManager.CHECKSUM_FAILURE_POLICY ) )\n {\n System.out.println( \"+ Enabling strict checksum verification on all artifact downloads.\" );\n\n artifactRepositoryFactory.setGlobalChecksumPolicy( ArtifactRepositoryPolicy.CHECKSUM_POLICY_FAIL );\n }\n else if ( commandLine.hasOption( CLIManager.CHECKSUM_WARNING_POLICY ) )\n {\n System.out.println( \"+ Disabling strict checksum verification on all artifact downloads.\" );\n\n artifactRepositoryFactory.setGlobalChecksumPolicy( ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN );\n }\n\n return localRepository;\n }",
"private void pull(FederationModel registration) throws Exception {\n\t\tMap<String, RepositoryModel> repositories = FederationUtils.getRepositories(registration,\n\t\t\t\ttrue);\n\t\tString registrationFolder = registration.folder.toLowerCase().trim();\n\t\t// confirm valid characters in server alias\n\t\tCharacter c = StringUtils.findInvalidCharacter(registrationFolder);\n\t\tif (c != null) {\n\t\t\tlogger.error(MessageFormat\n\t\t\t\t\t.format(\"Illegal character ''{0}'' in folder name ''{1}'' of federation registration {2}!\",\n\t\t\t\t\t\t\tc, registrationFolder, registration.name));\n\t\t\treturn;\n\t\t}\n\t\tFile repositoriesFolder = gitblit.getRepositoriesFolder();\n\t\tFile registrationFolderFile = new File(repositoriesFolder, registrationFolder);\n\t\tregistrationFolderFile.mkdirs();\n\n\t\t// Clone/Pull the repository\n\t\tfor (Map.Entry<String, RepositoryModel> entry : repositories.entrySet()) {\n\t\t\tString cloneUrl = entry.getKey();\n\t\t\tRepositoryModel repository = entry.getValue();\n\t\t\tif (!repository.hasCommits) {\n\t\t\t\tlogger.warn(MessageFormat.format(\n\t\t\t\t\t\t\"Skipping federated repository {0} from {1} @ {2}. Repository is EMPTY.\",\n\t\t\t\t\t\trepository.name, registration.name, registration.url));\n\t\t\t\tregistration.updateStatus(repository, FederationPullStatus.SKIPPED);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Determine local repository name\n\t\t\tString repositoryName;\n\t\t\tif (StringUtils.isEmpty(registrationFolder)) {\n\t\t\t\trepositoryName = repository.name;\n\t\t\t} else {\n\t\t\t\trepositoryName = registrationFolder + \"/\" + repository.name;\n\t\t\t}\n\n\t\t\tif (registration.bare) {\n\t\t\t\t// bare repository, ensure .git suffix\n\t\t\t\tif (!repositoryName.toLowerCase().endsWith(DOT_GIT_EXT)) {\n\t\t\t\t\trepositoryName += DOT_GIT_EXT;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// normal repository, strip .git suffix\n\t\t\t\tif (repositoryName.toLowerCase().endsWith(DOT_GIT_EXT)) {\n\t\t\t\t\trepositoryName = repositoryName.substring(0,\n\t\t\t\t\t\t\trepositoryName.indexOf(DOT_GIT_EXT));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// confirm that the origin of any pre-existing repository matches\n\t\t\t// the clone url\n\t\t\tString fetchHead = null;\n\t\t\tRepository existingRepository = gitblit.getRepository(repositoryName);\n\n\t\t\tif (existingRepository == null && gitblit.isCollectingGarbage(repositoryName)) {\n\t\t\t\tlogger.warn(MessageFormat.format(\"Skipping local repository {0}, busy collecting garbage\", repositoryName));\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (existingRepository != null) {\n\t\t\t\tStoredConfig config = existingRepository.getConfig();\n\t\t\t\tconfig.load();\n\t\t\t\tString origin = config.getString(\"remote\", \"origin\", \"url\");\n\t\t\t\tRevCommit commit = JGitUtils.getCommit(existingRepository,\n\t\t\t\t\t\torg.eclipse.jgit.lib.Constants.FETCH_HEAD);\n\t\t\t\tif (commit != null) {\n\t\t\t\t\tfetchHead = commit.getName();\n\t\t\t\t}\n\t\t\t\texistingRepository.close();\n\t\t\t\tif (!origin.startsWith(registration.url)) {\n\t\t\t\t\tlogger.warn(MessageFormat\n\t\t\t\t\t\t\t.format(\"Skipping federated repository {0} from {1} @ {2}. Origin does not match, consider EXCLUDING.\",\n\t\t\t\t\t\t\t\t\trepository.name, registration.name, registration.url));\n\t\t\t\t\tregistration.updateStatus(repository, FederationPullStatus.SKIPPED);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// clone/pull this repository\n\t\t\tCredentialsProvider credentials = new UsernamePasswordCredentialsProvider(\n\t\t\t\t\tConstants.FEDERATION_USER, registration.token);\n\t\t\tlogger.info(MessageFormat.format(\"Pulling federated repository {0} from {1} @ {2}\",\n\t\t\t\t\trepository.name, registration.name, registration.url));\n\n\t\t\tCloneResult result = JGitUtils.cloneRepository(registrationFolderFile, repository.name,\n\t\t\t\t\tcloneUrl, registration.bare, credentials);\n\t\t\tRepository r = gitblit.getRepository(repositoryName);\n\t\t\tRepositoryModel rm = gitblit.getRepositoryModel(repositoryName);\n\t\t\trepository.isFrozen = registration.mirror;\n\t\t\tif (result.createdRepository) {\n\t\t\t\t// default local settings\n\t\t\t\trepository.federationStrategy = FederationStrategy.EXCLUDE;\n\t\t\t\trepository.isFrozen = registration.mirror;\n\t\t\t\trepository.showRemoteBranches = !registration.mirror;\n\t\t\t\tlogger.info(MessageFormat.format(\" cloning {0}\", repository.name));\n\t\t\t\tregistration.updateStatus(repository, FederationPullStatus.MIRRORED);\n\t\t\t} else {\n\t\t\t\t// fetch and update\n\t\t\t\tboolean fetched = false;\n\t\t\t\tRevCommit commit = JGitUtils.getCommit(r, org.eclipse.jgit.lib.Constants.FETCH_HEAD);\n\t\t\t\tString newFetchHead = commit.getName();\n\t\t\t\tfetched = fetchHead == null || !fetchHead.equals(newFetchHead);\n\n\t\t\t\tif (registration.mirror) {\n\t\t\t\t\t// mirror\n\t\t\t\t\tif (fetched) {\n\t\t\t\t\t\t// update local branches to match the remote tracking branches\n\t\t\t\t\t\tfor (RefModel ref : JGitUtils.getRemoteBranches(r, false, -1)) {\n\t\t\t\t\t\t\tif (ref.displayName.startsWith(\"origin/\")) {\n\t\t\t\t\t\t\t\tString branch = org.eclipse.jgit.lib.Constants.R_HEADS\n\t\t\t\t\t\t\t\t\t\t+ ref.displayName.substring(ref.displayName.indexOf('/') + 1);\n\t\t\t\t\t\t\t\tString hash = ref.getReferencedObjectId().getName();\n\n\t\t\t\t\t\t\t\tJGitUtils.setBranchRef(r, branch, hash);\n\t\t\t\t\t\t\t\tlogger.info(MessageFormat.format(\" resetting {0} of {1} to {2}\", branch,\n\t\t\t\t\t\t\t\t\t\trepository.name, hash));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tString newHead;\n\t\t\t\t\t\tif (StringUtils.isEmpty(repository.HEAD)) {\n\t\t\t\t\t\t\tnewHead = newFetchHead;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnewHead = repository.HEAD;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tJGitUtils.setHEADtoRef(r, newHead);\n\t\t\t\t\t\tlogger.info(MessageFormat.format(\" resetting HEAD of {0} to {1}\",\n\t\t\t\t\t\t\t\trepository.name, newHead));\n\t\t\t\t\t\tregistration.updateStatus(repository, FederationPullStatus.MIRRORED);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// indicate no commits pulled\n\t\t\t\t\t\tregistration.updateStatus(repository, FederationPullStatus.NOCHANGE);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// non-mirror\n\t\t\t\t\tif (fetched) {\n\t\t\t\t\t\t// indicate commits pulled to origin/master\n\t\t\t\t\t\tregistration.updateStatus(repository, FederationPullStatus.PULLED);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// indicate no commits pulled\n\t\t\t\t\t\tregistration.updateStatus(repository, FederationPullStatus.NOCHANGE);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// preserve local settings\n\t\t\t\trepository.isFrozen = rm.isFrozen;\n\t\t\t\trepository.federationStrategy = rm.federationStrategy;\n\n\t\t\t\t// merge federation sets\n\t\t\t\tSet<String> federationSets = new HashSet<String>();\n\t\t\t\tif (rm.federationSets != null) {\n\t\t\t\t\tfederationSets.addAll(rm.federationSets);\n\t\t\t\t}\n\t\t\t\tif (repository.federationSets != null) {\n\t\t\t\t\tfederationSets.addAll(repository.federationSets);\n\t\t\t\t}\n\t\t\t\trepository.federationSets = new ArrayList<String>(federationSets);\n\n\t\t\t\t// merge indexed branches\n\t\t\t\tSet<String> indexedBranches = new HashSet<String>();\n\t\t\t\tif (rm.indexedBranches != null) {\n\t\t\t\t\tindexedBranches.addAll(rm.indexedBranches);\n\t\t\t\t}\n\t\t\t\tif (repository.indexedBranches != null) {\n\t\t\t\t\tindexedBranches.addAll(repository.indexedBranches);\n\t\t\t\t}\n\t\t\t\trepository.indexedBranches = new ArrayList<String>(indexedBranches);\n\n\t\t\t}\n\t\t\t// only repositories that are actually _cloned_ from the origin\n\t\t\t// Gitblit repository are marked as federated. If the origin\n\t\t\t// is from somewhere else, these repositories are not considered\n\t\t\t// \"federated\" repositories.\n\t\t\trepository.isFederated = cloneUrl.startsWith(registration.url);\n\n\t\t\tgitblit.updateConfiguration(r, repository);\n\t\t\tr.close();\n\t\t}\n\n\t\tIUserService userService = null;\n\n\t\ttry {\n\t\t\t// Pull USERS\n\t\t\t// TeamModels are automatically pulled because they are contained\n\t\t\t// within the UserModel. The UserService creates unknown teams\n\t\t\t// and updates existing teams.\n\t\t\tCollection<UserModel> users = FederationUtils.getUsers(registration);\n\t\t\tif (users != null && users.size() > 0) {\n\t\t\t\tFile realmFile = new File(registrationFolderFile, registration.name + \"_users.conf\");\n\t\t\t\trealmFile.delete();\n\t\t\t\tuserService = new ConfigUserService(realmFile);\n\t\t\t\tfor (UserModel user : users) {\n\t\t\t\t\tuserService.updateUserModel(user.username, user);\n\n\t\t\t\t\t// merge the origin permissions and origin accounts into\n\t\t\t\t\t// the user accounts of this Gitblit instance\n\t\t\t\t\tif (registration.mergeAccounts) {\n\t\t\t\t\t\t// reparent all repository permissions if the local\n\t\t\t\t\t\t// repositories are stored within subfolders\n\t\t\t\t\t\tif (!StringUtils.isEmpty(registrationFolder)) {\n\t\t\t\t\t\t\tif (user.permissions != null) {\n\t\t\t\t\t\t\t\t// pulling from >= 1.2 version\n\t\t\t\t\t\t\t\tMap<String, AccessPermission> copy = new HashMap<String, AccessPermission>(user.permissions);\n\t\t\t\t\t\t\t\tuser.permissions.clear();\n\t\t\t\t\t\t\t\tfor (Map.Entry<String, AccessPermission> entry : copy.entrySet()) {\n\t\t\t\t\t\t\t\t\tuser.setRepositoryPermission(registrationFolder + \"/\" + entry.getKey(), entry.getValue());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// pulling from <= 1.1 version\n\t\t\t\t\t\t\t\tList<String> permissions = new ArrayList<String>(user.repositories);\n\t\t\t\t\t\t\t\tuser.repositories.clear();\n\t\t\t\t\t\t\t\tfor (String permission : permissions) {\n\t\t\t\t\t\t\t\t\tuser.addRepositoryPermission(registrationFolder + \"/\" + permission);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// insert new user or update local user\n\t\t\t\t\t\tUserModel localUser = gitblit.getUserModel(user.username);\n\t\t\t\t\t\tif (localUser == null) {\n\t\t\t\t\t\t\t// create new local user\n\t\t\t\t\t\t\tgitblit.addUser(user);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// update repository permissions of local user\n\t\t\t\t\t\t\tif (user.permissions != null) {\n\t\t\t\t\t\t\t\t// pulling from >= 1.2 version\n\t\t\t\t\t\t\t\tMap<String, AccessPermission> copy = new HashMap<String, AccessPermission>(user.permissions);\n\t\t\t\t\t\t\t\tfor (Map.Entry<String, AccessPermission> entry : copy.entrySet()) {\n\t\t\t\t\t\t\t\t\tlocalUser.setRepositoryPermission(entry.getKey(), entry.getValue());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// pulling from <= 1.1 version\n\t\t\t\t\t\t\t\tfor (String repository : user.repositories) {\n\t\t\t\t\t\t\t\t\tlocalUser.addRepositoryPermission(repository);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlocalUser.password = user.password;\n\t\t\t\t\t\t\tlocalUser.canAdmin = user.canAdmin;\n\t\t\t\t\t\t\tgitblit.reviseUser(localUser.username, localUser);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (String teamname : gitblit.getAllTeamNames()) {\n\t\t\t\t\t\t\tTeamModel team = gitblit.getTeamModel(teamname);\n\t\t\t\t\t\t\tif (user.isTeamMember(teamname) && !team.hasUser(user.username)) {\n\t\t\t\t\t\t\t\t// new team member\n\t\t\t\t\t\t\t\tteam.addUser(user.username);\n\t\t\t\t\t\t\t\tgitblit.updateTeamModel(teamname, team);\n\t\t\t\t\t\t\t} else if (!user.isTeamMember(teamname) && team.hasUser(user.username)) {\n\t\t\t\t\t\t\t\t// remove team member\n\t\t\t\t\t\t\t\tteam.removeUser(user.username);\n\t\t\t\t\t\t\t\tgitblit.updateTeamModel(teamname, team);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// update team repositories\n\t\t\t\t\t\t\tTeamModel remoteTeam = user.getTeam(teamname);\n\t\t\t\t\t\t\tif (remoteTeam != null) {\n\t\t\t\t\t\t\t\tif (remoteTeam.permissions != null) {\n\t\t\t\t\t\t\t\t\t// pulling from >= 1.2\n\t\t\t\t\t\t\t\t\tfor (Map.Entry<String, AccessPermission> entry : remoteTeam.permissions.entrySet()){\n\t\t\t\t\t\t\t\t\t\tteam.setRepositoryPermission(entry.getKey(), entry.getValue());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tgitblit.updateTeamModel(teamname, team);\n\t\t\t\t\t\t\t\t} else if (!ArrayUtils.isEmpty(remoteTeam.repositories)) {\n\t\t\t\t\t\t\t\t\t// pulling from <= 1.1\n\t\t\t\t\t\t\t\t\tteam.addRepositoryPermissions(remoteTeam.repositories);\n\t\t\t\t\t\t\t\t\tgitblit.updateTeamModel(teamname, team);\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} catch (ForbiddenException e) {\n\t\t\t// ignore forbidden exceptions\n\t\t} catch (IOException e) {\n\t\t\tlogger.warn(MessageFormat.format(\n\t\t\t\t\t\"Failed to retrieve USERS from federated gitblit ({0} @ {1})\",\n\t\t\t\t\tregistration.name, registration.url), e);\n\t\t}\n\n\t\ttry {\n\t\t\t// Pull TEAMS\n\t\t\t// We explicitly pull these even though they are embedded in\n\t\t\t// UserModels because it is possible to use teams to specify\n\t\t\t// mailing lists or push scripts without specifying users.\n\t\t\tif (userService != null) {\n\t\t\t\tCollection<TeamModel> teams = FederationUtils.getTeams(registration);\n\t\t\t\tif (teams != null && teams.size() > 0) {\n\t\t\t\t\tfor (TeamModel team : teams) {\n\t\t\t\t\t\tuserService.updateTeamModel(team);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ForbiddenException e) {\n\t\t\t// ignore forbidden exceptions\n\t\t} catch (IOException e) {\n\t\t\tlogger.warn(MessageFormat.format(\n\t\t\t\t\t\"Failed to retrieve TEAMS from federated gitblit ({0} @ {1})\",\n\t\t\t\t\tregistration.name, registration.url), e);\n\t\t}\n\n\t\ttry {\n\t\t\t// Pull SETTINGS\n\t\t\tMap<String, String> settings = FederationUtils.getSettings(registration);\n\t\t\tif (settings != null && settings.size() > 0) {\n\t\t\t\tProperties properties = new Properties();\n\t\t\t\tproperties.putAll(settings);\n\t\t\t\tFileOutputStream os = new FileOutputStream(new File(registrationFolderFile,\n\t\t\t\t\t\tregistration.name + \"_\" + Constants.PROPERTIES_FILE));\n\t\t\t\tproperties.store(os, null);\n\t\t\t\tos.close();\n\t\t\t}\n\t\t} catch (ForbiddenException e) {\n\t\t\t// ignore forbidden exceptions\n\t\t} catch (IOException e) {\n\t\t\tlogger.warn(MessageFormat.format(\n\t\t\t\t\t\"Failed to retrieve SETTINGS from federated gitblit ({0} @ {1})\",\n\t\t\t\t\tregistration.name, registration.url), e);\n\t\t}\n\n\t\ttry {\n\t\t\t// Pull SCRIPTS\n\t\t\tMap<String, String> scripts = FederationUtils.getScripts(registration);\n\t\t\tif (scripts != null && scripts.size() > 0) {\n\t\t\t\tfor (Map.Entry<String, String> script : scripts.entrySet()) {\n\t\t\t\t\tString scriptName = script.getKey();\n\t\t\t\t\tif (scriptName.endsWith(\".groovy\")) {\n\t\t\t\t\t\tscriptName = scriptName.substring(0, scriptName.indexOf(\".groovy\"));\n\t\t\t\t\t}\n\t\t\t\t\tFile file = new File(registrationFolderFile, registration.name + \"_\"\n\t\t\t\t\t\t\t+ scriptName + \".groovy\");\n\t\t\t\t\tFileUtils.writeContent(file, script.getValue());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ForbiddenException e) {\n\t\t\t// ignore forbidden exceptions\n\t\t} catch (IOException e) {\n\t\t\tlogger.warn(MessageFormat.format(\n\t\t\t\t\t\"Failed to retrieve SCRIPTS from federated gitblit ({0} @ {1})\",\n\t\t\t\t\tregistration.name, registration.url), e);\n\t\t}\n\t}",
"private void onNewRepo() {\n RepositoryImpl repoImpl = BugtrackingUtil.createRepository();\n if(repoImpl == null) {\n return;\n }\n Repository repo = repoImpl.getRepository();\n repositoryComboBox.addItem(repo);\n repositoryComboBox.setSelectedItem(repo);\n }",
"public void buildRepository(String repositoryIdentifier, boolean updateServerInfo) {\n ServerRepository serverRepository = serverRepositories.get(repositoryIdentifier);\n buildRepository(serverRepository, updateServerInfo);\n }",
"SourceBuilder createRepository();",
"public CompletableFuture<CreateRepositoryResponse> createRepository(CreateRepositoryRequest request)\n\t\t\tthrows IOException {\n\t\treturn this.transport.performRequestAsync(request, CreateRepositoryRequest.ENDPOINT, this.requestOptions);\n\t}",
"@TaskAction\n public void configureRepository() throws IOException {\n GitHub github = GitHub.connect(null, getGithubToken());\n String user = github.getMyself().getLogin();\n GHRepository repository = null;\n\n try {\n repository = github.getRepository(user + \"/\" + getRepositoryName());\n }\n catch (FileNotFoundException e) {\n GHCreateRepositoryBuilder repositoryCreator = github.createRepository(getRepositoryName());\n repository = repositoryCreator.create();\n }\n\n String description = getRepositoryDescription();\n\n if (description != null && !description.equals(repository.getDescription())) {\n repository.setDescription(description);\n }\n }",
"protected RemoteRepository createAntRemoteRepository( org.apache.maven.model.Repository pomRepository )\n {\n \n RemoteRepository r = new RemoteRepository();\n r.setUrl( pomRepository.getUrl() );\n r.setSnapshotPolicy( pomRepository.getSnapshotPolicy() );\n r.setLayout( pomRepository.getLayout() );\n \n Server server = getSettings().getServer( pomRepository.getId() );\n if ( server != null )\n {\n r.addAuthentication( new Authentication( server ) );\n }\n \n org.apache.maven.settings.Proxy proxy = getSettings().getActiveProxy();\n if ( proxy != null )\n {\n r.addProxy( new Proxy( proxy ) );\n }\n \n Mirror mirror = getSettings().getMirrorOf( pomRepository.getId() );\n r.setUrl( mirror.getUrl() );\n \n return r;\n }",
"void push(RemoteConfig repository, String revspec) throws GitException, InterruptedException;",
"public void addRepository(final Repository repository,\r\n\t\t\t\t\t\t\t String repositoryName) {\r\n\t\t\r\n\t\t\r\n\t\trepositories.put(repository.getId(), repository);\t\t\r\n\t}",
"@Test\n public void testStoringRepos() throws IOException, DuplicateRepoNameException, RepositoryNotFoundException {\n ConfigDatabase.instance().addRepo(testRepo1);\n ConfigDatabase.instance().addRepo(testRepo2);\n assertEquals(testRepo1.getCRSID(),\n ConfigDatabase.instance().getRepoByName(\"test-repo-name1\").getCRSID());\n assertEquals(testRepo2.getCRSID(),\n ConfigDatabase.instance().getRepoByName(\"test-repo-name2\").getCRSID());\n assertNotEquals(ConfigDatabase.instance().getRepoByName(\"test-repo-name1\").getCRSID(),\n ConfigDatabase.instance().getRepoByName(\"test-repo-name2\").getCRSID());\n }",
"private String getRemoteRepositoryName( URL url ) throws IndyDataException\n {\n final String name = repoCreator.formatId( url.getHost(), getPort( url ), 0, null, StoreType.remote );\n\n logger.debug( \"Looking for remote repo starts with name: {}\", name );\n\n AbstractProxyRepositoryCreator abstractProxyRepositoryCreator = null;\n if ( repoCreator instanceof AbstractProxyRepositoryCreator )\n {\n abstractProxyRepositoryCreator = (AbstractProxyRepositoryCreator) repoCreator;\n }\n\n if ( abstractProxyRepositoryCreator == null )\n {\n return name;\n }\n\n Predicate<ArtifactStore> filter = abstractProxyRepositoryCreator.getNameFilter( name );\n List<String> l = storeManager.query()\n .packageType( GENERIC_PKG_KEY )\n .storeType( RemoteRepository.class )\n .stream( filter )\n .map( repository -> repository.getName() )\n .collect( Collectors.toList() );\n\n if ( l.isEmpty() )\n {\n return name;\n }\n return abstractProxyRepositoryCreator.getNextName( l );\n }",
"public void createPullReq(GHRepository origRepo,\n String branch, GHRepository forkRepo,\n PullRequestInfo pullRequestInfo) throws InterruptedException, IOException {\n while (true) {\n int pullRequestExitCode = gitHubUtil.createPullReq(origRepo,\n branch, forkRepo, pullRequestInfo.getTitle(), pullRequestInfo.getBody());\n if (pullRequestExitCode == 0) {\n return;\n } else if (pullRequestExitCode == 1) {\n gitHubUtil.safeDeleteRepo(forkRepo);\n return;\n }\n }\n }",
"public void addRemote(final String remoteName, final URIish uri, final String branchName, \n \t final String tagName,\n \t\t\t final boolean allSelected, final Collection<Ref> selectedBranches) \n \tthrows URISyntaxException, IOException {\n \t\tValidate.isTrue(branchName != null || tagName != null, \n \t\t \"Either branch name or tag name must not be null! branchName={0} tagName={1}\", branchName, tagName);\n \t\t\n \t\t// add remote configuration\n \t\tfinal RemoteConfig rc = new RemoteConfig(db.getConfig(), remoteName);\n \t\trc.addURI(uri);\n \n \t\tfinal String dst = Constants.R_REMOTES + rc.getName();\n \t\tRefSpec wcrs = new RefSpec();\n \t\twcrs = wcrs.setForceUpdate(true);\n \t\twcrs = wcrs.setSourceDestination(Constants.R_HEADS + \"*\", dst + \"/*\");\n \n \t\tif (allSelected) {\n \t\t\trc.addFetchRefSpec(wcrs);\n \t\t} else {\n \t\t\tfor (final Ref ref : selectedBranches)\n \t\t\t\tif (wcrs.matchSource(ref))\n \t\t\t\t\trc.addFetchRefSpec(wcrs.expandFromSource(ref));\n \t\t}\n \n \t\trc.update(db.getConfig());\n \t\tdb.getConfig().save();\n \n \t\t// setup the default remote branch for branchName\n \t\tdb.getConfig().setString(RepositoryConfig.BRANCH_SECTION,\n \t\t\t\tbranchName, \"remote\", remoteName);\n \t\n \t\tif (branchName != null) {\n \t\tdb.getConfig().setString(RepositoryConfig.BRANCH_SECTION,\n \t\t\t\tbranchName, \"merge\", Constants.R_HEADS + branchName);\n \t\t}\n \t\t\n \t\tif (tagName != null) {\n db.getConfig().setString(RepositoryConfig.BRANCH_SECTION,\n branchName, \"merge\", Constants.R_TAGS + branchName);\n \t\t}\n \t\t\n \t\tdb.getConfig().save();\n \t}",
"public void addMavenRepository(String name, String url) {\n repositories.put(name, url);\n }",
"public static RepoInfo repoInfo(String fileName, Project project) {\n String fileRel = \"\";\n String remoteURL = \"\";\n String branch = \"\";\n try{\n // Determine repository root directory.\n String fileDir = fileName.substring(0, fileName.lastIndexOf(\"/\"));\n String repoRoot = gitRootDir(fileDir);\n\n // Determine file path, relative to repository root.\n fileRel = fileName.substring(repoRoot.length()+1);\n remoteURL = configuredGitRemoteURL(repoRoot);\n branch = SourcegraphUtil.setDefaultBranch(project)!=null ? SourcegraphUtil.setDefaultBranch(project) : gitBranch(repoRoot);\n\n // If on a branch that does not exist on the remote and no defaultBranch is configured\n // use \"master\" instead.\n // This allows users to check out a branch that does not exist in origin remote by setting defaultBranch\n if (!isRemoteBranch(branch, repoRoot) && SourcegraphUtil.setDefaultBranch(project)==null) {\n branch = \"master\";\n }\n\n // replace remoteURL if config option is not null\n String r = SourcegraphUtil.setRemoteUrlReplacements(project);\n if(r!=null) {\n String[] replacements = r.trim().split(\"\\\\s*,\\\\s*\");\n // Check if the entered values are pairs\n for (int i = 0; i < replacements.length && replacements.length % 2 == 0; i += 2) {\n remoteURL = remoteURL.replace(replacements[i], replacements[i+1]);\n }\n }\n } catch (Exception err) {\n Logger.getInstance(SourcegraphUtil.class).info(err);\n err.printStackTrace();\n }\n return new RepoInfo(fileRel, remoteURL, branch);\n }",
"public static void createTestRepos(Path sourceDirectory) throws IOException {\n Path remoteRoot = Paths.get(\"/tmp/remotes/\");\n Files.createDirectories(remoteRoot);\n\n Files.list(sourceDirectory.resolve(\"configs/containers\"))\n .filter( file -> file.getFileName().toString().endsWith(\".cfg\") )\n .forEach( path -> {\n String containerName = path.getFileName().toString();\n Path containerRepoPath = remoteRoot.resolve(containerName.substring(0, containerName.lastIndexOf('.')));\n\n if (!Files.isDirectory(containerRepoPath.resolve(\".git\"))) {\n try {\n Files.createDirectories(containerRepoPath);\n } catch (IOException e) {\n throw new IllegalArgumentException(e);\n }\n try (Git ignored = initRepo(containerRepoPath)) {\n } catch (GitAPIException e) {\n throw new IllegalArgumentException(e);\n }\n }\n }\n );\n }",
"public void setRepositoryName(@Nullable String name) {\n this.repositoryName = name;\n }",
"public abstract AbstractTask createTask(String repositoryUrl, String id, String summary);",
"RepositoryType createRepositoryType();",
"public Remote(String name, String directory) throws IOException {\n _name = name;\n _repo = new File(directory);\n _cwd = Utils.join(_repo, \"..\");\n _objects = Utils.join(_repo, \"objects\");\n _branch = Utils.join(_repo, \"branch\");\n _stagingArea = Utils.join(_repo, \"stage\");\n _currBranch = Utils.join(_repo, \"current-branch\");\n saveRemote();\n }",
"@Test\n public void testUpdateRepo() throws IOException, DuplicateRepoNameException, RepositoryNotFoundException {\n ConfigDatabase.instance().addRepo(testRepo1);\n ConfigDatabase.instance().updateRepo(testRepo1);\n }",
"WithCreate withBranch(String branch);",
"void setRemoteUrl(String name, String url, String GIT_DIR) throws GitException, InterruptedException;",
"@Override\n public SvnRepository createRepository(SvnRepository svnRepository) {\n try {\n\n // if repository root path not exists, mkdir\n File repoRoot = new File(svnRepository.getRootPathLocal());\n if (!repoRoot.exists()) {\n FileUtils.forceMkdir(repoRoot);\n }\n\n // execute svnadmin create command\n String repoName = svnRepository.getName();\n String repoPathLocal = svnRepository.getFullPathLocal();\n String command = \"svnadmin create \\\"\" + StringUtils.fixFileSeparatorChar(repoPathLocal) + \"\\\"\";\n\n if (svnRepository.getRepositoryType() != null) {\n command += \" --fs-type \" + svnRepository.getRepositoryType().getCode();\n }\n\n logger.info(\"Create repository: \" + repoName);\n CommandUtils.executeAsync(command);\n\n // backup svn repository settings\n backupSettings(repoPathLocal);\n\n // svn admin\n SvnUser svnAdmin = new SvnUser(\"marssvn\", StringUtils.createRandomPassword(16));\n svnRepository.setAdminUser(svnAdmin);\n logger.debug(\"password: \" + svnAdmin.getPassword());\n\n // write svnserve.conf\n writeSvnserveConf(svnRepository);\n\n svnRepository.setSvnProtocol(ESvnProtocol.SVN);\n return svnRepository;\n\n } catch (IOException e) {\n throw new SvnApiException(\"EA0001\", e.getMessage());\n }\n }",
"public HawtDBAggregationRepository(String repositoryName) {\n StringHelper.notEmpty(repositoryName, \"repositoryName\");\n this.repositoryName = repositoryName;\n }",
"public static void repoClone() throws IOException, InvalidRemoteException, TransportException, GitAPIException {\n\t\tFile localPath = new File(\"testRuby\");\n\t\tboolean directoryExist = localPath.exists();\n\t\tlocalPath.delete();\n\t\t// then clone\n\t\tSystem.out.println(\"Cloning from \" + REMOTE_URL + \" to \" + localPath);\n\t\tFileRepositoryBuilder builder = new FileRepositoryBuilder();\n\t\tRepository repository = builder.setWorkTree(localPath).readEnvironment().build();\n\t\tGit git = new Git(repository);\n\t\tif (!directoryExist) {\n\t\t\ttry (Git result = git.cloneRepository().setURI(REMOTE_URL).setDirectory(localPath).call()) {\n\t\t\t\t// Note: the call() returns an opened repository already which\n\t\t\t\t// needs to be closed to avoid file handle leaks!\n\t\t\t\tSystem.out.println(\"Having repository: \" + result.getRepository().getDirectory());\n\t\t\t}\n\t\t} else {\n\t\t\tPullResult pullresult=git.pull().call();\n\t\t\t// Note: the call() returns an opened repository already which needs\n\t\t\t// to be closed to avoid file handle leaks!\n\t\t\tSystem.out.println(\"pulled repository: \" + pullresult.isSuccessful());\n\n\t\t}\n\t}",
"@Override\n ManagedChannel createChannel(List<ServerInfo> servers) {\n checkArgument(!servers.isEmpty(), \"No management server provided.\");\n XdsLogger logger = XdsLogger.withPrefix(\"xds-client-channel-factory\");\n ServerInfo serverInfo = servers.get(0);\n String serverUri = serverInfo.getServerUri();\n logger.log(XdsLogLevel.INFO, \"Creating channel to {0}\", serverUri);\n List<ChannelCreds> channelCredsList = serverInfo.getChannelCredentials();\n ManagedChannelBuilder<?> channelBuilder = null;\n // Use the first supported channel credentials configuration.\n // Currently, only \"google_default\" is supported.\n for (ChannelCreds creds : channelCredsList) {\n if (creds.getType().equals(\"google_default\")) {\n logger.log(XdsLogLevel.INFO, \"Using channel credentials: google_default\");\n channelBuilder = GoogleDefaultChannelBuilder.forTarget(serverUri);\n break;\n }\n }\n if (channelBuilder == null) {\n logger.log(XdsLogLevel.INFO, \"Using default channel credentials\");\n channelBuilder = ManagedChannelBuilder.forTarget(serverUri);\n }\n\n return channelBuilder\n .keepAliveTime(5, TimeUnit.MINUTES)\n .build();\n }",
"public static void updateRepositoryList() {\n \t\tassetLoader.removeAllRepositories();\n \t\tfor (String repo : MapTool.getCampaign().getRemoteRepositoryList()) {\n \t\t\tassetLoader.addRepository(repo);\n \t\t}\n \t}",
"public static void createRepositorySubset(Repository repo) {\n RepoFile newRoot = RepoFile.make(AbstractRepository.OUTPUT_REPO.getValue());\n \n Random random = new Random();\n double max = REPO_SUBSET_RATE.getValue();\n \n logger.info(\"Beginning random selection of projects...\");\n int count = 0;\n int total = repo.getProjectCount();\n int included = 0;\n for (RepoProject project : repo.getProjects()) {\n // Make sure the project has at least one file\n IFileSet files = project.getFileSet();\n if (files.getJavaFileCount() > 0) {\n if (random.nextDouble() < max) {\n included++;\n logger.info(\"Including project \" + ++count + \" of \" + total);\n \n // Copy the project into the new repository\n RepoFile newProject = newRoot.rebaseFile(project.getProjectRoot());\n if (!FileUtils.copyFile(project.getProjectRoot().toFile(), newProject.toFile())) {\n logger.info(\" Error in copying project.\");\n }\n } else {\n logger.info(\"Skipping project \" + ++count + \" of \" + total);\n } \n } else {\n logger.info(\"Skipping project \" + ++count + \" of \" + total);\n }\n }\n \n logger.info(included + \" projects included in new repository.\");\n // Clean temp files\n FileUtils.cleanTempDir();\n }",
"public Requested<Release> postByOwnerRepo(String owner,\n String repo,\n String Accept,\n ReleaseCreate body) {\n String url = (\"https://api.github.com//repos/{owner}/{repo}/releases\".replace(\"{owner}\", \"\"+owner).replace(\"{repo}\", \"\"+repo));\n HashMap<String, String> headerProperties = new HashMap<String, String>();\n if (Accept!= null) {\n headerProperties.put(\"Accept\", (\"\"+ Accept));\n }\n Map<String, Object> content = new HashMap<>();\n content.put(\"body\", body);\n return requestPost(url, headerProperties, content, Release.class);\n }",
"private void createArtifacts(String groupId,\n String artifactId,\n String storageId,\n String repositoryId)\n {\n ArtifactCoordinates coordinates1 = createArtifactCoordinates(groupId, artifactId + \"123\", \"1.2.3\", \"jar\");\n ArtifactCoordinates coordinates2 = createArtifactCoordinates(groupId, artifactId, \"1.2.3\", \"jar\");\n ArtifactCoordinates coordinates3 = createArtifactCoordinates(groupId + \"myId\", artifactId + \"321\", \"1.2.3\",\n \"jar\");\n\n createArtifactEntry(coordinates1, storageId, repositoryId);\n createArtifactEntry(coordinates2, storageId, repositoryId);\n createArtifactEntry(coordinates3, storageId, repositoryId);\n }",
"void setRepository(Repository repository);",
"@Path(\"/api/repo/create\")\n\t@POST\n\t@ApiOperation(value = \"Create the docker repository\", notes = \"User can create docker repository.User with role Customer Admin only allowed.\", response = ApiResponseDTO.class)\n\t@ApiResponses({ @ApiResponse(code = 200, message = \"The docker repository has been created successfully\") })\n\t@Transactional(rollbackFor = { NotAuthorizeException.class, JsonProcessingException.class, ValidationException.class,BaseException.class })\n\t@RequestMapping(value = \"/api/repo/create\", method = RequestMethod.POST)\n\t@PreAuthorize(\"hasAuthority('Customer Admin')\")\n\tpublic ApiResponseDTO createRepository(\n\t\t\t@ApiParam(name = \"Docker respository object\", value = \"Docker respository object that needs to be created\", required = true) @Valid @RequestBody DockerRepositoryDTO dockerRepositoryDTO,\n\t\t\tHttpServletRequest request) throws NotAuthorizeException, JsonProcessingException, ValidationException, BaseException {\n\t\tString message = null;\n\t\tString statusCode = HttpStatus.OK.toString();\n\t\tString loggedInEmail = getLoggedInUserEmail(SecurityContextHolder.getContext().getAuthentication());\n\t\tString roleName = getLoggedInUserRoleName(SecurityContextHolder.getContext().getAuthentication());\n\t\tlogger.debug(\"RoleName and loggedinemail are {}, {}\", roleName, loggedInEmail);\n\t\tUser loggedInUser = userService.findUserByEmail(loggedInEmail);\n\t\tString userQAuthToken = loggedInUser.getqAuthToken();\n\t\tif (userQAuthToken == null) {\n\t\t\tthrow new NotAuthorizeException(environment.getProperty(\"job.notauthorized\"));\n\t\t}\n\t\tif(StringUtils.containsWhitespace(dockerRepositoryDTO.getRepository()) == true){\n\t\t\tthrow new ValidationException(environment.getProperty(\"repository.name.notallow.space\"));\n\t\t}\n\t\ttry {\n\t\t\tString custName = customerService.findCustomer(loggedInUser).getName();\n\t\t\tString url = environment.getProperty(\"quay.url\");\n\n\t\t\tlogger.debug(\"Crreate Docker Repository with fallowing parmes url {} CustomerName {}\", url, custName);\n\n\t\t\tdockerRepositoryDTO.setNamespace(custName);\n\n\t\t\tDockerRepoResponseDTO dockerRepoResponse = JobsClient.createDockerRepository(url, BEARER + userQAuthToken,\n\t\t\t\t\tdockerRepositoryDTO);\n\t\t\tif (dockerRepoResponse != null) {\n\t\t\t\tmessage = dockerRepoResponse.getMessage();\n\t\t\t\tstatusCode = String.valueOf(dockerRepoResponse.getStatusCode());\n\t\t\t}\n\t\t\tlogger.info(environment.getProperty(\"job.repository.create.sucess\"),loggedInUser.getUserName(),custName,environment.getProperty(\"quay.url\"));\n\t\t} catch (MalformedURLException e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t\tlogger.info(environment.getProperty(\"job.tomcat.failed\"),environment.getProperty(\"nvidia.host\"),environment.getProperty(\"quay.url\"));\n\t\t\tthrow new BaseException(\"error while creating docker repositories\" + e.getMessage());\n\t\t}\n\t\t\n\t\tApiResponseDTO response = new ApiResponseDTO(message, Integer.parseInt(statusCode));\n\t\treturn response;\n\t}",
"public void pull(String remoteName) {\n \t\t//X TODO\n \t}",
"public RepositoryArtifact createProject(RepositoryConnector connector, String rootFolderId, String projectName, String processDefinitionXml) {\r\n RepositoryArtifact result = null;\r\n try {\r\n ZipInputStream projectTemplateInputStream = new ZipInputStream(getProjectTemplate());\r\n ZipEntry zipEntry = null;\r\n \r\n String rootSubstitution = null;\r\n \r\n while ((zipEntry = projectTemplateInputStream.getNextEntry()) != null) {\r\n String zipName = zipEntry.getName();\r\n if (zipName.endsWith(\"/\")) {\r\n zipName = zipName.substring(0, zipName.length() - 1);\r\n }\r\n String path = \"\";\r\n String name = zipName;\r\n if (zipName.contains(\"/\")) {\r\n path = zipName.substring(0, zipName.lastIndexOf(\"/\"));\r\n name = zipName.substring(zipName.lastIndexOf(\"/\") + 1);\r\n }\r\n if (\"\".equals(path)) {\r\n // root folder is named after the project, not like the\r\n // template\r\n // folder name\r\n rootSubstitution = name;\r\n name = projectName;\r\n } else {\r\n // rename the root folder in all other paths as well\r\n path = path.replace(rootSubstitution, projectName);\r\n }\r\n String absolutePath = rootFolderId + \"/\" + path;\r\n boolean isBpmnModel = false;\r\n if (zipEntry.isDirectory()) {\r\n connector.createFolder(absolutePath, name);\r\n } else {\r\n Content content = new Content();\r\n \r\n if (\"template.bpmn20.xml\".equals(name)) {\r\n // This file shall be replaced with the process\r\n // definition\r\n content.setValue(processDefinitionXml);\r\n name = projectName + \".bpmn20.xml\";\r\n isBpmnModel = true;\r\n log.log(Level.INFO, \"Create processdefinition from Signavio process model \" + projectName);\r\n } else {\r\n byte[] bytes = IoUtil.readInputStream(projectTemplateInputStream, \"ZIP entry '\" + zipName + \"'\");\r\n String txtContent = new String(bytes).replaceAll(REPLACE_STRING, projectName).replaceAll(\"@@ACTIVITI.HOME@@\", ACTIVITI_HOME_PATH);\r\n content.setValue(txtContent);\r\n }\r\n log.log(Level.INFO, \"Create new artifact from zip entry '\" + zipEntry.getName() + \"' in folder '\" + absolutePath + \"' with name '\" + name + \"'\");\r\n RepositoryArtifact artifact = connector.createArtifact(absolutePath, name, null, content);\r\n if (isBpmnModel) {\r\n result = artifact;\r\n }\r\n }\r\n projectTemplateInputStream.closeEntry();\r\n }\r\n projectTemplateInputStream.close();\r\n } catch (IOException ex) {\r\n throw new RepositoryException(\"Couldn't create maven project due to IO errors\", ex);\r\n }\r\n return result;\r\n }",
"private static boolean performFirstCommitIfRequired(@Nonnull final Project project,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Nonnull VirtualFile root,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Nonnull GitRepository repository,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Nonnull ProgressIndicator indicator,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Nonnull String name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Nonnull String url)\n\t{\n\t\tif(!repository.isFresh())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\tLOG.info(\"Trying to commit\");\n\t\ttry\n\t\t{\n\t\t\tLOG.info(\"Adding files for commit\");\n\t\t\tindicator.setText(\"Adding files to git...\");\n\n\t\t\t// ask for files to add\n\t\t\tfinal List<VirtualFile> trackedFiles = ChangeListManager.getInstance(project).getAffectedFiles();\n\t\t\tfinal Collection<VirtualFile> untrackedFiles = repository.getUntrackedFilesHolder()\n\t\t\t\t\t.retrieveUntrackedFiles();\n\t\t\tfinal List<VirtualFile> allFiles = new ArrayList<VirtualFile>();\n\t\t\tallFiles.addAll(trackedFiles);\n\t\t\tallFiles.addAll(untrackedFiles);\n\n\t\t\tfinal Ref<GithubUntrackedFilesDialog> dialogRef = new Ref<GithubUntrackedFilesDialog>();\n\t\t\tApplicationManager.getApplication().invokeAndWait(new Runnable()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\tGithubUntrackedFilesDialog dialog = new GithubUntrackedFilesDialog(project, allFiles);\n\t\t\t\t\tif(!trackedFiles.isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tdialog.setSelectedFiles(trackedFiles);\n\t\t\t\t\t}\n\t\t\t\t\tDialogManager.show(dialog);\n\t\t\t\t\tdialogRef.set(dialog);\n\t\t\t\t}\n\t\t\t}, indicator.getModalityState());\n\t\t\tfinal GithubUntrackedFilesDialog dialog = dialogRef.get();\n\n\t\t\tfinal Collection<VirtualFile> files2commit = dialog.getSelectedFiles();\n\t\t\tif(!dialog.isOK() || files2commit.isEmpty())\n\t\t\t{\n\t\t\t\tGithubNotifications.showInfoURL(project, \"Successfully created empty repository on GitHub\", name, url);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tCollection<VirtualFile> files2add = ContainerUtil.intersection(untrackedFiles, files2commit);\n\t\t\tCollection<VirtualFile> files2rm = consulo.ide.impl.idea.util.containers.ContainerUtil.subtract(trackedFiles, files2commit);\n\t\t\tCollection<VirtualFile> modified = new HashSet<VirtualFile>(trackedFiles);\n\t\t\tmodified.addAll(files2commit);\n\n\t\t\tGitFileUtils.addFiles(project, root, files2add);\n\t\t\tGitFileUtils.deleteFilesFromCache(project, root, files2rm);\n\n\t\t\t// commit\n\t\t\tLOG.info(\"Performing commit\");\n\t\t\tindicator.setText(\"Performing commit...\");\n\t\t\tGitSimpleHandler handler = new GitSimpleHandler(project, root, GitCommand.COMMIT);\n\t\t\thandler.addParameters(\"-m\", dialog.getCommitMessage());\n\t\t\thandler.endOptions();\n\t\t\thandler.run();\n\n\t\t\tVcsFileUtil.markFilesDirty(project, modified);\n\t\t}\n\t\tcatch(VcsException e)\n\t\t{\n\t\t\tLOG.warn(e);\n\t\t\tGithubNotifications.showErrorURL(project, \"Can't finish GitHub sharing process\",\n\t\t\t\t\t\"Successfully created project \", \"'\" + name + \"'\", \" on GitHub, but initial commit failed:<br/>\" +\n\t\t\t\t\t\t\te.getMessage(), url);\n\t\t\treturn false;\n\t\t}\n\t\tLOG.info(\"Successfully created initial commit\");\n\t\treturn true;\n\t}",
"public abstract RepositoryOperation getAddOperation(URI repoLocation);",
"private void cleanupGitRemoteTags() {\n logger.info(\"Determine local and remote SCM-tags for SCM-repo\");\n logger.info(MOJO_LINE_BREAK);\n getRepositoryProvider().pull();\n List<Ref> refs = getRepositoryProvider().getLocalTags();\n if (!refs.isEmpty()) {\n boolean found = false;\n for (Ref ref : refs) {\n if (ref.getName().contains(preparedReleaseTag)) {\n found = true;\n logger.info(\n format(\"Delete local SCM-tag : {}\", ref.getName().substring(10)));\n getRepositoryProvider().deleteTag(ref.getName());\n logger.info(\n format(\"Delete remote SCM-tag : {}\", ref.getName().substring(10)));\n getRepositoryProvider().pushTag();\n }\n }\n if (!found) {\n logger.info(\"No local or remote prepared SCM-tags found\");\n }\n } else {\n logger.info(\"No local or remote prepared SCM-tags found\");\n }\n\n getRepositoryProvider().closeRepository();\n logger.info(MOJO_LINE_BREAK);\n }",
"public Repository<Long, Sponsorship> getSponsorshipRepository() {\n final String repositoryType = properties.getProperty(\"sponsorshipRepositoryType\");\n final String pathToFile = properties.getProperty(\"sponsorshipRepositoryPathToFile\");\n final String tableName = properties.getProperty(\"sponsorshipRepositoryTableName\");\n\n final Validator<Sponsorship> validator = new SponsorshipValidator();\n\n return switch (repositoryType) {\n case IN_MEMORY -> new InMemoryRepository<>(validator);\n case XML -> new SponsorshipXmlRepository(validator, Objects.requireNonNull(pathToFile));\n case CSV -> new SponsorshipFileRepository(validator, Objects.requireNonNull(pathToFile));\n case JDBC -> new SponsorshipJdbcRepository(validator, getDatabaseProvider(), Objects.requireNonNull(tableName));\n default -> throw new IllegalStateException(illegalRepositoryTypeErrorMessage);\n };\n }",
"@RequestMapping(method = RequestMethod.POST, value = \"/startRepo\")\n public String initializeRepo(@RequestBody CreateRepoRequestTemplate createRepoRequestTemplate) throws ResourceNotFoundException, BadRequestException {\n return gitLabService.initializeRepo(createRepoRequestTemplate);\n }",
"private String getRepoName(String remoteUrl) {\n // Pattern to match all words in the text\n final Matcher matcher = Pattern.compile(\"([^/]*).git$\").matcher(remoteUrl);\n if (matcher.find()) {\n return matcher.group(1);\n }\n throw new AppsmithException(AppsmithError.INVALID_GIT_CONFIGURATION, \"Remote URL is incorrect! Can you \" +\n \"please provide as per standard format => git@github.com:username/reponame.git\");\n }",
"private void handlePublicRepositories(VirtualHost vhost) {\n\t\tList<PublicFeatureRepository> repoList = publicRepo.getAll(vhost);\n\t\tMap<String, String> pathsToRepositories = getPathsToRepositories(providers, repoList);\n\t\tMap<FeaturesProvider, String> providersToRepositories = new HashMap<FeaturesProvider, String>();\n\t\tfor(FeaturesProvider provider : this.providers) {\n\t\t\tif(pathsToRepositories.get(provider.getRepositoryPath()) == null) {\n\t\t\t\tPublicFeatureRepository newConf = new PublicFeatureRepository();\n\t\t\t\tnewConf.setPath(provider.getRepositoryPath());\n\t\t\t\tnewConf.setUser(null);\n\t\t\t\tnewConf.setPassword(null);\n\t\t\t\tpublicRepo.create(vhost, newConf);\n\t\t\t\trepoList.add(newConf);\n\t\t\t\tpathsToRepositories.put(provider.getRepositoryPath(), newConf.getId());\n\t\t\t}\n\t\t\tprovidersToRepositories.put(provider, pathsToRepositories.get(provider.getRepositoryPath()));\n\t\t}\n\t\tfor(PublicFeatureRepository repoConf : repoList) {\n\t\t\tinitializeRepository(repoConf);\n\t\t}\n\t\thandleFeatureProviders(vhost, providersToRepositories);\n\t}",
"public void saveGitManagementUserInfo(Long gitLabProjectId){\n Project project = projectRepository.findByGitlabProjectIdAndServerUrl(gitLabProjectId, serverUrl);\n\n var gitLabMembers = gitLabService.getMembers(gitLabProjectId);\n var gitLabMemberList= gitLabMembers.collectList().block();\n\n if (gitLabMemberList != null && !gitLabMemberList.isEmpty()) {\n gitLabMemberList.forEach(gitLabMember -> {\n GitManagementUser gitManagementUser= gitManagementUserRepository.findByUserNameAndServerUrl(gitLabMember.getUsername(),serverUrl);\n if (gitManagementUser == null){\n gitManagementUser = new GitManagementUser(\n gitLabMember.getUsername(),\n gitLabMember.getName(),\n serverRepository.findByServerUrlAndAccessToken(serverUrl,accessToken)\n );\n }\n\n GitManagementUser checkIfAlreadyInProject = gitManagementUserRepository.findByUsernameAndProjectId(gitLabMember.getUsername(),project.getId());\n if(checkIfAlreadyInProject == null){\n gitManagementUser.addProject(project);\n }\n\n gitManagementUserRepository.save(gitManagementUser);\n }\n );\n }\n }",
"boolean isBareRepository() throws GitException, InterruptedException;",
"public RepoCreate withAutoInit(final boolean auto) {\n return new RepoCreate(\n this.nam,\n this.priv,\n this.descr,\n this.home,\n Optional.of(auto),\n this.organization\n );\n }",
"String getRepositoryPath(String name);",
"boolean isBareRepository(String GIT_DIR) throws GitException, InterruptedException;",
"String getRemoteUrl(String name, String GIT_DIR) throws GitException, InterruptedException;",
"private void createRemotePlayer(PlayerId pId) {\n\t\ttry {\n\t\t\tString ip = texts.get(pId.ordinal() * 2 + 1).getText();\n\n\t\t\tPlayer p = new RemotePlayerClient(ip.isEmpty() ? DEFAULT_HOST : ip);\t\t\t\n\t\t\tplayers.put(pId, p);\n\t\t} catch (IOException e) {\n\t\t\tmenuMessage.setText(\"Error -> can't create remote player : IP address must be missing\");\n\t\t}\n\t\tplayerNames.put(pId, texts.get(pId.ordinal() *2).getText().isEmpty() ? defaultNames[pId.ordinal()] : texts.get(pId.ordinal() * 2).getText());\n\t}",
"public void push(TaskMonitor aTM) throws Exception\n{\n // Get repository and git\n Git git = getGit();\n \n // Get push\n PushCommand push = git.push();\n push.setProgressMonitor(getProgressMonitor(aTM));\n if(getCD()!=null) push.setCredentialsProvider(getCD());\n for(PushResult pr : push.call())\n System.out.println(\"Pushed: \" + pr);\n}",
"void createPortFolio(String portfolioName);",
"public static void createRepo(String entityName,\n\t\t\tString idClass,\n\t\t\tString tableName,\n\t\t\tString repoName) throws Exception{\n VelocityEngine ve = new VelocityEngine();\n //ve.setProperty(RuntimeConstants.RESOURCE_LOADER, \"classpath\");\n // ve.setProperty(\"classpath.resource.loader.class\", ClasspathResourceLoader.class.getName());\n ve.init();\t\t\n /* next, get the Template */\n Template t = ve.getTemplate( \"./src/javautils/repositoryInterface.vm\" );\n /* create a context and add data */\n \n\n String idClassPack = (StringUtils.endsWith(idClass, \"PK\"))?\n \t\t\"import com.tb.aol.domain.entity.\" + idClass +\";\" : \"\";\n\n \t\n \t\n VelocityContext context = new VelocityContext();\n context.put(\"idclasspack\", idClassPack);\n context.put(\"idclass\", idClass);\n \n context.put(\"table\", tableName);\n context.put(\"fname\", repoName);\n context.put(\"entity\", entityName);\n \n \n \n /* now render the template into a StringWriter */\n StringWriter writer = new StringWriter();\n t.merge( context, writer );\n \n File file = new File(\"C:/rearch/temp/\"+repoName + \".java\");\n \n FileUtils.writeStringToFile(file, writer.toString(), \"UTF-8\");\n \n \t\t\n\t}",
"void setRepoType(String repoType);",
"public void openRepository( String repositoryName ) throws MetaStoreException {\n gitSpoonMenuController.openRepo( repositoryName );\n }",
"VcsRepositoryUrl copyRepository(String sourceProjectKey, String sourceRepositoryName, String targetProjectKey, String targetRepositoryName) throws VersionControlException;",
"private RestTreeNode createRemoteOrVirtualFolderNode(BaseBrowsableItem pathItem, String repoType,\n RepoPath repositoryPath) {\n RestTreeNode child;\n String repoKey = pathItem.getRepoKey();\n repositoryPath = pathItem.getRepoPath();\n if (repoKey.endsWith(\"-cache\")) {\n repoKey = repoKey.replace(\"-cache\", \"\");\n repositoryPath = InternalRepoPathFactory.create(repoKey, pathItem.getRepoPath().getPath());\n }\n child = new VirtualRemoteFolderNode(repositoryPath, pathItem, pathItem.getName(), repoType);\n return child;\n }",
"public void setRepositoryName(String repositoryName) {\n this.repositoryName = repositoryName;\n }",
"@Override\n public GitRepoStats getRepoStatistics(String userName, String repoName , String type) throws GitException, RepoUserNotFoundException {\n GitRepoStats openPr=new GitRepoStats();\n try {\n responseCount=0;\n //based on the strategy gets the api url\n StrategyContext createGitApi=new StrategyContext (new GitStatisticsApi());\n String url=createGitApi.createAPI(userName,repoName,type);\n //call recessive the pr api with open status by reading the headers rel value\n processPrdDetails(url,true);\n openPr.setCount(responseCount);\n } catch (HttpClientErrorException hce) {\n LOGGER.error(\"GitApiImpl :: getRepoStatistics HttpClientErrorException :: \", hce);\n throw new GitException(VALID_REPO);\n }\n return openPr;\n }",
"public void setShRepositoryName(String val) {\n\n\t\tshRepositoryName = val;\n\n\t}",
"void clone(RemoteConfig source) throws GitException, InterruptedException;",
"public void createProject(String name) {\n Project project = new Project(name);\n Leader leader = new Leader(this, project);\n project.addLeader(leader);\n }",
"@Test\n public void testGetAndDeleteRepos() throws IOException, DuplicateRepoNameException, RepositoryNotFoundException {\n assertFalse(containsRepo(ConfigDatabase.instance().getRepos(), \"test-repo-name1\"));\n\n ConfigDatabase.instance().addRepo(testRepo1);\n assertTrue(containsRepo(ConfigDatabase.instance().getRepos(), \"test-repo-name1\"));\n\n ConfigDatabase.instance().delRepoByName(\"test-repo-name1\");\n assertFalse(containsRepo(ConfigDatabase.instance().getRepos(), \"test-repo-name1\"));\n }",
"private boolean ensureWorkspaceExists(String name, Credentials credentials) {\r\n\t\tSession sess = null;\r\n\t\ttry {\r\n\t\t\tsess = repository.login(credentials);\r\n\t\t\tString[] wsnames = sess.getWorkspace()\r\n\t\t\t\t\t.getAccessibleWorkspaceNames();\r\n\t\t\tif (inArr(name, wsnames)) {\r\n\t\t\t\t// workspace exists\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\tlog.info(\" Creating Repository workspace \" + name);\r\n\t\t\t\tsess.getWorkspace().createWorkspace(name);\r\n\t\t\t}\r\n\t\t} catch (LoginException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t} catch (RepositoryException e) {\r\n\t\t\t// ugly check, we are getting something like workspace 'wsname'\r\n\t\t\t// already exists.\r\n\t\t\tif (e.getMessage().indexOf(\"already exists\") > 0) {\r\n\t\t\t\t// ignore exteption\r\n\t\t\t} else {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tif (sess != null) {\r\n\t\t\t\tsess.logout();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public RepoCreate withAutoInit(final Optional<Boolean> auto) {\n return new RepoCreate(\n this.nam,\n this.priv,\n this.descr,\n this.home,\n auto,\n this.organization\n );\n }",
"@POST\n @Path(\"accept\")\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n public Factory acceptFactory(final Factory factory) {\n final ProjectImporter importer = getGitProjectImporter();\n\n //try to check if factory contains project name value otherwise we set default project name to \"Unnamed\"\n ProjectAttributes projectAttributes = factory.getProjectattributes();\n if (projectAttributes == null) {\n projectAttributes = DtoFactory.getInstance().createDto(ProjectAttributes.class).withPname(DEFAULT_PROJECT_NAME);\n factory.setProjectattributes(projectAttributes);\n } else if (projectAttributes.getPname() == null || projectAttributes.getPname().isEmpty()) {\n projectAttributes = factory.getProjectattributes().withPname(DEFAULT_PROJECT_NAME);\n }\n\n List<FolderEntry> existedFolders = projectManager.getProjectsRoot(workspace).getChildFolders();\n\n //if project with the same name exist we should create new one with another name.\n for (FolderEntry existProject : existedFolders) {\n if (projectAttributes.getPname().equals(existProject.getName())) {\n projectAttributes.setPname(NameGenerator.generate(projectAttributes.getPname(), 4));\n break;\n }\n }\n\n //get newly created empty folder in which clone should be proceed\n FolderEntry projectFolder = projectManager.getProjectsRoot(workspace).createFolder(factory.getProjectattributes().getPname());\n\n try {\n importer.importSources(projectFolder, factory.getVcsurl());\n } catch (IOException e) {\n if (e.getCause() != null && e.getCause() instanceof NotAuthorizedException) {\n throw halt(UNAUTHORIZED, e.getMessage(), e);\n }\n throw halt(INTERNAL_SERVER_ERROR, e.getMessage());\n }\n\n //get physical path to project on file system to allow native git to work with repository\n String absoluteProjectPath;\n try {\n absoluteProjectPath = localPathResolver.resolve(projectFolder.getVirtualFile());\n } catch (VirtualFileSystemException e) {\n removeInvalidClonedFolder(projectFolder);\n throw halt(INTERNAL_SERVER_ERROR, \"Unable to resolve Git project directory.\", e);\n }\n\n GitConnection gitConnection;\n try {\n gitConnection = gitConnectionFactory.getConnection(absoluteProjectPath);\n } catch (GitException e) {\n removeInvalidClonedFolder(projectFolder);\n throw halt(INTERNAL_SERVER_ERROR, \"Unable to get Git connection to cloned project.\", e);\n }\n\n if (!Strings.isNullOrEmpty(factory.getCommitid())) {\n performCheckoutToCommitId(factory.getCommitid(), gitConnection);\n } else if (!Strings.isNullOrEmpty(factory.getVcsbranch())) {\n performCheckoutToBranch(factory.getVcsbranch(), gitConnection);\n }\n\n if (factory.getVariables() != null && factory.getVariables().size() > 0) {\n performReplaceVariables(factory.getVariables(), absoluteProjectPath);\n }\n\n if (!factory.getVcsinfo()) {\n AbstractVirtualFileEntry gitFolder = projectFolder.getChild(\".git\");\n if (gitFolder != null && gitFolder.isFolder()) {\n pushClientNotification(\"Git information erased.\");\n gitFolder.remove();\n }\n }\n\n return factory;\n }",
"interface WithBranch {\n /**\n * Specifies the branch property: The repo branch of the source control. Include branch as empty string for\n * VsoTfvc..\n *\n * @param branch The repo branch of the source control. Include branch as empty string for VsoTfvc.\n * @return the next definition stage.\n */\n WithCreate withBranch(String branch);\n }",
"synchronized Repository getRepository(String name) {\n\t\treturn repositoryMap.get(name);\n\t}",
"public String getRepoUrl() {\n return \"ssh://git@\" + host() + \":\" + port() + REPO_DIR;\n }",
"public static String findAndCreateRepositoryDescription(\n\t\t\tServiceExecutor executor) throws Throwable {\n\n\t\t// Find if exists\n\t\tString id = findRepositoryDescription(executor);\n\n\t\t// Create if needed\n\t\tif (id == null) {\n\t\t\tXmlDocMaker dm = new XmlDocMaker(\"args\");\n\t\t\tdm = new XmlDocMaker(\"args\");\n\t\t\tdm.add(\"namespace\", ASSET_NAMESPACE);\n\t\t\tdm.add(\"name\", ASSET_NAME);\n\n\t\t\t// Put a basic ACL on the objects. The system:manager needs to be\n\t\t\t// able to\n\t\t\t// manipulate it. End users should have the ability to see it.\n\t\t\tdm.push(\"acl\");\n\t\t\tdm.add(\"actor\", new String[] { \"type\", \"role\" },\n\t\t\t\t\t\"pssd.object.admin\");\n\t\t\tdm.add(\"access\", \"read-write\");\n\t\t\tdm.pop();\n\t\t\t//\n\t\t\tdm.push(\"acl\");\n\t\t\tdm.add(\"actor\", new String[] { \"type\", \"role\" }, \"pssd.model.user\");\n\t\t\tdm.add(\"access\", \"read\");\n\t\t\tdm.pop();\n\n\t\t\t// Do it\n\t\t\tXmlDoc.Element r2 = executor.execute(\"asset.create\", dm.root());\n\t\t\tid = r2.value(\"id\");\n\t\t}\n\n\t\t// Return id\n\t\treturn id;\n\t}",
"public abstract boolean manipulateRepositories();",
"@Override\n public boolean isRemoteProject() {\n return true;\n }",
"public Repository<Long, Sponsor> getSponsorRepository() {\n final String repositoryType = properties.getProperty(\"sponsorRepositoryType\");\n final String pathToFile = properties.getProperty(\"sponsorRepositoryPathToFile\");\n final String tableName = properties.getProperty(\"sponsorRepositoryTableName\");\n\n final Validator<Sponsor> validator = new SponsorValidator();\n\n return switch (repositoryType) {\n case IN_MEMORY -> new InMemoryRepository<>(validator);\n case XML -> new SponsorXmlRepository(validator, Objects.requireNonNull(pathToFile));\n case CSV -> new SponsorFileRepository(validator, Objects.requireNonNull(pathToFile));\n case JDBC -> new SponsorJdbcRepository(validator, getDatabaseProvider(), Objects.requireNonNull(tableName));\n default -> throw new IllegalStateException(illegalRepositoryTypeErrorMessage);\n };\n }",
"private boolean isLocalRepository() {\n\r\n File file = new File(m_Path.toString() + \"/.magit/Remote\");\r\n return file.exists();\r\n }",
"public WPIMavenRepo mirror(String name, final Action<WPIMavenRepo> config) {\n WPIMavenRepo mirr = project.getObjects().newInstance(WPIMavenRepo.class, name);\n mirr.setPriority(WPIMavenRepo.PRIORITY_MIRROR);\n config.execute(mirr);\n this.add(mirr);\n return mirr;\n }",
"UserGroup createGroup(String companyId, String name);",
"H enrichRepo(RepoType repoType);",
"String getDefaultRemote(String _default_) throws GitException, InterruptedException;",
"private void buildRepository(ServerRepository serverRepository, boolean updateServerInfo) {\n RebuildRepositoryTask rrTask = new RebuildRepositoryTask(serverRepository);\n boolean success = rrTask.execute();\n\n if (success)\n log.info(\"successfully built repository {}\", serverRepository.getIdentifier());\n else\n log.info(\"error building repository {}\", serverRepository.getIdentifier());\n\n if (updateServerInfo)\n updateServerInfo();\n }",
"public static Pusher create(GitLib gitLib,\n Branch localBranch,\n String remoteBranchName) {\n return new Pusher(PusherOptions.from(gitLib).localBranch(localBranch).remoteBranchName(remoteBranchName).build(), false);\n }",
"void createBranchAtCommit(TCommit commit, String branchName, TRepo repo);",
"abstract ManagedChannel createChannel(List<ServerInfo> servers);",
"private RepositorySystem newRepositorySystem()\n\t{\n\t\tDefaultServiceLocator locator = MavenRepositorySystemUtils.newServiceLocator();\n\t\tlocator.addService( RepositoryConnectorFactory.class, BasicRepositoryConnectorFactory.class );\n\t\tlocator.addService( TransporterFactory.class, FileTransporterFactory.class );\n\t\tlocator.addService( TransporterFactory.class, HttpTransporterFactory.class );\n\n\t\tlocator.setErrorHandler( new DefaultServiceLocator.ErrorHandler()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void serviceCreationFailed( Class<?> type, Class<?> impl, Throwable exception )\n\t\t\t{\n\t\t\t\texception.printStackTrace();\n\t\t\t}\n\t\t} );\n\n\t\treturn locator.getService( RepositorySystem.class );\n\t}",
"public interface GroupsRepository {\r\n\r\n Group findByInternalId(Long id) throws RepositoryAccessException;\r\n\r\n List<Group> findByGroupName(String name) throws RepositoryAccessException;\r\n\r\n List<Group> findAllGroups() throws RepositoryAccessException;\r\n\r\n public Group saveGroup(final Group group) throws RepositoryAccessException;\r\n\r\n public void deleteGroup(final Group group) throws RepositoryAccessException;\r\n\r\n public void deleteAuthorityOfGroup(final Group group, final Authority authority) throws RepositoryAccessException;\r\n\r\n public Group addAuthorityToGroup(final Group group, final Authority authority) throws RepositoryAccessException;\r\n\r\n public List<Authority> findAuthoritiesOfGroup(final Group group) throws RepositoryAccessException;\r\n\r\n public List<Authority> findAuthoritiesOfGroup(final Long id) throws RepositoryAccessException;\r\n\r\n public List<Group> getGroupListByGroupIds(String[] groupIds) throws RepositoryAccessException;\r\n\r\n public void deleteAuthoritiesOfGroup(Group group) throws RepositoryAccessException;\r\n\r\n public void addAuthoritiesToGroup(Group group, Set<Authority> authorities);\r\n\r\n public void deleteUserOfGroup(Group group, User user);\r\n\r\n public void addUserToGroup(Group group, User user);\r\n\r\n\r\n}"
] |
[
"0.57747084",
"0.57658935",
"0.57013375",
"0.5591081",
"0.5320543",
"0.5236211",
"0.5209307",
"0.5209136",
"0.5182589",
"0.51496845",
"0.50989157",
"0.5092753",
"0.5059765",
"0.50171936",
"0.49687457",
"0.49472332",
"0.4908848",
"0.49082914",
"0.48698884",
"0.48614517",
"0.481251",
"0.4790431",
"0.47454375",
"0.47426143",
"0.47296447",
"0.46732324",
"0.46373945",
"0.4614031",
"0.45498472",
"0.45487073",
"0.45246398",
"0.4522268",
"0.45022127",
"0.44947845",
"0.44888183",
"0.44855624",
"0.4446414",
"0.4432796",
"0.44009593",
"0.4399657",
"0.4388438",
"0.43841183",
"0.43762964",
"0.43453667",
"0.4324645",
"0.4320818",
"0.4308851",
"0.43083104",
"0.42946464",
"0.42870992",
"0.4286378",
"0.42840052",
"0.4281881",
"0.42807433",
"0.4278635",
"0.42674008",
"0.42613193",
"0.42596984",
"0.42486417",
"0.42411909",
"0.42392078",
"0.42332953",
"0.4226931",
"0.42268512",
"0.42263004",
"0.42220014",
"0.42074046",
"0.42072535",
"0.42052266",
"0.41923162",
"0.41904563",
"0.41862717",
"0.41852653",
"0.4184541",
"0.41790718",
"0.41777962",
"0.41744688",
"0.4171663",
"0.4169979",
"0.41681153",
"0.4164145",
"0.41632137",
"0.41571987",
"0.41564652",
"0.41513178",
"0.41471303",
"0.41467473",
"0.41431335",
"0.41358262",
"0.41355926",
"0.41340345",
"0.41257435",
"0.41214526",
"0.4115805",
"0.41144112",
"0.41140395",
"0.41074032",
"0.41068807",
"0.41056582",
"0.40949503"
] |
0.659127
|
0
|
if repo with this name already exists, we need to use a different name
|
private String getRemoteRepositoryName( URL url ) throws IndyDataException
{
final String name = repoCreator.formatId( url.getHost(), getPort( url ), 0, null, StoreType.remote );
logger.debug( "Looking for remote repo starts with name: {}", name );
AbstractProxyRepositoryCreator abstractProxyRepositoryCreator = null;
if ( repoCreator instanceof AbstractProxyRepositoryCreator )
{
abstractProxyRepositoryCreator = (AbstractProxyRepositoryCreator) repoCreator;
}
if ( abstractProxyRepositoryCreator == null )
{
return name;
}
Predicate<ArtifactStore> filter = abstractProxyRepositoryCreator.getNameFilter( name );
List<String> l = storeManager.query()
.packageType( GENERIC_PKG_KEY )
.storeType( RemoteRepository.class )
.stream( filter )
.map( repository -> repository.getName() )
.collect( Collectors.toList() );
if ( l.isEmpty() )
{
return name;
}
return abstractProxyRepositoryCreator.getNextName( l );
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n public void testOnlyOneRepoPerName() throws IOException, DuplicateRepoNameException, RepositoryNotFoundException {\n ConfigDatabase.instance().addRepo(testRepo1);\n assert testRepo1.getName().equals(testRepo1a.getName()); // conflicting names\n try {\n ConfigDatabase.instance().addRepo(testRepo1a);\n fail(\"An exception should have been raised because a repo with this name already exists\");\n } catch (DuplicateRepoNameException dke) {\n /* This should happen - fail otherwise */\n }\n assertEquals(testRepo1.getCRSID(), ConfigDatabase.instance().getRepoByName(\"test-repo-name1\").getCRSID());\n }",
"synchronized Repository getRepository(String name) {\n\t\treturn repositoryMap.get(name);\n\t}",
"public void setRepositoryName(@Nullable String name) {\n this.repositoryName = name;\n }",
"public GitRef getRef(String aName)\n{\n Ref ref;\n System.out.println(\"GitDir.getRef: Used to be getRef() but that is gone now. Don't know if this is okay\");\n try { ref = getRepo().exactRef(aName); }\n catch(Exception e) { throw new RuntimeException(e); }\n return ref!=null ? new GitRef(ref) : null;\n}",
"@Test\n public void testUpdateRepo() throws IOException, DuplicateRepoNameException, RepositoryNotFoundException {\n ConfigDatabase.instance().addRepo(testRepo1);\n ConfigDatabase.instance().updateRepo(testRepo1);\n }",
"public void setShRepositoryName(String val) {\n\n\t\tshRepositoryName = val;\n\n\t}",
"@Test(expected = RepositoryNotFoundException.class)\n public void testNonExistingRepository() throws AuthorCommitsFailedException,\n IOException{\n EasyMock.expect(mockManager.openRepository(new Project.NameKey(\"abcdefg\")))\n .andReturn(\n RepositoryCache.open(FileKey.lenient(new File(\n \"../../review_site/git\", \"abcdefg.git\"), FS.DETECTED)));\n EasyMock.expect(mockUser.getCapabilities()).andReturn(mockCapability);\n EasyMock.expect(mockCapability.canListAuthorCommits()).andReturn(true);\n replay(mockUser, mockCapability, mockManager);\n cmd_test.setCommits(new Project.NameKey(\"abcdefg\"), \"kee\");\n }",
"public synchronized Repository createRepository(String currentUser, String name)\n\t\t\tthrows IOException, DuplicateFileException {\n\n\t\tif (isAnonymousUser(currentUser)) {\n\t\t\tthrow new UserAccessException(\"Anonymous user not permitted to create repository\");\n\t\t}\n\n\t\tvalidateUser(currentUser);\n\n\t\tif (!NamingUtilities.isValidProjectName(name)) {\n\t\t\tthrow new IOException(\"Invalid repository name: \" + name);\n\t\t}\n\t\tif (repositoryMap.containsKey(name)) {\n\t\t\tthrow new DuplicateFileException(\"Repository named \" + name + \" already exists\");\n\t\t}\n\n\t\tFile f = new File(rootDirFile, NamingUtilities.mangle(name));\n\t\tif (!f.mkdir()) {\n\t\t\tthrow new IOException(\"Failed to make directory for \" + f.getAbsolutePath());\n\t\t}\n\n\t\tRepository rep = new Repository(this, currentUser, f, name);\n\t\tlog(name, null, \"repository created\", currentUser);\n\t\trepositoryMap.put(name, rep);\n\t\treturn rep;\n\t}",
"@Test\n public void testStoringRepos() throws IOException, DuplicateRepoNameException, RepositoryNotFoundException {\n ConfigDatabase.instance().addRepo(testRepo1);\n ConfigDatabase.instance().addRepo(testRepo2);\n assertEquals(testRepo1.getCRSID(),\n ConfigDatabase.instance().getRepoByName(\"test-repo-name1\").getCRSID());\n assertEquals(testRepo2.getCRSID(),\n ConfigDatabase.instance().getRepoByName(\"test-repo-name2\").getCRSID());\n assertNotEquals(ConfigDatabase.instance().getRepoByName(\"test-repo-name1\").getCRSID(),\n ConfigDatabase.instance().getRepoByName(\"test-repo-name2\").getCRSID());\n }",
"private void onNewRepo() {\n RepositoryImpl repoImpl = BugtrackingUtil.createRepository();\n if(repoImpl == null) {\n return;\n }\n Repository repo = repoImpl.getRepository();\n repositoryComboBox.addItem(repo);\n repositoryComboBox.setSelectedItem(repo);\n }",
"GitRemote(String aName) { _name = aName; }",
"String getRepositoryName(URL repositoryUrl);",
"private String getRepoName(String remoteUrl) {\n // Pattern to match all words in the text\n final Matcher matcher = Pattern.compile(\"([^/]*).git$\").matcher(remoteUrl);\n if (matcher.find()) {\n return matcher.group(1);\n }\n throw new AppsmithException(AppsmithError.INVALID_GIT_CONFIGURATION, \"Remote URL is incorrect! Can you \" +\n \"please provide as per standard format => git@github.com:username/reponame.git\");\n }",
"String getRepositoryPath(String name);",
"WithCreate withRepoUrl(String repoUrl);",
"void createRepository(String projectKey, String repoName, String parentProjectKey) throws VersionControlException;",
"public GitRemote getRemote(String aName) { return new GitRemote(aName); }",
"TRepo createRepo();",
"private ProxyCreationResult createRepo( String trackingId, URL url, String name )\n throws IndyDataException\n {\n UrlInfo info = new UrlInfo( url.toExternalForm() );\n\n UserPass up = UserPass.parse( ApplicationHeader.authorization, httpRequest, url.getAuthority() );\n String baseUrl = getBaseUrl( url );\n\n logger.debug( \">>>> Create repo: trackingId=\" + trackingId + \", name=\" + name );\n ProxyCreationResult result = repoCreator.create( trackingId, name, baseUrl, info, up,\n LoggerFactory.getLogger( repoCreator.getClass() ) );\n ChangeSummary changeSummary =\n new ChangeSummary( ChangeSummary.SYSTEM_USER, \"Creating HTTProx proxy for: \" + info.getUrl() );\n\n RemoteRepository remote = result.getRemote();\n if ( remote != null )\n {\n storeManager.storeArtifactStore( remote, changeSummary, false, true, new EventMetadata() );\n }\n\n HostedRepository hosted = result.getHosted();\n if ( hosted != null )\n {\n storeManager.storeArtifactStore( hosted, changeSummary, false, true, new EventMetadata() );\n }\n\n Group group = result.getGroup();\n if ( group != null )\n {\n storeManager.storeArtifactStore( group, changeSummary, false, true, new EventMetadata() );\n }\n\n return result;\n }",
"public void setRepositoryName(String repositoryName) {\n this.repositoryName = repositoryName;\n }",
"private void createNewRepository() {\n\t\tRepositoryConfiguration conf = repositorySettingsJPanel\n\t\t\t\t.getRepositoryConfiguration();\n\n\t\t/*\n\t\t * if (RepositoryType.HTTP.equals(conf.getType())) { new\n\t\t * MessageDialog(this, \"TBD\",\n\t\t * \"The support for HTTP repository is not implemented yet\"\n\t\t * ).setVisible(true); return; }\n\t\t */\n\n\t\tif (!validateRepositoryConfiguration(conf)) {\n\t\t\t// fixme igor; mark what is wrong!!\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tContextHolder.getInstance().getApplicationConfiguration()\n\t\t\t\t\t.addRepositoryConfiguration(conf);\n\t\t} catch (AddRepositoryException e) {\n\t\t\tnew MessageDialog(this, \"Cannot create new repository\",\n\t\t\t\t\te.getMessage()).setVisible(true);\n\t\t\treturn;\n\t\t}\n\n\t\tAppEventsManager.getInstance().fireRepositoriesChanagedEvent(this);\n\t\tdispose();\n\t}",
"private boolean ensureWorkspaceExists(String name, Credentials credentials) {\r\n\t\tSession sess = null;\r\n\t\ttry {\r\n\t\t\tsess = repository.login(credentials);\r\n\t\t\tString[] wsnames = sess.getWorkspace()\r\n\t\t\t\t\t.getAccessibleWorkspaceNames();\r\n\t\t\tif (inArr(name, wsnames)) {\r\n\t\t\t\t// workspace exists\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\tlog.info(\" Creating Repository workspace \" + name);\r\n\t\t\t\tsess.getWorkspace().createWorkspace(name);\r\n\t\t\t}\r\n\t\t} catch (LoginException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t} catch (RepositoryException e) {\r\n\t\t\t// ugly check, we are getting something like workspace 'wsname'\r\n\t\t\t// already exists.\r\n\t\t\tif (e.getMessage().indexOf(\"already exists\") > 0) {\r\n\t\t\t\t// ignore exteption\r\n\t\t\t} else {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tif (sess != null) {\r\n\t\t\t\tsess.logout();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"Repository findByName(String name);",
"public RepoCreate withName(\n final String nme\n ) {\n return new RepoCreate(\n nme,\n this.priv,\n this.descr,\n this.home,\n this.init,\n this.organization\n );\n }",
"public void addMavenRepository(String name, String url) {\n repositories.put(name, url);\n }",
"public RepositoryNameValidator(String name)\n {\n super(name);\n }",
"boolean isBareRepository(String GIT_DIR) throws GitException, InterruptedException;",
"public void addRepository(final Repository repository,\r\n\t\t\t\t\t\t\t String repositoryName) {\r\n\t\t\r\n\t\t\r\n\t\trepositories.put(repository.getId(), repository);\t\t\r\n\t}",
"@Override\n public UpdateRepositoryNameResult updateRepositoryName(UpdateRepositoryNameRequest request) {\n request = beforeClientExecution(request);\n return executeUpdateRepositoryName(request);\n }",
"boolean isBareRepository() throws GitException, InterruptedException;",
"public void openRepository( String repositoryName ) throws MetaStoreException {\n gitSpoonMenuController.openRepo( repositoryName );\n }",
"public GitBranch getBranch(String aName)\n{\n Ref ref;\n System.out.println(\"GitDir.getRef: Used to be getRef() but that is gone now. Don't know if this is okay\");\n try { ref = getRepo().exactRef(aName); if (ref==null) return null; }\n catch(Exception e) { throw new RuntimeException(e); }\n String name = ref.getTarget().getName();\n GitBranch b = _branches.get(name);\n if (b==null) _branches.put(name, b=new GitBranch(name));\n return b;\n}",
"@Override\n public List<GitRepositories> getRepoNames(String userName) throws GitException, RepoUserNotFoundException {\n try {\n //replace to user name\n String url = GIT_USRS_REPO_DETAILS.replace(REP_USR_NME, userName);\n //call process method to hit Git api\n ResponseEntity<?> responseEntity = processRequest(url, HttpMethod.GET, getRepoTypRef());\n List<GitRepositories> repos = (List<GitRepositories>) responseEntity.getBody();\n if(CollectionUtils.isEmpty(repos)) {throw new RepoUserNotFoundException(REPO_EMPTY);}\n return repos;\n } catch (HttpClientErrorException hce) {\n LOGGER.error(\"GitApiImpl :: getRepositories HttpClientErrorException :: \", hce);\n throw new GitException(VALID_REPO);\n }\n }",
"@Test\n public void testGetAndDeleteRepos() throws IOException, DuplicateRepoNameException, RepositoryNotFoundException {\n assertFalse(containsRepo(ConfigDatabase.instance().getRepos(), \"test-repo-name1\"));\n\n ConfigDatabase.instance().addRepo(testRepo1);\n assertTrue(containsRepo(ConfigDatabase.instance().getRepos(), \"test-repo-name1\"));\n\n ConfigDatabase.instance().delRepoByName(\"test-repo-name1\");\n assertFalse(containsRepo(ConfigDatabase.instance().getRepos(), \"test-repo-name1\"));\n }",
"private void addToRepoList(String repoName, String lastUpdated) {\n String strRow = repoName + \" / \" + lastUpdated;\n String currentText = tvRepoList.getText().toString();\n this.tvRepoList.setText(currentText + \"\\n\\n\" + strRow);\n }",
"public void setRepository(CollisionRepository repo) \n\t{ \n\t\tmRepo = repo; \n\t}",
"public Repository getRepositoryByName(String repositoryName)\r\n\t{\r\n\t\tIterator it = repositories.values().iterator();\r\n\t\twhile (it.hasNext())\r\n\t\t{\r\n\t\t\tRepository r = (Repository) it.next();\r\n\t\t\tif(r.getName().equals(repositoryName))\r\n\t\t\t\treturn r;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"private void ensureNameExists(String name) throws BadFileException {\n\t\tif (name.equals(\"OuterWalls\") || boardItemMap.containsKey(name)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthrow new BadFileException(name + \" name does not exist yet\");\r\n\t}",
"private String composeWorkspaceUniqueName(String repositoryName, String workspaceName)\n {\n StringBuilder builder = new StringBuilder();\n builder.append(repositoryName);\n builder.append('/');\n builder.append(workspaceName);\n builder.append('/');\n\n return builder.toString();\n }",
"interface WithRepoUrl {\n /**\n * Specifies the repoUrl property: The repo url of the source control..\n *\n * @param repoUrl The repo url of the source control.\n * @return the next definition stage.\n */\n WithCreate withRepoUrl(String repoUrl);\n }",
"public PutRepositoryRequestBuilder setName(String name) {\n request.name(name);\n return this;\n }",
"public void createRepository() throws VcsException {\n final FossilSimpleCommand fossilCommand = new FossilSimpleCommand(myProject, myRepoPath.getParentFile(), FCommandName.new_);\n fossilCommand.addParameters(myRepoPath.getPath());\n String result = fossilCommand.run();\n result = result.replace(\"\\r\", \"\");\n final String[] split = result.split(\"\\n\");\n final List<String> lines = new ArrayList<String>(3);\n for (String line : split) {\n if (! StringUtil.isEmptyOrSpaces(line)) {\n lines.add(line.trim());\n }\n }\n\n if (lines.size() != 3) {\n throw new FossilException(\"Can not parse 'new' output: '\" + result + \"'\");\n }\n final String[] expectedHeaders = {\"project-id:\", \"server-id:\", \"admin-user:\"};\n for (int i = 0; i < lines.size(); i++) {\n final String line = lines.get(i);\n if (! line.startsWith(expectedHeaders[i])) {\n throw new FossilException(\"Can not parse 'new' output, line #\" + (i + 1) + \": '\" + result + \"'\");\n }\n }\n myProjectId = new String(lines.get(0).substring(expectedHeaders[0].length() + 1));\n myServerId = new String(lines.get(1).substring(expectedHeaders[1].length()) + 1);\n final String userPswd = lines.get(2).substring(expectedHeaders[2].length()).trim();\n final int idxSpace = userPswd.indexOf(' ');\n if (idxSpace == -1) {\n throw new FossilException(\"Can not parse 'new' output, user-password area: '\" + result + \"'\");\n }\n myUserName = new String(userPswd.substring(0, idxSpace));\n final int quot1 = userPswd.indexOf('\"', idxSpace + 1);\n int quot2 = -1;\n if (quot1 >= 0) {\n quot2 = userPswd.indexOf('\"', quot1 + 1);\n }\n if (quot1 == -1 || quot2 == -1) {\n throw new FossilException(\"Can not parse 'new' output, user-password area: '\" + result + \"'\");\n }\n myPassword = userPswd.substring(quot1 + 1 , quot2);\n }",
"private void register_to_data_table() {\n\n\t\t\tfinal DataClient dc = this.task.data_client;\n\t\t\tfinal Transaction tx = dc.beginTransaction();\n\n\t\t\tfinal String repoid = this.op_repo;\n\t\t\tString uid = this.op_user;\n\n\t\t\tAliasDAO alias_dao = new AliasDAO(dc);\n\t\t\tuid = alias_dao.findUser(uid);\n\n\t\t\tRepoDTM repoinfo = dc.get(uid, RepoDTM.class);\n\t\t\tif (repoinfo == null) {\n\t\t\t\trepoinfo = new RepoDTM();\n\t\t\t\tdc.insert(uid, repoinfo);\n\t\t\t}\n\n\t\t\tMap<String, RepoItem> tab = repoinfo.getTable();\n\t\t\tif (tab.containsKey(repoid)) {\n\t\t\t\tString msg = \"the repo with name [%s] exists.\";\n\t\t\t\tmsg = String.format(msg, repoid);\n\t\t\t\tthrow new SnowflakeException(msg);\n\t\t\t}\n\n\t\t\tURI location = this.repo.getComponentContext().getURI();\n\n\t\t\tRepoItem item = new RepoItem();\n\t\t\titem.setName(repoid);\n\t\t\titem.setLocation(location.toString());\n\t\t\titem.setDescriptor(this.getRepoDescriptorId().toString());\n\t\t\ttab.put(repoid, item);\n\n\t\t\tdc.update(repoinfo);\n\n\t\t\ttx.commit();\n\n\t\t}",
"@Override\n public GitRepoStats getRepoStatistics(String userName, String repoName , String type) throws GitException, RepoUserNotFoundException {\n GitRepoStats openPr=new GitRepoStats();\n try {\n responseCount=0;\n //based on the strategy gets the api url\n StrategyContext createGitApi=new StrategyContext (new GitStatisticsApi());\n String url=createGitApi.createAPI(userName,repoName,type);\n //call recessive the pr api with open status by reading the headers rel value\n processPrdDetails(url,true);\n openPr.setCount(responseCount);\n } catch (HttpClientErrorException hce) {\n LOGGER.error(\"GitApiImpl :: getRepoStatistics HttpClientErrorException :: \", hce);\n throw new GitException(VALID_REPO);\n }\n return openPr;\n }",
"public @Nullable String getRepoIdIfEmbeddingExists(@NotNull String repoName) throws IOException {\n String query =\n \"query Repository($name: String!) {\\n\"\n + \" repository(name: $name) {\\n\"\n + \" id\\n\"\n + \" embeddingExists\\n\"\n + \" }\\n\"\n + \"}\";\n JsonObject variables = new JsonObject();\n variables.add(\"name\", new JsonPrimitive(repoName));\n GraphQlResponse response =\n GraphQlClient.callGraphQLService(\n instanceUrl, accessToken, customRequestHeaders, query, variables);\n if (response.getStatusCode() != 200) {\n throw new IOException(\"GraphQL request failed with status code \" + response.getStatusCode());\n } else {\n try {\n JsonObject body = response.getBodyAsJson();\n JsonObject data = body.getAsJsonObject(\"data\");\n if (data == null || data.get(\"repository\").isJsonNull()) { // Embedding does not exist\n return null;\n }\n JsonObject repository = data.getAsJsonObject(\"repository\");\n boolean embeddingExists = repository.getAsJsonPrimitive(\"embeddingExists\").getAsBoolean();\n if (embeddingExists) {\n return repository.getAsJsonPrimitive(\"id\").getAsString();\n } else {\n return null;\n }\n } catch (JsonSyntaxException | ClassCastException e) {\n throw new IOException(\"GraphQL response is not valid JSON\", e);\n }\n }\n }",
"public HawtDBAggregationRepository(String repositoryName) {\n StringHelper.notEmpty(repositoryName, \"repositoryName\");\n this.repositoryName = repositoryName;\n }",
"Response head(String repoName, String repoPath, UriInfo baseURI);",
"void branch(String branchName) {\n File curr = new File(\".gitlet/current\");\n String path = null;\n File newBranch = new File(\".gitlet/heads/\" + branchName + \".ser\");\n for (File file: curr.listFiles()) {\n path = file.getName();\n }\n if (newBranch.exists()) {\n System.out.println(\"A branch with that name already exists.\");\n return;\n } else {\n Commit currCom = deserializeCommit(\".gitlet/current/\" + path);\n try {\n FileOutputStream fieOut = new FileOutputStream(newBranch);\n ObjectOutputStream obetOut = new ObjectOutputStream(fieOut);\n obetOut.writeObject(currCom);\n } catch (IOException e) {\n System.out.println(\"p\");\n }\n }\n }",
"public WPIMavenRepo mirror(String name, final Action<WPIMavenRepo> config) {\n WPIMavenRepo mirr = project.getObjects().newInstance(WPIMavenRepo.class, name);\n mirr.setPriority(WPIMavenRepo.PRIORITY_MIRROR);\n config.execute(mirr);\n this.add(mirr);\n return mirr;\n }",
"String getDefaultRemote(String _default_) throws GitException, InterruptedException;",
"String getSubmoduleUrl(String name) throws GitException, InterruptedException;",
"@Override\r\n\tpublic int checkInit(String name) {\n\t\tint a = -1;\r\n\t\t a = userReposotory.checkInitByName(name);\r\n\t\treturn a;\r\n\t}",
"String getDockerRepositoryName();",
"void setRepoType(String repoType);",
"private void createRepository(URL repository) throws IOException, ProcessingException {\n if(repository.getPath().equals(\"/\"))\n throw new ProcessingException(\"Illegal repository name\");\n try {\n exec(buildSvnWithUsername(\"proplist \"+repository),new File(\".\"),\"N/A\");\n } catch (ProcessingException e) {\n // directory doesn't exist\n URL parent;\n if(repository.getPath().endsWith(\"/\"))\n parent = new URL(repository, \"..\");\n else\n parent = new URL(repository, \".\");\n createRepository(parent);\n\n listener.info(repository+\" doesn't exist. creating\");\n exec(buildSvnWithUsername(\"mkdir -m \\\"\"+commitMessage+\"\\\" \"+repository),new File(\".\"),\"Failed to create directory\");\n }\n }",
"public void setRepos(String repos) {\n this.repos = repos;\n }",
"@Test\n public void testUpdateWithDifferentExistingNameShouldFail() {\n when(repository().queryByPredicates(any(Predicate.class))).thenAnswer(env -> productMockSecond);\n\n // when\n org.jboss.pnc.dto.Product productUpdate = org.jboss.pnc.dto.Product.builder()\n .id(productMock.getId().toString())\n .name(productMockSecond.getName())\n .abbreviation(productMock.getAbbreviation())\n .description(productMock.getDescription())\n .build();\n\n assertThatThrownBy(() -> provider.update(productMock.getId().toString(), productUpdate))\n .isInstanceOf(ConflictedEntryException.class);\n\n }",
"private File createNewFileName(File branch, String fileName)\r\n \t{\r\n \t\ttry {\r\n \r\n \t\t\tString newFileName = branch.getCanonicalFile() + \"/\"+ fileName;\r\n \t\t\tFile newFile= new File(newFileName);\r\n \t\t\t//if this filename already exists\r\n \t\t\tif (newFile.exists())\r\n \t\t\t{\r\n \t\t\t\tString prefix= fileName;\r\n \t\t\t\tString suffix= \"\";\r\n \t\t\t\tString[] parts= fileName.split(\"[.]\");\r\n \t\t\t\tif (parts.length >1)\r\n \t\t\t\t{\r\n \t\t\t\t\tprefix= \"\";\r\n \t\t\t\t\tfor (int i= 0; i < parts.length-1; i++)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\tif (i==0) prefix= prefix + parts[i];\r\n \t\t\t\t\t\telse prefix= prefix + \".\" + parts[i];\r\n \t\t\t\t\t}\r\n \t\t\t\t\tsuffix= \".\"+parts[parts.length-1];\r\n \t\t\t\t}\t\r\n \t\t\t\tint i= 0;\r\n \t\t\t\t//searching for new name\r\n \t\t\t\twhile(newFile.exists())\r\n \t\t\t\t{\r\n \t\t\t\t\tnewFileName= branch.getCanonicalFile() + \"/\"+ prefix+ \"_\"+i+suffix;\r\n \t\t\t\t\tnewFile= new File(newFileName);\r\n \t\t\t\t\ti++;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\treturn(newFile);\r\n \t\t} catch (IOException e) {\r\n \t\t\tthrow new ExternalFileMgrException(e);\r\n \t\t}\r\n \t}",
"private boolean isAlreadyExist(String name, String extension) {\n if (extension.equals(\"\")) {\n if (isSameNameExist(tree.getRoot(), name, true, extension)) {\n SC.warn(\"Folder is already exist\");\n if (\"yellow\".equals(leftLayout.getBackgroundColor())) {\n leftLayout.setBackgroundColor(\"white\");\n }\n return true;\n }\n } else {\n if (isSameNameExist(tree.getRoot(), name, false, extension)) {\n SC.warn(\"File is already exist\");\n if (\"yellow\".equals(leftLayout.getBackgroundColor())) {\n leftLayout.setBackgroundColor(\"white\");\n }\n return true;\n }\n }\n return false;\n }",
"@Override\n\t\t\tpublic void run(@Nonnull ProgressIndicator indicator)\n\t\t\t{\n\t\t\t\tLOG.info(\"Creating GitHub repository\");\n\t\t\t\tindicator.setText(\"Creating GitHub repository...\");\n\t\t\t\tfinal String url = createGithubRepository(project, githubInfo.getAuthData(), name, description,\n\t\t\t\t\t\tisPrivate);\n\t\t\t\tif(url == null)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tLOG.info(\"Successfully created GitHub repository\");\n\n\t\t\t\t// creating empty git repo if git is not initialized\n\t\t\t\tLOG.info(\"Binding local project with GitHub\");\n\t\t\t\tif(!gitDetected)\n\t\t\t\t{\n\t\t\t\t\tLOG.info(\"No git detected, creating empty git repo\");\n\t\t\t\t\tindicator.setText(\"Creating empty git repo...\");\n\t\t\t\t\tif(!createEmptyGitRepository(project, root, indicator))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tGitRepositoryManager repositoryManager = GitUtil.getRepositoryManager(project);\n\t\t\t\tfinal GitRepository repository = repositoryManager.getRepositoryForRoot(root);\n\t\t\t\tLOG.assertTrue(repository != null, \"GitRepository is null for root \" + root);\n\n\t\t\t\tfinal String remoteUrl = GithubUrlUtil.getGitHost() + \"/\" + githubInfo.getUser().getLogin() + \"/\" +\n\t\t\t\t\t\tname + \".git\";\n\t\t\t\tfinal String remoteName = finalExternalRemoteDetected ? \"github\" : \"origin\";\n\n\t\t\t\t//git remote add origin git@github.com:login/name.git\n\t\t\t\tLOG.info(\"Adding GitHub as a remote host\");\n\t\t\t\tindicator.setText(\"Adding GitHub as a remote host...\");\n\t\t\t\tif(!addGithubRemote(project, root, remoteName, remoteUrl, repository))\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// create sample commit for binding project\n\t\t\t\tif(!performFirstCommitIfRequired(project, root, repository, indicator, name, url))\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t//git push origin master\n\t\t\t\tLOG.info(\"Pushing to github master\");\n\t\t\t\tindicator.setText(\"Pushing to github master...\");\n\t\t\t\tif(!pushCurrentBranch(project, repository, remoteName, remoteUrl, name, url))\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tGithubNotifications.showInfoURL(project, \"Successfully shared project on GitHub\", name, url);\n\t\t\t}",
"public static RepoInfo repoInfo(String fileName, Project project) {\n String fileRel = \"\";\n String remoteURL = \"\";\n String branch = \"\";\n try{\n // Determine repository root directory.\n String fileDir = fileName.substring(0, fileName.lastIndexOf(\"/\"));\n String repoRoot = gitRootDir(fileDir);\n\n // Determine file path, relative to repository root.\n fileRel = fileName.substring(repoRoot.length()+1);\n remoteURL = configuredGitRemoteURL(repoRoot);\n branch = SourcegraphUtil.setDefaultBranch(project)!=null ? SourcegraphUtil.setDefaultBranch(project) : gitBranch(repoRoot);\n\n // If on a branch that does not exist on the remote and no defaultBranch is configured\n // use \"master\" instead.\n // This allows users to check out a branch that does not exist in origin remote by setting defaultBranch\n if (!isRemoteBranch(branch, repoRoot) && SourcegraphUtil.setDefaultBranch(project)==null) {\n branch = \"master\";\n }\n\n // replace remoteURL if config option is not null\n String r = SourcegraphUtil.setRemoteUrlReplacements(project);\n if(r!=null) {\n String[] replacements = r.trim().split(\"\\\\s*,\\\\s*\");\n // Check if the entered values are pairs\n for (int i = 0; i < replacements.length && replacements.length % 2 == 0; i += 2) {\n remoteURL = remoteURL.replace(replacements[i], replacements[i+1]);\n }\n }\n } catch (Exception err) {\n Logger.getInstance(SourcegraphUtil.class).info(err);\n err.printStackTrace();\n }\n return new RepoInfo(fileRel, remoteURL, branch);\n }",
"public static void createRepo(String entityName,\n\t\t\tString idClass,\n\t\t\tString tableName,\n\t\t\tString repoName) throws Exception{\n VelocityEngine ve = new VelocityEngine();\n //ve.setProperty(RuntimeConstants.RESOURCE_LOADER, \"classpath\");\n // ve.setProperty(\"classpath.resource.loader.class\", ClasspathResourceLoader.class.getName());\n ve.init();\t\t\n /* next, get the Template */\n Template t = ve.getTemplate( \"./src/javautils/repositoryInterface.vm\" );\n /* create a context and add data */\n \n\n String idClassPack = (StringUtils.endsWith(idClass, \"PK\"))?\n \t\t\"import com.tb.aol.domain.entity.\" + idClass +\";\" : \"\";\n\n \t\n \t\n VelocityContext context = new VelocityContext();\n context.put(\"idclasspack\", idClassPack);\n context.put(\"idclass\", idClass);\n \n context.put(\"table\", tableName);\n context.put(\"fname\", repoName);\n context.put(\"entity\", entityName);\n \n \n \n /* now render the template into a StringWriter */\n StringWriter writer = new StringWriter();\n t.merge( context, writer );\n \n File file = new File(\"C:/rearch/temp/\"+repoName + \".java\");\n \n FileUtils.writeStringToFile(file, writer.toString(), \"UTF-8\");\n \n \t\t\n\t}",
"public String getRepositoryName() {\n return this.repositoryName;\n }",
"public synchronized Repository getRepository(String currentUser, String name)\n\t\t\tthrows UserAccessException {\n\n\t\tif (!isAnonymousUser(currentUser)) {\n\t\t\tvalidateUser(currentUser);\n\t\t}\n\n\t\tRepository rep = repositoryMap.get(name);\n\t\tif (rep != null) {\n\t\t\trep.validateReadPrivilege(currentUser);\n\t\t}\n\t\treturn rep;\n\t}",
"private void pull(FederationModel registration) throws Exception {\n\t\tMap<String, RepositoryModel> repositories = FederationUtils.getRepositories(registration,\n\t\t\t\ttrue);\n\t\tString registrationFolder = registration.folder.toLowerCase().trim();\n\t\t// confirm valid characters in server alias\n\t\tCharacter c = StringUtils.findInvalidCharacter(registrationFolder);\n\t\tif (c != null) {\n\t\t\tlogger.error(MessageFormat\n\t\t\t\t\t.format(\"Illegal character ''{0}'' in folder name ''{1}'' of federation registration {2}!\",\n\t\t\t\t\t\t\tc, registrationFolder, registration.name));\n\t\t\treturn;\n\t\t}\n\t\tFile repositoriesFolder = gitblit.getRepositoriesFolder();\n\t\tFile registrationFolderFile = new File(repositoriesFolder, registrationFolder);\n\t\tregistrationFolderFile.mkdirs();\n\n\t\t// Clone/Pull the repository\n\t\tfor (Map.Entry<String, RepositoryModel> entry : repositories.entrySet()) {\n\t\t\tString cloneUrl = entry.getKey();\n\t\t\tRepositoryModel repository = entry.getValue();\n\t\t\tif (!repository.hasCommits) {\n\t\t\t\tlogger.warn(MessageFormat.format(\n\t\t\t\t\t\t\"Skipping federated repository {0} from {1} @ {2}. Repository is EMPTY.\",\n\t\t\t\t\t\trepository.name, registration.name, registration.url));\n\t\t\t\tregistration.updateStatus(repository, FederationPullStatus.SKIPPED);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Determine local repository name\n\t\t\tString repositoryName;\n\t\t\tif (StringUtils.isEmpty(registrationFolder)) {\n\t\t\t\trepositoryName = repository.name;\n\t\t\t} else {\n\t\t\t\trepositoryName = registrationFolder + \"/\" + repository.name;\n\t\t\t}\n\n\t\t\tif (registration.bare) {\n\t\t\t\t// bare repository, ensure .git suffix\n\t\t\t\tif (!repositoryName.toLowerCase().endsWith(DOT_GIT_EXT)) {\n\t\t\t\t\trepositoryName += DOT_GIT_EXT;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// normal repository, strip .git suffix\n\t\t\t\tif (repositoryName.toLowerCase().endsWith(DOT_GIT_EXT)) {\n\t\t\t\t\trepositoryName = repositoryName.substring(0,\n\t\t\t\t\t\t\trepositoryName.indexOf(DOT_GIT_EXT));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// confirm that the origin of any pre-existing repository matches\n\t\t\t// the clone url\n\t\t\tString fetchHead = null;\n\t\t\tRepository existingRepository = gitblit.getRepository(repositoryName);\n\n\t\t\tif (existingRepository == null && gitblit.isCollectingGarbage(repositoryName)) {\n\t\t\t\tlogger.warn(MessageFormat.format(\"Skipping local repository {0}, busy collecting garbage\", repositoryName));\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (existingRepository != null) {\n\t\t\t\tStoredConfig config = existingRepository.getConfig();\n\t\t\t\tconfig.load();\n\t\t\t\tString origin = config.getString(\"remote\", \"origin\", \"url\");\n\t\t\t\tRevCommit commit = JGitUtils.getCommit(existingRepository,\n\t\t\t\t\t\torg.eclipse.jgit.lib.Constants.FETCH_HEAD);\n\t\t\t\tif (commit != null) {\n\t\t\t\t\tfetchHead = commit.getName();\n\t\t\t\t}\n\t\t\t\texistingRepository.close();\n\t\t\t\tif (!origin.startsWith(registration.url)) {\n\t\t\t\t\tlogger.warn(MessageFormat\n\t\t\t\t\t\t\t.format(\"Skipping federated repository {0} from {1} @ {2}. Origin does not match, consider EXCLUDING.\",\n\t\t\t\t\t\t\t\t\trepository.name, registration.name, registration.url));\n\t\t\t\t\tregistration.updateStatus(repository, FederationPullStatus.SKIPPED);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// clone/pull this repository\n\t\t\tCredentialsProvider credentials = new UsernamePasswordCredentialsProvider(\n\t\t\t\t\tConstants.FEDERATION_USER, registration.token);\n\t\t\tlogger.info(MessageFormat.format(\"Pulling federated repository {0} from {1} @ {2}\",\n\t\t\t\t\trepository.name, registration.name, registration.url));\n\n\t\t\tCloneResult result = JGitUtils.cloneRepository(registrationFolderFile, repository.name,\n\t\t\t\t\tcloneUrl, registration.bare, credentials);\n\t\t\tRepository r = gitblit.getRepository(repositoryName);\n\t\t\tRepositoryModel rm = gitblit.getRepositoryModel(repositoryName);\n\t\t\trepository.isFrozen = registration.mirror;\n\t\t\tif (result.createdRepository) {\n\t\t\t\t// default local settings\n\t\t\t\trepository.federationStrategy = FederationStrategy.EXCLUDE;\n\t\t\t\trepository.isFrozen = registration.mirror;\n\t\t\t\trepository.showRemoteBranches = !registration.mirror;\n\t\t\t\tlogger.info(MessageFormat.format(\" cloning {0}\", repository.name));\n\t\t\t\tregistration.updateStatus(repository, FederationPullStatus.MIRRORED);\n\t\t\t} else {\n\t\t\t\t// fetch and update\n\t\t\t\tboolean fetched = false;\n\t\t\t\tRevCommit commit = JGitUtils.getCommit(r, org.eclipse.jgit.lib.Constants.FETCH_HEAD);\n\t\t\t\tString newFetchHead = commit.getName();\n\t\t\t\tfetched = fetchHead == null || !fetchHead.equals(newFetchHead);\n\n\t\t\t\tif (registration.mirror) {\n\t\t\t\t\t// mirror\n\t\t\t\t\tif (fetched) {\n\t\t\t\t\t\t// update local branches to match the remote tracking branches\n\t\t\t\t\t\tfor (RefModel ref : JGitUtils.getRemoteBranches(r, false, -1)) {\n\t\t\t\t\t\t\tif (ref.displayName.startsWith(\"origin/\")) {\n\t\t\t\t\t\t\t\tString branch = org.eclipse.jgit.lib.Constants.R_HEADS\n\t\t\t\t\t\t\t\t\t\t+ ref.displayName.substring(ref.displayName.indexOf('/') + 1);\n\t\t\t\t\t\t\t\tString hash = ref.getReferencedObjectId().getName();\n\n\t\t\t\t\t\t\t\tJGitUtils.setBranchRef(r, branch, hash);\n\t\t\t\t\t\t\t\tlogger.info(MessageFormat.format(\" resetting {0} of {1} to {2}\", branch,\n\t\t\t\t\t\t\t\t\t\trepository.name, hash));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tString newHead;\n\t\t\t\t\t\tif (StringUtils.isEmpty(repository.HEAD)) {\n\t\t\t\t\t\t\tnewHead = newFetchHead;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnewHead = repository.HEAD;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tJGitUtils.setHEADtoRef(r, newHead);\n\t\t\t\t\t\tlogger.info(MessageFormat.format(\" resetting HEAD of {0} to {1}\",\n\t\t\t\t\t\t\t\trepository.name, newHead));\n\t\t\t\t\t\tregistration.updateStatus(repository, FederationPullStatus.MIRRORED);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// indicate no commits pulled\n\t\t\t\t\t\tregistration.updateStatus(repository, FederationPullStatus.NOCHANGE);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// non-mirror\n\t\t\t\t\tif (fetched) {\n\t\t\t\t\t\t// indicate commits pulled to origin/master\n\t\t\t\t\t\tregistration.updateStatus(repository, FederationPullStatus.PULLED);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// indicate no commits pulled\n\t\t\t\t\t\tregistration.updateStatus(repository, FederationPullStatus.NOCHANGE);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// preserve local settings\n\t\t\t\trepository.isFrozen = rm.isFrozen;\n\t\t\t\trepository.federationStrategy = rm.federationStrategy;\n\n\t\t\t\t// merge federation sets\n\t\t\t\tSet<String> federationSets = new HashSet<String>();\n\t\t\t\tif (rm.federationSets != null) {\n\t\t\t\t\tfederationSets.addAll(rm.federationSets);\n\t\t\t\t}\n\t\t\t\tif (repository.federationSets != null) {\n\t\t\t\t\tfederationSets.addAll(repository.federationSets);\n\t\t\t\t}\n\t\t\t\trepository.federationSets = new ArrayList<String>(federationSets);\n\n\t\t\t\t// merge indexed branches\n\t\t\t\tSet<String> indexedBranches = new HashSet<String>();\n\t\t\t\tif (rm.indexedBranches != null) {\n\t\t\t\t\tindexedBranches.addAll(rm.indexedBranches);\n\t\t\t\t}\n\t\t\t\tif (repository.indexedBranches != null) {\n\t\t\t\t\tindexedBranches.addAll(repository.indexedBranches);\n\t\t\t\t}\n\t\t\t\trepository.indexedBranches = new ArrayList<String>(indexedBranches);\n\n\t\t\t}\n\t\t\t// only repositories that are actually _cloned_ from the origin\n\t\t\t// Gitblit repository are marked as federated. If the origin\n\t\t\t// is from somewhere else, these repositories are not considered\n\t\t\t// \"federated\" repositories.\n\t\t\trepository.isFederated = cloneUrl.startsWith(registration.url);\n\n\t\t\tgitblit.updateConfiguration(r, repository);\n\t\t\tr.close();\n\t\t}\n\n\t\tIUserService userService = null;\n\n\t\ttry {\n\t\t\t// Pull USERS\n\t\t\t// TeamModels are automatically pulled because they are contained\n\t\t\t// within the UserModel. The UserService creates unknown teams\n\t\t\t// and updates existing teams.\n\t\t\tCollection<UserModel> users = FederationUtils.getUsers(registration);\n\t\t\tif (users != null && users.size() > 0) {\n\t\t\t\tFile realmFile = new File(registrationFolderFile, registration.name + \"_users.conf\");\n\t\t\t\trealmFile.delete();\n\t\t\t\tuserService = new ConfigUserService(realmFile);\n\t\t\t\tfor (UserModel user : users) {\n\t\t\t\t\tuserService.updateUserModel(user.username, user);\n\n\t\t\t\t\t// merge the origin permissions and origin accounts into\n\t\t\t\t\t// the user accounts of this Gitblit instance\n\t\t\t\t\tif (registration.mergeAccounts) {\n\t\t\t\t\t\t// reparent all repository permissions if the local\n\t\t\t\t\t\t// repositories are stored within subfolders\n\t\t\t\t\t\tif (!StringUtils.isEmpty(registrationFolder)) {\n\t\t\t\t\t\t\tif (user.permissions != null) {\n\t\t\t\t\t\t\t\t// pulling from >= 1.2 version\n\t\t\t\t\t\t\t\tMap<String, AccessPermission> copy = new HashMap<String, AccessPermission>(user.permissions);\n\t\t\t\t\t\t\t\tuser.permissions.clear();\n\t\t\t\t\t\t\t\tfor (Map.Entry<String, AccessPermission> entry : copy.entrySet()) {\n\t\t\t\t\t\t\t\t\tuser.setRepositoryPermission(registrationFolder + \"/\" + entry.getKey(), entry.getValue());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// pulling from <= 1.1 version\n\t\t\t\t\t\t\t\tList<String> permissions = new ArrayList<String>(user.repositories);\n\t\t\t\t\t\t\t\tuser.repositories.clear();\n\t\t\t\t\t\t\t\tfor (String permission : permissions) {\n\t\t\t\t\t\t\t\t\tuser.addRepositoryPermission(registrationFolder + \"/\" + permission);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// insert new user or update local user\n\t\t\t\t\t\tUserModel localUser = gitblit.getUserModel(user.username);\n\t\t\t\t\t\tif (localUser == null) {\n\t\t\t\t\t\t\t// create new local user\n\t\t\t\t\t\t\tgitblit.addUser(user);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// update repository permissions of local user\n\t\t\t\t\t\t\tif (user.permissions != null) {\n\t\t\t\t\t\t\t\t// pulling from >= 1.2 version\n\t\t\t\t\t\t\t\tMap<String, AccessPermission> copy = new HashMap<String, AccessPermission>(user.permissions);\n\t\t\t\t\t\t\t\tfor (Map.Entry<String, AccessPermission> entry : copy.entrySet()) {\n\t\t\t\t\t\t\t\t\tlocalUser.setRepositoryPermission(entry.getKey(), entry.getValue());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// pulling from <= 1.1 version\n\t\t\t\t\t\t\t\tfor (String repository : user.repositories) {\n\t\t\t\t\t\t\t\t\tlocalUser.addRepositoryPermission(repository);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlocalUser.password = user.password;\n\t\t\t\t\t\t\tlocalUser.canAdmin = user.canAdmin;\n\t\t\t\t\t\t\tgitblit.reviseUser(localUser.username, localUser);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (String teamname : gitblit.getAllTeamNames()) {\n\t\t\t\t\t\t\tTeamModel team = gitblit.getTeamModel(teamname);\n\t\t\t\t\t\t\tif (user.isTeamMember(teamname) && !team.hasUser(user.username)) {\n\t\t\t\t\t\t\t\t// new team member\n\t\t\t\t\t\t\t\tteam.addUser(user.username);\n\t\t\t\t\t\t\t\tgitblit.updateTeamModel(teamname, team);\n\t\t\t\t\t\t\t} else if (!user.isTeamMember(teamname) && team.hasUser(user.username)) {\n\t\t\t\t\t\t\t\t// remove team member\n\t\t\t\t\t\t\t\tteam.removeUser(user.username);\n\t\t\t\t\t\t\t\tgitblit.updateTeamModel(teamname, team);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// update team repositories\n\t\t\t\t\t\t\tTeamModel remoteTeam = user.getTeam(teamname);\n\t\t\t\t\t\t\tif (remoteTeam != null) {\n\t\t\t\t\t\t\t\tif (remoteTeam.permissions != null) {\n\t\t\t\t\t\t\t\t\t// pulling from >= 1.2\n\t\t\t\t\t\t\t\t\tfor (Map.Entry<String, AccessPermission> entry : remoteTeam.permissions.entrySet()){\n\t\t\t\t\t\t\t\t\t\tteam.setRepositoryPermission(entry.getKey(), entry.getValue());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tgitblit.updateTeamModel(teamname, team);\n\t\t\t\t\t\t\t\t} else if (!ArrayUtils.isEmpty(remoteTeam.repositories)) {\n\t\t\t\t\t\t\t\t\t// pulling from <= 1.1\n\t\t\t\t\t\t\t\t\tteam.addRepositoryPermissions(remoteTeam.repositories);\n\t\t\t\t\t\t\t\t\tgitblit.updateTeamModel(teamname, team);\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} catch (ForbiddenException e) {\n\t\t\t// ignore forbidden exceptions\n\t\t} catch (IOException e) {\n\t\t\tlogger.warn(MessageFormat.format(\n\t\t\t\t\t\"Failed to retrieve USERS from federated gitblit ({0} @ {1})\",\n\t\t\t\t\tregistration.name, registration.url), e);\n\t\t}\n\n\t\ttry {\n\t\t\t// Pull TEAMS\n\t\t\t// We explicitly pull these even though they are embedded in\n\t\t\t// UserModels because it is possible to use teams to specify\n\t\t\t// mailing lists or push scripts without specifying users.\n\t\t\tif (userService != null) {\n\t\t\t\tCollection<TeamModel> teams = FederationUtils.getTeams(registration);\n\t\t\t\tif (teams != null && teams.size() > 0) {\n\t\t\t\t\tfor (TeamModel team : teams) {\n\t\t\t\t\t\tuserService.updateTeamModel(team);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ForbiddenException e) {\n\t\t\t// ignore forbidden exceptions\n\t\t} catch (IOException e) {\n\t\t\tlogger.warn(MessageFormat.format(\n\t\t\t\t\t\"Failed to retrieve TEAMS from federated gitblit ({0} @ {1})\",\n\t\t\t\t\tregistration.name, registration.url), e);\n\t\t}\n\n\t\ttry {\n\t\t\t// Pull SETTINGS\n\t\t\tMap<String, String> settings = FederationUtils.getSettings(registration);\n\t\t\tif (settings != null && settings.size() > 0) {\n\t\t\t\tProperties properties = new Properties();\n\t\t\t\tproperties.putAll(settings);\n\t\t\t\tFileOutputStream os = new FileOutputStream(new File(registrationFolderFile,\n\t\t\t\t\t\tregistration.name + \"_\" + Constants.PROPERTIES_FILE));\n\t\t\t\tproperties.store(os, null);\n\t\t\t\tos.close();\n\t\t\t}\n\t\t} catch (ForbiddenException e) {\n\t\t\t// ignore forbidden exceptions\n\t\t} catch (IOException e) {\n\t\t\tlogger.warn(MessageFormat.format(\n\t\t\t\t\t\"Failed to retrieve SETTINGS from federated gitblit ({0} @ {1})\",\n\t\t\t\t\tregistration.name, registration.url), e);\n\t\t}\n\n\t\ttry {\n\t\t\t// Pull SCRIPTS\n\t\t\tMap<String, String> scripts = FederationUtils.getScripts(registration);\n\t\t\tif (scripts != null && scripts.size() > 0) {\n\t\t\t\tfor (Map.Entry<String, String> script : scripts.entrySet()) {\n\t\t\t\t\tString scriptName = script.getKey();\n\t\t\t\t\tif (scriptName.endsWith(\".groovy\")) {\n\t\t\t\t\t\tscriptName = scriptName.substring(0, scriptName.indexOf(\".groovy\"));\n\t\t\t\t\t}\n\t\t\t\t\tFile file = new File(registrationFolderFile, registration.name + \"_\"\n\t\t\t\t\t\t\t+ scriptName + \".groovy\");\n\t\t\t\t\tFileUtils.writeContent(file, script.getValue());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ForbiddenException e) {\n\t\t\t// ignore forbidden exceptions\n\t\t} catch (IOException e) {\n\t\t\tlogger.warn(MessageFormat.format(\n\t\t\t\t\t\"Failed to retrieve SCRIPTS from federated gitblit ({0} @ {1})\",\n\t\t\t\t\tregistration.name, registration.url), e);\n\t\t}\n\t}",
"public Node addNodeByNameIfNotExists(String name) {\n if (!nodes.containsKey(name)) {\n nodes.put(name, new Node(name));\n }\n \n // Return existing node\n return nodes.get(name);\n }",
"public Patron issueCard(String nameOfPatron){\n //Check whether the patron has already had a card!\n if (!this.patron.containsKey(nameOfPatron)){\n Patron newPatron = new Patron(nameOfPatron,this);\n this.patron.put(nameOfPatron, newPatron);\n this.println(\"OK! A card has beed issued to \"+ nameOfPatron);\n return newPatron;\n }\n else{\n this.println(\"No two cards! This Patron has already had a Library Card!!!\");\n return null;\n }\n\n }",
"@Override\n public boolean error(final Message message,\n final Throwable throwable) {\n final Throwable _throwable = (throwable.getCause() == null ? throwable : throwable.getCause());\n if (_throwable instanceof GAVAlreadyExistsException) {\n final GAVAlreadyExistsException gae = (GAVAlreadyExistsException) _throwable;\n conflictingRepositoriesPopup.setContent(gae.getGAV(),\n gae.getRepositories(),\n new Command() {\n @Override\n public void execute() {\n conflictingRepositoriesPopup.hide();\n doRepositoryStructureInitialization(DeploymentMode.FORCED);\n }\n });\n conflictingRepositoriesPopup.show();\n return true;\n } else {\n return super.error(message,\n _throwable);\n }\n }",
"public void testGetProjectByNameRepeated() throws Exception {\r\n ProjectServiceRemote projectService = lookupProjectServiceRemoteWithUserRole();\r\n\r\n // null name\r\n try {\r\n projectService.getProjectByName(\"repeated\", 1);\r\n fail(\"PersistenceException expected.\");\r\n } catch (PersistenceFault e) {\r\n // expected\r\n }\r\n }",
"@Override\n public List<GitContributors> getContributorsNames(String userName, String repoName) throws GitException, RepoUserNotFoundException {\n try {\n StrategyContext createGitApi=new StrategyContext (new GitContributorApi());\n String url=createGitApi.createAPI(userName,repoName,\"contributer\");\n ResponseEntity<?> responseEntity = processRequest(url, HttpMethod.GET, getRepoContributorsTypRef());\n List<GitContributors> repos = (List<GitContributors>) responseEntity.getBody();\n if(CollectionUtils.isEmpty(repos)) {throw new RepoUserNotFoundException(REPO_EMPTY);}\n return repos;\n\n } catch (HttpClientErrorException hce) {\n LOGGER.error(\"GitApiImpl :: getRepositories HttpClientErrorException :: \", hce);\n throw new GitException(VALID_REPO);\n }\n }",
"@Test\n public void testInitialiseOnExistingRepo() throws Exception {\n moveToTempTestDirectory(\"test-project-initialise\", \"pom.xml\");\n\n final File rootFolder = getFolder().getRoot();\n assertTrue(rootFolder.exists());\n Git.init().setDirectory(rootFolder).call();\n\n verifyRepositoryInitializedWithoutErrors(rootFolder);\n }",
"@Override\n public boolean isRename() {\n return false;\n }",
"public void checkout(String name) throws IOException {\n\t\tif (myBranch.keySet().contains(name)) {\n\t\t\tif (conflictState) {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.println(\"Cannot do this command until the merge conflict has been resolved.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (name == currentBranch) {\n\t\t\t\tSystem.out.println(\"No need to checkout the current branch.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfor (String s : myBranch.get(name).file().keySet()) {\n\t\t\t\tcheckoutHelper(s);\n\t\t\t\tFile before = new File(myBranch.get(name).file().get(s));\n\t\t\t\tFile after = new File(\"./\" + s);\n\t\t\t\tcopyFile(before.getCanonicalPath(), after.getCanonicalPath());\n\t\t\t}\n\t\t\tcurrentBranch = name;\n\t\t\tmyHead = myBranch.get(name);\n\t\t\ttracked = myHead.file();\n\n\t\t} else if (myHead.file().keySet().contains(name)) {\n\t\t\tcheckoutHelper(name);\n\t\t\tString path = myHead.file().get(name);\n\t\t\tFile workingDirectory = new File(\".\");\n\t\t\tFile result = new File(workingDirectory.getCanonicalPath() + \"/\"\n\t\t\t\t\t+ name);\n\t\t\tcopyFile(path, result.getCanonicalPath());\n\t\t} else {\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"File does not exist in the most recent commit, or no such branch exists.\");\n\t\t}\n\t\tSerialization();\n\t}",
"String getRepoType();",
"public Repository createRepository(String fileServerName, \r\n \t\tString displayName,\r\n \t\tString folderSystemName, \r\n \t\tString repoName, \r\n \t\tString fileDatabasePath,\r\n \t\tString defaultFolderDispalyName) throws LocationAlreadyExistsException\r\n {\r\n\r\n\t\t// create the file server\r\n\t\tfileServer = fileServerService.createFileServer(fileServerName);\r\n\t\tfileServer.setId(1l);\r\n\r\n\t\t// create the file database\r\n\t\tDefaultFileDatabaseInfo fileDatabaseInfo = new DefaultFileDatabaseInfo(fileServer.getId(),\r\n\t\t\t\tdisplayName, folderSystemName, fileDatabasePath, defaultFolderDispalyName, \"uniqueFolderName\");\r\n\t\tFileDatabase fileDatabase = fileServerService.createFileDatabase(fileDatabaseInfo);\r\n\t\t\r\n\t\t// create the repository\r\n\t\trepository = repositoryService.createRepository(repoName, fileDatabase);\r\n\t\trepository.setId(1l);\r\n\t\t\r\n\t\treturn repository;\r\n }",
"public static String getRepositoryName(@NotNull JSONObject jsonObject) {\n return jsonObject.getJSONObject(\"repository\").get(\"name\").toString();\n }",
"@TaskAction\n public void configureRepository() throws IOException {\n GitHub github = GitHub.connect(null, getGithubToken());\n String user = github.getMyself().getLogin();\n GHRepository repository = null;\n\n try {\n repository = github.getRepository(user + \"/\" + getRepositoryName());\n }\n catch (FileNotFoundException e) {\n GHCreateRepositoryBuilder repositoryCreator = github.createRepository(getRepositoryName());\n repository = repositoryCreator.create();\n }\n\n String description = getRepositoryDescription();\n\n if (description != null && !description.equals(repository.getDescription())) {\n repository.setDescription(description);\n }\n }",
"public static void expand(boolean anyRepos) {\n\n\t\tif (anyRepos == false) {\n\t\t\tSystem.out.println(\"No git repositories were found in the specified directory.\\n\");\n\t\t\tSystem.out.println(\"**************************************************************\\n\");\n\t\t\tSystem.out.println(\"Thanks for using gitHound!\\n\");\n\t\t}\n\t\telse {\n\t\t\t// prompt print out\n\t\t\t\n\t\t\tSystem.out.println(\"\\n**************************************************************\\n\");\n\t\t\tSystem.out.println(\"Would you like to expand the status information of a repo above?\");\n\n\t\t\tSystem.out.println(\"Enter: (yes/no)\");\n\n\t\t\t// method to read in if user wants to expand a repo status or not\n\t\t\ttry {\n\t\t\t BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t \n\t\t\t // boolean to detect valid answer\n\t\t\t boolean validAns = false;\n\n\t\t\t \tdo {\n\t\t\t \t\t// take in user input\n\t\t\t\t String s = bufferRead.readLine();\n\t\t\t\t \n\t\t\t\t // if yes go to showStatus method and change validAns to true\n\t\t\t\t if (s.equals(\"yes\") || s.equals(\"Yes\") || s.equals(\"YES\")) {\n\t\t\t\t \tshowStatus();\n\t\t\t\t \tvalidAns = true;\n\t\t\t\t }\n\n\t\t\t\t // turn validAns to true\n\t\t\t\t else if (s.equals(\"no\") || s.equals(\"No\") || s.equals(\"NO\")) {\n\t\t\t\t \tSystem.out.println(\"\\nThank you for using gitHound!\");\n\t\t\t\t \tvalidAns = true;\n\t\t\t\t }\n\n\t\t\t\t // else ask for new input yes or no\n\t\t\t\t else {\n\t\t\t\t \tSystem.out.println(\"Wrong input. Input (yes/no)\");\n\t\t\t\t }\n\n\t\t\t\t} while (validAns == false);\n\n\t\t\t} // try\n\t\t\t\n\t\t\tcatch(IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} // catch\n\t\t}\n\n\t}",
"private static ArtifactRepository createLocalRepository( Embedder embedder, Settings settings,\n CommandLine commandLine )\n throws ComponentLookupException\n {\n ArtifactRepositoryLayout repositoryLayout =\n (ArtifactRepositoryLayout) embedder.lookup( ArtifactRepositoryLayout.ROLE, \"default\" );\n\n ArtifactRepositoryFactory artifactRepositoryFactory =\n (ArtifactRepositoryFactory) embedder.lookup( ArtifactRepositoryFactory.ROLE );\n\n String url = settings.getLocalRepository();\n\n if ( !url.startsWith( \"file:\" ) )\n {\n url = \"file://\" + url;\n }\n\n ArtifactRepository localRepository = new DefaultArtifactRepository( \"local\", url, repositoryLayout );\n\n boolean snapshotPolicySet = false;\n\n if ( commandLine.hasOption( CLIManager.OFFLINE ) )\n {\n settings.setOffline( true );\n\n snapshotPolicySet = true;\n }\n\n if ( !snapshotPolicySet && commandLine.hasOption( CLIManager.UPDATE_SNAPSHOTS ) )\n {\n artifactRepositoryFactory.setGlobalUpdatePolicy( ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS );\n }\n\n if ( commandLine.hasOption( CLIManager.CHECKSUM_FAILURE_POLICY ) )\n {\n System.out.println( \"+ Enabling strict checksum verification on all artifact downloads.\" );\n\n artifactRepositoryFactory.setGlobalChecksumPolicy( ArtifactRepositoryPolicy.CHECKSUM_POLICY_FAIL );\n }\n else if ( commandLine.hasOption( CLIManager.CHECKSUM_WARNING_POLICY ) )\n {\n System.out.println( \"+ Disabling strict checksum verification on all artifact downloads.\" );\n\n artifactRepositoryFactory.setGlobalChecksumPolicy( ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN );\n }\n\n return localRepository;\n }",
"@Test\n\tpublic void createRepo() throws NoFilepatternException, GitAPIException, IOException {\n\t\t\n\t\t\n\t\tFile baseDir = Files.createTempDir(\"gitrepo\");\n\t\tFile gitDir = new File(baseDir, \".git\");\n\n\t\tRepository repo = new FileRepositoryBuilder().setGitDir(gitDir).setWorkTree(baseDir).build();\n\t\trepo.create();\n\n\t\tGit git = new Git(repo);\n\n\t\tFiles.write(\"Nothing\", new File(baseDir,\"my.sample\"));\n\t\t\n\t\tgit.add().addFilepattern(\"*.sample\").call();\n\t\tgit.commit().setMessage(\"first commit\").call();\n\t\t\n\t\tgit.branchCreate().setName(\"new-branch\").call();\n\t\tgit.checkout().setName(\"new-branch\").call();\n\t\t\n\t\tList<Ref> branches = git.branchList().call();\n\t\t\n\t\tSystem.out.println(\"Branches: \"+branches);\n\t\t\n\t\tAssert.assertTrue(\"clean up\",Files.deleteAll(baseDir));\n\t}",
"@Override\n\tpublic void addFinalState(String name) {\n\t\tNFAState s = checkIfExists(name);\n\t\tif( s == null){\n\t\t\ts = new NFAState(name, true);\n\t\t\taddState(s);\n\t\t} else {\n\t\t\tSystem.out.println(\"WARNING: A state with name \" + name + \" already exists in the NFA\");\n\t\t}\n\t}",
"@Override\n\tpublic boolean isExist(String name) {\n\t\treturn false;\n\t}",
"public void setRepository(Repository repo) {\n\t\tthis.repo = repo;\n\t}",
"public abstract boolean manipulateRepositories();",
"public void add(String name) {\n File f = new File(name);\n if (!f.exists()) {\n Utils.message(\"File does not exist.\");\n throw new GitletException();\n }\n Blob blob = new Blob(f);\n untracked.remove(name);\n HashMap<String, Blob> files = head.getContents();\n if (files.containsKey(name)\n && files.get(name).getContent().equals(blob.getContent())) {\n return;\n } else if (!(files.containsKey(name) && files.get(name).equals(blob))) {\n stagingarea.put(blob.getName(), blob);\n File stagefile = Utils.join(staging, blob.getHash());\n Utils.writeObject(stagefile, blob);\n }\n\n }",
"private boolean checkNameExistAdd(String userName) {\n\n\t\tUser user = this.userDAO.getUserByName(userName);\n\t\tif (null != user) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"public CountDownLatch fetchRepo(PitchParams pp) {\n\n final String grmKey = GitRepoModel.genKey(pp);\n log.debug(\"fetchRepo: pp={}\", pp);\n CountDownLatch freshLatch = new CountDownLatch(1);\n CountDownLatch activeLatch =\n repoLatchMap.putIfAbsent(grmKey, freshLatch);\n\n if (activeLatch != null) {\n\n /*\n * Non-null activeLatch implies a fetchRepo() operation\n * is already in progress for this /{user}/{repo}. So\n * activeLatch so caller can block until operation completes.\n */\n log.debug(\"fetchRepo: pp={}, already in progress, \" +\n \"returning existing activeLatch={}\", pp, activeLatch);\n return activeLatch;\n\n } else {\n\n GRS grs = grsManager.get(pp);\n final GRSService grsService = grsManager.getService(grs);\n String apiCall = grsService.repo(pp);\n\n log.debug(\"fetchRepo: apiCall={}\", apiCall);\n final long start = System.currentTimeMillis();\n\n WSRequest apiRequest = wsClient.url(apiCall);\n\n grs.getHeaders().forEach((k,v) -> {\n apiRequest.setHeader(k, v);\n });\n\n CompletableFuture<WSResponse> apiFuture =\n apiRequest.get().toCompletableFuture();\n\n CompletableFuture<GitRepoModel> rmFuture =\n apiFuture.thenApplyAsync(apiResp -> {\n\n log.debug(\"fetchRepo: pp={}, fetch meta time-taken={}\",\n pp, (System.currentTimeMillis() - start));\n\n log.info(\"{}: API Rate Limit Status [ {}, {} ]\",\n grs.getName(),\n apiResp.getHeader(API_RATE_LIMIT),\n apiResp.getHeader(API_RATE_LIMIT_REMAINING));\n\n try {\n\n if (apiResp.getStatus() == HTTP_OK) {\n\n try {\n\n JsonNode json = apiResp.asJson();\n GitRepoModel grm = grsService.model(pp, json);\n\n /*\n * Update pitchCache with new GitRepoModel\n * generated using GitHub API response data.\n */\n pitchCache.set(grm.key(), grm, cacheTimeout.grm(pp));\n\n } catch (Exception ex) {\n /*\n * Prevent any runtime errors, such as JSON parsing,\n * from propogating to the front end.\n */\n log.warn(\"fetchRepo: pp={}, unexpected ex={}\", pp, ex);\n }\n\n } else {\n\n log.debug(\"fetchRepo: pp={}, fail status={}\",\n pp, apiResp.getStatus());\n\n try {\n\n String remainingHdr =\n apiResp.getHeader(API_RATE_LIMIT_REMAINING);\n int rateLimitRemaining =\n Integer.parseInt(remainingHdr);\n\n if (rateLimitRemaining <= 0) {\n log.warn(\"WARNING! {} API rate limit exceeded.\", grs.getName());\n }\n\n } catch (Exception rlex) {\n }\n }\n\n } catch (Exception rex) {\n log.warn(\"fetchRepo: pp={}, unexpected runtime ex={}\", pp, rex);\n }\n\n /*\n * Current operation completed, so remove latch associated\n * with operation from repoLatchMap to permit future operations\n * on this /{user}/{repo}.\n */\n releaseCountDownLatch(repoLatchMap, grmKey);\n\n /*\n * Operation completed, valid result cached, no return required.\n */\n return null;\n\n }, backEndThreads.POOL)\n .handle((result, error) -> {\n\n if (error != null) {\n\n log.warn(\"fetchRepo: pp={}, fetch error={}\", pp, error);\n releaseCountDownLatch(repoLatchMap, grmKey);\n }\n\n return null;\n });\n\n return freshLatch;\n }\n }",
"String repoUrl();",
"@Test\n public void testStoreProductWithExistingNameShouldFail() {\n when(repository().queryByPredicates(any(Predicate.class))).thenAnswer(env -> productMock);\n\n // when\n org.jboss.pnc.dto.Product productDTO = org.jboss.pnc.dto.Product.builder()\n .name(productMock.getName())\n .abbreviation(\"test\")\n .build();\n\n // then\n assertThatThrownBy(() -> provider.store(productDTO)).isInstanceOf(ConflictedEntryException.class);\n }",
"public static void updateRepositoryList() {\n \t\tassetLoader.removeAllRepositories();\n \t\tfor (String repo : MapTool.getCampaign().getRemoteRepositoryList()) {\n \t\t\tassetLoader.addRepository(repo);\n \t\t}\n \t}",
"private static boolean performFirstCommitIfRequired(@Nonnull final Project project,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Nonnull VirtualFile root,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Nonnull GitRepository repository,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Nonnull ProgressIndicator indicator,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Nonnull String name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Nonnull String url)\n\t{\n\t\tif(!repository.isFresh())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\tLOG.info(\"Trying to commit\");\n\t\ttry\n\t\t{\n\t\t\tLOG.info(\"Adding files for commit\");\n\t\t\tindicator.setText(\"Adding files to git...\");\n\n\t\t\t// ask for files to add\n\t\t\tfinal List<VirtualFile> trackedFiles = ChangeListManager.getInstance(project).getAffectedFiles();\n\t\t\tfinal Collection<VirtualFile> untrackedFiles = repository.getUntrackedFilesHolder()\n\t\t\t\t\t.retrieveUntrackedFiles();\n\t\t\tfinal List<VirtualFile> allFiles = new ArrayList<VirtualFile>();\n\t\t\tallFiles.addAll(trackedFiles);\n\t\t\tallFiles.addAll(untrackedFiles);\n\n\t\t\tfinal Ref<GithubUntrackedFilesDialog> dialogRef = new Ref<GithubUntrackedFilesDialog>();\n\t\t\tApplicationManager.getApplication().invokeAndWait(new Runnable()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\tGithubUntrackedFilesDialog dialog = new GithubUntrackedFilesDialog(project, allFiles);\n\t\t\t\t\tif(!trackedFiles.isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tdialog.setSelectedFiles(trackedFiles);\n\t\t\t\t\t}\n\t\t\t\t\tDialogManager.show(dialog);\n\t\t\t\t\tdialogRef.set(dialog);\n\t\t\t\t}\n\t\t\t}, indicator.getModalityState());\n\t\t\tfinal GithubUntrackedFilesDialog dialog = dialogRef.get();\n\n\t\t\tfinal Collection<VirtualFile> files2commit = dialog.getSelectedFiles();\n\t\t\tif(!dialog.isOK() || files2commit.isEmpty())\n\t\t\t{\n\t\t\t\tGithubNotifications.showInfoURL(project, \"Successfully created empty repository on GitHub\", name, url);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tCollection<VirtualFile> files2add = ContainerUtil.intersection(untrackedFiles, files2commit);\n\t\t\tCollection<VirtualFile> files2rm = consulo.ide.impl.idea.util.containers.ContainerUtil.subtract(trackedFiles, files2commit);\n\t\t\tCollection<VirtualFile> modified = new HashSet<VirtualFile>(trackedFiles);\n\t\t\tmodified.addAll(files2commit);\n\n\t\t\tGitFileUtils.addFiles(project, root, files2add);\n\t\t\tGitFileUtils.deleteFilesFromCache(project, root, files2rm);\n\n\t\t\t// commit\n\t\t\tLOG.info(\"Performing commit\");\n\t\t\tindicator.setText(\"Performing commit...\");\n\t\t\tGitSimpleHandler handler = new GitSimpleHandler(project, root, GitCommand.COMMIT);\n\t\t\thandler.addParameters(\"-m\", dialog.getCommitMessage());\n\t\t\thandler.endOptions();\n\t\t\thandler.run();\n\n\t\t\tVcsFileUtil.markFilesDirty(project, modified);\n\t\t}\n\t\tcatch(VcsException e)\n\t\t{\n\t\t\tLOG.warn(e);\n\t\t\tGithubNotifications.showErrorURL(project, \"Can't finish GitHub sharing process\",\n\t\t\t\t\t\"Successfully created project \", \"'\" + name + \"'\", \" on GitHub, but initial commit failed:<br/>\" +\n\t\t\t\t\t\t\te.getMessage(), url);\n\t\t\treturn false;\n\t\t}\n\t\tLOG.info(\"Successfully created initial commit\");\n\t\treturn true;\n\t}",
"static Repo getInstance() {\n return RepoSingelton.getRepo(); //todo: refactor\n }",
"public void addRadioSong(String songTitle, String songArtist) {\n for (SharedSongPanel radioSong : radioSongs) {\n if (radioSong.getTitle().equals(songTitle))//if song exists.\n return;//exiting method\n }\n try {\n BufferedImage defaultImage = ImageIO.read(new File(\"RadioSongs/defaultImage.png\"));\n SharedSongPanel newRadioSong = new SharedSongPanel(defaultImage, songTitle, songArtist, radioSongs, null);\n radioSongs.add(newRadioSong);\n } catch (IOException e) {\n JOptionPane.showMessageDialog(null, \"Error reading radio default image\", \"An Error Occurred\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"private static String nameOf(GitHubProject project) {\n return String.format(\"[%s/%s](%s)\",\n project.organization().name(), project.name(), project.scm().toString());\n }",
"public String getPlainName() { return getName().replace(\"refs/heads/\", \"\").replace(\"refs/remotes/\", \"\"); }",
"H enrichRepo(RepoType repoType);",
"private String getCodeRepo() throws Exception {\n\t\tObject[] options = { \"Local Git Repository\", \"Github URI\" };\n\n\t\tJFrame frame = new JFrame();\n\t\tint selection = JOptionPane.showOptionDialog(frame,\n\t\t\t\t\"Please select your type of codebase\", \"GalacticTBA\",\n\t\t\t\tJOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null,\n\t\t\t\toptions, options[0]);\n\n\t\tif (selection == 1) {\n\t\t\tfolderName = \"cpsc410_\" + new Date().getTime();\n\t\t\tString baseDir = getCodeRoot(true);\n\n\t\t\tString githubURI = (String) JOptionPane.showInputDialog(frame,\n\t\t\t\t\t\"Galactic TBA:\\n\" + \"Please enter Github URI\",\n\t\t\t\t\t\"Galactic TBA\", JOptionPane.PLAIN_MESSAGE, null, null,\n\t\t\t\t\tnull);\n\n\t\t\tString dir = System.getProperty(\"user.dir\");\n\t\t\tProcess p;\n\t\t\tif (isOSWindows) {\n\t\t\t\tp = Runtime.getRuntime().exec(\n\t\t\t\t\t\t\"cmd /C \" + dir + \"\\\\scripts\\\\gitclone.sh \" + githubURI\n\t\t\t\t\t\t\t\t+ \" \" + baseDir + \"\\\\\" + folderName);\n\t\t\t} else {\n\t\t\t\tp = Runtime.getRuntime().exec(\n\t\t\t\t\t\tdir + \"/scripts/gitclone.sh \" + folderName + \"/\"\n\t\t\t\t\t\t\t\t+ baseDir);\n\t\t\t}\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\t\tp.getInputStream()));\n\n\t\t\twhile (in.readLine() != null) {\n\t\t\t\tThread.sleep(1000);\n\t\t\t}\n\t\t\tin.close();\n\t\t\treturn baseDir + \"\\\\\" + folderName;\n\t\t} else if (selection != 0) {\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\treturn getCodeRoot(false);\n\t}",
"public List<String> processRepoRes(List<GitRepositories> repos){\n return repos.stream().map(repo -> repo.getName()).collect(Collectors.toList());\n }",
"public static synchronized void deleteByReponame(String repoName) throws IOException {\n Directory dir = FSDirectory.open(Paths.get(Properties.getProperties().getProperty(Values.INDEXLOCATION, Values.DEFAULTINDEXLOCATION)));\n\n Analyzer analyzer = new CodeAnalyzer();\n IndexWriterConfig iwc = new IndexWriterConfig(analyzer);\n iwc.setOpenMode(IndexWriterConfig.OpenMode.CREATE_OR_APPEND);\n\n IndexWriter writer = new IndexWriter(dir, iwc);\n\n writer.deleteDocuments(new Term(Values.REPONAME, repoName));\n writer.close();\n }",
"private static void merge(Gitlet currCommit, String[] args) {\n if (!isSure()) {\n return;\n } else if (args.length != 2) {\n System.out.println(\"Please input the branch name\");\n } else if (!currCommit.tree.hasBranch(args[1])) {\n System.out.println(\"A branch with that name does not exist.\");\n } else if (args[1].equals(currCommit.tree.getCurrentBranch())) {\n System.out.println(\"Cannot merge a branch with itself.\");\n } else {\n HashMap<String, String> splitMap = findSplitBranch(currCommit, args)\n .getFileLoc();\n HashMap<String, String> headMap = currCommit.tree.getHeadCommit()\n .getFileLoc();\n HashMap<String, String> mergeMap = currCommit.tree.getHeadCommit(\n args[1]).getFileLoc();\n for (String mergeFile : mergeMap.keySet()) {\n if (splitMap.containsKey(mergeFile)\n && headMap.containsKey(mergeFile)) {\n if (splitMap.get(mergeFile).equals(headMap.get(mergeFile))\n && !headMap.get(mergeFile).equals(\n mergeMap.get(mergeFile))) {\n FileManip origin = new FileManip(\n mergeMap.get(mergeFile));\n origin.copyFile(mergeFile);\n } else if (!splitMap.get(mergeFile).equals(\n headMap.get(mergeFile))\n && !splitMap.get(mergeFile).equals(\n mergeMap.get(mergeFile))) {\n FileManip origin = new FileManip(\n mergeMap.get(mergeFile));\n origin.copyFile(mergeFile + \".conflicted\");\n }\n } else if (!splitMap.containsKey(mergeFile)\n && headMap.containsKey(mergeFile)) {\n FileManip origin = new FileManip(mergeMap.get(mergeFile));\n if (!origin.isSame(headMap.get(mergeFile))) {\n origin.copyFile(mergeFile + \".conflicted\");\n }\n }\n }\n }\n }"
] |
[
"0.71016437",
"0.6160195",
"0.6097628",
"0.5810618",
"0.57731444",
"0.57449955",
"0.561171",
"0.5576092",
"0.55696696",
"0.5568342",
"0.5513823",
"0.5501869",
"0.543646",
"0.5432003",
"0.5367245",
"0.53447795",
"0.5257555",
"0.5212242",
"0.52078986",
"0.5184106",
"0.51643914",
"0.5153896",
"0.5152122",
"0.5130832",
"0.51217973",
"0.5121464",
"0.5111509",
"0.51111877",
"0.5079375",
"0.5070168",
"0.5037761",
"0.50241566",
"0.5004851",
"0.49931288",
"0.4969528",
"0.4959746",
"0.49430367",
"0.49184054",
"0.48902363",
"0.48854023",
"0.48654583",
"0.4861182",
"0.48568824",
"0.48532283",
"0.4853102",
"0.4852423",
"0.48481116",
"0.48472935",
"0.48458546",
"0.48309442",
"0.4830323",
"0.48190516",
"0.48163912",
"0.48122635",
"0.4805917",
"0.47913045",
"0.47844142",
"0.47798204",
"0.47791392",
"0.47748044",
"0.4771634",
"0.4767914",
"0.476151",
"0.47610867",
"0.4748229",
"0.4743859",
"0.47391048",
"0.47367373",
"0.4731111",
"0.47217923",
"0.47209167",
"0.47184175",
"0.4718213",
"0.47114724",
"0.47077408",
"0.4705552",
"0.46923622",
"0.4688814",
"0.4688452",
"0.4688318",
"0.4686808",
"0.46834686",
"0.46774402",
"0.4675103",
"0.46715072",
"0.46659532",
"0.466452",
"0.46574757",
"0.46421942",
"0.46375278",
"0.46161917",
"0.461382",
"0.46105763",
"0.45936015",
"0.4583447",
"0.45822725",
"0.4578926",
"0.45771402",
"0.45758423",
"0.457333"
] |
0.5654731
|
6
|
/ By default, OpenGL enables features that improve quality but reduce performance. One might want to tweak that especially on software renderer.
|
public void onSurfaceCreated(GL10 gl, EGLConfig config) {
gl.glDisable(GL10.GL_DITHER);
/*
* Some one-time OpenGL initialization can be made here
* probably based on features of this particular context
*/
gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT,
GL10.GL_FASTEST);
float ratio = (float) width / height;
gl.glMatrixMode(GL10.GL_PROJECTION);
gl.glLoadIdentity();
gl.glFrustumf(-ratio, ratio, -1, 1, 1, 10);
if (mTranslucentBackground) {
gl.glClearColor(0,0,0,0);
} else {
gl.glClearColor(0.07f, 0.639f, 0.7f, 1f);
}
gl.glMatrixMode(GL10.GL_MODELVIEW);
gl.glEnable(GL10.GL_CULL_FACE);
gl.glShadeModel(GL10.GL_FLAT);
gl.glLineWidth(2f);
//lighting
// Define the ambient component of the first light
gl.glEnable(GL10.GL_LIGHTING);
gl.glEnable(GL10.GL_LIGHT0);
gl.glEnable(GL10.GL_LIGHT1);
gl.glEnable(GL10.GL_LIGHT2);
float lightColor[] = {0.07f, 0.639f, 0.7f, 1f};
FloatBuffer light0Ambient = FloatBuffer.wrap(lightColor);
float light1PositionVector[] = {1f, 0f, 0f, 0f};
FloatBuffer light1Position = FloatBuffer.wrap(light1PositionVector);
float light2PositionVector[] = {-1f, 0f, 0f, 0f};
FloatBuffer light2Position = FloatBuffer.wrap(light2PositionVector);
gl.glLightfv(GL10.GL_LIGHT1, GL10.GL_AMBIENT, light0Ambient);
gl.glLightfv(GL10.GL_LIGHT1, GL10.GL_POSITION, light1Position);
gl.glLightfv(GL10.GL_LIGHT2, GL10.GL_AMBIENT, light0Ambient);
gl.glLightfv(GL10.GL_LIGHT2, GL10.GL_POSITION, light2Position);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private static void initGL() {\n glClearColor(152/255f, 175/255f, 199/255f, 0.0f);\n glMatrixMode(GL_PROJECTION);\n glLoadIdentity();\n GLU.gluPerspective(100.0f, (float)displayMode.getWidth()/(float)\n displayMode.getHeight(), 0.1f, 500);\n glMatrixMode(GL_MODELVIEW);\n glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);\n glClearDepth(1.0f);\n glEnable(GL_DEPTH_TEST);\n glEnable(GL_TEXTURE_2D);\n glEnableClientState(GL_VERTEX_ARRAY);\n glEnableClientState(GL_COLOR_ARRAY);\n glEnableClientState(GL_TEXTURE_COORD_ARRAY);\n glEnable(GL_LIGHTING);\n glEnable(GL_LIGHT0);\n glEnable(GL_NORMALIZE);\n\n }",
"private void initOpenGL(){\n\t\tcaps = GL.createCapabilities();\n\t\tglViewport(0,0,WIDTH,HEIGHT);\n\t\tif(caps.OpenGL44)System.out.println(\"All OK\");\n\t\tglEnable(GL_DEPTH_TEST);\n\t\t//glPolygonMode(GL_BACK, GL_LINE);\n\t\tglClearColor(0.0f, 0.0f, 0.0f, 0.0f);\n\t}",
"private void applyOpenGLStartSettings(){\r\n\t\t//TODO pa.smooth() / pa.noSmooth() ver�ndert auch line_smooth!\r\n\t\t//f�r test ob multisampling lines ohne Line_smooth okay rendered m�ssen\r\n\t\t//sicherheitshalber auch die pa.smoot() etc abgefangen werden und line_smooth immer disabled sein!\r\n\t\t\r\n\t\t//TODO check line drawing and abstractvisible at stencil in this context (line_smooth)\r\n\t\t\r\n\t //TODO \r\n\t\t// - if multisampling enabled dont do line smoothing at all\r\n\t\t// - OR: disable multisampling each time before doing line_smoothing! (better but expensive?) \r\n\t\t// -> info: disabling multisampling isnt possible at runtime..\r\n\r\n\t // - or disable mutisample before drawing with line_smooth!\r\n\t\t//TOOD dont use lines to smooth some objects then (fonts, etc)\r\n\t if (MT4jSettings.getInstance().isOpenGlMode() ){\r\n\t \t\r\n\t \t//////////////////////////////\r\n\t \tthis.loadGL();\r\n\t //////////////////////////\r\n\t \r\n//\t \tGL gl = Tools3D.getGL(this);\r\n\t GLCommon gl = getGLCommon();\r\n\t \t\r\n\t \tlogger.info(\"OpenGL Version: \\\"\" + gl.glGetString(GL.GL_VERSION) + \"\\\"\" + \" - Vendor: \\\"\" + gl.glGetString(GL.GL_VENDOR) + \"\\\"\" + \" - Renderer: \\\"\" + gl.glGetString(GL.GL_RENDERER) + \"\\\"\");\r\n//\t \tlogger.info(\"Shading language version: \\\"\" + gl.glGetString(GL.GL_SHADING_LANGUAGE_VERSION) + \"\\\"\");\r\n\t \tlogger.info(\"Non power of two texture sizes allowed: \\\"\" + Tools3D.supportsNonPowerOfTwoTexture(this) + \"\\\"\");\r\n\t \tlogger.info(\"OpenGL Framebuffer Object Extension available: \\\"\" + GLFBO.isSupported(this) + \"\\\"\");\r\n\t \t\r\n\t\t\t//Set VSyncing on -> to avoid tearing \r\n\t\t\t//-> check if gfx card settings allow apps to set it!\r\n\t\t\t//-> Use with caution! only use with fps rate == monitor Hz!\r\n\t\t\t//and fps never drop below Hz! -> else choppy!\r\n\t\t\t//-> only works with opengl!\r\n\t \tTools3D.setVSyncing(this, MT4jSettings.getInstance().isVerticalSynchronization());\r\n\t\t\tlogger.info(\"Vertical Sync enabled: \\\"\" + MT4jSettings.getInstance().isVerticalSynchronization() + \"\\\"\");\r\n\t \t\r\n\t \tif ( MT4jSettings.getInstance().isMultiSampling()){\r\n\t \t\tgl.glEnable(GL.GL_MULTISAMPLE);\r\n//\t \t\tgl.glDisable(GL.GL_MULTISAMPLE);\r\n\t \t\tlogger.info(\"OpenGL multi-sampling enabled.\");\r\n\t \t}\r\n\t \tgl.glEnable(GL.GL_LINE_SMOOTH);\r\n//\t \tgl.glDisable(GL.GL_LINE_SMOOTH);\r\n\t }\r\n\t}",
"public boolean hasCrappyOpengl();",
"public void initialize()\r\n\t{\r\n\t\tgl.glClearColor(0.0F, 0.0F, 0.0F, 1.0F);\r\n\t\t// initialize blending for transparency\r\n\t\tgl.glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\r\n\t\tgl.glEnable(GL_DEPTH_TEST);\r\n\t\tgl.glEnable(GL_DITHER);\r\n\t\t//gl.disable(GL_ALPHA_TEST);\r\n\t\t//gl.disable(GL_COLOR_MATERIAL);\r\n\t\tgl.glShadeModel(GL_SMOOTH);\r\n\t\tgl.glDepthFunc( GL_LEQUAL );\r\n\t\tgl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);\r\n\t\tgl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);\r\n\t\tgl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);\r\n\t\tgl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\r\n\t\tgl.glPixelStorei(GL_UNPACK_ALIGNMENT, 1);\r\n\t\tgl.glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);\r\n\t\tgl.glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 1);\r\n\t\tglj.gljCheckGL();\r\n\t}",
"public void setupOpenGL() {\n try {\n PixelFormat pixelFormat = new PixelFormat();\n ContextAttribs contextAtrributes = new ContextAttribs(3, 2)\n .withForwardCompatible(true)\n .withProfileCore(true);\n\n DisplayMode displayMode = new DisplayMode(WIDTH, HEIGHT);\n Display.setDisplayMode(displayMode);\n Display.setTitle(WINDOW_TITLE);\n Display.create(pixelFormat, contextAtrributes);\n\n GL11.glEnable(GL11.GL_DEPTH_TEST);\n GL11.glDepthFunc(GL11.GL_LEQUAL);\n\n GL11.glViewport(0, 0, WIDTH, HEIGHT);\n } catch (LWJGLException e) {\n e.printStackTrace();\n System.exit(-1);\n }\n\n // Setup an XNA like background color\n GL11.glClearColor(0.4f, 0.6f, 0.9f, 0f);\n\n // Map the internal OpenGL coordinate system to the entire screen\n GL11.glViewport(0, 0, WIDTH, HEIGHT);\n\n this.exitOnGLError(\"Error in setupOpenGL\");\n }",
"public void previewOglRender();",
"private void initOpenGL()\n\t{\n\t\t// Create an OpenGL ES 2.0 context.\n\t\tsetEGLContextClientVersion(2);\n\n\t\t// Set the drawing quality.\n\t\t// Alpha isn't needed and the color choice is limited anyway, so we can get away with this setting.\n\t\tgetHolder().setFormat(PixelFormat.RGB_565);\n\t\tsetEGLConfigChooser(5, 6, 5, 0, 0, 0);\n\n\t\t// Prepare the renderer.\n\t\trenderer = new GLRenderer();\n\t\tsetRenderer(renderer);\n\n\t\t// Choose to only render the view on demand.\n\t\tsetRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);\n\n\t\t// Disable the unneeded depth test and stencil test.\n\t\tGLES20.glDisable(GLES20.GL_DEPTH_TEST);\n\t\tGLES20.glDisable(GLES20.GL_STENCIL_TEST);\n\n\t\t// Render the canvas for the first time.\n\t\trequestRender();\n\t}",
"public interface IGLWrapper {\n\n /** Indicates that the color buffer should be cleared. */\n int GL_COLOR_BUFFER_BIT = 0x00004000;\n /** Indicates that elements should be drawn as triangles using indices. */\n int GL_TRIANGLES = 0x0004;\n /** Indicates that the texture should be loaded to 2D. */\n int GL_TEXTURE_2D = 0x0DE1;\n /** Indicates that the data type is an unsigned short. */\n int GL_UNSIGNED_SHORT = 0x1403;\n /** Indicates that the data type is a float. */\n int GL_FLOAT = 0x1406;\n /** Indicates that the fragment shader should be loaded. */\n int GL_FRAGMENT_SHADER = 0x8B30;\n /** Indicates that the vertex shader should be loaded. */\n int GL_VERTEX_SHADER = 0x8B31;\n /** Indicates that the nearest neighbor should be used for interpolation. */\n int GL_NEAREST = 0x2600;\n /** Indicates that the texture magnification filter should be modified. */\n int GL_TEXTURE_MAG_FILTER = 0x2800;\n /** Indicates that the texture minification filter should be modified. */\n int GL_TEXTURE_MIN_FILTER = 0x2801;\n /** The 0th texture location. */\n int GL_TEXTURE0 = 0x84C0;\n\n /**\n * Checks whether the application is on desktop or Android.\n * @return True if the application is on desktop, false if on Android.\n */\n boolean isDesktopGL();\n\n /**\n * Sets the active texture index.\n * @param texture The active texture index.\n */\n void glActiveTexture(int texture);\n\n /**\n * Attaches a shader to a shader program.\n * @param program The program to attach the shader to.\n * @param shader The shader to attach to the program.\n */\n void glAttachShader(int program, int shader);\n\n /**\n * Binds a texture to a texture index.\n * @param target The texture index to bind to.\n * @param texture The texture to bind.\n */\n void glBindTexture(int target, int texture);\n\n /**\n * Sets the background color.\n * @param mask A bitmask containing the background color.\n */\n void glClear(int mask);\n\n /**\n * Sets the background color.\n * @param red The red component of the color.\n * @param green The green component of the color.\n * @param blue The blue component of the color.\n * @param alpha The alpha component of the color.\n */\n void glClearColor(float red, float green, float blue, float alpha);\n\n /**\n * Compiles a shader.\n * @param shader The shader to compile.\n */\n void glCompileShader(int shader);\n\n /**\n * Creates a shader program.\n * @return The created shader program.\n */\n int glCreateProgram();\n\n /**\n * Initializes a shader.\n * @param type The type of shader to initialize.\n * @return The initialized shader.\n */\n int glCreateShader(int type);\n\n /**\n * Disables a vertex attribute.\n * @param index The vertex attribute to disable.\n */\n void glDisableVertexAttribArray(int index);\n\n /**\n * Draws vertices on the screen.\n * @param mode The drawing mode to use.\n * @param count The number of vertices to draw.\n * @param type The primitive data type of the vertices.\n * @param indices The vertices to draw.\n * @param bufferIndex The index of the buffer handle to use.\n * @param bufferSize The size of the triangle buffer.\n */\n void glDrawElements(int mode, int count, int type,\n Buffer indices, int bufferIndex, int bufferSize);\n\n /**\n * Enables a vertex attribute.\n * @param index The vertex attribute to enable.\n */\n void glEnableVertexAttribArray(int index);\n\n /**\n * Generates textures in a given array.\n * @param n The number of textures to generate.\n * @param textures The array to generate textures in.\n * @param offset The offset for the starting position in the array to generate textures at.\n */\n void glGenTextures(int n, int[] textures, int offset);\n\n /**\n * Gets a shader attribute.\n * @param program The program to get the shader attribute from.\n * @param name The name of the shader attribute to get.\n * @return The specified shader attribute.\n */\n int glGetAttribLocation(int program, String name);\n\n /**\n * Gets a uniform shader attribute.\n * @param program The program to get the shader attribute from.\n * @param name The name of the uniform shader attribute to get.\n * @return The specified uniform shader attribute.\n */\n int glGetUniformLocation(int program, String name);\n\n /**\n * Links a shader program to OpenGL.\n * @param program The program to link.\n */\n void glLinkProgram(int program);\n\n /**\n * Loads shader code into a shader.\n * @param shader The shader to load code into.\n * @param string The shader code to load.\n */\n void glShaderSource(int shader, String string);\n\n /**\n * Sets the texture paramters for OpenGL.\n * @param target The type of the currently active texture.\n * @param pname The parameter to set.\n * @param param The value to set the parameter to.\n */\n void glTexParameteri(int target, int pname, int param);\n\n /**\n * Sets a uniform shader attribute.\n * @param location The attribute to set.\n * @param x The value to set the attribute to.\n */\n void glUniform1i(int location, int x);\n\n /**\n * Sets a uniform shader attribute.\n * @param location The attribute to set.\n * @param count The number of elements in the new value.\n * @param v The value to set the attribute to.\n * @param offset The offset of the starting index to set.\n */\n void glUniform4fv(int location, int count, float[] v, int offset);\n\n /**\n * Sets a matrix attribute.\n * @param location The matrix attribute to set.\n * @param count The number of elements in the array of matrices.\n * @param transpose Whether to transpose the matrix.\n * @param value The value to set the matrix to.\n * @param offset The offset of the starting index to set in the array of matrices.\n */\n void glUniformMatrix4fv(int location, int count, boolean transpose,\n float[] value, int offset);\n\n /**\n * Sets a shader program to be used by OpenGL.\n * @param program The program to use.\n */\n void glUseProgram(int program);\n\n /**\n * Sets the initial vertices in the vertex shader.\n * @param indx The vertex attribute to use.\n * @param size The number of coordinates per vertex.\n * @param type The type of primitive that the vertices are stored as.\n * @param normalized Whether the vertices are normalized.\n * @param stride The number of bytes per vertex.\n * @param ptr The vertex array.\n * @param bufferIndex The index of the buffer handle to use.\n * @param bufferSize The size of the vertex array in bytes.\n */\n void glVertexAttribPointer(int indx, int size, int type, boolean normalized,\n int stride, Buffer ptr, int bufferIndex, int bufferSize);\n\n /**\n * Sets the viewport of the camera.\n * @param x The x coordinate of the viewport's center.\n * @param y The y coordinate of the viewport's center.\n * @param width The width of the viewport.\n * @param height The height of the viewport.\n */\n void glViewport(int x, int y, int width, int height);\n\n /**\n * Loads a texture into OpenGL.\n * @param target The texture to load the bitmap to.\n * @param level The detail level of the image.\n * @param resourceId The image file to load from\n * @param border 0.\n */\n void texImage2D(int target, int level, int resourceId, int border);\n\n /**\n * Cleans up OpenGL after closing the desktop application.\n */\n void exit(int vertexShader, int fragmentShader);\n}",
"@Override\r\n\tpublic void init(GL10 gl, EGLConfig config) {\n try {\r\n loadGLTextures(gl);\t\t\t\t\t\t\t\t\t\t// Jump To Texture Loading Routine ( NEW )\r\n } catch (IOException e) {\r\n \tLog.e(\"120\", \"An error occured!\");\r\n e.printStackTrace();\r\n }\r\n\r\n gl.glEnable(GL10.GL_TEXTURE_2D);\t\t\t\t\t\t\t\t\t// Enable Texture Mapping ( NEW )\r\n gl.glShadeModel(GL10.GL_SMOOTH);\t\t\t\t\t\t\t\t\t// Enable Smooth Shading\r\n gl.glClearColor(0.0f, 0.0f, 0.0f, 0.5f);\t\t\t\t\t\t// Black Background\r\n gl.glClearDepthf(1.0f);\t\t\t\t\t\t\t\t\t\t\t// Depth Buffer Setup\r\n gl.glEnable(GL10.GL_DEPTH_TEST);\t\t\t\t\t\t\t\t\t// Enables Depth Testing\r\n gl.glDepthFunc(GL10.GL_LEQUAL);\t\t\t\t\t\t\t\t\t\t// The Type Of Depth Testing To Do\r\n gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST);\t\t\t// Really Nice Perspective Calculations\r\n\t}",
"public void initGLState() {\n\n\t\tm.setPerspective(fovy, aspect, zNear, zFar);\n\t\tglMatrixMode(GL_PROJECTION);\n\t\tglLoadIdentity();\n\n\t\tm.get(fb);\n\n\t\tglLoadMatrixf(fb);\n\n\t\tglMatrixMode(GL_MODELVIEW);\n\t\tglLoadIdentity();\n\n\t\t/* Smooth-Shading soll benutzt werden */\n\t\tglEnable(GL_NORMALIZE);\n\t\tglShadeModel(GL_SMOOTH);\n\t\tinitLighting();\n\t}",
"public void prepare(){\n\t\tGL11.glEnable(GL11.GL_DEPTH_TEST);\n\t\tGL11.glClear( GL11.GL_COLOR_BUFFER_BIT|GL11.GL_DEPTH_BUFFER_BIT );\n\t\tGL11.glClearColor(1, 0, 0, 1);\n\t\t\n\t}",
"private void initGL() {\n\t\ttry {\n\t\t\tDisplay.setDisplayMode(new DisplayMode(displayWidth, displayHeight));\n\t\t\tDisplay.setVSyncEnabled(true);\n\t\t\tDisplay.setTitle(\"Shooter\");\n\t\t\tDisplay.create();\n\t\t} catch (LWJGLException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t\n\t\t// init OpenGL\n\t\tglEnable(GL_TEXTURE_2D);\n\t\t\n\t\tglClearColor(0.0f, 0.0f, 0.0f, 0.0f);\n\t\t\n\t\t// enable alpha blending\n\t\tglEnable(GL_BLEND);\n\t\tglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\n\t\t\n\t\tglViewport(0, 0, displayWidth, displayHeight);\n\t\t\n\t\tglMatrixMode(GL_PROJECTION);\n\t\tglLoadIdentity();\n\t\tglOrtho(0, displayWidth, displayHeight, 0, 1, -1);\n\t\tglMatrixMode(GL_MODELVIEW);\n\t}",
"public void init(GLAutoDrawable drawable) {\n\n GL gl = drawable.getGL();\n System.err.println(\"INIT GL IS: \" + gl.getClass().getName());\n gl.setSwapInterval(1);\n\n\n //wartości składowe oświetlenia i koordynaty źródła światła\n float ambientLight[] = { 0.3f, 0.3f, 0.3f, 1.0f };//swiatło otaczające\n float diffuseLight[] = { 0.7f, 0.7f, 0.7f, 1.0f };//światło rozproszone\n float specular[] = { 1.0f, 1.0f, 1.0f, 1.0f}; //światło odbite\n float lightPos[] = { 0.0f, 150.0f, 150.0f, 1.0f };//pozycja światła\n //(czwarty parametr określa odległość źródła:\n //0.0f-nieskończona; 1.0f-określona przez pozostałe parametry)\n gl.glEnable(GL.GL_LIGHTING); //uaktywnienie oświetlenia\n //ustawienie parametrów źródła światła nr. 0\n gl.glLightfv(GL.GL_LIGHT0,GL.GL_AMBIENT,ambientLight,0); //swiatło otaczające\n gl.glLightfv(GL.GL_LIGHT0,GL.GL_DIFFUSE,diffuseLight,0); //światło rozproszone\n gl.glLightfv(GL.GL_LIGHT0,GL.GL_SPECULAR,specular,0); //światło odbite\n gl.glLightfv(GL.GL_LIGHT0,GL.GL_POSITION,lightPos,0); //pozycja światła\n gl.glEnable(GL.GL_LIGHT0); //uaktywnienie źródła światła nr. 0\n gl.glEnable(GL.GL_COLOR_MATERIAL); //uaktywnienie śledzenia kolorów\n //kolory będą ustalane za pomocą glColor\n gl.glColorMaterial(GL.GL_FRONT, GL.GL_AMBIENT_AND_DIFFUSE);\n gl.glEnable(GL.GL_DEPTH_TEST);\n // Setup the drawing area and shading mode\n gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);\n gl.glShadeModel(GL.GL_SMOOTH);\n try\n {\n image1 = ImageIO.read(getClass().getResourceAsStream(\"/pokemon.jpg\"));\n image2 = ImageIO.read(getClass().getResourceAsStream(\"/android.jpg\"));\n }\n catch(Exception exc)\n {\n JOptionPane.showMessageDialog(null, exc.toString());\n return;\n }\n\n t1 = TextureIO.newTexture(image1, false);\n t2 = TextureIO.newTexture(image2, false);\n\n gl.glTexEnvi(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE, GL.GL_DECAL | GL.GL_MODULATE);\n gl.glEnable(GL.GL_TEXTURE_2D);\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT);\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT);\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);\n gl.glBindTexture(GL.GL_TEXTURE_2D, t1.getTextureObject());\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT);\ngl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT);\n\n\n \n\n }",
"@Override\r\n\tpublic void onSurfaceCreated(GL10 gl, EGLConfig config) {\n\t\tLog.d(TAG, \"onSurfaceCreated\");\r\n//\t\tgl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Set color's clear-value to\r\n\t\tgl.glClearColor(0.f, 0.f, 0.f, 0.f);\r\n/////new/////\t\t\r\n\t\t gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA);\r\n\t\t gl.glEnable(gl.GL_BLEND);\r\n///////\t\t \r\n\t\tgl.glClearDepthf(1.0f); // Set depth's clear-value to farthest\r\n\t\tgl.glEnable(GL10.GL_DEPTH_TEST); // Enables depth-buffer for hidden\r\n\t\t\t\t\t\t\t\t\t\t\t// surface removal\r\n\t\tgl.glDepthFunc(GL10.GL_LEQUAL); // The type of depth testing to do\r\n\t\tgl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST); // nice\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// perspective\r\n\t\t// view\r\n\t\tgl.glShadeModel(GL10.GL_SMOOTH); // Enable smooth shading of color\r\n\t\tgl.glDisable(GL10.GL_DITHER); // Disable dithering for better\r\n\t\t\t\t\t\t\t\t\t\t// performance\r\n\t\t// You OpenGL|ES initialization code here\r\n\t\t// ......\r\n\t\tgl.glGenTextures(MAX_MODEL_NUM, texIDS, 0);\r\n\r\n//\t\tglview.loadTexture(gl); // Load image into Texture (NEW)\r\n\t\tgl.glEnable(gl.GL_TEXTURE_2D); // Enable texture (NEW)\r\n\t\t\r\n\t}",
"private void initOpenGlView() {\n setEGLContextClientVersion(2);\n setPreserveEGLContextOnPause(true);\n System.out.println(\"************************************************************* init OpenGlView ********************\");\n// setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);\n// setEGLConfigChooser(8, 8, 8, 8, 0, 0); // added 10.05\n// getHolder().setFormat(PixelFormat.TRANSLUCENT); // // added 10.05\n }",
"@Override\n\tpublic void onSurfaceCreated(GL10 gl, EGLConfig config) {\n\t\tgl.glClearColor(0,0,0,1); \n\t\t//enable vertex array for vertex pointer\n\t\tgl.glEnableClientState(GL10.GL_VERTEX_ARRAY); \n\t\t//enable normal array\n\t\tgl.glEnableClientState(GL10.GL_NORMAL_ARRAY);\n\t\t//enable DepthTest\n\t\tgl.glEnable(GL10.GL_DEPTH_TEST); \n\t\t//enable Blend\n\t\tgl.glEnable(GL10.GL_BLEND);\n\t\t//set blend function\n\t\tgl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);\n\t\t//Gen texture\n\t\t//initialize array\n\t\tint textureIds[] = new int[1];\n\t\t//generate 1 texture return handle to textureIds\n\t\tgl.glGenTextures(1, textureIds, 0);\n\t\t//get handle from array to an int\n\t\ttextureId = textureIds[0];\n\t\t//bind using array\n\t\tgl.glBindTexture(GL10.GL_TEXTURE_2D, textureId);\n\t\t//copy image pixels data to texture buffer on video mem\n\t\tGLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);\n\t\t//filter for minif\n\t\tgl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);\n\t\t//filter for magnif\n\t\tgl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_NEAREST);\n\t\t//unbind texture buffer\n\t\tgl.glBindTexture(GL10.GL_TEXTURE_2D, 0);\n\t\t//bitmap.recycle(); just if not used anymore \n\t}",
"private void initGL() {\r\n glClearColor(0.0f, 0.0f, 0.0f, 0.0f);\r\n glMatrixMode(GL_PROJECTION);\r\n glLoadIdentity();\r\n\r\n glOrtho(-320, 320, -240, 240, 1, -1);\r\n\r\n glMatrixMode(GL_MODELVIEW);\r\n glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);\r\n }",
"@Override\n public void init() {\n glEnable( GL_BLEND );\n glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );\n glEnable( GL_LINE_SMOOTH );\n glEnable( GL_POINT_SMOOTH );\n }",
"public void onSurfaceCreated(GL10 unused, EGLConfig config) {\n GLES20.glClearColor(0.1f, 0.1f, 0.25f, 1.0f);\n RSGFXShaderManager.loadShaders();\n next_game_tick = SystemClock.elapsedRealtime();\n // No culling of back faces\n GLES20.glDisable(GLES20.GL_CULL_FACE);\n \n // No depth testing\n //GLES20.glDisable(GLES20.GL_DEPTH_TEST);\n setupRender();\n // Enable blending\n // GLES20.glEnable(GLES20.GL_BLEND);\n // GLES20.glBlendFunc(GLES20.GL_ONE, GLES20.GL_ONE);\n \n // Setup quad \n \t\t// Generate your vertex, normal and index buffers\n \t\t// vertex buffer\n \t\t_qvb = ByteBuffer.allocateDirect(_quadv.length\n \t\t\t\t* FLOAT_SIZE_BYTES).order(ByteOrder.nativeOrder()).asFloatBuffer();\n \t\t_qvb.put(_quadv);\n \t\t_qvb.position(0);\n\n \t\t// index buffer\n \t\t_qib = ByteBuffer.allocateDirect(_quadi.length\n \t\t\t\t* 4).order(ByteOrder.nativeOrder()).asIntBuffer();\n \t\t_qib.put(_quadi);\n \t\t_qib.position(0);\n }",
"static void wing(GL2 gl){\n gl.glPushMatrix();\n gl.glScaled(2.5, 0.1, 1);\n gl.glTranslated(0.5, 0, 0.5);\n cube(gl,1);\n gl.glPopMatrix();\n gl.glPushMatrix();\n gl.glTranslated(2.5, 0, 0);\n cannon(gl);\n gl.glPopMatrix();\n }",
"boolean isDesktopGL();",
"public void RenderMiningCharge( FCEntityMiningCharge miningCharge, double d, double d1, double d2, \r\n float f, float f1 )\r\n {\r\n \tint iFacing = miningCharge.m_iFacing;\r\n \t\r\n GL11.glPushMatrix();\r\n GL11.glTranslatef((float)d, (float)d1, (float)d2);\r\n \r\n if(((float)miningCharge.m_iFuse - f1) + 1.0F < 10F)\r\n {\r\n float fScaleFactor = 1.0F - (((float)miningCharge.m_iFuse - f1) + 1.0F) / 10F;\r\n \r\n if(fScaleFactor < 0.0F)\r\n {\r\n fScaleFactor = 0.0F;\r\n }\r\n if(fScaleFactor > 1.0F)\r\n {\r\n fScaleFactor = 1.0F;\r\n }\r\n \r\n fScaleFactor *= fScaleFactor;\r\n fScaleFactor *= fScaleFactor;\r\n \r\n float fScale = 1.0F + fScaleFactor * 0.3F;\r\n \r\n GL11.glScalef( fScale, fScale, fScale );\r\n }\r\n \r\n float f3 = (1.0F - (((float)miningCharge.m_iFuse - f1) + 1.0F) / 100F) * 0.8F;\r\n \r\n this.loadTexture(\"/terrain.png\");\r\n \r\n RenderMiningChargeBlock( iFacing, miningCharge.getBrightness(f1));\r\n \r\n if((miningCharge.m_iFuse / 5) % 2 == 0)\r\n {\r\n GL11.glDisable(3553 /*GL_TEXTURE_2D*/);\r\n GL11.glDisable(2896 /*GL_LIGHTING*/);\r\n GL11.glEnable(3042 /*GL_BLEND*/);\r\n GL11.glBlendFunc(770, 772);\r\n GL11.glColor4f(1.0F, 1.0F, 1.0F, f3);\r\n RenderMiningChargeBlock( iFacing, 1.0F);\r\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\r\n GL11.glDisable(3042 /*GL_BLEND*/);\r\n GL11.glEnable(2896 /*GL_LIGHTING*/);\r\n GL11.glEnable(3553 /*GL_TEXTURE_2D*/);\r\n }\r\n \r\n GL11.glPopMatrix();\r\n }",
"public GL4JRenderer()\r\n\t{\r\n\t\t//gl = this;\r\n\t\tsuper(256,256);\r\n\t\tActorSet = new Vector();\r\n\t\tLightSet = new Vector();\r\n\t\tCameraSet = new Vector();\r\n\t\tActions = new Vector();\r\n\t\tinitLess = true;\r\n\t\tMouseDown = 0;\r\n\t\tLastMouse = new int[2];\r\n\t\tInternalTexture = new int[1];\r\n\t\tInternalTexture[0] = 0;\r\n\t\tKeyHandler = null;\r\n\t\tClockThread = null;\r\n\t\tglut = new GLUTFuncLightImpl(gl, glu);\r\n\t\taddMouseMotionListener(this);\r\n\t\taddKeyListener(this);\r\n\t\tcurrTime = 0;\r\n\t}",
"int GL_ACTIVE_TEXTURE();",
"public static void init() {\n // init quad VAO\n vao = glGenVertexArrays();\n glBindVertexArray(vao);\n int positionVbo = glGenBuffers();\n FloatBuffer fb = BufferUtils.createFloatBuffer(2 * 4);\n fb.put(0.0f).put(0.0f);\n fb.put(1.0f).put(0.0f);\n fb.put(1.0f).put(1.0f);\n fb.put(0.0f).put(1.0f);\n fb.flip();\n glBindBuffer(GL_ARRAY_BUFFER, positionVbo);\n glBufferData(GL_ARRAY_BUFFER, fb, GL_STATIC_DRAW);\n glVertexAttribPointer(Main.shader.inPositionLoc, 2, GL_FLOAT, false, 0, 0L);\n glEnableVertexAttribArray(Main.shader.inPositionLoc);\n glBindBuffer(GL_ARRAY_BUFFER, 0);\n glBindVertexArray(0);\n \n // init texture\n IntBuffer width = BufferUtils.createIntBuffer(1);\n IntBuffer height = BufferUtils.createIntBuffer(1);\n IntBuffer components = BufferUtils.createIntBuffer(1);\n byte[] dataArr = Main.loadResource(\"resources/font DF.png\");\n ByteBuffer data = BufferUtils.createByteBuffer(dataArr.length);\n data.put(dataArr).rewind();\n data = Objects.requireNonNull(stbi_load_from_memory(data, width, height, components, 1));\n int imgWidth = width.get();\n int imgHeight = height.get();\n charWidth = imgWidth / 16;\n charHeight = imgHeight / 16;\n \n texture = glGenTextures();\n glBindTexture(GL_TEXTURE_2D, texture);\n glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\n glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);\n glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, imgWidth, imgHeight, 0, GL_RED, GL_UNSIGNED_BYTE, data);\n stbi_image_free(data);\n \n // set texScale uniform\n glUniform2f(Main.shader.texScaleLoc, 1/16f, 1/16f);\n }",
"private void renderEngine() {\r\n GL11.glDisable(GL11.GL_LIGHTING);\r\n\r\n GL11.glEnable(GL11.GL_BLEND);\r\n GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);\r\n\r\n shotTexture.bind();\r\n engine.render();\r\n\r\n GL11.glDisable(GL11.GL_BLEND);\r\n }",
"@Override\r\n\tpublic void onSurfaceCreated(GL10 gl, EGLConfig config) {\n\r\n\t\tgl.glDisable(GL10.GL_DITHER);\r\n\t\tgl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\r\n\t\tgl.glEnable(GL10.GL_DEPTH_TEST);\r\n\t\tgl.glDepthFunc(GL10.GL_LEQUAL);\r\n\t\tgl.glClearDepthf(1f);\r\n\t}",
"public GLRenderer(Context context){\n\n lastTime=System.currentTimeMillis();\n mCuboid=new ndCuboid();\n\n\n }",
"public void start() {\n try {\n //getting the capabilities object of GL2 profile\n final GLProfile profile = GLProfile.get(GLProfile.GL2);\n GLCapabilities capabilities = new GLCapabilities(profile);\n\n // The canvas\n final GLCanvas glcanvas = new GLCanvas(capabilities);\n Renderer s = new Renderer();\n glcanvas.addGLEventListener(s);\n glcanvas.addMouseListener(s);\n glcanvas.addMouseMotionListener(s);\n glcanvas.addKeyListener(s);\n glcanvas.setSize(1024, 780);\n //creating frame\n final Frame frame = new Frame (\" Budik\");\n final JButton btHelp = new JButton(\"?\");\n final Help help;\n help = new Help();\n JToolBar tlacitka = new JToolBar(\"Help\");\n tlacitka.add(btHelp);\n frame.add(tlacitka, BorderLayout.NORTH);\n btHelp.setMnemonic(KeyEvent.VK_F1);\n btHelp.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n JDialog dialog = new JDialog(frame);\n JTextArea textArea = new JTextArea(help.getText());\n textArea.setBackground(help.getBackround());\n textArea.setEditable(false);\n dialog.add(textArea);\n dialog.setTitle(help.getTitle());\n dialog.setSize(new Dimension(800, 600));\n dialog.setLocationRelativeTo(frame);\n dialog.setModal(true);\n dialog.setVisible(true);\n }\n });\n\n\n\n frame.add(glcanvas);\n frame.setSize( 1024, 780 );\n frame.setVisible(true);\n frame.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n super.windowClosing(e);\n System.exit(0);\n }\n });\n\n final FPSAnimator animator = new FPSAnimator(glcanvas,30,true);\n animator.start();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"void glUseProgram(int program);",
"private void enableAndBuildHardwareLayer() {\n if (isHardwareAccelerated()) {\n // Turn on hardware layers for performance\n setLayerType(LAYER_TYPE_HARDWARE, null);\n\n // force building the layer, so you don't get a blip early in an animation\n // when the layer is created layer\n buildLayer();\n }\n }",
"private float a(int paramInt, boolean paramBoolean)\r\n/* 161: */ {\r\n/* 162:172 */ float f1 = paramInt % 16 * 8;\r\n/* 163:173 */ float f2 = paramInt / 16 * 8;\r\n/* 164:174 */ float f3 = paramBoolean ? 1.0F : 0.0F;\r\n/* 165: */ \r\n/* 166:176 */ this.h.a(this.g);\r\n/* 167: */ \r\n/* 168:178 */ float f4 = this.d[paramInt] - 0.01F;\r\n/* 169: */ \r\n/* 170:180 */ GL11.glBegin(5);\r\n/* 171:181 */ GL11.glTexCoord2f(f1 / 128.0F, f2 / 128.0F);\r\n/* 172:182 */ GL11.glVertex3f(this.i + f3, this.j, 0.0F);\r\n/* 173:183 */ GL11.glTexCoord2f(f1 / 128.0F, (f2 + 7.99F) / 128.0F);\r\n/* 174:184 */ GL11.glVertex3f(this.i - f3, this.j + 7.99F, 0.0F);\r\n/* 175:185 */ GL11.glTexCoord2f((f1 + f4 - 1.0F) / 128.0F, f2 / 128.0F);\r\n/* 176:186 */ GL11.glVertex3f(this.i + f4 - 1.0F + f3, this.j, 0.0F);\r\n/* 177:187 */ GL11.glTexCoord2f((f1 + f4 - 1.0F) / 128.0F, (f2 + 7.99F) / 128.0F);\r\n/* 178:188 */ GL11.glVertex3f(this.i + f4 - 1.0F - f3, this.j + 7.99F, 0.0F);\r\n/* 179:189 */ GL11.glEnd();\r\n/* 180: */ \r\n/* 181:191 */ return this.d[paramInt];\r\n/* 182: */ }",
"public void draw() {\n\t\t\tfloat[] vertices = new float[mVertices.size()];\n\t\t\tfor (int i = 0; i < vertices.length; i++)\n\t\t\t\tvertices[i] = mVertices.get(i);\n\t\t\t\n\t\t\tfloat[] textureCoords = null;\n\t\t\tif (mTextureID != 0) {\n\t\t\t\ttextureCoords = new float[mTextureCoords.size()];\n\t\t\t\tfor (int i = 0; i < textureCoords.length; i++)\n\t\t\t\t\ttextureCoords[i] = mTextureCoords.get(i);\n\t\t\t}\n\t\t\t\n\t\t\tshort[] indices = new short[mIndices.size()];\n\t\t\tfor (int i = 0; i < indices.length; i++)\n\t\t\t\tindices[i] = mIndices.get(i);\n\t\t\t\n\t\t\t// Get OpenGL\n\t\t\tGL10 gl = GameGraphics2D.this.mGL;\n\t\t\t\n\t\t\t// Set render state\n\t\t\tgl.glDisable(GL10.GL_LIGHTING);\n\t\t\tgl.glEnable(GL10.GL_DEPTH_TEST);\n\t\t\tgl.glEnable(GL10.GL_BLEND);\n\n\t\t\tif (mBlendingMode == BLENDING_MODE.ALPHA)\n\t\t\t\tgl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);\n\t\t\telse if (mBlendingMode == BLENDING_MODE.ADDITIVE)\n\t\t\t\tgl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE);\n\t\t\t\n\t\t\tif (mTextureID != 0)\n\t\t\t\tgl.glEnable(GL10.GL_TEXTURE_2D);\n\t\t\telse\n\t\t\t\tgl.glDisable(GL10.GL_TEXTURE_2D);\n\t\t\t\n\t\t\t// Draw the batch of textured triangles\n\t\t\tgl.glColor4f(Color.red(mColour) / 255.0f,\n\t\t\t\t\t\t Color.green(mColour) / 255.0f,\n\t\t\t\t\t\t Color.blue(mColour) / 255.0f,\n\t\t\t\t\t\t Color.alpha(mColour) / 255.0f);\n\t\t\t\n\t\t\tif (mTextureID != 0) {\n\t\t\t\tgl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureID);\n\t\t\t\tgl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, GameGraphics.getFloatBuffer(textureCoords));\n\t\t\t}\n\t\t\t\n\t\t\tgl.glVertexPointer(3, GL10.GL_FLOAT, 0, GameGraphics.getFloatBuffer(vertices));\n\t\t\tgl.glDrawElements(GL10.GL_TRIANGLES, indices.length,\n\t\t\t\t\tGL10.GL_UNSIGNED_SHORT, GameGraphics.getShortBuffer(indices));\n\t\t}",
"@Override\r\n\tpublic void surfaceCreated(GL10 gl) {\n\t\tgl.glDisable(GL10.GL_DITHER);\r\n\t\t\r\n\t\t// One-time OpenGL initialization based on context...\r\n gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT,\r\n GL10.GL_NICEST);\r\n\t\t\r\n gl.glClearColor(0, 0, 0, 1); \r\n gl.glEnable(GL10.GL_CULL_FACE);\r\n gl.glCullFace(GL10.GL_BACK);\r\n gl.glEnable(GL10.GL_DEPTH_TEST);\r\n gl.glEnable(GL10.GL_LIGHTING);\r\n gl.glDepthFunc(GL10.GL_LEQUAL);\r\n gl.glShadeModel(GL10.GL_SMOOTH);\r\n \r\n if(scene != null && use_vbos) {\r\n \t\t// TODO messy...\r\n \t\tscene.forgetHardwareBuffers();\r\n \t\tscene.generateHardwareBuffers(gl);\r\n }\r\n }",
"public void update(GL2 gl){}",
"@Override\n public void onSurfaceCreated(GL10 unused, EGLConfig config) {\n GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\n \n // Do backface culling\n GLES20.glEnable(GLES20.GL_CULL_FACE);\n GLES20.glFrontFace(GLES20.GL_CCW);\n // Why using GL_BACK won't work is a mystery\n GLES20.glCullFace(GLES20.GL_BACK);\n // Enable depth buffer\n GLES20.glEnable(GLES20.GL_DEPTH_TEST);\n GLES20.glDepthFunc(GLES20.GL_LEQUAL);\n GLES20.glDepthMask(true);\n \n for (int i = 0; i < NUM_CARS; i++) {\n mCarBody[i] = new CarBody((float) Math.random(),\n (float) Math.random(),\n (float) Math.random());\n mCarWheels[i] = new CarWheels();\n }\n \n // Create transformation matrices for each car\n for (int i = 0; i < NUM_CARS; i++) {\n mCarXOffsets[i] = (i % NUM_LANES) * 1.1f;\n mCarZOffsets[i] = ((i / NUM_LANES) * -2) + ((i % NUM_LANES) * 1.3f);\n }\n \n road = new Square(0.6f, 0.6f, 0.6f);\n land = new Square(0.1f, 0.6f, 0.1f);\n sky = new Square(0.6f, 0.6f, 0.9f);\n background = new Sprite(mActivityContext);\n \n }",
"public void init(GLAutoDrawable drawable) {\n koparka = new Koparka();\n scena = new Scena();\n GL gl = drawable.getGL();\n System.err.println(\"INIT GL IS: \" + gl.getClass().getName());\n\n // Enable VSync\n gl.setSwapInterval(1);\n\n // Setup the drawing area and shading mode\n gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);\n gl.glShadeModel(GL.GL_SMOOTH); \ngl.glEnable(GL.GL_CULL_FACE);// try setting this to GL_FLAT and see what happens.\n//wartości składowe oświetlenia i koordynaty źródła światła\n\n\n//(czwarty parametr określa odległość źródła:\n//0.0f-nieskończona; 1.0f-określona przez pozostałe parametry)\ngl.glEnable(GL.GL_LIGHTING); //uaktywnienie oświetlenia\n//ustawienie parametrów źródła światła nr. 0\ngl.glLightfv(GL.GL_LIGHT0,GL.GL_AMBIENT,ambientLight,0); //swiatło otaczające\ngl.glLightfv(GL.GL_LIGHT0,GL.GL_DIFFUSE,diffuseLight,0); //światło rozproszone\ngl.glLightfv(GL.GL_LIGHT0,GL.GL_SPECULAR,specular,0); //światło odbite\ngl.glLightfv(GL.GL_LIGHT0,GL.GL_POSITION,lightPos,0);\ngl.glLightfv( GL.GL_LIGHT0, GL.GL_SPOT_DIRECTION, direction ,0);\ngl.glLightf( GL.GL_LIGHT0, GL.GL_SPOT_EXPONENT, 1.0f );\ngl.glLightf( GL.GL_LIGHT0, GL.GL_SPOT_CUTOFF, 1.0f);//pozycja światła\ngl.glEnable(GL.GL_LIGHT0);\n\ngl.glLightfv(GL.GL_LIGHT1,GL.GL_AMBIENT,ambientLight,0); //swiatło otaczające\ngl.glLightfv(GL.GL_LIGHT1,GL.GL_DIFFUSE,diffuseLight,0); //światło rozproszone\ngl.glLightfv(GL.GL_LIGHT1,GL.GL_SPECULAR,specular,0); //światło odbite\ngl.glLightfv(GL.GL_LIGHT1,GL.GL_POSITION,lightPos2,0); //pozycja światła\ngl.glEnable(GL.GL_LIGHT1);//uaktywnienie źródła światła nr. 0\ngl.glEnable(GL.GL_COLOR_MATERIAL); //uaktywnienie śledzenia kolorów\n//kolory będą ustalane za pomocą glColor\ngl.glColorMaterial(GL.GL_FRONT, GL.GL_AMBIENT_AND_DIFFUSE);\n//Ustawienie jasności i odblaskowości obiektów\nfloat specref[] = { 1.0f, 1.0f, 1.0f, 1.0f }; //parametry odblaskowo?ci\n gl.glMaterialfv(GL.GL_FRONT, GL.GL_SPECULAR,specref,0);\n \n gl.glMateriali(GL.GL_FRONT,GL.GL_SHININESS,128);\n gl.glEnable(GL.GL_DEPTH_TEST);\n try\n {\n \n image1=ImageIO.read(getClass().getResourceAsStream(\"/bok.jpg\"));\n image2=ImageIO.read(getClass().getResourceAsStream(\"/niebo.jpg\"));\n image3=ImageIO.read(getClass().getResourceAsStream(\"/trawa.jpg\"));\n \n }\n catch (Exception ex)\n {\n return;\n }\n t1 = TextureIO.newTexture(image1, false);\nt2 = TextureIO.newTexture(image2, false);\nt3 = TextureIO.newTexture(image3, false);\ngl.glTexEnvi(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE,\n GL.GL_BLEND | GL.GL_MODULATE);\ngl.glEnable(GL.GL_TEXTURE_2D);\ngl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT);\ngl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT);\ngl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);\ngl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);\ngl.glBindTexture(GL.GL_TEXTURE_2D, t1.getTextureObject());\n\n }",
"int glCreateProgram();",
"@Override\n\tpublic void glSetup(Context cx) {\n\t\tmShader = ShaderHelper.glGenerateShader(cx, \"vertex_shader\",\n\t\t\t\t\"scene_enhance_fragment_shader\", \"aPosition\", \"uMVPMatrix\",\n\t\t\t\t\"uTexture\", \"uTextureCurve\");\n\n\t}",
"@Override\n public void postRender(GL2 gl)\n {\n gl.glDisable(GL.GL_TEXTURE_2D);\n }",
"public static void init() {\n\t\tsetOrtho(Display.getWidth(), Display.getHeight());\n\t\tglEnable(GL_BLEND);\n\t\tglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\n\t\t\n\t\tLights.init();\n\t\tenableCulling();\n\t}",
"public void onSurfaceChanged(GL10 glUnused, int width, int height) {\n\t\tGLES20.glViewport(0, 0, width, height);\n\t\tLog.d(\"ShelXle.Droid Screen Size\", width + \" \" + height);\n\t\tpixh = height;\n\t\tpixw = width;\n\t\tfpsscal = 350.0f / Math.min(width, height);\n\t\tfpsMat[0] = -fpsscal;\n\t\tfpsMat[12] = 1.0f - fpsscal;\n\t\tfpsMat3[0] = -fpsscal*1.24f;\n\t\tfpsMat3[12] = 1.0f - fpsscal*1.24f;\n\n\t\tfpsMat4[0] = -fpsscal*1.26f;\n\t\tfpsMat4[12] = 1.0f - fpsscal*1.26f;\n\t\tfpsMat2[0] = -0.25f * fpsscal;\n\t\tLog.d(\"ShelXle.Droid FPS text scaling \", fpsscal + \" \");\n\t\tfloat ratio = (float) width / height;\n\t\tfloat fh = (float) Math.tan(29.0 / 360.0 * 3.14159265358979) * 5.0f;\n\t\tfloat fw = fh * ratio;\n\t\tMatrix.frustumM(proj, 0, -fw, fw, -fh, fh, 5.0f, 800.0f);\n\t\tMatrix.setLookAtM(mv, 0, 0.0f, 200f, 0f, 0f, 0.0f, 0.0f, 0.0f, 00f, 1f);\n\t\tMatrix.multiplyMM(pmv1, 0, proj, 0, mv, 0);\n\t\tSystem.arraycopy(pmv1, 0, proj, 0, 16);\n\n\t\tMatrix.setIdentityM(mv, 0);\n\t\tMatrix.scaleM(mv, 0, 9.0f, 9.0f, 9.0f);\n\n\t\t/*\n\t\t * if (f!=null){ f.write(proj); f.write(proj);\n\t\t * \n\t\t * }\n\t\t */\n\t\t// Matrix.setIdentityM(proj,0);\n\t\t// Matrix.perspectiveM(proj, 0, 29.0f,ratio,5.0f,800.0f);\n\n\t}",
"private void initRendering() {\n\t\tmActivity.showDebugMsg(\" initRendering\");\n\t\tGLES20.glClearColor(0.0f, 0.0f, 0.0f, Vuforia.requiresAlpha() ? 0.0f : 1.0f);\n\n\t\tfor (Texture t : mTextures) {\n\t\t\tGLES20.glGenTextures(1, t.mTextureID, 0);\n\t\t\tGLES20.glBindTexture(GLES20.GL_TEXTURE_2D, t.mTextureID[0]);\n\t\t\tGLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR);\n\t\t\tGLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR);\n\t\t\tGLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGBA, t.mWidth, t.mHeight, 0, GLES20.GL_RGBA,\n\t\t\t\t\tGLES20.GL_UNSIGNED_BYTE, t.mData);\n\t\t}\n\n\t\tshaderProgramID = ArUtils.createProgramFromShaderSrc(\n\t\t\t\tShaders.CUBE_MESH_VERTEX_SHADER,\n\t\t\t\tShaders.CUBE_MESH_FRAGMENT_SHADER);\n\n\t\tvertexHandle = GLES20.glGetAttribLocation(shaderProgramID,\n\t\t\t\t\"vertexPosition\");\n\t\ttextureCoordHandle = GLES20.glGetAttribLocation(shaderProgramID,\n\t\t\t\t\"vertexTexCoord\");\n\t\tmvpMatrixHandle = GLES20.glGetUniformLocation(shaderProgramID,\n\t\t\t\t\"modelViewProjectionMatrix\");\n\t\ttexSampler2DHandle = GLES20.glGetUniformLocation(shaderProgramID,\n\t\t\t\t\"texSampler2D\");\n\n\t\tif (!mModelIsLoaded) {\n\t\t\t//object = new Teapot();\n\t\t\tobject = mActivity.get3DObject();\n\t\t\tobjectScaleFloat *= object.getDefScale();\n\t\t\t//minObjectScale *= object.getDefScale();\n\t\t\t//maxObjectScale *= object.getDefScale();\n\n\t\t\tmActivity.showDebugMsg(\"Loading model Teapot\");\n\t\t\t// Hide the Loading Dialog\n\t\t\t//mActivity.loadingDialogHandler.sendEmptyMessage(LoadingDialogHandler.HIDE_DIALOG);\n\t\t}\n\n\t}",
"public void display(GL2 gl) {}",
"public void doRender(EntityNinjastar ninjastar, double transX, double transY, double transZ, float param5, float dir){\n GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n GlStateManager.pushMatrix();\n\n GlStateManager.translate((float) transX, (float) transY, (float) transZ);\n\n //moved\n GlStateManager.enableRescaleNormal();\n float scale = 0.75F;\n GlStateManager.scale(scale, scale, scale);\n\n GlStateManager.rotate(ninjastar.prevRotationYaw + (ninjastar.rotationYaw - ninjastar.prevRotationYaw) * dir - 90.0F, 0.0F, 1.0F, 0.0F);\n GlStateManager.rotate(ninjastar.getRandomTilt(), 1.0F, 0.0F, 0.0F);\n\n //moved\n bindEntityTexture(ninjastar);\n\n Tessellator tessellator = Tessellator.getInstance();\n WorldRenderer worldRenderer = tessellator.getWorldRenderer();\n\n// GlStateManager.enableRescaleNormal();\n\n// float scale = 0.05F;\n// GlStateManager.scale(scale, scale, scale);\n\n GL11.glNormal3f(0.0F, 0.0F, scale);\n\n worldRenderer.startDrawingQuads();\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 0, 0);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 1, 0);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 1, 1);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 0, 1);\n tessellator.draw();\n\n GlStateManager.rotate(100.0F, 1.0F, 0.0F, 0.0F);\n worldRenderer.startDrawingQuads();\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 0, 0);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 1, 0);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 1, 1);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 0, 1);\n tessellator.draw();\n\n //added\n this.renderItemNinjastar.renderItemModel(this.func_177082_d(ninjastar));\n\n GlStateManager.disableRescaleNormal();\n GlStateManager.popMatrix();\n\n super.doRender(ninjastar, transX, transY, transZ, param5, dir);\n\n }",
"private void setup2DGraphics() {\n\n\t\tGL11.glMatrixMode(GL11.GL_PROJECTION);\n\t\tGL11.glLoadIdentity();\n\t\tGL11.glOrtho(0, width, 0, height, 1, -1);\n\t\tGL11.glMatrixMode(GL11.GL_MODELVIEW);\n\t\tGL11.glLoadIdentity();\n\t}",
"@Override\n\tpublic void prepareScreen() {\n\t\tgl.glColor3d(0.0, 0.0, 0.0);\n\t\tgl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);\n\t}",
"@Override\n public void display(GLAutoDrawable drawable) {\n // Get the OpenGL context\n gl = drawable.getGL().getGL2();\n\n // Clear some GL buffers\n gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);\n gl.glLoadIdentity();\n\n // Translate by saved values and set render mode\n gl.glTranslatef(tr_x, tr_y, tr_z);\n gl.glPolygonMode(GL_FRONT_AND_BACK, render_mode);\n\n // Array of light position floats\n // Convert to byte buffer and then float buffer\n float[] light_pos = {1.0f, 1.0f, 1.0f, 1.0f};\n ByteBuffer lbb = ByteBuffer.allocateDirect(16);\n lbb.order(ByteOrder.nativeOrder());\n FloatBuffer fb = lbb.asFloatBuffer();\n fb.put(light_pos);\n fb.position(0);\n\n // Set light on and send position if lights are meant to be on\n if (lights_on) {\n gl.glEnable(GL_LIGHT0);\n gl.glLightfv(GL_LIGHT0, GL_POSITION, fb);\n gl.glColorMaterial(GL_FRONT, GL_DIFFUSE);\n gl.glEnable(GL_COLOR_MATERIAL);\n } else {\n gl.glDisable(GL_LIGHT0);\n }\n\n // Create some more arrays for float buffers\n float[] ambient;\n float[] diffuse;\n float[] specular;\n\n // Use values based on selected material\n if (material % 3 == 0) {\n ambient = new float[]{0.96f, 0.96f, 0.96f, 1.0f};\n diffuse = new float[]{0.96f, 0.96f, 0.96f, 1.0f};\n specular = new float[]{0.96f, 0.96f, 0.96f, 1.0f};\n } else if (material % 3 == 1) {\n ambient = new float[]{1.0f, 0.843f, 0, 1.0f};\n diffuse = new float[]{1.0f, 0.843f, 0, 1.0f};\n specular = new float[]{1.0f, 0.843f, 0, 1.0f};\n } else {\n ambient = new float[]{0.804f, 0.5216f, 0.247f, 1.0f};\n diffuse = new float[]{0.804f, 0.5216f, 0.247f, 1.0f};\n specular = new float[]{0.804f, 0.5216f, 0.247f, 1.0f};\n }\n\n // Ambient settings for GL_LIGHT0\n fb.put(ambient);\n fb.position(0);\n// gl.glLightfv(GL_LIGHT0, GL_AMBIENT, fb);\n\n // Diffuse settings for GL_LIGHT0\n fb.put(diffuse);\n fb.position(0);\n// gl.glLightfv(GL_LIGHT0, GL_DIFFUSE, fb);\n\n // Specular settings for GL_LIGHT0\n fb.put(specular);\n fb.position(0);\n// gl.glLightfv(GL_LIGHT0, GL_SPECULAR, fb);\n\n // Settings for the ambient lighting\n fb.put(new float[]{0.3f, 0.3f, 0.3f, 1.0f});\n fb.position(0);\n// gl.glEnable(GL_LIGHTING);\n// gl.glLightModelfv(GL_LIGHT_MODEL_AMBIENT, fb);\n\n // Rotate based on saved values\n gl.glRotatef(rt_x, 1, 0, 0);\n gl.glRotatef(rt_y, 0, 1, 0);\n gl.glRotatef(rt_z, 0, 0, 1);\n\n //gl.glColor3f( 1f,0f,0f ); //applying red \n // Begin triangle rendering\n gl.glBegin(GL_POINTS);\n\n if (values != null && values.isVisible()) {\n // Loop over faces, rendering each vertex for each face\n for (int i = 0; i < values.face_list.length; i++) {\n // Set the normal for a vertex and then make the vertex\n gl.glColor3f(0.5f, 0.0f, 1.0f); //applying purpura \n// gl.glNormal3f(values.face_list[i].vertex_list[0].normal.x,\n// values.face_list[i].vertex_list[0].normal.y,\n// values.face_list[i].vertex_list[0].normal.z);\n gl.glVertex3f(values.face_list[i].vertex_list[0].x,\n values.face_list[i].vertex_list[0].y,\n values.face_list[i].vertex_list[0].z);\n\n // And again\n gl.glColor3f(0.5f, 0.0f, 1.0f); //applying red \n// gl.glNormal3f(values.face_list[i].vertex_list[1].normal.x,\n// values.face_list[i].vertex_list[1].normal.y,\n// values.face_list[i].vertex_list[1].normal.z);\n gl.glVertex3f(values.face_list[i].vertex_list[1].x,\n values.face_list[i].vertex_list[1].y,\n values.face_list[i].vertex_list[1].z);\n\n // Third time's the charm\n gl.glColor3f(0.5f, 0.0f, 1.0f); //applying red \n// gl.glNormal3f(values.face_list[i].vertex_list[2].normal.x,\n// values.face_list[i].vertex_list[2].normal.y,\n// values.face_list[i].vertex_list[2].normal.z);\n gl.glVertex3f(values.face_list[i].vertex_list[2].x,\n values.face_list[i].vertex_list[2].y,\n values.face_list[i].vertex_list[2].z);\n }\n\n if (values.face_list.length == 0) {\n for (int i = 0; i < values.vertex_list.length; i++) {\n gl.glColor3f(1f, 0f, 0f); //applying red \n gl.glVertex3f(values.vertex_list[i].x,\n values.vertex_list[i].y,\n values.vertex_list[i].z);\n }\n }\n }\n\n float[] d1f = {0.2f, 0.5f, 0.8f, 1.0f};\n FloatBuffer d1 = FloatBuffer.wrap(d1f);\n\n if (valuesB != null && !valuesB.isEmpty()) {\n for (Reader figura : valuesB) {\n if (figura.isVisible()) {\n FloatBuffer d3U = figura.getColor() == null ? d1 : figura.getColor();\n for (int i = 0; i < figura.vertex_list.length; i++) {\n gl.glColor3fv(d3U); //applying red \n// gl.glMaterialfv(GL_FRONT, GL_DIFFUSE, d2);\n gl.glVertex3f(figura.vertex_list[i].x,\n figura.vertex_list[i].y,\n figura.vertex_list[i].z);\n }\n }\n }\n }\n\n try{\n if (resultadoICPClasico != null && !resultadoICPClasico.isEmpty() && resultadoICPVisible) {\n\n for (Point3d point3d : resultadoICPClasico) {\n gl.glColor3d(1.0f, 1.1f, 0.0f); //applying amarillo? \n // gl.glMaterialfv(GL_FRONT, GL_DIFFUSE, d1);\n gl.glVertex3d(point3d.getX(), point3d.getY(), point3d.getZ());\n }\n }\n }catch(java.util.ConcurrentModificationException ex){\n log.warn(\"Solo si use archivos externos? \"+ex.getMessage()); \n }catch(Exception ex){\n log.warn(\"Otro? \"+ex.getMessage()); \n }\n\n // End rendering\n gl.glEnd();\n gl.glLoadIdentity();\n }",
"public void drawScreen(int mouseX, int mouseY, float partialTicks)\r\n\t{\r\n\r\n\t\tGL11.glDisable(GL11.GL_ALPHA_TEST);\r\n\t\tGL11.glEnable(GL11.GL_ALPHA_TEST);\r\n\t\tTessellator tessellator = Tessellator.getInstance();\r\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\r\n\t\tMinecraft.getMinecraft().getTextureManager().bindTexture(getRandomTexture());\r\n\r\n\t\tGL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\r\n\t\tbufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);\r\n\t\tbufferbuilder.pos(0.0D, (double)this.height, 0.0D).tex(0, (double) (1F + (float)mouseX)).endVertex();\r\n\t\tbufferbuilder.pos((double)this.width, (double)this.height, 0.0D).tex((double)1F, (double)(1F + (float)mouseX)).endVertex();\r\n\t\tbufferbuilder.pos((double)this.width, 0.0D, 0.0D).tex((double)1F , (double)mouseX).endVertex();\r\n\t\tbufferbuilder.pos(0, 0, 0).tex(0, mouseX).endVertex();\r\n\t\ttessellator.draw();\r\n\r\n\t\t//title textures + splash\r\n\t\tthis.mc.getTextureManager().bindTexture(MINECRAFT_TITLE_TEXTURES);\r\n\t\tGlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\r\n\t\tint j = this.width / 2 - 137;\r\n\t\tif ((double)this.minceraftRoll < 1.0E-4D)\r\n\t\t{\r\n\t\t\tthis.drawTexturedModalRect(j + 0, 30, 0, 0, 99, 44);\r\n\t\t\tthis.drawTexturedModalRect(j + 99, 30, 129, 0, 27, 44);\r\n\t\t\tthis.drawTexturedModalRect(j + 99 + 26, 30, 126, 0, 3, 44);\r\n\t\t\tthis.drawTexturedModalRect(j + 99 + 26 + 3, 30, 99, 0, 26, 44);\r\n\t\t\tthis.drawTexturedModalRect(j + 155, 30, 0, 45, 155, 44);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthis.drawTexturedModalRect(j + 0, 30, 0, 0, 155, 44);\r\n\t\t\tthis.drawTexturedModalRect(j + 155, 30, 0, 45, 155, 44);\r\n\t\t}\r\n\t\tthis.mc.getTextureManager().bindTexture(field_194400_H);\r\n\t\tdrawModalRectWithCustomSizedTexture(j + 88, 67, 0.0F, 0.0F, 98, 14, 128.0F, 16.0F);\r\n\t\tGlStateManager.pushMatrix();\r\n\t\tGlStateManager.translate((float)(this.width / 2 + 90), 70.0F, 0.0F);\r\n\t\tGlStateManager.rotate(-20.0F, 0.0F, 0.0F, 1.0F);\r\n\t\tfloat f = 1.8F - MathHelper.abs(MathHelper.sin((float)(Minecraft.getSystemTime() % 1000L) / 1000.0F * ((float)Math.PI * 2F)) * 0.1F);\r\n\t\tf = f * 100.0F / (float)(this.fontRenderer.getStringWidth(this.splashText) + 32);\r\n\t\tGlStateManager.scale(f, f, f);\r\n\t\tthis.drawCenteredString(this.fontRenderer, this.splashText, 0, -8, -256);\r\n\t\tGlStateManager.popMatrix();\r\n\t\t//End\r\n\r\n\t\tString s = \"Minecraft 1.12.2\";\r\n\r\n\t\tif (this.mc.isDemo())\r\n\t\t{\r\n\t\t\ts = s + \" Demo\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ts = s + (\"release\".equalsIgnoreCase(this.mc.getVersionType()) ? \"\" : \"/\" + this.mc.getVersionType());\r\n\t\t}\r\n\t\tthis.drawString(this.fontRenderer, \"Frame: \"+RandomTexture, this.width - this.fontRenderer.getStringWidth(\"Frame: \"+RandomTexture) - 2, this.height - 30, 16777215);\r\n\t\tthis.drawString(this.fontRenderer, \"Modified by Will0376\", this.width - this.fontRenderer.getStringWidth(\"Modified by Will0376\") - 2, this.height - 20, 16777215);\r\n\r\n\t\tList<String> brandings = Lists.reverse(FMLCommonHandler.instance().getBrandings(true));\r\n\t\tList<String> brdlist = new ArrayList<>();\r\n\t\tfor(int i = 0;i < brandings.size();i++){\r\n\t\t\tif(brandings.get(i).contains(\"MCP\")){\r\n\t\t\t}\r\n\t\t\telse if(brandings.get(i).contains(\"Forge\")){\r\n\t\t\t\tbrdlist.add(\"Forge:\"+(brandings.get(i).split(\"Forge\")[1]));\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tbrdlist.add(brandings.get(i));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int brdline = 0; brdline < brdlist.size(); brdline++)\r\n\t\t{\r\n\t\t\tString brd = brdlist.get(brdline);\r\n\t\t\tif (!Strings.isNullOrEmpty(brd))\r\n\t\t\t{\r\n\t\t\t\tthis.drawString(this.fontRenderer, brd, 2, this.height - ( 10 + brdline * (this.fontRenderer.FONT_HEIGHT + 1)), 16777215);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.drawString(this.fontRenderer, \"Copyright Mojang AB. Do not distribute!\", this.widthCopyrightRest, this.height - 10, -1);\r\n\r\n\r\n\t\tsuper.drawScreen(mouseX, mouseY, partialTicks);\r\n\t}",
"public void init(int width, int height) {\n try {\n Display.setDisplayMode(new DisplayMode(width, height));\n Display.create();\n } catch (LWJGLException ex) {\n System.exit(0);\n }\n\n GL11.glEnable(GL11.GL_TEXTURE_2D);\n GL11.glEnable(GL11.GL_BLEND);\n GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);\n GL11.glTexEnvf(GL11.GL_TEXTURE_ENV, GL11.GL_TEXTURE_ENV_MODE, GL11.GL_MODULATE);\n GL11.glMatrixMode(GL11.GL_PROJECTION);\n GL11.glLoadIdentity();\n GL11.glOrtho(0, GameConstants.WINDOW_WIDTH, 0, GameConstants.WINDOW_HEIGHT, 1, -1);\n GL11.glMatrixMode(GL11.GL_MODELVIEW);\n }",
"private void init(Context context) {\n setEGLContextClientVersion(3);\n\n mRenderer = new MyGLRenderer(context);\n\n // Set the Renderer for drawing on the GLSurfaceView\n setRenderer(mRenderer);\n// setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);\n }",
"public void setup(){\n\t\t gl.glEnable(GL.GL_BLEND);\n\t\t gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);\n\t\t for (int i = 0; i< cubes.length; i++){\n\t\t cubes[i] = this.s.new Cube(\n\t\t \t\tMath.round(p.random(-100, 100)), \n\t\t \t\tMath.round(p.random(-100, 100)), \n\t\t \t\t5,//Math.round(random(-100, 100)),\n\t\t \t\tMath.round(p.random(-10, 10)), \n\t\t \t\t\tMath.round(p.random(-10, 10)), \n\t\t\t\t\tMath.round( p.random(-10, 10))\n\t\t );\n\t\t cubRotation[i]=new Vector3D();\n\t\t cubRotationFactor[i]=new Vector3D();\n\t\t cubRotationFactor[i].x = (float)Math.random()/2f;\n\t\t cubRotationFactor[i].y = (float)Math.random()/2f;\n\t\t cubRotationFactor[i].z = (float)Math.random()/2f;\n\t\t \n\t\t cubColor[i]=new Vector3D();\n\t\t cubColor[i].x = (float)Math.random();\n\t\t cubColor[i].y = (float)Math.random();\n\t\t cubColor[i].z = (float)Math.random();\n\t\t }\n\t\t \n\t\t try {\n\t\t\togl.makeProgram(\n\t\t\t\t\t\t\"glass\",\n\t\t\t\t\t\tnew String[] {},\n\t\t\t\t\t\tnew String[] {\"SpecularColor1\",\"SpecularColor2\",\"SpecularFactor1\",\"SpecularFactor2\",\"LightPosition\"}, //\"GlassColor\",\n\t\t\t\t\t\togl.loadGLSLShaderVObject(\t\"resources/robmunro/perform/ol5/glass_c.vert\" ), \n\t\t\t\t\t\togl.loadGLSLShaderFObject(\t\"resources/robmunro/perform/ol5/glass_c.frag\"\t)\n\t\t\t\t);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t}",
"public void setContext(GLContext context);",
"public void onSurfaceCreated(GL2 gl) {\r\n gl.glMatrixMode(GLMatrixFunc.GL_PROJECTION);\r\n gl.glLoadIdentity();\r\n\r\n // Perspective\r\n final int width = SCREEN_WIDTH;\r\n final int height = SCREEN_HEIGHT;\r\n aspectRatio = (float) width / (float) height;\r\n glu.gluPerspective(camera.getOpeningAngle(), aspectRatio, nearClippingPlane, farClippingPlane);\r\n\r\n // Viewport\r\n gl.glViewport(0, 0, width, height);\r\n gl.glMatrixMode(GLMatrixFunc.GL_MODELVIEW);\r\n\r\n // Depth\r\n gl.glEnable(GL2.GL_DEPTH_TEST);\r\n\r\n // which is the front? the one which is drawn counter clockwise\r\n gl.glFrontFace(GL2.GL_CCW);\r\n // which one should NOT be drawn\r\n gl.glCullFace(GL2.GL_BACK);\r\n\r\n // define the color we want to be displayed as the \"clipping wall\"\r\n gl.glClearColor((float) (CLEAR_COLOR.get(0)), (float) (CLEAR_COLOR.get(1)), (float) (CLEAR_COLOR.get(2)), OPAQUE);\r\n\r\n // Flat shading\r\n gl.glPolygonMode(GL2.GL_FRONT_AND_BACK, GL2.GL_FILL);\r\n\r\n // Set a light, just use the first one from the root node.\r\n if (renderFrame != null && renderFrame.getRoot().getNumberOfLightSources() > 0) {\r\n LightSource lightSource = renderFrame.getRoot().getLightSource(0);\r\n float lightAmbient[] = { 1, 1, 1, 1 };\r\n float lightSpecular[] = { 1, 1, 1, 1 };\r\n float lightPosition[] = lightSource.getPosition().floatData();\r\n float lightDiffuse[] = lightSource.getColor().floatData();\r\n gl.glEnable(GL2.GL_LIGHT0);\r\n gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_AMBIENT, lightAmbient, 0);\r\n gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_SPECULAR, lightSpecular, 0);\r\n gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_DIFFUSE, lightDiffuse, 0);\r\n gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_POSITION, lightPosition, 0);\r\n }\r\n\r\n updateView(gl);\r\n }",
"@Override\n\t\tpublic void render()\n\t\t{\n\t\t\tif(color.alpha() > 0)\n\t\t\t{\n\t\t\t\tbind();\n\t\t\t\tGL11.glBindTexture(GL11.GL_TEXTURE_2D, 0);\n\t\t\t\tGL11.glBegin(GL11.GL_TRIANGLE_STRIP);\n\t\t\t\t\tfloat screenWidth = WindowManager.controller().width();\n\t\t\t\t\tfloat screenHeight = WindowManager.controller().height();\n\t\t\t\t\tGL11.glVertex2f(0, 0);\n\t\t\t\t\tGL11.glVertex2f(screenWidth, 0);\n\t\t\t\t\tGL11.glVertex2f(0, screenHeight);\n\t\t\t\t\tGL11.glVertex2f(screenWidth, screenHeight);\n\t\t\t\tGL11.glEnd();\n\t\t\t\trelease();\n\t\t\t}\n\t\t}",
"@Override\r\n\tpublic void onDrawFrame(GL10 gl) {\n\t\tgl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);\r\n\r\n\t\tgl.glMatrixMode(GL10.GL_PROJECTION);\r\n\t\tgl.glLoadIdentity();\r\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_POSITION,\r\n\t\t\t\tnew float[] { 5, 5, 5, 1 }, 0);\r\n\r\n\t\tgl.glRotatef(anglez, 0, 0, 1);\r\n\t\tgl.glRotatef(angley, 0, 1, 0);\r\n\t\tgl.glRotatef(anglex, 1, 0, 0);\r\n\t\tanglez += 0.1;\r\n\t\tangley += 0.2;\r\n\t\tanglex += 0.3;\r\n\r\n\t\tgl.glEnableClientState(GL10.GL_VERTEX_ARRAY);\r\n\t\t// gl.glEnableClientState(GL10.GL_NORMAL_ARRAY);\r\n\t\tgl.glEnableClientState(GL10.GL_COLOR_ARRAY);\r\n\r\n\t\tgl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexesBuffer);\r\n\t\tgl.glColorPointer(4, GL10.GL_FLOAT, 0, colorBuffer);\r\n\t\tgl.glDrawElements(GL10.GL_TRIANGLES, triangleBuffer.remaining(),\r\n\t\t\t\tGL10.GL_UNSIGNED_BYTE, triangleBuffer);\r\n\r\n\t\tgl.glDisableClientState(GL10.GL_VERTEX_ARRAY);\r\n\t\tgl.glDisableClientState(GL10.GL_COLOR_ARRAY);\r\n\t\tgl.glFinish();\r\n\r\n\t}",
"@Override\n\tpublic void onSurfaceChanged(GL10 gl, int width, int height) {\n\tgl.glViewport(0, 0, width, height);\n\t//set projection matrix as active matrix\n\tgl.glMatrixMode(GL10.GL_PROJECTION); \n\t//load identity matrix to multiply with next matrix operation\n\tgl.glLoadIdentity(); \n\t//set perspective projection(GL10,FovY,Aspect,zNear,zFar)\n\tGLU.gluPerspective(gl, 70,width/(float)height,0.1f, 10f);\n\t//set ModelView matrix as active\n\tgl.glMatrixMode(GL10.GL_MODELVIEW);\n\t}",
"public abstract void render(GL2 gl, GLU glu);",
"public final static void main(String[] args) {\n GLCapabilities capabilities = createGLCapabilities();\n Planet canvas = new Planet(capabilities, 800, 500);\n JFrame frame = new JFrame(\"Mini JOGL Demo (breed)\");\n frame.getContentPane().add(canvas, BorderLayout.CENTER);\n frame.setSize(800, 500);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n canvas.addKeyListener(new KeyListener() {\n @Override\n public void keyTyped(KeyEvent e) {\n }\n\n @Override\n public void keyPressed(KeyEvent e) {\n switch (e.getKeyCode()) {\n case KeyEvent.VK_D:\n case KeyEvent.VK_RIGHT:\n cX += 0.1;\n break;\n case KeyEvent.VK_A:\n case KeyEvent.VK_LEFT:\n cX -= 0.1;\n break;\n case KeyEvent.VK_UP:\n cY += 0.1;\n break;\n case KeyEvent.VK_DOWN:\n cY -= 0.1;\n break;\n case KeyEvent.VK_W:\n cZ -= 0.1;\n break;\n case KeyEvent.VK_S:\n cZ += 0.1;\n break;\n }\n }\n\n @Override\n public void keyReleased(KeyEvent e) {\n }\n });\n frame.setVisible(true);\n canvas.requestFocus();\n }",
"private float a(char paramChar, boolean paramBoolean)\r\n/* 198: */ {\r\n/* 199:207 */ if (this.e[paramChar] == 0) {\r\n/* 200:208 */ return 0.0F;\r\n/* 201: */ }\r\n/* 202:211 */ int i1 = paramChar / 'Ā';\r\n/* 203: */ \r\n/* 204:213 */ b(i1);\r\n/* 205: */ \r\n/* 206: */ \r\n/* 207:216 */ int i2 = this.e[paramChar] >>> 4;\r\n/* 208: */ \r\n/* 209:218 */ int i3 = this.e[paramChar] & 0xF;\r\n/* 210: */ \r\n/* 211:220 */ float f1 = i2;\r\n/* 212:221 */ float f2 = i3 + 1;\r\n/* 213: */ \r\n/* 214:223 */ float f3 = paramChar % '\\020' * 16 + f1;\r\n/* 215:224 */ float f4 = (paramChar & 0xFF) / '\\020' * 16;\r\n/* 216:225 */ float f5 = f2 - f1 - 0.02F;\r\n/* 217:226 */ float f6 = paramBoolean ? 1.0F : 0.0F;\r\n/* 218: */ \r\n/* 219:228 */ GL11.glBegin(5);\r\n/* 220:229 */ GL11.glTexCoord2f(f3 / 256.0F, f4 / 256.0F);\r\n/* 221:230 */ GL11.glVertex3f(this.i + f6, this.j, 0.0F);\r\n/* 222:231 */ GL11.glTexCoord2f(f3 / 256.0F, (f4 + 15.98F) / 256.0F);\r\n/* 223:232 */ GL11.glVertex3f(this.i - f6, this.j + 7.99F, 0.0F);\r\n/* 224:233 */ GL11.glTexCoord2f((f3 + f5) / 256.0F, f4 / 256.0F);\r\n/* 225:234 */ GL11.glVertex3f(this.i + f5 / 2.0F + f6, this.j, 0.0F);\r\n/* 226:235 */ GL11.glTexCoord2f((f3 + f5) / 256.0F, (f4 + 15.98F) / 256.0F);\r\n/* 227:236 */ GL11.glVertex3f(this.i + f5 / 2.0F - f6, this.j + 7.99F, 0.0F);\r\n/* 228:237 */ GL11.glEnd();\r\n/* 229: */ \r\n/* 230:239 */ return (f2 - f1) / 2.0F + 1.0F;\r\n/* 231: */ }",
"@Override\n\tpublic void onSurfaceCreated(GL10 gl,EGLConfig config){\n\t\t//OpenGL-ES version check\n\t\tString glesVersion = gl.glGetString(GL10.GL_VERSION);\n\t\tSystem.out.println(\"RTR:\" + glesVersion);\n\t\t\n\t\tString glslVersion = gl.glGetString(GLES32.GL_SHADING_LANGUAGE_VERSION);\n\t\tSystem.out.println(\"RTR: Shading lang version:\"+ glslVersion);\n\t\t\n\t\tinitialize(gl);\n\t}",
"void glTexParameteri(int target, int pname, int param);",
"public interface EglBase {\n // EGL wrapper for an actual EGLContext.\n public interface Context { long getNativeEglContext(); }\n\n // According to the documentation, EGL can be used from multiple threads at the same time if each\n // thread has its own EGLContext, but in practice it deadlocks on some devices when doing this.\n // Therefore, synchronize on this global lock before calling dangerous EGL functions that might\n // deadlock. See https://bugs.chromium.org/p/webrtc/issues/detail?id=5702 for more info.\n public static final Object lock = new Object();\n\n // These constants are taken from EGL14.EGL_OPENGL_ES2_BIT and EGL14.EGL_CONTEXT_CLIENT_VERSION.\n // https://android.googlesource.com/platform/frameworks/base/+/master/opengl/java/android/opengl/EGL14.java\n // This is similar to how GlSurfaceView does:\n // http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.1.1_r1/android/opengl/GLSurfaceView.java#760\n public static final int EGL_OPENGL_ES2_BIT = 4;\n // Android-specific extension.\n public static final int EGL_RECORDABLE_ANDROID = 0x3142;\n\n // clang-format off\n public static final int[] CONFIG_PLAIN = {\n EGL10.EGL_RED_SIZE, 8,\n EGL10.EGL_GREEN_SIZE, 8,\n EGL10.EGL_BLUE_SIZE, 8,\n EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,\n EGL10.EGL_NONE\n };\n public static final int[] CONFIG_RGBA = {\n EGL10.EGL_RED_SIZE, 8,\n EGL10.EGL_GREEN_SIZE, 8,\n EGL10.EGL_BLUE_SIZE, 8,\n EGL10.EGL_ALPHA_SIZE, 8,\n EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,\n EGL10.EGL_NONE\n };\n public static final int[] CONFIG_PIXEL_BUFFER = {\n EGL10.EGL_RED_SIZE, 8,\n EGL10.EGL_GREEN_SIZE, 8,\n EGL10.EGL_BLUE_SIZE, 8,\n EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,\n EGL10.EGL_SURFACE_TYPE, EGL10.EGL_PBUFFER_BIT,\n EGL10.EGL_NONE\n };\n public static final int[] CONFIG_PIXEL_RGBA_BUFFER = {\n EGL10.EGL_RED_SIZE, 8,\n EGL10.EGL_GREEN_SIZE, 8,\n EGL10.EGL_BLUE_SIZE, 8,\n EGL10.EGL_ALPHA_SIZE, 8,\n EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,\n EGL10.EGL_SURFACE_TYPE, EGL10.EGL_PBUFFER_BIT,\n EGL10.EGL_NONE\n };\n public static final int[] CONFIG_RECORDABLE = {\n EGL10.EGL_RED_SIZE, 8,\n EGL10.EGL_GREEN_SIZE, 8,\n EGL10.EGL_BLUE_SIZE, 8,\n EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,\n EGL_RECORDABLE_ANDROID, 1,\n EGL10.EGL_NONE\n };\n // clang-format on\n\n /**\n * Create a new context with the specified config attributes, sharing data with |sharedContext|.\n * If |sharedContext| is null, a root context is created. This function will try to create an EGL\n * 1.4 context if possible, and an EGL 1.0 context otherwise.\n */\n public static EglBase create(@Nullable Context sharedContext, int[] configAttributes) {\n return (EglBase14.isEGL14Supported()\n && (sharedContext == null || sharedContext instanceof EglBase14.Context))\n ? new EglBase14((EglBase14.Context) sharedContext, configAttributes)\n : new EglBase10((EglBase10.Context) sharedContext, configAttributes);\n }\n\n /**\n * Helper function for creating a plain root context. This function will try to create an EGL 1.4\n * context if possible, and an EGL 1.0 context otherwise.\n */\n public static EglBase create() {\n return create(null /* shaderContext */, CONFIG_PLAIN);\n }\n\n /**\n * Helper function for creating a plain context, sharing data with |sharedContext|. This function\n * will try to create an EGL 1.4 context if possible, and an EGL 1.0 context otherwise.\n */\n public static EglBase create(Context sharedContext) {\n return create(sharedContext, CONFIG_PLAIN);\n }\n\n /**\n * Explicitly create a root EGl 1.0 context with the specified config attributes.\n */\n public static EglBase createEgl10(int[] configAttributes) {\n return new EglBase10(null /* shaderContext */, configAttributes);\n }\n\n /**\n * Explicitly create a root EGl 1.0 context with the specified config attributes\n * and shared context.\n */\n public static EglBase createEgl10(\n javax.microedition.khronos.egl.EGLContext sharedContext, int[] configAttributes) {\n return new EglBase10(new EglBase10.Context(sharedContext), configAttributes);\n }\n\n /**\n * Explicitly create a root EGl 1.4 context with the specified config attributes.\n */\n public static EglBase createEgl14(int[] configAttributes) {\n return new EglBase14(null /* shaderContext */, configAttributes);\n }\n\n /**\n * Explicitly create a root EGl 1.4 context with the specified config attributes\n * and shared context.\n */\n public static EglBase createEgl14(\n android.opengl.EGLContext sharedContext, int[] configAttributes) {\n return new EglBase14(new EglBase14.Context(sharedContext), configAttributes);\n }\n\n void createSurface(Surface surface);\n\n // Create EGLSurface from the Android SurfaceTexture.\n void createSurface(SurfaceTexture surfaceTexture);\n\n // Create dummy 1x1 pixel buffer surface so the context can be made current.\n void createDummyPbufferSurface();\n\n void createPbufferSurface(int width, int height);\n\n Context getEglBaseContext();\n\n boolean hasSurface();\n\n int surfaceWidth();\n\n int surfaceHeight();\n\n void releaseSurface();\n\n void release();\n\n void makeCurrent();\n\n // Detach the current EGL context, so that it can be made current on another thread.\n void detachCurrent();\n\n void swapBuffers();\n\n void swapBuffers(long presentationTimeStampNs);\n}",
"public \n\tBitsGLRenderer( \n\t\t\tfinal Context context ) {\n\t\t\n\t\tsuper( context );\n\t\t\n\t\tthis.mBitsGame = BitsGame.getInstance( );\n\n\t\tthis.setRenderer( this );\n\t\tthis.setFocusable(true);\n\t\tthis.setFocusableInTouchMode(true);\n\t\t\n\t\tthis.mVertexBufferSize = BitsApp.sRenderBufferSize;\n\t\tthis.mIndexBufferSize = BitsApp.sRenderBufferSize / 16 * BitsGLImage.INDICES_PER_SPRITE;\n\n\t\t//init the rotation array\n\t\tthis.mLastRotation[0] = 0f;\n\t\tthis.mLastRotation[1] = -1f;\n\t\tthis.mLastRotation[2] = -1f;\t\t\n\t\t\n\t\tthis.mVertices = new float[this.mVertexBufferSize];\n\t\tByteBuffer buffer = ByteBuffer.allocateDirect( this.mVertices.length * 16 ); //16 -> (X,Y,U,V) are 4 Float values -> Float is 4 Bytes long\n\t buffer.order( ByteOrder.nativeOrder() );\n\t this.mVertexBuffer = buffer.asFloatBuffer();\n\t \n\t //Pre-Filling the index buffer. The buffer content will never change.\n\t //This buffer always contains a sequence of 0,1,2,2,3,0 values that are used to render BitsImages efficiently.\n\t final short[] indices = new short[this.mIndexBufferSize];\n\t final int len = indices.length;\n\t short j = 0;\n\t for ( int i = 0; i < len; i+= BitsGLImage.INDICES_PER_SPRITE, j += BitsGLImage.VERTICES_PER_SPRITE ) {\n\t \tindices[i + 0] = (short)( j + 0 ); // Calculate Index 0 (first Triangle)\n\t indices[i + 1] = (short)( j + 1 ); // Calculate Index 1 (first Triangle)\n\t indices[i + 2] = (short)( j + 2 ); // Calculate Index 2 (first Triangle)\n\t indices[i + 3] = (short)( j + 2 ); // Calculate Index 3 (second Triangle)\n\t indices[i + 4] = (short)( j + 3 ); // Calculate Index 4 (second Triangle)\n\t indices[i + 5] = (short)( j + 0 ); // Calculate Index 5 (second Triangle)\n\t }\n buffer = ByteBuffer.allocateDirect( indices.length * (Short.SIZE / 8) ); //Short == 2 Bytes\n buffer.order( ByteOrder.nativeOrder() );\n this.mIndexBuffer = buffer.asShortBuffer();\n this.mIndexBuffer.clear();\n this.mIndexBuffer.put( indices );\n this.mIndexBuffer.flip();\n\t}",
"public void init(GLAutoDrawable drawable) {\n drawable.setGL(new DebugGL(drawable.getGL())); //Ну может быть зачем-то он тут и нужен...\n\n final GL gl = drawable.getGL(); //Объект со всеми функциями.\n\n gl.glEnable(GL.GL_DEPTH_TEST); //Разрешаем z-буффер.\n gl.glDepthFunc(GL.GL_LEQUAL); //Задаем функцию глубины для z-буффера.\n\n gl.glShadeModel(GL.GL_SMOOTH); //Плавный переход цветов. Нужно чтобы тень красиво плавно переходила.\n gl.glClearColor(0f, 0f, 0.2f, 0f); //Задаем цвет затирания. Ну то-есть у нас это цвет фона.\n\n gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST); //Все настройки на максимум.\n gl.glHint(GL.GL_POINT_SMOOTH_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_LINE_SMOOTH_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_POLYGON_SMOOTH_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_TEXTURE_COMPRESSION_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_FRAGMENT_SHADER_DERIVATIVE_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_FOG_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_GENERATE_MIPMAP_HINT, GL.GL_NICEST);\n\n glu = new GLU(); //Глу он и есть глу.\n\n earth = new Earth();\n satellite = new Satellite();\n\n\n animator = new FPSAnimator(this, fps);\n animator.start(); //Создаем и запускаем аниматора.\n }",
"public boolean isHardwareAccelerated() {\n\t\treturn false;\n\t}",
"@Override\n public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {\n GL2 gl = drawable.getGL().getGL2(); // get the OpenGL 2 graphics context\n \n if (height == 0) height = 1; // prevent divide by zero\n float aspect = (float)width / height;\n \n \n gl.glViewport(0, 0, width, height);\n \n gl.glClearDepth(1.0f);\n gl.glEnable(GL.GL_DEPTH_TEST);\n gl.glDepthFunc(GL.GL_LEQUAL);\n gl.glShadeModel(GL.GL_LINE_SMOOTH);\n gl.glHint(GL2.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);\n\n gl.glEnable(GL2.GL_DEPTH_TEST);\n gl.glEnable(GL2.GL_NORMALIZE);\n gl.glEnable(GL2.GL_LIGHTING);\n gl.glEnable(GL2.GL_LIGHT0);\n gl.glEnable(GL2.GL_COLOR_MATERIAL);\n \n gl.glMatrixMode(GL2.GL_PROJECTION); \n gl.glLoadIdentity(); \n glu.gluPerspective(60.0, aspect, 0.1, 1000.0); \n\n float []lightPos={-40,100,40,0};\n float ambient[] = {0.1f, 0.1f, 0.1f,1.0f} ;\n float diffuse[] = {0.5f, 0.5f, 0.5f,1.0f} ;\n float spec[] = {0.0f, 0.0f, 0.0f,1.0f};\n float emiss[] = {0.0f, 0.0f, 0.0f,2.0f}; \n \tgl.glColorMaterial(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE);\n \tgl.glLightfv(GL2.GL_LIGHT0, GL2.GL_POSITION, lightPos,0);\n \tgl.glLightfv(GL2.GL_LIGHT0, GL2.GL_AMBIENT, ambient,0);\n \tgl.glLightfv(GL2.GL_LIGHT0, GL2.GL_DIFFUSE, diffuse,0);\n \n gl.glMatrixMode(GL2.GL_MODELVIEW);\n gl.glLoadIdentity(); // reset\n OneTriangle.setup(gl, width, height);\n }",
"@Override\n\t@GLContextRequired\n\tpublic void initGL() {\n\t\tif(Objects.isNull(va)){\n\t\t\tva = new VertexArray(4);\n\t\t\tupdateGL(false);\t\t\n\t\t}\n\t}",
"public void display(GLAutoDrawable drawable) {\n GL2 gl = drawable.getGL().getGL2();\n //\n float position[] = {0.0f, 0.0f, 1.0f, 0.0f};\n float mat_cube1[] = {0.75f, 0.75f, 0.0f, 1.0f};\n float mat_cube2[] = {0.0f, 0.75f, 0.75f, 1.0f};\n\n if (polySmooth)\n gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);\n else\n gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);\n\n toggleSmooth(gl);\n\n gl.glPushMatrix();\n\n gl.glTranslatef(0.0f, 0.0f, -8.0f);\n gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_POSITION, position, 0);\n\n gl.glBlendFunc(GL2.GL_SRC_ALPHA_SATURATE, GL.GL_ONE);\n\n gl.glPushMatrix();\n gl.glRotatef(30.0f, 1.0f, 0.0f, 0.0f);\n gl.glRotatef(60.0f, 0.0f, 1.0f, 0.0f);\n gl.glMaterialfv(GL.GL_FRONT, GL2.GL_DIFFUSE, mat_cube1, 0);\n glut.glutSolidCube(1.0f);\n gl.glPopMatrix();\n\n gl.glTranslatef(0.0f, 0.0f, -2.0f);\n gl.glMaterialfv(GL.GL_FRONT, GL2.GL_DIFFUSE, mat_cube2, 0);\n gl.glRotatef(30.0f, 0.0f, 1.0f, 0.0f);\n gl.glRotatef(60.0f, 1.0f, 0.0f, 0.0f);\n glut.glutSolidCube(1.0f);\n gl.glPopMatrix();\n\n gl.glFlush();\n }",
"public void render(boolean swapBuffs)\r\n\t{\r\n\t\tif (glj.gljMakeCurrent() == false) return;\r\n\t\tgl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );\r\n\r\n\t\t((Camera) CameraSet.elementAt(0)).render(this);\r\n\r\n\t\tfor (int i = 0;i < LightSet.size();i++) {\r\n\t\t\t((Light) LightSet.elementAt(i)).render(this);\r\n\t\t}\r\n\r\n\t\tgl.glMatrixMode(GL_MODELVIEW);\r\n\t\tfor (int i=0;i<ActorSet.size();i++) {\r\n\t\t\t((Actor) ActorSet.elementAt(i)).render(this);\r\n\t\t}\r\n\t\tif (swapBuffs)\r\n\t\t\tglj.gljSwap();\r\n //glj.gljCheckGL();\r\n //glj.gljFree();\r\n \t}",
"public void onSurfaceCreated(GL10 glUnused, EGLConfig config) {\n\t\tGLES20.glBlendFunc(GLES20.GL_SRC_ALPHA, GLES20.GL_ONE_MINUS_SRC_ALPHA);\n\t\tmVertexShader = RawResourceReader.readTextFileFromRawResource(mContext,\n\t\t\t\tde.moliso.shelxle.R.raw.atoms_vetrex_shader);\n\t\tmFragmentShader = RawResourceReader.readTextFileFromRawResource(\n\t\t\t\tmContext, de.moliso.shelxle.R.raw.atoms_fragment_shader);\n\n\t\tmProgram = createProgram(mVertexShader, mFragmentShader);\n\t\tif (mProgram == 0) {\n\t\t\treturn;\n\t\t}\n\t\ttry{\n\t\t\tversionName = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0).versionName;\n\t\t}catch (NameNotFoundException e){\n\t\t\t//wurst\n\t\t}\n\t\ttexturH = GLES20.glGetUniformLocation(mProgram, \"text\");\n\t\tellipsoidH = GLES20.glGetUniformLocation(mProgram, \"eli\");\n\t\tlichtH = GLES20.glGetUniformLocation(mProgram, \"lighting\");\n\n\t\tvertexAttr1 = GLES20.glGetAttribLocation(mProgram, \"vertex\");\n\n\t\tnormalAttr1 = GLES20.glGetAttribLocation(mProgram, \"normal\");\n\t\tmatrixUniform1 = GLES20.glGetUniformLocation(mProgram, \"matrix\");\n\t\tinvmatrixUniform1 = GLES20.glGetUniformLocation(mProgram, \"invmatrix\");\n\t\tcolorUniform1 = GLES20.glGetUniformLocation(mProgram, \"col\");\n\n\t\tmTextureLoc = GLES20.glGetUniformLocation(mProgram, \"textureSampler\");\n\t\tMatrix.setIdentityM(mv, 0);\n\t\tMatrix.scaleM(mv, 0, 9.0f, 9.0f, 9.0f);\n\n\t\t// Matrix.setLookAtM(mVMatrix, 0, 0, 0, -5, 0f, 0f, 0f, 0f, 1.0f, 0.0f);\n\n\t}",
"public void doRender(ModEntityTNTPrimed par1TNTPrimed, double x, double y, double z, float par5, float par6)\n {\n GL11.glPushMatrix();\n GL11.glTranslatef((float)x, (float)y, (float)z);\n float f2;\n\n if ((float)par1TNTPrimed.getFuse() - par6 + 1.0F < 10.0F)\n {\n f2 = 1.0F - ((float)par1TNTPrimed.getFuse() - par6 + 1.0F) / 10.0F;\n\n if (f2 < 0.0F)\n {\n f2 = 0.0F;\n }\n\n if (f2 > 1.0F)\n {\n f2 = 1.0F;\n }\n\n f2 *= f2;\n f2 *= f2;\n float f3 = 1.0F + f2 * 0.3F;\n GL11.glScalef(f3, f3, f3);\n }\n\n f2 = (1.0F - ((float)par1TNTPrimed.getFuse() - par6 + 1.0F) / 100.0F) * 0.8F;\n this.bindEntityTexture(par1TNTPrimed);\n this.blockRenderer.renderBlockAsItem(ModBlocks.modTNT[(par1TNTPrimed.getFuse() / 20) + 1], 0, par1TNTPrimed.getBrightness(par6));\n\n// if (par1TNTPrimed.getFuse() / 5 % 2 == 0)\n// {\n// GL11.glDisable(GL11.GL_TEXTURE_2D);\n// GL11.glDisable(GL11.GL_LIGHTING);\n// GL11.glEnable(GL11.GL_BLEND);\n// GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_DST_ALPHA);\n// GL11.glColor4f(1.0F, 1.0F, 1.0F, f2);\n// this.blockRenderer.renderBlockAsItem(ModBlocks.modTNT[(par1TNTPrimed.getFuse() / 20) + 1], 0, 1.0F);\n// GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n// GL11.glDisable(GL11.GL_BLEND);\n// GL11.glEnable(GL11.GL_LIGHTING);\n// GL11.glEnable(GL11.GL_TEXTURE_2D);\n// }\n\n GL11.glPopMatrix();\n }",
"public void display(GLAutoDrawable drawable){\n GL4 gl = (GL4) GLContext.getCurrentGL();\n \n gl.glClear(GL_DEPTH_BUFFER_BIT);\n \n // not needed if bkg is black\n float bkg[] = { 1.0f, 1.0f, 1.0f, 1.0f };\n FloatBuffer bkgBuffer = Buffers.newDirectFloatBuffer(bkg);\n gl.glClearBufferfv(GL_COLOR, 0, bkgBuffer);\n\n \n gl.glUseProgram(rendering_program); // loads program from init with the two shaders\n \n // define perspective matrix \n //perspective\n float aspect = (float) myCanvas.getWidth()/(float) myCanvas.getHeight();\n Matrix3D pMat = this.perspectiveMethod(60.0f, aspect, 0.1f, 100.0f);\t\t//for persective projection /zentrische Projektion\n Matrix3D oMat = this.orthographicMethod(1.0f, -1.0f, 1.0f, -1.0f, 0.1f, 100.0f); //for orthographic projection\n \n \n //copy perspective and MV matricies to corressponding uniform variables\n int mv_loc = gl.glGetUniformLocation(rendering_program, \"mv_matrix\");\n int proj_loc = gl.glGetUniformLocation(rendering_program, \"proj_matrix\");\n \n //build view matrix\n Matrix3D vMat = new Matrix3D();\n vMat.translate(-cameraX, -cameraY, -cameraZ);\n \n //build model matrix\n Matrix3D mMat = new Matrix3D(); //for right now we dont do anything (rotate, translate etc.) in with the mMat in this project\n\n Matrix3D mvMat = new Matrix3D();\n mvMat.concatenate(vMat);\t\t\t//first view matrix \n mvMat.concatenate(mMat);\t\t\t//second we put the model matrix on it (A * B)\n \n\n //plug the mvMat and pMat into the shader uniform variables \n gl.glUniformMatrix4fv(mv_loc, 1, false, mvMat.getFloatValues(),0);\n gl.glUniformMatrix4fv(proj_loc, 1, false, pMat.getFloatValues(),0);\n \n \n //be sure to bind the vbo before assigning the attribute pointer\n gl.glBindBuffer(GL_ARRAY_BUFFER, vbo[0]); \n // now set the \"location = 0\" info in the shaders to the point info from vbo[0]\n gl.glVertexAttribPointer(0, 3, GL_FLOAT, false, 0, 0);\n gl.glEnableVertexAttribArray(0);\n \n gl.glBindBuffer(GL_ARRAY_BUFFER, vbo[1]);\n gl.glVertexAttribPointer(1, 3, GL_FLOAT, false, 0, 0);\n gl.glEnableVertexAttribArray(1);\n \n gl.glLineWidth(10.0f);\n \n gl.glEnable(GL_DEPTH_TEST);\n gl.glDrawArrays(GL_LINES, 0, 4);\n\n }",
"public void loadGLTexture(GL10 gl, Location location)\n\t{\n\t\tgl.glGenTextures(2, textures, 0);\n\n\t\t// loading texture\n\t\tBitmap bitmap;\n\t\tfloat width;\n\t\tfloat height;\n\n\n\t\t// ...and bind it to our array\n\t\tgl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);\n\n\t\t// create nearest filtered texture\n\t\tgl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);\n\t\tgl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR);\n\n\t\t// loading texture\n\t\tif (location != null){\n\t\t\tdouble longitude = location.getLongitude();\n\t\t\tif (longitude > 0)\n\t\t\t\tbitmap = GraphicUtil.getLngLatBitmap(\"LON\" + \" E\" + df.format(Math.abs(longitude)) );\n\t\t\telse if (longitude < 0)\n\t\t\t\tbitmap = GraphicUtil.getLngLatBitmap(\"LON\" + \" W\" + df.format(Math.abs(longitude)) );\n\t\t\telse\n\t\t\t\tbitmap = GraphicUtil.getLngLatBitmap(\"LON\" + \" \" + \"000.0000\" );\n\t\t}\n\t\telse\n\t\t\tbitmap = GraphicUtil.getLngLatBitmap(\"LON\" + \" \" + \"000.0000\");\n\n\t\t// Use Android GLUtils to specify a two-dimensional texture image from our bitmap\n\t\tGLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);\n\n\t\t// calculate the bitmap's size respectively to the size of the screen \n\t\twidth = bitmap.getWidth() / 1000f * FONT_SIZE;\n\t\theight = bitmap.getHeight() / 1000f * FONT_SIZE;\n\n\t\t//Log.v(TAG , \"width : \" + width + \" , height : \" + height );\n\n\t\t// resize the vertices according to the size of the bitmap\n\t\tvertices_long[0] = LONGITUDE_POINT - width; // left\n\t\tvertices_long[3] = LONGITUDE_POINT - width; // left\n\t\tvertices_long[1] = VERTICAL_POINT - height;// bottom\n\t\tvertices_long[7] = VERTICAL_POINT - height;// bottom\n\n\t\t// Clean up\n\t\tbitmap.recycle();\n\n\t\t// ...and bind it to our array\n\t\tgl.glBindTexture(GL10.GL_TEXTURE_2D, textures[1]);\n\n\t\t// create nearest filtered texture\n\t\tgl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);\n\t\tgl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR);\n\n\t\t// loading texture\n\t\tif (location != null){\n\t\t\tdouble latitude = location.getLatitude();\n\t\t\tif (latitude > 0)\n\t\t\t\tbitmap = GraphicUtil.getLngLatBitmap(\"LAT\" + \" N\" + df.format(Math.abs(latitude)) );\n\t\t\telse if (latitude < 0)\n\t\t\t\tbitmap = GraphicUtil.getLngLatBitmap(\"LAT\" + \" S\" + df.format(Math.abs(latitude)) );\n\t\t\telse\n\t\t\t\tbitmap = GraphicUtil.getLngLatBitmap(\"LAT\" + \" \" + \"000.0000\" );\n\t\t}\n\t\telse\n\t\t\tbitmap = GraphicUtil.getLngLatBitmap(\"LAT\" + \" \" + \"000.0000\");\n\n\t\t// Use Android GLUtils to specify a two-dimensional texture image from our bitmap\n\t\tGLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);\n\n\t\t// calculate the bitmap's size respectively to the size of the screen \n\t\twidth = bitmap.getWidth() / 1000f * FONT_SIZE;\n\t\theight = bitmap.getHeight() / 1000f * FONT_SIZE;\n\n\t\t//Log.v(TAG , \"width : \" + width + \" , height : \" + height );\n\n\t\t// resize the vertices according to the size of the bitmap\n\t\tvertices_lat[6] = LATITUDE_POINT + width; // right\n\t\tvertices_lat[9] = LATITUDE_POINT + width; // right\n\t\tvertices_lat[1] = VERTICAL_POINT - height;// bottom\n\t\tvertices_lat[7] = VERTICAL_POINT - height;// bottom\n\n\t\t// Clean up\n\t\tbitmap.recycle(); \n\t}",
"@Override\n public void init(GLAutoDrawable drawable) {\n GL2 gl = drawable.getGL().getGL2(); // get the OpenGL graphics context\n glu = new GLU(); // get GL Utilities\n gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); // set background (clear) color\n gl.glClearDepth(1.0f); // set clear depth value to farthest\n gl.glEnable(GL_DEPTH_TEST); // enables depth testing\n gl.glDepthFunc(GL_LEQUAL); // the type of depth test to do\n gl.glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // best perspective correction\n gl.glShadeModel(GL_SMOOTH); // blends colors nicely, and smoothes out lighting\n\n for (int i = 0; i < 1000; ++i) {\n u.addMass((double) r.nextInt(10000) / 10000d,\n // adding random mass\n Vector.sum(new Vector((double) r.nextInt(10) - 5,(double) r.nextInt(10) - 5,(double) r.nextInt(10) - 5),this.camOrigin),\n new Vector(0,0,0)\n// new Vector(r.nextGaussian()*.0001,r.nextGaussian()*.0001,r.nextGaussian()*.0001)\n );\n }\n }",
"@Override\n public void onSurfaceCreated(GL10 gl, EGLConfig config) {\n gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Set color's clear-value to black\n gl.glClearDepthf(1.0f); // Set depth's clear-value to farthest\n gl.glEnable(GL10.GL_DEPTH_TEST); // Enables depth-buffer for hidden surface removal\n gl.glDepthFunc(GL10.GL_LEQUAL); // The type of depth testing to do\n gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST); // nice perspective view\n gl.glShadeModel(GL10.GL_SMOOTH); // Enable smooth shading of color\n gl.glDisable(GL10.GL_DITHER); // Disable dithering for better performance\n \n // You OpenGL|ES initialization code here\n\n \n \n }",
"@Override\n\tpublic void onDrawFrame(GL10 gl) {\n\t\tgl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); \n\t\t//set vertices shared by all cubes\n\t\t//set vertexpointer(3memberXYZ,FloatData,3Float*4Byte,dataBuffer)\n\t\tgl.glVertexPointer(3, GL10.GL_FLOAT, 12, vertices);\n\t\t//set normals shared by all cubes\n\t\t//normalpointer(dataTYPE,3float*4bytes,dataBuffer)\n\t\tgl.glNormalPointer(GL10.GL_FLOAT, 12, normals);\n\n\t\t//set light parameters\n\t\tgl.glLoadIdentity();\n\t\t//RGBA ambient light colors\n\t\tfloat[] ambientColor = { 0.1f, 0.11f, 0.1f, 1f }; \n\t\t//glLightModelfv(ambientLight, array with color, offset to color)\n\t\tgl.glLightModelfv(GL10.GL_LIGHT_MODEL_AMBIENT, ambientColor, 0);\n\t\t//position from where the light comes to the origin\n\t\tfloat[] pos = {3, 0, 2, 0};\n\t\t//set source1 position \n\t\t//glLightfv(source id, parameter, data array, offset);\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_POSITION, pos, 0);\n\n\t\t//enable lighting\n\t\tgl.glEnable(GL10.GL_LIGHTING);\n\t\t//enable source 1\n\t\tgl.glEnable(GL10.GL_LIGHT0);\n\t\t//light shade model interpolate\n\t\tgl.glShadeModel(GL10.GL_SMOOTH);\n\t\t//enable material\n\t\tgl.glEnable(GL10.GL_COLOR_MATERIAL);\n\t\t\n\t\t//1st cube will use default color, so disable color array\n\t\tgl.glDisableClientState(GL10.GL_COLOR_ARRAY);\n\t\t//set default render color for 2nd cube\n\t\tgl.glColor4f(0, 1, 0.5f, 1);\n\t\t\t\t\n\t\t//transform 1st cube\n\t\tgl.glLoadIdentity();\n\t\tgl.glTranslatef(0, 0, -8);\n\t\tgl.glScalef(0.3f, 0.3f, 0.3f);\t\n\t\tgl.glRotatef(angle, 1, 1, 0);\n\t\t\t\t\n\t\t//draw first cube\n\t\tgl.glDrawElements(GL10.GL_TRIANGLES, 36, GL10.GL_UNSIGNED_SHORT, index);\n\t\t//GL10.glDrawElements(DrawType,36 indices,shorData,dataBuffer)\n\t\t\n\t\t//second cube with Vertexcolor\n\t\t//enable color array\n\t\tgl.glEnableClientState(GL10.GL_COLOR_ARRAY);\n\t\t//glcolorpointer(4members RGBA,dataType,4floats*4bytes,dataBuffer)\n\t\tgl.glColorPointer(4, GL10.GL_FLOAT, 16, colors);\n\t\t\t\t\n\t\t//set transformation for second cube\n\t\tgl.glLoadIdentity();\n\t\tgl.glTranslatef(0, 0, -8);\n\t\tgl.glRotatef(angle, 0, 1, 0);\n\t\t//Draw second cube\n\t\tgl.glDrawElements(GL10.GL_TRIANGLES, 36, GL10.GL_UNSIGNED_SHORT, index);\n\t\t\n\t\t//third cube will use texture, disable color array\n\t\tgl.glDisableClientState(GL10.GL_COLOR_ARRAY);\n\t\t//set default color to solid white\n\t\tgl.glColor4f(1, 1, 1, 1);\n\t\t//enable texture coordinates array\n\t\tgl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);\n\t\t//enable 2D texture for bind\n\t\tgl.glEnable(GL10.GL_TEXTURE_2D);\n\t\t//set texturecoord pointer\n\t\tgl.glTexCoordPointer(2, GL10.GL_FLOAT, 8, texturemap); \n\t\t//bind texture\n\t\tgl.glBindTexture(GL10.GL_TEXTURE_2D, textureId);\n\t\t\n\t\t//translate 3rd cube\n\t\tgl.glLoadIdentity();\n\t\tgl.glTranslatef(-5, -1, -7);\n\t\tgl.glRotatef(-angle, 0, 1, 0);\n\t\t//draw 3rd cube\n\t\tgl.glDrawElements(GL10.GL_TRIANGLES, 36, GL10.GL_UNSIGNED_SHORT, index);\n\t\t//unbind texture so other cubes dont use texture\n\t\tgl.glBindTexture(GL10.GL_TEXTURE_2D, 0);\n\t\t//disable texture state if not next frame first cube \n\t\t//will try to use the texture\n\t\tgl.glDisableClientState(GL10.GL_TEXTURE_COORD_ARRAY);\n\t\tgl.glDisable(GL10.GL_TEXTURE_2D);\n\t\tangle++;\n\t}",
"@Override\n public void onSurfaceCreated(GL10 gl, EGLConfig config) {\n Log.d(LOGTAG, \"GLRenderer.onSurfaceCreated\");\n\n initRendering();\n\n vuforiaAppSession.onSurfaceCreated();\n }",
"public void renderWorld(boolean renderWithLight);",
"public void display(GLAutoDrawable drawable) {\t\n\t\n\tSystem.out.println(times++);\n\n\t\n\tfbo.attach(gl);\n\t\n\t\tclear(gl);\n\t\t\n\t\tgl.glColor4f(1.f, 1.f, 1.f, 1f);\n\t\tgl.glBegin(GL2.GL_QUADS);\n\t\t{\n\t\t gl.glVertex3f(0.0f, 0.0f, 1.0f);\n\t\t gl.glVertex3f(0.0f, 1.0f, 1.0f);\n\t\t gl.glVertex3f(1.0f, 1.0f, 1.0f);\n\t\t gl.glVertex3f(1.0f, 0.0f, 1.0f);\n\t\t}\n\t\tgl.glEnd();\n\t\t\n\t\tgl.glColor4f(1.f, 0.f, 0.f, 1f);\n\t\tgl.glBegin(GL2.GL_TRIANGLES);\n\t\t{\n\t\t gl.glVertex3f(0.0f, 0.0f, 1.0f);\n\t\t gl.glVertex3f(0.0f, 1.0f, 1.0f);\n\t\t gl.glVertex3f(1.0f, 1.0f, 1.0f);\n\t\t}\n\t\tgl.glEnd();\n\tfbo.detach(gl);\n\n \n\tclear(gl);\n\n \n gl.glColor4f(1.f, 1.f, 1.f, 1f);\n fbo.bind(gl);\n\t gl.glBegin(GL2.GL_QUADS);\n\t {\n\t gl.glTexCoord2f(0.0f, 0.0f);\n\t \tgl.glVertex3f(0.0f, 1.0f, 1.0f);\n\t gl.glTexCoord2f(1.0f, 0.0f);\n\t \tgl.glVertex3f(1.0f, 1.0f, 1.0f);\n\t gl.glTexCoord2f(1.0f, 1.0f);\n\t \tgl.glVertex3f(1.0f, 0.0f, 1.0f);\n\t gl.glTexCoord2f(0.0f, 1.0f);\n\t \tgl.glVertex3f(0.0f, 0.0f, 1.0f);\n\t }\n gl.glEnd();\n fbo.unbind(gl);\n}",
"public void draw(GL10 gl) {\n }",
"public OpenGLModel() {\n\n\n\t}",
"public void renderTileEntityAt(TileGolemBuilder tile, double par2, double par4, double par6, float pt, int destroyStage) {\n/* 41 */ GL11.glPushMatrix();\n/* 42 */ GL11.glTranslatef((float)par2 + 0.5F, (float)par4, (float)par6 + 0.5F);\n/* 43 */ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n/* */ \n/* 45 */ func_147499_a(TEX);\n/* */ \n/* 47 */ if (destroyStage >= 0) {\n/* */ \n/* 49 */ func_147499_a(field_178460_a[destroyStage]);\n/* 50 */ GlStateManager.func_179128_n(5890);\n/* 51 */ GlStateManager.func_179094_E();\n/* 52 */ GlStateManager.func_179152_a(5.0F, 5.0F, 2.0F);\n/* 53 */ GlStateManager.func_179109_b(0.0625F, 0.0625F, 0.0625F);\n/* 54 */ GlStateManager.func_179128_n(5888);\n/* */ } else {\n/* 56 */ GL11.glMatrixMode(5890);\n/* 57 */ GL11.glLoadIdentity();\n/* 58 */ GL11.glScalef(1.0F, -1.0F, 1.0F);\n/* 59 */ GL11.glMatrixMode(5888);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 64 */ EnumFacing facing = BlockStateUtils.getFacing(tile.func_145832_p());\n/* 65 */ if (tile.func_145831_w() != null) {\n/* 66 */ switch (facing.ordinal()) { case 5:\n/* 67 */ GL11.glRotatef(270.0F, 0.0F, 1.0F, 0.0F); break;\n/* 68 */ case 4: GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); break;\n/* 69 */ case 3: GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);\n/* */ break; }\n/* */ \n/* */ \n/* */ \n/* */ }\n/* 75 */ this.model.renderAllExcept(new String[] { \"press\" });\n/* */ \n/* 77 */ GL11.glPushMatrix();\n/* 78 */ float h = tile.press;\n/* 79 */ double s = Math.sin(Math.toRadians(h)) * 0.625D;\n/* 80 */ GL11.glTranslated(0.0D, -s, 0.0D);\n/* 81 */ this.model.renderPart(\"press\");\n/* 82 */ GL11.glPopMatrix();\n/* */ \n/* 84 */ if (destroyStage >= 0) {\n/* */ \n/* 86 */ GlStateManager.func_179128_n(5890);\n/* 87 */ GlStateManager.func_179121_F();\n/* 88 */ GlStateManager.func_179128_n(5888);\n/* */ } else {\n/* 90 */ GL11.glMatrixMode(5890);\n/* 91 */ GL11.glLoadIdentity();\n/* 92 */ GL11.glScalef(1.0F, 1.0F, 1.0F);\n/* 93 */ GL11.glMatrixMode(5888);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 98 */ GL11.glTranslatef(-0.3125F, 0.625F, 1.3125F);\n/* 99 */ GL11.glRotatef(90.0F, -1.0F, 0.0F, 0.0F);\n/* 100 */ TextureAtlasSprite icon = Minecraft.func_71410_x().func_175602_ab().func_175023_a().func_178122_a(Blocks.field_150353_l.func_176223_P());\n/* 101 */ UtilsFX.renderQuadFromIcon(icon, 0.625F, 1.0F, 1.0F, 1.0F, 200, 771, 1.0F);\n/* */ \n/* 103 */ GL11.glPopMatrix();\n/* */ }",
"public void init(GL2 gl) {\n\t}",
"private void materialSetup(GL gl)\n {\n\tfloat white[] = { 1.0f, 1.0f, 1.0f, 1.0f };\n\tfloat black[] = { 0.0f, 0.0f, 0.0f, 1.0f };\n\tfloat dim[] = { 0.1f, 0.1f, 0.1f, 1.0f };\n\t\n\t// Set up material and light\n\tgl.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT, dim, 0);\n\tgl.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_DIFFUSE, white, 0);\n\tgl.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_SPECULAR, dim, 0);\n\tgl.glMaterialf(GL.GL_FRONT_AND_BACK, GL.GL_SHININESS, 5);\n\n\t// Set light color\n \tgl.glLightfv(GL.GL_LIGHT0, GL.GL_AMBIENT, dim, 0);\n \tgl.glLightfv(GL.GL_LIGHT0, GL.GL_DIFFUSE, white, 0);\n \tgl.glLightfv(GL.GL_LIGHT0, GL.GL_SPECULAR, black, 0);\n\n\t// Turn on light and lighting\n\tgl.glEnable(GL.GL_LIGHT0);\n\tgl.glEnable(GL.GL_LIGHTING);\n\n\t// Allow glColor() to affect current diffuse material\n\tgl.glColorMaterial(GL.GL_FRONT_AND_BACK, GL.GL_DIFFUSE);\n\tgl.glEnable(GL.GL_COLOR_MATERIAL);\n }",
"@Override\n public void onDrawFrame(GL10 gl) {\n Log.i(\"kike\", \"onDrawFrame\");\n if (effectContext == null) {\n effectContext = EffectContext.createWithCurrentGlContext();\n }\n if (effect != null) {\n effect.release();\n }\n ////////////////////////////Efecte//////////////////////////\n //noEffect();\n //autofixEffect(fxValue); // ok\n //backdropperEffect(); // no probat\n //bitmapoverlayEffect(); // no probat\n //blackwhiteEffect(100, 150); // ok, ... :(\n brightnessEffect(fxValue); // ok\n //contrastEffect(fxValue); // ok\n //cropEffect(); // no probat\n //crossprocessEffect(); // ok\n //documentaryEffect(); // ok\n //duotoneEffect(); // no probat\n //filllightEffect(fxValue); // ok\n //fisheyeEffect(fxValue); // ok\n //flipEffect(false, false); // ok\n //grainEffect(fxValue); // l'efecte que fa no es massa bo\n //grayScaleEffect(); // ok\n //lomoishEffect(); // ok\n //negativeEffect(); // ok\n //posterizeEffect(); // ok\n //redeyeEffect(); // no probat\n //rotateEffect(fxValue); // error\n //saturateEffect(fxValue); // ok\n //sepiaEffect(); // ok\n //sharpenEffect(fxValue); // l'efecte que fa no es massa bo\n //straightenEffect(fxValue); // ok, retalla la imatge tambe\n //temperatureEffect(fxValue); // ok\n //tintEffect(); // no probat\n //vignetteEffect(fxValue); // nomes fa forma rodona i negra??\n ////////////////////////////Efecte//////////////////////////\n square.draw(textures[1]);\n }",
"boolean render(final CoreGL gl, float deltaTime);",
"@Override\n public void onFrameAvailable(SurfaceTexture st) {\n mGLView.requestRender();\n }",
"@Override\n public void render(Renderable renderable)\n {\n context.setBlending(false, GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);\n context.setCullFace(GL20.GL_BACK);\n context.setDepthTest(GL20.GL_LEQUAL, 0.0f, 50.0f);\n context.setDepthMask(true);\n super.render(renderable);\n }",
"protected void initRender() {\n glActiveTexture(GL_TEXTURE0);\n // Bind the texture\n glBindTexture(GL_TEXTURE_2D, texture.getId());\n\n // Draw the mesh\n glBindVertexArray(vaoId);\n glEnableVertexAttribArray(0);\n glEnableVertexAttribArray(1);\n }",
"public static boolean render(int coordX, int coordY, int coordZ, int texture, Texture[] textureMap) {\r\n GL11.glTranslatef(coordX, coordY, coordZ); // Absolute position in game\r\n// GL11.glRotatef(xrot, 1.0f, 0.0f, 0.0f); // Rotate On The X Axis\r\n// GL11.glRotatef(yrot, 0.0f, 1.0f, 0.0f); // Rotate On The Y Axis\r\n// GL11.glRotatef(zrot, 0.0f, 0.0f, 1.0f); // Rotate On The Z Axis\r\n GL11.glBindTexture(GL11.GL_TEXTURE_2D, textureMap[texture].getTextureID()); // Select Our Texture\r\n GL11.glBegin(GL11.GL_QUADS);\r\n // Front Face\r\n GL11.glTexCoord2f(0.0f, 0.0f);\r\n GL11.glVertex3f(-1.0f, -1.0f, 1.0f); // Bottom Left Of The Texture and Quad\r\n GL11.glTexCoord2f(1.0f, 0.0f);\r\n GL11.glVertex3f(1.0f, -1.0f, 1.0f); // Bottom Right Of The Texture and Quad\r\n GL11.glTexCoord2f(1.0f, 1.0f);\r\n GL11.glVertex3f(1.0f, 1.0f, 1.0f); // Top Right Of The Texture and Quad\r\n GL11.glTexCoord2f(0.0f, 1.0f);\r\n GL11.glVertex3f(-1.0f, 1.0f, 1.0f); // Top Left Of The Texture and Quad\r\n // Back Face\r\n GL11.glTexCoord2f(1.0f, 0.0f);\r\n GL11.glVertex3f(-1.0f, -1.0f, -1.0f); // Bottom Right Of The Texture and Quad\r\n GL11.glTexCoord2f(1.0f, 1.0f);\r\n GL11.glVertex3f(-1.0f, 1.0f, -1.0f); // Top Right Of The Texture and Quad\r\n GL11.glTexCoord2f(0.0f, 1.0f);\r\n GL11.glVertex3f(1.0f, 1.0f, -1.0f); // Top Left Of The Texture and Quad\r\n GL11.glTexCoord2f(0.0f, 0.0f);\r\n GL11.glVertex3f(1.0f, -1.0f, -1.0f); // Bottom Left Of The Texture and Quad\r\n // Top Face\r\n GL11.glTexCoord2f(0.0f, 1.0f);\r\n GL11.glVertex3f(-1.0f, 1.0f, -1.0f); // Top Left Of The Texture and Quad\r\n GL11.glTexCoord2f(0.0f, 0.0f);\r\n GL11.glVertex3f(-1.0f, 1.0f, 1.0f); // Bottom Left Of The Texture and Quad\r\n GL11.glTexCoord2f(1.0f, 0.0f);\r\n GL11.glVertex3f(1.0f, 1.0f, 1.0f); // Bottom Right Of The Texture and Quad\r\n GL11.glTexCoord2f(1.0f, 1.0f);\r\n GL11.glVertex3f(1.0f, 1.0f, -1.0f); // Top Right Of The Texture and Quad\r\n // Bottom Face\r\n GL11.glTexCoord2f(1.0f, 1.0f);\r\n GL11.glVertex3f(-1.0f, -1.0f, -1.0f); // Top Right Of The Texture and Quad\r\n GL11.glTexCoord2f(0.0f, 1.0f);\r\n GL11.glVertex3f(1.0f, -1.0f, -1.0f); // Top Left Of The Texture and Quad\r\n GL11.glTexCoord2f(0.0f, 0.0f);\r\n GL11.glVertex3f(1.0f, -1.0f, 1.0f); // Bottom Left Of The Texture and Quad\r\n GL11.glTexCoord2f(1.0f, 0.0f);\r\n GL11.glVertex3f(-1.0f, -1.0f, 1.0f); // Bottom Right Of The Texture and Quad\r\n // Right face\r\n GL11.glTexCoord2f(1.0f, 0.0f);\r\n GL11.glVertex3f(1.0f, -1.0f, -1.0f); // Bottom Right Of The Texture and Quad\r\n GL11.glTexCoord2f(1.0f, 1.0f);\r\n GL11.glVertex3f(1.0f, 1.0f, -1.0f); // Top Right Of The Texture and Quad\r\n GL11.glTexCoord2f(0.0f, 1.0f);\r\n GL11.glVertex3f(1.0f, 1.0f, 1.0f); // Top Left Of The Texture and Quad\r\n GL11.glTexCoord2f(0.0f, 0.0f);\r\n GL11.glVertex3f(1.0f, -1.0f, 1.0f); // Bottom Left Of The Texture and Quad\r\n // Left Face\r\n GL11.glTexCoord2f(0.0f, 0.0f);\r\n GL11.glVertex3f(-1.0f, -1.0f, -1.0f); // Bottom Left Of The Texture and Quad\r\n GL11.glTexCoord2f(1.0f, 0.0f);\r\n GL11.glVertex3f(-1.0f, -1.0f, 1.0f); // Bottom Right Of The Texture and Quad\r\n GL11.glTexCoord2f(1.0f, 1.0f);\r\n GL11.glVertex3f(-1.0f, 1.0f, 1.0f); // Top Right Of The Texture and Quad\r\n GL11.glTexCoord2f(0.0f, 1.0f);\r\n GL11.glVertex3f(-1.0f, 1.0f, -1.0f); // Top Left Of The Texture and Quad\r\n GL11.glEnd();\r\n\r\n// xrot += 0.3f; // X Axis Rotation\r\n// yrot += 0.2f; // Y Axis Rotation\r\n// zrot += 0.4f; // Z Axis Rotation\r\n\r\n return true;\r\n }",
"public void init(SoState state)\n\n{\n // Set to GL defaults:\n// ivState.ambientColor.copyFrom( getDefaultAmbient());\n// ivState.emissiveColor.copyFrom( getDefaultEmissive());\n// ivState.specularColor.copyFrom( getDefaultSpecular());\n// ivState.shininess = getDefaultShininess();\n// ivState.colorMaterial = false;\n// ivState.blending = false;\n// ivState.lightModel = LightModel.PHONG.getValue();\n \n // Initialize default color storage if not already done\n if (defaultDiffuseColor == null) {\n defaultDiffuseColor = SbColorArray.allocate(1);\n defaultDiffuseColor.get(0).setValue(getDefaultDiffuse());\n defaultTransparency = new float[1];\n defaultTransparency[0] = getDefaultTransparency();\n defaultColorIndices = new int[1];\n defaultColorIndices[0] = getDefaultColorIndex();\n defaultPackedColor = new int[1];\n defaultPackedColor[0] = getDefaultPacked();\n }\n \n //following value will be matched with the default color, must\n //differ from 1 (invalid) and any legitimate nodeid. \n// ivState.diffuseNodeId = 0;\n// ivState.transpNodeId = 0;\n// //zero corresponds to transparency off (default).\n// ivState.stippleNum = 0;\n// ivState.diffuseColors = defaultDiffuseColor;\n// ivState.transparencies = defaultTransparency;\n// ivState.colorIndices = defaultColorIndices;\n// ivState.packedColors = defaultPackedColor;\n//\n// ivState.numDiffuseColors = 1;\n// ivState.numTransparencies = 1;\n// ivState.packed = false;\n// ivState.packedTransparent = false;\n// ivState.transpType = SoGLRenderAction.TransparencyType.SCREEN_DOOR.ordinal(); \n// ivState.cacheLevelSetBits = 0;\n// ivState.cacheLevelSendBits = 0;\n// ivState.overrideBlending = false;\n// \n// ivState.useVertexAttributes = false;\n//\n// ivState.drawArraysCallback = null;\n// ivState.drawElementsCallback = null; \n// ivState.drawArraysCallbackUserData = null;\n// ivState.drawElementsCallbackUserData = null; \n\n coinstate.ambient.copyFrom(getDefaultAmbient());\n coinstate.specular.copyFrom(getDefaultSpecular());\n coinstate.emissive.copyFrom(getDefaultEmissive());\n coinstate.shininess = getDefaultShininess();\n coinstate.blending = /*false*/0;\n coinstate.blend_sfactor = 0;\n coinstate.blend_dfactor = 0;\n coinstate.alpha_blend_sfactor = 0;\n coinstate.alpha_blend_dfactor = 0;\n coinstate.lightmodel = LightModel.PHONG.getValue();\n coinstate.packeddiffuse = false;\n coinstate.numdiffuse = 1;\n coinstate.numtransp = 1;\n coinstate.diffusearray = SbColorArray.copyOf(lazy_defaultdiffuse);\n coinstate.packedarray = IntArrayPtr.copyOf(lazy_defaultpacked);\n coinstate.transparray = FloatArray.copyOf(lazy_defaulttransp);\n coinstate.colorindexarray = IntArrayPtr.copyOf(lazy_defaultindex);\n coinstate.istransparent = false;\n coinstate.transptype = (int)(SoGLRenderAction.TransparencyType.BLEND.getValue());\n coinstate.diffusenodeid = 0;\n coinstate.transpnodeid = 0;\n coinstate.stipplenum = 0;\n coinstate.vertexordering = VertexOrdering.CCW.getValue();\n coinstate.twoside = false ? 1 : 0;\n coinstate.culling = false ? 1 : 0;\n coinstate.flatshading = false ? 1 : 0;\n coinstate.alphatestfunc = 0;\n coinstate.alphatestvalue = 0.5f;\n}",
"public abstract void render(GL2 gl);",
"public void draw(GL gl)\r\n\t{\r\n\t\tglu = new GLU();\r\n\t\tquadric = glu.gluNewQuadric();\r\n\r\n\t\tgl.glPushMatrix();\r\n\t\t\r\n\t\t gl.glTranslated(loc[0], loc[1], loc[2]);\r\n\t\t gl.glScaled(0.9, 0.9, 0.9);\r\n\t\t gl.glTranslated(0, 2, 0);\r\n\t\t gl.glRotated(heading, 0,1,0); //JW added\r\n\t\t \r\n\t\t //Helicopter Body\r\n\t\t\tgl.glPushMatrix();\r\n\t\t gl.glColor4d(0.2, 0.2, 1, 1);\r\n\t\t gl.glScaled(1, 0.7, 1);\r\n\t\t glu.gluSphere(quadric, 3, 20, 20);\r\n\t gl.glPopMatrix();\r\n\t \r\n\t //Helicopter back part #1\r\n\t gl.glPushMatrix();\r\n\t\t gl.glColor4d(1, 0.2, 0, 1);\r\n\t\t gl.glRotated(-90, 0, 1, 0);\r\n\t\t glu.gluCylinder(quadric, 1, 0, 7, 50, 50);\r\n\t gl.glPopMatrix();\r\n\t \r\n\t //Helicopter back part #2\r\n\t gl.glPushMatrix();\r\n\t \tgl.glColor4d(1, 0.2, 0, 1);\r\n\t\t gl.glScaled(0.5, 0.1, 0.5);\r\n\t\t gl.glTranslated(-12, 1, 0);\r\n\t\t gl.glRotated(-90, 1, 0, 0);\r\n\t\t glu.gluCylinder(quadric, 0.5, 0.5, 10, 40, 10);\r\n\t gl.glPopMatrix();\r\n\t \r\n\t //Rotor Rod\r\n\t gl.glPushMatrix();\r\n\t \tgl.glColor4d(1, 0.2, 0, 1);\r\n\t\t gl.glScaled(0.5, 0.1, 0.5);\r\n\t\t gl.glTranslated(0, 21, 0);\r\n\t\t gl.glRotated(-90, 1, 0, 0);\r\n\t\t glu.gluCylinder(quadric, 0.5, 0.5, 15, 35, 15);\r\n\t\t gl.glPopMatrix(); \r\n\t\t \r\n\t //Landing Rods #1\r\n\t gl.glPushMatrix();\r\n\t\t \tgl.glColor4d(1, 0.2, 0, 1);\r\n\t\t gl.glScaled(0.5, 0.1, 0.5);\r\n\t\t gl.glTranslated(-1, -35, 2);\r\n\t\t gl.glRotated(-90, 1, 0, 0);\r\n\t\t glu.gluCylinder(quadric, 0.3, 0.3, 20, 15, 155);\r\n\t gl.glPopMatrix();\r\n\t \r\n\t gl.glPushMatrix();\r\n\t\t \tgl.glColor4d(1, 0.2, 0, 1);\r\n\t\t gl.glScaled(0.5, 0.1, 0.5);\r\n\t\t gl.glTranslated(2, -35, 2);\r\n\t\t gl.glRotated(-90, 1, 0, 0);\r\n\t\t glu.gluCylinder(quadric, 0.3, 0.3, 20, 15, 25);\r\n\t\t gl.glPopMatrix();\r\n\t\t \r\n\t\t //Landing Part #1\r\n\t\t gl.glPushMatrix();\r\n\t\t \tgl.glColor4d(0, 0, 0.99, 1);\r\n\t\t gl.glScaled(0.5, 0.1, 0.5);\r\n\t\t gl.glTranslated(-4, -35, 2);\r\n\t\t gl.glRotated(120, 120, 120, 120);\r\n\t\t glu.gluCylinder(quadric, 0.5, 0.5, 10, 35, 15);\r\n\t\t gl.glPopMatrix();\r\n\r\n\t\t //Landing Rods #2\r\n\t gl.glPushMatrix();\r\n\t\t \tgl.glColor4d(1, 0.2, 0, 1);\r\n\t\t gl.glScaled(0.5, 0.1, 0.5);\r\n\t\t gl.glTranslated(-1, -35, -2);\r\n\t\t gl.glRotated(-90, 1, 0, 0);\r\n\t\t glu.gluCylinder(quadric, 0.3, 0.3, 20, 15, 155);\r\n\t gl.glPopMatrix();\r\n\t \r\n\t gl.glPushMatrix();\r\n\t\t \tgl.glColor4d(1, 0.2, 0, 1);\r\n\t\t gl.glScaled(0.5, 0.1, 0.5);\r\n\t\t gl.glTranslated(2, -35, -2);\r\n\t\t gl.glRotated(-90, 1, 0, 0);\r\n\t\t glu.gluCylinder(quadric, 0.3, 0.3, 20, 15, 25);\r\n\t\t gl.glPopMatrix();\r\n\t\t \r\n\t\t //Landing Part #2\r\n\t\t gl.glPushMatrix();\r\n\t\t \tgl.glColor4d(0, 0, 0.99, 1);\r\n\t\t gl.glScaled(0.5, 0.1, 0.5);\r\n\t\t gl.glTranslated(-4, -35, -2);\r\n\t\t gl.glRotated(120, 120, 120, 120);\r\n\t\t glu.gluCylinder(quadric, 0.5, 0.5, 10, 35, 15);\r\n\t\t gl.glPopMatrix();\r\n\r\n\t\t gl.glPushMatrix();\r\n\t\t\t if(loc[1] > 1 && loc[1] <10)\r\n\t\t\t\t{\r\n\t\t\t\t \txSpeed();\r\n\t\t\t\t \tgl.glRotated(x, 0, 1, 0);\r\n\t\t\t\t} else if (loc[1] == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tgl.glRotated(0, 0, 1, 0);\r\n\t\t\t\t} else if(loc[1] > 10 )\r\n\t\t\t\t{\r\n\t\t\t\t\txSpeedIncrease();\r\n\t\t\t\t\tgl.glRotated(x, 0, 1, 0);\r\n\t\t\t\t}\r\n\t \t\trotors.draw(gl);\r\n\t \tgl.glPopMatrix();\r\n\t \t\r\n\t gl.glPopMatrix();\r\n\t \r\n\t gl.glFlush();\r\n\t\tgl.glEnd();\r\n\t}",
"public RenderingEngine(Application application)\n\t{\n\t\tthis.application = application;\n\t\t\n\t\tclearColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);\n\t\toverlayBrightness = 1.0f;\n\t\t\n\t\tglClearColor(0.0f, 0.0f, 0.0f, 0.0f);\n\t\t\n\t\tglEnable(GL_TEXTURE_2D);\n\t\tglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\n\t\tglEnable(GL_BLEND);\n\t}",
"public void renderFrame(State state, float[] lPMatrix) {\n\t\tisModelVisible = false;\n\t\t// Renders video background replacing Renderer.DrawVideoBackground()\n\t\tmRenderer.renderVideoBackground();\n\n\t\tGLES20.glEnable(GLES20.GL_DEPTH_TEST);\n\t\tGLES20.glEnable(GLES20.GL_CULL_FACE);\n\t\tGLES20.glCullFace(GLES20.GL_BACK);\n\t\tGLES20.glEnable(GLES20.GL_BLEND);\n\t\tGLES20.glBlendFunc(GLES20.GL_SRC_ALPHA, GLES20.GL_ONE_MINUS_SRC_ALPHA);\n\n\t\t// Did we find any trackables this frame?\n\t\tfor (int tIdx = 0; tIdx < state.getNumTrackableResults(); tIdx++) {\n\t\t\tmActivity.setFirstLoading();\n\t\t\tisModelVisible = true;\n\t\t\tTrackableResult result = state.getTrackableResult(tIdx);\n\t\t\t//Trackable trackable = result.getTrackable();\n\t\t\t//printUserData(trackable);\n\t\t\tMatrix44F modelViewMatrix_Vuforia = Tool.convertPose2GLMatrix(result.getPose());\n\n\t\t\tfloat[] lMVMatrix = modelViewMatrix_Vuforia.getData();\n\t\t\tfloat[] lMVPMatrix = new float[16];\n\n\t\t\t//String trackName = trackable.getName();\n\t\t\tint textureIndex = 0;\n\n\t\t\t//mActivity.showDebugMsg(trackable.getName());\n\n\t\t\t// deal with the modelview and projection matrices\n\n\n\t\t\tMatrix.translateM(lMVMatrix, 0, startX, startY, startZ);\n\t\t\tMatrix.scaleM(lMVMatrix, 0, objectScaleFloat, objectScaleFloat, objectScaleFloat);\n\t\t\t/// rotate based on gestures\n\t\t\tMatrix.rotateM(lMVMatrix, 0, objectRotateFloatZ, 0, 0, 1.0f);\n\t\t\tMatrix.rotateM(lMVMatrix, 0, objectRotateFloatY, 0, 1.0f, 0);\n\n\t\t\tMatrix.multiplyMM(lMVPMatrix, 0, lPMatrix, 0, lMVMatrix, 0);\n\n\t\t\t// activate the shader program and bind the vertex/normal/tex coords\n\t\t\tGLES20.glUseProgram(shaderProgramID);\n\n\t\t\tGLES20.glVertexAttribPointer(vertexHandle, 3, GLES20.GL_FLOAT, false, 0, object.getVertices());\n\t\t\tGLES20.glVertexAttribPointer(textureCoordHandle, 2, GLES20.GL_FLOAT, false, 0, object.getTexCoords());\n\n\t\t\tGLES20.glEnableVertexAttribArray(vertexHandle);\n\t\t\tGLES20.glEnableVertexAttribArray(textureCoordHandle);\n\n\t\t\t// bind the texture and pass to shader\n\t\t\tGLES20.glActiveTexture(GLES20.GL_TEXTURE0);\n\t\t\tGLES20.glBindTexture(GLES20.GL_TEXTURE_2D, mTextures.get(textureIndex).mTextureID[0]);\n\t\t\tGLES20.glUniform1i(texSampler2DHandle, 0);\n\n\t\t\t// pass the model view matrix to the shader\n\t\t\tGLES20.glUniformMatrix4fv(mvpMatrixHandle, 1, false, lMVPMatrix, 0);\n\n\t\t\t// vykreslit objekt\n\t\t\t// if indices are set in 3D object\n\t\t\tif(object.getNumObjectIndex() > 0) {\n\t\t\t\tGLES20.glDrawElements(GLES20.GL_TRIANGLES, object.getNumObjectIndex(), GLES20.GL_UNSIGNED_SHORT,\n\t\t\t\t\t\tobject.getIndices());\n\t\t\t\t//Log.d(LOGTAG, \"Draw Elements with INDICES\");\n\t\t\t}else {\n\t\t\t\tGLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, object.getNumObjectVertex());\n\t\t\t\t//Log.d(LOGTAG, \"Draw Elements without INDICES\");\n\t\t\t}\n\n\t\t\t// disable the enabled arrays\n\t\t\tGLES20.glDisableVertexAttribArray(vertexHandle);\n\t\t\tGLES20.glDisableVertexAttribArray(textureCoordHandle);\n\t\t\tArUtils.checkGLError(\"Render Frame\");\n\t\t}\n\n\t\tGLES20.glDisable(GLES20.GL_BLEND);\n\t\tGLES20.glDisable(GLES20.GL_DEPTH_TEST);\n\n\t}",
"public boolean usesNormals() {\r\n return false;\r\n }",
"@Override\n\tpublic void onDrawFrame(GL10 gl) {\n\t\tLibNative.render();\n\t}",
"void init(){\n if(DEBUG) Log.d(TAG, \"Creating GlHelper and Surface\");\n mGLHelper = new GLHelper();\n int mDefaultTextureID = 10001;\n SurfaceTexture st = new SurfaceTexture(mDefaultTextureID);\n st.setDefaultBufferSize(mWidth, mHeight);\n mGLHelper.init(st);\n\n textureID = mGLHelper.createOESTexture();\n sTexture = new SurfaceTexture(textureID);\n sTexture.setOnFrameAvailableListener(this);\n surface = new Surface(sTexture);\n }"
] |
[
"0.7378095",
"0.70807177",
"0.70044065",
"0.6975589",
"0.6931261",
"0.6799115",
"0.67849773",
"0.6773322",
"0.6655905",
"0.6516455",
"0.64759916",
"0.6419983",
"0.63810796",
"0.6341802",
"0.62704617",
"0.6253199",
"0.6221465",
"0.62156415",
"0.6174242",
"0.6140702",
"0.61286414",
"0.61215746",
"0.6110823",
"0.6082909",
"0.60791385",
"0.6049899",
"0.60457534",
"0.60314333",
"0.6025775",
"0.6023672",
"0.59953624",
"0.599158",
"0.5983683",
"0.5982631",
"0.5946382",
"0.5937589",
"0.5933214",
"0.5927562",
"0.5921721",
"0.59156936",
"0.5913654",
"0.5910947",
"0.58997977",
"0.58923584",
"0.58911276",
"0.58746535",
"0.5868902",
"0.586675",
"0.58570707",
"0.58417857",
"0.58336425",
"0.583115",
"0.5804579",
"0.5792429",
"0.5787737",
"0.5780015",
"0.57777226",
"0.5773386",
"0.5763562",
"0.57514906",
"0.57444334",
"0.5743834",
"0.57423437",
"0.57407475",
"0.5730367",
"0.5717772",
"0.5716022",
"0.57103294",
"0.5701006",
"0.5696079",
"0.56927323",
"0.5688426",
"0.5685316",
"0.5682929",
"0.566864",
"0.5665476",
"0.5664332",
"0.5653394",
"0.5646575",
"0.5645028",
"0.56429845",
"0.56423235",
"0.5634898",
"0.56269985",
"0.56263053",
"0.5616537",
"0.56144506",
"0.5611556",
"0.56109285",
"0.5607616",
"0.559981",
"0.55978143",
"0.5594932",
"0.5593563",
"0.55845493",
"0.55839777",
"0.558167",
"0.5581395",
"0.55800414",
"0.55755925"
] |
0.6344838
|
13
|
Created by akash on 3/10/16.
|
public interface interfaceA extends LocationListener, SensorEventListener {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"public final void mo51373a() {\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\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}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"private void m50366E() {\n }",
"@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\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"private void init() {\n\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n public void init() {\n }",
"public void mo38117a() {\n }",
"@Override\n protected void init() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n\tprotected void getExras() {\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 entrenar() {\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}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n public void init() {}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"public void method_4270() {}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n void init() {\n }",
"private void strin() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\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 nghe() {\n\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"@Override\n public int describeContents() { return 0; }",
"public void mo4359a() {\n }",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public int retroceder() {\n return 0;\n }",
"public abstract void mo70713b();",
"private void init() {\n\n\n\n }",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\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\t\tpublic void init() {\n\t\t}",
"public void m23075a() {\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\tprotected void doF6() {\n\t\t\r\n\t}",
"public void mo12628c() {\n }",
"@Override\n public void initialize() { \n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"private void initialize() {\n\t\t\n\t}",
"@Override\n public void init() {\n }",
"private void m50367F() {\n }"
] |
[
"0.5872181",
"0.58406717",
"0.5765962",
"0.570486",
"0.56805634",
"0.5675857",
"0.5663815",
"0.5660753",
"0.5645679",
"0.5631607",
"0.5631607",
"0.5631607",
"0.5631607",
"0.5631607",
"0.5607304",
"0.5607304",
"0.55913264",
"0.55854535",
"0.55833155",
"0.55769575",
"0.5576871",
"0.55715996",
"0.55663025",
"0.55525476",
"0.5538871",
"0.5521471",
"0.5521471",
"0.55141824",
"0.5511019",
"0.5494619",
"0.54823726",
"0.5479481",
"0.5459882",
"0.54553294",
"0.54548866",
"0.5453493",
"0.5452666",
"0.5452666",
"0.5452666",
"0.54497063",
"0.54464144",
"0.54464144",
"0.54464144",
"0.5441669",
"0.54415333",
"0.54354805",
"0.54322255",
"0.54268366",
"0.5425689",
"0.5425689",
"0.5425689",
"0.5422517",
"0.54186785",
"0.54186785",
"0.5413632",
"0.5412363",
"0.5411128",
"0.54047984",
"0.5404753",
"0.5393207",
"0.5393207",
"0.5393207",
"0.5393207",
"0.5393207",
"0.5393207",
"0.53916854",
"0.53913826",
"0.539105",
"0.53880066",
"0.53830296",
"0.5370084",
"0.5362373",
"0.5353837",
"0.5340574",
"0.53290945",
"0.5327311",
"0.5320475",
"0.5308007",
"0.52944154",
"0.5281203",
"0.52795",
"0.52775925",
"0.52775925",
"0.527672",
"0.527672",
"0.527672",
"0.527672",
"0.527672",
"0.527672",
"0.527672",
"0.5273751",
"0.52699995",
"0.5269479",
"0.5269479",
"0.52598983",
"0.52572787",
"0.525577",
"0.52491504",
"0.5249052",
"0.5242872",
"0.5237433"
] |
0.0
|
-1
|
Constructor, sets m_file to a File handle on fname
|
public BiomartAccess(String fname)
{
m_file = new File(fname);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public FileReceiver(String filename) {\r\n _fileName = filename;\r\n }",
"public File(String fileName) {\n\t\tthis(new java.io.File(fileName));\n\t}",
"public ObjReader(String filename){\n file = filename;\n }",
"public File() {\n\t\tthis.name = \"\";\n\t\tthis.data = \"\";\n\t\tthis.creationTime = 0;\n\t}",
"public FileName(String fn) {\n setFile(fn);\n }",
"public FileName(File fn) {\n fileType = LOCAL;\n setFile(fn.getPath()); // in File, \"path\" is the whole name, not just the directory path\n }",
"public OnDemandInputStream(File file) {\n super();\n\n this.file = file;\n }",
"public FileLogger(String fileName){\r\n\t\tthis(fileName, false);\r\n\t}",
"public FileControl( String fileName ) {\n this.fileName = fileName;\n }",
"public Log(String fp)\n {\n this.filePath = fp;\n\n open();\n }",
"public void setFile(File f) { file = f; }",
"public XMLHandler(File file) {\n this.file = file;\n }",
"public FileEvent(FileObject src, FileObject file) {\n super(src);\n this.file = file;\n this.time = System.currentTimeMillis ();\n }",
"public FileInfo(File file) {\n this.file = file;\n }",
"public File() {\n }",
"public FileHandlerImpl(){\n\t\tfilepath = null;\n\t}",
"public FileRecord(String name)\r\n {\r\n this.name = name;\r\n }",
"LogFile(File file)\n {\n this.file = file;\n }",
"public HpccFile(String fileName, Connection espconninfo) throws HpccFileException\n {\n\t this(fileName, espconninfo, \"\", \"\", new RemapInfo(), 0, \"\");\n }",
"private void setFile() {\n\t}",
"public void setFile(String fileName)\n {\n }",
"public FileProcessor(String fileName){\n\n\t\ttry{\n\t\t\tfileInput = new FileReader(fileName);\n bufferedInput = new BufferedReader(fileInput);\n\t\t}\n\t\tcatch(FileNotFoundException ex) {\n\t\t\tSystem.err.println(\"Exception:\\\"\" + fileName + \"\\\" was not found. Please enter Correct filename.\");\n\t\t\tSystem.err.println(\"Suggestion: Check for file extension or any Spelling mistake in File Name\\n\");\n\t\t\tSystem.exit(1); \n \t}\n\t}",
"public FileEvent(FileObject src) {\n this(src, src);\n }",
"public void setFile(File file)\n {\n this.file = file;\n }",
"public FileHandle(String filePath) {\n\t\tthis.filePath = filePath;\n\t}",
"public FileObject() {\n\t}",
"public FileLocation(File file) {\n this(file, -1, -1);\n }",
"public DocReader(File f)\n\t{\n\t\tthis.inputFile = f;\n\t}",
"public void setFile(File file);",
"public HTMLFile (String inFileName) {\n inFile = new File(inFileName);\n inName = inFileName;\n inURL = null;\n commonConstruction();\n }",
"public FileMonitor(String file) {\n this.file = new java.io.File(file);\n t = new Timer();\n }",
"public void setFile(File file) {\n this.file = file;\n }",
"public HTMLFile (File inFile) {\n this.inFile = inFile;\n inName = inFile.toString();\n inURL = null;\n commonConstruction();\n }",
"public WorkDataFile(String filename)\n\t{\n\t\tsetFileName(filename);\n\t}",
"File(String fileName)\n {\n this.fileNameToFilterBy = fileName;\n }",
"public StreamReader(File file) {\r\n\t\tthis.setFile(file);\r\n\t}",
"myFile(String Name){\n\t this.FileName = Name + \".txt\"\t;\n\t System.out.println(FileName);\n\t try {\n\t\treadFile() ;\n\t} catch (IOException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t\tSystem.out.println(\"No,This File Please run again\"); \n\t}\n\t}",
"BucsUserFile(File f,String unm,UserFileType ft)\n{\n this();\n set(f,unm,ft);\n}",
"public MantaFileObject(final AbstractFileName name, final MantaFileSystem fs) {\n super(name, fs);\n }",
"public ClassParser(final String file_name) {\n this.file_name = file_name;\n fileOwned = true;\n }",
"@Override\n public void setFile(File f) {\n \n }",
"public KMLFile(File file)\n {\n if (file == null)\n {\n String message = Logging.getMessage(\"nullValue.FileIsNull\");\n Logging.error(message);\n throw new IllegalArgumentException(message);\n }\n\n this.kmlFile = file;\n }",
"public TarFile(File file) {\n this.file = file;\n }",
"public void setFile(File file) {\r\n\t\tif (file!=null) this.input = null;\r\n\t\tthis.file = file;\r\n\t}",
"public InputFile(String filePath) {\n this.filePath = filePath;\n }",
"public Sim_reportfile (String filename) {\n this.filename = filename;\n }",
"public IconFile(String username, File file) {\n\t\tsuper(username, file, null);\n\t}",
"public FileData(String file_path) {\n\t\tpath = file_path;\n\t\ttry {\n\t\t\topenAndReadFile();\n\t\t}\n\t\tcatch (IOException anything) {\n\t\t\tSystem.out.println(\"Couldn't open and read \" + file_path + \". Error: \" + anything.getMessage());\n\t\t}\n\t}",
"protected AbstractSource(final String file) {\n this.sourceFile = file;\n }",
"private void init(File file) throws VlException\n {\n // under windows: will return windows path\n String path = file.getAbsolutePath();\n\n //\n // Forward Flip backslashes !\n // Do this ONLY for the local filesystem !\n //\n\n if (File.separatorChar != VRL.SEP_CHAR)\n path = VRL.uripath(path, true, File.separatorChar);\n\n // under widows: will convert windows path to URI path !\n setLocation(new VRL(VRS.FILE_SCHEME, null, path));\n this.path = getPath(); // use URI path !\n\n _file = file;\n }",
"public ExternalDocument (String format, String fileName) {\n\t\tthis.format = format;\n\t\tthis.directory = null;\n\t\tthis.fileName = fileName;\n\t\tthis.open = false;\n\t}",
"public AncFile() {\n }",
"public ContactList(String inFileName)\n {\n filename = inFileName;\n }",
"public EditFile() {\r\n\t\tsuper();\r\n\t}",
"private FileUtil() {\n \t\tsuper();\n \t}",
"public FileMessageFactory(Session session, String filename) throws MessageFactoryException\n {\n try\n {\n _filename = filename;\n _payload = FileUtils.readFileAsString(filename);\n _session = session;\n }\n catch (Exception e)\n {\n MessageFactoryException mfe = new MessageFactoryException(e.toString(), e);\n throw mfe;\n }\n }",
"public Manager(String filePath){\n\t\tthis.filePath = filePath;\n\t}",
"public FileInfo(NXTComm nxt, String fileName){\r\n\t\tthis.comm = nxt;\r\n\t\tthis.fileName = fileName;\r\n\t}",
"public FilePersistence(String file) {\n this.file = file;\n }",
"public InstrumentedFileOutputStream(File file, String recId) \r\n throws FileNotFoundException {\r\n super(file);\r\n this.recId = recId;\r\n }",
"public FileBean(File file) throws FileNotFoundException, UnsupportedEncodingException{\r\n\t\tlocation = new SimpleStringProperty();\r\n\t\tsongName = new SimpleStringProperty();\r\n\t\talbum = new SimpleStringProperty();\r\n\t\tartist = new SimpleStringProperty();\r\n\t\turl = new SimpleStringProperty();\r\n\t\t\r\n\t\t/**\r\n\t\t * must initialize with a number because this field will be called\r\n\t\t * before the MediaPlayer's status has changed which would cause a \r\n\t\t * null pointer exception to be thrown if not initialized\r\n\t\t */\r\n\t\tduration = new SimpleStringProperty(\"0.0\");\r\n\t\tlocation.set(file.getAbsolutePath().replace(\"\\\\\", \"/\"));\r\n\t\t\r\n\t\t/*\r\n\t\t * encode all special characters.\r\n\t\t * URLEncoder puts a '+' where a ' ' is so change all '+' to encoded space '%20'.\r\n\t\t */\r\n\t\turl.set(\"file:///\" + URLEncoder.encode(location.get(), \"UTF-8\").replace(\"+\", \"%20\"));\r\n\t\t\r\n\t\t/*\r\n\t\t * Could not easily figure out how to set an action event for when the Media\r\n\t\t * object is done loading. Using the MediaPlayer status change event instead.\r\n\t\t * Looking for a better option\r\n\t\t */\r\n\t\tmedia = new Media(url.get());\r\n//\t\tmedia.getMetadata().addListener(new SetMetaData());\r\n\t\tthis.player = new MediaPlayer(media);\r\n//\t\ttempPlayer.setOnReady(new OnMediaReadyEvent());\r\n\t\tsetDefaultSongNameAndArtist();\r\n\t}",
"public void setFileName(String fileName) {\n/* 39:39 */ this.fileName = fileName;\n/* 40: */ }",
"ValueResourceParser2(@NonNull File file) {\n mFile = file;\n }",
"protected SMBFile(Session sess, FileInfo finfo, int fid) {\n\t\tm_sess = sess;\n\t\tm_info = finfo;\n\t\tm_FID = fid;\n\n\t\t// Initialize the file write position using the current file size\n\n\t\tm_txpos = getFileSize();\n\t}",
"public FileName() {\n setFile(null);\n }",
"public SpecfileTaskHandler(IFile file, IDocument document) {\n \t\tsuper(file, document);\n \t}",
"public FileServ() {\n\t\tsuper();\n\t}",
"public void setFile(String file) {\r\n this.file = file;\r\n }",
"public TestNGParser(String fileName) {\n super(fileName);\n m_fileName = fileName;\n m_inputStream = null;\n m_postProcessor = null;\n }",
"public void setFile(IFile file) {\n _file = file;\n }",
"private FileManager() {}",
"public void setFileName(String fileName)\r\n/* 16: */ {\r\n/* 17:49 */ this.fileName = fileName;\r\n/* 18: */ }",
"public MyInputStream(String fileName)\n {\n try\n {\n in = new BufferedReader\n (new FileReader(fileName));\n }\n catch (FileNotFoundException e)\n {throw new MyInputException(e.getMessage());}\n }",
"public InputReader(File file){\n try {\n inputStream = new Scanner(file);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n instantiate();\n assert(invariant());\n }",
"public Project(File file)\n {\n super(file);\n this.open();\n }",
"public void setFile(String file) {\n fileName = file;\n if (isHTTP(fileName)) {\n fileType = HTTP;\n } else {\n fileType = LOCAL;\n }\n }",
"public FileOnDisk(File file) throws StyxException\n {\n this(file.getName(), file);\n }",
"public void setFile(String file)\n\t{\n\t\tthis.file = file;\n\t}",
"public void setFile(File file) {\n this.path = file != null ? file.toPath() : null;\n }",
"public FileManager() {\n\t\t\n\t}",
"public FileOnDisk(String name, File file) throws StyxException\n {\n this(name, file, 0666, true);\n }",
"public FileLoader(File file)throws IOException{\n rows =new Vector<String>();\n _file = file;\n loadTSPTWFile();\n }",
"public Customer(String fileName) {\n\t\tthis.load(fileName);\n\t}",
"public void setFileName(String fileName)\r\n {\r\n sFileName = fileName;\r\n }",
"void setFileName( String fileName );",
"public SplitFile() {\n\t}",
"MessageFile(final String name) {\n this.name = name;\n }",
"public IniFile(String name) {\r\n this.filename = name;\r\n isavailable = parse(name);\r\n }",
"private FileManager()\n {\n bookFile.open(\"bookdata.txt\");\n hisFile.open(\"history.txt\");\n idFile.open(\"idpassword.txt\");\n createIDMap();\n createHisMap(Customer.getInstance());\n }",
"public FileDecoder() {\n pathSB = new StringBuilder(100);\n }",
"public void setFileName(String fileName) {\r\n this.fileName = fileName;\r\n }",
"public FileServer(){\n\t\tfilePath = new ConcurrentHashMap<String, String>();\n\t}",
"public SourceFile(File file) throws Exception {\r\n\t\t// this.file = file;\r\n\t\tthis.zipFile = new ZipFile(file, \"UTF-8\");\r\n\t}",
"public void setFileName(String fileName) {\n this.fileName = fileName;\n }",
"public BufferedFile(String filename) throws IOException {\n this(filename, \"r\", BufferedFile.DEFAULT_BUFFER_SIZE);\n }",
"public CMD(String mFilename)\n {\n //Set the line index to -1, if the file cannot be opened\n this.LineIndex = -1;\n this.FileLines = new LinkedList<>();\n this.Filename = mFilename;\n }",
"public CurveFile(QFile file) {\n\t\tthis.file = file;\n\t}",
"public Parser(String fileHandle) {\n\t\tmainFile = fileHandle;\n\t}",
"public HeapFile(File f, TupleDesc td) {\n // some code goes here\n \tm_f = f;\n \tm_td = td;\n }",
"protected EclipseFile(IFile file) {\n \t\tsuper(file);\n \t}"
] |
[
"0.7447958",
"0.7390277",
"0.7058465",
"0.7031052",
"0.6877609",
"0.68630004",
"0.6852197",
"0.68412006",
"0.6837662",
"0.68367773",
"0.6812295",
"0.67814255",
"0.67691463",
"0.67505366",
"0.67377794",
"0.6639462",
"0.6623912",
"0.65846586",
"0.65779203",
"0.65771884",
"0.65501666",
"0.6547891",
"0.65418494",
"0.6540705",
"0.65330297",
"0.65188646",
"0.65107644",
"0.648318",
"0.6477999",
"0.64773875",
"0.64710885",
"0.6462926",
"0.6458369",
"0.64492494",
"0.644433",
"0.6440279",
"0.6438253",
"0.6424111",
"0.6408793",
"0.63975257",
"0.63954353",
"0.6385356",
"0.6372246",
"0.63574725",
"0.6348486",
"0.6314696",
"0.6313555",
"0.631313",
"0.6309851",
"0.6293962",
"0.6259826",
"0.62571156",
"0.6253433",
"0.62494975",
"0.6241658",
"0.62343335",
"0.62340873",
"0.62302697",
"0.6225886",
"0.6220758",
"0.6204429",
"0.6199102",
"0.61937547",
"0.61853206",
"0.6184976",
"0.6178966",
"0.6169125",
"0.61606735",
"0.61533684",
"0.61226064",
"0.61224693",
"0.61208636",
"0.6095967",
"0.60958874",
"0.6090859",
"0.6074776",
"0.6062083",
"0.6057488",
"0.6055055",
"0.60466856",
"0.6036393",
"0.60353816",
"0.60337454",
"0.603288",
"0.6031683",
"0.6030706",
"0.6021527",
"0.6013267",
"0.6012123",
"0.6008801",
"0.6008479",
"0.600614",
"0.60020596",
"0.600005",
"0.59991586",
"0.59979963",
"0.59965247",
"0.5993012",
"0.5975837",
"0.5968753"
] |
0.78336537
|
0
|
Executes the BioMart query in xmlMessage that counts the number of records satisfying query. Returns this count of records. This is used for the progress download.
|
public int executeCountQuery(String xmlMessage) throws IOException
{
URL biomartServer = new URL(SZBIOMARTURL);
URLConnection conn = biomartServer.openConnection();
// use POST method
conn.setDoOutput(true);
OutputStreamWriter osw = new OutputStreamWriter(conn.getOutputStream());
osw.write("query=" + URLEncoder.encode(xmlMessage, "UTF-8"));
osw.flush();
// read the response into a file
BufferedReader brresponse = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String ln;
ln = brresponse.readLine();
brresponse.close();
osw.close();
int numlines;
try
{
numlines = Integer.parseInt(ln);
}
catch (NumberFormatException nfex)
{
throw new IllegalArgumentException("Count query did not return a number, instead returned "+ln);
}
if (numlines < 1)
{
throw new IllegalArgumentException("Count query returned "+numlines+" records. The number of "+
"records must be positive!");
}
return numlines;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public int query() {\n return totalcount;\n }",
"public int query() {\n return count;\n }",
"public long countRecords();",
"public int getTotalMessageCount(){\n Query query = new Query(\"Message\");\n Query query2 = new Query(\"Question\");\n PreparedQuery results = datastore.prepare(query);\n PreparedQuery results2 = datastore.prepare(query2);\n return results.countEntities(FetchOptions.Builder.withLimit(1000)) + results2.countEntities(FetchOptions.Builder.withLimit(1000));\n}",
"@Override\n\tpublic Integer getItemCount() {\n\t\t\n\t\tInteger countRows = 0;\n\t\t\n\t\t/*\n\t\t * Count of items will be retrieved from MainQuery.xml\n\t\t */\n\t\ttry {\n\t\t\tconnection = DBConnectionUtil.getDBConnection();\n\t\t\tpreparedStatement = connection.prepareStatement(QueryUtil.queryByID(CommonConstants.QUERY_ID_GET_ITEM_COUNT));\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\t\n\t\t\twhile(resultSet.next()){\n\t\t\t\tcountRows = resultSet.getInt(1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} catch (SQLException | SAXException | IOException | ParserConfigurationException | ClassNotFoundException e) {\n\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t} finally {\n\t\t\t/*\n\t\t\t * Close prepared statement and database connectivity at the end of transaction\n\t\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 (SQLException e) {\n\t\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t\t}\n\t\t}\n\t\treturn countRows;\n\t}",
"@Override\n\tpublic Integer getItemCount() {\n\t\t\n\t\tInteger countRows = 0;\n\t\t\n\t\t/*\n\t\t * Count of items will be retrieved from MainQuery.xml\n\t\t */\n\t\ttry {\n\t\t\tconnection = DBConnectionUtil.getDBConnection();\n\t\t\tpreparedStatement = connection.prepareStatement(QueryUtil.queryByID(CommonConstants.QUERY_ID_GET_ITEM_COUNT));\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\t\n\t\t\twhile(resultSet.next()){\n\t\t\t\tcountRows = resultSet.getInt(1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} catch (SQLException | SAXException | IOException | ParserConfigurationException | ClassNotFoundException e) {\n\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t} finally {\n\t\t\t/*\n\t\t\t * Close prepared statement and database connectivity at the end of transaction\n\t\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 (SQLException e) {\n\t\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t\t}\n\t\t}\n\t\treturn countRows;\n\t}",
"public static int countQueryAgent(Configuration conf, String countQuery) throws Exception {\n Connection conn = null;\n Statement stmt = null;\n ResultSet rs = null;\n try {\n conn = getConnection(conf);\n stmt = conn.createStatement();\n rs = stmt.executeQuery(countQuery);\n if (!rs.next()) {\n return 0;\n }\n return rs.getInt(1);\n } finally {\n closeResources(conn, stmt, rs);\n }\n }",
"@Transactional(propagation=Propagation.SUPPORTS,readOnly=true)\r\n\tpublic Integer queryCount() {\n\t\tInteger count = musicdao.selectCount();\r\n\t\treturn count;\r\n\t}",
"int getRecordCount();",
"int getQueryItemsCount();",
"Long recordCount();",
"public int getCount() {\n\t\treturn Dispatch.get(object, \"Count\").getInt();\n\t}",
"public Long count(DatasetItem dataset) {\n\n logTrace(\"Getting Number of Transactions in Dataset with query :: \" + COUNT_QUERY);\n\n Long numResults = (Long)getHibernateTemplate().find(\n COUNT_QUERY, dataset.getId()).get(0);\n return numResults;\n }",
"int getResultsCount();",
"int getResultsCount();",
"public long getCount()\n\t{\n\t\treturn count;\n\t}",
"public Long getCount() {\r\n return count;\r\n }",
"public Long getCount() {\n return count;\n }",
"public int count(LVValue query) throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry\n\t\t{\n\t\t\treturn myData.record.count(background.getClient(),query.getStringValue());\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int queryCount() {\n\t\treturn (int) tBasUnitClassRepository.count();\n\t}",
"@Override\n\tpublic int size() throws Exception {\n\t\tif(resultSetSize == null){\n\t\t\tlogger.info(\"Determining result size...\");\n\t\t\tString sql = \"SELECT COUNT(1) AS Count FROM dbo.Archive \"+whereClause;\n\t\t\tList<LinkedHashMap<String,Object>> records = server.runQuery(sql, bindData);\n\t\t\tresultSetSize = (Integer)records.get(0).get(\"Count\");\n\t\t\tlogger.info(\"Result size determined to be: \"+resultSetSize);\n\t\t}\n\t\treturn resultSetSize;\n\t}",
"public int countResults() \n {\n return itsResults_size;\n }",
"public int getMembreCount() {\n try {\n// CriteriaQuery cq = entManager.getCriteriaBuilder().createQuery();\n// Root<Membre> rt = cq.from(Membre.class);\n// cq.select(entManager.getCriteriaBuilder().count(rt));\n// Query q = entManager.createQuery(cq);\n// return ((Long) q.getSingleResult()).intValue();\n \n Query q = entManager.createNamedQuery(\"Membre.findAll\");\n return q.getResultList().size();\n \n } finally {\n// em.close();\n }\n }",
"public long getCount() {\n return count.get();\n }",
"public int resultCount(){\n\n int c = 0;\n\n try{\n if(res.last()){\n c = res.getRow();\n res.beforeFirst();\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return c;\n }",
"public Long getCount() {\n return this.Count;\n }",
"int findAllCount() ;",
"public int getRecordCount() {\n return recordCount;\n }",
"public static int getRecordNum(IQueryResult queryResult) {\r\n Map<String, List<IRecord>> allRecords = queryResult.getRecords();\r\n int n = 0;\r\n for (List<IRecord> values : allRecords.values()) {\r\n n += values.size();\r\n }\r\n return n;\r\n }",
"Long getAllCount();",
"public long getCount() {\r\n return count;\r\n }",
"public AsyncResult<Integer> requestNumberOfMessages() {\r\n ServiceDiscoveryManager serviceDiscoveryManager = xmppSession.getManager(ServiceDiscoveryManager.class);\r\n return serviceDiscoveryManager.discoverInformation(null, OfflineMessage.NAMESPACE).thenApply(infoDiscovery -> {\r\n if (!infoDiscovery.getExtensions().isEmpty()) {\r\n DataForm dataForm = infoDiscovery.getExtensions().get(0);\r\n if (dataForm != null) {\r\n for (DataForm.Field field : dataForm.getFields()) {\r\n if (\"number_of_messages\".equals(field.getVar())) {\r\n String numberOfMessages = field.getValues().get(0);\r\n return Integer.valueOf(numberOfMessages);\r\n }\r\n }\r\n }\r\n }\r\n return 0;\r\n });\r\n }",
"public int getCount() {\n\t\treturn OReportOne.size();\n\t}",
"public int getMessageListCount() {\n\t\t\tint rowcount = 0;\n\t\t\ttry {\n\t\t\t\tconn = ds.getConnection();\n\t\t\t\tpstmt = conn.prepareStatement(\"select count(*) from Message\");\n\t\t\t\trs = pstmt.executeQuery();\n\t\t\t\tif (rs.next()) {\n\t\t\t\t\trowcount = rs.getInt(1);\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\trs.close();\n\t\t\t\t} catch (SQLException s) {\n\t\t\t\t\ts.printStackTrace();\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tpstmt.close();\n\t\t\t\t} catch (SQLException s) {\n\t\t\t\t\ts.printStackTrace();\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException s) {\n\t\t\t\t\ts.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn rowcount;\n\t\t}",
"public long getCount() {\n return count;\n }",
"public long getCount() {\n return count;\n }",
"public int count() {\n\t\treturn sm.selectOne(\"com.lanzhou.entity.Longpay.count\");\n\t}",
"public int count() {\n\t Query count = getEntityManager().createQuery(\"select count(u) from \" + getEntityClass().getSimpleName() + \" u\");\n\t return Integer.parseInt(count.getSingleResult().toString());\n\t }",
"public Integer countRecordReturns();",
"public int count() {\n\t\treturn count;\n\t}",
"public int getCount() {\n return definition.getInteger(COUNT, 1);\n }",
"public int count() {\r\n return count;\r\n }",
"org.apache.xmlbeans.XmlInt xgetNumberOfResults();",
"@Override\n\tpublic int queryCountOfRows() {\n\t\treturn parentDao.queryCountOfRows();\n\t}",
"int getNumberOfResults();",
"public int count() {\n return count;\n }",
"@Override\r\n\tpublic int count(int bno) {\n\t\treturn replyDAO.count(bno);\r\n\t}",
"public long getCount() {\n return count_;\n }",
"@Override\r\n\tpublic int count(Integer bno) {\n\t\treturn replyMapper.count(bno); \r\n\t}",
"@Override\r\n\tpublic int totalCount() {\n\t\treturn sqlSession.selectOne(namespace + \".totalCount\");\r\n\t}",
"@Override\r\n\tpublic int totalCount() {\n\t\treturn sqlSession.selectOne(namespace + \".totalCount\");\r\n\t}",
"public int count() {\n return this.count;\n }",
"public synchronized int getCount()\n\t{\n\t\treturn count;\n\t}",
"public int getTotalMessageCount() {\n Query query = new Query(\"Message\");\n PreparedQuery results = datastore.prepare(query);\n return results.countEntities(FetchOptions.Builder.withLimit(1000));\n }",
"public Integer getCount() {\n\t\treturn count;\n\t}",
"public Integer getCount() {\n\t\treturn count;\n\t}",
"public long getCount() {\n return count_;\n }",
"long count(String query);",
"long count(String query);",
"public int get_count();",
"@Override\r\n\tprotected int count() {\n\t\treturn service.count();\r\n\t}",
"public Integer getCount() {\n return this.count;\n }",
"public int totalRowsCount();",
"int getQueriesCount();",
"public com.a9.spec.opensearch.x11.QueryType.Count xgetCount()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.a9.spec.opensearch.x11.QueryType.Count target = null;\n target = (com.a9.spec.opensearch.x11.QueryType.Count)get_store().find_attribute_user(COUNT$8);\n return target;\n }\n }",
"public Integer getCount() {\n return count;\n }",
"public Integer getCount() {\n return count;\n }",
"public Integer getCount() {\n return count;\n }",
"public Integer getCount() {\n return count;\n }",
"public Integer getCount() {\n return count;\n }",
"public Integer getCount() {\n return count;\n }",
"public long count() ;",
"public long count() {\n return this.count;\n }",
"@Override\n\tpublic int queryMsgCount(Object object, int minPrice, int maxPrice,\n\t\t\tint minDis, int maxDis, int minAge, int maxAge) {\n\t\treturn 0;\n\t}",
"public Long getCountAllResults() {\n\n //create a querybuilder for count\n QueryBuilder queryBuilderCount = dao.getQueryBuilder()\n .from(dao.getEntityClass(), (joinBuilder != null ? joinBuilder.getRootAlias() : null))\n .join(joinBuilder)\n .add(getCurrentQueryRestrictions())\n .debug(debug);\n\n Long rowCount;\n //added distinct verification\n if (joinBuilder != null && joinBuilder.isDistinct()) {\n rowCount = queryBuilderCount.countDistinct(joinBuilder.getRootAlias());\n } else {\n rowCount = queryBuilderCount.count();\n }\n\n return rowCount;\n }",
"public int getCount() {\n\t\t\treturn this.count;\n\t\t}",
"public synchronized int getCount() throws MessagingException {\n/* 244 */ parse();\n/* 245 */ return super.getCount();\n/* */ }",
"@Override\n public int countByQuery(Ares2ClusterQuery query) {\n return ares2ClusterExtMapper.countByQuery(query);\n }",
"public Integer getRecordCount() {\n return this.recordCount;\n }",
"public int getcount() {\n\t\tString countQuery = \"SELECT * FROM \" + DATABASE_TABLE1;\n\t \n\t Cursor cursor = ourDatabase.rawQuery(countQuery, null);\n\t int cnt = cursor.getCount();\n\t cursor.close();\n\t return cnt;\n\t\n\t}",
"int getTotalCount();",
"public int count() {\r\n Session session = getSession();\r\n Long count = new Long(0);\r\n try {\r\n count = (Long) session.createQuery(\"select count(t) from \" + getPersistentClass().getName() + \" t \").uniqueResult();\r\n } catch (HibernateException e) {\r\n LOG.error(MODULE + \"Exception in count Method:\" + e, e);\r\n } finally {\r\n// if (session.isOpen()) {\r\n// session.close();\r\n// }\r\n }\r\n return count.intValue();\r\n }",
"int getTransactionsCount();",
"public Integer getCount() {\n return count;\n }",
"public long getCount() {\n return counter.get();\n }",
"public synchronized int messageCount() {\n \tfinal Query q = mDB.query();\n q.constrain(MessageReference.class);\n q.descend(\"mBoard\").constrain(this).identity();\n return q.execute().size();\n }",
"public int getAllCount(){\r\n\t\tString sql=\"select count(*) from board_notice\";\r\n\t\tint result=0;\r\n\t\tConnection conn=null;\r\n\t\tStatement stmt=null;\r\n\t\tResultSet rs=null;\r\n\t\ttry{\r\n\t\t\tconn=DBManager.getConnection();\r\n\t\t\tstmt=conn.createStatement();\r\n\t\t\trs=stmt.executeQuery(sql);\r\n\t\t\trs.next();\r\n\t\t\tresult=rs.getInt(1);\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tDBManager.close(conn, stmt, rs);\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public String getCount() {\r\n\t\treturn this.count;\r\n\t}",
"public int resultsProcessed() {\n return resultCount;\n }",
"public int bookCount() {\r\n\t\tint rowCount = jdbcTemplate.queryForInt(\"select count(1) from persone\");\r\n\t\treturn rowCount;\r\n\t}",
"public int count() {\n return Query.count(iterable);\n }",
"@Override\r\n\tpublic int getCount(PageBean bean) {\n\t\treturn session.selectOne(\"enter.getCount\", bean);\r\n\t}",
"public abstract long count();",
"public static int getCount() {\r\n\t\treturn count;\r\n\t}",
"public static int getCount() {\r\n\t\treturn count;\r\n\t}",
"public static int getCount() {\r\n\t\treturn count;\r\n\t}",
"int getResponseCount();",
"@Override\n public int countByQuery(BorrowQuery query){\n return borrowExtMapper.countByQuery(query);\n }",
"public int getTotalCount() {\n return totalCount;\n }",
"public int getTotalRecords() {\r\n return totalRecords;\r\n }"
] |
[
"0.7237387",
"0.71075577",
"0.6840442",
"0.67879915",
"0.677189",
"0.677189",
"0.669332",
"0.66518146",
"0.65849835",
"0.6516508",
"0.65022373",
"0.65009075",
"0.6470696",
"0.6448994",
"0.6448994",
"0.6442599",
"0.6435526",
"0.6431022",
"0.641986",
"0.6406557",
"0.63932544",
"0.6366986",
"0.63591707",
"0.6349753",
"0.6344688",
"0.63442415",
"0.6343677",
"0.63347226",
"0.63283914",
"0.63235307",
"0.6322629",
"0.6322412",
"0.63200694",
"0.6318598",
"0.63050276",
"0.63050276",
"0.6292851",
"0.62849087",
"0.6277656",
"0.62735754",
"0.6273021",
"0.6265718",
"0.6265698",
"0.62556857",
"0.6254372",
"0.6252429",
"0.6250215",
"0.6238636",
"0.6227603",
"0.62224543",
"0.62224543",
"0.62010425",
"0.6200384",
"0.6196004",
"0.6191228",
"0.6191228",
"0.6180327",
"0.61801165",
"0.61801165",
"0.6172458",
"0.6167542",
"0.61420906",
"0.61296767",
"0.6127533",
"0.6117724",
"0.6116443",
"0.6116443",
"0.6116443",
"0.6116443",
"0.6116443",
"0.6116443",
"0.611473",
"0.6113859",
"0.6112219",
"0.61086154",
"0.6108133",
"0.61005485",
"0.609667",
"0.609017",
"0.60815054",
"0.60766524",
"0.60706574",
"0.6069032",
"0.6066461",
"0.606346",
"0.6060607",
"0.6060408",
"0.6055322",
"0.60486513",
"0.60323745",
"0.60190797",
"0.60031843",
"0.600121",
"0.5997035",
"0.5997035",
"0.5997035",
"0.5993995",
"0.5993037",
"0.59905255",
"0.5985316"
] |
0.7552596
|
0
|
ExecuteQuery. xmlMessage is the string containing the BioMart query to execute. bos is the the output stream where the results of xmlMessage is written Updates npercentdone[nstatusfield] after obtaining lock on lockpd
|
public void executeQuery(BufferedOutputStream bos, String xmlMessage,
int[] npercentdone,int nstatusfield, Object lockpd) throws IOException
{
URL biomartServer = new URL(SZBIOMARTURL);
URLConnection conn = biomartServer.openConnection();
// use POST method
conn.setDoOutput(true);
OutputStreamWriter osw = new OutputStreamWriter(conn.getOutputStream());
osw.write("query=" + URLEncoder.encode(xmlMessage, "UTF-8"));
osw.flush();
// read the response into a file
BufferedReader brresponse = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String ln;
int nlastpercentdone = 0;
int nleft = nsingleset;
String szeol = System.getProperty("line.separator");
while ((ln = brresponse.readLine()) != null)
{
String lnend = ln+szeol;
if (lnend.startsWith("Query ERROR"))
{
//not going to bail just because cannot get locations
System.out.println("Gene Location Download Error: "+lnend);
}
byte[] lnb = lnend.getBytes();
bos.write(lnb,0,lnb.length);
if (nleft > 0)
{
//the actual number of lines can be greater than the number of records
//we will not count these extra lines
nleft--;
nline++;
}
synchronized (lockpd)
{
int nval = (int) (100*nline/(double) numrecs);
if (nval <= 99)
{
//we don't want to display 100, because we are not really done
npercentdone[nstatusfield] =nval;
if ((nlastpercentdone != npercentdone[nstatusfield]))
{
//only notify interface if percentage has changed
nlastpercentdone = npercentdone[nstatusfield];
lockpd.notifyAll();
}
}
}
}
brresponse.close();
osw.close();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void executeQuery() {\n }",
"public int executeCountQuery(String xmlMessage) throws IOException \n {\n URL biomartServer = new URL(SZBIOMARTURL);\n URLConnection conn = biomartServer.openConnection();\n\t\n // use POST method\n conn.setDoOutput(true);\n OutputStreamWriter osw = new OutputStreamWriter(conn.getOutputStream());\n osw.write(\"query=\" + URLEncoder.encode(xmlMessage, \"UTF-8\"));\n osw.flush(); \n \n // read the response into a file\n BufferedReader brresponse = new BufferedReader(new InputStreamReader(conn.getInputStream()));\t\n String ln;\n\n ln = brresponse.readLine();\n brresponse.close();\n osw.close();\n int numlines;\n\n try\n {\n numlines = Integer.parseInt(ln);\n }\n catch (NumberFormatException nfex)\n {\n\t throw new IllegalArgumentException(\"Count query did not return a number, instead returned \"+ln);\n }\n\n if (numlines < 1)\n {\n throw new IllegalArgumentException(\"Count query returned \"+numlines+\" records. The number of \"+\n \"records must be positive!\");\n }\n\n return numlines;\n }",
"public void executeSQlQuery(String query, String message) {\n Connection con = getConnection();\n Statement st;\n try {\n st = con.createStatement();\n if ((st.executeUpdate(query)) == 1) {\n // refresh jtable data\n DefaultTableModel model = (DefaultTableModel) jTable1.getModel();\n model.setRowCount(0);\n GetData();\n\n JOptionPane.showMessageDialog(null, message);\n } else {\n JOptionPane.showMessageDialog(null, \"Wystapił błąd\");\n }\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Zostały wprowadzone niepoprawne dane\");\n\n }\n }",
"@Override\n\t\tpublic void executeQuery(String query) {\n\t\t\t\n\t\t}",
"protected final void executeQuery() {\n\ttry {\n\t executeQuery(queryBox.getText());\n\t} catch(SQLException e) {\n\t e.printStackTrace();\n\t clearTable();\n\t JOptionPane.showMessageDialog(\n\t\tnull, e.getMessage(),\n\t\t\"Database Error\",\n\t\tJOptionPane.ERROR_MESSAGE);\n\t}\n }",
"private int sendUpdate(String sqlQuery) {\n int result = 0;\n getRemoteConnection();\n try {\n statement = conn.createStatement();{\n // Execute a SELECT SQL statement.\n result = statement.executeUpdate(sqlQuery);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return result;\n }",
"@Override\n\tvoid executeQuery(String query) {\n\t\tSystem.out.println(\"Mssql ==> \" + query);\n\t}",
"@Override \n\t\t public void run() {\n\t\t \t\n\t\t \tif (isCompleteQuery) {\n\t\t \t\tisCompleteQuery = !isCompleteQuery;\n\t\t \t\t\n\t\t \t\tMessage message = new Message(); \n\t\t\t message.what = 911; \n\t\t\t handler.sendMessage(message); \n\t\t\t LogUtils.i(\"*****************定时任务查询\");\n\t\t\t\t}\n\t\t \n\t\t }",
"public void executeSQlQuery(String query, String message)\n {\n Connection con = DB.getConnection();\n Statement st;\n try{\n st = con.createStatement();\n if((st.executeUpdate(query)) == 1)\n {\n DefaultTableModel model = (DefaultTableModel)jTable1.getModel();\n model.setRowCount(0);\n showTable();\n \n JOptionPane.showMessageDialog(null, \"Data \"+message+\" Succefully\");\n }else{\n JOptionPane.showMessageDialog(null, \"Data Not \"+message);\n }\n }catch(SQLException | HeadlessException ex){\n }\n }",
"@Test\n public void testQuery() {\n DataSetArgument lArgs = new DataSetArgument();\n lArgs.add( \"aMsgId\", \"100\" );\n\n QuerySet lQs = QuerySetFactory.getInstance()\n .executeQuery( \"com.mxi.mx.integration.query.process.LookupQueueId\", lArgs );\n\n Assert.assertEquals( \"Row Count\", 1, lQs.getRowCount() );\n\n lQs.next();\n\n Assert.assertEquals( \"Queue Id\", 1000, lQs.getInt( \"queue_id\" ) );\n }",
"public void startdirectOrderStateQuery(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQuery directOrderStateQuery0,\n\n final net.wit.webservice.TerminalServiceXmlServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/directOrderStateQueryRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n directOrderStateQuery0,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directOrderStateQuery\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directOrderStateQuery\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQueryResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultdirectOrderStateQuery(\n (net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQueryResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrordirectOrderStateQuery(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directOrderStateQuery\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directOrderStateQuery\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directOrderStateQuery\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrordirectOrderStateQuery(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectOrderStateQuery(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectOrderStateQuery(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectOrderStateQuery(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectOrderStateQuery(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectOrderStateQuery(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectOrderStateQuery(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectOrderStateQuery(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrordirectOrderStateQuery(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrordirectOrderStateQuery(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrordirectOrderStateQuery(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrordirectOrderStateQuery(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[0].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[0].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }",
"public void executeSQlQuery(String query,String message){\n \n Connection con= getConnection();\n Statement st;\n \n try{\n st= con.createStatement();\n if((st.executeUpdate(query))==1){\n \n //refresh Jtable data\n\n DefaultTableModel model2=(DefaultTableModel) notoverlappingsessions.getModel();\n model2.setRowCount(0);\n show_NotOverlappingSessions();\n\n JOptionPane.showMessageDialog(null, message+ \" Successfully\");\n }else{\n JOptionPane.showMessageDialog(null, message+\"can Not be done \");\n }\n }catch(Exception e){}\n \n }",
"public void execute() throws AeBusinessProcessException;",
"@Override\r\n\tprotected void onBoQuery() throws Exception {\n\t\tUIDialog querydialog = getQueryUI();\r\n\t\tif (querydialog.showModal() != UIDialog.ID_OK) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// 得到查询条件\r\n\t\tString strWhere = ((HYQueryConditionDLG) querydialog).getWhereSql();\r\n\t\t// 得到所有的查询标签\r\n\t\tConditionVO[] ttc = ((HYQueryConditionDLG) querydialog)\r\n\t\t\t\t.getQryCondEditor().getGeneralCondtionVOs();\r\n\t\t// ConditionVO[] vos =\r\n\t\t// ((HYQueryConditionDLG)querydialog).getQryCondEditor().getGeneralCondtionVOs();\r\n\t\tString sendsignState = \"\";\r\n\t\tfor (ConditionVO vo : ttc) {\r\n\t\t\tif (\"tb_pointposition.pp_archive\".equals(vo.getFieldCode())) {\r\n\t\t\t\tsendsignState = vo.getValue();\r\n\t\t\t\tif (\"Y\".equals(sendsignState)) {\r\n\t\t\t\t\tstrWhere = StringUtil.replaceIgnoreCase(strWhere,\r\n\t\t\t\t\t\t\t\"tb_pointposition.pp_archive = 'Y'\",\r\n\t\t\t\t\t\t\t\"tb_pointposition.pp_archive=1 and dr=0 \");\r\n\t\t\t\t\tgetButtonManager().getButton(IBillButton.Edit).setEnabled(\r\n\t\t\t\t\t\t\ttrue);\r\n\t\t\t\t\tgetButtonManager().getButton(IBillButton.Add).setEnabled(\r\n\t\t\t\t\t\t\tfalse);\r\n\t\t\t\t\tgetButtonManager().getButton(IBillButton.Delete)\r\n\t\t\t\t\t\t\t.setEnabled(true);\r\n\r\n\t\t\t\t\tgetButtonManager().getButton(IBillButton.Refresh)\r\n\t\t\t\t\t\t\t.setEnabled(true);\r\n\r\n\t\t\t\t\tgetButtonManager().getButton(IBillButton.Print).setEnabled(\r\n\t\t\t\t\t\t\ttrue);\r\n\t\t\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Con)\r\n\t\t\t\t\t\t\t.setEnabled(false);\r\n\t\t\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Pp)\r\n\t\t\t\t\t\t\t.setEnabled(true);\r\n\t\t\t\t\tgetBillUI().updateButtons();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstrWhere = StringUtil.replaceIgnoreCase(strWhere,\r\n\t\t\t\t\t\t\t\"tb_pointposition.pp_archive = 'N'\",\r\n\t\t\t\t\t\t\t\" (tb_pointposition.pp_archive=0 or tb_pointposition.pp_archive is null) and dr=0 \");\r\n\t\t\t\t\tgetButtonManager().getButton(IBillButton.Edit).setEnabled(\r\n\t\t\t\t\t\t\ttrue);\r\n\t\t\t\t\tgetButtonManager().getButton(IBillButton.Delete)\r\n\t\t\t\t\t\t\t.setEnabled(true);\r\n\r\n\t\t\t\t\tgetButtonManager().getButton(IBillButton.Refresh)\r\n\t\t\t\t\t\t\t.setEnabled(true);\r\n\r\n\t\t\t\t\tgetButtonManager().getButton(IBillButton.Print).setEnabled(\r\n\t\t\t\t\t\t\ttrue);\r\n\t\t\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Con)\r\n\t\t\t\t\t\t\t.setEnabled(true);\r\n\t\t\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Pp)\r\n\t\t\t\t\t\t\t.setEnabled(false);\r\n\t\t\t\t\tgetBillUI().updateButtons();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tSuperVO[] queryVos = queryHeadVOs(strWhere.toString());\r\n\r\n\t\tgetBufferData().clear();\r\n\t\t// 增加数据到Buffer\r\n\t\taddDataToBuffer(queryVos);\r\n\r\n\t\tupdateBuffer();\r\n\t\t// 修改按钮属性\r\n\t\tif (\"Y\".equals(sendsignState)) {\r\n\t\t\tgetButtonManager().getButton(IBillButton.Add).setEnabled(false);\r\n\t\t\t\r\n\t\t\tmyaddbuttun=false;\r\n\t\t} else {\r\n\t\t\tgetButtonManager().getButton(IBillButton.Add).setEnabled(true);\r\n\t\t\t\r\n\t\t\tmyaddbuttun=true;\r\n\t\t}\r\n\t\t// 转到卡片面,实现按钮的属性转换\r\n\t\tgetBillUI().setCardUIState();\r\n\t\t// 在转回列表显示界面,显示数据\r\n\t\tsuper.onBoReturn();\r\n\t\t\r\n\t}",
"public void startdirectQuery(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectQuery directQuery6,\n\n final net.wit.webservice.TerminalServiceXmlServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[3].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/directQueryRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n directQuery6,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directQuery\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directQuery\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectQueryResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultdirectQuery(\n (net.wit.webservice.TerminalServiceXmlServiceStub.DirectQueryResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrordirectQuery(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directQuery\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directQuery\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directQuery\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrordirectQuery(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectQuery(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectQuery(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectQuery(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectQuery(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectQuery(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectQuery(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectQuery(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrordirectQuery(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrordirectQuery(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrordirectQuery(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrordirectQuery(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[3].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[3].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }",
"@Override\n public void executeQuery() {\n try {\n Put put = new Put(this.userId.getBytes());\n put.add(\"cf\".getBytes(), Bytes.toBytes(this.poi.getTimestamp()), this.poi.getBytes());\n this.table.put(put);\n \n } catch (IOException ex) {\n Logger.getLogger(InsertPOIVisitClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public abstract int execUpdate(String query) ;",
"public String execute(SOAPMessage message) throws FIFException;",
"CommandResult execute();",
"@Override\n @SuppressWarnings({\"lgtm [java/database-resource-leak]\"})\n public void doService(AdaptrisMessage msg) throws ServiceException {\n log.trace(\"Beginning doService\");\n JdbcResult result = null;\n Connection conn = null;\n try {\n Connection c = getConnection(msg);\n if (!c.equals(actor.getSqlConnection())) {\n actor.reInitialise(c);\n }\n conn = actor.getSqlConnection();\n initXmlHelper(msg);\n String statement = getStatementCreator().createStatement(msg);\n PreparedStatement preparedStatement = actor.getQueryStatement(statement); \n preparedStatement.clearParameters();\n log.trace(\"Executing statement [{}]\", statement);\n \n this.getParameterApplicator().applyStatementParameters(msg, preparedStatement, getStatementParameters(), statement);\n try {\n // closed by the finally block which closes the JdbcResult\n ResultSet rs = preparedStatement.executeQuery();\n result = new JdbcResultBuilder().setHasResultSet(true).setResultSet(rs).build();\n } catch (SQLException e) {\n if (ignoreExecuteQueryErrors()) {\n log.debug(\"Ignore ExecuteQuery Errors enabled); using empty ResultSet\");\n result = new JdbcResultBuilder().setHasResultSet(false).build();\n } else {\n throw e;\n }\n }\n resultSetTranslator.translate(result, msg);\n destroyXmlHelper(msg);\n JdbcUtil.commit(conn, msg);\n }\n catch (Exception e) {\n JdbcUtil.rollback(conn, msg);\n throw ExceptionHelper.wrapServiceException(e);\n }\n finally {\n JdbcUtil.closeQuietly(result);\n JdbcUtil.closeQuietly(conn);\n }\n }",
"void queryDone(String queryId);",
"public void executeQuery_Other(String query) {\n\n \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 }",
"private void executeTransaction(ArrayList<Request> transaction) {\n // create a new TransactionMessage\n TransactionMessage tm = new TransactionMessage(transaction);\n //if(tm.getStatementCode(0)!=8&&tm.getStatementCode(0)!=14)\n // return;\n try {\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bos);\n oos.writeObject(tm);\n oos.flush();\n\n byte[] data = bos.toByteArray();\n\n byte[] buffer = null;\n long startTime = System.currentTimeMillis();\n buffer = clientShim.execute(data);\n long endTime = System.currentTimeMillis();\n if (reqIndex < maxNoOfRequests && id > 0) {\n System.out.println(\"#req\" + reqIndex + \" \" + startTime + \" \" + endTime + \" \" + id);\n }\n reqIndex++;\n\n father.addTransaction();\n\n // IN THE MEAN TIME THE INTERACTION IS BEING EXECUTED\n\n\t\t\t\t/*\n\t\t\t\t * possible values of r: 0: commit 1: rollback 2: error\n\t\t\t\t */\n int r = ByteBuffer.wrap(buffer).getInt();\n //System.out.println(\"r = \"+r);\n if (r == 0) {\n father.addCommit();\n } else if (r == 1) {\n father.addRollback();\n } else {\n father.addError();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"Object executeQuery(String sparqlQuery);",
"public HttpStatus executeUpdate(String updateQuery) throws RmesException {\n\t\tHttpStatus status = repositoryUtils.executeUpdate(updateQuery, repositoryUtils.initRepository(config.getRdfServerPublicationInterne(), config.getRepositoryIdPublicationInterne()));\n\t\tif (status.is2xxSuccessful() ) {\n\t\t\tstatus = repositoryUtils.executeUpdate(updateQuery, repositoryUtils.initRepository(config.getRdfServerPublication(), config.getRepositoryIdPublication()));\n\t\t}\n\t\treturn status;\n\t}",
"public String Execute( String command ){\r\n\t\tString Return = \"\";\r\n\t\tString TypeOfReturn = \"Return>\";\r\n\t\ttry{\r\n\t\t\t//Connect();\r\n\t\t\tStatement dbStatement = conn.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE,\r\n\t\t\t\tResultSet.CONCUR_READ_ONLY );\r\n\t\t\t//DatabaseMetaData m = conn.getMetaData();\r\n\t\t\t//m.getColumns();\r\n\r\n\t\t\tResultSet dbResults = dbStatement.executeQuery( command );\r\n\r\n\t\t\twhile( dbResults.next()){\r\n\t\t\t\tReturn += dbResults.getString( 1 );\t \r\n\t\t\t\t// very simple results processing...\r\n\t\t\t}\r\n\t\t}catch( Exception x ){\r\n\t\t\tReturn = x.toString();\r\n\t\t\tError = x.toString();\r\n\t\t\tTypeOfReturn = \"Error>\";\r\n\t\t}\r\n\t\treturn \"<\" + TypeOfReturn + Return + \"</\" + TypeOfReturn + \"\\0\";\r\n\t\t\t// '\\0' required by Flash\r\n\t}",
"public abstract ResultList executeQuery(DatabaseQuery query);",
"@ActionTrigger(action=\"QUERY\")\n\t\tpublic void spriden_Query()\n\t\t{\n\t\t\t\n\t\t\t\tnextBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tnextBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tclearBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tnextBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tclearBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tnextBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tclearBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tpreviousBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tpreviousBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tpreviousBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tpreviousBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tenterQuery();\n//\t\t\t\tif ( SupportClasses.SQLFORMS.FormSuccess().not() )\n//\t\t\t\t{\n//\t\t\t\t\t\n//\t\t\t\t\tthrow new ApplicationException();\n//\t\t\t\t}\n\t\t\t}",
"public net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQueryResponse directOrderStateQuery(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQuery directOrderStateQuery0)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/directOrderStateQueryRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n directOrderStateQuery0,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directOrderStateQuery\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directOrderStateQuery\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQueryResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQueryResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directOrderStateQuery\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directOrderStateQuery\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directOrderStateQuery\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }",
"public net.wit.webservice.TerminalServiceXmlServiceStub.DirectQueryResponse directQuery(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectQuery directQuery6)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[3].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/directQueryRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n directQuery6,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directQuery\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directQuery\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectQueryResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.DirectQueryResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directQuery\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directQuery\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directQuery\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }",
"private void sendQuery(String sqlQuery) {\n getRemoteConnection();\n try {\n statement = conn.createStatement();{\n // Execute a SELECT SQL statement.\n resultSet = statement.executeQuery(sqlQuery);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"public void executeUpdate(String query) {\n \ttry {\n\t\t\tst.executeUpdate(query);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n }",
"@Override\n public QueryResult<T> execute(InternalConnection connection) {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(String.format(\"Sending query of namespace %s on connection [%s] to server %s\", this.namespace, connection.getDescription().getConnectionId(), connection.getDescription().getServerAddress()));\n }\n long startTimeNanos = System.nanoTime();\n QueryMessage message = null;\n boolean isExplain = false;\n ByteBufferBsonOutput bsonOutput = new ByteBufferBsonOutput(connection);\n try {\n message = this.createQueryMessage(connection.getDescription());\n message.encode(bsonOutput, NoOpSessionContext.INSTANCE);\n isExplain = this.sendQueryStartedEvent(connection, message, bsonOutput, message.getEncodingMetadata());\n connection.sendMessage(bsonOutput.getByteBuffers(), message.getId());\n }\n finally {\n bsonOutput.close();\n }\n ResponseBuffers responseBuffers = connection.receiveMessage(message.getId());\n try {\n if (responseBuffers.getReplyHeader().isQueryFailure()) {\n BsonDocument errorDocument = new ReplyMessage<BsonDocument>(responseBuffers, new BsonDocumentCodec(), message.getId()).getDocuments().get(0);\n throw ProtocolHelper.getQueryFailureException(errorDocument, connection.getDescription().getServerAddress());\n }\n ReplyMessage<T> replyMessage = new ReplyMessage<T>(responseBuffers, this.resultDecoder, message.getId());\n QueryResult<T> result = new QueryResult<T>(this.namespace, replyMessage.getDocuments(), replyMessage.getReplyHeader().getCursorId(), connection.getDescription().getServerAddress());\n this.sendQuerySucceededEvent(connection.getDescription(), startTimeNanos, message, isExplain, responseBuffers, result);\n LOGGER.debug(\"Query completed\");\n QueryResult<T> queryResult = result;\n responseBuffers.close();\n return queryResult;\n }\n catch (Throwable throwable) {\n try {\n responseBuffers.close();\n throw throwable;\n }\n catch (RuntimeException e) {\n if (this.commandListener != null) {\n ProtocolHelper.sendCommandFailedEvent(message, FIND_COMMAND_NAME, connection.getDescription(), System.nanoTime() - startTimeNanos, e, this.commandListener);\n }\n throw e;\n }\n }\n }",
"public String execute() throws Exception {\n\t\n\t\tString parameter1 = getServletRequest().getParameter(PARAMETER_1);\n\t\tString parameter2 = getServletRequest().getParameter(PARAMETER_2);\n\n\t\tmessageStore = new MessageStore();\n\t\t\n\t\tHibernateDatabaseCommentManager manager = new HibernateDatabaseCommentManager();\n\t\tif (parameter1.equals(\"up\")) {\n\t\t\tint k = manager.upVote(parameter2);\n\t\t\tif (k != 999999999) {\n\t\t\t\tmessageStore.appendToMessage(XML_1);\n\t\t\t\tmessageStore.appendToMessage(XML_2);\n\t\t\t\tmessageStore.appendToMessage(\"\" + k);\n\t\t\t\tmessageStore.appendToMessage(XML_3);\n\t\t\t\tmessageStore.appendToMessage(XML_4);\n\t\t\t\treturn \"success\";\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn \"fail\";\n\t\t}\n\t\tif (parameter1.equals(\"down\")) {\n\t\t\tint k = manager.downVote(parameter2);\n\t\t\tif (k != 999999999) {\n\t\t\t\tmessageStore.appendToMessage(XML_1);\n\t\t\t\tmessageStore.appendToMessage(XML_2);\n\t\t\t\tmessageStore.appendToMessage(\"\" + k);\n\t\t\t\tmessageStore.appendToMessage(XML_3);\n\t\t\t\tmessageStore.appendToMessage(XML_4);\n\t\t\t\treturn \"success\";\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn \"fail\";\n\t\t}\n\t\tif (parameter1.equals(\"doubleup\")) {\n\t\t\tint k = manager.doubleUp(parameter2);\n\t\t\tif (k != 999999999) {\n\t\t\t\tmessageStore.appendToMessage(XML_1);\n\t\t\t\tmessageStore.appendToMessage(XML_2);\n\t\t\t\tmessageStore.appendToMessage(\"\" + k);\n\t\t\t\tmessageStore.appendToMessage(XML_3);\n\t\t\t\tmessageStore.appendToMessage(XML_4);\n\t\t\t\treturn \"success\";\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn \"fail\";\n\t\t}\n\t\tif (parameter1.equals(\"doubledown\")) {\n\t\t\tint k = manager.doubleDown(parameter2);\n\t\t\tif (k != 999999999) {\n\t\t\t\tmessageStore.appendToMessage(XML_1);\n\t\t\t\tmessageStore.appendToMessage(XML_2);\n\t\t\t\tmessageStore.appendToMessage(\"\" + k);\n\t\t\t\tmessageStore.appendToMessage(XML_3);\n\t\t\t\tmessageStore.appendToMessage(XML_4);\n\t\t\t\treturn \"success\";\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn \"fail\";\n\t\t}\n\t\telse\n\t\t\treturn \"fail\";\n\t}",
"public void receiveResultquery(\n com.exacttarget.wsdl.partnerapi.QueryResponseMsgDocument result\n ) {\n }",
"public boolean processEMSInService(String p_msg_str, String msgQ) {\n String emsQueueCf = \n FCApplicationGlobals.getProps().getProperty(IFCConstants.EMS_INT_QCF);\n String emsQueue = msgQ;\n // getVal(IFCConstants.EMS_INT_QUEUE);\n flushResources();\n boolean l_retVal = false;\n PreparedStatement updPstmt = null;\n\n g_transacted = \n true; //settting g_transacted to true helps all JMS transaction to be explicitly committed once\n\n TextMessage l_txt_msg = null;\n Queue l_Qu = null;\n int res = 0;\n\n InitialContext initialContext = null;\n\n\n try {\n initialContext = new InitialContext();\n if (qConnectionFactory == null) {\n qConnectionFactory = \n (QueueConnectionFactory)initialContext.lookup(emsQueueCf);\n }\n l_Qu = (Queue)initialContext.lookup(emsQueue);\n\n if (g_Qcon == null) {\n g_Qcon = qConnectionFactory.createQueueConnection();\n }\n\n g_Qcon.start();\n\n if (g_Qses == null) {\n g_Qses = \n g_Qcon.createQueueSession(g_transacted, Session.AUTO_ACKNOWLEDGE);\n }\n\n\n //Create Sender using seesion\n if (g_Qsend == null) {\n g_Qsend = g_Qses.createSender(l_Qu);\n }\n\n\n l_txt_msg = g_Qses.createTextMessage();\n l_txt_msg.setText(p_msg_str);\n\n g_Qsend.send(l_txt_msg);\n l_retVal = true;\n } catch (Exception ex) {\n dbg(\"processEMSInService-->Exception = \" + ex.getMessage());\n\n ex.printStackTrace();\n l_retVal = false;\n }\n return l_retVal;\n }",
"@Override\n public void execute() throws Exception {\n try{\n Logger.getLogger(IdentityReconciliationProcessor.class.getName()).log(Level.INFO, \n \"Starting OIM Identity Migration from LDAP to DB [RECON].\");\n validateInputParams();\n OIMClient client = getOIMClient();\n //Invoking scheduler service\n SchedulerService schService = client.getService(SchedulerService.class);\n JobDetails jobDetails = schService.getJobDetail(jobName);\n jobDetails.setRetrycount(5);\n HashMap<String, JobParameter> attributes = new HashMap<String, JobParameter>();\n // Add mandatory attributes\n addMandatoryAttributes(attributes);\n // Parse input parameter to add Job parameters/attribute.\n getJobDetailAttributes(attributes);\n jobDetails.setAttributes(attributes);\n schService.updateJob(jobDetails);\n Logger.getLogger(IdentityReconciliationProcessor.class.getName()).log(Level.INFO, \"Stating Reconciliation Job : \" + jobName);\n schService.triggerNow(jobName);\n // Invoke Time to poll status of Job. Exit on success.\n ReconciliationUtil reconUtil = new ReconciliationUtil();\n reconUtil.pollJobStatus(schService,jobName);\n }catch (Exception exception){\n throw exception;\n }\n }",
"protected void runQueryWithNoReturnValue(String query, Connection myConn, String successMessage) {\n try {\n Statement newCommand = myConn.createStatement();\n newCommand.executeUpdate(query);\n newCommand.close();\n displaySuccessMessage(successMessage);\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"public void execute() throws NbaBaseException {\n\t\tboolean isSuccess = false;\t\t\n\t\tif (performingRequirementsEvaluation()) { //SPR2652\n\t\t\tsetPartyID(work); //ACN024\n\t\t\tisSuccess = processRequirementSummary();\n\t\t\tif (!isSuccess) {\t\t\t\t\n\t\t\t\tthrow new NbaVpmsException(NbaVpmsException.VPMS_RESULTS_ERROR + NbaVpmsAdaptor.ACREQUIREMENTSUMMARY);\t//SPR2652\n\t\t\t}\n\t\t}\n\t}",
"public CreditCheckBO execute() throws WOMExternalSystemException {\n\t\texecuteSapFunction();\n\t\treturn new CreditCheckBO(this.creditBlock, this.orderBlock);\n\t}",
"public ORM executeQuery(String query) {\n ResultSet rs = null;\n this.query =query;\n System.out.println(\"run: \" + this.query);\n //this.curId = 0;\n Statement statement;\n try {\n statement = this.conn.createStatement();\n rs = statement.executeQuery(this.query);\n //this.saveLog(0,\"\",query);\n } catch (SQLException e) {\n System.out.println( ColorCodes.ANSI_RED +\"ERROR in SQL: \" + this.query);\n // e.printStackTrace();\n }\n lastResultSet=rs;\n this.fields_values = \"\";\n return this;\n\n }",
"public void queryOrder(){\n\t\ttry{\n\t\t\tlock.lock();\n\t\t\tSystem.out.println(Thread.currentThread().getName()+\"查询到数据:\"+System.currentTimeMillis());\n\t\t\tThread.sleep(2000);\n\t\t}catch( Exception e){\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\tlock.unlock();\n\t\t}\n\t}",
"public void executeQuery(String q) throws HiveQueryExecutionException;",
"public void execute (String query) throws java.sql.SQLException {\n try {\n /*\n if (query.indexOf('(') != -1)\n Logger.write(\"VERBOSE\", \"DB\", \"execute(\\\"\" + query.substring(0,query.indexOf('(')) + \"...\\\")\");\n else\n Logger.write(\"VERBOSE\", \"DB\", \"execute(\\\"\" + query.substring(0,20) + \"...\\\")\");\n */\n Logger.write(\"VERBOSE\", \"DB\", \"execute(\\\"\" + query + \"\\\")\");\n \n Statement statement = dbConnection.createStatement();\n statement.setQueryTimeout(30);\n dbConnection.setAutoCommit(false);\n statement.executeUpdate(query);\n dbConnection.commit();\n dbConnection.setAutoCommit(true);\n } catch (java.sql.SQLException e) {\n Logger.write(\"ERROR\", \"DB\", \"SQLException: \" + e);\n throw e;\n }\n }",
"public void executeQuery(String query,String message){\n Connection conn = MysqlConnect.ConnectDB();\n Statement st;\n \n try{\n st=conn.createStatement();\n if((st.executeUpdate(query))== 1)\n {\n \n //refresh the jtable\n DefaultTableModel model = ( DefaultTableModel)jTablefaculty.getModel();\n model.setRowCount(0);\n Show_Facultyc_In_JTable();\n \n JOptionPane.showMessageDialog(null,\"data\"+ message +\"Successfully\");\n }else\n JOptionPane.showMessageDialog(null,\"data not\"+ message);\n \n \n }catch(Exception e){\n JOptionPane.showMessageDialog(null,e);\n }\n \n \n }",
"public void performQuack(){\n qb.quack();\n }",
"<Q, R> CompletableFuture<QueryResponseMessage<R>> query( QueryMessage<Q, R> query );",
"public void execute() { // FIXME extract to utility class\n\t\ttry {\n\t\t\tif (errorMsg != null && errorMsg.trim().length() > 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (connection == null || connection.isClosed()) {\n\t\t\t\terrorMsg = Messages.error_getConnection;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//databaseInfo.getServerInfo().compareVersionKey(\"8.2.2\") >= 0;\n\t\t\tboolean isSupportCache = CompatibleUtil.isSupportCache(databaseInfo);\n\t\t\tString sql = \"SELECT owner.name, db_serial.* FROM db_serial WHERE class_name IS NULL\";\n\n\t\t\t// [TOOLS-2425]Support shard broker\n\t\t\tif (databaseInfo.isShard()) {\n\t\t\t\tsql = databaseInfo.wrapShardQuery(sql);\n\t\t\t}\n\n\t\t\tstmt = connection.createStatement();\n\t\t\trs = stmt.executeQuery(sql);\n\t\t\twhile (rs.next()) {\n\t\t\t\tString name = rs.getString(\"name\");\n\t\t\t\tString owner = rs.getString(\"owner.name\");\n\t\t\t\tString currentVal = rs.getString(\"current_val\");\n\t\t\t\tString incrementVal = rs.getString(\"increment_val\");\n\t\t\t\tString maxVal = rs.getString(\"max_val\");\n\t\t\t\tString minVal = rs.getString(\"min_val\");\n\t\t\t\tString cyclic = rs.getString(\"cyclic\");\n\t\t\t\tString startVal = rs.getString(\"started\");\n\t\t\t\tString className = rs.getString(\"class_name\");\n\t\t\t\tString attName = rs.getString(\"att_name\");\n\t\t\t\tboolean isCycle = false;\n\t\t\t\tif (cyclic != null && cyclic.equals(\"1\")) {\n\t\t\t\t\tisCycle = true;\n\t\t\t\t}\n\t\t\t\tString cacheCount = null;\n\t\t\t\tif (isSupportCache) {\n\t\t\t\t\tcacheCount = rs.getString(\"cached_num\");\n\t\t\t\t}\n\t\t\t\tSerialInfo serialInfo = new SerialInfo(name, owner, currentVal,\n\t\t\t\t\t\tincrementVal, maxVal, minVal, isCycle, startVal,\n\t\t\t\t\t\tcacheCount, className, attName);\n\t\t\t\tserialInfoList.add(serialInfo);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\terrorMsg = e.getMessage();\n\t\t\tLOGGER.error(e.getMessage(), e);\n\t\t} finally {\n\t\t\tfinish();\n\t\t}\n\t}",
"@Override\r\n\tpublic String call() throws Exception {\n\t\tSystem.out.println(\"开始query\");\r\n\t\tThread.sleep(2000);\r\n\t\tString result = this.query + \"处理结束\";\r\n\t\treturn result;\r\n\t}",
"public ResultSet executeQuery(String query) {\n ResultSet rs = null;\n \ttry {\n rs = st.executeQuery(query);\n } catch(Exception e) {\n \te.printStackTrace();\n }\n return rs;\n }",
"public cqFetchOutput(StringBuffer sbXML) throws Exception {\n\tsuper();\n\tthis.unmarshall(sbXML);\n }",
"public void onMessage(Message msg) {\n\t\tMapMessage message = null;\n\t\tQueueConnection conn = null;\n\t\tQueueSession session = null;\n\t\tQueueSender sender = null;\n\t\tQueryProcessorUtil qpUtil = QueryProcessorUtil.getInstance();\n\t\tQueue replyToQueue = null;\n\t\tUserTransaction transaction = sessionContext.getUserTransaction();\n\t\t//default timeout three minutes\n\t\tint transactionTimeout = 180;\n\t\ttry {\n\t\t\t\n\t\t\tif (callingMDBName.equalsIgnoreCase(QueryManagerBeanUtil.MEDIUM_QUEUE_NAME)) {\n\t\t\t\t//four hours\n\t\t\t\ttransactionTimeout = 14400;\n\t\t\t} else if (callingMDBName.equalsIgnoreCase(QueryManagerBeanUtil.LARGE_QUEUE_NAME)) {\n\t\t\t\t//twelve hours\n\t\t\t\ttransactionTimeout = 43200;\n\t\t\t} \n\t\t\t\n\t\t\ttransaction.setTransactionTimeout(transactionTimeout);\n\t\t\t\n\t\t\t\n\t\t\ttransaction.begin();\n\t\t\tmessage = (MapMessage) msg;\n\t\t\tString sessionId = msg.getJMSCorrelationID();\n\t\t\treplyToQueue = (Queue) msg.getJMSReplyTo();\n\t\t\tlog.debug(\"Extracting the message [\" + msg.getJMSMessageID());\n\t\t\tString patientSetId = \"\";\n\t\t\ttransaction.commit();\n\t\t\tif (message != null) {\n\t\t\t\tString sqlString = message.getString(QueryManagerBeanUtil.QUERY_MASTER_GENERATED_SQL_PARAM);\n\t\t\t\tString queryInstanceId = message.getString(QueryManagerBeanUtil.QUERY_INSTANCE_ID_PARAM);\n\t\t\t\tpatientSetId = message.getString(QueryManagerBeanUtil.QUERY_PATIENT_SET_ID_PARAM);\n\t\t\t\tString xmlRequest = message.getString(QueryManagerBeanUtil.XML_REQUEST_PARAM);\n\t\t\t\t\n\t\t\t\tString dsLookupDomainId = message.getString(QueryManagerBeanUtil.DS_LOOKUP_DOMAIN_ID);\n\t\t\t\tString dsLookupProjectId = message.getString(QueryManagerBeanUtil.DS_LOOKUP_PROJECT_ID);\n\t\t\t\tString dsLookupOwnerId = message.getString(QueryManagerBeanUtil.DS_LOOKUP_OWNER_ID);\n\t\t\t\t\n\t\t\t\tDAOFactoryHelper daoFactoryHelper = new DAOFactoryHelper(dsLookupDomainId, dsLookupProjectId, dsLookupOwnerId);\n\t\t\t\n\t\t\t\tDataSourceLookupHelper dataSourceHelper = new DataSourceLookupHelper();\n\t\t\t\tDataSourceLookup dsLookup = dataSourceHelper.matchDataSource(dsLookupDomainId, dsLookupProjectId, dsLookupOwnerId);\n\t\t\t\t\n\t\t\t\tIDAOFactory daoFactory = daoFactoryHelper.getDAOFactory();\n\t\t\t\t\n\t\t\t\tSetFinderDAOFactory sfDAOFactory = daoFactory.getSetFinderDAOFactory();\n\t\t\t\ttry { \n\t\t\t\t\t \n\t\t\t\t\tpatientSetId = processQueryRequest(transaction,transactionTimeout,dsLookup,sfDAOFactory ,xmlRequest,sqlString, sessionId,queryInstanceId,patientSetId);\n\t\t\t\t\tlog.debug(\"QueryExecutorMDB completed processing query instance [\" + queryInstanceId + \"]\");\n\t\t\t\t} catch (CRCTimeOutException daoEx) {\n\t\t\t\t\t//catch this error and ignore. send general reply message. \n\t\t\t\t\tlog.error(daoEx.getMessage(),daoEx);\n\t\t\t\t\tif (callingMDBName.equalsIgnoreCase(LARGE_QUEUE)) { \n\t\t\t\t\t\t\n\t\t\t\t\t\t// set status to error\n\t\t\t\t\t\tsetQueryInstanceStatus(sfDAOFactory,queryInstanceId, 4) ;\n\t\t\t\t\t\t\n\t\t\t\t\t} else { \n\t\t\t\t\t\t//send message to next queue and if the there is no next queue then update query instance to error\n\t\t\t\t\t\ttryNextQueue(sfDAOFactory,sessionId, message,queryInstanceId);\n\t\t\t\t\t}\n\t\t\t\t} catch (I2B2DAOException daoEx) {\n\t\t\t\t\t//catch this error and ignore. send general reply message. \n\t\t\t\t\tlog.error(daoEx.getMessage(),daoEx);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tsendReply(sessionId,patientSetId, replyToQueue);\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\ttry {\n\t\t\t\ttransaction.rollback();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\tlog.error(\"Error extracting message\", ex);\n\t\t} finally {\n\t\t\tQueryManagerBeanUtil qmBeanUtil = new QueryManagerBeanUtil();\n\t\t\tqmBeanUtil.closeAll(sender, null, conn, session);\n\t\t}\n\t}",
"public static void executingUpdate(String query1) {\r\n try {\r\n //Apertura de conexion:\r\n Connection con = iniciarConexion();\r\n PreparedStatement pst = con.prepareStatement(query1);\r\n con.setAutoCommit(false);\r\n //Añadimos todas las setencias del ArrayList a la batería de queries:\r\n\r\n pst.addBatch(query1);\r\n\r\n //Recogemos los datos de filas modificadas por cada query y los mostramos:\r\n int[] registrosAfectados = pst.executeBatch();\r\n for (int i = 0; i < registrosAfectados.length; i++) {\r\n System.out.println(\"Filas modificadas: \" + registrosAfectados[i]);\r\n }\r\n //Se confirma la transacción a la base de datos:\r\n con.commit();\r\n con.close();\r\n //Se limpia el ArrayList para una sesión posterior:\r\n\r\n } catch (SQLException ex) {\r\n System.err.print(\"SQLException: \" + ex.getMessage());\r\n }\r\n }",
"public void execute() {\n /*\n r6 = this;\n java.lang.String r0 = \"Failed to close connection after DBUnit operation: \"\n java.util.logging.Logger r1 = log\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n r2.<init>()\n java.lang.String r3 = \"Executing DBUnit operations: \"\n r2.append(r3)\n int r3 = r6.size()\n r2.append(r3)\n java.lang.String r2 = r2.toString()\n r1.info(r2)\n org.dbunit.database.IDatabaseConnection r1 = r6.getConnection() // Catch:{ all -> 0x005a }\n r6.disableReferentialIntegrity(r1) // Catch:{ all -> 0x0058 }\n java.util.Iterator r2 = r6.iterator() // Catch:{ all -> 0x0058 }\n L_0x0027:\n boolean r3 = r2.hasNext() // Catch:{ all -> 0x0058 }\n if (r3 == 0) goto L_0x0037\n java.lang.Object r3 = r2.next() // Catch:{ all -> 0x0058 }\n org.seamless.util.dbunit.DBUnitOperations$Op r3 = (org.seamless.util.dbunit.DBUnitOperations.Op) r3 // Catch:{ all -> 0x0058 }\n r3.execute(r1) // Catch:{ all -> 0x0058 }\n goto L_0x0027\n L_0x0037:\n r6.enableReferentialIntegrity(r1) // Catch:{ all -> 0x0058 }\n if (r1 == 0) goto L_0x0057\n r1.close() // Catch:{ Exception -> 0x0040 }\n goto L_0x0057\n L_0x0040:\n r1 = move-exception\n java.util.logging.Logger r2 = log\n java.util.logging.Level r3 = java.util.logging.Level.WARNING\n java.lang.StringBuilder r4 = new java.lang.StringBuilder\n r4.<init>()\n r4.append(r0)\n r4.append(r1)\n java.lang.String r0 = r4.toString()\n r2.log(r3, r0, r1)\n L_0x0057:\n return\n L_0x0058:\n r2 = move-exception\n goto L_0x005c\n L_0x005a:\n r2 = move-exception\n r1 = 0\n L_0x005c:\n if (r1 == 0) goto L_0x0079\n r1.close() // Catch:{ Exception -> 0x0062 }\n goto L_0x0079\n L_0x0062:\n r1 = move-exception\n java.util.logging.Logger r3 = log\n java.util.logging.Level r4 = java.util.logging.Level.WARNING\n java.lang.StringBuilder r5 = new java.lang.StringBuilder\n r5.<init>()\n r5.append(r0)\n r5.append(r1)\n java.lang.String r0 = r5.toString()\n r3.log(r4, r0, r1)\n L_0x0079:\n goto L_0x007b\n L_0x007a:\n throw r2\n L_0x007b:\n goto L_0x007a\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.seamless.util.dbunit.DBUnitOperations.execute():void\");\n }",
"private ExecuteMessage() {\n initFields();\n }",
"private void querys() {\n\t try {\r\n\t\tBoxYieldRptFactory.getRemoteInstance().SteDate();\r\n\t } catch (EASBizException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t } catch (BOSException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t }\r\n\t}",
"public void sendQuery(Message query, Object id, ResponseQueue responseQueue, long endTime) {\n this.responseQueue = responseQueue;\n this.id = id;\n this.query = query;\n this.endTime = endTime;\n startTimer();\n startConnect();\n }",
"private List<Map<String, PrimitiveTypeProvider>> executeQuery(QueryMessage qm) {\r\n ListenableFuture<QueryResultsMessage> f = this.adampro.standardQuery(qm);\r\n QueryResultsMessage result;\r\n try {\r\n result = f.get();\r\n } catch (InterruptedException | ExecutionException e) {\r\n LOGGER.error(LogHelper.getStackTrace(e));\r\n return new ArrayList<>(0);\r\n }\r\n\r\n if (result.getAck().getCode() != AckMessage.Code.OK) {\r\n LOGGER.error(result.getAck().getMessage());\r\n }\r\n\r\n if (result.getResponsesCount() == 0) {\r\n return new ArrayList<>(0);\r\n }\r\n\r\n QueryResultInfoMessage response = result.getResponses(0); // only head (end-result) is important\r\n\r\n List<QueryResultTupleMessage> resultList = response.getResultsList();\r\n return resultsToMap(resultList);\r\n }",
"@Override\n\tpublic void executeUpdateDinamicQuery(String s) throws Exception {\n\t\t\n\t}",
"private String processQueryRequest(UserTransaction transaction,int transactionTimeout,DataSourceLookup dsLookup,SetFinderDAOFactory sfDAOFactory,String xmlRequest,String sqlString, String sessionId, String queryInstanceId, String patientSetId) \n\t\tthrows I2B2DAOException,I2B2Exception {\n\t\t\tQueryDefinitionRequestType qdRequestType = getQueryDefinitionRequestType(xmlRequest);\n\t\t\tResultOutputOptionListType resultOutputList = qdRequestType.getResultOutputList();\n\t\t\tDataSource dataSource = ServiceLocator.getInstance().getAppServerDataSource(dsLookup.getDataSource());\n\t\t\tQueryExecutorDao queryExDao = new QueryExecutorDao(dataSource,dsLookup);\n\t\t\t\n\t\t\tqueryExDao.executeSQL(transaction,transactionTimeout,dsLookup, sfDAOFactory, sqlString, queryInstanceId, patientSetId,resultOutputList);\n\t\t\treturn patientSetId;\n\t}",
"@Override\r\n\t\tpublic void run() {\n\t\t\tBBGJDB tdd = new BBGJDB(_context);\r\n\t\t\ttdd.clearreply();\r\n\t\t\tString qurl = MessengerService.URL;\r\n\t\t\tString qmethodname = MessengerService.METHOD_GETCOMUNREPLY;\r\n\t\t\tString qnamespace = MessengerService.NAMESPACE;\r\n\t\t\tString qsoapaction = qnamespace + \"/\" + qmethodname;\r\n\r\n\t\t\tSoapObject rpc = new SoapObject(qnamespace, qmethodname);\r\n\t\t\trpc.addProperty(\"id\", webid);\r\n\t\t\trpc.addProperty(\"pagesize\", 30);\r\n\t\t\trpc.addProperty(\"pageindex\", 1);\r\n\t\t\tSoapSerializationEnvelope envelope = new SoapSerializationEnvelope(\r\n\t\t\t\t\tSoapEnvelope.VER11);\r\n\t\t\tenvelope.bodyOut = rpc;\r\n\t\t\tenvelope.dotNet = true;\r\n\t\t\tenvelope.setOutputSoapObject(rpc);\r\n\t\t\tHttpTransportSE ht = new HttpTransportSE(qurl);\r\n\t\t\tht.debug = true;\r\n\t\t\ttry {\r\n\t\t\t\tht.call(qsoapaction, envelope);\r\n\t\t\t\tSoapObject replylist = (SoapObject) envelope.bodyIn;\r\n\t\t\t\tfor (int i = 0; i < replylist.getPropertyCount(); i++) {\r\n\t\t\t\t\tSoapObject soapchilds = (SoapObject) replylist\r\n\t\t\t\t\t\t\t.getProperty(0);\r\n\t\t\t\t\tfor (int j = 0; j < soapchilds.getPropertyCount(); j++) {\r\n\t\t\t\t\t\tSoapObject soapchildsson = (SoapObject) soapchilds\r\n\t\t\t\t\t\t\t\t.getProperty(j);\r\n\r\n\t\t\t\t\t\tString rtitle = soapchildsson.getProperty(\"Content\")\r\n\t\t\t\t\t\t\t\t.toString();\r\n\t\t\t\t\t\tString rtime = soapchildsson.getProperty(\"Crtime\")\r\n\t\t\t\t\t\t\t\t.toString();\r\n\t\t\t\t\t\tString ruser = soapchildsson.getProperty(\"Userid\")\r\n\t\t\t\t\t\t\t\t.toString();\r\n\t\t\t\t\t\tString rusername = soapchildsson\r\n\t\t\t\t\t\t\t\t.getProperty(\"RealName\").toString();\r\n\r\n\t\t\t\t\t\tContentValues values = new ContentValues();\r\n\t\t\t\t\t\tvalues.put(tdd.RPL_CONTENT, rtitle);\r\n\t\t\t\t\t\tvalues.put(tdd.RPL_TIME, rtime);\r\n\t\t\t\t\t\tvalues.put(tdd.RPL_WEBID, ruser);\r\n\t\t\t\t\t\tvalues.put(tdd.RPL_NAME, rusername);\r\n\t\t\t\t\t\ttdd.insertreply(values);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.obj = lvbt;\r\n\t\t\tthreadMessageHandler.sendMessage(msg);\r\n\t\t}",
"protected void execute() {\n \t\n }",
"protected void execute() {\n \t\n }",
"public void queryNext() {\n String sumText;\n if (!isExpire()) {\n this.mHandler.removeCallbacks(this.queryNextRunnable);\n this.mHandler.removeCallbacks(this.queryCurrentRunnable);\n boolean allQueried = this.currentID == this.bizOrderIds.size() + -1;\n if (allQueried && this.results.length > 0 && this.results[this.results.length - 1] != null && \"WAIT_BUYER_PAY\".equals(this.results[this.results.length - 1].getOrderInfo().getOrderStatusCode())) {\n allQueried = false;\n }\n double sum = ClientTraceData.b.f47a;\n if (allQueried) {\n OrderDetailMO[] orderDetailMOArr = this.results;\n int length = orderDetailMOArr.length;\n int i = 0;\n while (i < length) {\n OrderDetailMO mo = orderDetailMOArr[i];\n if (checkPaid(mo.getOrderInfo().getOrderStatusCode())) {\n sum += Double.parseDouble(mo.getOrderInfo().getTotalPrice());\n i++;\n } else {\n return;\n }\n }\n final QRDialogDelegate delegate = this.mDelegate;\n if (sum == ((double) ((int) sum))) {\n sumText = String.format(\"成功付款 %.0f 元\", new Object[]{Double.valueOf(sum)});\n } else {\n sumText = String.format(\"成功付款 %.2f 元\", new Object[]{Double.valueOf(sum)});\n }\n new PayConfirmDialog.Builder(this.mActivityContext).setCancelable(false).setMessage((CharSequence) onHandlerSpanned(sumText)).setPositiveButton(\"按OK键完成\", (DialogInterface.OnClickListener) new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialogInterface, int i) {\n if (delegate != null) {\n delegate.QRDialogSuccess(QRDialog.this, true);\n }\n dialogInterface.dismiss();\n }\n }).create().show();\n dismiss();\n return;\n }\n this.mHandler.postDelayed(this.queryNextRunnable, 5000);\n }\n }",
"String marshalI2b2FurtherQueryResult(I2b2FurtherQueryResultTo queryResult);",
"private void execute() throws Exception {\n String parserIdentifier = Parsers.getIdentifier(parser);\n MDC.put(\"parser\", parserIdentifier);\n\n File dataSet = checkInbox();\n\n if (dataSet != null) {\n SLALogItem slaLogItem = getSLALogger().createLogItem(\"Executing parser \" + parserIdentifier, parser.getClass().getCanonicalName());\n try {\n context.isInProgress(true);\n\n MDC.put(\"input\", dataSet.getName());\n\n logger.info(\"Executing parser.\");\n\n parser.process(dataSet, persister);\n\n timeManager.update();\n\n // It is important that we commit before\n // we advance the inbox. Since it is not done\n // in a transaction we must make sure that items\n // are actually stored before removing the item\n // from the inbox. If removing the item fails\n // the parser will complain the next time we try\n // to import the item.\n //\n connection.commit();\n\n // Once the import is complete\n // we can remove of the data set\n // from the inbox.\n //\n inbox.advance();\n\n logger.info(\"Import successful.\");\n \n slaLogItem.setCallResultOk();\n slaLogItem.store();\n \n } catch (Exception e) {\n slaLogItem.setCallResultError(\"Parser \" + parserIdentifier + \" failed - Cause: \" + e.getMessage());\n slaLogItem.store();\n\n throw e;\n }\n }\n }",
"public abstract void processExecuteRequest(ContentExecuteRequest contentExecuteRequest, Message message);",
"public void startqqCharge(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.QqCharge qqCharge8,\n\n final net.wit.webservice.TerminalServiceXmlServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[4].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/qqChargeRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n qqCharge8,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"qqCharge\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"qqCharge\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n net.wit.webservice.TerminalServiceXmlServiceStub.QqChargeResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultqqCharge(\n (net.wit.webservice.TerminalServiceXmlServiceStub.QqChargeResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrorqqCharge(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"qqCharge\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"qqCharge\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"qqCharge\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorqqCharge(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorqqCharge(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorqqCharge(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorqqCharge(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorqqCharge(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorqqCharge(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorqqCharge(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorqqCharge(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorqqCharge(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrorqqCharge(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrorqqCharge(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrorqqCharge(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[4].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[4].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }",
"public int Appbr(Long broker_id)throws SQLException {\nint i=DbConnect.getStatement().executeUpdate(\"update login set status='approved' where login_id=\"+broker_id+\"\");\r\n\treturn i;\r\n}",
"@Override\n\tpublic void executeQuery(String query) {\n\t\tStatement statement;\n\t\ttry {\n\t\t\tstatement=connection.createStatement();\n\t\t\tstatement.executeUpdate(query);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}",
"private QueryResult performMappedQuery() throws VizException {\n\n if (database == null) {\n throw new VizException(\"Database not specified for query\");\n }\n if (query == null) {\n throw new VizException(\"Cannot execute null query\");\n }\n\n QlServerRequest request = new QlServerRequest(query);\n request.setDatabase(database);\n request.setType(QueryType.QUERY);\n request.setParamMap(paramMap);\n\n // set the mode so the handler knows what to do\n if (queryLanguage == null) {\n throw new VizException(\"Query language not specified\");\n } else if (queryLanguage.equals(QueryLanguage.HQL)) {\n request.setLang(QlServerRequest.QueryLanguage.HQL);\n } else {\n request.setLang(QlServerRequest.QueryLanguage.SQL);\n }\n\n // create request object\n QueryResult retVal = null;\n // get result\n AbstractResponseMessage response = (AbstractResponseMessage) ThriftClient\n .sendRequest(request);\n\n if (response instanceof ResponseMessageGeneric) {\n retVal = (QueryResult) ((ResponseMessageGeneric) response)\n .getContents();\n\n } else if (response instanceof ResponseMessageError) {\n ResponseMessageError rme = (ResponseMessageError) response;\n VizServerSideException innerException = new VizServerSideException(\n rme.toString());\n throw new VizServerSideException(rme.getErrorMsg(), innerException);\n }\n\n return retVal;\n }",
"public void run() {\n assertEquals(sendQuery(\"SFO\"), 7);\n assertEquals(sendQuery(\"RHV\"), 1);\n assertEquals(sendQuery(\"xyzzy\"), 0);\n }",
"public abstract byte[] appExecuteUnordered(byte[] command, MessageContext msgCtx);",
"public void run()\n\t\t\t{\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(5000);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * \n\t\t\t\t * Process Query Here\n\t\t\t\t * \n\t\t\t\t **/\n\t\t\t}",
"public void receiveResultexecute(\n com.exacttarget.wsdl.partnerapi.ExecuteResponseMsgDocument result\n ) {\n }",
"public void execute(ObjectOutputStream oos) throws ParallelException, IOException {\r\n DConditionCounter.getInstance().increment(_num);\r\n // ok, handling thread on server increased the associated unique CondCounter\r\n\t\t// no need for reset\r\n oos.writeObject(new OKReply());\r\n oos.flush();\r\n }",
"public abstract IStatus performQuery(AbstractRepositoryQuery query, TaskRepository repository,\n \t\t\tIProgressMonitor monitor, ITaskCollector resultCollector);",
"private void processToXML(StringBuffer buffer) {\n\n buffer.append(getStartElement(PROCESS));\n\n\n respValue = this.getMashupResponse().toUpperCase();\n\n buffer.append(getStartElementWithAtrribute(MASHUP, RESPONSETYPE, respValue));\n buffer.append(getStartElement(MASHUP_SQL));\n //buffer.append(XmlUtil.escapeXML(this.mashupQuery.toXMLString()));\n buffer.append(this.mashupQuery.toXMLString());\n buffer.append(getEndElement(MASHUP_SQL));\n buffer.append(getEndElement(MASHUP));\n buffer.append(getEndElement(PROCESS));\n }",
"private int executeMSSqlCommand(Connection objConnection, String jobName,\n\t\t\tint timeoutSecs) throws AFTException, SQLException {\n\n\t\tint jobStatus = 0;\n\t\tPreparedStatement objPrepStmt = null;\n\t\tStatement objStmt = null;\n\t\tResultSet objectResultSet = null;\n\n\t\ttry {\n\n\t\t\t// construct the execute statement string\n\t\t\tString stmtStr = \"EXEC msdb.dbo.sp_start_job\" + \" '\" + jobName\n\t\t\t\t\t+ \"'\";\n\n\t\t\tLOGGER.trace(\"Statement string [\" + stmtStr + \"]\");\n\n\t\t\t// create the PreparedStatement object\n\t\t\tobjPrepStmt = objConnection.prepareStatement(stmtStr);\n\n\t\t\t// execute the job\n\t\t\tobjPrepStmt.execute();\n\n\t\t\t// create the Statement object\n\t\t\tobjStmt = objConnection.createStatement();\n\n\t\t\t// construct the job status query string\n\t\t\tString strStatusQuery = \"SELECT current_execution_status FROM OPENROWSET\"\n\t\t\t\t\t+ \"('SQLNCLI', 'Trusted_Connection=yes;',\"\n\t\t\t\t\t+ \"'EXEC MSDB.dbo.sp_help_job @job_name = ''\"\n\t\t\t\t\t+ jobName\n\t\t\t\t\t+ \"'', @job_aspect = ''JOB''')\";\n\n\t\t\tLOGGER.trace(\"Status query string [\" + strStatusQuery + \"]\");\n\n\t\t\t// execute the query\n\t\t\tobjectResultSet = objStmt.executeQuery(strStatusQuery);\n\t\t\tobjectResultSet.first();\n\n\t\t\t// get the job status value\n\t\t\tjobStatus = objectResultSet.getInt(1);\n\n\t\t\tint timeOutSeconds = timeoutSecs;\n\n\t\t\t// execute the query till either timeout(secs) lapses or job is\n\t\t\t// timed\n\t\t\t// out\n\t\t\tif (jobStatus != 4) {\n\t\t\t\twhile (timeOutSeconds > 0 && jobStatus != 4) {\n\t\t\t\t\tobjectResultSet = objStmt.executeQuery(strStatusQuery);\n\t\t\t\t\tobjectResultSet.first();\n\t\t\t\t\tjobStatus = objectResultSet.getInt(1);\n\t\t\t\t\ttimeOutSeconds = timeOutSeconds - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(\"Exception::\", e);\n\t\t\tthrow new AFTException(e);\n\t\t} finally {\n\t\t\tif (!objPrepStmt.isClosed()) {\n\t\t\t\tobjPrepStmt.close();\n\t\t\t}\n\t\t\tif (!objStmt.isClosed()) {\n\t\t\t\tobjStmt.close();\n\t\t\t}\n\t\t\tif (!objectResultSet.isClosed()) {\n\t\t\t\tobjectResultSet.close();\n\t\t\t}\n\t\t}\n\n\t\treturn jobStatus;\n\t}",
"private void executeQuery1(PersistenceManager pm) {\n Query query = pm.newQuery(Book.class, \"pages > 300\");\n Collection results = (Collection)query.execute();\n printCollection(\"Books with more than 300 pages:\", results.iterator());\n query.closeAll();\n }",
"@SuppressWarnings(\"deprecation\")\n\tpublic void execute() throws BuildException {\n // Create a new build listener for parsing events\n Connection conn = getConnection();\n DbProgressListener listener = new DbProgressListener(conn, buildId, getProgressTargets(), dbTable);\n\n // Add the event listeners to the project\n project.addBuildListener(listener);\n\n // Add a thread to poll the database\n if (pollingEnabled) {\n polling = new DbStatusThread(conn);\n polling.setInterval(pollingInterval * 1000);\n polling.start();\n }\n }",
"@Override\n\tpublic String execute() throws Exception {\n\t\temailService.getUnreadCount();\n\t\treturn SUCCESS;\n\t}",
"public void query()\n\t{\n\t\tJSONObject queryInfo = new JSONObject();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tqueryInfo.put(\"type\", \"query\");\n\t\t\t\n\t\t\tos.println(queryInfo.toString());\n\t\t\tos.flush();\n\t\t\t\n\t\t\tSystem.out.println(\"send query request : \" + queryInfo.toString());\n\t\t}\n\t\tcatch (JSONException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"void execute(TimelyQuery timelyQuery, ExecuteConfig executeConfig, GraphSchema schema, long timeout, String queryId);",
"protected ResultSet executeQuery(String query) {\n ResultSet rs = null;\n \n try {\n Statement stmt = getConnection().createStatement();\n rs = stmt.executeQuery(query);\n } catch (SQLException e) {\n String msg = \"Failed to execute query: \" + query;\n _logger.error(msg, e);\n throw new TSSException(msg, e);\n } \n \n return rs;\n }",
"private void verifyAnalyzeOutput(String query, String message) throws Exception {\n List<QueryDataBatch>result = testRunAndReturn(QueryType.SQL, query);\n List<List<String>> output = new ArrayList<>();\n assertTrue(result.size() == 1);\n final QueryDataBatch batch = result.get(0);\n final RecordBatchLoader loader = new RecordBatchLoader(getDrillbitContext().getAllocator());\n loader.load(batch.getHeader().getDef(), batch.getData());\n output.add(new ArrayList<String>());\n for (VectorWrapper<?> vw: loader) {\n ValueVector.Accessor accessor = vw.getValueVector().getAccessor();\n Object o = accessor.getObject(0);\n output.get(0).add(o == null ? null: o.toString());\n }\n batch.release();\n loader.clear();\n assertTrue(output.get(0).size() == 2);\n assertEquals(message, output.get(0).get(1));\n }",
"@Override\n\tpublic String execute() throws Exception {\n\t\t\n\t\treturn super.execute();\n\t}",
"@Override\n\tpublic void allocateorder(Block block) {\n\t\tint executedQty=(int) block.getQtyExecuted();\n\t\tList<Order> list = new ArrayList<Order>();\n\t\tQuery query = em.createQuery(\"from Order where blockId = :id order by orderDate\");\n\t\tquery.setParameter(\"id\", block.getBlockId());\n\t\tlist = query.getResultList();\n\t\tfor (Order order1 : list) {\n\t\tint q=order1.getQtyPlaced();\n\t\tStatus status = null;\n\t\t\tif((q<= executedQty) && (executedQty>0))\n\t\t\t{\n\t\t\t\tSystem.out.println(em);\n\t\t\t\tSystem.out.println(\"Inside first loop\");\n\t\t\t\tSystem.out.println(q);\n\t\t\t\texecutedQty=executedQty-q;\n\t\t\t\t\n\t\t\t\tQuery query1 = em.createQuery(\"Update Order set qtyExecuted=:qty1, status=:status1 where orderId=:oid\");\n\t\t\t\tquery1.setParameter(\"qty1\",q);\n\t\t\t\tquery1.setParameter(\"status1\",status.Completed.toString());\n\t\t\t\tquery1.setParameter(\"oid\",order1.getOrderId());\n\t\t\t\tSystem.out.println(query1.executeUpdate());\n\t\t\t\tSystem.out.println(executedQty + q);\n\t\t\t\t//query1.executeUpdate();\n\n\t\t\t}\n\t\t\telse if(q>=executedQty && executedQty>0){\n\t\t\t\texecutedQty=q-executedQty;\n\t\t\t\tSystem.out.println(\"Inside second loop\");\n\t\t\t\tQuery query1 = em.createQuery(\"Update Order set qtyExecuted=:qty2, status=:status2 where orderId=:oid\");\n\t\t\t\tquery1.setParameter(\"qty2\",executedQty);\n\t\t\t\tquery1.setParameter(\"status2\", status.PartiallyAllocated.toString());\n\t\t\t\tquery1.setParameter(\"oid\",order1.getOrderId());\n\t\t\t\tSystem.out.println(query1.executeUpdate());\n\t\t\t\t//query1.executeUpdate();\n\t\t\t\texecutedQty=0;\n\t\t\t\tSystem.out.println(executedQty);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tQuery query2 = em.createQuery(\"update Order set status=:status3 where orderId=:oid\");\n\t\t\t\tquery2.setParameter(\"status3\", status.Open.toString());\n\t\t\t\tquery2.setParameter(\"oid\",order1.getOrderId());\n\t\t\t\tSystem.out.println(query2.executeUpdate());\n\t\t\t\t//query2.executeUpdate();\n\t\t\t}}\n\t\tSystem.out.println(\"Inside OrderDAO\");\n\n\t\t\n\t}",
"private String exec(String cmd, File ws, String errorMessage) throws IOException, ProcessingException {\n listener.info(\"Executing: \"+cmd);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n int r = new Proc(cmd, null, baos, ws).join();\n if(r!=0) {\n listener.info(baos.toString());\n throw new ProcessingException(errorMessage);\n }\n return baos.toString();\n }",
"public ResultSet executeQuery(String query)\n\t{\n\t\tStatement statement = null;\n\t\tResultSet resultSet = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\t//System.out.println(\"Performing query: \" + query);\n\t\t\tstatement = getConnection().createStatement();\n\t\t\tresultSet = statement.executeQuery(query);\n\t\t\t//System.out.println(\"Query performed\");\n\t\t\t\n\t\t\treturn resultSet;\n\t\t}\n\t\tcatch(SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n\tpublic void execute(Tuple arg0) {\n\t\tdeviceId = arg0.getStringByField(\"deviceid\");\n\t\tjsondata = arg0.getStringByField(\"jsondata\");\n\t\tvalid = arg0.getBooleanByField(\"valid\");\n\n\n// full amqp uri TODO: set amqp uri or Hostname\n\n\n\nJsonObject message = new JsonObject().put(\"body\", jsondata);\nif(valid) {\n\n//publish message to broker...TODO:change the queue name\n\n\tclient.basicPublish(\"\", \"validQ\", message, null);\n\n}\nelse{\n\n\t//TODO:publish it to user.notification\n\tclient.basicPublish(\"\", \"user.notification\", message, null);\n\n}\n\n\n\n\n\t\t// AerospikeClient client = new AerospikeClient(\"localhost\", 3000);\n\t\t// org.json.JSONObject jsonObject=new org.json.JSONObject(jsondata);\n\t\t// // jsonObject.put(\"valid\",valid);\n\t\t// // jsonObject.put(\"checked\",checked);\n\t\t// String jsonString=jsonObject.toString();\n\t\t// Key validationKey = new Key(\"test\", \"demo1\", jsonObject.get(\"id\").toString() + \"-\" + jsonObject.get(\"timestamp\") +\"-Validated\");\n\t\t// Bin bodyBin=new Bin(\"body\",jsonString);\n\t\t// client.put(null,validationKey,bodyBin);\n\t\t//\n\t\t// client.close();\n\t}",
"public void execute() {\n\t\t\r\n\t}",
"public void execute() {\n\t\t\r\n\t}",
"public void execute() {\n\t\t\r\n\t}",
"@Override\n public void execute() {\n //double result = marketPrice / exchange.\n Stock stock = exchange.getStock(stockSymbol);\n\n double result = 0.0;\n double lastDividend = stock.getLastDividend();\n\n if(lastDividend != 0.0)\n {\n result = marketPrice / lastDividend;\n }\n\n System.out.println(displayMessage);\n System.out.println(result);\n }",
"public static int executePreparedStatement(String query, Fee fee){\n\t\tSystem.out.println(query);\n\t\tPreparedStatement statement = null;\n\t\ttry{\n\t\t\tconnectDatabase();\n\t\t\tstatement = connection.prepareStatement(query);\n\t\t\t// set the parameters\n\t\t\tstatement.setString(1,fee.getUuid().toString());\n\t\t\tstatement.setString(2,fee.getRollno());\n\t\t\tstatement.setString(3, String.valueOf(fee.getAmount()));\n\t\t\treturn statement.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\ttry{\n\t\t\t\tif (statement != null) statement.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tdisconnectDatabase();\n\t\t}\n\t\treturn 0;\n\t}",
"@Override\n\tpublic void execute() {\n\t\tSystem.out.println(\"==STATISTICS FOR THE RESTAURANT==\");\n\t\tSystem.out.println(\"Most used Ingredients:\");\n\t\tmanager.printIngredients();\n\t\tSystem.out.println(\"Most ordered items:\");\n\t\tmanager.printMenuItems();\n\t\tSystem.out.println(\"==END STATISTICS==\");\n\t}",
"public String execute(){\r\n\t\t\r\n\t\tString resultHtml = null;\r\n\t\tdebug(1,\"jsrpc start...\"+screenName+\" \"+rpcid); \r\n\t\tHashMap hm = jsrpcProcessBL(screenName);\r\n\t\tJSONObject jobj = new JSONObject(hm);\r\n\t\tresultHtml = jobj.toString();\r\n\t\tdebug(1,\"json result:\"+resultHtml);\r\n\t\tinputStream = new StringBufferInputStream(resultHtml);\r\n\t\treturn SUCCESS;\r\n\t}",
"private ResultSet executeQuery(String query) {\r\n Statement stmt;\r\n ResultSet result = null;\r\n try {\r\n// System.out.print(\"Connect DB .... \");\r\n conn = openConnect();\r\n// System.out.println(\"successfully \");\r\n stmt = conn.createStatement();\r\n result = stmt.executeQuery(query);\r\n } catch (SQLException | ClassNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return result;\r\n }",
"public void testPerformQuery() throws IOException\r\n {\r\n final IQuery t = new ContentQuery();\r\n try\r\n {\r\n final Hits h = t.performQuery(\"author:jpitts\", new Sort(IndexDocument.REVISION_FIELD));\r\n Assert.assertNotNull(h);\r\n Assert.assertTrue(0 < h.length());\r\n for (int i = 0; i < h.length(); i++)\r\n {\r\n final Document d = h.doc(i);\r\n CommitQueryTest.log.debug(d);\r\n }\r\n }\r\n finally\r\n {\r\n t.close();\r\n }\r\n }"
] |
[
"0.5439683",
"0.5357028",
"0.533879",
"0.5210095",
"0.5172911",
"0.5146493",
"0.51435953",
"0.5120599",
"0.5025151",
"0.50173366",
"0.50170153",
"0.5005651",
"0.49836048",
"0.49812454",
"0.4977901",
"0.49771",
"0.49708375",
"0.4949924",
"0.4928318",
"0.49242553",
"0.49233112",
"0.49176705",
"0.48998687",
"0.48987526",
"0.48880258",
"0.48849759",
"0.4884942",
"0.48812538",
"0.48667157",
"0.485843",
"0.48552826",
"0.48473746",
"0.4844113",
"0.48356232",
"0.48296311",
"0.48058212",
"0.47842726",
"0.47778344",
"0.4763568",
"0.47360018",
"0.47296676",
"0.47170907",
"0.47165817",
"0.47118932",
"0.47065485",
"0.47032335",
"0.46965426",
"0.4692226",
"0.46688607",
"0.46626374",
"0.46602458",
"0.46590096",
"0.4654628",
"0.46213907",
"0.46136835",
"0.46130866",
"0.46046743",
"0.4598508",
"0.45897037",
"0.4586614",
"0.4585589",
"0.4569442",
"0.4569442",
"0.45655555",
"0.4557738",
"0.45559186",
"0.4554677",
"0.4540355",
"0.45373625",
"0.4525695",
"0.45227343",
"0.4521251",
"0.45185196",
"0.4516276",
"0.451595",
"0.45139703",
"0.45103562",
"0.45069307",
"0.45037296",
"0.4497023",
"0.44935143",
"0.4493259",
"0.44914752",
"0.4482726",
"0.447328",
"0.44716123",
"0.44687584",
"0.44655463",
"0.44553107",
"0.4454583",
"0.44542792",
"0.4450988",
"0.4450988",
"0.4450988",
"0.44507965",
"0.44499415",
"0.44478416",
"0.44372883",
"0.44346535",
"0.442917"
] |
0.73937166
|
0
|
///////////////////////////////////////////////////////////////////////// Gets a HashSet of valid attributes for the gene location
|
public HashSet getValidAttributes(String szdataset) throws IOException
{
HashSet hs = new HashSet();
String xmlMessage;
String szMetaQuery ="?virtualSchema=default&type=attributes&dataset="+szdataset;
URL biomartServer = new URL(SZBIOMARTURL+szMetaQuery);
URLConnection conn = biomartServer.openConnection();
// use POST method
BufferedReader brresponse = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String szLine;
while ((szLine = brresponse.readLine())!=null)
{
StringTokenizer st = new StringTokenizer(szLine,"\t");
if (st.hasMoreTokens())
{
String szattribute = st.nextToken();
hs.add(szattribute);
}
}
brresponse.close();
return hs;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public HashSet<String> getUsefulAttributes() {\n\t\t \n\t\tHashSet<String> attr = new HashSet<>();\n\t\tQuery firstQ = this.rset.get(1); // get first query on rewriting set 'rset'.\n\t\t\n\t\tGrouping gPart = firstQ.getQueryTriple()._1();\n\t attr.addAll(gPart.getUsefulAttributes());\n\t \n\t Measuring mPart = firstQ.getQueryTriple()._2();\n\t attr.addAll(mPart.getMeasuringAttributes());\n\t \n\t\treturn attr;\n\t}",
"public String[] getRelevantAttributes();",
"Map getGenAttributes();",
"public java.util.Collection getAttributes();",
"public abstract Map getAttributes();",
"public Map<String, Set<String>> getAttributes() {\n return attributes;\n }",
"public Set<String> getAttributes() {\r\n return attributeMap.keySet();\r\n }",
"public final HashSet<Attribute> attributeSet() {\n final HashSet<Attribute> set = new HashSet<Attribute>();\n\n for (int i = 0; i < m_body.size(); i++) {\n final Condition c = m_body.get(i);\n set.add(c.getAttr());\n }\n\n return set;\n }",
"@Override\n public synchronized Set<AttributeType> getAttributes() {\n return attributes = nonNullSet(attributes, AttributeType.class);\n }",
"public Attribute[] getAvailableAttributes(){\n Attribute attributes[] = {\n TextAttribute.FAMILY,\n TextAttribute.WEIGHT,\n TextAttribute.POSTURE,\n TextAttribute.SIZE,\n\t TextAttribute.TRANSFORM,\n TextAttribute.SUPERSCRIPT,\n TextAttribute.WIDTH,\n };\n\n return attributes;\n }",
"public Map<String, String> getAttributes();",
"Map<String, String> getAttributes();",
"List<T> getAttributeSchema(){\r\n\t\treturn explanatorySet;\r\n\t}",
"public Set<String> getAllAttributes() {\r\n if (parent.isPresent()) {\r\n return Sets.union(attributeMap.keySet(), parent.get().getAllAttributes());\r\n } else {\r\n return getAttributes();\r\n }\r\n }",
"ArrayList getAttributes();",
"public int hashCode()\r\n\t{\r\n\t return attributes.hashCode();\r\n\t}",
"public Collection<HbAttributeInternal> attributes();",
"public abstract Map<String, Object> getAttributes();",
"private Hashtable getRequestedAttributes() {\n\tif (fRequestedAttributes == null) {\n\t fRequestedAttributes = new Hashtable(7, (float)0.9);\n fRequestedAttributes.put(TextAttribute.TRANSFORM,\n\t\t\t\t IDENT_TX_ATTRIBUTE);\n fRequestedAttributes.put(TextAttribute.FAMILY, name);\n fRequestedAttributes.put(TextAttribute.SIZE, new Float(size));\n\t fRequestedAttributes.put(TextAttribute.WEIGHT,\n\t\t\t\t (style & BOLD) != 0 ? \n\t\t\t\t TextAttribute.WEIGHT_BOLD :\n\t\t\t\t TextAttribute.WEIGHT_REGULAR);\n\t fRequestedAttributes.put(TextAttribute.POSTURE,\n\t\t\t\t (style & ITALIC) != 0 ? \n\t\t\t\t TextAttribute.POSTURE_OBLIQUE :\n\t\t\t\t TextAttribute.POSTURE_REGULAR);\n fRequestedAttributes.put(TextAttribute.SUPERSCRIPT,\n new Integer(superscript));\n fRequestedAttributes.put(TextAttribute.WIDTH,\n new Float(width));\n\t}\n\treturn fRequestedAttributes;\n }",
"private java.util.HashSet<String> getRedefinedDerivedAttributeTypes()\n\t{\n\t\tjava.util.HashSet<String> redefinedDerivedAttributes = new java.util.HashSet<String>();\n\t\treturn redefinedDerivedAttributes;\t}",
"private java.util.HashSet<String> getRedefinedDerivedAttributeTypes()\n\t{\n\t\tjava.util.HashSet<String> redefinedDerivedAttributes = new java.util.HashSet<String>();\n\t\treturn redefinedDerivedAttributes;\t}",
"public Map<String, Object> getAttributes();",
"public Map<String, Object> getAttributes();",
"Map<String, Object> getAttributes();",
"Map<String, Object> getAttributes();",
"Map<String, Object> getAttributes();",
"HashMap getMasterAttributes() throws BaseException;",
"public String[] getInvalidAttribute();",
"public HashMap<String, String> GetRawAttributes();",
"private static Map<String, String> filterAttributes(Map<String, String> attributes, List<String> forbidden){\n Map<String, String> filtered = new HashMap<>();\n for(String key : attributes.keySet()){\n boolean forb = false;\n for(String f : forbidden){\n if(f.equals(key)){ //filter attributes\n forb = true;\n }\n if(f.startsWith(key)){ //filter sub attributes\n forb = true;\n }\n }\n if(!forb){\n filtered.put(key, attributes.get(key));\n }\n }\n return filtered;\n }",
"public Set getOriginalAttributes() {\n\t\tSet out = new HashSet();\n\t\tfor (Iterator ci = getClasses().iterator(); ci.hasNext();) {\n\t\t\tSchemaClass cls = (SchemaClass) ci.next();\n\t\t\tfor (Iterator ai = cls.getAttributes().iterator(); ai.hasNext();) {\n\t\t\t\tSchemaAttribute att = (SchemaAttribute) ai.next();\n\t\t\t\tif (att.getOrigin() == cls) {\n\t\t\t\t\tout.add(att);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}",
"@ZAttr(id=153)\n public String[] getGalLdapAttrMap() {\n String[] value = getMultiAttr(Provisioning.A_zimbraGalLdapAttrMap); return value.length > 0 ? value : new String[] {\"co=workCountry\",\"company=company\",\"zimbraPhoneticCompany,ms-DS-Phonetic-Company-Name=phoneticCompany\",\"givenName,gn=firstName\",\"zimbraPhoneticFirstName,ms-DS-Phonetic-First-Name=phoneticFirstName\",\"sn=lastName\",\"zimbraPhoneticLastName,ms-DS-Phonetic-Last-Name=phoneticLastName\",\"displayName,cn=fullName,fullName2,fullName3,fullName4,fullName5,fullName6,fullName7,fullName8,fullName9,fullName10\",\"initials=initials\",\"description=notes\",\"l=workCity\",\"physicalDeliveryOfficeName=office\",\"ou=department\",\"street,streetAddress=workStreet\",\"postalCode=workPostalCode\",\"facsimileTelephoneNumber,fax=workFax\",\"homeTelephoneNumber,homePhone=homePhone\",\"mobileTelephoneNumber,mobile=mobilePhone\",\"pagerTelephoneNumber,pager=pager\",\"telephoneNumber=workPhone\",\"st=workState\",\"zimbraMailDeliveryAddress,zimbraMailAlias,mail=email,email2,email3,email4,email5,email6,email7,email8,email9,email10,email11,email12,email13,email14,email15,email16\",\"title=jobTitle\",\"whenChanged,modifyTimeStamp=modifyTimeStamp\",\"whenCreated,createTimeStamp=createTimeStamp\",\"zimbraId=zimbraId\",\"objectClass=objectClass\",\"zimbraMailForwardingAddress=member\",\"zimbraCalResType,msExchResourceSearchProperties=zimbraCalResType\",\"zimbraCalResLocationDisplayName=zimbraCalResLocationDisplayName\",\"zimbraCalResBuilding=zimbraCalResBuilding\",\"zimbraCalResCapacity,msExchResourceCapacity=zimbraCalResCapacity\",\"zimbraCalResFloor=zimbraCalResFloor\",\"zimbraCalResSite=zimbraCalResSite\",\"zimbraCalResContactEmail=zimbraCalResContactEmail\",\"msExchResourceSearchProperties=zimbraAccountCalendarUserType\",\"(certificate) userCertificate=userCertificate\",\"(binary) userSMIMECertificate=userSMIMECertificate\"};\n }",
"public Map<String, String> getAttributes() {\n\t\treturn atts;\n\t}",
"public Map<TextAttribute,?> getAttributes(){\n return (Map<TextAttribute,?>)getRequestedAttributes().clone();\n }",
"@java.lang.Override\n public java.util.List<google.maps.fleetengine.v1.VehicleAttribute> getAttributesList() {\n return attributes_;\n }",
"@Test\n public void requireKeysForAttributes() {\n Set<Attribute> attributes = EnumSet.copyOf(Arrays.asList(Attribute.values()));\n Set<Attribute> implementedAttributes = Arrays.stream(AttributeManager.Key.values())\n .map(AttributeManager.Key::getAttribute)\n .collect(() -> EnumSet.noneOf(Attribute.class), AbstractCollection::add, AbstractCollection::addAll);\n\n attributes.removeAll(implementedAttributes);\n\n if (!attributes.isEmpty()) {\n throw new RuntimeException(\"Some Attributes are not supported by glowstone: \" + attributes);\n }\n }",
"public Set<String> attributeKeys()\r\n\t{\r\n\t\treturn this.attributes.stringPropertyNames();\r\n\t}",
"Attributes getAttributes();",
"Iterable<? extends XomNode> attributes();",
"public Set<String> getAttributeNames();",
"@java.lang.Override\n public java.util.List<? extends google.maps.fleetengine.v1.VehicleAttributeOrBuilder> \n getAttributesOrBuilderList() {\n return attributes_;\n }",
"@Override\r\n\tpublic Map<String, Object> getAttributes() {\n\t\treturn null;\r\n\t}",
"public boolean setAttributes(Set<String> foundAttributes);",
"protected abstract boolean populateAttributes();",
"protected Collection getRemovableAttributeKeys()\r\n\t\t\tthrows IOException, ParsingException, AlgorithmExecutionException {\r\n\t\treturn CollectionUtils.subtract(edgeSchema.keySet(), NWBFileProperty.NECESSARY_EDGE_ATTRIBUTES.keySet());\r\n\t}",
"public Set getSendAltLocsSet()\r\n {\r\n if ( sendAltLocSet == null )\r\n {// TODO2 use something like a LRUMap. But current LRUMap uses maxSize\r\n // as initial hash size. This would be much to big in most cases!\r\n // Currently this HashSet has no size boundry. We would need our own\r\n // LRUMap implementation with a low initial size and a different max size.\r\n sendAltLocSet = new HashSet();\r\n }\r\n return sendAltLocSet;\r\n }",
"public Attributes[] getAllAttributes() \r\n {\r\n\tfinal Attributes[] array = new Attributes[ntMap.size()];\r\n\tint i=0;\r\n\tfor (final NodeTypeHolder nt : ntMap.values())\r\n\t array[i++] = nt.getAttributes();\r\n\treturn array;\r\n }",
"public String[] getAllAttributes() {\n\t\treturn allAttributes;\n\t}",
"@Override\n\tpublic ArrayList<Object> getAttributeList() {\n\t\tArrayList<Object> attributes = new ArrayList<Object>();\n//\t\tattributes.add(\"s2014_age\");\n//\t\tattributes.add(\"s2014_prog_skill\");\n//\t\tattributes.add(\"s2014_uni_yrs\");\n//\t\tattributes.add(\"s2014_os\");\n//\t\tattributes.add(\"s2014_progLangs\");\n//\t\tattributes.add(\"s2014_engSkill\");\n\t\tattributes.add(\"s2014_favAnimal\");\n\t\tattributes.add(\"s2014_MoreMtns\");\n//\t\tattributes.add(\"s2014_winter\");\n\t\tattributes.add(\"s2014_favColor\");\n//\t\tattributes.add(\"s2014_neuralNetwork\");\n//\t\tattributes.add(\"s2014_vectorMachine\");\n//\t\tattributes.add(\"s2014_sql\");\n//\t\tattributes.add(\"s2014_favSQLServ\");\n//\t\tattributes.add(\"s2014_apriori\");\n\t\treturn attributes;\n\t}",
"@Override\n public synchronized Set<AttributeType> getAttributeInstances() {\n return attributeInstances = nonNullSet(attributeInstances, AttributeType.class);\n }",
"public List<Pair<String, String>> getAttributes() {\n\t\treturn attributes;\n\t}",
"public Object[] getAttributes() {\n\t\treturn new Object[] {true}; //true for re-init... \n\t}",
"public List<TLAttribute> getAttributes();",
"public Map<String, String> getAttributes() {\n return Collections.unmodifiableMap(attributes);\n }",
"public final String[] getAttributes() {\n return this.attributes;\n }",
"@Override\r\n\tpublic Map<String, String> getAttributes() {\r\n\t\treturn this.attributes;\r\n\t}",
"public Map<String, String> getAttributes() {\n\t\treturn attributes;\n\t}",
"public String getAttributesetarray() {\r\n return attributesetarray;\r\n }",
"public String[] getAttributeTypeIds();",
"public static Set<AT> getGoldOnlyAts() {\n if (removeLatAts) {\n return QSets.union(getPredAts(), getLatAts());\n } else {\n log.warn(\"CAUTION: The latent variable annotations have NOT been removed.\");\n return getPredAts();\n }\n }",
"private void checkForSuperfluousAttributes(SyntaxTreeNode node,\n Attributes attrs)\n {\n QName qname = node.getQName();\n boolean isStylesheet = (node instanceof Stylesheet);\n String[] legal = _instructionAttrs.get(qname.getStringRep());\n if (versionIsOne && legal != null) {\n int j;\n final int n = attrs.getLength();\n\n for (int i = 0; i < n; i++) {\n final String attrQName = attrs.getQName(i);\n\n if (isStylesheet && attrQName.equals(\"version\")) {\n versionIsOne = attrs.getValue(i).equals(\"1.0\");\n }\n\n // Ignore if special or if it has a prefix\n if (attrQName.startsWith(\"xml\") ||\n attrQName.indexOf(':') > 0) continue;\n\n for (j = 0; j < legal.length; j++) {\n if (attrQName.equalsIgnoreCase(legal[j])) {\n break;\n }\n }\n if (j == legal.length) {\n final ErrorMsg err =\n new ErrorMsg(ErrorMsg.ILLEGAL_ATTRIBUTE_ERR,\n attrQName, node);\n // Workaround for the TCK failure ErrorListener.errorTests.error001..\n err.setWarningError(true);\n reportError(WARNING, err);\n }\n }\n }\n }",
"@Override\n\tpublic Attributes getAttributes() {\n\t\treturn (Attributes)map.get(ATTRIBUTES);\n\t}",
"@Override\n public ArrayList<SCANAttributesXML> getAttributes() {\n return mesoCfgXML.getAttributesData();\n }",
"@Override\r\n\t\tpublic boolean hasAttributes()\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}",
"public java.util.List<google.maps.fleetengine.v1.VehicleAttribute> getAttributesList() {\n if (attributesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(attributes_);\n } else {\n return attributesBuilder_.getMessageList();\n }\n }",
"public abstract Set<Genome> getAvailableGenomes();",
"public Enumeration getAttributes()\n {\n ensureLoaded();\n return m_tblAttribute.elements();\n }",
"@Override\n public Map<String, Set<String>> getRequiredAttributes() {\n return requiredAttributes;\n }",
"public List<Attribute> getAttributes() {\n return Collections.unmodifiableList(attributes);\n }",
"private Attributes getAttributes()\r\n\t{\r\n\t return attributes;\r\n\t}",
"public Set<String> getAllAttributes(Class type) {\r\n Map<String, Object> filtered = Maps.filterValues(attributeMap, Predicates.instanceOf(type));\r\n if (parent.isPresent()) {\r\n return Sets.union(filtered.keySet(), parent.get().getAllAttributes(type));\r\n } else {\r\n return filtered.keySet();\r\n }\r\n }",
"java.util.List<tendermint.abci.EventAttribute> \n getAttributesList();",
"public Map<String, Object> getAttrs();",
"boolean hasAttributes();",
"boolean hasAttributes();",
"public Set getTypeSet()\n {\n Set set = new HashSet();\n\n Iterator it = attTypeList.keySet().iterator();\n while (it.hasNext())\n {\n // Get key\n Object attrName = it.next();\n Object type = attTypeList.get(attrName);\n set.add(type);\n }\n return set;\n }",
"IAttributes getAttributes();",
"@Override\r\n\tprotected Set<String>[] getForbidSetArray() {\n\t\treturn null;\r\n\t}",
"public WSLAttributeList getAttributes() {return attributes;}",
"public String getAttributes() {\n return attributes;\n }",
"public String getAttributes() {\n return attributes;\n }",
"private boolean checkAttributes(ExportPkg ep, ImportPkg ip) {\n /* Mandatory attributes */\n if (!ip.checkMandatory(ep.mandatory)) {\n return false;\n }\n /* Predefined attributes */\n if (!ip.okPackageVersion(ep.version) ||\n (ip.bundleSymbolicName != null &&\n !ip.bundleSymbolicName.equals(ep.bpkgs.bundle.symbolicName)) ||\n !ip.bundleRange.withinRange(ep.bpkgs.bundle.version)) {\n return false;\n }\n /* Other attributes */\n for (Iterator i = ip.attributes.entrySet().iterator(); i.hasNext(); ) {\n Map.Entry e = (Map.Entry)i.next();\n String a = (String)ep.attributes.get(e.getKey());\n if (a == null || !a.equals(e.getValue())) {\n return false;\n }\n }\n return true;\n }",
"@Override\n\tpublic AttributeMap getAttributes() {\n\t\treturn defaultEdgle.getAttributes();\n\t}",
"@Override\n\t\tpublic Set<String> getAttributeNames() {\n\t\t\treturn null;\n\t\t}",
"public Attributes getAttributes() {\n\t\treturn null;\r\n\t}",
"public Map<String, String[]> getAllIdentifiantsUniques() {\n\t\tMap<String, String[]> allIdentifiantsUniques = new HashMap<>();\n\t\ttry {\n\t\t\tallIdentifiantsUniques = utilisateurDAO.selectAllIdentifiantsUniques();\n\t\t} catch (DALException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn allIdentifiantsUniques;\n\t}",
"BidiMap<String, DictionarySimpleAttribute> getUnmodifiableAttributes() {\n\t\treturn UnmodifiableBidiMap.unmodifiableBidiMap(this.attributes);\n\t}",
"public boolean hasGeneIds() {\n return fieldSetFlags()[4];\n }",
"public List<Attribute<?>> getAttributes() {\r\n\t\treturn Collections.unmodifiableList(attributes);\r\n\t}",
"public Entry[] getLookupAttributes() throws RemoteException {\n\t\treturn mgr.getAttributes();\n\t}",
"public java.util.List<? extends google.maps.fleetengine.v1.VehicleAttributeOrBuilder> \n getAttributesOrBuilderList() {\n if (attributesBuilder_ != null) {\n return attributesBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(attributes_);\n }\n }",
"public static List<String> getRequiredAttributes() {\n\t\treturn TestObject.REQUIRED_ATTRIBUTES;\n\t}",
"public ArrayList<IGeneSetElement> getGenesetElements(){\r\n\t\treturn geneSetElements;\r\n\t}",
"public abstract java.util.Set getLocations();",
"public List<String> attributes() {\n return this.attributes;\n }",
"public List<Attribute> getAttributes() {\r\n return attributes;\r\n }",
"public java.util.List<google.maps.fleetengine.v1.VehicleAttribute.Builder> \n getAttributesBuilderList() {\n return getAttributesFieldBuilder().getBuilderList();\n }",
"java.util.Map<java.lang.String, java.lang.String> getAttributesMap();",
"private void buildAttrNamesSet() {\r\n\t\tFileReader file = null;\r\n\t\tString fileName = \"data/attributesType.txt\";\r\n\r\n\t\ttry {\r\n\t\t\tfile = new FileReader(fileName);\r\n\t\t\tBufferedReader reader = new BufferedReader(file);\r\n\t\t\tString line = \"\";\r\n\t\t\twhile ((line = reader.readLine()) != null) {\r\n\t\t\t\tString strLine[] = line.split(\" \");\r\n\t\t\t\tint type = Integer.parseInt(strLine[1]);\r\n\t\t\t\thmAttrNames.put(strLine[0], new Integer(type));\r\n\t\t\t}\r\n\r\n\t\t\tfile.close();\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (NumberFormatException 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\r\n\t\t/*\r\n\t\t * // Get a set of the entries Set set = hmAttrNames.entrySet(); // Get\r\n\t\t * an iterator Iterator i = set.iterator(); // Display elements while\r\n\t\t * (i.hasNext()) { Map.Entry me = (Map.Entry) i.next();\r\n\t\t * System.out.print(me.getKey() + \": \");\r\n\t\t * System.out.println(me.getValue()); } System.out.println();\r\n\t\t */\r\n\t}",
"public Map<String, Object> getAttributesMap() {\n\t\treturn this.staticAttributes;\n\t}"
] |
[
"0.6800372",
"0.67176086",
"0.6394203",
"0.61206865",
"0.6066592",
"0.5999814",
"0.599219",
"0.59565353",
"0.594432",
"0.58729035",
"0.5850958",
"0.58471626",
"0.57826763",
"0.57629985",
"0.5748398",
"0.57368726",
"0.57350636",
"0.5714989",
"0.5712109",
"0.5687345",
"0.5687345",
"0.56797564",
"0.56797564",
"0.5630461",
"0.5630461",
"0.5630461",
"0.5613752",
"0.5599896",
"0.55849034",
"0.55760044",
"0.5574536",
"0.5556809",
"0.55495",
"0.5537536",
"0.5533495",
"0.55322224",
"0.55255383",
"0.5513372",
"0.5506387",
"0.5505528",
"0.5502541",
"0.5492681",
"0.547019",
"0.5431442",
"0.541881",
"0.5413189",
"0.5407299",
"0.5390912",
"0.5389447",
"0.5388673",
"0.53832155",
"0.5368022",
"0.5365586",
"0.5349491",
"0.5346863",
"0.5341333",
"0.5316578",
"0.5316478",
"0.5313376",
"0.5308947",
"0.5290327",
"0.528991",
"0.52742076",
"0.5265031",
"0.52639794",
"0.52594423",
"0.5253638",
"0.52516526",
"0.5250091",
"0.5242393",
"0.52410156",
"0.522825",
"0.5220593",
"0.5211305",
"0.5211305",
"0.5198248",
"0.51811355",
"0.51804394",
"0.516753",
"0.51669955",
"0.51669955",
"0.51591706",
"0.5150783",
"0.51474553",
"0.5143241",
"0.5137623",
"0.5137",
"0.51362747",
"0.5136002",
"0.5132648",
"0.5131598",
"0.51298314",
"0.5128449",
"0.51221055",
"0.5118448",
"0.5117541",
"0.51157314",
"0.511368",
"0.511329",
"0.51051813"
] |
0.6220061
|
3
|
Species is the name of the species to download the locations for. Updates npercentdone[nstatusfield] with status, first gets lock on lockpd
|
public void updateGeneFile(String species,String szoutfile,int[] npercentdone,int nstatusfield,
Object lockpd) throws IOException
{
// try opening the configuration file
BufferedReader brspecies = new BufferedReader(new FileReader(m_file));
// read line by line and try to find the species
String ln = "";
String[] fields = null;
boolean bfound = false;
while ((!bfound)&&((ln = brspecies.readLine()) != null))
{
fields = ln.split(",");
String[] szIDpre = fields[0].split("_");
// is this the right species?
if (szIDpre[0].equalsIgnoreCase(species))
{
bfound = true;
}
}
// close the file
brspecies.close();
if (!bfound)
{
//species was not found throw an errir
throw new IllegalArgumentException("The species provided - " + species + " - is not found in "+m_file);
}
if (fields.length < 2)
{
throw new IllegalArgumentException("Line "+ln+" in "+m_file+" only has one entry, no delimiting ',' found");
}
String xmlMessagePre, //The initial part of the message needed for both
xmlMessagePost, //The part of the message immediately after the query params
//These are the non-alias attributes
xmlMessageEnding, //The last part of the message needed
xmlMessageCount1, //Specifies query params where count=1
//meaning just a count of numrecords satisfying query is returned
xmlMessageCountEmpty; //Specifies query params where count is empty meaning
//the query actually returns the records
// construct the xml message for the request
xmlMessagePre = "<?xml version = \"1.0\" encoding = \"UTF-8\"?>";
xmlMessagePre += "<!DOCTYPE Query>";
xmlMessageCount1 = "<Query virtualSchemaName = \"default\" uniqueRows = \"1\" count = \"1\" softwareVersion = \"0.6\" >";
xmlMessageCountEmpty = "<Query virtualSchemaName = \"default\" uniqueRows = \"1\" count = \"\" softwareVersion = \"0.6\" >";
xmlMessagePost = "<Dataset name = \"" + fields[0] + "\" interface = \"default\" >";
xmlMessagePost += "<Attribute name = \"chromosome_name\" />";
xmlMessagePost += "<Attribute name = \"start_position\" />";
xmlMessagePost += "<Attribute name = \"end_position\" />";
xmlMessagePost += "<Attribute name = \"strand\" />";
xmlMessagePost += "<Attribute name = \"ensembl_gene_id\" />";
xmlMessageEnding = "</Dataset>";
xmlMessageEnding += "</Query>";
String xmlMessageCount = xmlMessagePre + xmlMessageCount1 + xmlMessagePost + xmlMessageEnding;
nsingleset = executeCountQuery(xmlMessageCount);
// output file writer
BufferedOutputStream bos = new BufferedOutputStream(new
GZIPOutputStream(new FileOutputStream(szoutfile)));
//write in the species name in the first line of the file
//writes the species field to the file
String szeol = System.getProperty("line.separator");
String szspecieseol = fields[1] + szeol;
byte[] lnb = szspecieseol.getBytes();
bos.write(lnb,0,lnb.length);
String xmlMessage = xmlMessagePre + xmlMessageCountEmpty + xmlMessagePost;
// messages can contain at most 3 alias attributes
// if we have more than that, need too break
// up into several requests
boolean run_last = true;
nline = 0; //we haven't read any lines yet
String query;
HashSet hsvalidAttributes = getValidAttributes(fields[0]);
// add in species-specific gene ids
if (fields.length > 2)
{
String[] aliases = fields[2].split(":");
numrecs = nsingleset*((int) Math.ceil(aliases.length/(double)NMAXATTR));
query = xmlMessage;
for (int i = 0; i < aliases.length; i++)
{
if (hsvalidAttributes.contains(aliases[i]))
{
query += "<Attribute name = \"" + aliases[i] + "\" />";
// a query is being constructed. It might
// need to be run through the last request
run_last = true;
if (i % NMAXATTR == (NMAXATTR-1))
{
//last alias attribute of the query, going to execute it
query += xmlMessageEnding;
// close the xml doc
executeQuery(bos, query,npercentdone,nstatusfield,lockpd);
// reset query for reuse
query = xmlMessage;
// all attributes so far have been processed
// no need to run the last request
run_last = false;
}
}
}
}
else
{
query = xmlMessage;
}
// last request. Picks up everything not processed by loop above.
// including if the loop above wasn't executed at all because
// there were no extra aliases to query.
if (run_last)
{
query += xmlMessageEnding;
executeQuery(bos, query,npercentdone,nstatusfield,lockpd);
}
// close the xml doc
bos.close();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void\n\tcheck99PercentBug()\n\t{\n\n\t\tif ( mainloop_loop_count % MAINLOOP_SIXTY_SECOND_INTERVAL == 0 ) {\n\n\t\t\tlong\tnow = SystemTime.getCurrentTime();\n\n\t\t\tfor ( int i=0;i<pePieces.length;i++){\n\n\t\t\t\tPEPiece\tpe_piece = pePieces[ i ];\n\n\t\t\t\tif ( pe_piece != null ){\n\n\t\t\t\t\tDiskManagerPiece\tdm_piece = dm_pieces[i];\n\n\t\t\t\t\tif ( !dm_piece.isDone()){\n\n\t\t\t\t\t\tif ( pe_piece.isDownloaded()){\n\n\t\t\t\t\t\t\tif ( now - pe_piece.getLastDownloadTime(now) > stalled_piece_timeout ){\n\n\t\t\t\t\t\t\t\t// people with *very* slow disk writes can trigger this (I've been talking to a user\n\t\t\t\t\t\t\t\t// with a SAN that has .5 second write latencies when checking a file at the same time\n\t\t\t\t\t\t\t\t// this means that when dowloading > 32K/sec things start backing up). Eventually the\n\t\t\t\t\t\t\t\t// write controller will start blocking the network thread to prevent unlimited\n\t\t\t\t\t\t\t\t// queueing but until that time we need to handle this situation slightly better)\n\n\t\t\t\t\t\t\t\t// if there are any outstanding requests for this piece then leave it alone\n\n\t\t\t\t\t\t\t\tif ( !( disk_mgr.hasOutstandingWriteRequestForPiece( i ) || \n\t\t\t\t\t\t\t\t\t\tdisk_mgr.hasOutstandingReadRequestForPiece( i ) ||\n\t\t\t\t\t\t\t\t\t\tdisk_mgr.hasOutstandingCheckRequestForPiece( i ) )){\n\n\t\t\t\t\t\t\t\t\tDebug.out( \"Fully downloaded piece stalled pending write, resetting p_piece \" + i );\n\n\t\t\t\t\t\t\t\t\tpe_piece.reset();\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\n\t\t\t}\n\t\t}\n\t}",
"private void updateUnitStatus() {\r\n\t\tint b1 = Sense_NotReady;\r\n\t\tif (this.tapeIo != null) {\r\n\t\t\tb1 = Sense_Ready;\r\n\t\t\tb1 |= (this.currentBlock == this.headLimit) ? Sense_AtLoadPoint : 0;\r\n\t\t\tb1 |= (this.isReadonly) ? Sense_FileProtected : 0;\r\n\t\t}\r\n\t\tthis.senseBytes[1] = (byte)((b1 >> 16) & 0xFF);\r\n\t\t\r\n\t\tint b4 = (this.currentBlock == this.tailLimit) ? Sense_EndOfTape : 0;\r\n\t\tthis.senseBytes[4] = (byte)( ((b4 >> 8) & 0xF0) | (this.senseBytes[4] & 0x0F) );\r\n\t}",
"public void updatePercentComplete(String step) {\n\t\tif (step2ProgressMap.containsKey(step)) {\n\t\t\tthis.percentComplete = step2ProgressMap.get(step);\n\t\t}\n\t}",
"boolean requestProgress(double progress, ObjectIdentifier oid, PropertyIdentifier pid, UnsignedInteger pin,\n Encodable value);",
"@Override\n public void progress(FileStatus status) {\n progressReporter.progress();\n }",
"public void executeQuery(BufferedOutputStream bos, String xmlMessage,\n int[] npercentdone,int nstatusfield, Object lockpd) throws IOException \n {\n\n URL biomartServer = new URL(SZBIOMARTURL);\n URLConnection conn = biomartServer.openConnection();\n\t\n // use POST method\n conn.setDoOutput(true);\n OutputStreamWriter osw = new OutputStreamWriter(conn.getOutputStream());\n osw.write(\"query=\" + URLEncoder.encode(xmlMessage, \"UTF-8\"));\n osw.flush(); \n\t\n // read the response into a file\n BufferedReader brresponse = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n\t\n String ln;\n int nlastpercentdone = 0;\n int nleft = nsingleset;\n String szeol = System.getProperty(\"line.separator\");\n while ((ln = brresponse.readLine()) != null) \n {\n String lnend = ln+szeol;\n\t if (lnend.startsWith(\"Query ERROR\"))\n\t {\n\t //not going to bail just because cannot get locations\n\t System.out.println(\"Gene Location Download Error: \"+lnend);\n\t }\n\t byte[] lnb = lnend.getBytes();\n bos.write(lnb,0,lnb.length);\n \n if (nleft > 0)\n\t {\n\t //the actual number of lines can be greater than the number of records\n\t //we will not count these extra lines\n\t nleft--;\n\t nline++;\n }\n\n\t synchronized (lockpd)\n\t {\n\t int nval = (int) (100*nline/(double) numrecs);\n\t if (nval <= 99)\n\t {\n\t\t//we don't want to display 100, because we are not really done\n\t npercentdone[nstatusfield] =nval;\n\t if ((nlastpercentdone != npercentdone[nstatusfield]))\n\t {\n\t\t //only notify interface if percentage has changed\n nlastpercentdone = npercentdone[nstatusfield];\n lockpd.notifyAll();\n \t }\n\t }\n\t } \n }\n\t\n brresponse.close();\n osw.close();\n }",
"public void updateProgress(Land land){\n String wiltedString = \"[ wilted ]\";\n StringBuilder progressBar = new StringBuilder();\n String percentageCompleted = \"\";\n int finalStatus = land.getCurrentStatus();\n\n if (land.getCropName() != null){\n Crop crop = cropDAO.retrieveCrop(land.getCropName());\n double timeToGrow = crop.getTime();\n\n Date plantTime = land.getPlantTime();\n Date finishedTime = land.getFinishedTime();\n Date witherTime = land.getWitherTime();\n Date timeNow = new Date();\n\n int timeAfterWilt = (int) (timeNow.getTime() - witherTime.getTime());\n int timeAfterFinished = (int) (timeNow.getTime() - finishedTime.getTime());\n// double timeElapsed =(double) (timeNow.getTime() - plantTime.getTime());\n double timeElapsed =(double) ((timeNow.getTime() - plantTime.getTime()) / 60000);\n\n if (timeAfterWilt > 0){ //withered\n land.setCurrentStatus(-1);\n finalStatus = -1;\n progressBar = new StringBuilder(wiltedString);\n } else if (timeAfterFinished > 0 ){\n land.setCurrentStatus(2);\n finalStatus = 2;\n progressBar = new StringBuilder(\"[##########]\");\n percentageCompleted = \"100%\";\n } else {\n double percentage = (timeElapsed / timeToGrow )* 100;\n int intPercentage = (int) percentage;\n percentageCompleted = intPercentage + \"%\";\n progressBar = new StringBuilder(\"[\");\n int display = intPercentage/10 ;\n for (int i =1; i<= 10; i++){\n if (i <= display){\n progressBar.append(\"#\");\n } else {\n progressBar.append(\"-\");\n }\n }\n progressBar.append(\"]\");\n }\n }\n\n String finalProgressBar = progressBar + \" \"+ percentageCompleted;\n land.setProgressBar(finalProgressBar);\n\n Connection conn = controller.getConnection();\n PreparedStatement stmt = null;\n String sql = \"UPDATE magnet.land SET currentStatus = ?, progressBar = ? WHERE owner = ? AND plotNumber = ?;\";\n\n try {\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, finalStatus);\n stmt.setString(2, finalProgressBar);\n stmt.setString(3, land.getOwner());\n stmt.setInt(4, land.getPlotNumber());\n stmt.executeUpdate();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void progress(FileStatus status) {\n progressReporter.progress();\n }",
"void progress(int pUnitsCompleted);",
"public synchronized void updateProgress(boolean completedOK) {\n\n if (completedOK) mCompletedOKCount++;\n\n mCompletedCount++;\n\n double total = mMusicObjectList.size();\n double count = mCompletedCount;\n int percent = (int) ((count / total) * 100d);\n\n mDownloadListener.onUpdate(percent);\n }",
"@Override\n\tprotected void updateOtherProgress() {\n\t\t\n\t\ttempList.clear();\n\t\titeration++;\n\t\tJMetalLogger.logger.info(iteration + \" iteration...\");\n\t\t\n//\t\ttry {\n//\t\t\tnew SolutionListOutput(getPopulation()).printObjectivesToFile(\"results/media/FUN\"+iteration+\".tsv\");\n//\t\t} catch (IOException e) {\n//\t\t\te.printStackTrace();\n//\t\t}\n\t}",
"public void updateProgress(int remaining, int total) {\n try {\n setProgress.invoke(bossBar, ((double) remaining) / ((double) total));\n } catch (IllegalAccessException | InvocationTargetException ex) {\n Bukkit.getLogger().log(Level.SEVERE, \"An error occurred while updating boss bar progress, are you using Minecraft 1.9 or higher?\", ex);\n }\n }",
"public void setPercentComplete(double percentComplete) {\n\t\t\n\t}",
"public void updateSpecies (String treeSpeciesName, int crownShape,\r\n\t\t\t\t\t\t\t\tdouble ellipsoidTruncationRatio, \r\n\t\t\t\t\t\t\t\tdouble heightDbhAllometricCoeffA, double heightDbhAllometricCoeffB,\r\n\t\t\t\t\t\t\t\tdouble crownDbhAllometricCoeffA, double crownDbhAllometricCoeffB,\r\n\t\t\t\t\t\t\t\tdouble stemDbhAllometricCoeffA, double stemDbhAllometricCoeffB, double stemDbhAllometricCoeffC, \r\n\t\t\t\t\t\t\t\tdouble dcbFromDbhAllometricCoeff,\r\n\t\t\t\t\t\t\t\tdouble stumpToStemBiomassRatio,\r\n\t\t\t\t\t\t\t\tdouble cRAreaToFRLengthRatio, \r\n\t\t\t\t\t\t\t\tdouble initialTargetLfrRatio,\r\n\t\t\t\t\t\t\t\tdouble leafAreaCrownVolCoefA, double leafAreaCrownVolCoefB,\r\n\t\t\t\t\t\t\t\tdouble woodAreaDensity, double leafParAbsorption, double leafNirAbsorption, double clumpingCoef,\r\n\t\t\t\t\t\t\t\tint phenologyType,\r\n\t\t\t\t\t\t\t\tint budBurstTempAccumulationDateStart,\r\n\t\t\t\t\t\t\t\tdouble budBurstTempThreshold,\r\n\t\t\t\t\t\t\t\tdouble budBurstAccumulatedTemp,\r\n\t\t\t\t\t\t\t\tint leafExpansionDuration,\r\n\t\t\t\t\t\t\t\tint budBurstToLeafFallDuration,\r\n\t\t\t\t\t\t\t\tint leafFallDuration,\r\n\t\t\t\t\t\t\t\tdouble leafFallFrostThreshold,\r\n\t\t\t\t\t\t\t\tint budBurstDelayMinAfterPollaring,\r\n\t\t\t\t\t\t\t\tint budBurstDelayMaxAfterPollaring,\r\n\t\t\t\t\t\t\t\tdouble stemFlowCoefficient,\r\n\t\t\t\t\t\t\t\tdouble stemFlowMax,\r\n\t\t\t\t\t\t\t\tdouble wettability,\r\n\t\t\t\t\t\t\t\tdouble transpirationCoefficient,\r\n\t\t\t\t\t\t\t\tdouble lueMax,\r\n\t\t\t\t\t\t\t\tint leafAgeForLueMax,\r\n\t\t\t\t\t\t\t\tdouble leafSenescenceTimeConstant,\r\n\t\t\t\t\t\t\t\tdouble leafCarbonContent,\r\n\t\t\t\t\t\t\t\tdouble leafMassArea,\r\n\t\t\t\t\t\t\t\tdouble luxuryNCoefficient,\r\n\t\t\t\t\t\t\t\tdouble targetNCoefficient,\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tdouble rootNRemobFraction,\r\n\t\t\t\t\t\t\t\tdouble leafNRemobFraction,\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tdouble targetNSCFraction,\r\n\t\t\t\t\t\t\t\tdouble maxNSCUseFraction,\r\n\t\t\t\t\t\t\t\tdouble maxNSCUseFoliageFraction,\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tint rsStressMethod,\r\n\t\t\t\t\t\t\t\tint lueStressMethod,\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tdouble rsNoStressResponsiveness,\r\n\t\t\t\t\t\t\t\tdouble rsWaterStressResponsiveness,\r\n\t\t\t\t\t\t\t\tdouble rsNitrogenStressResponsiveness,\r\n\t\t\t\t\t\t\t\tdouble lueWaterStressResponsiveness,\r\n\t\t\t\t\t\t\t\tdouble lueNitrogenStressResponsiveness,\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tdouble maxTargetLfrRatioDailyVariation,\r\n\t\t\t\t\t\t\t\tdouble targetLfrRatioUpperDrift,\r\n\t\t\t\t\t\t\t\tdouble minTargetLfrRatio,\r\n\t\t\t\t\t\t\t\tdouble maxTargetLfrRatio,\r\n\t\t\t\t\t\t\t\tdouble optiNCBranch,\r\n\t\t\t\t\t\t\t\tdouble optiNCCoarseRoot,\r\n\t\t\t\t\t\t\t\tdouble optiNCFineRoot,\r\n\t\t\t\t\t\t\t\tdouble optiNCFoliage,\r\n\t\t\t\t\t\t\t\tdouble optiNCStem,\r\n\t\t\t\t\t\t\t\tdouble optiNCStump,\r\n\t\t\t\t\t\t\t\tdouble woodDensity,\r\n\t\t\t\t\t\t\t\tdouble branchVolumeRatio,\r\n\t\t\t\t\t\t\t\tdouble woodCarbonContent,\r\n\t\t\t\t\t\t\t\tdouble maxCrownRadiusInc,\r\n\t\t\t\t\t\t\t\tdouble maxHeightInc,\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tdouble imbalanceThreshold,\r\n\t\t\t\t\t\t\t\tdouble leafSenescenceRate,\r\n\t\t\t\t\t\t\t\tdouble coarseRootAnoxiaResistance,\r\n\t\t\t\t\t\t\t\tdouble specificRootLength,\r\n\t\t\t\t\t\t\t\tdouble colonisationThreshold,\r\n\t\t\t\t\t\t\t\tdouble colonisationFraction,\r\n\t\t\t\t\t\t\t\tdouble fineRootLifespan,\r\n\t\t\t\t\t\t\t\tdouble fineRootAnoxiaLifespan,\r\n\t\t\t\t\t\t\t\tdouble horizontalPreference,\r\n\t\t\t\t\t\t\t\tdouble geotropismFactor,\r\n\t\t\t\t\t\t\t\tdouble localWaterUptakeFactor,\r\n\t\t\t\t\t\t\t\tdouble sinkDistanceEffect,\r\n\t\t\t\t\t\t\t\tdouble localNitrogenUptakeFactor,\r\n\t\t\t\t\t\t\t\tint coarseRootTopologyType,\r\n\t\t\t\t\t\t\t\tdouble rootDiameter, double rootConductivity,\r\n\t\t\t\t\t\t\t\tdouble alpha,\r\n\t\t\t\t\t\t\t\tdouble minTranspirationPotential,double maxTranspirationPotential,\r\n\t\t\t\t\t\t\t\tdouble bufferPotential, double longitudinalResistantFactor) {\r\n\r\n\t\tthis.name = treeSpeciesName;\r\n\t\tthis.crownShape = crownShape;\r\n\t\tthis.ellipsoidTruncationRatio = ellipsoidTruncationRatio;\r\n\t\tthis.heightDbhAllometricCoeffA = heightDbhAllometricCoeffA;\r\n\t\tthis.heightDbhAllometricCoeffB = heightDbhAllometricCoeffB;\r\n\t\tthis.crownDbhAllometricCoeffA = crownDbhAllometricCoeffA;\r\n\t\tthis.crownDbhAllometricCoeffB = crownDbhAllometricCoeffB;\r\n\t\tthis.stemDbhAllometricCoeffA = stemDbhAllometricCoeffA;\r\n\t\tthis.stemDbhAllometricCoeffB = stemDbhAllometricCoeffB;\r\n\t\tthis.stemDbhAllometricCoeffC = stemDbhAllometricCoeffC;\r\n\t\tthis.dcbFromDbhAllometricCoeff = dcbFromDbhAllometricCoeff;\r\n\t\tthis.stumpToStemBiomassRatio = stumpToStemBiomassRatio;\r\n\t\tthis.cRAreaToFRLengthRatio = cRAreaToFRLengthRatio;\r\n\t\tthis.initialTargetLfrRatio = initialTargetLfrRatio; \r\n\t\tthis.leafAreaCrownVolCoefA = leafAreaCrownVolCoefA;\r\n\t\tthis.leafAreaCrownVolCoefB = leafAreaCrownVolCoefB;\r\n\t\tthis.woodAreaDensity = woodAreaDensity;\r\n\t\tthis.leafParAbsorption = leafParAbsorption;\r\n\t\tthis.leafNirAbsorption = leafNirAbsorption;\r\n\t\tthis.clumpingCoef = clumpingCoef;\r\n\t\tthis.phenologyType = phenologyType;\r\n\t\tthis.budBurstTempAccumulationDateStart = budBurstTempAccumulationDateStart;\r\n\t\tthis.budBurstTempThreshold = budBurstTempThreshold;\r\n\t\tthis.budBurstAccumulatedTemp = budBurstAccumulatedTemp;\r\n\t\tthis.leafExpansionDuration = leafExpansionDuration;\r\n\t\tthis.budBurstToLeafFallDuration = budBurstToLeafFallDuration;\r\n\t\tthis.leafFallDuration = leafFallDuration;\r\n\t\tthis.leafFallFrostThreshold = leafFallFrostThreshold;\r\n\t\tthis.budBurstDelayMinAfterPollaring = budBurstDelayMinAfterPollaring;\r\n\t\tthis.budBurstDelayMaxAfterPollaring = budBurstDelayMaxAfterPollaring;\r\n\t\tthis.stemFlowCoefficient = stemFlowCoefficient;\r\n\t\tthis.stemFlowMax = stemFlowMax;\r\n\t\tthis.wettability = wettability;\r\n\t\tthis.transpirationCoefficient = transpirationCoefficient;\r\n\t\tthis.lueMax = lueMax;\r\n\t\tthis.leafAgeForLueMax = leafAgeForLueMax;\r\n\t\tthis.leafSenescenceTimeConstant = leafSenescenceTimeConstant;\r\n\t\tthis.leafCarbonContent = leafCarbonContent;\r\n\t\tthis.leafMassArea = leafMassArea;\r\n\t\tthis.luxuryNCoefficient = luxuryNCoefficient;\r\n\t\tthis.targetNCoefficient = targetNCoefficient;\r\n\t\tthis.rootNRemobFraction = rootNRemobFraction;\r\n\t\tthis.leafNRemobFraction = leafNRemobFraction;\r\n\t\tthis.targetNSCFraction = targetNSCFraction;\r\n\t\tthis.maxNSCUseFraction = maxNSCUseFraction;\r\n\t\tthis.maxNSCUseFoliageFraction = maxNSCUseFoliageFraction;\r\n\t\tthis.rsNoStressResponsiveness = rsNoStressResponsiveness;\r\n\t\tthis.rsWaterStressResponsiveness = rsWaterStressResponsiveness;\r\n\t\tthis.rsNitrogenStressResponsiveness = rsNitrogenStressResponsiveness;\r\n\t\tthis.lueWaterStressResponsiveness = lueWaterStressResponsiveness;\r\n\t\tthis.lueNitrogenStressResponsiveness = lueNitrogenStressResponsiveness;\r\n\t\tthis.maxTargetLfrRatioDailyVariation = maxTargetLfrRatioDailyVariation;\r\n\t\tthis.targetLfrRatioUpperDrift = targetLfrRatioUpperDrift;\r\n\t\tthis.minTargetLfrRatio = minTargetLfrRatio;\r\n\t\tthis.maxTargetLfrRatio = maxTargetLfrRatio;\r\n\t\tthis.optiNCBranch = optiNCBranch;\r\n\t\tthis.optiNCCoarseRoot = optiNCCoarseRoot;\r\n\t\tthis.optiNCFineRoot = optiNCFineRoot;\r\n\t\tthis.optiNCFoliage = optiNCFoliage;\r\n\t\tthis.optiNCStem = optiNCStem;\r\n\t\tthis.optiNCStump = optiNCStump;\r\n\t\tthis.woodDensity = woodDensity;\r\n\t\tthis.branchVolumeRatio = branchVolumeRatio;\r\n\t\tthis.woodCarbonContent = woodCarbonContent;\t\r\n\t\tthis.maxCrownRadiusInc = maxCrownRadiusInc;\r\n\t\tthis.maxHeightInc = maxHeightInc;\r\n\t\tthis.leafSenescenceRate = leafSenescenceRate;\r\n\t\tthis.imbalanceThreshold= imbalanceThreshold;\r\n\t\tthis.specificRootLength = specificRootLength;\r\n\t\tthis.coarseRootAnoxiaResistance=coarseRootAnoxiaResistance;\r\n\t\tthis.colonisationThreshold = colonisationThreshold;\r\n\t\tthis.colonisationFraction = colonisationFraction;\r\n\t\tthis.fineRootLifespan= fineRootLifespan;\r\n\t\tthis.fineRootAnoxiaLifespan = fineRootAnoxiaLifespan;\r\n\t\tthis.horizontalPreference= horizontalPreference;\r\n\t\tthis.geotropismFactor= geotropismFactor;\r\n\t\tthis.localWaterUptakeFactor = localWaterUptakeFactor;\r\n\t\tthis.sinkDistanceEffect = sinkDistanceEffect;\r\n\t\tthis.localNitrogenUptakeFactor = localNitrogenUptakeFactor;\r\n\t\tthis.coarseRootTopologyType = coarseRootTopologyType;\r\n\t\tthis.treeRootDiameter = rootDiameter;\r\n\t\tthis.treeRootConductivity = rootConductivity;\r\n\t\tthis.treeAlpha = alpha;\r\n\t\tthis.treeMinTranspirationPotential = minTranspirationPotential;\r\n\t\tthis.treeMaxTranspirationPotential = maxTranspirationPotential;\r\n\t\tthis.treeBufferPotential = bufferPotential;\r\n\t\tthis.treeLongitudinalResistantFactor = longitudinalResistantFactor;\r\n\t}",
"public int getJobStatus(int jNo);",
"private void updateStatus(boolean success) {\n if (success) {\n try {\n callSP(buildSPCall(MODIFY_STATUS_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error updating dataset_system_log with modify entries. \", exception);\n }\n\n try {\n callSP(buildSPCall(COMPLETE_STATUS_PROC, success));\n } catch (SQLException exception) {\n logger.error(\"Error updating dataset_system_log with for merge completion. \",\n exception);\n }\n } else {\n try {\n callSP(buildSPCall(COMPLETE_STATUS_PROC, success));\n } catch (SQLException exception) {\n logger.error(\"Error updating dataset_system_log with for merge completion. \",\n exception);\n }\n }\n }",
"public void setOverallProgressPercent(int value) {\n this.overallProgressPercent = value;\n }",
"void reportProgress(List<Node> update);",
"private void updateProgress(String progressLabel, int progress) {\n if (myHost != null) {\n myHost.updateProgress(progressLabel, progress);\n } else {\n System.out.println(progressLabel + \" \" + progress + \"%\");\n }\n }",
"private void updateProgressBar() {\n\t\tdouble current = model.scannedCounter;\n\t\tdouble total = model.fileCounter;\n\t\tdouble percentage = (double)(current/total);\n\t\t\n\t\t//Update Progress indicators\n\t\ttxtNumCompleted.setText((int) current + \" of \" + (int) total + \" Completed (\" + Math.round(percentage*100) + \"%)\");\n\t\tprogressBar.setProgress(percentage);\n\t}",
"public void testSetSubmissionStatus() throws Exception {\r\n Date startTime = new Date();\r\n for (int i = 0; i < 100; ++i) {\r\n services.setSubmissionStatus(100 + i, 1, \"tc\");\r\n }\r\n\r\n Date endTime = new Date();\r\n\r\n System.out.println(\"Executing setSubmissionStatus for 100 times takes \"\r\n + (endTime.getTime() - startTime.getTime()) + \" milliseconds\");\r\n\r\n }",
"public void updateProgress (Session connect)\n {\n String req = \"from \" + ProgressData.class.getSimpleName () + \" where smd='\" + this.id + \"' and finished=false\";\n List<ProgressData> lst = connect.createQuery (req).list ();\n\n SiteSMD site = SiteSMD.findById (connect, this.id);\n if (lst.isEmpty ()) {\n site.setHave_a_probleme (false);\n connect.update (site);\n }\n else {\n site.setHave_a_probleme (true);\n connect.update (site);\n }\n\n }",
"public Long getProgressDone();",
"com.lvl6.proto.EventQuestProto.QuestProgressResponseProto.QuestProgressStatus getStatus();",
"protected void updateProgress(Integer progress) {\n // Note to self: We don't bother updating the local \"job\" batch data\n batchService.updateBatchJobProgress(jobContext.getInstanceId(), progress);\n }",
"private void updateTaskActivityLabel()\r\n {\r\n setLabelValue(\"Tile Downloads \" + myActiveQueryCounter.intValue());\r\n setProgress(myDoneQueryCounter.doubleValue() / myTotalSinceLastAllDoneCounter.doubleValue());\r\n }",
"public void done(Integer percentDone) {\n if (percentDone == 100) {\n mApp.updateDialogProgress(percentDone, \"Finishing..\");\n } else {\n mApp.updateDialogProgress(percentDone, \"Uploading: \" + percentDone + \"%\");\n }\n }",
"@CrossOrigin\n\t@RequestMapping(value=\"/waitForPercentComplete\", method= RequestMethod.POST)\n\tpublic JSONObject waitForPercentComplete(@RequestBody StatusRequestBodyPercentMsec requestBody, @RequestHeader HttpHeaders headers) {\n\t\tHeadersManager.setHeaders(headers);\n\t try {\n\t \tString jobId = requestBody.jobId;\n\t \n\t \n\t\t SimpleResultSet res = new SimpleResultSet();\n\t\t LoggerRestClient logger = LoggerRestClient.getInstance(log_prop);\n\t \tLoggerRestClient.easyLog(logger, \"Status Service\", \"waitForPercentComplete start\", \"JobId\", jobId);\n\t \tLocalLogger.logToStdOut(\"Status Service waitForPercentComplete \" + requestBody.percentComplete + \"% JobId=\" + jobId);\n\t \t\n\t \t\n\t\t try {\n\t\t \tJobTracker tracker = this.getTracker();\n\t\t \ttracker.waitForPercentComplete(jobId, requestBody.percentComplete, requestBody.maxWaitMsec);\n\t\t\t res.setSuccess(true);\n\t\t\t \n\t\t } catch (Exception e) {\n\t\t \tres.setSuccess(false);\n\t\t \tres.addRationaleMessage(SERVICE_NAME, \"waitForPercentComplete\", e);\n\t\t\t LoggerRestClient.easyLog(logger, \"Status Service\", \"waitForPercentComplete exception\", \"message\", e.toString());\n\t\t\t LocalLogger.logToStdOut(\"Status Service waitForPercentComplete exception message=\" + e.toString());\n\t\t } \t\t \n\t\t return res.toJson();\n\t\t \n\t\t} finally {\n\t \tHeadersManager.clearHeaders();\n\t }\n\t}",
"public void checkProgress() {\n\t\tupdateBitfield();\n\t\tlog(\"Checking progress...\");\n\t\tFileInfo[] fileinfo = files.getFiles();\n\t\tfor (int i = 0; i < fileinfo.length; i++) {\n\t\t\tFileInfo info = fileinfo[i];\n\t\t\tRandomAccessFile file = info.getFileAcces();\n\t\t\ttry {\n\t\t\t\tif (file.length() > 0L) {\n\t\t\t\t\tint pieceIndex = (int) (info.getFirstByteOffset() / files.getPieceSize());\n\t\t\t\t\tint lastPieceIndex = pieceIndex + info.getPieceCount();\n\t\t\t\t\tfor (; pieceIndex < lastPieceIndex; pieceIndex++) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (files.getPiece(pieceIndex).checkHash()) {\n\t\t\t\t\t\t\t\t// log(\"Progress Check: Have \" + pieceIndex);\n\t\t\t\t\t\t\t\tif (torrentStatus == STATE_DOWNLOAD_DATA) {\n\t\t\t\t\t\t\t\t\tbroadcastHave(pieceIndex);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tfiles.havePiece(pieceIndex);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t}\n\t\t}\n\t\tlog(\"Checking progress done\");\n\t}",
"private void setUpProgressBar() {\n DatabaseHelper database = new DatabaseHelper(this);\n Cursor cursor = database.getAllDataForScavengerHunt();\n\n int totalLocationCount = 0;\n double visitedCount = 0;\n\n while (cursor.moveToNext()) {\n totalLocationCount++;\n int visited = cursor.getInt(cursor.getColumnIndex(database.COL_VISITED));\n if (visited == 1) visitedCount++;\n }\n\n int progress = (int) (visitedCount / totalLocationCount * 100);\n ProgressBar progressBar = findViewById(R.id.progress);\n TextView progressText = findViewById(R.id.progress_text);\n progressBar.setProgress(progress);\n progressText.setText(\" \" + progress + \"%\");\n }",
"public void updateProgress( int pagesPrinted );",
"public int percentSaveDone() {\n if (isSaveDone()) {\n return 100;\n }\n return percent;\n }",
"private void updateRoadStatus() {\n for (Road r : e.getRoadDirectory().getRoadList()) {\n if (destination.toLowerCase().contains(r.getRoadName().toLowerCase())) {\n roadNamejTextField.setText(r.getRoadName());\n }\n break;\n }\n for (Sensor data : e.getSensorDataDirectory().getSensorDataList()) {\n if (destination.toLowerCase().contains(data.getSensorStreetName().toLowerCase())) {\n roadStatusjTextField.setText(data.getSensorRoadStatus());\n weatherjTextField.setText(data.getSensorWeatherStatus());\n trafficjTextField.setText(data.getSensorTraffic());\n break;\n }\n }\n }",
"public void setDone(){\n this.status = \"Done\";\n }",
"void updateHouseStatus(String username, long houseId, int status);",
"@Test\n public void testSetPercentComplete_1()\n throws Exception {\n ScriptProgressContainer fixture = new ScriptProgressContainer(1, \"\");\n int percentComplete = 1;\n\n fixture.setPercentComplete(percentComplete);\n\n }",
"private void updateCompletionTime()\n\t{\n\t\tfor (Map.Entry<Tab, Set<FarmingPatch>> tab : farmingWorld.getTabs().entrySet())\n\t\t{\n\t\t\tlong extremumCompletionTime = config.preferSoonest() ? Long.MAX_VALUE : 0;\n\t\t\tboolean allUnknown = true;\n\t\t\tboolean allEmpty = true;\n\n\t\t\tfor (FarmingPatch patch : tab.getValue())\n\t\t\t{\n\t\t\t\tPatchPrediction prediction = predictPatch(patch);\n\t\t\t\tif (prediction == null || prediction.getProduce().getItemID() < 0)\n\t\t\t\t{\n\t\t\t\t\tcontinue; // unknown state\n\t\t\t\t}\n\n\t\t\t\tallUnknown = false;\n\n\t\t\t\tif (prediction.getProduce() != Produce.WEEDS && prediction.getProduce() != Produce.SCARECROW)\n\t\t\t\t{\n\t\t\t\t\tallEmpty = false;\n\n\t\t\t\t\t// update max duration if this patch takes longer to grow\n\t\t\t\t\tif (config.preferSoonest())\n\t\t\t\t\t{\n\t\t\t\t\t\textremumCompletionTime = Math.min(extremumCompletionTime, prediction.getDoneEstimate());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\textremumCompletionTime = Math.max(extremumCompletionTime, prediction.getDoneEstimate());\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfinal SummaryState state;\n\t\t\tfinal long completionTime;\n\n\t\t\tif (allUnknown)\n\t\t\t{\n\t\t\t\tstate = SummaryState.UNKNOWN;\n\t\t\t\tcompletionTime = -1L;\n\t\t\t}\n\t\t\telse if (allEmpty)\n\t\t\t{\n\t\t\t\tstate = SummaryState.EMPTY;\n\t\t\t\tcompletionTime = -1L;\n\t\t\t}\n\t\t\telse if (extremumCompletionTime <= Instant.now().getEpochSecond())\n\t\t\t{\n\t\t\t\tstate = SummaryState.COMPLETED;\n\t\t\t\tcompletionTime = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tstate = SummaryState.IN_PROGRESS;\n\t\t\t\tcompletionTime = extremumCompletionTime;\n\t\t\t}\n\t\t\tsummaries.put(tab.getKey(), state);\n\t\t\tcompletionTimes.put(tab.getKey(), completionTime);\n\t\t}\n\t}",
"public void progressMade();",
"@IcalProperty(pindex = PropertyInfoIndex.PERCENT_COMPLETE,\n jname = \"percentComplete\",\n todoProperty = true)\n public void setPercentComplete(final Integer val) {\n percentComplete = val;\n }",
"void updateHouseStatus(long houseId, int status);",
"private void reportPercent(int i)\n\t{\n\t\tif(i == fileArray.length / 100 * percent)\n\t\t{\n\t\t\tmainWindow.setProgress(percent);\n\t\t\tpercent++;\n\t\t}\n\t}",
"public void setUpdatingTaskStatusUpdatesResourceStatus(boolean flag)\r\n {\r\n m_updatingTaskStatusUpdatesResourceStatus = flag;\r\n }",
"protected void downloadMapFile() {\n\t\tDDownload = new javax.swing.JDialog(window, \"Download maps\");\n\t\tPBarDownload = new javax.swing.JProgressBar(0, filesEns.length);\n\t\tPBarDownload.setValue(0);\n\t\tPBarDownload.setMaximum(filesEns.length);\n\t\tPBarDownload.setStringPainted(true);\n\n\t\tjLabel7 = new javax.swing.JLabel();\n\t\tjLabel7.setText(\"Download in progress...\");\n\n\t\t\n\t\t/*\n\t\t * Display the DDownload frame layout\n\t\t */\n\t\tjavax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(\n\t\t\t\tDDownload.getContentPane());\n\t\tDDownload.getContentPane().setLayout(jDialog1Layout);\n\t\tjDialog1Layout\n\t\t\t\t.setHorizontalGroup(jDialog1Layout\n\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tjDialog1Layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tjDialog1Layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tPBarDownload,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjDialog1Layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel7)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)))\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()));\n\t\tjDialog1Layout\n\t\t\t\t.setVerticalGroup(jDialog1Layout\n\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.TRAILING,\n\t\t\t\t\t\t\t\tjDialog1Layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addComponent(jLabel7)\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\tPBarDownload,\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()));\n\t\t\n\t\t\n\t\tDDownload.setSize(300, 100);\n\t\tDDownload.setResizable(false);\n\t\t\n\t\tgeneralServices.getGuiUtilsApi().centerWindowToWindow(DDownload,\n\t\t\t\tgeneralServices.getGuiUtilsApi().getMainFrame());\n\t\t\n\t\tDDownload.setVisible(true);\n\t\t\n\t\t// Launch the thread\n\t\tnew DownloadMaps(filesEns, generalServices, this);\t\n\t\t\n\t}",
"private void updateProgress(String progressLabel, int progress) {\n if (myHost != null && ((progress != previousProgress) || \n (!progressLabel.equals(previousProgressLabel)))) {\n myHost.updateProgress(progressLabel, progress);\n }\n previousProgress = progress;\n previousProgressLabel = progressLabel;\n }",
"public void onProgressUpdate(int numRouleau,String prochain);",
"public void setStatus(long status) {\r\n this.status = status;\r\n }",
"public void setStatus(StatusOfCause status) {\n\t\tthis.statusValue = status.value;\n\t}",
"private void checkCompletedPieces() {\n\t\tif ((mainloop_loop_count %MAINLOOP_ONE_SECOND_INTERVAL) !=0)\n\t\t\treturn;\n\n\t\t//for every piece\n\t\tfor (int i = 0; i <_nbPieces; i++) {\n\t\t\tfinal DiskManagerPiece dmPiece =dm_pieces[i];\n\t\t\t//if piece is completly written, not already checking, and not Done\n\t\t\tif (dmPiece.isNeedsCheck())\n\t\t\t{\n\t\t\t\t//check the piece from the disk\n\t\t\t\tdmPiece.setChecking();\n\n\t\t\t\tDiskManagerCheckRequest req = \n\t\t\t\t\tdisk_mgr.createCheckRequest(\n\t\t\t\t\t\t\ti, new Integer(CHECK_REASON_DOWNLOADED));\n\n\t\t\t\treq.setAdHoc( false );\n\n\t\t\t\tdisk_mgr.enqueueCheckRequest( req, this );\n\t\t\t}\n\t\t}\n\t}",
"public void updateProgress() {\r\n\t\tfireTableDataChanged();\r\n\t}",
"public void updatePICstatus2() {\n try {\n Connection connection = connectionClass.CONN();\n String query = \"UPDATE stationdashboard SET Status=2, PIC=NULL where Station='\" + Station + \"' and Line ='\" + Line + \"'\";\n PreparedStatement stmt = connection.prepareStatement(query);\n stmt.execute();\n } catch (SQLException ex) {\n }\n }",
"public void update()\n {\n this.lastProgress = this.progress;\n\n if (this.lastProgress >= 1.0F)\n {\n this.func_184322_i();\n this.worldObj.removeTileEntity(this.pos);\n this.invalidate();\n\n if (this.worldObj.getBlockState(this.pos).getBlock() == Blocks.piston_extension)\n {\n this.worldObj.setBlockState(this.pos, this.pistonState, 3);\n this.worldObj.notifyBlockOfStateChange(this.pos, this.pistonState.getBlock());\n }\n }\n else\n {\n this.progress += 0.5F;\n\n if (this.progress >= 1.0F)\n {\n this.progress = 1.0F;\n }\n\n this.func_184322_i();\n }\n }",
"public void setStatus(String stat)\n {\n status = stat;\n }",
"public void updateLocations() throws IOException {\n Path path = new Path(getPath());\n FileSystem fs = path.getFileSystem(FileFactory.getConfiguration());\n RemoteIterator<LocatedFileStatus> iter = fs.listLocatedStatus(path);\n LocatedFileStatus fileStatus = iter.next();\n location = fileStatus.getBlockLocations()[0].getHosts();\n length = fileStatus.getLen();\n }",
"public void updateGameProgression() {\n \tif (players.size() == 0) {\n \t\tSystem.out.println(\"Game over\");\n \t\tgameOver.set(true);\n \t}\n \tif (goal.checkGoalCompleted().get()) {\n \t\tdungeonCompleted.set(true);\n \t} else {\n \t\tdungeonCompleted.set(false);\n \t}\n }",
"@CrossOrigin\n\t@RequestMapping(value=\"/waitForPercentOrMsec\", method= RequestMethod.POST)\n\tpublic JSONObject waitForPercentOrMsec(@RequestBody StatusRequestBodyPercentMsec requestBody, @RequestHeader HttpHeaders headers) {\n\t\tHeadersManager.setHeaders(headers);\n\t\ttry {\n\t\t String jobId = requestBody.jobId;\n\t\t \n\t\t LocalLogger.logToStdErr(Thread.currentThread().getName() + \" PRE-LOG: waitForPercentOrMsec sees user: \" + ThreadAuthenticator.getThreadUserName());\n\t\t \n\t\t SimpleResultSet res = new SimpleResultSet();\n\t\t LoggerRestClient logger = LoggerRestClient.getInstance(log_prop);\n\t \tLoggerRestClient.easyLog(logger, \"Status Service\", \"waitForPercentComplete start\", \"JobId\", jobId);\n\t \tLocalLogger.logToStdOut(\"Status Service waitForPercentComplete \" + requestBody.percentComplete + \"% JobId=\" + jobId);\n\t \t\n\t \tLocalLogger.logToStdErr(Thread.currentThread().getName() + \" POST-LOG waitForPercentOrMsec sees user: \" + ThreadAuthenticator.getThreadUserName());\n\t\t \n\t\t try {\n\t\t \tJobTracker tracker = this.getTracker();\n\t\t \tint percentComplete = tracker.waitForPercentOrMsec(jobId, requestBody.percentComplete, requestBody.maxWaitMsec);\n\t\t\t res.addResult(SimpleResultSet.PERCENT_COMPLETE_RESULT_KEY, String.valueOf(percentComplete));\n\t\t\t \n\t\t\t if (percentComplete == 100) {\n\t\t \t\tString [] statusAndMessage = tracker.getJobStatusAndMessage(jobId);\n\t\t \t\tres.addResult(SimpleResultSet.STATUS_RESULT_KEY, statusAndMessage[0]);\n\t\t \t\tres.addResult(SimpleResultSet.STATUS_MESSAGE_RESULT_KEY, statusAndMessage[1]);\n\t\t \t} else {\n\t\t \t\tres.addResult(SimpleResultSet.STATUS_MESSAGE_RESULT_KEY, tracker.getJobStatusMessage(jobId));\n\t\t \t}\n\t\t\t res.setSuccess(true);\n\t\t\t \n\t\t } catch (Exception e) {\n\t\t \tres.setSuccess(false);\n\t\t \tres.addRationaleMessage(SERVICE_NAME, \"waitForPercentOrMsec\", e);\n\t\t\t LoggerRestClient.easyLog(logger, \"Status Service\", \"waitForPercentOrMsec exception\", \"message\", e.toString());\n\t\t\t LocalLogger.logToStdOut(\"Status Service waitForPercentOrMsec exception message=\" + e.toString());\n\t\t } \n\t\t \n\t\t return res.toJson();\n\t\t \n\t\t} finally {\n\t \tHeadersManager.clearHeaders();\n\t }\n\t}",
"public abstract void updateStatus() throws Throwable;",
"protected void updateProgress(Progress prog) {\r\n \t// if this is called then ensure the no tasks msg is not also displayed\r\n \tshowNoTaskMsg(false);\r\n \t\r\n\t\tint done = prog.getWork();\r\n\t\tString status = getStatusDesc(prog);\r\n\r\n\t\tfinal ProgressUIControl progressUIControl = findOrCreateUIControl(prog);\r\n\t\tprogressUIControl.showMsg(status);\r\n\t\tprogressUIControl.showPercent(done);\r\n\t\t\r\n\t\tif (prog.isFinished() && !progressUIControl.isFinishNotified) {\r\n\t\t\tLog.i(TAG, \"Job finished:\"+prog.getJobName());\r\n\t\t\tprogressUIControl.isFinishNotified = true;\r\n\t\t\tjobFinished(prog);\r\n\t\t}\r\n }",
"@Override\n public void update(final Progress progress) {\n SwingUtilities.invokeLater(new Runnable() {\n\n @Override\n public void run() {\n progressBar.setValue(progress.getIntPercentage());\n progressField.setText(roundToSingleDigit(progress.getPercentage()) + \"%\");\n }\n });\n }",
"public void setProgress(int percent) {\n setProgress((float) percent / 100);\n }",
"public synchronized void tally(CrawlURI curi, Stage stage) {\n switch(stage) {\n case SCHEDULED:\n totalScheduled++;\n break;\n case RETRIED:\n if(curi.getFetchStatus()<=0) {\n fetchNonResponses++;\n }\n break;\n case SUCCEEDED:\n fetchSuccesses++;\n fetchResponses++;\n totalBytes += curi.getContentSize();\n successBytes += curi.getContentSize();\n \n if (curi.getFetchStatus() == HttpStatus.SC_NOT_MODIFIED) {\n notModifiedBytes += curi.getContentSize();\n notModifiedUrls++;\n } else if (IdenticalDigestDecideRule.hasIdenticalDigest(curi)) {\n dupByHashBytes += curi.getContentSize();\n dupByHashUrls++;\n } else if (curi.getAnnotations().contains(\"warcRevisit:uriAgnosticDigest\")) {\n dupByHashBytes += curi.getContentSize();\n dupByHashUrls++;\n } else {\n novelBytes += curi.getContentSize();\n novelUrls++;\n } \n \n lastSuccessTime = curi.getFetchCompletedTime();\n break;\n case DISREGARDED:\n fetchDisregards++;\n if(curi.getFetchStatus()==S_ROBOTS_PRECLUDED) {\n robotsDenials++;\n }\n break;\n case FAILED:\n if(curi.getFetchStatus()<=0) {\n fetchNonResponses++;\n } else {\n fetchResponses++;\n totalBytes += curi.getContentSize();\n \n if (curi.getFetchStatus() == HttpStatus.SC_NOT_MODIFIED) { \n notModifiedBytes += curi.getContentSize();\n notModifiedUrls++;\n } else if (IdenticalDigestDecideRule.\n hasIdenticalDigest(curi)) {\n dupByHashBytes += curi.getContentSize();\n dupByHashUrls++;\n } else {\n novelBytes += curi.getContentSize();\n novelUrls++;\n } \n \n }\n fetchFailures++;\n break;\n }\n }",
"public void setStatus(CMnServicePatch.RequestStatus st) {\n status = st;\n }",
"@Test\n public void currentProgressTest() {\n\n smp.checkAndFillGaps();\n smp.increaseCurrentProgress();\n smp.increaseCurrentProgress();\n smp.increaseCurrentProgress();\n smp.increaseCurrentProgress();\n smp.increaseCurrentProgress();\n\n assertEquals(5, smp.getCurrentProgress());\n assertEquals(30, smp.getUnitsTotal() - smp.getCurrentProgress());\n assertEquals(Float.valueOf(30), smp.getEntriesCurrentPace().lastEntry().getValue());\n assertTrue(smp.getEntriesCurrentPace().size() > 0);\n assertFalse(smp.isFinished());\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MMM-YY\", Locale.getDefault());\n\n for (Map.Entry<Date, Float> entry : smp.getEntriesCurrentPace().entrySet()) {\n System.out.println(dateFormat.format(entry.getKey()) + \" : \" + entry.getValue());\n }\n\n\n for (int i = 0; i < 30; i++) {\n smp.increaseCurrentProgress();\n }\n\n assertTrue(smp.isFinished());\n\n smp.increaseCurrentProgress();\n\n assertEquals(Float.valueOf(0), smp.getEntriesCurrentPace().lastEntry().getValue());\n\n }",
"String importUPbFractionFolderForManualUpdate(File location, int aliquotNumber) throws ETException, BadLabDataException, FileNotFoundException;",
"public void setProgress(String progress) {\n this.progress = progress;\n }",
"public void setPercentageComplete(Number percentComplete)\r\n {\r\n m_percentageComplete = percentComplete;\r\n }",
"private void setProgressPercent(Integer integer) {\n\t\t\n\t}",
"protected void hatchesStatusUpdate_EM() {\n if (getBaseMetaTileEntity().isClientSide()) {\n return;\n }\n boolean busy = mMaxProgresstime > 0;\n if (busy) {//write from buffer to hatches only\n for (GT_MetaTileEntity_Hatch_Param hatch : eParamHatches) {\n if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(hatch) || hatch.param < 0) {\n continue;\n }\n int hatchId = hatch.param;\n if (parametrization.groups[hatchId] != null && parametrization.groups[hatchId].updateWhileRunning) {\n parametrization.iParamsIn[hatchId] = hatch.value0D;\n parametrization.iParamsIn[hatchId + 10] = hatch.value1D;\n }\n hatch.input0D = parametrization.iParamsOut[hatchId];\n hatch.input1D = parametrization.iParamsOut[hatchId + 10];\n }\n } else {//if has nothing to do update all\n for (GT_MetaTileEntity_Hatch_Param hatch : eParamHatches) {\n if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(hatch) || hatch.param < 0) {\n continue;\n }\n int hatchId = hatch.param;\n parametrization.iParamsIn[hatchId] = hatch.value0D;\n parametrization.iParamsIn[hatchId + 10] = hatch.value1D;\n hatch.input0D = parametrization.iParamsOut[hatchId];\n hatch.input1D = parametrization.iParamsOut[hatchId + 10];\n }\n }\n for (GT_MetaTileEntity_Hatch_Uncertainty uncertainty : eUncertainHatches) {\n eCertainStatus = uncertainty.update(eCertainMode);\n }\n eAvailableData = getAvailableData_EM();\n parametersStatusesWrite_EM(busy);\n }",
"public static void updateStatus(Logger logger, Statement s, Validator tester, int compone, int comptwo, int test) { \n synchronized (countMutex) { // protects against two threads doing update status at the same time \n confirmTableExistence(logger,s);\n int x = compone; int y = comptwo;\n if (comptwo < compone) { x = comptwo; y = compone; }\n\n int failureLevel = tester.getTestFailureLevel(test);\n int status;\n if (compone == comptwo) {\n\tstatus = tester.getTestResult(logger,s,x,test);\n } else {\n\tstatus = ((Contrastor)tester).getDiffResult(logger,s,x,y,test);\n }\n \n // A whole comparison needs to be marked as different\n if (compone != comptwo && status == Contrastor.RESULT_DIFF) {\n\ttry {\n\t ResultSet rs = s.executeQuery(\"select * from \"+DGPSPConstants.STATUS_TABLE+\" where runone = '\"+x+\"' and\"+\n\t\t\t\t\t\" runtwo = '\"+y+\"' and test = '0'\");\n\t if (!rs.next()) {\n\t s.executeQuery(\"insert into \"+DGPSPConstants.STATUS_TABLE+\n\t\t\t \" values ('\"+(counter++)+\"','\"+x+\"','\"+y+\"','0',\"+\n\t\t\t \"'\"+status+\"',\" +\n\t\t\t \"'\"+failureLevel+\"'\"+\n\t\t\t \")\");\n\t } else {\n\t s.executeQuery(\"update \"+DGPSPConstants.STATUS_TABLE+\" set status = '\"+status+\"' where runone = '\"+x+\n\t\t\t \"' and runtwo = '\"+y+\"' and test = '0'\");\n\t }\n\t} catch (SQLException e){\n\t logger.logMessage(Logger.ERROR,Logger.DB_WRITE,\n\t\t\t \"Problem altering comparison state info in status table\",e);\n\t}\n }\n \n String sql = null;\n try {\n\tResultSet rs = s.executeQuery(\"select * from \"+DGPSPConstants.STATUS_TABLE+\" where runone = '\"+x+\"' and\"+\n\t\t\t\t \" runtwo = '\"+y+\"' and test = '\"+test+\"'\");\n\tif (!rs.next()) {\n\t sql = \n\t \"insert into \"+DGPSPConstants.STATUS_TABLE+\n\t \" values \"+\n\t \"(\"+\n\t \"'\"+(counter++)+\"',\"+\n\t \"'\"+x+\"',\"+\n\t \"'\"+y+\"',\"+\n\t \"'\"+test+\"',\" +\n\t \"'\"+status+\"',\" +\n\t \"'\"+failureLevel+\"'\"+\n\t \")\";\n\t} else {\n\t sql =\n\t \"update \"+DGPSPConstants.STATUS_TABLE+\" set status = '\"+status+\"' where runone = '\"+x+\n\t \"' and runtwo = '\"+y+\"' and test = '\"+test+\"'\";\n\t}\n\n\ts.executeQuery(sql);\n } catch (SQLException e){\n\tlogger.logMessage(Logger.ERROR,Logger.DB_WRITE,\n\t\t\t \"Problem altering test info in status table. Sql was :\\n\"+sql,e);\n\te.printStackTrace();\n }\n }\n }",
"private void btnDownloadActionPerformed(java.awt.event.ActionEvent evt) {\n path = JOptionPane.showInputDialog(\"Digite o local de destino do arquivo:\");\n System.out.println(\"Path\" + path);\n if (rbBpa.isSelected()) {\n site = \"ftp://arpoador.datasus.gov.br/siasus/BPA/\";\n } else {\n site = \"ftp://arpoador.datasus.gov.br/siasus/sia/\";\n }\n resposta = Download.terminou;\n System.out.println(\"Resposta \" + resposta);\n\n new Thread() {\n public void run() {\n progress.setValue(0);\n progress.setStringPainted(true);\n// Download.downloadArquivo(site, path);\n for (int i = 0; i < 101; i++) {\n progress.setValue(i);\n progress.setString(i + \"%\");\n try {\n Thread.sleep(100);\n } catch (InterruptedException err) {\n\n }\n if (i == 5) {\n lbMsg.setText(\"Baixando arquivo.\");\n }\n if (i > 5) {\n while (resposta != true) {\n Download.downloadArquivo(site, path);\n lbMsg.setText(\"Baixando arquivo....\");\n resposta = Download.terminou;\n }\n }\n if (i == 100) {\n lbMsg.setText(\"Arquivo baixado\");\n }\n }\n }\n }.start();\n\n }",
"void setProgress(int progress);",
"void setProgress(int progress);",
"public void progressTheGame() {\r\n gameProgress = GameState.values()[this.gameProgress.ordinal()+1];\r\n }",
"public void updateJob(int numeroticket, int chunkjustdone) {\n\t\tif (this.ticket == numeroticket)\n\t\t{\n\t\t\t//System.out.println(\"moi worker \" + id + \" ne doit plus faire \" + chunkjustdone);\n\t\t\tthis.chunkDone[chunkjustdone] = true;\n\t\t\t\n\t\t}\n\t}",
"public Double getProgressPercent();",
"public void setStatus(Player owner, int numberHouses){\n this.owner = owner;\n this.numberHouses = numberHouses;\n }",
"private void updateProgress(int progress) {\n if (myHost != null) {\n myHost.updateProgress(progress);\n } else {\n System.out.println(\"Progress: \" + progress + \"%\");\n }\n }",
"public void completed(final Status status);",
"public void setProgress(BigValue progress) {\n this.progress = progress;\n this.checkProgress();\n }",
"private void updateStatusInternal(){\n\t\tFile dataPath = Environment.getDataDirectory();\n\t\tStatFs stat = new StatFs(dataPath.getPath());\n\t\tlong blockSize = stat.getBlockSize();\n\t\tlong availableBlocks = stat.getAvailableBlocks();\n\t\t//show the space of internal storage\n\t\tmExternalTotalSpace=formatSize(availableBlocks * blockSize);\n\t}",
"private void downloadProgSpecFiles(List<S3ObjectSummary> toDownload) {\n boolean anyDownloaded = false;\n int prefixLen = getProgramId().length() + 1; // Program id + trailing \"/\"\n Properties localProgspec = getProgSpecETags();\n for (S3ObjectSummary os : toDownload) {\n File progSpecFile = new File(pathsProvider.getProgramSpecDir(), os.getKey().substring(prefixLen));\n boolean downloaded = Authenticator.getInstance()\n .getProjectsHelper()\n .downloadProgSpecFile(os.getKey(), os.getETag(), getSandbox().outputFile(progSpecFile.toPath()));\n if (downloaded) {\n localProgspec.setProperty(os.getKey().substring(prefixLen), os.getETag());\n anyDownloaded = true;\n }\n }\n if (anyDownloaded) {\n Path eTagsPath = new File(pathsProvider.getProgramSpecDir(), PROGSPEC_ETAGS_FILE_NAME).toPath();\n\n try (BufferedOutputStream out = new BufferedOutputStream(getSandbox().fileOutputStream(eTagsPath))) {\n localProgspec.store(out, null);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"@Override\r\n\t\t\tpublic void progressMade() {\n\t\t\t\twriteReadSemaphore.refreshWriteLock(lockKey, finalWriteToken, lockTimeoutSec);\r\n\t\t\t}",
"void updateOccupancy() {\n\t\toccupied = !occupied;\n\t}",
"private void updateInfoLabel() {\n\n int achievementTotal = 0;\n int achievementDone = 0;\n\n for (Game game : tableView.getItems()) {\n if (game.isPopulated() && game.getHasStats()) {\n achievementTotal += game.achievementsTotalProperty().get();\n achievementDone += game.achievementsDoneProperty().get();\n }\n }\n\n int percentage = 100;\n if (achievementTotal > 0) {\n percentage = achievementDone * 100 / achievementTotal;\n }\n\n lblInfo.setText(\"Games loaded: \" + tableView.getItems().size() + \", Achievements: \" + achievementTotal + \", Unlocked: \" + achievementDone + \" (\" + percentage + \"%)\");\n\n }",
"public void setStatus( short newStatus, int statusSeconds, String aStatusReason )\r\n {\r\n // dont care for same status\r\n if ( statusObj.value == newStatus )\r\n {\r\n return;\r\n }\r\n int oldStatus = statusObj.value;\r\n statusObj.value = newStatus;\r\n \r\n long newStatusTimeout;\r\n statusTimeout = newStatusTimeout = System.currentTimeMillis();\r\n switch( statusObj.value )\r\n {\r\n case STATUS_CANDIDATE_BAD:\r\n newStatusTimeout += BAD_CANDIDATE_STATUS_TIMEOUT;\r\n break;\r\n case STATUS_CANDIDATE_IGNORED:\r\n newStatusTimeout = Long.MAX_VALUE;\r\n break;\r\n case STATUS_CANDIDATE_CONNECTING:\r\n //connectionTries ++;\r\n break;\r\n case STATUS_CANDIDATE_CONNECTION_FAILED:\r\n failedConnectionTries ++;\r\n if ( failedConnectionTries >= IGNORE_CANDIDATE_CONNECTION_TRIES )\r\n {// we have tried long enough to connect to this candidate, ignore\r\n // it for the future (causes delete after session).\r\n downloadFile.markCandidateIgnored( this, \r\n \"CandidateStatusReason_ConnectionFailed\" );\r\n // markCandidateIgnored updates the statusTimeout \r\n // and statusReason, this value is reset here to not \r\n // overwrite it...\r\n newStatusTimeout = statusTimeout;\r\n aStatusReason = statusReason;\r\n break;\r\n }\r\n else if ( failedConnectionTries >= BAD_CANDIDATE_CONNECTION_TRIES )\r\n {\r\n // we dont remove candidates but put them into a bad list.\r\n // once we see a new X-Alt the candidate is valid again.\r\n // candidates might go into the bad list quickly.\r\n // when no \"good\" candidates are avaiable we might also try additional\r\n // bad list connects, every 3 hours or so...\r\n downloadFile.markCandidateBad( this );\r\n // markCandidateBad updates the statusTimeout, this value is\r\n // reset here to not overwrite it...\r\n newStatusTimeout = statusTimeout;\r\n break;\r\n }\r\n else\r\n {\r\n downloadFile.markCandidateMedium( this );\r\n newStatusTimeout += calculateConnectionFailedTimeout();\r\n break;\r\n }\r\n // watch... no break here...\r\n case STATUS_CANDIDATE_REQUESTING:\r\n failedConnectionTries = 0;\r\n break;\r\n case STATUS_CANDIDATE_BUSY:\r\n case STATUS_CANDIDATE_RANGE_UNAVAILABLE:\r\n case STATUS_CANDIDATE_REMOTLY_QUEUED:\r\n failedConnectionTries = 0;\r\n if ( statusSeconds > 0 )\r\n {\r\n newStatusTimeout += statusSeconds * 1000;\r\n }\r\n else\r\n {\r\n newStatusTimeout += determineErrorStatusTimeout( statusObj.value );\r\n }\r\n break;\r\n case STATUS_CANDIDATE_PUSH_REQUEST:\r\n newStatusTimeout += ServiceManager.sCfg.mPushTransferTimeout;\r\n break;\r\n case STATUS_CANDIDATE_DOWNLOADING:\r\n // clear the current error status.\r\n errorStatus = STATUS_CLEARED;\r\n failedConnectionTries = 0;\r\n break;\r\n \r\n }\r\n this.statusReason = aStatusReason;\r\n \r\n NLogger.debug( NLoggerNames.Download_Candidate, \r\n \"Setting status to \" + newStatus + \" and raise timeout from \"\r\n + statusTimeout + \" to \" + newStatusTimeout + \"(\" + \r\n (newStatusTimeout-statusTimeout) + \") Reason:\" + aStatusReason + \".\");\r\n addToCandidateLog( \"Setting status to \" \r\n + SWDownloadInfo.getDownloadCandidateStatusString(this) \r\n + \" and raise timeout from \" + statusTimeout + \" to \" \r\n + newStatusTimeout + \"(\" + (newStatusTimeout-statusTimeout) \r\n + \") Reason:\" + aStatusReason + \".\");\r\n \r\n statusTimeout = newStatusTimeout;\r\n downloadFile.candidateStatusChanged( this, oldStatus, newStatus );\r\n }",
"public void setPercentComplete(int percentComplete) {\n\t\tthis.percentComplete = Math.max(0, Math.min(100, percentComplete));\n\t}",
"private int getCompleteProgress()\n {\n int complete = (int)(getProgress() * 100);\n \n if (complete >= 100)\n complete = 100;\n \n return complete;\n }",
"public String percentCompleteCountQATasks() {\n\t\tint fixed = closedQATasks().count();\n\t\tint total = qaTasks().count();\n\t\t\n return percentCompleteStringFromDouble(((double)fixed/(double)total) * 100);\n\t}",
"void spray(double percent)\n {\n roaches = (int) (roaches - (roaches * percent / 100));\n }",
"public static int supvCheck(int myId, int taskid, int updatenum){\n try {\n Statement st = conn.createStatement();\n\n //add checkerid in indvprogressupdate for this updatenum\n String addChecker = \"UPDATE progressupdate SET checkerid = %d WHERE updatenum = \" + updatenum ;\n st.executeUpdate(String.format(addChecker, myId));\n\n //remove updatenum from indvsupvupdate in user for supv\n //TODO remove all otherstaskupdate of all group member\n String getMembersCommand = \"SELECT * FROM grouptask WHERE taskid = \" + taskid;\n ResultSet taskInfo = st.executeQuery(getMembersCommand);\n taskInfo.next();\n Long[] members = (Long[])taskInfo.getArray(\"member\").getArray();\n for(Long memberid : members){\n String removeUpdate = \"UPDATE users SET otherstaskupdate = array_remove(otherstaskupdate, '%d') WHERE userid = \" + memberid ;\n st.executeUpdate(String.format(removeUpdate, updatenum));\n }\n\n //update task owner progress(increment) in individual TODO:check deadline, repetition etc.\n //String updateMyIndv = \"UPDATE grouptask SET progress = progress + 1 WHERE taskid =\" + taskid;\n //st.executeUpdate(updateMyIndv);\n\n //add updatenum to indvupdate in user\n ResultSet ownerResult = st.executeQuery(\"SELECT userid FROM progressupdate WHERE updatenum =\" + updatenum);\n ownerResult.next();\n int ownerid = Integer.parseInt(ownerResult.getString(\"userid\"));\n String addIndvUpdate = \"UPDATE users SET mytaskupdate = array_append(mytaskupdate, '%d') WHERE userid=%d;\";\n st.execute(String.format(addIndvUpdate, updatenum , ownerid));\n\n //TODO update progress\n String progressTrackCommand = String.format(\n \"UPDATE progresstrack SET progress = progress+1, checkcount = checkcount+1 WHERE taskid = %d AND memberid = %d\",\n taskid, ownerid);\n st.executeUpdate(progressTrackCommand);\n\n st.close();\n return SUCCESS;\n } catch (SQLException e) {\n return SERVER_FAILURE;\n }\n }",
"public void setProgress(int value);",
"public void setStatus(JobStatus status);",
"public synchronized void setComplete() {\n status = Status.COMPLETE;\n }",
"public synchronized final void setStatus(int sts) {\n\t\tm_status = sts;\n\t\tnotifyAll();\n\t}",
"@Override\n protected void onProgressUpdate(String... values) {\n labelStatus.setText(values[0]);\n }",
"public void updateClientPokemonStats(int i)\n\t{\n\t\tif(m_pokemon[i] != null)\n\t\t{\n\t\t\tString data = m_pokemon[i].getHealth() + \",\" + m_pokemon[i].getStat(0) + \",\" + m_pokemon[i].getStat(1) + \",\" + m_pokemon[i].getStat(2) + \",\" + m_pokemon[i].getStat(3) + \",\"\n\t\t\t\t\t+ m_pokemon[i].getStat(4) + \",\" + m_pokemon[i].getStat(5);\n\t\t\tServerMessage message = new ServerMessage(ClientPacket.POKE_STATUS_UPDATE);\n\t\t\tmessage.addInt(i);\n\t\t\tmessage.addString(data);\n\t\t\tgetSession().Send(message);\n\t\t}\n\t}",
"void updateLandmarks() {\n\n\t\t\tregisterUpdateLandmarksTimer();\n\n\t\t\tint m = 2;\n\t\t\tfinal int expectedLandmarks = NumberOfLandmarks + m;\n\t\t\tIterator<Long> ier = pendingHSHLandmarks.keySet().iterator();\n\n\t\t\tSet<AddressIF> tmpList = new HashSet<AddressIF>(1);\n\t\t\tLong curRecord = null;\n\n\t\t\t// get a non-empty list of landmarks\n\t\t\twhile (ier.hasNext()) {\n\t\t\t\tLong nxt = ier.next();\n\t\t\t\tif (pendingHSHLandmarks.get(nxt).IndexOfLandmarks != null\n\t\t\t\t\t\t&& pendingHSHLandmarks.get(nxt).IndexOfLandmarks.size() > 0) {\n\t\t\t\t\ttmpList\n\t\t\t\t\t\t\t.addAll(pendingHSHLandmarks.get(nxt).IndexOfLandmarks);\n\t\t\t\t\tcurRecord = nxt;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if empty, we need to update landmarks immediately\n\t\t\tif (tmpList.size() == 0) {\n\t\t\t\t// remove the record\n\t\t\t\tif (curRecord != null) {\n\t\t\t\t\tpendingHSHLandmarks.get(curRecord).clear();\n\t\t\t\t\tpendingHSHLandmarks.remove(curRecord);\n\t\t\t\t} else {\n\t\t\t\t\t// null curRecord\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tfinal Long Timer = curRecord;\n\t\t\t\t// ping landmarks, if several of them fails, p percentage p=0.2\n\t\t\t\t// , we remove the records, and restart the landmark process\n\t\t\t\t// =================================================================\n\t\t\t\tfinal List<AddressIF> aliveLandmarks = new ArrayList<AddressIF>(\n\t\t\t\t\t\t1);\n\n\t\t\t\tNNManager.collectRTTs(tmpList, new CB2<Set<NodesPair>, String>() {\n\t\t\t\t\tprotected void cb(CBResult ncResult, Set<NodesPair> nps,\n\t\t\t\t\t\t\tString errorString) {\n\t\t\t\t\t\t// send data request message to the core node\n\t\t\t\t\t\tlong timer=System.currentTimeMillis();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (nps != null && nps.size() > 0) {\n\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t.println(\"\\n==================\\n Alive No. of landmarks: \"\n\t\t\t\t\t\t\t\t\t\t\t+ nps.size()\n\t\t\t\t\t\t\t\t\t\t\t+ \"\\n==================\\n\");\n\n\t\t\t\t\t\t\tIterator<NodesPair> NP = nps.iterator();\n\t\t\t\t\t\t\twhile (NP.hasNext()) {\n\t\t\t\t\t\t\t\tNodesPair tmp = NP.next();\n\t\t\t\t\t\t\t\tif (tmp != null && tmp.rtt >= 0) {\n\n\t\t\t\t\t\t\t\t\tAddressIF peer = (AddressIF)tmp.endNode;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//====================================================\n\t\t\t\t\t\t\t\t\tif (!ncManager.pendingLatency.containsKey(peer)) {\n\t\t\t\t\t\t\t\t\t\tncManager.pendingLatency.put(peer,\n\t\t\t\t\t\t\t\t\t\t\t\tnew RemoteState<AddressIF>(peer));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tncManager.pendingLatency.get(peer).addSample(tmp.rtt, timer);\n\t\t\t\t\t\t\t\t\t//=====================================================\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (!pendingHSHLandmarks.containsKey(Timer)\n\t\t\t\t\t\t\t\t\t\t\t|| pendingHSHLandmarks.get(Timer).IndexOfLandmarks == null) {\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tint index = pendingHSHLandmarks.get(Timer).IndexOfLandmarks\n\t\t\t\t\t\t\t\t\t\t\t.indexOf(peer);\n\n\t\t\t\t\t\t\t\t\tif (index < 0) {\n\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// found the element, and it is smaller\n\t\t\t\t\t\t\t\t\t\t// than\n\t\t\t\t\t\t\t\t\t\t// rank, i.e., it is closer to the\n\t\t\t\t\t\t\t\t\t\t// target\n\t\t\t\t\t\t\t\t\t\taliveLandmarks.add(peer);\n\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// wrong measurements\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// empty\n\t\t\t\t\t\t\t// all nodes fail, so there are no alive nodes\n\t\t\t\t\t\t\tif (pendingHSHLandmarks.containsKey(Timer)) {\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.get(Timer).clear();\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.remove(Timer);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// some landmarks are offline, we clear records and\n\t\t\t\t\t\t// start\n\t\t\t\t\t\tif (pendingHSHLandmarks.containsKey(Timer)) {\n\n\t\t\t\t\t\t\tif (aliveLandmarks.size() < 0.8 * expectedLandmarks) {\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.get(Timer).clear();\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.remove(Timer);\n\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// the landmarks are healthy, so we can sleep\n\t\t\t\t\t\t\t\t// awhile\n\t\t\t\t\t\t\t\t// TODO: remove dead landmarks, and resize the\n\t\t\t\t\t\t\t\t// landmarks\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.get(Timer).IndexOfLandmarks\n\t\t\t\t\t\t\t\t\t\t.clear();\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.get(Timer).IndexOfLandmarks\n\t\t\t\t\t\t\t\t\t\t.addAll(aliveLandmarks);\n\n\t\t\t\t\t\t\t\t// pendingHSHLandmarks.get(Timer).readyForUpdate=false;\n\t\t\t\t\t\t\t\tfinal Set<AddressIF> nodes = new HashSet<AddressIF>(\n\t\t\t\t\t\t\t\t\t\t1);\n\n\t\t\t\t\t\t\t\tnodes\n\t\t\t\t\t\t\t\t\t\t.addAll(pendingHSHLandmarks.get(Timer).IndexOfLandmarks);\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.get(Timer).readyForUpdate = true;\n\n\t\t\t\t\t\t\t\t//update the rtts\n\t\t\t\t\t\t\t\t updateRTTs(Timer.longValue(),nodes, new\n\t\t\t\t\t\t\t\t CB1<String>(){ protected void cb(CBResult\n\t\t\t\t\t\t\t\t ncResult, String errorString){ switch\n\t\t\t\t\t\t\t\t (ncResult.state) { case OK: {\n\t\t\t\t\t\t\t\t System.out.println(\"$: Update completed\");\n\t\t\t\t\t\t\t\t System.out.println();\n\t\t\t\t\t\t\t\t if(errorString.length()<=0){\n\t\t\t\t\t\t\t\t pendingHSHLandmarks\n\t\t\t\t\t\t\t\t .get(Timer).readyForUpdate=true; }\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t break; } case ERROR: case TIMEOUT: { break; }\n\t\t\t\t\t\t\t\t } nodes.clear(); } });\n\t\t\t\t\t\t\t\t \n\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t}\n\n\t\t\t// ==================================================================\n\n\t\t\t// expected landmarks, K+m\n\n\t\t\tfinal Set<AddressIF> pendingNodes = new HashSet<AddressIF>(1);\n\n\t\t\tgetRandomNodes(pendingNodes, expectedLandmarks);\n\n\t\t\t// remove myself\n\t\t\tif (pendingNodes.contains(Ninaloader.me)) {\n\t\t\t\tpendingNodes.remove(Ninaloader.me);\n\t\t\t}\n\n\t\t\tSystem.out.println(\"$: HSH: Total number of landmarks are: \"\n\t\t\t\t\t+ pendingNodes.size());\n\n\t\t\tif (pendingNodes.size() == 0) {\n\t\t\t\tString errorString = \"$: HSH no valid nodes\";\n\t\t\t\tSystem.out.println(errorString);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tBarrier barrierUpdate = new Barrier(true);\n\t\t\tfinal StringBuffer errorBuffer = new StringBuffer();\n\n\t\t\tfinal long TimeStamp = System.currentTimeMillis();\n\n\t\t\tfor (AddressIF addr : pendingNodes) {\n\t\t\t\tseekLandmarks(TimeStamp, addr, barrierUpdate,\n\t\t\t\t\t\tpendingHSHLandmarks, errorBuffer);\n\t\t\t}\n\n\t\t\tEL.get().registerTimerCB(barrierUpdate, new CB0() {\n\t\t\t\tprotected void cb(CBResult result) {\n\t\t\t\t\tString errorString;\n\t\t\t\t\tif (errorBuffer.length() == 0) {\n\t\t\t\t\t\terrorString = new String(\"Success\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\terrorString = new String(errorBuffer);\n\t\t\t\t\t}\n\n\t\t\t\t\t// finish the landmark seeking process\n\n\t\t\t\t\tif (!pendingHSHLandmarks.containsKey(Long\n\t\t\t\t\t\t\t.valueOf(TimeStamp))\n\t\t\t\t\t\t\t|| pendingHSHLandmarks.get(Long.valueOf(TimeStamp)).IndexOfLandmarks == null) {\n\t\t\t\t\t\tSystem.out.println(\"$: NULL elements! \");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (pendingHSHLandmarks.get(Long.valueOf(TimeStamp)).IndexOfLandmarks\n\t\t\t\t\t\t\t.size() < (0.7 * expectedLandmarks)) {\n\t\t\t\t\t\tpendingHSHLandmarks.get(Long.valueOf(TimeStamp))\n\t\t\t\t\t\t\t\t.clear();\n\t\t\t\t\t\tpendingHSHLandmarks.remove(Long.valueOf(TimeStamp));\n\t\t\t\t\t\tSystem.out.println(\"$: not enough landmark nodes\");\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t//\n\t\t\t\t\t\tpendingHSHLandmarks.get(Long.valueOf(TimeStamp)).readyForUpdate = true;\n\t\t\t\t\t\tSystem.out.println(\"$: enough landmark nodes\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tfinal Set<AddressIF> nodes = new HashSet<AddressIF>(1);\n\t\t\t\t\t\tnodes\n\t\t\t\t\t\t\t\t.addAll(pendingHSHLandmarks.get(Long.valueOf(TimeStamp)).IndexOfLandmarks);\n\t\t\t\t\t\tupdateRTTs(Long.valueOf(TimeStamp), nodes, new CB1<String>() {\n\t\t\t\t\t\t\tprotected void cb(CBResult ncResult, String errorString) {\n\t\t\t\t\t\t\t\tswitch (ncResult.state) {\n\t\t\t\t\t\t\t\tcase OK: {\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"$: Update completed\");\n\t\t\t\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcase ERROR:\n\t\t\t\t\t\t\t\tcase TIMEOUT: {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnodes.clear();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\t\t}",
"public void setStatus(String st) {\n status = CMnServicePatch.getRequestStatus(st);\n }",
"@CrossOrigin\n\t@RequestMapping(value=\"/setPercentComplete\", method= RequestMethod.POST)\n\tpublic JSONObject setPercentComplete(@RequestBody StatusRequestBodyPercentMessage requestBody, @RequestHeader HttpHeaders headers) {\n\t\tHeadersManager.setHeaders(headers);\n\t\ttry {\n\t\t String jobId = requestBody.jobId;\n\t\t \n\t\t SimpleResultSet res = new SimpleResultSet();\n\t\t LoggerRestClient logger = LoggerRestClient.getInstance(log_prop);\n\t\t LocalLogger.logToStdOut(\"Status Service setPercentComplete \" + requestBody.percentComplete + \"% JobId=\" + jobId);\n\t\n\t\t try {\n\t\t \tJobTracker tracker = this.getTracker();\n\t\t \ttracker.setJobPercentComplete(jobId, requestBody.percentComplete, requestBody.message);\n\t\t\t res.setSuccess(true);\n\t\t\t \n\t\t } catch (Exception e) {\n\t\t \tres.setSuccess(false);\n\t\t \tres.addRationaleMessage(SERVICE_NAME, \"setPercentComplete\", e);\n\t\t\t LoggerRestClient.easyLog(logger, \"Status Service\", \"setPercentComplete exception\", \"message\", e.toString());\n\t\t\t LocalLogger.logToStdOut(\"Status Service setPercentComplete exception message=\" + e.toString());\n\t\t } \n\t\t \n\t\t return res.toJson();\n\t\t \n\t\t} finally {\n\t \tHeadersManager.clearHeaders();\n\t }\n\t\t \n\t}",
"private static void updateStatus(final int increment) {\n if (splash != null) {\n splash.advance();\n }\n }",
"protected void parametersStatusesWrite_EM(boolean machineBusy) {//todo unimplement?\n if (!machineBusy) {\n for (Parameters.Group.ParameterIn parameterIn : parametrization.parameterInArrayList) {\n if (parameterIn != null) {\n parameterIn.updateStatus();\n }\n }\n } else {\n for (Parameters.Group hatch : parametrization.groups) {\n if (hatch != null && hatch.updateWhileRunning) {\n for (Parameters.Group.ParameterIn in : hatch.parameterIn) {\n if (in != null) {\n in.updateStatus();\n }\n }\n }\n }\n }\n for (Parameters.Group.ParameterOut parameterOut : parametrization.parameterOutArrayList) {\n if (parameterOut != null) {\n parameterOut.updateStatus();\n }\n }\n }"
] |
[
"0.53152514",
"0.5240702",
"0.51726115",
"0.51671845",
"0.5156841",
"0.5128174",
"0.5120854",
"0.50697756",
"0.5015259",
"0.49898925",
"0.49325222",
"0.47913498",
"0.47862276",
"0.47727284",
"0.4770786",
"0.47344387",
"0.4710829",
"0.46891463",
"0.46739614",
"0.4664619",
"0.46615177",
"0.46582225",
"0.4652831",
"0.46402398",
"0.46377495",
"0.46219072",
"0.46206546",
"0.46139166",
"0.45862195",
"0.45647943",
"0.45627534",
"0.45570257",
"0.45488763",
"0.45418426",
"0.45350173",
"0.45215952",
"0.45083025",
"0.44942418",
"0.4489652",
"0.44840991",
"0.4483384",
"0.44776",
"0.4474624",
"0.44689527",
"0.44546458",
"0.44515723",
"0.44449896",
"0.44446737",
"0.44405654",
"0.4439975",
"0.4430893",
"0.44256908",
"0.44193885",
"0.44144875",
"0.44142914",
"0.4413545",
"0.44118065",
"0.44092718",
"0.44050613",
"0.4403984",
"0.43958974",
"0.43945006",
"0.43939227",
"0.43902323",
"0.43851528",
"0.43838698",
"0.43829545",
"0.43730217",
"0.43675828",
"0.43626237",
"0.43626237",
"0.43612918",
"0.4356125",
"0.4348443",
"0.43473172",
"0.43444365",
"0.43433115",
"0.4338138",
"0.43377167",
"0.4333509",
"0.43306443",
"0.43304208",
"0.4326142",
"0.4321914",
"0.43162492",
"0.43137026",
"0.43134817",
"0.43131685",
"0.43116176",
"0.43105248",
"0.43017742",
"0.4301002",
"0.42949024",
"0.42901075",
"0.4289164",
"0.42832687",
"0.42750356",
"0.4270915",
"0.4270369",
"0.42695042"
] |
0.55612034
|
0
|
This method defines a way of getting the current weather conditions for a given coordinate.
|
public abstract WeatherData getCurrentWeather(LocationCoordinate _location) throws Exception;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void getWeather(String city, String units);",
"@GetMapping(\"/weather/current\")\n public Location getCurrentWeather(@RequestParam(value = \"city\", required = false) final String city, @RequestParam(value = \"country\", required = false) final String country, @RequestParam(value = \"lon\", required = false) final String lon, @RequestParam(value = \"lat\", required = false) final String lat) {\n final StringBuilder locationBuilder = new StringBuilder();\n validator.getCurrentWeatherValidator(city, country, lon, lat);\n\n if (city != null) {\n locationBuilder.append(\"city=\").append(city);\n if(country != null) {\n locationBuilder.append(\"&country=\").append(country);\n }\n } else if (lat != null) {\n final double latitude = Double.parseDouble(lat);\n final double longitude = Double.parseDouble(lon);\n final Coordinates latLong = new Coordinates(longitude, latitude);\n locationBuilder.append(latLong.getUriComponent());\n } else {\n Coordinates randomCoordinates = getRandomCoordinates();\n locationBuilder.append(randomCoordinates.getUriComponent());\n }\n\n final String location = locationBuilder.toString();\n return weatherService.getCurrentConditions(location);\n }",
"public WeatherCondition getCondition() {\n return condition;\n }",
"public String condition(String map, int x, int y, long date) {\n\tWeatherUnit weath = getWeather(date);\n if (weath == null) return \"dry\"; // No calendar present\n\t// Water is handled different, only wind counts\n\tScaledMap local = (ScaledMap)maps.get(map);\n\tif (local != null && local.getTerrain(x,y).equals(\"water\")) {\n\t return windCondition(local.getVegetation(x,y), weath);\n\t}\n\t\n\tData.HashList list = Data.getCondList();\n\tfor (int i = 0; i < list.keySet().size(); i++) {\n\t String n = list.getKey(i);\n\t int thresh = ((Data.Condition)list.get(n)).threshhold;\n\t String lvl = ((Data.Condition)list.get(n)).lvlname.toString();\n if ((weath.levels.get(lvl) != null) &&\n ((Integer)weath.levels.get(lvl)).intValue() >= thresh)\n\t\treturn n;\n\t}\n\n\t// Default\n\treturn \"dry\";\n }",
"public abstract WeatherData[] getDailyWeatherForecast(LocationCoordinate _location) throws Exception;",
"IConditionsRequest getConditionsRequest(double lat, double lon, IRequestListener listener);",
"public abstract WeatherData[] getHourlyWeatherForecast(LocationCoordinate _location) throws Exception;",
"@Cacheable(\"weather\")\r\n\tpublic Weather getWeatherByLatitudeAndLongitude(String lat, String lon) {\n\t\tlogger.info(\"Requesting current weather for {}/{}\", lat, lon);\r\n\t\t\t\t\r\n\t\tURI url = new UriTemplate(WEATHER_URL1).expand(lat, lon, this.apiKey);\r\n\t\treturn invoke(url, Weather.class);\r\n\t}",
"public void updateConditions() {\n\n weatherTower = new WeatherTower();\n String newWeather = weatherTower.getWeather(coordinates); // this is the currentWeather algorythm\n\n switch (newWeather) {\n\n case WeatherType.SUN:\n coordinates.setLongitude(coordinates.getLongitude() + 2);\n coordinates.setHeight(coordinates.getHeight() + 4);\n message = \"Baloon# \" + this.getName() + \"(\" + this.getId() + \"): \" + \"It is so sunny and hot.\";\n System.out.println(\"message\");\n try(PrintWriter pw = new PrintWriter(new FileOutputStream(new File(\"outputFile.txt\"), true))){\n pw.println(message);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n break;\n\n case WeatherType.RAIN:\n coordinates.setLatitude(coordinates.getLatitude() - 5);\n message = \"Baloon#\" + this.getName() + \"(\" + this.getId() + \"): \" + \"Damn you rain! You messed up my baloon.\";\n System.out.println(\"message\");\n try(PrintWriter pw = new PrintWriter(new FileOutputStream(new File(\"outputFile.txt\"), true))){\n pw.println(message);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n break;\n\n case WeatherType.FOG:\n coordinates.setLatitude(coordinates.getLatitude() - 3);\n message = \"Baloon#\" + this.getName() + \"(\" + this.getId() + \"): \" + \"Even though it's fog, let's take some pics!\";\n System.out.println(\"message\");\n try(PrintWriter pw = new PrintWriter(new FileOutputStream(new File(\"outputFile.txt\"), true))){\n pw.println(message);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n break;\n\n case WeatherType.SNOW:\n coordinates.setHeight(coordinates.getHeight() - 15);\n message = \"Baloon#\" + this.getName() + \"(\" + this.getId() + \"): \" + \" It's snowing. We're gonna crash.\\n\";\n System.out.println(\"message\");\n try(PrintWriter pw = new PrintWriter(new FileOutputStream(new File(\"outputFile.txt\"), true))){\n pw.println(message);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n break;\n }\n }",
"private void readWeatherConditions(XmlPullParser xpp)\n throws XmlPullParserException, IOException\n {\n int eventType = xpp.next();\n while (eventType != XmlPullParser.END_DOCUMENT)\n {\n if (eventType == XmlPullParser.START_TAG)\n {\n // Read a tag <weather-conditions weather-summary=\"Mostly Cloudy\"/>\n if (xpp.getName().equalsIgnoreCase(WEATHER_CONDITIONS))\n {\n String attrValue = readAttributeValue(xpp, WEATHER_SUMMARY,\n INVALID);\n this.forecast.addCondition(attrValue);\n }\n }\n else if (eventType == XmlPullParser.END_TAG)\n {\n // exit when we get to \"</weather>\"\n if (xpp.getName().equalsIgnoreCase(WEATHER))\n break;\n }\n eventType = xpp.next();\n }\n }",
"public WeatherModel getCurrentWeather() {\n return currentWeather;\n }",
"private static boolean fetchYahooWeather() {\n try {\n SAXParserFactory spf = SAXParserFactory.newInstance();\n spf.setNamespaceAware(true);\n SAXParser parser = spf.newSAXParser();\n \n String yql_format = String.format(\"select %%s from %%s where woeid in (select woeid from geo.places(1) where text=\\\"%s, %s\\\")\", CITY, ST);\n \n /* Fetch Wind Data (temp, windDir, and windSpeed) */\n String yql_wind = String.format(yql_format, \"wind\", \"weather.forecast\");\n String url_wind = String.format(\"https://query.yahooapis.com/v1/public/yql?q=%s&format=xml&u=f\", URLEncoder.encode(yql_wind, \"UTF-8\"));\n \n DefaultHandler wind_handler = new DefaultHandler() {\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n //System.out.printf(\"uri=%s\\nlocalName=%s\\nqName=%s\\nattributes=%s\\n\\n\", uri, localName, qName, attributes);\n if (!qName.equals(\"yweather:wind\")) return;\n \n temp = Integer.parseInt(attributes.getValue(\"chill\"));\n \n int dir = Integer.parseInt(attributes.getValue(\"direction\")); // number from 0-359 indicating direction\n // I began writing an if tree, then remembered I was lazy.\n String[] dir_words = new String[] {\n \"east\", \"northeast\", \"north\", \"northwest\", \"west\", \"southwest\", \"south\", \"southeast\"\n };\n windDir = dir_words[dir/45];\n \n windSpeed = Integer.parseInt(attributes.getValue(\"speed\")); // speed in mph\n }\n };\n parser.parse(url_wind, wind_handler);\n \n /* Fetch Atronomy Data (sunriseHour and sunsetHour) */\n String yql_astro = String.format(yql_format, \"astronomy\", \"weather.forecast\");\n String url_astro = String.format(\"https://query.yahooapis.com/v1/public/yql?q=%s&format=xml&u=f\", URLEncoder.encode(yql_astro, \"UTF-8\"));\n \n DefaultHandler astro_handler = new DefaultHandler() {\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n //System.out.printf(\"uri=%s\\nlocalName=%s\\nqName=%s\\nattributes=%s\\n\\n\", uri, localName, qName, attributes);\n if (!qName.equals(\"yweather:astronomy\")) return;\n \n sunriseHour = Util.parseTime(attributes.getValue(\"sunrise\"));\n sunsetHour = Util.parseTime(attributes.getValue(\"sunset\"));\n \n }\n };\n parser.parse(url_astro, astro_handler);\n \n /* Fetch Description Data (sky) */\n String yql_sky = String.format(yql_format, \"item.condition.text\", \"weather.forecast\");\n String url_sky = String.format(\"https://query.yahooapis.com/v1/public/yql?q=%s&format=xml&u=f\", URLEncoder.encode(yql_sky, \"UTF-8\"));\n \n DefaultHandler sky_handler = new DefaultHandler() {\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n //System.out.printf(\"uri=%s\\nlocalName=%s\\nqName=%s\\nattributes=%s\\n\\n\", uri, localName, qName, attributes);\n if (!qName.equals(\"yweather:condition\")) return;\n \n sky = attributes.getValue(\"text\").toLowerCase();\n \n }\n };\n parser.parse(url_sky, sky_handler);\n \n return E.sky != null;\n \n } catch (java.net.UnknownHostException uhe) {\n if (Data.DEBUG) System.err.println(\"You are offline!\");\n return false;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }",
"public YahooWeatherInformation getResult_Weather_Information(){\n return this.Result_Weather_Information;\n }",
"public WeatherNow getSingleWeather(int position){\n return weatherNow.get(position);\n }",
"private void getWeatherData() {\n System.out.println(\"at getWeather\");\n String url = \"https://api.openweathermap.org/data/2.5/onecall/timemachine?lat=\";\n url += databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE);\n url += \"&lon=\" + databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LONGITUDE);\n url += \"&dt=\" + databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.START_TIME).substring(0, 10);\n url += \"&appid=your openweathermap API key\";\n new ClientThread(ClientThread.GET_WEATHER, new String[]{url, Integer.toString(experimentNumber)}, this).start();\n }",
"public String getCurrentWeather() {\n\t\tString jsonStr = null;\n\t\t\n\t\tClient client = ClientBuilder.newClient();\t\t\n\t\tWebTarget target = client.target(OpenWeatherApiUtil.BASE_URL)\n\t\t\t\t.path(OpenWeatherApiUtil.WEATHER_RESOURCE)\n\t\t\t\t.queryParam(OpenWeatherApiUtil.CITY_QUERY_PARAM, CITY_VANCOUVER)\n\t\t\t\t.queryParam(OpenWeatherApiUtil.UNITS_QUERY_PARAM, OpenWeatherApiUtil.METRIC_UNITS)\n\t\t\t\t.queryParam(OpenWeatherApiUtil.API_KEY_QUERY_PARAM, getApiKey());\n\n\t\tLOG.debug(\"Target URL: \" + target.getUri().toString());\n\t\t\n\t\tInvocation.Builder invocationBuilder = target.request(MediaType.APPLICATION_JSON);\t\t\n\t\t\n\t\tResponse response = invocationBuilder.get(Response.class);\t\t\n\t\tjsonStr = response.readEntity(String.class);\n\t\t\n\t\t// Check response from Open Weather API and log the response appropriately\n\t\tif (response.getStatus() == 200) {\n\t\t\tLOG.debug(jsonStr);\n\t\t}\n\t\telse {\n\t\t\tLOG.error(ErrorMessageUtils.ERROR_OPEN_WEATHER_API_RESPONSE_NON_200_STATUS\n\t\t\t\t\t+ \"\\n\" + response.readEntity(String.class));\n\t\t}\n\t\t\t\n\t\treturn jsonStr;\n\t}",
"private static void getWeatherDataForInputValues(BigDecimal lat, BigDecimal lon) throws RemoteException{\n\t\t\n\t\tCalendar time = new GregorianCalendar();\t\t\t\t// Pass this as a GregorianCalendar for the Calendar to understand\n\t\ttime.setTime(new Date());\n\t\tSystem.out.println(\"Fetaching data from SOAP Web Service... Please wait\");\n\t\tString result = proxy.NDFDgen(lat,lon,\"time-series\",time,time,\"e\",wp);\n\t\tDocument dom= convertStringToDocument(result);\n\t\ttry{\n\t\t\t//Displaying the result on the output screen\n\t\t\tXPathFactory xpathFactory = XPathFactory.newInstance();\n\t\t\tXPath xpath = xpathFactory.newXPath();\n\t\t\tSystem.out.println(\"Minimum Temperature: \"+getValuesFromDom(dom,xpath,\"temperature[@type='minimum']\")); //print the minimum temp\n\t\t\tSystem.out.println(\"Maximum Temperature: \"+getValuesFromDom(dom,xpath,\"temperature[@type='maximum']\")); // print the maximum temp\n\t\t\tSystem.out.println(\"Wind Direction: \"+getValuesFromDom(dom,xpath,\"direction\")); // print the wind direction\n\t\t\tSystem.out.println(\"Wind Speed: \"+getValuesFromDom(dom,xpath,\"wind-speed\")); // print the wind speed\n\t\t\tSystem.out.println(\"Temperature Dew point: \"+getValuesFromDom(dom,xpath,\"temperature[@type='dew point']\")); // print the dew point temperature\n\t\t\tSystem.out.println(\"12 Hour Probability of Precipitation:\"+getValuesFromDom(dom,xpath,\"probability-of-precipitation\"));\n\t\t\tString command = isRefreshed();\n\t\t\tif(command.trim().toLowerCase().equals(\"yes\")){\n\t\t\t\t\n\t\t\t\tgetWeatherDataForInputValues(lat,lon);\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"void handleWeatherDataForLocation(String lon, String lat);",
"public void callAPICall_shouldRetrieveCurrentWeatherInformation(String cityName) {\n\n WeatherAPIManager weatherAPIManager = new WeatherAPIManager(activity);\n weatherAPIManager.setOnResponseListener(new WeatherAPIManagerOnResponseListener());\n weatherAPIManager.connectToWeatherEndpoint(cityName);\n }",
"public void downloadWeatherForCurrentLocation() {\n if(checkConnection()) {\n LocationManager locationManager = LocationManager.getInstance(this, view);\n locationManager.getCoordinates();\n } else {\n showNoConnectionDialog();\n }\n }",
"public String getWeather() {\n int weatherCode = 0;\n String weather = \" \";\n if (readings.size() > 0) {\n weatherCode = readings.get(readings.size() - 1).code;\n\n if (weatherCode == 100) {\n weather += weather + \" Clear \";\n } else if (weatherCode == 200) {\n weather += weather + \" Partial clouds \";\n } else if (weatherCode == 300) {\n weather += weather + \" Cloudy \";\n } else if (weatherCode == 400) {\n weather += weather + \" Light Showers \";\n } else if (weatherCode == 500) {\n weather += weather + \" Heavy Showers \";\n } else if (weatherCode == 600) {\n weather += weather + \" Rain \";\n } else if (weatherCode == 700) {\n weather += weather + \" Snow \";\n } else if (weatherCode == 800) {\n weather += weather + \" Thunder \";\n } else {\n weather += weather + \" Partial clouds \";\n }\n }\n return weather;\n }",
"GeneralWeatherReport queryWeatherReport(String cityId);",
"private List<Tuple> weatherMap(Tuple input) {\n \n Map<String, String> mockLocationService = new HashMap<String, String>();\n mockLocationService.put(\"Harrisburg\", \"PA\");\n mockLocationService.put(\"Pittsburgh\", \"PA\");\n mockLocationService.put(\"Phildelphia\", \"PA\");\n mockLocationService.put(\"Houston\", \"TX\");\n mockLocationService.put(\"SanAntonio\", \"TX\");\n mockLocationService.put(\"Austin\", \"TX\");\n mockLocationService.put(\"Sacramento\", \"CA\");\n mockLocationService.put(\"LosAngeles\", \"CA\");\n mockLocationService.put(\"SanFransico\", \"CA\");\n \n List<Tuple> output = new ArrayList<Tuple>();\n \n String city = input.fst();\n String hiLow = input.snd();\n \n output.add(new Tuple(mockLocationService.get(city), hiLow));\n \n lolligag();\n \n //<state, hi low>\n return output;\n }",
"@Override\n\t\tprotected GetWeatherRes doInBackground(Void... params) {\n\t\t\treturn JsonOA.getWeatherInfo(cityId, timeStamp);\n\t\t}",
"@Override\n\tpublic List<MemberVO> weather() {\n\t\treturn applyDAO.weather();\n\t}",
"public Weather getDestinationWeather() {\r\n return destinationWeather;\r\n }",
"@Override\n @Cacheable(\"darkSkyWindSpeed\")\n public WeatherDataDto getWindSpeed(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String windSpeed = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"windSpeed\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setWindSpeed(windSpeed);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }",
"Conditions getConditions();",
"@Override\n public Day getCurrentDay(double lat, double lon) throws Exception {\n String tempUnitPref = sharedPref.getString(SettingsFragment.TEMP_UNIT_KEY,\"\");\n\n String res = this.httpRequester.getWeatherByCoordinates(lat, lon);\n WeatherResponse weather = this.jsonConverter.jsonToWeatherResponse(res);\n\n Day current = new Day();\n current.setLocationCity(weather.getName());\n\n switch(tempUnitPref){\n case \"Celsius\":\n current.setTemperature((float)TemperatureUnitConvertor.\n kelvinToCelsius(weather.getMain().getTemp()));\n current.setTemperatureUnit(\"C\");\n break;\n case \"Fahrenheit\":\n current.setTemperature((float)TemperatureUnitConvertor.\n kelvinToFahrenheit(weather.getMain().getTemp()));\n current.setTemperatureUnit(\"F\");\n break;\n }\n\n int weatherConditionsCode = weather.getWeather()[0].getId();\n\n current.setWeather(this.getWeatherConditionsByCode(weatherConditionsCode));\n current.setWindSpeed((float) weather.getWind().getSpeed());\n current.setLastUpdated(new Date());\n\n return current;\n }",
"public double getWeatherAPI() {\n\t\tRestAssured.baseURI= props.getProperty(\"BaseURI\");\n\t\tString response = \tgiven().log().all().header(\"Content-Type\",\"application/json\").\n\t\t\t\tqueryParam(\"q\", props.getProperty(\"city\")).\n\t\t\t\tqueryParam(\"appid\", props.getProperty(\"key\")).\n\t\t\t\tqueryParam(\"units\", props.getProperty(\"unit\"))\n\t\t\t\t.when().get(\"data/2.5/weather\")\n\t\t\t\t.then().log().all().assertThat().statusCode(200).header(\"charset\", \"UTF-8\").extract().response().asString();\n\n\n\t\tSystem.out.println(response);\n\n\t\tJsonPath json = new JsonPath(response); // parsing the String response to Json\n\t\tString temp = json.getString(\".main.temp\");\n\t\tSystem.out.println(temp);\n\t\t\n\t\tdouble tempurature = Double.parseDouble(temp);\n\t\t\n\t\treturn tempurature;\n\t\t\n\t\t\n\t\t\n\t}",
"public int getWeather(){\n return weather;\n }",
"protected String[] doInBackground(String... args) {\n //Create string xml\n String xml;\n String cityName = \"Custom Location\";\n //if statement to determine if city name or coords\n if (args.length == 1) {\n //set xml to String returned from Function.executeGet() method sending API request to http address as parameter\n xml = Function.excuteGet(\"http://api.openweathermap.org/data/2.5/weather?q=\" + args[0] +\n \"&units=metric&appid=\" + OPEN_WEATHER_MAP_API);\n\n try {\n JSONObject json = new JSONObject(xml);\n JSONObject coord = json.getJSONObject(\"coord\");\n String lat = coord.getString(\"lat\");\n String lon = coord.getString(\"lon\");\n cityName = json.getString(\"name\");\n\n xml = Function.excuteGet(\"https://api.openweathermap.org/data/2.5/onecall?lat=\" + lat + \"&lon=\" + lon + \"&exclude=minutely&units=metric&appid=\" + OPEN_WEATHER_MAP_API);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n } else {\n\n xml = Function.excuteGet(\"http://api.openweathermap.org/data/2.5/weather?lat=\" + args[0] + \"&lon=\" + args[1] +\n \"&units=metric&appid=\" + OPEN_WEATHER_MAP_API);\n try {\n\n JSONObject json = new JSONObject(xml);\n cityName = json.getString(\"name\");\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n //set xml to String returned from Function.executeGet() method sending API request to http address as parameter\n xml = Function.excuteGet(\"https://api.openweathermap.org/data/2.5/onecall?lat=\" + args[0] +\n \"&lon=\" + args[1] + \"&exclude=minutely&units=metric&appid=\" + OPEN_WEATHER_MAP_API);\n }\n\n String[] json = {xml, cityName};\n\n return json;\n }",
"private CurrentWeather getCurrentDetails(String jsonData) throws JSONException{\n JSONObject jsonObject=new JSONObject(jsonData);\n JSONObject current=jsonObject.getJSONObject(\"currently\");\n CurrentWeather currentWeather=new CurrentWeather();\n currentWeather.setIcon(current.getString(\"icon\"));\n currentWeather.setHumidity(current.getDouble(\"humidity\"));\n currentWeather.setPreipChance(current.getInt(\"precipProbability\"));\n currentWeather.setSummary(current.getString(\"summary\"));\n currentWeather.setTime(current.getLong(\"time\"));\n currentWeather.setTemperature(current.getDouble(\"temperature\"));\n currentWeather.setTimeZone(jsonObject.getString(\"timezone\"));\n String place=jsonObject.getString(\"timezone\");\n currentWeather.setPresure(current.getDouble(\"pressure\"));\n System.out.println(place);\n return currentWeather;\n }",
"public static WeatherInfo extractWeather(String response) {\n JsonParser parser = new JsonParser();\n JsonElement jsonElement = parser.parse(response);\n JsonObject rootObject = jsonElement.getAsJsonObject();\n JsonObject location = rootObject.getAsJsonObject(\"location\");\n String city = location.get(\"name\").getAsString();\n String country = location.get(\"country\").getAsString();\n JsonObject current = rootObject.getAsJsonObject(\"current\");\n Double temp = current.get(\"temp_c\").getAsDouble();\n JsonObject condition = current.getAsJsonObject(\"condition\");\n String conditionText = condition.get(\"text\").getAsString();\n return new WeatherInfo(city, country, conditionText, temp);\n}",
"public static WeatherRequest generateWeatherRequestForCurrentLocation() {\n WeatherRequest req = new WeatherRequest();\n req.setTypeCurrentLocation();\n return req;\n }",
"@GET(\"/api/\" + BuildConfig.API_KEY + \"/conditions/hourly10day/q/{zip}.json\")\n Observable<WeatherModel> fetchWeather\n (@Path(\"zip\") String zipCode);",
"@Override\n @Cacheable(\"darkSkyFullWeather\")\n public WeatherDataDto getFullWeather(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String temperature = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"temperature\"));\n String pressure = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"pressure\"));\n String windSpeed = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"windSpeed\"));\n String humidity = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"humidity\")*100);\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setTemperature(temperature);\n weatherDataDto.setPressure(pressure);\n weatherDataDto.setWindSpeed(windSpeed);\n weatherDataDto.setHumidity(humidity);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }",
"@Cacheable(\"weather\")\r\n\tpublic Weather getWeatherByCityAndCountry(String country, String city) {\n\t\tlogger.info(\"Requesting current weather for {}/{}\", country, city);\r\n\t\t\r\n\t\tURI url = new UriTemplate(WEATHER_URL).expand(city, country, this.apiKey);\r\n\t\treturn invoke(url, Weather.class);\r\n\t}",
"@Override\n protected WeatherInfo doInBackground(Void... params) {\n String weatherID = \"\";\n String areaID = \"\";\n try {\n String cityIds = null;\n if (mRequest.getRequestInfo().getRequestType()\n == RequestInfo.TYPE_WEATHER_BY_WEATHER_LOCATION_REQ) {\n cityIds = mRequest.getRequestInfo().getWeatherLocation().getCityId();\n weatherID = cityIds.split(\",\")[0];\n areaID = cityIds.split(\",\")[1];\n } else if (mRequest.getRequestInfo().getRequestType() ==\n RequestInfo.TYPE_WEATHER_BY_GEO_LOCATION_REQ) {\n double lat = mRequest.getRequestInfo().getLocation().getLatitude();\n double lng = mRequest.getRequestInfo().getLocation().getLongitude();\n\n String cityNameResponse = HttpRetriever.retrieve(String.format(GEO_URL, lat, lng));\n if (TextUtils.isEmpty(cityNameResponse)) {\n return null;\n }\n cityNameResponse = cityNameResponse.replace(\"renderReverse&&renderReverse(\", \"\").replace(\")\", \"\");\n Log.d(TAG, \"cityNameResponse\" + cityNameResponse);\n JSONObject jsonObjectCity = JSON.parseObject(cityNameResponse);\n String areaName = jsonObjectCity.getJSONObject(\"result\").getJSONObject(\"addressComponent\").getString(\"district\");\n String cityName = jsonObjectCity.getJSONObject(\"result\").getJSONObject(\"addressComponent\").getString(\"city\");\n areaName = TextUtil.getFormatArea(areaName);\n cityName = TextUtil.getFormatArea(cityName);\n City city = cityDao.getCityByCityAndArea(cityName, areaName);\n if (city == null) {\n city = cityDao.getCityByCityAndArea(cityName, cityName);\n if (city == null)\n return null;\n }\n weatherID = city.getWeatherId();\n areaID = city.getAreaId();\n } else {\n return null;\n }\n\n //miui天气\n String miuiURL = String.format(URL_WEATHER_MIUI, weatherID);\n if (DEBUG) Log.d(TAG, \"miuiURL \" + miuiURL);\n String miuiResponse = HttpRetriever.retrieve(miuiURL);\n if (miuiResponse == null) return null;\n if (DEBUG) Log.d(TAG, \"Rmiuiesponse \" + miuiResponse);\n\n //2345天气\n String ttffUrl = String.format(URL_WEATHER_2345, areaID);\n if (DEBUG) Log.d(TAG, \"ttffUrl \" + ttffUrl);\n String ttffResponse = DecodeUtil.decodeResponse(HttpRetriever.retrieve(ttffUrl));\n if (ttffResponse == null) return null;\n if (DEBUG) Log.d(TAG, \"ttffResponse \" + ttffResponse);\n\n\n JSONObject ttffAll = JSON.parseObject(ttffResponse);\n String cityName = ttffAll.getString(\"cityName\");\n //实时\n JSONObject sk = ttffAll.getJSONObject(\"sk\");\n String humidity = sk.getString(\"humidity\");\n String sk_temp = sk.getString(\"sk_temp\");\n\n //日落日升\n JSONObject sunrise = ttffAll.getJSONObject(\"sunrise\");\n\n ArrayList<WeatherInfo.DayForecast> forecasts =\n parse2345(ttffAll.getJSONArray(\"days7\"), true);\n\n WeatherInfo.Builder weatherInfo = null;\n weatherInfo = new WeatherInfo.Builder(\n cityName, sanitizeTemperature(Double.parseDouble(sk_temp), true),\n WeatherContract.WeatherColumns.TempUnit.CELSIUS);\n //湿度\n humidity = humidity.replace(\"%\", \"\");\n weatherInfo.setHumidity(Double.parseDouble(humidity));\n\n if (miuiResponse != null) {\n //风速,风向\n JSONObject weather = JSON.parseObject(miuiResponse);\n JSONObject accu_cc = weather.getJSONObject(\"accu_cc\");\n weatherInfo.setWind(accu_cc.getDouble(\"WindSpeed\"), accu_cc.getDouble(\"WindDirectionDegrees\"),\n WeatherContract.WeatherColumns.WindSpeedUnit.KPH);\n }\n\n weatherInfo.setTimestamp(System.currentTimeMillis());\n weatherInfo.setForecast(forecasts);\n\n if (forecasts.size() > 0) {\n weatherInfo.setTodaysLow(sanitizeTemperature(forecasts.get(0).getLow(), true));\n weatherInfo.setTodaysHigh(sanitizeTemperature(forecasts.get(0).getHigh(), true));\n weatherInfo.setWeatherCondition(IconUtil.getWeatherCodeByType(\n ttffAll.getJSONArray(\"days7\").getJSONObject(0).getString(\n DateTimeUtil.isNight(sunrise.getString(\"todayRise\"), sunrise.getString(\"todaySet\"))\n ? \"nightWeaShort\" : \"dayWeaShort\"), sunrise.getString(\"todayRise\"), sunrise.getString(\"todaySet\")));\n }\n\n if (lastWeatherInfo != null)\n lastWeatherInfo = null;\n\n lastWeatherInfo = weatherInfo.build();\n\n return lastWeatherInfo;\n } catch (Exception e) {\n if (DEBUG) Log.w(TAG, \"JSONException while processing weather update\", e);\n }\n return null;\n }",
"@GET(\"/v3/weather/now.json\")\n Call<City> getCity(@Query(\"key\")String key,@Query(\"location\")String location);",
"@Override\n public void requestWeatherSuccess(Weather weather, Location requestLocation) {\n try {\n if (request != null) {\n List<WeatherInfo.DayForecast> forecastList = new ArrayList<>();\n for (int i = 0; i < weather.dailyList.size(); i++) {\n forecastList.add(\n new WeatherInfo.DayForecast.Builder(\n WeatherConditionConvertHelper.getConditionCode(\n weather.dailyList.get(i).weatherKinds[0],\n true))\n .setHigh(weather.dailyList.get(i).temps[0])\n .setLow(weather.dailyList.get(i).temps[1])\n .build());\n }\n WeatherInfo.Builder builder = new WeatherInfo.Builder(\n weather.base.city,\n weather.realTime.temp,\n WeatherContract.WeatherColumns.TempUnit.CELSIUS)\n .setWeatherCondition(\n WeatherConditionConvertHelper.getConditionCode(\n weather.realTime.weatherKind,\n TimeManager.getInstance(this)\n .getDayTime(this, weather, false)\n .isDayTime()))\n .setTodaysHigh(weather.dailyList.get(0).temps[0])\n .setTodaysLow(weather.dailyList.get(0).temps[1])\n .setTimestamp(weather.base.timeStamp)\n .setHumidity(\n Double.parseDouble(\n weather.index.humidities[1]\n .split(\" : \")[1]\n .split(\"%\")[0]))\n .setWind(\n Double.parseDouble(weather.realTime.windSpeed.split(\"km/h\")[0]),\n weather.realTime.windDegree,\n WeatherContract.WeatherColumns.WindSpeedUnit.KPH)\n .setForecast(forecastList);\n\n request.complete(new ServiceRequestResult.Builder(builder.build()).build());\n }\n } catch (Exception ignore) {\n requestWeatherFailed(requestLocation);\n }\n }",
"@Override\n\tpublic Response weather(String iata, String radiusString) {\n\t\treturn null;\n\t}",
"public void updateWeatherConditions(Place p) {\n\t\ttry {\n\t\t\tWeatherCondition.deleteAllForPlace(p.getId(), db);\n\t\t\tp_id = p.getId();\n\n\t\t\tLog.d(\"WWO\", WWO_URL + WWO_NUMDAYS + \"&q=\" + p.getLatitude() + \",\"\n\t\t\t\t\t+ p.getLongitude());\n\n\t\t\tURL url = new URL(WWO_URL + WWO_NUMDAYS + \"&q=\" + p.getLatitude()\n\t\t\t\t\t+ \",\" + p.getLongitude());\n\n\t\t\tSAXParserFactory spf = SAXParserFactory.newInstance();\n\t\t\tSAXParser sp = spf.newSAXParser();\n\t\t\tXMLReader xr = sp.getXMLReader();\n\n\t\t\t// handler para lidar com o parsing do XML\n\t\t\txr.setContentHandler(this);\n\n\t\t\tURLConnection conn = url.openConnection();\n\t\t\t// os timeouts asseguram que o cliente não fica indefinidamente\n\t\t\t// bloqueado quando o servidor ou a ligação está com problemas\n\t\t\tconn.setConnectTimeout(WWO_TIMEOUT);\n\t\t\tconn.setReadTimeout(WWO_TIMEOUT);\n\t\t\tInputStream in = conn.getInputStream();\n\t\t\txr.parse(new InputSource(in));\n\n\t\t} catch (Exception e) {\n\t\t\t// FIXME e pode ser null?\n\t\t\tStackTraceElement[] st = e.getStackTrace();\n\t\t\tLog.d(\"WWO\", e.toString());\n\t\t\tfor (StackTraceElement el : st)\n\t\t\t\tLog.d(\"WWO\", el.toString());\n\t\t}\n\t}",
"public static String getCityWeatherInfos(float latitude, float longitude) {\n\t\tString urlString = \"https://api.openweathermap.org/data/2.5/weather?lat=\" + latitude \n\t\t\t\t+ \"&lon=\" + longitude + \"&appid=\" + API_KEY;\n\t\t\n\t\tStringBuilder result = new StringBuilder();\n\t\t\n\t\ttry {\n\t\t\tURL url = new URL(urlString);\n\t\t\tURLConnection conn = url.openConnection();\n\t\t\t\n\t\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n\t\t\tString line;\n\t\t\t\n\t\t\twhile ((line = rd.readLine()) != null) {\n\t\t\t\tresult.append(line);\n\t\t\t}\n\t\t\t\n\t\t\trd.close();\n\t\t\tSystem.out.println(result);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\t// TODO: handle exception\n\t\t}\t\n\t\t\tString weatherInfos = result.toString();\n\t\t\t\n\t\t\treturn weatherInfos;\n\t}",
"public ArrayList<Weather> getDarkSkyWeather(String longitude, String latitude) {\n\n Log.i(\"long: \", longitude);\n Log.i(\"lat: \", latitude);\n\n Weather weather = new Weather();\n ArrayList<Weather> weatherArr = new ArrayList<Weather>();\n ArrayList<String> temp = new ArrayList<String>();\n String content;\n try {\n content = weather.execute(\"https://api.darksky.net/forecast/a4b289aa3abfbee48b4fc1df98208a34/\"+ latitude + \",\" + longitude + \"?lang=vi&exclude=minutely,flags,currently\").get();\n\n if(content == null)\n {\n return null;\n }\n JSONObject obj = new JSONObject(content);\n\n JSONObject daily = obj.getJSONObject(\"daily\");\n JSONArray dataDaily = daily.getJSONArray(\"data\");\n\n String summary;\n String temperatureMin;\n String temperatureMax;\n String humidity;\n String windSpeed;\n String windGust;\n String airPressure;\n String visibility;\n String ozoneDensity;\n String uvIndex;\n String cloudCover;\n String precipProbability;\n String time;\n\n Bundle bundle2 = new Bundle();\n images = new Integer[dataDaily.length()];\n\n for(int i = 0; i < dataDaily.length(); i++)\n {\n Weather result = new Weather();\n\n JSONObject detail = dataDaily.getJSONObject(i);\n\n summary = detail.getString(\"summary\");\n temperatureMin = detail.getString(\"temperatureMin\");\n temperatureMax = detail.getString(\"temperatureMax\");\n precipProbability = detail.getString(\"precipProbability\");\n humidity = detail.getString(\"humidity\");\n windSpeed = detail.getString(\"windSpeed\");\n windGust = detail.getString(\"windGust\");\n airPressure = detail.getString(\"pressure\");\n visibility = detail.getString(\"visibility\");\n ozoneDensity = detail.getString(\"ozone\");\n uvIndex = detail.getString(\"uvIndex\");\n cloudCover = detail.getString(\"cloudCover\");\n time = unixTimeToDate(detail.getString(\"time\"));\n\n\n String precipProb = String.valueOf(String.format(\"%.0f\", (Float.parseFloat(precipProbability)*100))+ \"%\");\n\n // Update UI\n result.setDate(normalizeDate(time.substring(0, 10)));\n result.setWeather(summary);\n result.setDescription(\"Khả năng mưa: \" + precipProb);\n result.setTemperature(celsiusToFahrenheit(temperatureMax) + \"\\u2103\");\n result.setWind(\"Gió: \" + windSpeed + \"mph\");\n weatherArr.add(result);\n\n if(summary.toLowerCase().contains(\"quang\"))\n {\n images[i] = R.drawable.sunny;\n }\n if(summary.toLowerCase().contains(\"mưa\"))\n {\n images[i] = R.drawable.rainy;\n }\n else if (summary.toLowerCase().contains(\"âm u\"))\n {\n images[i] = R.drawable.foggy;\n }\n else if (summary.toLowerCase().contains(\"mây\"))\n {\n images[i] = R.drawable.cloudy;\n }\n else\n {\n images[i] = R.drawable.sunny;\n }\n\n\n// Bundle bundlee = new Bundle();\n// ArrayList<String> dailyData = new ArrayList<String>();\n//\n// dailyData.add(summary);\n// dailyData.add(precipProb);\n// dailyData.add(normalizeDate(time.substring(0, 10)));\n// dailyData.add(temperatureMin +\"\\u2103\");\n// dailyData.add(temperatureMax +\"\\u2103\");\n// dailyData.add(humidity + \"%\");\n// dailyData.add(windSpeed + \" mph\");\n// dailyData.add(windGust + \" mph\");\n// dailyData.add(airPressure + \" mb\");\n// dailyData.add(visibility + \" mi\");\n// dailyData.add(ozoneDensity + \" DU\");\n// dailyData.add(uvIndex);\n// dailyData.add(cloudCover);\n// dailyData.add(String.valueOf(i)); // fragment-tag\n//\n// bundlee.putStringArrayList(\"daily-data\",dailyData);\n\n\n Bundle bundle = new Bundle();\n bundle.putString(\"weather\", summary);\n bundle.putString(\"PoP\", precipProb);\n bundle.putString(\"date\", normalizeDate(time.substring(0, 10)));\n bundle.putString(\"tempMin\", temperatureMin +\"\\u2103\");\n bundle.putString(\"tempMax\", temperatureMax +\"\\u2103\");\n bundle.putString(\"humidity\", humidity + \"%\");\n bundle.putString(\"windSpeed\", windSpeed + \" mph\");\n bundle.putString(\"winGust\", windGust + \" mph\");\n bundle.putString(\"airPressure\", airPressure + \" mb\");\n bundle.putString(\"visibility\", visibility + \" mi\");\n bundle.putString(\"ozoneDensity\", ozoneDensity + \" DU\");\n bundle.putString(\"uvIndex\", uvIndex);\n bundle.putString(\"cloudCover\", cloudCover);\n bundle.putString(\"fragmentTag\", String.valueOf(i));\n\n temp.add(temperatureMin);\n\n bundleDailyArr.add(bundle);\n// bundleDailyArr.add(bundlee);\n\n// Log.i(\"Index: \", String.valueOf(i));\n// Log.i(\"summary :\", summary);\n// Log.i(\"temperatureMin :\", temperatureMin);\n// Log.i(\"temperatureMax :\", temperatureMax);\n// Log.i(\"humidity :\", humidity);\n// Log.i(\"windSpeed :\", windSpeed);\n// Log.i(\"winGust :\", windGust);\n// Log.i(\"airPressure :\", airPressure);\n// Log.i(\"visibility :\", visibility);\n// Log.i(\"ozoneDensity :\", ozoneDensity);\n// Log.i(\"uvIndex :\", uvIndex);\n// Log.i(\"cloudCover :\", cloudCover);\n// Log.i(\"cloudCover :\", \"\\n\");\n// Log.i(\"precipProbability :\", precipProbability);\n }\n\n for(int i = 0; i < temp.size(); i++)\n {\n bundle2.putString(\"temp\"+String.valueOf(i), temp.get(i));\n }\n\n\n\n// Get weather hourly\n\n JSONObject hourly = obj.getJSONObject(\"hourly\");\n JSONArray dataHourly = hourly.getJSONArray(\"data\");\n String temperature;\n\n for(int i = 0; i < dataHourly.length(); i++)\n {\n JSONObject detail = dataHourly.getJSONObject(i);\n\n temperature = detail.getString(\"temperature\");\n precipProbability = detail.getString(\"precipProbability\");\n windSpeed = detail.getString(\"windSpeed\");\n cloudCover = detail.getString(\"cloudCover\");\n\n Bundle bundle = new Bundle();\n bundle.putString(\"PoP\", precipProbability);\n //bundle.putString(\"temp\", String.valueOf((int)(Float.parseFloat(temperatureMin) + Float.parseFloat(temperatureMax) / 2)));\n bundle.putString(\"temperature\", temperature);\n bundle.putString(\"windSpeed\", windSpeed);\n bundle.putString(\"cloudCover\", cloudCover);\n bundle.putString(\"fragmentTagasd\", String.valueOf(i));\n\n\n bundleHourlyArr.putBundle(String.valueOf(i),bundle);\n\n\n Log.i(\"Hourly Index: \", String.valueOf(i));\n// Log.i(\"summary :\", summary);\n// Log.i(\"temperatureMin :\", temperatureMin);\n// Log.i(\"temperatureMax :\", temperatureMax);\n// Log.i(\"humidity :\", humidity);\n// Log.i(\"windSpeed :\", windSpeed);\n// Log.i(\"winGust :\", windGust);\n// Log.i(\"airPressure :\", airPressure);\n// Log.i(\"visibility :\", visibility);\n// Log.i(\"ozoneDensity :\", ozoneDensity);\n// Log.i(\"uvIndex :\", uvIndex);\n// Log.i(\"cloudCover :\", cloudCover);\n// Log.i(\"cloudCover :\", \"\\n\");\n// Log.i(\"precipProbability :\", precipProbability);\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return weatherArr;\n }",
"@Override\n public String getWeatherAtCoords(@PathVariable(\"lat\") String lat, @PathVariable(\"lon\") String lon, @RequestParam(value = \"period\", defaultValue = \"0\") int period) {\n byte[] bytes;\n String utfLat = null;\n String utfLon = null;\n\n try {\n // First recode lat\n bytes = lat.getBytes(\"ISO-8859-1\");\n utfLat = new String(bytes, \"UTF-8\");\n\n // Now recode lon\n bytes = lon.getBytes(\"ISO-8859-1\");\n utfLon = new String(bytes, \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n logger.error(\"Failed to handle byte encoding of url parameter\", e);\n }\n\n if (utfLat != null && utfLon != null) {\n return weatherRequest.requestWeather(utfLat, utfLon, period);\n }\n else {\n return \"Error: please try your request again!\";\n }\n }",
"String[] getRawWeatherData(String city) throws JsonSyntaxException, Exception\n\t{\n\t\tfinal String urlHalf1 = \"http://api.openweathermap.org/data/2.5/weather?q=\";\n\t\tfinal String apiCode = \"&APPID=0bc46790fafd1239fff0358dc4cbe982\";\n\n\t\tString url = urlHalf1 + city + apiCode;\n\n\t\tString[] weatherData = new String[4];\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString hitUrl = url;\n\t\tString jsonData = getJsonData(hitUrl);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject jsonObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement weather = jsonObject.get(\"weather\");\n\t\t\tJsonElement main = jsonObject.get(\"main\");\n\n\t\t\tif (weather.isJsonArray())\n\t\t\t{\n\t\t\t\tJsonArray weatherArray = weather.getAsJsonArray();\n\n\t\t\t\tJsonElement skyElement = weatherArray.get(0);\n\n\t\t\t\tif (skyElement.isJsonObject())\n\t\t\t\t{\n\t\t\t\t\tJsonObject skyObject = skyElement.getAsJsonObject();\n\n\t\t\t\t\tJsonElement skyData = skyObject.get(\"description\");\n\n\t\t\t\t\tweatherData[0] = skyData.getAsString();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (main.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject mainToObject = main.getAsJsonObject();\n\t\t\t\tSystem.out.println(mainToObject.toString());\n\n\t\t\t\tJsonElement tempMin = mainToObject.get(\"temp_min\");\n\t\t\t\tJsonElement tempMax = mainToObject.get(\"temp_max\");\n\t\t\t\tJsonElement temp = mainToObject.get(\"temp\");\n\n\t\t\t\tweatherData[1] = tempMax.getAsString();\n\t\t\t\tweatherData[2] = tempMin.getAsString();\n\t\t\t\tweatherData[3] = temp.getAsString();\n\t\t\t}\n\t\t}\n\n\t\treturn weatherData;\n\t}",
"void handleWeatherDataForCity(String cityName);",
"@Cacheable(\"darkSkyDirectionWind\")\n public WeatherDataDto getDirectionWind(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setDirectionWind(constants.getMessageDoesNotSupportField());\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }",
"@GET(\"https://api.openweathermap.org/data/2.5/weather?\")\n Call<WeatherResponse> getWeatherData(@Query(\"q\") String city, @Query(\"appid\") String apiID, @Query(\"units\") String units);",
"@RequestMapping(value = \"/weather/{cityName}\", method = RequestMethod.GET)\n public ResponseEntity<Weather> getWeatherDetails(@PathVariable(\"cityName\") String cityName)\n {\n logger.info(\"Calling getWeatherDetails() method with \" + cityName + \" as param\");\n Weather weather = weatherService.getWeather(cityName);\n\n if(weather.getCurrentObservation() == null)\n {\n logger.debug(\"NULL DATA RETURNED\");\n return new ResponseEntity<Weather>(HttpStatus.NOT_FOUND);\n }\n\n return new ResponseEntity<Weather>(weather, HttpStatus.OK);\n }",
"@Test(priority = 2)\n\tpublic void WeatherReportForParticularCity() {\n\t\ttest.homepage.searchForLocation(ReadWrite.getProperty(\"Noida_City_State\"));\n\t\ttest.currentWeatherReportPage.verifyCurrentDayAndTime();\n\t\tweatherMap = test.currentWeatherReportPage.storeInformationOfWeather();\n\n\t}",
"void getWeatherObject(WeatherObject weatherObject);",
"@Override\n @Cacheable(\"darkSkyPressure\")\n public WeatherDataDto getPressure(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String pressure = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"pressure\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setPressure(pressure);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }",
"@CrossOrigin(origins = \"*\")\n @GetMapping(\"buildings/{building_id}/floors/floor_plan\")\n public @ResponseBody\n Iterable<Sensor> searchSensorByLocation(\n @PathVariable final long building_id,\n @RequestParam final Integer floor_number,\n @RequestParam final String x_coordinate,\n @RequestParam final String y_coordinate) {\n return sensorService.searchSensorByLocation(building_id, floor_number, x_coordinate, y_coordinate);\n }",
"@Test\n\t@Title(\"TC_008: Verify that the current weather data is returned correctly when user search for the City Name\")\n\t \n\tpublic void TC_008_Verify_CurrentWeatherInfo_Is_Returned_For_ValidCity() {\n\t\t\n\t\tLocation city = new Location();\n\t\t\n\t\tcity = DataReader.RetrieveLocationFromFile(\"data.json\").get(0);\n\t\t\n\t\tcity.weather = new Weather(\"C\");\n\t\t\n\t\t//Steps:\n\t\t//1. Access to the site\n\t\tendUser.access_Site();\n\t\t\n\t\t//Search Weather by CityName\n\t\tendUser.SearchWeatherbyCityName(city);\n\t\t\n\t\t//Assume that the test application is triggering the correct API as expectation: OncCall\n\t\tcity = endUser.getWeatherInfoViaAPIResponse(city);\n\t\t\n\t\t//Validate Current Weather\n\t\tendUser.Validate_CurrentWeather(city);\n\t\t\n\t\tAssert.assertTrue(TestConfigs.glb_TCFailedMessage, TestConfigs.glb_TCStatus);\n\t}",
"public String weather() {\r\n\t\treturn weather(random.nextInt(4));\r\n\t}",
"private void updateWeather() {\n\t\tFetchWeatherTask weatherTask = new FetchWeatherTask(getActivity()); \n\t\tString location = Utility.getPreferredLocation(getActivity());\n\t\tweatherTask.execute(location); \n\t}",
"private void requestWeatherTypes() {\n SharedPreferences preferences = getSharedPreferences(CommonConstants.APP_SETTINGS, MODE_PRIVATE);\n String url = \"https://api.openweathermap.org/data/2.5/forecast?\" +\n \"id=\" + input.get(CommonConstants.ARRIVAL_CITY_ID) +\n \"&appid=\" + CommonConstants.OWM_APP_ID +\n \"&lang=\" + Locale.getDefault().getLanguage() +\n \"&units=\" + preferences.getString(CommonConstants.TEMPERATURE_UNIT, \"Standard\");\n ForecastListener listener = new ForecastListener(weatherList -> {\n try {\n WeatherTypeMapper mapper = new WeatherTypeMapper();\n fillPreview(mapper.from(weatherList));\n if (input.containsKey(CommonConstants.SELECTIONS)) {\n //noinspection unchecked\n setSelections((List<Settings.Selection>) input.get(CommonConstants.SELECTIONS));\n }\n } catch (ExecutionException | InterruptedException e) {\n Log.e(TAG, \"onSuccess: \" + e.getMessage(), e);\n }\n });\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null, listener, null);\n TravelRequestQueue.getInstance(this).addRequest(request);\n }",
"public WeatherType getPlayerWeather ( ) {\n\t\treturn extract ( handle -> handle.getPlayerWeather ( ) );\n\t}",
"public WeatherDataResponse getWeather() {\n\n return weather.get(0);\n }",
"public HashMap<String,Weather> getPrecipData() {\n HashMap<String, Weather> result = new HashMap<String, Weather>();\n //String url = NOAA.PRECIP_URL.replace(\"*STARTDATE*\", startDate).replace(\"*ENDDATE*\", endDate);\n try {\n // Get and parse the JSON\n Response res = makeRequest(NOAA.PRECIP_URL);\n JsonParser parser = new JsonParser();\n JsonArray results = parser.parse(res.body().string())\n .getAsJsonObject()\n .getAsJsonArray(\"results\");\n\n // Iterate over results, storing the values un the hashmap,\n // the key is the StationID, the value is a weather object of the\n // conditions and information about the station.\n Iterator<JsonElement> iterator = results.iterator();\n while (iterator.hasNext()) {\n JsonObject e = iterator.next().getAsJsonObject();\n String type = e.get(\"datatype\").getAsString();\n String station = e.get(\"station\").getAsString();\n String attributes = e.get(\"attributes\").getAsString();\n String date = e.get(\"date\").getAsString();\n int value = e.get(\"value\").getAsInt();\n\n result.put(station, new Weather(type, station, attributes, date, value));\n }\n return result;\n } catch (IOException e) {\n e.printStackTrace();\n } catch (IllegalStateException e) {\n e.printStackTrace();\n }\n return null;\n }",
"private void searchCity() {\n toggleProgress();\n try {\n WeatherClient client = builder.attach(this)\n .provider(new OpenweathermapProviderType())\n .httpClient(WeatherClientDefault.class)\n .config(config)\n .build();\n\n // Try to find a good location\n // using medium settings\n Criteria criteria = new Criteria();\n criteria.setPowerRequirement(Criteria.POWER_MEDIUM);\n criteria.setAccuracy(Criteria.ACCURACY_MEDIUM);\n // Can we use data?\n criteria.setCostAllowed(true);\n\n // Search city by gps/network using\n // above critera\n client.searchCityByLocation(\n criteria,\n new WeatherClient.CityEventListener() {\n\n // When we get the city list\n @Override\n public void onCityListRetrieved(List<City> cityList) {\n for (int i = 0; i < cityList.size(); i++) {\n adapter.set(cityList.get(i), i);\n }\n displayMessage(\"Not the correct results?\" +\n \" Press the button above to try again.\");\n }\n\n\n @Override\n public void onWeatherError(WeatherLibException wle) {\n displayMessage(\"There seems to be no \" +\n \"weather data, please try again later.\");\n\n }\n\n\n @Override\n public void onConnectionError(Throwable t) {\n displayMessage(\"Whoops! We can't seem to \" +\n \"connect to the weather servers.\");\n }\n\n });\n\n } catch (WeatherProviderInstantiationException e) {\n displayMessage(\"Error: Unable to access \" +\n \"the weather provider.\");\n } catch (LocationProviderNotFoundException e) {\n displayMessage(\"Whoops! Unable to access \" +\n \"location provider.\");\n } catch (NullPointerException e) {\n displayMessage(\"Whoops! We can't seem to\" +\n \"connect to the weather servers.\");\n }\n\n }",
"private synchronized void initCircumstances() {\n if (circV == null) {\n\n // Calculate visit circumstances, which includes setup time.\n Function<Long, WorldCoords> coords = getObs()::getCoords;\n int size = Math.max(1, (int) (interval.getLength() / QUANTUM));\n circV = new TreeMap<Circumstance, Double[]>();\n for (Circumstance c: Circumstance.values()) {\n circV.put(c, new Double[size]);\n }\n TimingWindowSolver tws = new TimingWindowSolver(obs);\n ImprovedSkyCalc calc = new ImprovedSkyCalc(variant.getSchedule().getSite());\n for (int i = 0; i < size; i++) {\n long t = interval.getStart() + QUANTUM * i;\n calc.calculate(coords.apply(t), new Date(t), true);\n for (Circumstance c: Circumstance.values()) {\n Double[] vals = circV.get(c);\n switch (c) {\n case AIRMASS: vals[i] = calc.getAirmass(); break;\n case AZIMUTH: vals[i] = calc.getAzimuth(); break;\n case ELEVATION: vals[i] = calc.getAltitude(); break;\n case LUNAR_DISTANCE: vals[i] = calc.getLunarDistance(); break;\n case PARALLACTIC_ANGLE: vals[i] = calc.getParallacticAngle(); break;\n case TOTAL_SKY_BRIGHTNESS: vals[i] = calc.getTotalSkyBrightness(); break;\n case HOUR_ANGLE: vals[i] = calc.getHourAngle(); break;\n case TIMING_WINDOW_OPEN: vals[i] = tws.includes(t) ? 1. : 0.; break;\n default: throw new Error(\"Missing switch case for \" + c);\n }\n }\n }\n\n // Now calculate circumstances for science.\n if (getSetupType() != SetupType.NONE) {\n\n circS = new TreeMap<Circumstance, Double[]>();\n final long setupTime = getSetupTime();\n\n for (Circumstance c: Circumstance.values()) {\n\n Double[] valsV = circV.get(c);\n Double[] valsS = new Double[valsV.length];\n\n // We want to copy the range n ... length where n is the first\n // quantum that's not during setup time, or the last sample, so\n // we guarantee at least one.\n int n = Math.min((int) (setupTime / QUANTUM), valsV.length - 1);\n System.arraycopy(valsV, n, valsS, n, valsV.length - n);\n\n circS.put(c, valsS);\n\n }\n\n } else {\n\n // Science and visit circumstances are the same if there is no setup.\n circS = circV;\n\n }\n\n }\n }",
"public void getCityResult() {\n String cityNameStr = TextUtils.isEmpty(cityName) ? \"Halifax\" : cityName;\n final String url = \"http://api.openweathermap.org/data/2.5/weather?q=\" + cityNameStr + \"&appid=\" + API_KEY + \"&units=\" + CELSIUS_UNITS;\n //build the request\n JsonObjectRequest request = new JsonObjectRequest(\n Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray weather = response.getJSONArray(\"weather\");\n JSONObject main = response.getJSONObject(\"main\");\n JSONObject cloudsJSON = response.getJSONObject(\"clouds\");\n\n //Set values on layout\n setCityNameOnLayout(response);\n setWeather(weather);\n setTemperature(main);\n setMinMaxTemperature(main);\n setHumidity(main);\n setClouds(cloudsJSON);\n setWeatherIcon((weather.getJSONObject(0)).get(\"icon\").toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n\n Toast.makeText(getApplicationContext(), \"Please, introduce an existing city\", Toast.LENGTH_SHORT).show();\n }\n }\n );\n RequestQueueSingleton.getInstance(getApplicationContext()).addToRequestQueue(request);\n }",
"private void getHttpResponse() {\n String url = \"https://api.openweathermap.org/data/2.5/weather?id=\"+city.getId()+\"&units=metric&appid=77078c41435ef3379462eb28afbdf417\";\n\n Request request = new Request.Builder()\n .url(url)\n .header(\"Accept\", \"application/json\")\n .header(\"Content-Type\", \"application/json\")\n .build();\n\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n String message = e.getMessage();\n System.out.println(message);\n }\n\n /**\n * Update the UI with the information\n * @param call\n * @param response\n * @throws IOException\n */\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n String body = response.body().string();\n\n Gson gson = new Gson();\n CityInfoDto cityInfo = gson.fromJson(body, CityInfoDto.class);\n\n setNewValues(Math.round(cityInfo.main.temp), cityInfo.weather[0].main);\n setBackground();\n }\n });\n }",
"public WeatherAPI(double lat, double lon) throws IOException{\n\t\tapiUrl = \"http://api.openweathermap.org/data/2.5/weather?lat=\" + lat + \"&lon=\" + lon + \"&appid=\" + apiKey + \"&lang=\" + \"de\" + \"&units=metric\";\n\n\t\tresponse = HTMLGET.getHTML(apiUrl);\n\n\t\tJSONObject apiResponseJSON = new JSONObject(response);\n\t\ttempInCelsius = \t\t\tapiResponseJSON.getJSONObject(\"main\").getDouble(\"temp\") + \"\";\n\t\tfeelsLikeTempInCelsius = \tapiResponseJSON.getJSONObject(\"main\").getDouble(\"feels_like\") + \"\";\n\t\tpressure = \t\t\t\t\tapiResponseJSON.getJSONObject(\"main\").getInt(\"pressure\") + \"\";\n\t\thumidity = \t\t\t\t\tapiResponseJSON.getJSONObject(\"main\").getInt(\"humidity\") + \"\";\n\t\t\n\t\twindSpeed = \tapiResponseJSON.getJSONObject(\"wind\").getDouble(\"speed\") + \"\";\n\t\twindDirection = apiResponseJSON.getJSONObject(\"wind\").getInt(\"deg\") + \"\";\n\t\t\n\t\tcloudiness = apiResponseJSON.getJSONObject(\"clouds\").getInt(\"all\") + \"\";\n\t\t\n\t\tmain = \t\t\tapiResponseJSON.getJSONArray(\"weather\").getJSONObject(0).getString(\"main\") + \"\";\n\t\tdescription = \tapiResponseJSON.getJSONArray(\"weather\").getJSONObject(0).getString(\"description\") + \"\";\n\t\tweatherID = \tapiResponseJSON.getJSONArray(\"weather\").getJSONObject(0).getInt(\"id\") + \"\";\n\t\tweatherIcon =\tapiResponseJSON.getJSONArray(\"weather\").getJSONObject(0).getString(\"icon\") + \"\";\n\t\ttimeOfCreation = System.currentTimeMillis() / 1000L;;\n\t}",
"public void setCondition(WeatherCondition condition) {\n this.condition = condition;\n }",
"@GET(\"weather?APPID=bec2ea2f434c848c09196f2de96e3c4c&units=metric\")\n Single<Weather> getWeatherData(@Query(\"q\") String name);",
"public WeatherData getCurLocCacheData() {\n return reqCurLocCacheData;\n }",
"@Cacheable(\"darkSkyCityCoordinates\")\n public WeatherDataDto getCityCoordinates(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String latitude = String.valueOf(jsonObject\n .getDouble(\"latitude\"));\n String longitude = String.valueOf(jsonObject\n .getDouble(\"longitude\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setLatitude(latitude);\n weatherDataDto.setLongitude(longitude);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }",
"@Override\n public Single<WeatherData> getForecastData(@NonNull final Location location) {\n return Single.just(true)\n .observeOn(Schedulers.io())\n .flatMap(aBoolean -> api.getForecast(apiKey, location.latitude(), location.longitude(), EXCLUDE_DATA_BLOCKS, \"ca\"));\n }",
"public static WeatherRequest generateWeatherRequestForCurrentLocationWithCurCacheData(Context context) {\n \tWeatherRequest req = generateWeatherRequestForCurrentLocation();\n \n WeatherData curInCache = _getCurCacheData(context, req);\n if (curInCache == null) {\n Log.w(LOG_TAG, \"Generate request for cur loc with cur in db, but there is no cur in db. (Called from Force update or Auto-sync)\");\n return null;\n }\n \n req.setReqCurLoc(curInCache.getCurLocLat(), curInCache.getCurLocLng(), curInCache.getCurLocLatTrim(), curInCache.getCurLocLngTrim(), \n curInCache.getCurLocName(), curInCache.getCurLocState(), curInCache.getCurLocCountry(), curInCache.getCurLocTimezoneId(), null);\n \n return req;\n }",
"public String getSkyCondition() {\n\t\treturn skyCondition;\n\t}",
"@Cacheable(\"darkSkyTemperature\")\n public WeatherDataDto getTemperature(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String temperature = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"temperature\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(getServiceName());\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setTemperature(temperature);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }",
"@Override\n public List<Object> getBatteryLogByLocation(Map<String, Object> condition) {\n return null;\n }",
"private List<WeatherStation> getWeatherStations(){\n List<WeatherStation> weatherStations = new ArrayList<>();\n List<String> weatherStationList = new ArrayList<>();\n weatherStationList.add(Constants.STATION_CODE_ADELAIDE);\n weatherStationList.add(Constants.STATION_CODE_BRISBANE);\n weatherStationList.add(Constants.STATION_CODE_CAIRNS);\n weatherStationList.add(Constants.STATION_CODE_CANBERRA);\n weatherStationList.add(Constants.STATION_CODE_DARWIN);\n weatherStationList.add(Constants.STATION_CODE_GOLD_COAST);\n weatherStationList.add(Constants.STATION_CODE_HOBART);\n weatherStationList.add(Constants.STATION_CODE_MELBOURNE);\n weatherStationList.add(Constants.STATION_CODE_PERTH);\n weatherStationList.add(Constants.STATION_CODE_SYDNEY);\n\n for(String weatherStationCode : weatherStationList){\n weatherStations.add(WeatherStationFactory.getWeatherStation(weatherStationCode));\n }\n return weatherStations;\n }",
"public void updateCurrentConditions(Forcast weatherData) {\n // If the view doesn't exist, an error will occur because we are calling it below. Return to prevent this.\n if (getView() == null || !isAdded()) {\n return;\n }\n\n /**\n * Fetch all the text views to populate them below.\n */\n TextView currentTempLabel = (TextView) getView().findViewById(R.id.text_current_temp);\n TextView currentConditionLabel = (TextView) getView().findViewById(R.id.text_current_condition);\n TextView currentPrecipitationLabel = (TextView) getView().findViewById(R.id.text_current_precipitation);\n TextView currentWindLabel = (TextView) getView().findViewById(R.id.text_wind_speed);\n TextView todayHighTempLabel = (TextView) getView().findViewById(R.id.text_today_high);\n TextView todayLowTempLabel = (TextView) getView().findViewById(R.id.text_today_low);\n ImageView weatherIcon = (ImageView) getView().findViewById(R.id.weatherIcon);\n\n /**\n * Fetch all the data.\n */\n String summary = weatherData.getCurrently().getSummary();\n long currentTemp = Math.round(weatherData.getCurrently().getTemperature());\n long precipitation = Math.round(weatherData.getCurrently().getPrecipProbability());\n long lowTemp = Math.round(weatherData.getDaily().getData().get(0).getTemperatureMin());\n long highTemp = Math.round(weatherData.getDaily().getData().get(0).getTemperatureMax());\n long windSpeed = Math.round(weatherData.getCurrently().getWindSpeed());\n\n\n\n /**\n * Populate all the text views.\n */\n currentConditionLabel.setText(summary);\n currentPrecipitationLabel.setText(getString(R.string.weather_percent, precipitation));\n currentTempLabel.setText(getString(R.string.weather_temperature, currentTemp));\n todayHighTempLabel.setText(getString(R.string.weather_temperature, highTemp));\n todayLowTempLabel.setText(getString(R.string.weather_temperature, lowTemp));\n currentWindLabel.setText(getString(R.string.weather_wind, windSpeed));\n\n }",
"public CurrentConditionsDisplay(Subject weatherData) {\n\t\tthis.weatherData = weatherData;\n\t\tweatherData.registerObserver(this);\n\t}",
"public void windChillIndex()\n {\n\n System.out.print( \"Enter the damn wind speed: \" );\n double v = scan.nextDouble();\n System.out.print( \"Enter the darn temperature: \" );\n double t = scan.nextDouble();\n double wci;\n if ( 0 <= v && v <= 4 )\n {\n wci = t;\n System.out.println( \"The wind chill index is: \" + wci );\n }\n if ( v >= 45 )\n {\n wci = 1.6 * t - 55;\n System.out.println( \"The wind chill index is: \" + wci );\n }\n wci = 91.4 + ( 91.4 - t )\n * ( 0.0203 * v - 0.304 * Math.sqrt( (double)v ) - 0.474 );\n System.out.println( \"The wind chill index is: \" + wci );\n\n }",
"Map<String, ISensor> getSensorMap();",
"public interface IWeatherProvider {\r\n\r\n public CurrentWeather getCurrentCondition(String data) throws WeatherLibException;\r\n\r\n public WeatherForecast getForecastWeather(String data) throws WeatherLibException;\r\n\r\n public List<City> getCityResultList(String data) throws WeatherLibException;\r\n\r\n public WeatherHourForecast getHourForecastWeather(String data) throws WeatherLibException;\r\n\r\n public String getQueryCityURL(String cityNamePattern) throws ApiKeyRequiredException;\r\n\r\n // public String getQueryCurrentWeatherURL(String cityId) throws ApiKeyRequiredException;\r\n\r\n // public String getQueryForecastWeatherURL(String cityId) throws ApiKeyRequiredException;\r\n\r\n public HistoricalWeather getHistoricalWeather(String data) throws WeatherLibException;\r\n\r\n public String getQueryCityURLByLocation(Location location) throws ApiKeyRequiredException;\r\n\r\n public String getQueryCityURLByCoord(double lon, double lat) throws ApiKeyRequiredException;\r\n\r\n\r\n public void setConfig(WeatherConfig config);\r\n\r\n public void setWeatherCodeProvider(IWeatherCodeProvider codeProvider);\r\n\r\n public String getQueryImageURL(String weatherId) throws ApiKeyRequiredException;\r\n\r\n //public String getQueryHourForecastWeatherURL(String cityId) throws ApiKeyRequiredException;\r\n\r\n //public String getQueryHistoricalWeatherURL(String cityId, Date startDate, Date endDate) throws ApiKeyRequiredException;\r\n\r\n public String getQueryLayerURL(String cityId, Params params) throws ApiKeyRequiredException;\r\n\r\n\r\n\r\n public String getQueryCurrentWeatherURL(WeatherRequest request) throws ApiKeyRequiredException;\r\n\r\n public String getQueryForecastWeatherURL(WeatherRequest request) throws ApiKeyRequiredException;\r\n\r\n public String getQueryHourForecastWeatherURL(WeatherRequest request) throws ApiKeyRequiredException;\r\n\r\n public String getQueryHistoricalWeatherURL(WeatherRequest request, Date startDate, Date endDate) throws ApiKeyRequiredException;\r\n\r\n}",
"public void updateWeather(double lat, double lon){\n String appId = getString(R.string.owmapikey);\n\n new ConnectionTask().execute(\"http://api.openweathermap.org/data/2.5/weather?units=metric&lat=\" + lat +\"&lon=\" + lon + \"&appId=\" + appId, \"current\");\n new ConnectionTask().execute(\"http://api.openweathermap.org/data/2.5/forecast?units=metric&lat=\" + lat +\"&lon=\" + lon + \"&appId=\" + appId + \"&cnt=24\", \"forecast\");\n\n }",
"private WeatherUnit getWeather(long time, int stack) {\n if (time < 0) return null;\n\tString sidx = Data.stringDateTime(Main.WATCH*(time/Main.WATCH));\n if (sidx == null) return null; // No calendar present\n\tWeatherUnit weath = (WeatherUnit) availWeath.get(sidx);\n\t// Weather unit isn't there yet.\n\tif (weath == null) {\n\t if (stack > 0) {\n\t\tWeatherUnit old = getWeather(time - main.WATCH, stack - 1);\n if (old != null)\n weath = new WeatherUnit(old, time);\n else\n weath = new WeatherUnit(time);\n\t }\n\t else {\n\t\tweath = new WeatherUnit(time);\n\t }\n\t changed = true;\n\t setDirty(true);\n\t availWeath.put(sidx, weath);\n\n\t // Get parent in DOM document\n\t Node parent = stateDoc.getDocumentElement();\n\n\t // Put into DOM document\n\t Element nn = stateDoc.createElement(\"date\");\n\t nn.setAttribute(\"name\", Data.stringDateTime(time));\n\t weath.setAttributes(nn);\n\t parent.appendChild(nn);\n\t}\n\treturn weath;\n }",
"IConditionsRequest getConditionsRequest(String location, IRequestListener listener);",
"public List<WeatherModel> getPastWeather() {\n return getPastWeather(5);\n }",
"@Override\n public WeatherData getCurrentWeather(String location)\n throws RemoteException {\n WeatherData weatherResult = Utils.getResult(location, getApplicationContext());\n\n if (weatherResult != null) {\n Log.d(TAG, \"\"\n + weatherResult.toString()\n + \" result for location: \"\n + location);\n\n // Return the weather data back\n return weatherResult;\n } else {\n return null;\n }\n }",
"net.webservicex.www.WeatherForecasts getWeatherForecasts();",
"@Override\n public List<Object> getMiniChartCommStatusByLocation(\n Map<String, Object> condition) {\n return null;\n }",
"public static Weather getNextCityWeather(){\r\n\t\t/*\r\n\t\t * While weatherDetails is getting updated with background\r\n\t\t * Handler, it shouldn't be read\r\n\t\t */\r\n\t\tsynchronized (weatherDetails) {\r\n\t\t\tString code = airportCodes.get(city_index);\r\n\t\t\tLog.i(\"WeatherRecord\", \"Display Weather of: \"+ code+ \" \"+ airportCodes.size());\r\n\t\t\tcity_index++;\r\n\t\t\tif(city_index >= airportCodes.size())\r\n\t\t\t\tcity_index = 0;\r\n\t\t\tWeather w = weatherDetails.get(code);\r\n\t\t\treturn w;\r\n\t\t}\r\n\t}",
"@Override\n public City getStatsByCity(String name) throws UnirestException {\n City cityWeather = new City();\n JSONObject object = weatherService.getWeatherByCity(name);\n Coord coord = formatObject(\"coord\",object,Coord.class);\n Wind wind = formatObject(\"wind\",object,Wind.class);\n\n Clouds clouds = formatObject(\"clouds\",object,Clouds.class);\n MainStats mainStats = formatObject(\"main\",object,MainStats.class);\n JSONObject objectWeather = object.getJSONArray(\"weather\").getJSONObject(0);\n Weather weather = mapWeather(objectWeather);\n cityWeather.setCoord(coord);\n cityWeather.setWeather(weather);\n cityWeather.setWind(wind);\n cityWeather.setClouds(clouds);\n cityWeather.setName(object.getString(\"name\"));\n cityWeather.setTimezone(object.getInt(\"timezone\"));\n cityWeather.setCod(object.getInt(\"cod\"));\n cityWeather.setVisibility(object.getInt(\"visibility\"));\n return cityWeather;\n }",
"public static String getWeather(String weatherInfos) {\n\t\tJSONObject weatherAsJson = new JSONObject(weatherInfos);\n\t\t\n\t\tJSONArray arr = weatherAsJson.getJSONArray(\"weather\");\n\t\t\n\t\tString weather = arr.getJSONObject(0).getString(\"main\");\n\t\t//System.out.println(weather);\n\t\treturn weather;\n\t}",
"@Override\n @Cacheable(\"darkSkyHumidity\")\n public WeatherDataDto getHumidity(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String humidity = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"humidity\")*100);\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setHumidity(humidity);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }",
"@Override\n\tpublic void startElement(String namespaceURI, String localName,\n\t\t\tString qName, Attributes atts) throws SAXException {\n\n\t\t// abertura da tag \"weather\" ou \"current_condition\"\n\t\tif (localName.equals(\"weather\")) {\n\t\t\tcv = new ContentValues();\n\t\t\tcv.put(WeatherCondition.ID_PLACE, p_id);\n\t\t\tin_weather = true;\n\t\t}\n\n\t\tif (localName.equals(\"current_condition\")) {\n\t\t\tcv = new ContentValues();\n\t\t\tcv.put(WeatherCondition.ID_PLACE, p_id);\n\t\t\tin_current_condition = true;\n\t\t}\n\n\t\t// tag com o URL da imagem da condição\n\t\tif (localName.equals(\"weatherIconUrl\"))\n\t\t\tin_img = true;\n\n\t\t// tag com a temperatura (para condições actuais)\n\t\tif (localName.equals(\"temp_C\"))\n\t\t\tin_temp_c = true;\n\n\t\t// tag com temperatura máxima (para previsões)\n\t\tif (localName.equals(\"tempMaxC\"))\n\t\t\tin_temp_max_c = true;\n\n\t\t// tag com temperatura mínima (para previsões)\n\t\tif (localName.equals(\"tempMinC\"))\n\t\t\tin_temp_min_c = true;\n\n\t\tif (localName.equals(\"observation_time\") || localName.equals(\"date\"))\n\t\t\tin_observation_time = true;\n\n\t\tif (localName.equals(\"weatherDesc\"))\n\t\t\tin_weather_desc = true;\n\n\t\tif (localName.equals(\"windspeedMiles\"))\n\t\t\tin_windspeed_miles = true;\n\n\t\tif (localName.equals(\"windspeedKmph\"))\n\t\t\tin_windspeed_kmph = true;\n\n\t\tif (localName.equals(\"winddir16Point\")\n\t\t\t\t|| localName.equals(\"winddirection\"))\n\t\t\tin_winddir = true;\n\n\t\tif (localName.equals(\"precipMM\"))\n\t\t\tin_precip_mm = true;\n\n\t\tif (localName.equals(\"humidity\"))\n\t\t\tin_humidity = true;\n\t}",
"@Override\n\tpublic String getWeatherDataCity(String city, String country) throws IOException {\n\n\t\treturn connectAPICity(city, country);\n\t\t\n\t}",
"public String windCondition(String type, WeatherUnit weath) {\n\tint w = weath.speedindex;\n\n\t// low wind\n\tif (type.equals(\"inland\") && w <= 3 ||\n\t type.equals(\"coastal\") && w <= 2 ||\n\t type.equals(\"open\") && w <= 1 ||\n\t weath.event.equals(\"fog\"))\n\t return weath.winddir + \":\" + weath.windspeed.substring(0,1);\n\t// high wind\n\tif (type.equals(\"inland\") && w >= 3 ||\n\t type.equals(\"coastal\") && w >= 2 ||\n\t type.equals(\"open\") && w >= 1)\n\t return weath.winddir + \":\" + weath.windspeed.substring(2,3);\n\n\t// average wind\n\tint le = Integer.parseInt(weath.windspeed.substring(0,1));\n\tint he = Integer.parseInt(weath.windspeed.substring(2,3));\n\treturn weath.winddir + \":\" + ((le + he)/2);\n }",
"private Coordinate getCoordinate(String sensorLocation) throws IOException,\n InterruptedException {\n String[] words = sensorLocation.split(\"\\\\.\");\n\n var locationUrl = String.format(\n \"%swords/%s/%s/%s/details.json\", this.baseUrl, words[0], words[1],\n words[2]);\n\n var response = this.gson.fromJson(this.getResponse(locationUrl), JsonObject.class);\n var coords = response.get(\"coordinates\").getAsJsonObject();\n var coordinate = new Coordinate(\n coords.get(\"lng\").getAsDouble(),\n coords.get(\"lat\").getAsDouble());\n\n return coordinate;\n }",
"double getStation();",
"@Override\n public List<Object> getMiniChartLocationByCommStatus(\n Map<String, Object> condition) {\n return null;\n }",
"@Override\n public void run() {\n for(int i=0;i<TheWeatherMan.WEATHER_CHECKS; i++) {\n\n // Have some delay\n try {\n Thread.sleep(1000* startTime);\n } catch (InterruptedException e) {\n System.out.println(\"『 Weather Report 』 Pacific has gone berserk and cant sleep.\\n\" +\n \"Terminating Program...\");\n System.exit(1);\n }\n\n /**\n * Handling Different City Temperatures -------------------------------------------\n */\n\n\n // Handling Singapore Temperatures\n if(cityName == \"Singapore\") {\n\n // Generates a random number between -.3 and .3\n double randNum = (Math.random() * (.6)) - .3;\n // Formats decimals to 2 places\n DecimalFormat df = new DecimalFormat(\"#.##\");\n\n cityTemperature = Double.valueOf(df.format((cityTemperature + randNum)));\n // Set Temp\n ((Satellite) satellite).setWeather1(cityTemperature);\n }\n\n // Handling Melbourne Temperatures\n if(cityName == \"Melbourne\") {\n Random random = new Random();\n double temp = (double) random.nextInt(45) + random.nextDouble();\n\n cityTemperature = temp;\n // Set Temp\n ((Satellite) satellite).setWeather2(cityTemperature);\n }\n\n // Handling Shanghai Temperatures\n if(cityName == \"Shanghai\") {\n\n // Fluctuate +-5\n Random random = new Random();\n double temp = ((double) random.nextInt(5) +\n random.nextDouble()) * (random.nextBoolean() ? 1 : -1);\n\n\n cityTemperature = cityTemperature + temp;\n // Set Temp\n ((Satellite) satellite).setWeather3(cityTemperature);\n }\n\n }\n }"
] |
[
"0.60750115",
"0.5894625",
"0.5789861",
"0.5764242",
"0.5747412",
"0.57180727",
"0.56975526",
"0.567478",
"0.5496671",
"0.5467048",
"0.53828365",
"0.5362221",
"0.5334541",
"0.5284719",
"0.5268215",
"0.5265438",
"0.524225",
"0.5209371",
"0.5201199",
"0.5188813",
"0.51567477",
"0.5152124",
"0.5096029",
"0.50725704",
"0.5068887",
"0.5065286",
"0.50536245",
"0.50230885",
"0.50224227",
"0.5014206",
"0.50084937",
"0.49984416",
"0.49961865",
"0.49924532",
"0.49760163",
"0.49607015",
"0.49449676",
"0.4943108",
"0.49402615",
"0.493547",
"0.49249998",
"0.49248186",
"0.49209923",
"0.48936468",
"0.48929936",
"0.48819345",
"0.48811734",
"0.48801607",
"0.48794344",
"0.48739403",
"0.4870474",
"0.48663956",
"0.48556086",
"0.48547438",
"0.48005813",
"0.47974017",
"0.47899163",
"0.47858474",
"0.47759035",
"0.47731993",
"0.47711658",
"0.4768547",
"0.4760884",
"0.4750557",
"0.47503898",
"0.47496364",
"0.47489578",
"0.47486657",
"0.4745485",
"0.47442746",
"0.47434643",
"0.47239715",
"0.47223964",
"0.4719684",
"0.47189224",
"0.47111467",
"0.46991754",
"0.46920002",
"0.4677014",
"0.46713498",
"0.46676388",
"0.46611992",
"0.465531",
"0.46464404",
"0.46463904",
"0.46448818",
"0.46364737",
"0.46300784",
"0.4625035",
"0.46155393",
"0.46123144",
"0.4609669",
"0.460966",
"0.45981744",
"0.45935866",
"0.4586911",
"0.45713302",
"0.4564638",
"0.45606843",
"0.4558106"
] |
0.623382
|
0
|
This method defines a way got getting the daily weather forecast conditions for a given coordinate.
|
public abstract WeatherData[] getDailyWeatherForecast(LocationCoordinate _location) throws Exception;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public abstract WeatherData[] getHourlyWeatherForecast(LocationCoordinate _location) throws Exception;",
"private static void getWeatherDataForInputValues(BigDecimal lat, BigDecimal lon) throws RemoteException{\n\t\t\n\t\tCalendar time = new GregorianCalendar();\t\t\t\t// Pass this as a GregorianCalendar for the Calendar to understand\n\t\ttime.setTime(new Date());\n\t\tSystem.out.println(\"Fetaching data from SOAP Web Service... Please wait\");\n\t\tString result = proxy.NDFDgen(lat,lon,\"time-series\",time,time,\"e\",wp);\n\t\tDocument dom= convertStringToDocument(result);\n\t\ttry{\n\t\t\t//Displaying the result on the output screen\n\t\t\tXPathFactory xpathFactory = XPathFactory.newInstance();\n\t\t\tXPath xpath = xpathFactory.newXPath();\n\t\t\tSystem.out.println(\"Minimum Temperature: \"+getValuesFromDom(dom,xpath,\"temperature[@type='minimum']\")); //print the minimum temp\n\t\t\tSystem.out.println(\"Maximum Temperature: \"+getValuesFromDom(dom,xpath,\"temperature[@type='maximum']\")); // print the maximum temp\n\t\t\tSystem.out.println(\"Wind Direction: \"+getValuesFromDom(dom,xpath,\"direction\")); // print the wind direction\n\t\t\tSystem.out.println(\"Wind Speed: \"+getValuesFromDom(dom,xpath,\"wind-speed\")); // print the wind speed\n\t\t\tSystem.out.println(\"Temperature Dew point: \"+getValuesFromDom(dom,xpath,\"temperature[@type='dew point']\")); // print the dew point temperature\n\t\t\tSystem.out.println(\"12 Hour Probability of Precipitation:\"+getValuesFromDom(dom,xpath,\"probability-of-precipitation\"));\n\t\t\tString command = isRefreshed();\n\t\t\tif(command.trim().toLowerCase().equals(\"yes\")){\n\t\t\t\t\n\t\t\t\tgetWeatherDataForInputValues(lat,lon);\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public abstract WeatherData getCurrentWeather(LocationCoordinate _location) throws Exception;",
"private static boolean fetchYahooWeather() {\n try {\n SAXParserFactory spf = SAXParserFactory.newInstance();\n spf.setNamespaceAware(true);\n SAXParser parser = spf.newSAXParser();\n \n String yql_format = String.format(\"select %%s from %%s where woeid in (select woeid from geo.places(1) where text=\\\"%s, %s\\\")\", CITY, ST);\n \n /* Fetch Wind Data (temp, windDir, and windSpeed) */\n String yql_wind = String.format(yql_format, \"wind\", \"weather.forecast\");\n String url_wind = String.format(\"https://query.yahooapis.com/v1/public/yql?q=%s&format=xml&u=f\", URLEncoder.encode(yql_wind, \"UTF-8\"));\n \n DefaultHandler wind_handler = new DefaultHandler() {\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n //System.out.printf(\"uri=%s\\nlocalName=%s\\nqName=%s\\nattributes=%s\\n\\n\", uri, localName, qName, attributes);\n if (!qName.equals(\"yweather:wind\")) return;\n \n temp = Integer.parseInt(attributes.getValue(\"chill\"));\n \n int dir = Integer.parseInt(attributes.getValue(\"direction\")); // number from 0-359 indicating direction\n // I began writing an if tree, then remembered I was lazy.\n String[] dir_words = new String[] {\n \"east\", \"northeast\", \"north\", \"northwest\", \"west\", \"southwest\", \"south\", \"southeast\"\n };\n windDir = dir_words[dir/45];\n \n windSpeed = Integer.parseInt(attributes.getValue(\"speed\")); // speed in mph\n }\n };\n parser.parse(url_wind, wind_handler);\n \n /* Fetch Atronomy Data (sunriseHour and sunsetHour) */\n String yql_astro = String.format(yql_format, \"astronomy\", \"weather.forecast\");\n String url_astro = String.format(\"https://query.yahooapis.com/v1/public/yql?q=%s&format=xml&u=f\", URLEncoder.encode(yql_astro, \"UTF-8\"));\n \n DefaultHandler astro_handler = new DefaultHandler() {\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n //System.out.printf(\"uri=%s\\nlocalName=%s\\nqName=%s\\nattributes=%s\\n\\n\", uri, localName, qName, attributes);\n if (!qName.equals(\"yweather:astronomy\")) return;\n \n sunriseHour = Util.parseTime(attributes.getValue(\"sunrise\"));\n sunsetHour = Util.parseTime(attributes.getValue(\"sunset\"));\n \n }\n };\n parser.parse(url_astro, astro_handler);\n \n /* Fetch Description Data (sky) */\n String yql_sky = String.format(yql_format, \"item.condition.text\", \"weather.forecast\");\n String url_sky = String.format(\"https://query.yahooapis.com/v1/public/yql?q=%s&format=xml&u=f\", URLEncoder.encode(yql_sky, \"UTF-8\"));\n \n DefaultHandler sky_handler = new DefaultHandler() {\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n //System.out.printf(\"uri=%s\\nlocalName=%s\\nqName=%s\\nattributes=%s\\n\\n\", uri, localName, qName, attributes);\n if (!qName.equals(\"yweather:condition\")) return;\n \n sky = attributes.getValue(\"text\").toLowerCase();\n \n }\n };\n parser.parse(url_sky, sky_handler);\n \n return E.sky != null;\n \n } catch (java.net.UnknownHostException uhe) {\n if (Data.DEBUG) System.err.println(\"You are offline!\");\n return false;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }",
"void getForecastInitially(DarkSkyApi api, PlaceWeather weather){\n\n long newWeatherPlaceId = databaseInstance.weatherDao().insertPlaceWeather(weather);\n\n weather.getDaily().setParentPlaceId(newWeatherPlaceId);\n databaseInstance.weatherDao().insertDaily(weather.getDaily());\n\n List<DailyData> dailyData = weather.getDaily().getData();\n\n for(int i = 0; i < dailyData.size(); ++i){\n dailyData.get(i).setParentPlaceId(newWeatherPlaceId);\n dailyData.get(i).setId(\n databaseInstance.weatherDao().insertDailyData(dailyData.get(i))\n );\n }\n\n long currentDayId = dailyData.get(0).getId();\n\n weather.getHourly().setParentDayId(currentDayId);\n databaseInstance.weatherDao().insertHourly(weather.getHourly());\n\n List<HourlyData> hourlyData = weather.getHourly().getData();\n\n for(int i = 0; i < hourlyData.size(); ++i){\n hourlyData.get(i).setParentDayId(currentDayId);\n databaseInstance.weatherDao().insertHourlyData(hourlyData.get(i));\n }\n\n //now load hours of next 7 days initially\n String apiKey = context.getString(R.string.api_key);\n Map<String, String> avoid = new HashMap<>();\n avoid.put(\"units\", \"si\");\n avoid.put(\"lang\", \"en\");\n avoid.put(\"exclude\", \"alerts,daily\");\n\n\n PlaceWeather dayWeather;\n for(int i = 1; i < dailyData.size(); ++i){\n try{\n dayWeather = api.getTimeForecast(apiKey,\n weather.getLatitude(),\n weather.getLongitude(),\n dailyData.get(i).getTime()+1,\n avoid).execute().body();\n }catch (IOException e){\n break;\n }\n\n dayWeather.getHourly().setParentDayId(dailyData.get(i).getId());\n dayWeather.getHourly().setId(\n databaseInstance.weatherDao().insertHourly(dayWeather.getHourly())\n );\n\n hourlyData = dayWeather.getHourly().getData();\n\n for(int j = 0; j < hourlyData.size(); ++j){\n hourlyData.get(j).setParentDayId(dailyData.get(i).getId());\n databaseInstance.weatherDao().insertHourlyData(hourlyData.get(j));\n }\n }\n\n }",
"@Override\n public Day getCurrentDay(double lat, double lon) throws Exception {\n String tempUnitPref = sharedPref.getString(SettingsFragment.TEMP_UNIT_KEY,\"\");\n\n String res = this.httpRequester.getWeatherByCoordinates(lat, lon);\n WeatherResponse weather = this.jsonConverter.jsonToWeatherResponse(res);\n\n Day current = new Day();\n current.setLocationCity(weather.getName());\n\n switch(tempUnitPref){\n case \"Celsius\":\n current.setTemperature((float)TemperatureUnitConvertor.\n kelvinToCelsius(weather.getMain().getTemp()));\n current.setTemperatureUnit(\"C\");\n break;\n case \"Fahrenheit\":\n current.setTemperature((float)TemperatureUnitConvertor.\n kelvinToFahrenheit(weather.getMain().getTemp()));\n current.setTemperatureUnit(\"F\");\n break;\n }\n\n int weatherConditionsCode = weather.getWeather()[0].getId();\n\n current.setWeather(this.getWeatherConditionsByCode(weatherConditionsCode));\n current.setWindSpeed((float) weather.getWind().getSpeed());\n current.setLastUpdated(new Date());\n\n return current;\n }",
"net.webservicex.www.WeatherForecasts getWeatherForecasts();",
"private void getWeatherData() {\n System.out.println(\"at getWeather\");\n String url = \"https://api.openweathermap.org/data/2.5/onecall/timemachine?lat=\";\n url += databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE);\n url += \"&lon=\" + databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LONGITUDE);\n url += \"&dt=\" + databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.START_TIME).substring(0, 10);\n url += \"&appid=your openweathermap API key\";\n new ClientThread(ClientThread.GET_WEATHER, new String[]{url, Integer.toString(experimentNumber)}, this).start();\n }",
"private void findWindSpeeds(ForecastIO FIO, WeatherlyDayForecast day){\n FIOHourly hourlyForecast = new FIOHourly(FIO);\n\n //Determine the number of hours left in the day\n Calendar rightNow = Calendar.getInstance();\n int dayHoursLeft = 24 - rightNow.get(Calendar.HOUR_OF_DAY);\n\n //Find the lowest and highest chances for precipitation for the rest of the day\n double minSpeed = hourlyForecast.getHour(0).windSpeed();\n double maxSpeed = minSpeed;\n int maxHour = rightNow.get(Calendar.HOUR_OF_DAY);\n for (int i = 1; i < dayHoursLeft; i++){\n double speed = hourlyForecast.getHour(i).windSpeed();\n if (minSpeed > speed)\n minSpeed = speed;\n if (maxSpeed < speed) {\n maxSpeed = speed;\n maxHour = i + rightNow.get(Calendar.HOUR_OF_DAY);\n }\n\n }\n\n day.setWindMin((int) (minSpeed + 0.5));\n day.setWindMax((int) (maxSpeed + 0.5));\n day.setWindMaxTime(maxHour);\n }",
"@Override\n public void requestWeatherSuccess(Weather weather, Location requestLocation) {\n try {\n if (request != null) {\n List<WeatherInfo.DayForecast> forecastList = new ArrayList<>();\n for (int i = 0; i < weather.dailyList.size(); i++) {\n forecastList.add(\n new WeatherInfo.DayForecast.Builder(\n WeatherConditionConvertHelper.getConditionCode(\n weather.dailyList.get(i).weatherKinds[0],\n true))\n .setHigh(weather.dailyList.get(i).temps[0])\n .setLow(weather.dailyList.get(i).temps[1])\n .build());\n }\n WeatherInfo.Builder builder = new WeatherInfo.Builder(\n weather.base.city,\n weather.realTime.temp,\n WeatherContract.WeatherColumns.TempUnit.CELSIUS)\n .setWeatherCondition(\n WeatherConditionConvertHelper.getConditionCode(\n weather.realTime.weatherKind,\n TimeManager.getInstance(this)\n .getDayTime(this, weather, false)\n .isDayTime()))\n .setTodaysHigh(weather.dailyList.get(0).temps[0])\n .setTodaysLow(weather.dailyList.get(0).temps[1])\n .setTimestamp(weather.base.timeStamp)\n .setHumidity(\n Double.parseDouble(\n weather.index.humidities[1]\n .split(\" : \")[1]\n .split(\"%\")[0]))\n .setWind(\n Double.parseDouble(weather.realTime.windSpeed.split(\"km/h\")[0]),\n weather.realTime.windDegree,\n WeatherContract.WeatherColumns.WindSpeedUnit.KPH)\n .setForecast(forecastList);\n\n request.complete(new ServiceRequestResult.Builder(builder.build()).build());\n }\n } catch (Exception ignore) {\n requestWeatherFailed(requestLocation);\n }\n }",
"@Override\n public Single<WeatherData> getForecastData(@NonNull final Location location) {\n return Single.just(true)\n .observeOn(Schedulers.io())\n .flatMap(aBoolean -> api.getForecast(apiKey, location.latitude(), location.longitude(), EXCLUDE_DATA_BLOCKS, \"ca\"));\n }",
"private void readWeatherConditions(XmlPullParser xpp)\n throws XmlPullParserException, IOException\n {\n int eventType = xpp.next();\n while (eventType != XmlPullParser.END_DOCUMENT)\n {\n if (eventType == XmlPullParser.START_TAG)\n {\n // Read a tag <weather-conditions weather-summary=\"Mostly Cloudy\"/>\n if (xpp.getName().equalsIgnoreCase(WEATHER_CONDITIONS))\n {\n String attrValue = readAttributeValue(xpp, WEATHER_SUMMARY,\n INVALID);\n this.forecast.addCondition(attrValue);\n }\n }\n else if (eventType == XmlPullParser.END_TAG)\n {\n // exit when we get to \"</weather>\"\n if (xpp.getName().equalsIgnoreCase(WEATHER))\n break;\n }\n eventType = xpp.next();\n }\n }",
"public String condition(String map, int x, int y, long date) {\n\tWeatherUnit weath = getWeather(date);\n if (weath == null) return \"dry\"; // No calendar present\n\t// Water is handled different, only wind counts\n\tScaledMap local = (ScaledMap)maps.get(map);\n\tif (local != null && local.getTerrain(x,y).equals(\"water\")) {\n\t return windCondition(local.getVegetation(x,y), weath);\n\t}\n\t\n\tData.HashList list = Data.getCondList();\n\tfor (int i = 0; i < list.keySet().size(); i++) {\n\t String n = list.getKey(i);\n\t int thresh = ((Data.Condition)list.get(n)).threshhold;\n\t String lvl = ((Data.Condition)list.get(n)).lvlname.toString();\n if ((weath.levels.get(lvl) != null) &&\n ((Integer)weath.levels.get(lvl)).intValue() >= thresh)\n\t\treturn n;\n\t}\n\n\t// Default\n\treturn \"dry\";\n }",
"GeneralWeatherReport queryWeatherReport(String cityId);",
"void updateForecast(DarkSkyApi api, PlaceWeather weather){\n\n long now = Calendar.getInstance().getTimeInMillis()/1000;\n\n deleteObsoleteEntries(now);\n\n long placeId = weather.getId();\n long currentDay = databaseInstance.weatherDao().selectObsoleteDayCount(now);\n long daysSaved = databaseInstance.weatherDao().selectDayCount();\n\n //check if need to load data\n if(daysSaved - currentDay < 7){\n\n List<HourlyData> hourlyData;\n\n String apiKey = context.getString(R.string.api_key);\n Map<String, String> avoid = new HashMap<>();\n avoid.put(\"units\", \"si\");\n avoid.put(\"lang\", \"en\");\n avoid.put(\"exclude\", \"alerts,daily\");\n\n long currentTime = weather.getDaily().getData().get(\n weather.getDaily().getData().size()-1\n ).getTime() + 1;\n\n //load days\n for(long day = daysSaved - currentDay; day < 7; ++day){\n currentTime += 3600 * 24;\n PlaceWeather nextDay;\n try{\n nextDay = api.getTimeForecast(apiKey,\n weather.getLatitude(),\n weather.getLongitude(),\n now, avoid).execute().body();\n }catch (IOException e){\n //log network failure\n break;\n }\n\n nextDay.getDaily().getData().get(0).setParentPlaceId(placeId);\n\n long nextDailyDataId =\n databaseInstance.weatherDao().insertDailyData(\n nextDay.getDaily().getData().get(0)\n );\n\n nextDay.getHourly().setParentDayId(nextDailyDataId);\n nextDay.getHourly().setId(\n databaseInstance.weatherDao().insertHourly(nextDay.getHourly())\n );\n\n hourlyData = nextDay.getHourly().getData();\n\n for(int j = 0; j < hourlyData.size(); ++j){\n hourlyData.get(j).setParentDayId(nextDailyDataId);\n databaseInstance.weatherDao().insertHourlyData(hourlyData.get(j));\n }\n }\n }\n }",
"public HashMap<String,Weather> getPrecipData() {\n HashMap<String, Weather> result = new HashMap<String, Weather>();\n //String url = NOAA.PRECIP_URL.replace(\"*STARTDATE*\", startDate).replace(\"*ENDDATE*\", endDate);\n try {\n // Get and parse the JSON\n Response res = makeRequest(NOAA.PRECIP_URL);\n JsonParser parser = new JsonParser();\n JsonArray results = parser.parse(res.body().string())\n .getAsJsonObject()\n .getAsJsonArray(\"results\");\n\n // Iterate over results, storing the values un the hashmap,\n // the key is the StationID, the value is a weather object of the\n // conditions and information about the station.\n Iterator<JsonElement> iterator = results.iterator();\n while (iterator.hasNext()) {\n JsonObject e = iterator.next().getAsJsonObject();\n String type = e.get(\"datatype\").getAsString();\n String station = e.get(\"station\").getAsString();\n String attributes = e.get(\"attributes\").getAsString();\n String date = e.get(\"date\").getAsString();\n int value = e.get(\"value\").getAsInt();\n\n result.put(station, new Weather(type, station, attributes, date, value));\n }\n return result;\n } catch (IOException e) {\n e.printStackTrace();\n } catch (IllegalStateException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public void getWeather(String city, String units);",
"public void getForecasts() {\r\n\r\n\t\tWeatherDAO weatherDao = new WeatherDAO();\r\n\r\n\t\tforecasts = weatherDao.getForecasts(this.getSceneNumber());\r\n\r\n\t\tif (forecasts == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tisUpdated(forecasts[0]);\r\n\r\n\t\tsetLabels(forecasts);\r\n\r\n\t\tsetGif(forecasts[0].getDayPhrase());\r\n\t}",
"public ArrayList<Weather> getDarkSkyWeather(String longitude, String latitude) {\n\n Log.i(\"long: \", longitude);\n Log.i(\"lat: \", latitude);\n\n Weather weather = new Weather();\n ArrayList<Weather> weatherArr = new ArrayList<Weather>();\n ArrayList<String> temp = new ArrayList<String>();\n String content;\n try {\n content = weather.execute(\"https://api.darksky.net/forecast/a4b289aa3abfbee48b4fc1df98208a34/\"+ latitude + \",\" + longitude + \"?lang=vi&exclude=minutely,flags,currently\").get();\n\n if(content == null)\n {\n return null;\n }\n JSONObject obj = new JSONObject(content);\n\n JSONObject daily = obj.getJSONObject(\"daily\");\n JSONArray dataDaily = daily.getJSONArray(\"data\");\n\n String summary;\n String temperatureMin;\n String temperatureMax;\n String humidity;\n String windSpeed;\n String windGust;\n String airPressure;\n String visibility;\n String ozoneDensity;\n String uvIndex;\n String cloudCover;\n String precipProbability;\n String time;\n\n Bundle bundle2 = new Bundle();\n images = new Integer[dataDaily.length()];\n\n for(int i = 0; i < dataDaily.length(); i++)\n {\n Weather result = new Weather();\n\n JSONObject detail = dataDaily.getJSONObject(i);\n\n summary = detail.getString(\"summary\");\n temperatureMin = detail.getString(\"temperatureMin\");\n temperatureMax = detail.getString(\"temperatureMax\");\n precipProbability = detail.getString(\"precipProbability\");\n humidity = detail.getString(\"humidity\");\n windSpeed = detail.getString(\"windSpeed\");\n windGust = detail.getString(\"windGust\");\n airPressure = detail.getString(\"pressure\");\n visibility = detail.getString(\"visibility\");\n ozoneDensity = detail.getString(\"ozone\");\n uvIndex = detail.getString(\"uvIndex\");\n cloudCover = detail.getString(\"cloudCover\");\n time = unixTimeToDate(detail.getString(\"time\"));\n\n\n String precipProb = String.valueOf(String.format(\"%.0f\", (Float.parseFloat(precipProbability)*100))+ \"%\");\n\n // Update UI\n result.setDate(normalizeDate(time.substring(0, 10)));\n result.setWeather(summary);\n result.setDescription(\"Khả năng mưa: \" + precipProb);\n result.setTemperature(celsiusToFahrenheit(temperatureMax) + \"\\u2103\");\n result.setWind(\"Gió: \" + windSpeed + \"mph\");\n weatherArr.add(result);\n\n if(summary.toLowerCase().contains(\"quang\"))\n {\n images[i] = R.drawable.sunny;\n }\n if(summary.toLowerCase().contains(\"mưa\"))\n {\n images[i] = R.drawable.rainy;\n }\n else if (summary.toLowerCase().contains(\"âm u\"))\n {\n images[i] = R.drawable.foggy;\n }\n else if (summary.toLowerCase().contains(\"mây\"))\n {\n images[i] = R.drawable.cloudy;\n }\n else\n {\n images[i] = R.drawable.sunny;\n }\n\n\n// Bundle bundlee = new Bundle();\n// ArrayList<String> dailyData = new ArrayList<String>();\n//\n// dailyData.add(summary);\n// dailyData.add(precipProb);\n// dailyData.add(normalizeDate(time.substring(0, 10)));\n// dailyData.add(temperatureMin +\"\\u2103\");\n// dailyData.add(temperatureMax +\"\\u2103\");\n// dailyData.add(humidity + \"%\");\n// dailyData.add(windSpeed + \" mph\");\n// dailyData.add(windGust + \" mph\");\n// dailyData.add(airPressure + \" mb\");\n// dailyData.add(visibility + \" mi\");\n// dailyData.add(ozoneDensity + \" DU\");\n// dailyData.add(uvIndex);\n// dailyData.add(cloudCover);\n// dailyData.add(String.valueOf(i)); // fragment-tag\n//\n// bundlee.putStringArrayList(\"daily-data\",dailyData);\n\n\n Bundle bundle = new Bundle();\n bundle.putString(\"weather\", summary);\n bundle.putString(\"PoP\", precipProb);\n bundle.putString(\"date\", normalizeDate(time.substring(0, 10)));\n bundle.putString(\"tempMin\", temperatureMin +\"\\u2103\");\n bundle.putString(\"tempMax\", temperatureMax +\"\\u2103\");\n bundle.putString(\"humidity\", humidity + \"%\");\n bundle.putString(\"windSpeed\", windSpeed + \" mph\");\n bundle.putString(\"winGust\", windGust + \" mph\");\n bundle.putString(\"airPressure\", airPressure + \" mb\");\n bundle.putString(\"visibility\", visibility + \" mi\");\n bundle.putString(\"ozoneDensity\", ozoneDensity + \" DU\");\n bundle.putString(\"uvIndex\", uvIndex);\n bundle.putString(\"cloudCover\", cloudCover);\n bundle.putString(\"fragmentTag\", String.valueOf(i));\n\n temp.add(temperatureMin);\n\n bundleDailyArr.add(bundle);\n// bundleDailyArr.add(bundlee);\n\n// Log.i(\"Index: \", String.valueOf(i));\n// Log.i(\"summary :\", summary);\n// Log.i(\"temperatureMin :\", temperatureMin);\n// Log.i(\"temperatureMax :\", temperatureMax);\n// Log.i(\"humidity :\", humidity);\n// Log.i(\"windSpeed :\", windSpeed);\n// Log.i(\"winGust :\", windGust);\n// Log.i(\"airPressure :\", airPressure);\n// Log.i(\"visibility :\", visibility);\n// Log.i(\"ozoneDensity :\", ozoneDensity);\n// Log.i(\"uvIndex :\", uvIndex);\n// Log.i(\"cloudCover :\", cloudCover);\n// Log.i(\"cloudCover :\", \"\\n\");\n// Log.i(\"precipProbability :\", precipProbability);\n }\n\n for(int i = 0; i < temp.size(); i++)\n {\n bundle2.putString(\"temp\"+String.valueOf(i), temp.get(i));\n }\n\n\n\n// Get weather hourly\n\n JSONObject hourly = obj.getJSONObject(\"hourly\");\n JSONArray dataHourly = hourly.getJSONArray(\"data\");\n String temperature;\n\n for(int i = 0; i < dataHourly.length(); i++)\n {\n JSONObject detail = dataHourly.getJSONObject(i);\n\n temperature = detail.getString(\"temperature\");\n precipProbability = detail.getString(\"precipProbability\");\n windSpeed = detail.getString(\"windSpeed\");\n cloudCover = detail.getString(\"cloudCover\");\n\n Bundle bundle = new Bundle();\n bundle.putString(\"PoP\", precipProbability);\n //bundle.putString(\"temp\", String.valueOf((int)(Float.parseFloat(temperatureMin) + Float.parseFloat(temperatureMax) / 2)));\n bundle.putString(\"temperature\", temperature);\n bundle.putString(\"windSpeed\", windSpeed);\n bundle.putString(\"cloudCover\", cloudCover);\n bundle.putString(\"fragmentTagasd\", String.valueOf(i));\n\n\n bundleHourlyArr.putBundle(String.valueOf(i),bundle);\n\n\n Log.i(\"Hourly Index: \", String.valueOf(i));\n// Log.i(\"summary :\", summary);\n// Log.i(\"temperatureMin :\", temperatureMin);\n// Log.i(\"temperatureMax :\", temperatureMax);\n// Log.i(\"humidity :\", humidity);\n// Log.i(\"windSpeed :\", windSpeed);\n// Log.i(\"winGust :\", windGust);\n// Log.i(\"airPressure :\", airPressure);\n// Log.i(\"visibility :\", visibility);\n// Log.i(\"ozoneDensity :\", ozoneDensity);\n// Log.i(\"uvIndex :\", uvIndex);\n// Log.i(\"cloudCover :\", cloudCover);\n// Log.i(\"cloudCover :\", \"\\n\");\n// Log.i(\"precipProbability :\", precipProbability);\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return weatherArr;\n }",
"@GET(\"/api/\" + BuildConfig.API_KEY + \"/conditions/hourly10day/q/{zip}.json\")\n Observable<WeatherModel> fetchWeather\n (@Path(\"zip\") String zipCode);",
"IConditionsRequest getConditionsRequest(double lat, double lon, IRequestListener listener);",
"HashMap<String, Double> getPortfolioData(String date);",
"@Override\n\t\tprotected GetWeatherRes doInBackground(Void... params) {\n\t\t\treturn JsonOA.getWeatherInfo(cityId, timeStamp);\n\t\t}",
"@Override\n\tpublic String getHourlyWeatherData(String city, String country) throws IOException {\n\t\t\n\t\treturn connectFiveDayForecast(city, country);\n\t\t\n\t}",
"@Test\n\tpublic void dayTimeAndNightTimeAreDetectedCorrectlyTest() {\n\t\tcurrentDate = LocalDate.of(2019, 01, 27);\n\t\tAverageTemperatureAndPressure atp = forecastService.getAverageTemperatureAndPressure(city, currentDate, 3);\n\t\t\n\t\tassertEquals(3, atp.getAvrgDayTimeTemperature(), 0.000000001);\n\t\tassertEquals(7, atp.getAvrgNightTimeTemperature(), 0.000000001);\n\t\tassertEquals(6, atp.getAvrgPressure(), 0.000000001);\n\t}",
"boolean hasForecast();",
"public static ContentValues[] parseJson(String jsonData, Context context){\n ContentValues contentValues[];\n try{\n Boolean isCelcius = SunshinePreference.isMetric(context);\n String maxTemp = \"\";\n String minTemp = \"\";\n JSONObject root = new JSONObject(jsonData);\n JSONObject current = root.getJSONObject(\"current\");\n String current_TempC = current.getString(\"temp_c\");\n String current_TempF = current.getString(\"temp_f\");\n String current_pressure = current.getString(\"pressure_in\");\n JSONObject forecast = root.getJSONObject(\"forecast\");\n JSONArray forecastlist = forecast.getJSONArray(\"forecastday\");\n JSONObject rootData = null;\n\n contentValues = new ContentValues[forecastlist.length()];\n\n for(int i=0;i<forecastlist.length();i++){\n rootData = forecastlist.getJSONObject(i);\n String date = rootData.getString(\"date_epoch\");\n JSONObject days = rootData.getJSONObject(\"day\");\n if(isCelcius) {\n maxTemp = days.getString(\"maxtemp_c\");\n minTemp = days.getString(\"mintemp_c\");\n }else{\n maxTemp = days.getString(\"maxtemp_f\");\n minTemp = days.getString(\"mintemp_f\");\n }\n String condition = days.getJSONObject(\"condition\").getString(\"text\");\n String iconAndDaynight = days.getJSONObject(\"condition\").getString(\"icon\");\n String wind = days.getString(\"maxwind_kph\");\n String humidity = days.getString(\"avghumidity\");\n\n //data.add(date+\"-\"+maxTemp+\"-\"+minTemp+\"-\"+condition);\n contentValues[i] = new ContentValues();\n if(i == 0){\n if(isCelcius)\n contentValues[i].put(WeatherContract.WeatherEntry.COLUMN_CURRENT_TEMP,Double.valueOf(current_TempC));\n else\n contentValues[i].put(WeatherContract.WeatherEntry.COLUMN_CURRENT_TEMP,Double.valueOf(current_TempF));\n contentValues[i].put(WeatherContract.WeatherEntry.COLUMN_PRESSURE,Double.valueOf(current_pressure));\n }\n contentValues[i].put(WeatherContract.WeatherEntry.COLUMN_ICON,iconAndDaynight);\n contentValues[i].put(WeatherContract.WeatherEntry.COLUMN_DATE,Long.valueOf(date));\n contentValues[i].put(WeatherContract.WeatherEntry.COLUMN_MAX_TEMP,Double.valueOf(maxTemp));\n contentValues[i].put(WeatherContract.WeatherEntry.COLUMN_MIN_TEMP,Double.valueOf(minTemp));\n contentValues[i].put(WeatherContract.WeatherEntry.COLUMN_WIND_SPEED,Double.valueOf(wind));\n contentValues[i].put(WeatherContract.WeatherEntry.COLUMN_HUMIDITY,Double.valueOf(humidity));\n contentValues[i].put(WeatherContract.WeatherEntry.COLUMN_CONDITION,condition);\n contentValues[i].put(WeatherContract.WeatherEntry.COLUMN_WEATHER_ID,i);\n }\n }catch(JSONException e){\n e.printStackTrace();\n return null;\n }\n return contentValues;\n }",
"void handleWeatherDataForLocation(String lon, String lat);",
"@Override\n public Day getCurrentDay(float lat, float lon) throws Exception {\n Day currentDay = new Day();\n currentDay.setLocationCity(\"Johannesburg\");\n currentDay.setTemperature(27.9f);\n currentDay.setWeather(Day.Weather.SUNNY);\n currentDay.setWindSpeed(10.2f);\n currentDay.setLastUpdated(new Date());\n\n // To test the exception handling uncomment the code below\n // and comment the return statement\n // throw new Exception(\"Test\");\n\n return currentDay;\n }",
"private void requestWeatherTypes() {\n SharedPreferences preferences = getSharedPreferences(CommonConstants.APP_SETTINGS, MODE_PRIVATE);\n String url = \"https://api.openweathermap.org/data/2.5/forecast?\" +\n \"id=\" + input.get(CommonConstants.ARRIVAL_CITY_ID) +\n \"&appid=\" + CommonConstants.OWM_APP_ID +\n \"&lang=\" + Locale.getDefault().getLanguage() +\n \"&units=\" + preferences.getString(CommonConstants.TEMPERATURE_UNIT, \"Standard\");\n ForecastListener listener = new ForecastListener(weatherList -> {\n try {\n WeatherTypeMapper mapper = new WeatherTypeMapper();\n fillPreview(mapper.from(weatherList));\n if (input.containsKey(CommonConstants.SELECTIONS)) {\n //noinspection unchecked\n setSelections((List<Settings.Selection>) input.get(CommonConstants.SELECTIONS));\n }\n } catch (ExecutionException | InterruptedException e) {\n Log.e(TAG, \"onSuccess: \" + e.getMessage(), e);\n }\n });\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null, listener, null);\n TravelRequestQueue.getInstance(this).addRequest(request);\n }",
"public HashMap<String, String> getSomeDaydata(int day) {\n\t\tif(day >= 0 && day <=4){\n\t\t\ttry {\n\t\t\t\tHashMap<String, String> day2Map = new HashMap<String, String>();\n\t\t\t\tJsonObject day2Object = this.jsonForecastArray.get(day).getAsJsonObject();\n\t\t\t\tday2Map.put(\"日期\", day2Object.get(\"date\").getAsString());\n\t\t\t\tday2Map.put(\"最高温\", day2Object.get(\"high\").getAsString());\n\t\t\t\tday2Map.put(\"最低温\", day2Object.get(\"low\").getAsString());\n\t\t\t\tday2Map.put(\"风力\", day2Object.get(\"fengli\").getAsString());\n\t\t\t\tday2Map.put(\"天气\", day2Object.get(\"type\").getAsString());\n\t\t\t\treturn day2Map;\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.e(\"WeatherRequest Class\", \"Hashmap hasn't init\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public getForecast() {\n\t\t\n\t\t\n\t\tString finalePrevisioni; //stringa dove metteremo le previsioni\n\t\t\n\t\tFileReader f= null;\n try {\n f =new FileReader(\"Previsioni.txt\");\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n /*\n * quello che facciamo è vedere se la data nel nostro file cosrripsonde alla data di oggi\n */\n \n\n BufferedReader b;\n b=new BufferedReader(f);\n \n String MeteoCorrente = \"\";\n String line = \"\";\n \n try {\n while((line = b.readLine())!=null) {\n MeteoCorrente += line;\n if (MeteoCorrente.length()==19) break;\n // ci basta leggere questi caratteri per scoprire la data\n }\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n \n \n try {\n\t\t\tb.close();\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n \n\t\t\n\t\t\n\t\tString dataFile = MeteoCorrente.substring(9,19);\n\t\t\n\t\t//data di oggi\n \n\t\tDateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"yyyy-MM-dd\"); \n\t\tLocalDateTime now = LocalDateTime.now(); \n\t\t\n\t\tString dataOggi = (String) dtf.format(now);\n\t\t\n\t\t//se le date sono diverse\n\t\t\n\t\tif (!(dataFile.equals(dataOggi))) {\n\t\t\n\t\t//si aggiorna il file di appoggio così da avere i dati sul meteo aggiornati\t\n\t\t// essendo nello stesso package posso invocare il metodo senza dover importare la classe visto che sia\n\t\t//la classe che il metodo sono public\n\t updateWeeklyForecast.update();\n\t\t\t\n\t\tString parte1 = MeteoCorrente.substring(0,9);\n\t\t//si aggiorna la data\n\t\tString parte2 = dataOggi;\n\t\t//le nuove previsoni vengono aggiunte per prime così che ci aiuti nel prelevare i dati più aggiornati\n\t\t//nei metodi successivi\n\t\tString parte3 = MeteoCorrente.substring(19,35);\n\t\t\t\n \n \n\t\tString meteo2 = MeteoCorrente.substring(35);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tFileReader fi= null;\n try {\n fi =new FileReader(\"appoggio.txt\");\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n //appoggio\n\n BufferedReader a;\n a=new BufferedReader(fi);\n \n String meteo = \"\";\n String lin = \"\";\n \n try {\n while((lin = a.readLine())!=null) {\n meteo += lin;\n }\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n \n \n //essendo sotto forma di array rimuoviamo le parentesi quadre\n \n String meteo3 = meteo.substring(1, meteo.length()-1);\n \n File file = new File(\"Previsioni.txt\");\n\t\t\n\t\t FileWriter fileWriter = null;\n\t\t try {\n\t\t fileWriter = new FileWriter(file);\n\t\t } catch (IOException e) {\n\t\t \n\t\t e.printStackTrace();\n\t\t }\n\t\t \n\t\t BufferedWriter bufferedWriter = null;\n\t\t bufferedWriter=new BufferedWriter(fileWriter);\n\t\t \n\t\t //uniamo le varie stringhe così da formare un JSONObject\n\t\t //(a virgola ha questo scopo, infatti noi abbiamo già aggiunto i dati e questo ci aiuta)\n\t\t //(se invece il file fosse vuoto la virgola ci avrebbe creato dei problemi nelle varie codifiche)\n\t\t \n\t\t finalePrevisioni = parte1 + parte2 + parte3 + meteo3 + \", \" + meteo2;\n\t\t \n\t\t \n\t\t try {\n\t\t \tbufferedWriter.write(finalePrevisioni);\n\t\t \t\n\t\t } catch (IOException e) {\n\t\t // TODO Auto-generated catch block\n\t\t e.printStackTrace();\n\t\t }\n\t\t try\n\t\t {\n\t\t if ( bufferedWriter != null)\n\t\t bufferedWriter.close( );\n\t\t }\n\t\t catch ( IOException e) {e.printStackTrace();}\n\t\ttry {\n\t\t\tfileWriter.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n \n\t\n\t\t}\n\t\telse{ // caso in cui il file è già agiornato\n\t\t\t\n\t\t\t\n\t try {\n\t f =new FileReader(\"Previsioni.txt\");\n\t } catch (FileNotFoundException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t }\n\n\t \n\n\n\t BufferedReader c;\n\t c=new BufferedReader(f);\n\t \n\t MeteoCorrente = \"\";\n\t line = \"\";\n\t \n\t \n\t try {\n\t while((line = c.readLine())!=null) {\n\t MeteoCorrente += line;\n\t \n\t }\n\t } catch (IOException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t }\n\t finalePrevisioni = MeteoCorrente;\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//prendiamo ora il JSONObject di Previsioni e preleviamo il JSONArry con le previsioni\n\t\t\n\t\tJSONParser parser = new JSONParser();\n\t\tObject obj = null;\n\t\ttry {\n\t\t\tobj = parser.parse(finalePrevisioni);\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tJSONObject jsonObject = (JSONObject) obj;\n\t\t\n\t\tthis.previsioni =(JSONArray) jsonObject.get(\"previsioni\");\n\t\t\n\n\t}",
"public CityDailyWeather(String city, int startYear, int endYear, int stationID){\n\t\tthis.city = city;\n\t\tthis.startYear = startYear;\n\t\tthis.endYear = endYear;\n\t\tthis.stationID = stationID;\n\t}",
"@Override\n public WeatherDaySample getDailyForecast(final String location, final WeekDay weekday, final TemperatureUnit temperatureUnit) {\n final String url = UriComponentsBuilder.fromHttpUrl(weatherServiceUrl)\n .path(\"/forecast/{location}/day/{weekday}\")\n .buildAndExpand(location, weekday)\n .toUriString();\n\n try {\n logger.trace(\"GET {}\", url);\n\n final HttpHeaders headers = new HttpHeaders();\n headers.set(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE);\n\n final HttpEntity<?> requestEntity = new HttpEntity<>(headers);\n// final ResponseEntity<WeatherDaySample> forEntity = restTemplate.getForEntity(url, WeatherDaySample.class);\n final ResponseEntity<WeatherDaySample> forEntity = restTemplate.exchange(url, HttpMethod.GET, requestEntity, WeatherDaySample.class);\n\n logger.trace(\"GET {} - HTTP {}\", url, forEntity.getStatusCodeValue());\n\n return forEntity.getBody();\n } catch (RestClientResponseException ex) {\n // Http error response\n logger.error(\"GET {} - HTTP {} - {}\", url, ex.getRawStatusCode(), ex.getResponseBodyAsString());\n } catch (ResourceAccessException ex) {\n // Connection error (ex. wrong URL), or unknown http code received\n logger.error(\"GET {} - {}\", url, ex.getMessage());\n }\n\n // An error has occurred\n return null;\n }",
"private void extractDataFromOrders(List<Order> orders) {\n ArrayList<LocalDate> orderedListOfMapDays = new ArrayList<LocalDate>();\n HashMap<LocalDate, Integer> dateToCoffeeCaffeineMap = new HashMap<LocalDate, Integer>(), dateToTeaCaffeineMap = new HashMap<LocalDate, Integer>();\n HashMap<LocalDate, Double> dateToCoffeeExpenditureMap = new HashMap<LocalDate, Double>(), dateToTeaExpenditureMap = new HashMap<LocalDate, Double>();\n for (int i = 0; i < 8; i++) {\n LocalDate date = ONE_WEEK_AGO.plusDays(i);\n dateToCoffeeCaffeineMap.put(date, 0);\n dateToTeaCaffeineMap.put(date, 0);\n dateToCoffeeExpenditureMap.put(date, 0.0);\n dateToTeaExpenditureMap.put(date, 0.0);\n orderedListOfMapDays.add(date);\n }\n\n // loop through orders, comparing their days and adding values accordingly\n for (Order order : orders) {\n if (order == null) continue;\n // dates (in milliseconds) from orders are clocked to start of day and converted to dates\n LocalDateTime tempDateResetTime = order.getDate().toInstant()\n .atZone(ZoneId.systemDefault())\n .toLocalDate().atStartOfDay();\n LocalDate tempDate = tempDateResetTime.toLocalDate();\n Log.d(TAG, \"ORDER ON DAY: \" + tempDate);\n\n if (ONE_WEEK_AGO.isBefore(tempDate) || ONE_WEEK_AGO.isEqual(tempDate)) {\n // CAFFEINE\n // coffee caffeine\n int dailyCaffeineFromCoffee = 0;\n dailyCaffeineFromCoffee += (order.getTotalCaffeineFromCoffee(true) > 0 ? order.getTotalCaffeineFromCoffee(true) :\n order.getTotalCaffeineFromCoffee(false) > 0 ? order.getTotalCaffeineFromCoffee(false) : 0);\n dateToCoffeeCaffeineMap.put(tempDate, dateToCoffeeCaffeineMap.get(tempDate) + dailyCaffeineFromCoffee);\n // tea caffeine\n int dailyCaffeineFromTea = 0;\n dailyCaffeineFromTea += (order.getTotalCaffeineFromTea(true) > 0 ? order.getTotalCaffeineFromTea(true) :\n order.getTotalCaffeineFromTea(false) > 0 ? order.getTotalCaffeineFromTea(false) : 0);\n dateToTeaCaffeineMap.put(tempDate, dateToTeaCaffeineMap.get(tempDate) + dailyCaffeineFromTea);\n\n // EXPENDITURES\n // coffee cost\n double dailyExpenditureFromCoffee = 0.0;\n dailyExpenditureFromCoffee += (order.getTotalCostFromCoffee(true) > 0 ? order.getTotalCostFromCoffee(true) :\n order.getTotalCostFromCoffee(false) > 0 ? order.getTotalCostFromCoffee(false) : 0.0);\n dateToCoffeeExpenditureMap.put(tempDate, dateToCoffeeExpenditureMap.get(tempDate) + dailyExpenditureFromCoffee);\n // tea cost\n double dailyExpenditureFromTea = 0.0;\n dailyExpenditureFromTea += (order.getTotalCostFromTea(true) > 0 ? order.getTotalCostFromTea(true) :\n order.getTotalCostFromTea(false) > 0 ? order.getTotalCostFromTea(false) : 0.0);\n dateToTeaExpenditureMap.put(tempDate, dateToTeaExpenditureMap.get(tempDate) + dailyExpenditureFromTea);\n }\n }\n\n // CAFFEINE SERIES\n coffeeCaffeineSeries = new DateIntegerSeries(\"Coffee\");\n teaCaffeineSeries = new DateIntegerSeries(\"Tea\");\n // for formatting, add an empty value at FRONT of series\n coffeeCaffeineSeries.add(Date.from(ONE_WEEK_AGO.minusDays(1).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()).getTime(), 0);\n teaCaffeineSeries.add(Date.from(ONE_WEEK_AGO.minusDays(1).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()).getTime(), 0);\n for (int i = 0; i < orderedListOfMapDays.size(); i++) {\n LocalDate localDate = orderedListOfMapDays.get(i);\n Integer coffeeCaffeine = dateToCoffeeCaffeineMap.get(localDate);\n Integer teaCaffeine = dateToTeaCaffeineMap.get(localDate);\n\n Long date = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()).getTime();\n\n coffeeCaffeineSeries.add(date, coffeeCaffeine);\n teaCaffeineSeries.add(date, teaCaffeine);\n }\n // for formatting, add an empty value to BACK of series\n coffeeCaffeineSeries.add(Date.from(ONE_WEEK_AGO.plusDays(8).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()).getTime(), 0);\n teaCaffeineSeries.add(Date.from(ONE_WEEK_AGO.plusDays(8).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()).getTime(), 0);\n\n // EXPENDITURE SERIES\n coffeeExpenditureSeries = new DateDoubleSeries(\"Coffee\");\n teaExpenditureSeries = new DateDoubleSeries(\"Tea\");\n // for formatting, add an empty value at FRONT of series\n coffeeExpenditureSeries.add(Date.from(ONE_WEEK_AGO.minusDays(1).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()).getTime(), 0.0);\n teaExpenditureSeries.add(Date.from(ONE_WEEK_AGO.minusDays(1).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()).getTime(), 0.0);\n for (int i = 0; i < orderedListOfMapDays.size(); i++) {\n LocalDate localDate = orderedListOfMapDays.get(i);\n Double coffeeExpenditure = dateToCoffeeExpenditureMap.get(localDate);\n Double teaExpenditure = dateToTeaExpenditureMap.get(localDate);\n\n Long date = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()).getTime();\n\n coffeeExpenditureSeries.add(date, coffeeExpenditure);\n teaExpenditureSeries.add(date, teaExpenditure);\n }\n // for formatting, add an empty value to BACK of series\n coffeeExpenditureSeries.add(Date.from(ONE_WEEK_AGO.plusDays(8).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()).getTime(), 0.0);\n teaExpenditureSeries.add(Date.from(ONE_WEEK_AGO.plusDays(8).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()).getTime(), 0.0);\n }",
"@Override\n protected WeatherInfo doInBackground(Void... params) {\n String weatherID = \"\";\n String areaID = \"\";\n try {\n String cityIds = null;\n if (mRequest.getRequestInfo().getRequestType()\n == RequestInfo.TYPE_WEATHER_BY_WEATHER_LOCATION_REQ) {\n cityIds = mRequest.getRequestInfo().getWeatherLocation().getCityId();\n weatherID = cityIds.split(\",\")[0];\n areaID = cityIds.split(\",\")[1];\n } else if (mRequest.getRequestInfo().getRequestType() ==\n RequestInfo.TYPE_WEATHER_BY_GEO_LOCATION_REQ) {\n double lat = mRequest.getRequestInfo().getLocation().getLatitude();\n double lng = mRequest.getRequestInfo().getLocation().getLongitude();\n\n String cityNameResponse = HttpRetriever.retrieve(String.format(GEO_URL, lat, lng));\n if (TextUtils.isEmpty(cityNameResponse)) {\n return null;\n }\n cityNameResponse = cityNameResponse.replace(\"renderReverse&&renderReverse(\", \"\").replace(\")\", \"\");\n Log.d(TAG, \"cityNameResponse\" + cityNameResponse);\n JSONObject jsonObjectCity = JSON.parseObject(cityNameResponse);\n String areaName = jsonObjectCity.getJSONObject(\"result\").getJSONObject(\"addressComponent\").getString(\"district\");\n String cityName = jsonObjectCity.getJSONObject(\"result\").getJSONObject(\"addressComponent\").getString(\"city\");\n areaName = TextUtil.getFormatArea(areaName);\n cityName = TextUtil.getFormatArea(cityName);\n City city = cityDao.getCityByCityAndArea(cityName, areaName);\n if (city == null) {\n city = cityDao.getCityByCityAndArea(cityName, cityName);\n if (city == null)\n return null;\n }\n weatherID = city.getWeatherId();\n areaID = city.getAreaId();\n } else {\n return null;\n }\n\n //miui天气\n String miuiURL = String.format(URL_WEATHER_MIUI, weatherID);\n if (DEBUG) Log.d(TAG, \"miuiURL \" + miuiURL);\n String miuiResponse = HttpRetriever.retrieve(miuiURL);\n if (miuiResponse == null) return null;\n if (DEBUG) Log.d(TAG, \"Rmiuiesponse \" + miuiResponse);\n\n //2345天气\n String ttffUrl = String.format(URL_WEATHER_2345, areaID);\n if (DEBUG) Log.d(TAG, \"ttffUrl \" + ttffUrl);\n String ttffResponse = DecodeUtil.decodeResponse(HttpRetriever.retrieve(ttffUrl));\n if (ttffResponse == null) return null;\n if (DEBUG) Log.d(TAG, \"ttffResponse \" + ttffResponse);\n\n\n JSONObject ttffAll = JSON.parseObject(ttffResponse);\n String cityName = ttffAll.getString(\"cityName\");\n //实时\n JSONObject sk = ttffAll.getJSONObject(\"sk\");\n String humidity = sk.getString(\"humidity\");\n String sk_temp = sk.getString(\"sk_temp\");\n\n //日落日升\n JSONObject sunrise = ttffAll.getJSONObject(\"sunrise\");\n\n ArrayList<WeatherInfo.DayForecast> forecasts =\n parse2345(ttffAll.getJSONArray(\"days7\"), true);\n\n WeatherInfo.Builder weatherInfo = null;\n weatherInfo = new WeatherInfo.Builder(\n cityName, sanitizeTemperature(Double.parseDouble(sk_temp), true),\n WeatherContract.WeatherColumns.TempUnit.CELSIUS);\n //湿度\n humidity = humidity.replace(\"%\", \"\");\n weatherInfo.setHumidity(Double.parseDouble(humidity));\n\n if (miuiResponse != null) {\n //风速,风向\n JSONObject weather = JSON.parseObject(miuiResponse);\n JSONObject accu_cc = weather.getJSONObject(\"accu_cc\");\n weatherInfo.setWind(accu_cc.getDouble(\"WindSpeed\"), accu_cc.getDouble(\"WindDirectionDegrees\"),\n WeatherContract.WeatherColumns.WindSpeedUnit.KPH);\n }\n\n weatherInfo.setTimestamp(System.currentTimeMillis());\n weatherInfo.setForecast(forecasts);\n\n if (forecasts.size() > 0) {\n weatherInfo.setTodaysLow(sanitizeTemperature(forecasts.get(0).getLow(), true));\n weatherInfo.setTodaysHigh(sanitizeTemperature(forecasts.get(0).getHigh(), true));\n weatherInfo.setWeatherCondition(IconUtil.getWeatherCodeByType(\n ttffAll.getJSONArray(\"days7\").getJSONObject(0).getString(\n DateTimeUtil.isNight(sunrise.getString(\"todayRise\"), sunrise.getString(\"todaySet\"))\n ? \"nightWeaShort\" : \"dayWeaShort\"), sunrise.getString(\"todayRise\"), sunrise.getString(\"todaySet\")));\n }\n\n if (lastWeatherInfo != null)\n lastWeatherInfo = null;\n\n lastWeatherInfo = weatherInfo.build();\n\n return lastWeatherInfo;\n } catch (Exception e) {\n if (DEBUG) Log.w(TAG, \"JSONException while processing weather update\", e);\n }\n return null;\n }",
"public void downloadWeatherForCurrentLocation() {\n if(checkConnection()) {\n LocationManager locationManager = LocationManager.getInstance(this, view);\n locationManager.getCoordinates();\n } else {\n showNoConnectionDialog();\n }\n }",
"public synchronized void getWeeklyForecast(String city){\r\n\t\t// Create a new Handler\r\n\t\tHandlerThread handlerThread = new HandlerThread(\"Weekly_Forecast\");\r\n\t\thandlerThread.start();\r\n\t\tHandler handler = new Handler(handlerThread.getLooper(), this);\r\n\t\t\r\n\t\tMessage msg = handler.obtainMessage();\r\n\t\tmsg.what = WEEKLY_FORECAST;\r\n\t\tmsg.obj = \"http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml?query=\".concat(city);\r\n\t\thandler.sendMessage(msg);\r\n\t}",
"public WeatherNow getSingleWeather(int position){\n return weatherNow.get(position);\n }",
"@Override\n public rx.Observable<CityWeather> getForecast(final String cityId) {\n return Observable.create(new Observable.OnSubscribe<CityWeather>() {\n @Override\n public void call(Subscriber<? super CityWeather> subscriber) {\n try {\n subscriber.onNext(getCityWeatherFromCityId(cityId));\n } catch (Exception e) {\n subscriber.onError(e);\n } finally {\n subscriber.onCompleted();\n }\n }\n });\n }",
"@Override\n public void run() {\n for(int i=0;i<TheWeatherMan.WEATHER_CHECKS; i++) {\n\n // Have some delay\n try {\n Thread.sleep(1000* startTime);\n } catch (InterruptedException e) {\n System.out.println(\"『 Weather Report 』 Pacific has gone berserk and cant sleep.\\n\" +\n \"Terminating Program...\");\n System.exit(1);\n }\n\n /**\n * Handling Different City Temperatures -------------------------------------------\n */\n\n\n // Handling Singapore Temperatures\n if(cityName == \"Singapore\") {\n\n // Generates a random number between -.3 and .3\n double randNum = (Math.random() * (.6)) - .3;\n // Formats decimals to 2 places\n DecimalFormat df = new DecimalFormat(\"#.##\");\n\n cityTemperature = Double.valueOf(df.format((cityTemperature + randNum)));\n // Set Temp\n ((Satellite) satellite).setWeather1(cityTemperature);\n }\n\n // Handling Melbourne Temperatures\n if(cityName == \"Melbourne\") {\n Random random = new Random();\n double temp = (double) random.nextInt(45) + random.nextDouble();\n\n cityTemperature = temp;\n // Set Temp\n ((Satellite) satellite).setWeather2(cityTemperature);\n }\n\n // Handling Shanghai Temperatures\n if(cityName == \"Shanghai\") {\n\n // Fluctuate +-5\n Random random = new Random();\n double temp = ((double) random.nextInt(5) +\n random.nextDouble()) * (random.nextBoolean() ? 1 : -1);\n\n\n cityTemperature = cityTemperature + temp;\n // Set Temp\n ((Satellite) satellite).setWeather3(cityTemperature);\n }\n\n }\n }",
"private void buildDaily(SummaryProvider.Summary summary, int log_id, String suffix,\n long midnight, int dataIndex, Bundle bundle) {\n ArrayList<DetailProvider.Detail> details = detailDB.getDetails(context, log_id);\n double[] raw_xdata = new double[details.size() + 2];\n double[] raw_ydata = new double[details.size() + 2];\n\n // set the first x and y values\n int xstart = bundle.getInt(\"xorigin\" + suffix, 0);\n raw_xdata[0] = xstart - 3600;\n switch (dataIndex) {\n case Constants.DATA_WATTHOURS :\n raw_ydata[0] = 0.0f; break;\n case Constants.DATA_WATTSNOW:\n raw_ydata[0] = 0.0f; break;\n case Constants.DATA_TEMPERATURE:\n raw_ydata[0] = details.get(0).getTemperature() - 273; break;\n case Constants.DATA_WIND:\n raw_ydata[0] = details.get(0).getWind_speed(); break;\n case Constants.DATA_CLOUDS:\n raw_ydata[0] = UtilsMisc.getValueinRange(details.get(0).getClouds(), 1.0f, 100.0f); break;\n default :\n break;\n }\n\n // set the y values from the detail records\n for (int i = 1; i < details.size() + 1; i++) {\n DetailProvider.Detail detail = details.get(i-1);\n raw_xdata[i] = UtilsDate.getTimeSeconds((detail.getTimestamp() * 1000) - midnight);\n switch (dataIndex) {\n case Constants.DATA_WATTHOURS :\n raw_ydata[i] = detail.getWatts_generated(); break;\n case Constants.DATA_WATTSNOW:\n raw_ydata[i] = detail.getWatts_now();break;\n case Constants.DATA_TEMPERATURE:\n raw_ydata[i] = detail.getTemperature() - 273; break;\n case Constants.DATA_WIND:\n raw_ydata[i] = detail.getWind_speed(); break;\n case Constants.DATA_CLOUDS:\n raw_ydata[i] = UtilsMisc.getValueinRange(detail.getClouds(), 1.0f, 100.0f); break;\n default :\n break;\n }\n }\n\n // set the last y value\n int xend = UtilsDate.getTimeSeconds(details.get(details.size()-1).getTimestamp()* 1000 - midnight);\n raw_xdata[details.size()+1] = xend + 1;\n switch (dataIndex) {\n case Constants.DATA_WATTHOURS :\n raw_ydata[details.size() + 1] = summary.getGenerated_watts(); break;\n case Constants.DATA_WATTSNOW:\n raw_ydata[details.size() + 1] = 0.0f; break;\n case Constants.DATA_TEMPERATURE:\n raw_ydata[details.size() + 1] = details.get(details.size()-1).getTemperature() - 273; break;\n case Constants.DATA_WIND:\n raw_ydata[details.size() + 1] = details.get(details.size()-1).getWind_speed(); break;\n case Constants.DATA_CLOUDS:\n raw_ydata[details.size() + 1] =\n UtilsMisc.getValueinRange(details.get(details.size()-1).getClouds(), 1.0f, 100.0f); break;\n default :\n break;\n }\n\n LinearInterpolation lp = new LinearInterpolation(raw_xdata, raw_ydata);\n int time = xstart;\n ArrayList<Integer> xList = new ArrayList<>();\n ArrayList<Float> yList = new ArrayList<>();\n while (time < xend) {\n float yval = (float) lp.interpolate(time);\n xList.add(time);\n yList.add(yval);\n time += Integer.parseInt(sharedPreferences.getString(Constants.MONITORING_FREQUENCY, \"5\")) * 60; // seconds\n }\n\n int[] xdata = Ints.toArray(xList);\n float[] ydata = Floats.toArray(yList);\n bundle.putIntArray(\"xdata\" + suffix, xdata);\n bundle.putFloatArray(\"ydata\" + suffix, ydata);\n\n switch (dataIndex) {\n case Constants.DATA_TEMPERATURE:\n case Constants.DATA_WIND:\n case Constants.DATA_CLOUDS:\n smooth_plot(bundle, true, suffix);\n }\n }",
"Map<Date, Double> getValues(final FinancialAnalysisParameter financialParameter,\n final Date dateFrom, final Date dateTo);",
"@Test\n\t@Title(\"TC_010:Verify that the daily forecast data is returned correctly for the searched City Name\")\n\t \n\tpublic void TC_010_Verify_DailyForCast_Is_Returned_For_ValidCity() {\n\t\t\n\t\tLocation city = new Location();\n\t\t\n\t\tcity = DataReader.RetrieveLocationFromFile(\"data.json\").get(0);\n\t\t\n\t\tcity.weather = new Weather(\"C\");\n\t\t\n\t\t\t\t\n\t\t//Steps:\n\t\t//1. Access to the site\n\t\tendUser.access_Site();\n\t\t\n\t\t//Search Weather by CityName\n\t\tendUser.SearchWeatherbyCityName(city);\n\t\t\n\t\t//Assume that the test application is triggering the correct API as expectation: OncCall\n\t\tcity = endUser.getWeatherInfoViaAPIResponse(city);\n\t\t\n\t\tendUser.Validate_DailyForcastList(7,city);\n\t\t\n\t\tendUser.Validate_DailyForcastDetail_AllDay(city);\n\t\t\n\t\tAssert.assertTrue(TestConfigs.glb_TCFailedMessage, TestConfigs.glb_TCStatus);\n\t}",
"void handleWeatherDataForCity(String cityName);",
"private void parseJson() {\n \t\t// TODO Auto-generated method stub\n\n \t\ttry {\n// \t\t\tWeatherDetail wD = new WeatherDetail();\n// \t\t\tJSONObject jObj_cityname=jObj.getJSONObject(\"city\");\n// \t\t\twD.setname(jObj_cityname.getString(\"name\"));\n// \t\t\twD.setcountry(jObj_cityname.getString(\"country\"));\n \t\t\tJSONArray jArry = jObj.getJSONArray(\"list\");\n \t\t\tfor (int i = 0; i < jArry.length(); i++) {\n \t\t\t\t// put in loop for all elements\n \t\t\t\tc3.add(Calendar.DATE, i+1);\n \t\t\t\td2=c3.get(Calendar.DAY_OF_WEEK);\n \t\t\t\tswitch(d2){\n \t\t\t\tcase 1:\n \t\t\t\t\tday=\"Sun\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 2:\n \t\t\t\t\tday=\"Mon\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 3:\n \t\t\t\t\tday=\"Tues\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 4:\n \t\t\t\t\tday=\"Wed\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 5:\n \t\t\t\t\tday=\"Thurs\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 6:\n \t\t\t\t\tday=\"Fri\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 7:\n \t\t\t\t\tday=\"Sat\";\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\tForecastDetail fD = new ForecastDetail();\n \t\t\tJSONObject jObj_cityname=jObj.getJSONObject(\"city\");\n \t\t\tfD.setday(day);\n \t\t\tfD.setdate(df3.format(c3.getTime()));\n \t\t\tfD.setname(jObj_cityname.getString(\"name\"));\n \t\t\tfD.setcountry(jObj_cityname.getString(\"country\"));\n \t\t\t\tJSONObject json_MSG = jArry.getJSONObject(i);\n \t\t\t\tJSONObject temp_MSG = json_MSG.getJSONObject(\"temp\");\n \t\t\t\tfD.setmin(temp_MSG.getDouble(\"min\"));\n \t\t\t\tfD.setmax(temp_MSG.getDouble(\"max\"));\n \t\t\t\tfD.setmorn(temp_MSG.getDouble(\"morn\"));\n \t\t\t\tfD.seteve(temp_MSG.getDouble(\"eve\"));\n \t\t\t\tfD.setpressure(json_MSG.getDouble(\"pressure\"));\n \t\t\t\tfD.sethumidity(json_MSG.getDouble(\"humidity\"));\n \t\t\t\tJSONArray jArry2 = json_MSG.getJSONArray(\"weather\");\n \t\t\t\tJSONObject json_MSG2=jArry2.getJSONObject(0);\n \t\t\t\tfD.setmain(json_MSG2.getString(\"main\"));\n \t\t\t\tfD.setdescription(json_MSG2.getString(\"description\"));\n \t\t\t\tfD.seticon(json_MSG2.getString(\"icon\"));\n \t\t\t\tc3.add(Calendar.DATE, -(i+1));\n \t\t\t\tmessages.add(fD);\n \t\t\t\t//\n \t\t\t}\n \t\t} catch (JSONException e) {\n \t\t\t// TODO: handle exception\n \t\t} catch (Exception e) {\n \t\t\t// TODO: handle exception\n\n \t\t}\n\n \t}",
"protected String[] doInBackground(String... args) {\n //Create string xml\n String xml;\n String cityName = \"Custom Location\";\n //if statement to determine if city name or coords\n if (args.length == 1) {\n //set xml to String returned from Function.executeGet() method sending API request to http address as parameter\n xml = Function.excuteGet(\"http://api.openweathermap.org/data/2.5/weather?q=\" + args[0] +\n \"&units=metric&appid=\" + OPEN_WEATHER_MAP_API);\n\n try {\n JSONObject json = new JSONObject(xml);\n JSONObject coord = json.getJSONObject(\"coord\");\n String lat = coord.getString(\"lat\");\n String lon = coord.getString(\"lon\");\n cityName = json.getString(\"name\");\n\n xml = Function.excuteGet(\"https://api.openweathermap.org/data/2.5/onecall?lat=\" + lat + \"&lon=\" + lon + \"&exclude=minutely&units=metric&appid=\" + OPEN_WEATHER_MAP_API);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n } else {\n\n xml = Function.excuteGet(\"http://api.openweathermap.org/data/2.5/weather?lat=\" + args[0] + \"&lon=\" + args[1] +\n \"&units=metric&appid=\" + OPEN_WEATHER_MAP_API);\n try {\n\n JSONObject json = new JSONObject(xml);\n cityName = json.getString(\"name\");\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n //set xml to String returned from Function.executeGet() method sending API request to http address as parameter\n xml = Function.excuteGet(\"https://api.openweathermap.org/data/2.5/onecall?lat=\" + args[0] +\n \"&lon=\" + args[1] + \"&exclude=minutely&units=metric&appid=\" + OPEN_WEATHER_MAP_API);\n }\n\n String[] json = {xml, cityName};\n\n return json;\n }",
"com.google.ads.googleads.v13.services.ForecastMetrics getForecast();",
"@Override\n protected String[] doInBackground(String... params) {\n HttpURLConnection urlConnection = null;\n BufferedReader reader = null;\n\n // Will contain the raw JSON response as a string.\n String forecastJsonStr = null;\n\n String location = params[0];\n String format = \"json\";\n String units = params[1];\n String lang = \"fr\";\n int numDays = 14;\n\n try {\n // Construct the URL for the OpenWeatherMap query\n // Possible parameters are avaiable at OWM's forecast API page, at\n // http://openweathermap.org/API#forecast\n final String FORECAST_BASE_URL =\n \"http://api.openweathermap.org/data/2.5/forecast/daily?\";\n final String QUERY_PARAM = \"q\";\n final String FORMAT_PARAM = \"mode\";\n final String UNITS_PARAM = \"units\";\n final String DAYS_PARAM = \"cnt\";\n final String LANGUAGE_PARAM = \"lang\";\n final String APPID_PARAM = \"appid\";\n\n Uri builtUri = Uri.parse(FORECAST_BASE_URL).buildUpon()\n .appendQueryParameter(QUERY_PARAM, location)\n .appendQueryParameter(FORMAT_PARAM, format)\n .appendQueryParameter(UNITS_PARAM, units)\n .appendQueryParameter(DAYS_PARAM, Integer.toString(numDays))\n .appendQueryParameter(LANGUAGE_PARAM, lang)\n .appendQueryParameter(APPID_PARAM, \"232763e5b836e83388caca0749577747\")\n .build();\n\n URL url = new URL(builtUri.toString());\n// Log.v(LOG_TAG, url.toString());\n\n // Create the request to OpenWeatherMap, and open the connection\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // Read the input stream into a String\n InputStream inputStream = urlConnection.getInputStream();\n StringBuilder builder = new StringBuilder();\n if (inputStream == null) {\n // Nothing to do.\n return null;\n }\n reader = new BufferedReader(new InputStreamReader(inputStream));\n\n String line;\n while ((line = reader.readLine()) != null) {\n // Since it's JSON, adding a newline isn't necessary (it won't affect parsing)\n // But it does make debugging a *lot* easier if you print out the completed\n // builder for debugging.\n builder.append(line).append(\"\\n\");\n }\n\n if (builder.length() == 0) {\n // Stream was empty. No point in parsing.\n return null;\n }\n forecastJsonStr = builder.toString();\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Error \" + e, e);\n\n // If the code didn't successfully get the weather data, there's no point in attempting\n // to parse it.\n return null;\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (reader != null) {\n try {\n reader.close();\n } catch (final IOException e) {\n Log.e(LOG_TAG, \"Error closing stream\", e);\n }\n }\n }\n\n try {\n return getWeatherDataFromJson(forecastJsonStr, numDays);\n } catch (JSONException e) {\n Log.e(LOG_TAG, e.getMessage(), e);\n e.printStackTrace();\n }\n\n // This will only happen if there was an error getting or parsing the forecast.\n return null;\n }",
"protected String doInBackground(Object... args) \n {\n try \n {\n // the url for the WorldWeatherOnline JSON service\n URL webServiceURL = new URL(resources.getString(\n R.string.pre_zipcode_url) + zipcodeString\n + \"&format=json&num_of_days=1&fx=yes&includelocation=no&key=400a485fad960489458a8cea3e1fc\");\n \n // create a stream Reader from the WeatherBug url\n Reader forecastReader = new InputStreamReader(\n webServiceURL.openStream());\n \n // create a JsonReader from the Reader\n JsonReader forecastJsonReader = new JsonReader(forecastReader);\n \n forecastJsonReader.beginObject(); // read the first Object\n\n // get the next name\n String name = forecastJsonReader.nextName();\n \n // if its the name expected for current conditions\n if (name.equals(resources.getString(R.string.hourly_forecast))) \n {\n readForecast(forecastJsonReader); // read the forecast\n } // end if\n \n forecastJsonReader.close(); // close the JsonReader\n } // end try\n catch (MalformedURLException e) \n {\n Log.v(TAG, e.toString());\n } // end catch\n catch (IOException e) \n {\n Log.v(TAG, e.toString());\n } // end catch\n catch (IllegalStateException e)\n {\n Log.v(TAG, e.toString() + zipcodeString);\n } // end catch\n return null; \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 double getWeatherAPI() {\n\t\tRestAssured.baseURI= props.getProperty(\"BaseURI\");\n\t\tString response = \tgiven().log().all().header(\"Content-Type\",\"application/json\").\n\t\t\t\tqueryParam(\"q\", props.getProperty(\"city\")).\n\t\t\t\tqueryParam(\"appid\", props.getProperty(\"key\")).\n\t\t\t\tqueryParam(\"units\", props.getProperty(\"unit\"))\n\t\t\t\t.when().get(\"data/2.5/weather\")\n\t\t\t\t.then().log().all().assertThat().statusCode(200).header(\"charset\", \"UTF-8\").extract().response().asString();\n\n\n\t\tSystem.out.println(response);\n\n\t\tJsonPath json = new JsonPath(response); // parsing the String response to Json\n\t\tString temp = json.getString(\".main.temp\");\n\t\tSystem.out.println(temp);\n\t\t\n\t\tdouble tempurature = Double.parseDouble(temp);\n\t\t\n\t\treturn tempurature;\n\t\t\n\t\t\n\t\t\n\t}",
"public WeatherCondition getCondition() {\n return condition;\n }",
"@Cacheable(\"weather\")\r\n\tpublic Weather getWeatherByLatitudeAndLongitude(String lat, String lon) {\n\t\tlogger.info(\"Requesting current weather for {}/{}\", lat, lon);\r\n\t\t\t\t\r\n\t\tURI url = new UriTemplate(WEATHER_URL1).expand(lat, lon, this.apiKey);\r\n\t\treturn invoke(url, Weather.class);\r\n\t}",
"public Day(String date, String weather) {\n this.date = date;\n this.weather = weather;\n }",
"public ArrayList<Forecast> getForecastsForDay( int day ) {\n if (forecasts.size() == 0) {\n return null;\n }\n\n int startIndex = 0;\n int endIndex = 0;\n\n if (day < 8) {\n startIndex = dayIndices[day];\n }\n\n if (startIndex == -1) {\n return null;\n }\n\n if (day < 7) {\n endIndex = dayIndices[day+1];\n if (endIndex < 0) {\n endIndex = forecasts.size();\n }\n } else {\n endIndex = forecasts.size();\n }\n\n return new ArrayList<>(forecasts.subList(startIndex, endIndex));\n }",
"private List<WeatherStation> getWeatherStations(){\n List<WeatherStation> weatherStations = new ArrayList<>();\n List<String> weatherStationList = new ArrayList<>();\n weatherStationList.add(Constants.STATION_CODE_ADELAIDE);\n weatherStationList.add(Constants.STATION_CODE_BRISBANE);\n weatherStationList.add(Constants.STATION_CODE_CAIRNS);\n weatherStationList.add(Constants.STATION_CODE_CANBERRA);\n weatherStationList.add(Constants.STATION_CODE_DARWIN);\n weatherStationList.add(Constants.STATION_CODE_GOLD_COAST);\n weatherStationList.add(Constants.STATION_CODE_HOBART);\n weatherStationList.add(Constants.STATION_CODE_MELBOURNE);\n weatherStationList.add(Constants.STATION_CODE_PERTH);\n weatherStationList.add(Constants.STATION_CODE_SYDNEY);\n\n for(String weatherStationCode : weatherStationList){\n weatherStations.add(WeatherStationFactory.getWeatherStation(weatherStationCode));\n }\n return weatherStations;\n }",
"public WeatherForecast getForecast(String city) throws WeatherForecastClientException {\n HttpResponse<String> response;\n try {\n URI uri = new URI(\"http\", \"api.openweathermap.org\", \"/data/2.5/weather\",\n String.format(\"q=%s&units=metric&lang=bg&appid=%s\", city, apiKey), null);\n\n System.out.println(uri);\n HttpRequest request = HttpRequest.newBuilder().uri(uri).build();\n response = weatherHttpClient.send(request, HttpResponse.BodyHandlers.ofString());\n\n } catch (URISyntaxException | IOException | InterruptedException e) {\n throw new WeatherForecastClientException(\"There was a problem with WeatherForecastClient.\", e);\n }\n if (response.statusCode() == HttpURLConnection.HTTP_OK) {\n Gson gson = new Gson();\n return gson.fromJson(response.body(), WeatherForecast.class);\n } else if (response.statusCode() == HttpURLConnection.HTTP_NOT_FOUND) {\n throw new LocationNotFoundException(\"Couldn't find location with name : \" + city);\n }\n\n throw new WeatherForecastClientException(\"There was a problem with WeatherForecastClient.\");\n }",
"@Override\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes attributes) throws SAXException {\n\t\tsuper.startElement(uri, localName, qName, attributes);\n\t\t\n\t\tif (TAG_CONDITION.equals(localName)) {\n\t\t\tmWeatherInfo.setWoeid(woeid);\n\t\t\tfor (int i = 0; i < attributes.getLength(); i++) {\n\t\t\t\tString qn = attributes.getQName(i);\n\t\t\t\t\n\t\t\t\tif (QNAME_CODE.equals(qn)) {\n\t\t\t\t\tmWeatherInfo.getCondition().setCode(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_DATE.equals(qn)) {\n\t\t\t\t\tmWeatherInfo.getCondition().setDate(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_TMP.equals(qn)) {\n\t\t\t\t\tmWeatherInfo.getCondition().setTemp(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_TEXT.equals(qn)) {\n\t\t\t\t\tmWeatherInfo.getCondition().setText(attributes.getValue(i));\n\t\t\t\t\tmWeatherInfo.setUpdateTime(System.currentTimeMillis());//wangjun\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (TAG_FORCAST.equals(localName)) {\n\t\t\tforecast = mWeatherInfo.new Forecast();\n\t\t\tfor (int i = 0; i < attributes.getLength(); i++) {\n\t\t\t\tString qn = attributes.getQName(i);\n\t\t\t\t\n\t\t\t\tif (QNAME_CODE.equals(qn)) {\n\t\t\t\t\tforecast.setCode(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_DAY.equals(qn)) {\n\t\t\t\t\tforecast.setDay(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_HIGH.equals(qn)) {\n\t\t\t\t\tforecast.setHigh(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_LOW.equals(qn)) {\n\t\t\t\t\tforecast.setLow(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_TEXT.equals(qn)) {\n\t\t\t\t\tforecast.setText(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_DATE.equals(qn)) {\n\t\t\t\t\tforecast.setDate(attributes.getValue(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\tmWeatherInfo.getForecasts().add(forecast);\n\t\t}\n\t}",
"public void updateConditions() {\n\n weatherTower = new WeatherTower();\n String newWeather = weatherTower.getWeather(coordinates); // this is the currentWeather algorythm\n\n switch (newWeather) {\n\n case WeatherType.SUN:\n coordinates.setLongitude(coordinates.getLongitude() + 2);\n coordinates.setHeight(coordinates.getHeight() + 4);\n message = \"Baloon# \" + this.getName() + \"(\" + this.getId() + \"): \" + \"It is so sunny and hot.\";\n System.out.println(\"message\");\n try(PrintWriter pw = new PrintWriter(new FileOutputStream(new File(\"outputFile.txt\"), true))){\n pw.println(message);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n break;\n\n case WeatherType.RAIN:\n coordinates.setLatitude(coordinates.getLatitude() - 5);\n message = \"Baloon#\" + this.getName() + \"(\" + this.getId() + \"): \" + \"Damn you rain! You messed up my baloon.\";\n System.out.println(\"message\");\n try(PrintWriter pw = new PrintWriter(new FileOutputStream(new File(\"outputFile.txt\"), true))){\n pw.println(message);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n break;\n\n case WeatherType.FOG:\n coordinates.setLatitude(coordinates.getLatitude() - 3);\n message = \"Baloon#\" + this.getName() + \"(\" + this.getId() + \"): \" + \"Even though it's fog, let's take some pics!\";\n System.out.println(\"message\");\n try(PrintWriter pw = new PrintWriter(new FileOutputStream(new File(\"outputFile.txt\"), true))){\n pw.println(message);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n break;\n\n case WeatherType.SNOW:\n coordinates.setHeight(coordinates.getHeight() - 15);\n message = \"Baloon#\" + this.getName() + \"(\" + this.getId() + \"): \" + \" It's snowing. We're gonna crash.\\n\";\n System.out.println(\"message\");\n try(PrintWriter pw = new PrintWriter(new FileOutputStream(new File(\"outputFile.txt\"), true))){\n pw.println(message);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n break;\n }\n }",
"public LongTermForecast(JSONObject j, char tempUnits){\n \n /*Set sub-JSONObjects\n *OpenWeatherMap returns a large JSONObject that contains multiple\n *smaller JSONObjects; we get these during this step\n */\n \ttry{\n this.jCity = j.getJSONObject(\"city\");\n this.jListArray = j.getJSONArray(\"list\");\n this.jTempList = new ArrayList<JSONObject>();\n this.jWeatherList = new ArrayList<JSONObject>();\n int dateOffset = 0; // <--- To exclude the current day, change this to 1\n for (int i = dateOffset; i < 5 + dateOffset; i++) \n {\n JSONObject nextObject = jListArray.getJSONObject(i);\n this.jTempList.add(nextObject.getJSONObject(\"temp\"));\n this.jWeatherList.add(nextObject.getJSONArray(\"weather\").getJSONObject(0));\n }\n this.tempUnits = tempUnits;\n\n \n //Set the variable values based on the JSON data\n this.fullCityName = getFullCityName(jCity);\n this.temperatureList = new ArrayList<String>();\n this.minTempList = new ArrayList<String>();\n this.maxTempList = new ArrayList<String>();\n this.skyConditionList = new ArrayList<String>();\n this.skyIconList = new ArrayList<ImageIcon>();\n this.dateList = new ArrayList<String>();\n for (int i = 0; i < 5; i++)\n {\n JSONObject nextTemp = jTempList.get(i);\n JSONObject nextWeather = jWeatherList.get(i);\n this.temperatureList.add(getTemperature(nextTemp));\n this.minTempList.add(getMinTemp(nextTemp));\n this.maxTempList.add(getMaxTemp(nextTemp));\n this.skyConditionList.add(getSkyCondition(nextWeather));\n try{\n this.skyIconList.add(getSkyIcon(nextWeather));\n }\n catch(IOException e){\n System.out.println(\"Error: Can't obtain sky icon\");\n }\n this.dateList.add(getDate(jListArray, i + dateOffset));\n }\n \t} catch (Exception e){\n\t\t\tthis.temperatureList = new ArrayList<String>();\n\t\t\tthis.skyConditionList = new ArrayList<String>();\n\t\t\tthis.skyIconList = new ArrayList<ImageIcon>();\n\t\t\tthis.minTempList = new ArrayList<String>();\n\t\t\tthis.maxTempList = new ArrayList<String>();\n\t this.dateList = new ArrayList<String>();\n\t\t\tfor (int i = 0; i < 8; i++)\n\t\t\t{\n\t\t\t\tthis.minTempList.add(\"No Data \");\n\t\t\t\tthis.maxTempList.add(\"No Data \");\n\t\t\t\tthis.temperatureList.add(\"No Data \");\n\t\t\t\tthis.dateList.add(\"No Data \");\n\t\t\t\ttry {\n\t\t\t\t\tthis.skyIconList.add(getSkyIcon(new JSONObject(\"{icon:01d}\")));\n\t\t\t\t} catch (JSONException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tthis.skyConditionList.add(\"No Data \");\n\t\t\t} \n\t\t}\n\n }",
"private void updateWeather() {\n\t\tFetchWeatherTask weatherTask = new FetchWeatherTask(getActivity()); \n\t\tString location = Utility.getPreferredLocation(getActivity());\n\t\tweatherTask.execute(location); \n\t}",
"@Override\n protected Void doInBackground(Void... voids) {\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(BaseUrl)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n WeatherService service = retrofit.create(WeatherService.class);\n Call<CurrentWeatherCallResult> call = service.getCurrentWeatherDataLatLng(String.valueOf(latLng.latitude), String.valueOf(latLng.longitude), AppId);\n call.enqueue(new Callback<CurrentWeatherCallResult>() {\n @Override\n public void onResponse(@NonNull Call<CurrentWeatherCallResult> call, @NonNull Response<CurrentWeatherCallResult> response) {\n if (response.code() == 200 && response.body() != null) {//TODO DEFINE 200\n\n CurrentWeatherCallResult currentWeatherCallResult = response.body();\n CurrentWeather currentWeather =\n new CurrentWeather(\n position,\n currentWeatherCallResult.weather.get(0).description,\n currentWeatherCallResult.weather.get(0).icon,\n String.valueOf(Math.round((double) currentWeatherCallResult.main.temp_max - 273)),\n String.valueOf(Math.round((double) currentWeatherCallResult.main.temp_min - 273)),\n String.valueOf(Math.round((double) currentWeatherCallResult.main.temp - 273)),\n currentWeatherCallResult.name);\n Intent i;\n switch (position) {\n case -2:\n i = new Intent(\"CURRENT_WEATHER_SEARCH_A\");\n break;\n case -1:\n i = new Intent(\"CURRENT_WEATHER\");\n break;\n default:\n i = new Intent(\"CURRENT_WEATHER_F\");\n break;\n\n\n }\n i.putExtra(\"CURRENT_WEATHER_OBJECT\", currentWeather);\n mContext.sendBroadcast(i);\n }\n }\n\n @Override\n public void onFailure(@NonNull Call<CurrentWeatherCallResult> call, @NonNull Throwable t) {\n t.getMessage();\n }\n });\n return null;\n }",
"@GET(\"https://api.openweathermap.org/data/2.5/weather?\")\n Call<WeatherResponse> getWeatherData(@Query(\"q\") String city, @Query(\"appid\") String apiID, @Query(\"units\") String units);",
"@GetMapping(\"/weather/current\")\n public Location getCurrentWeather(@RequestParam(value = \"city\", required = false) final String city, @RequestParam(value = \"country\", required = false) final String country, @RequestParam(value = \"lon\", required = false) final String lon, @RequestParam(value = \"lat\", required = false) final String lat) {\n final StringBuilder locationBuilder = new StringBuilder();\n validator.getCurrentWeatherValidator(city, country, lon, lat);\n\n if (city != null) {\n locationBuilder.append(\"city=\").append(city);\n if(country != null) {\n locationBuilder.append(\"&country=\").append(country);\n }\n } else if (lat != null) {\n final double latitude = Double.parseDouble(lat);\n final double longitude = Double.parseDouble(lon);\n final Coordinates latLong = new Coordinates(longitude, latitude);\n locationBuilder.append(latLong.getUriComponent());\n } else {\n Coordinates randomCoordinates = getRandomCoordinates();\n locationBuilder.append(randomCoordinates.getUriComponent());\n }\n\n final String location = locationBuilder.toString();\n return weatherService.getCurrentConditions(location);\n }",
"@Override\n\tpublic List<DailyData> getDaywiseFood(int username) {\n\t\treturn mobileDao.getFoodData(username);\n\t}",
"public void getData(String lat, String lon) {\n // Instantiate the RequestQueue.\n RequestQueue queue = Volley.newRequestQueue(this);\n String url = \"https://api.openweathermap.org/data/2.5/air_pollution?lat=\"+lat+\"&lon=\"+lon+\"&appid=2bcdd94a20ae1c5acd2f35b063bb3a0f\";\n String forecast_url = \"https://api.openweathermap.org/data/2.5/air_pollution/forecast?lat=\"+lat+\"&lon=\"+lon+\"&appid=2bcdd94a20ae1c5acd2f35b063bb3a0f\";\n\n //*****************GET THE CURRENT VALUES***********************\n // Request a JSON response for the current values from the provided URL.\n JsonObjectRequest stringRequest = new JsonObjectRequest(Request.Method.GET, url, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n JSONObject details = response.getJSONArray(\"list\").getJSONObject(0);\n\n //Get day of the week\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"EEEE\");\n Date date = new java.util.Date(Long.valueOf(details.getInt(\"dt\"))*1000);\n String day = dateFormat.format(date );\n System.out.println(day);\n\n //Insert the retrieved to an object in order to be visualized\n Pollutants data = new Pollutants(day,\n details.getJSONObject(\"main\").getString(\"aqi\"),\n details.getJSONObject(\"components\").getString(\"pm2_5\"),\n details.getJSONObject(\"components\").getString(\"pm10\"),\n details.getJSONObject(\"components\").getString(\"o3\"),\n details.getJSONObject(\"components\").getString(\"co\"),\n details.getJSONObject(\"components\").getString(\"so2\"),\n details.getJSONObject(\"components\").getString(\"no2\"));\n\n //sending the data to be visualized\n visualizeUp(data);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(MainActivity.this, \"An error occurred!\", Toast.LENGTH_SHORT).show();\n Log.i(\"error\", String.valueOf(error));\n }\n }\n );\n\n // Add the request to the RequestQueue.\n queue.add(stringRequest);\n\n\n //***********************GET THE FORECAST VALUES**************************\n Pollutants[] forecast = new Pollutants[5];\n // Request a JSON response for the current values from the provided URL.\n JsonObjectRequest stringRequestF = new JsonObjectRequest(Request.Method.GET, forecast_url, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n for (int i = 0; i<5; i++) {\n JSONObject details = response.getJSONArray(\"list\").getJSONObject(132+(i*24)); //calculate date numbers by adding 24 hours per day\n\n //Get day of the week\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"EEEE\");\n Date date = new java.util.Date(Long.valueOf(details.getInt(\"dt\"))*1000);\n String day = dateFormat.format(date );\n System.out.println(day);\n\n forecast[i] = new Pollutants(day,\n details.getJSONObject(\"main\").getString(\"aqi\"),\n details.getJSONObject(\"components\").getString(\"pm2_5\"),\n details.getJSONObject(\"components\").getString(\"pm10\"),\n details.getJSONObject(\"components\").getString(\"o3\"),\n details.getJSONObject(\"components\").getString(\"co\"),\n details.getJSONObject(\"components\").getString(\"so2\"),\n details.getJSONObject(\"components\").getString(\"no2\"));\n }\n //Call visualize function to view the results\n visualizeForecast(forecast);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(MainActivity.this, \"An error occurred!\", Toast.LENGTH_SHORT).show();\n Log.i(\"error\", String.valueOf(error));\n }\n }\n );\n\n // Add the request to the RequestQueue.\n queue.add(stringRequestF);\n }",
"@Test(priority = 2)\n\tpublic void WeatherReportForParticularCity() {\n\t\ttest.homepage.searchForLocation(ReadWrite.getProperty(\"Noida_City_State\"));\n\t\ttest.currentWeatherReportPage.verifyCurrentDayAndTime();\n\t\tweatherMap = test.currentWeatherReportPage.storeInformationOfWeather();\n\n\t}",
"@Override\n\tpublic List<DailyData> getFoodData(String username, String date) {\n\t\treturn mobileDao.getFoodData(username,date);\n\t}",
"List<SpotPrice> getByCommodityAndFromDateAndToDateAndLocation(\n Commodity commodity,\n Date fromDate,\n Date toDate,\n Location location\n );",
"@Override\n @Cacheable(\"darkSkyFullWeather\")\n public WeatherDataDto getFullWeather(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String temperature = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"temperature\"));\n String pressure = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"pressure\"));\n String windSpeed = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"windSpeed\"));\n String humidity = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"humidity\")*100);\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setTemperature(temperature);\n weatherDataDto.setPressure(pressure);\n weatherDataDto.setWindSpeed(windSpeed);\n weatherDataDto.setHumidity(humidity);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }",
"@GetMapping(\"/{symbol}/{date}\")\n public ModelAndView daily(@PathVariable(\"symbol\") String symbol, @PathVariable(\"date\") String date) throws ParseException {\n\n Date sdf = new SimpleDateFormat(\"yyyy-MM-dd\").parse(date);\n\n String beginOfTheMonth = date.substring(0, 7) + \"-00\";\n String endOfTheMonth = date.substring(0,7) + \"-31\";\n Map<String, Object> model = new HashMap<>();\n\n try{\n String[] resp = quoteRepository.daily(symbol, sdf).split(\",\");\n Double closingResp = quoteRepository.closingDay(symbol, sdf);\n String[] monthResp = quoteRepository.monthly(symbol, beginOfTheMonth, endOfTheMonth).split(\",\");\n Double closingMonth = quoteRepository.closingMonth(symbol, beginOfTheMonth, endOfTheMonth);\n\n DayRecord dr = new DayRecord(Double.parseDouble(resp[0]), Double.parseDouble(resp[1]), Integer.parseInt(resp[2]), date, symbol);\n DayRecord mr = new DayRecord(Double.parseDouble(monthResp[0]), Double.parseDouble(monthResp[1]), Integer.parseInt(monthResp[2]), beginOfTheMonth, symbol);\n\n model.put(\"daily\", dr);\n model.put(\"closing\", closingResp);\n model.put(\"monthly\", mr);\n model.put(\"closingMonthly\", closingMonth);\n\n\n return new ModelAndView(\"main\", model);\n\n } catch (Exception e) {\n return new ModelAndView(\"error\", model);\n }\n }",
"private void weather() {\n\t\t// System.out.println(\"Sending weather information via Twitter.\");\n\t\t// TwitterComm.sendDirectMessage(Constants.AUTH_USER,\n\t\t// Alfred.getYrParser()\n\t\t// .getWeatherReport().twitterForecastToString());\n\t}",
"public interface WeatherForecastService {\n /**\n * query the weather forecast report by cityId\n * @param cityId inner city id\n * @return report\n */\n GeneralWeatherReport queryWeatherReport(String cityId);\n\n}",
"@Override\n\tpublic void startElement(String namespaceURI, String localName,\n\t\t\tString qName, Attributes atts) throws SAXException {\n\n\t\t// abertura da tag \"weather\" ou \"current_condition\"\n\t\tif (localName.equals(\"weather\")) {\n\t\t\tcv = new ContentValues();\n\t\t\tcv.put(WeatherCondition.ID_PLACE, p_id);\n\t\t\tin_weather = true;\n\t\t}\n\n\t\tif (localName.equals(\"current_condition\")) {\n\t\t\tcv = new ContentValues();\n\t\t\tcv.put(WeatherCondition.ID_PLACE, p_id);\n\t\t\tin_current_condition = true;\n\t\t}\n\n\t\t// tag com o URL da imagem da condição\n\t\tif (localName.equals(\"weatherIconUrl\"))\n\t\t\tin_img = true;\n\n\t\t// tag com a temperatura (para condições actuais)\n\t\tif (localName.equals(\"temp_C\"))\n\t\t\tin_temp_c = true;\n\n\t\t// tag com temperatura máxima (para previsões)\n\t\tif (localName.equals(\"tempMaxC\"))\n\t\t\tin_temp_max_c = true;\n\n\t\t// tag com temperatura mínima (para previsões)\n\t\tif (localName.equals(\"tempMinC\"))\n\t\t\tin_temp_min_c = true;\n\n\t\tif (localName.equals(\"observation_time\") || localName.equals(\"date\"))\n\t\t\tin_observation_time = true;\n\n\t\tif (localName.equals(\"weatherDesc\"))\n\t\t\tin_weather_desc = true;\n\n\t\tif (localName.equals(\"windspeedMiles\"))\n\t\t\tin_windspeed_miles = true;\n\n\t\tif (localName.equals(\"windspeedKmph\"))\n\t\t\tin_windspeed_kmph = true;\n\n\t\tif (localName.equals(\"winddir16Point\")\n\t\t\t\t|| localName.equals(\"winddirection\"))\n\t\t\tin_winddir = true;\n\n\t\tif (localName.equals(\"precipMM\"))\n\t\t\tin_precip_mm = true;\n\n\t\tif (localName.equals(\"humidity\"))\n\t\t\tin_humidity = true;\n\t}",
"public void updateWeatherConditions(Place p) {\n\t\ttry {\n\t\t\tWeatherCondition.deleteAllForPlace(p.getId(), db);\n\t\t\tp_id = p.getId();\n\n\t\t\tLog.d(\"WWO\", WWO_URL + WWO_NUMDAYS + \"&q=\" + p.getLatitude() + \",\"\n\t\t\t\t\t+ p.getLongitude());\n\n\t\t\tURL url = new URL(WWO_URL + WWO_NUMDAYS + \"&q=\" + p.getLatitude()\n\t\t\t\t\t+ \",\" + p.getLongitude());\n\n\t\t\tSAXParserFactory spf = SAXParserFactory.newInstance();\n\t\t\tSAXParser sp = spf.newSAXParser();\n\t\t\tXMLReader xr = sp.getXMLReader();\n\n\t\t\t// handler para lidar com o parsing do XML\n\t\t\txr.setContentHandler(this);\n\n\t\t\tURLConnection conn = url.openConnection();\n\t\t\t// os timeouts asseguram que o cliente não fica indefinidamente\n\t\t\t// bloqueado quando o servidor ou a ligação está com problemas\n\t\t\tconn.setConnectTimeout(WWO_TIMEOUT);\n\t\t\tconn.setReadTimeout(WWO_TIMEOUT);\n\t\t\tInputStream in = conn.getInputStream();\n\t\t\txr.parse(new InputSource(in));\n\n\t\t} catch (Exception e) {\n\t\t\t// FIXME e pode ser null?\n\t\t\tStackTraceElement[] st = e.getStackTrace();\n\t\t\tLog.d(\"WWO\", e.toString());\n\t\t\tfor (StackTraceElement el : st)\n\t\t\t\tLog.d(\"WWO\", el.toString());\n\t\t}\n\t}",
"@Cacheable(\"darkSkyDirectionWind\")\n public WeatherDataDto getDirectionWind(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setDirectionWind(constants.getMessageDoesNotSupportField());\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }",
"private void findHumidities(ForecastIO FIO, WeatherlyDayForecast day){\n FIOHourly hourlyForecast = new FIOHourly(FIO);\n int numHours = hourlyForecast.hours();\n\n //Determine the number of hours left in the day\n Calendar rightNow = Calendar.getInstance();\n int dayHoursLeft = 24 - rightNow.get(Calendar.HOUR_OF_DAY);\n\n //Find the lowest and highest chances for precipitation for the rest of the day\n double minHum = hourlyForecast.getHour(0).humidity();\n double maxHum = minHum;\n int maxHour = rightNow.get(Calendar.HOUR_OF_DAY);\n for (int i = 1; i < dayHoursLeft; i++){\n double hum = hourlyForecast.getHour(i).humidity();\n if (minHum > hum)\n minHum = hum;\n if (maxHum < hum) {\n maxHum = hum;\n maxHour = i + rightNow.get(Calendar.HOUR_OF_DAY);\n }\n\n }\n\n day.setHumMin((int) (minHum * 100));\n day.setHumMax((int) (maxHum * 100));\n day.setHumMaxTime(maxHour);\n }",
"@Override\n @Cacheable(\"darkSkyWindSpeed\")\n public WeatherDataDto getWindSpeed(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String windSpeed = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"windSpeed\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setWindSpeed(windSpeed);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }",
"private void setDailyValues(){\n //set updateTime\n SimpleDateFormat t = new SimpleDateFormat(\"h:mm:ss a\");\n updatedTime = \"Last updated: \" + t.format(new Date(System.currentTimeMillis()));\n \n //set maxTemp and minTemp\n maxTemp = Integer.toString(weather.getMaxTemp());\n minTemp = Integer.toString(weather.getMinTemp());\n \n //set sunriseTime and sunsetTime\n SimpleDateFormat sr = new SimpleDateFormat(\"h:mm a\");\n sunriseTime = sr.format(new Date(weather.getSunrise()*1000));\n SimpleDateFormat ss = new SimpleDateFormat(\"h:mm a\");\n sunsetTime = sr.format(new Date(weather.getSunset()*1000));\n }",
"interface OpenWeatherMapService {\n @GET(\"forecast/daily\")\n Call<Forecast> dailyForecast(\n @Query(\"q\") String city,\n @Query(\"mode\") String format,\n @Query(\"units\") String units,\n @Query(\"cnt\") Integer num,\n @Query(\"appid\") String appid);\n}",
"@RequestMapping(\"/weather-forecast\")\r\n\tpublic ModelAndView getWeatherForecast(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tSystem.out.println(\"~~~~~ INFO: inside getWeatherForecast() - WeatherNowController.java ~~~~~\");\r\n\t\t\r\n\t\tString location = request.getParameter(\"area\");\r\n\r\n\t\tWeatherService ws = new WeatherService();\r\n\t\tws.getWeatherForecast(location);\r\n\t\t\r\n\t\tModelAndView mv = new ModelAndView();\r\n\t\tmv.setViewName(\"display-weather.jsp\");\r\n\t\t\r\n\t\tmv.addObject(\"location\", location);\r\n\t\tmv.addObject(\"temperature\", ws.temperature);\r\n\t\tmv.addObject(\"description\", ws.description);\r\n\t\tmv.addObject(\"humidity\", ws.humidity);\r\n\t\tmv.addObject(\"wind_speed\", ws.wind_speed);\r\n\t\tmv.addObject(\"wind_angle\", ws.wind_angle);\r\n\t\t\r\n\t\t/* For debug purpose only */\r\n\t\tSystem.out.println(\"~~~~~ INFO: exiting getWeatherForecast() - WeatherNowController.java ~~~~~\");\r\n\t\t\r\n\t\treturn mv;\r\n\t}",
"public List<DataCenterForecast> execute(TimeSlotBasedEntity timeRange) {\n \tlogger.debug(\"Starting power planning loop for time range: \" + timeRange);\n \tlogger.debug(\"Requesting energy forecasts...\");\n\t\tList<DataCenterForecast> forecasts = erdsHandler.getEnergyForecasts(timeRange);\n logger.debug(\"Got energy forecasts: \" + forecasts);\n return forecasts;\n }",
"private void searchCity() {\n toggleProgress();\n try {\n WeatherClient client = builder.attach(this)\n .provider(new OpenweathermapProviderType())\n .httpClient(WeatherClientDefault.class)\n .config(config)\n .build();\n\n // Try to find a good location\n // using medium settings\n Criteria criteria = new Criteria();\n criteria.setPowerRequirement(Criteria.POWER_MEDIUM);\n criteria.setAccuracy(Criteria.ACCURACY_MEDIUM);\n // Can we use data?\n criteria.setCostAllowed(true);\n\n // Search city by gps/network using\n // above critera\n client.searchCityByLocation(\n criteria,\n new WeatherClient.CityEventListener() {\n\n // When we get the city list\n @Override\n public void onCityListRetrieved(List<City> cityList) {\n for (int i = 0; i < cityList.size(); i++) {\n adapter.set(cityList.get(i), i);\n }\n displayMessage(\"Not the correct results?\" +\n \" Press the button above to try again.\");\n }\n\n\n @Override\n public void onWeatherError(WeatherLibException wle) {\n displayMessage(\"There seems to be no \" +\n \"weather data, please try again later.\");\n\n }\n\n\n @Override\n public void onConnectionError(Throwable t) {\n displayMessage(\"Whoops! We can't seem to \" +\n \"connect to the weather servers.\");\n }\n\n });\n\n } catch (WeatherProviderInstantiationException e) {\n displayMessage(\"Error: Unable to access \" +\n \"the weather provider.\");\n } catch (LocationProviderNotFoundException e) {\n displayMessage(\"Whoops! Unable to access \" +\n \"location provider.\");\n } catch (NullPointerException e) {\n displayMessage(\"Whoops! We can't seem to\" +\n \"connect to the weather servers.\");\n }\n\n }",
"public void updateDeviceAir(){\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.add(Calendar.DATE, -1);\n\t\tDate date = calendar.getTime();\n\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tString time = df.format(date);\n\t\t\n\t\tHashMap<String, Integer> insideMap = deviceStatusDao.getAverageInside(time + \"%\");\n\t\tHashMap<String, Integer> outsideMap = deviceStatusDao.getAverageOutside(time + \"%\");\n\t\t//pair device air & city air\n\t\tfor(String device_id : insideMap.keySet()){\n\t\t\tDeviceAir deviceAir = new DeviceAir();\n\t\t\tdeviceAir.setDeviceID(device_id);\n\t\t\tdeviceAir.setInsideAir(insideMap.get(device_id));\n\t\t\tif(!outsideMap.containsKey(device_id)){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdeviceAir.setOutsideAir(outsideMap.get(device_id));\n\t\t\tdeviceAir.setDate(time);\n\t\t\tdeviceStatusDao.insertDeviceAir(deviceAir);\n\t\t}\n\t}",
"private void returnForecast() {\n\t\tif (callback != null) {\n\t\t\t// use the callback to prevent the client\n\t\t\tif (callback.get() != null) {\n\t\t\t\t// yep, we use a weakReference\n\t\t\t\tcallback.get().forecastLoaded(forecasts);\n\t\t\t}\n\t\t\tif (forecasts.isEmpty()&&reload) {\n\t\t\t\tupdateForecastRequest();\n\t\t\t} else {\n\t\t\t\t// then ask the serviceupdater to update data\n\t\t\t\t// but update only if one day of difference between the last update and now is more\n\t\t\t\t// than one day\n\t\t\t\tString strLastUpdate = MyApplication.instance.getServiceManager().getForecastServiceUpdater().getLastUpdate(this.woeid);\n\t\t\t\tLog.e(\"ForecastServiceData\", \"strLastUpdate \" + strLastUpdate);\n\t\t\t\ttry {\n\t\t\t\t\t// empty data base case and empty SharedPreference\n\t\t\t\t\tif (strLastUpdate.equals(\"null\")) {\n\t\t\t\t\t\tupdateForecastRequest();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// current case\n SimpleDateFormat sdf=MyApplication.instance.getServiceManager().getForecastServiceUpdater().getDateFormatForLastUpdate();\n\t\t\t\t\t\tDate lastUpdate = sdf.parse(strLastUpdate);\n\t\t\t\t\t\tif (new Date().getTime() - lastUpdate.getTime() > 1000 * 60 * 60 * 24) {\n\t\t\t\t\t\t\t// if the last update was one day ago, then make an automatic update\n\t\t\t\t\t\t\tupdateForecastRequest();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\tExceptionManager.manage(new ExceptionManaged(this.getClass(), R.string.exc_date_parsing, e));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@GET(\"/v3/weather/now.json\")\n Call<City> getCity(@Query(\"key\")String key,@Query(\"location\")String location);",
"void getWeatherObject(WeatherObject weatherObject);",
"public void readDayData() {\n\t\tlogger.info(\"Reading data for date: \" + date);\n\t}",
"@GET(\"weather?APPID=bec2ea2f434c848c09196f2de96e3c4c&units=metric\")\n Single<Weather> getWeatherData(@Query(\"q\") String name);",
"private void getDayNonSedTimeData(String accessToken) {\r\n String[] taskParams = new String[2];\r\n taskParams[0] = accessToken;\r\n\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(getString(R.string.fitbit_date_format));\r\n String formattedEndDate = dateFormat.format(endDate.getTime());\r\n\r\n taskParams[1] = \"https://api.fitbit.com/1/user/-/activities/steps/date/\"\r\n + formattedEndDate + \"/1d/15min.json\";\r\n\r\n updateRequestCount(taskParams.length - 1);\r\n\r\n new FitbitGetRequestTask(this).execute(taskParams);\r\n }",
"public static void main(String[] args) {\n\t\tLocalDate today = LocalDate.now();\n\t\t\n\t\tLocalDate dayOffDate = today.with(temporal -> {\n\t\t\t//1. temporal로부터 기준이 되는 날짜를 구한다.\n\t\t\tLocalDate theDay = LocalDate.from(temporal);\n\t\t\t\n\t\t\t//2. 둘째, 넷째 일요일을 구한다.\n\t\t\tLocalDate secondSunday = theDay.with(dayOfWeekInMonth(2, DayOfWeek.SUNDAY));\n\t\t\tLocalDate fourthSunday = theDay.with(dayOfWeekInMonth(4, DayOfWeek.SUNDAY));\n\t\t\t\n\t\t\t//3. 기준날짜와 쉬는 날을 비교해준다.\n\t\t\t// 2번째 일요일보다 기준일이 이전이면, 쉬는날을 2번째 일요일로 리턴\n\t\t\t// 4번째 일요일보다 기준일이 이전이면, 쉬는날을 4번째 일요일로 리턴\n\t\t\t// 4번째 일요일보다 기준일이 지났으면, 쉬는날을 다음달 2번째 일요일로 리턴\n\t\t\tif(theDay.isBefore(secondSunday)) {\n\t\t\t\treturn secondSunday;\n\t\t\t}else if(theDay.isBefore(fourthSunday)) {\n\t\t\t\treturn fourthSunday;\n\t\t\t}else {\n\t\t\t\treturn theDay.plusMonths(1).with(dayOfWeekInMonth(2, DayOfWeek.SUNDAY));\n\t\t\t}\n\t\t});\n\t\t\n\t\tSystem.out.println(\"오늘 기준 다음 마트 쉬는 날은 \" + dayOffDate + \"일 입니다.\");\n\t}",
"public void updateWeather(double lat, double lon){\n String appId = getString(R.string.owmapikey);\n\n new ConnectionTask().execute(\"http://api.openweathermap.org/data/2.5/weather?units=metric&lat=\" + lat +\"&lon=\" + lon + \"&appId=\" + appId, \"current\");\n new ConnectionTask().execute(\"http://api.openweathermap.org/data/2.5/forecast?units=metric&lat=\" + lat +\"&lon=\" + lon + \"&appId=\" + appId + \"&cnt=24\", \"forecast\");\n\n }",
"public void getWeatherData(View view){\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(editText.getWindowToken(), 0);\n\n //get city name from user's input in edittext\n String cityText = editText.getText().toString();\n\n //make sure spaces between words is handled properly\n try {\n String spacedCityName= URLEncoder.encode(cityText, \"UTF-8\");\n //concatenated string for link to be opened\n String link = \"https://openweathermap.org/data/2.5/weather?q=\" + spacedCityName + \"&appid=b6907d289e10d714a6e88b30761fae22\";\n //create Download class to download data\n DownloadClass downloadClass = new DownloadClass();\n downloadClass.execute(link);\n }catch (Exception e){\n loadToast();\n e.printStackTrace();\n }\n\n\n\n }",
"private void fetchdata(String countries)\n {\n final String url = \"https://api.weatherapi.com/v1/forecast.json?key=20cc9a9b0a4243b4be970612211704&q=\"+countries+\"&days=1&aqi=no&alerts=no\";\n\n StringRequest request = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response)\n {\n\n // Handle the JSON object and\n // handle it inside try and catch\n try {\n\n // Creating object of JSONObject\n JSONObject jsonObject = new JSONObject(response);\n country.setText(\"Region: \"+jsonObject.getJSONObject(\"location\").getString(\"region\"));\n currentWeather.setText(\"Currently \"+jsonObject.getJSONObject(\"current\").getJSONObject(\"condition\").getString(\"text\"));\n humidity.setText(\"Current Humidity: \"+jsonObject.getJSONObject(\"current\").getString(\"humidity\"));\n temperature.setText(\"Current°C: \"+jsonObject.getJSONObject(\"current\").getString(\"temp_c\"));\n temperatureF.setText(\"Current°F: \"+jsonObject.getJSONObject(\"current\").getString(\"temp_f\"));\n time.setText(\"Current Time: \"+jsonObject.getJSONObject(\"location\").getString(\"localtime\"));\n countryZone.setText(\"Current Zone: \"+jsonObject.getJSONObject(\"location\").getString(\"tz_id\"));\n windD.setText(\"Direction: \"+jsonObject.getJSONObject(\"current\").getString(\"wind_dir\"));\n windS.setText(\"Speed: \"+jsonObject.getJSONObject(\"current\").getString(\"wind_kph\")+\" Kph\");\n windDegree.setText(\"Degree: \"+jsonObject.getJSONObject(\"current\").getString(\"wind_degree\")+\" °\");\n\n JSONArray jsonArray = jsonObject.getJSONObject(\"forecast\").getJSONArray(\"forecastday\");\n for(int i = 0;i<jsonArray.length();i++){\n jsonObject = jsonArray.getJSONObject(i);\n tWeather = jsonObject.getJSONObject(\"day\").getJSONObject(\"condition\").getString(\"text\");\n tDate = jsonObject.getString(\"date\");\n tTempC = jsonObject.getJSONObject(\"day\").getString(\"avgtemp_c\");\n tTempF = jsonObject.getJSONObject(\"day\").getString(\"avgtemp_f\");\n tHumidity = jsonObject.getJSONObject(\"day\").getString(\"avghumidity\");\n\n phases = jsonObject.getJSONObject(\"astro\").getString(\"moon_phase\");\n sunriseT = jsonObject.getJSONObject(\"astro\").getString(\"sunrise\");\n sunsetT = jsonObject.getJSONObject(\"astro\").getString(\"sunset\");\n moonriseT = jsonObject.getJSONObject(\"astro\").getString(\"moonrise\");\n moonsetT = jsonObject.getJSONObject(\"astro\").getString(\"moonset\");\n TwillRain = jsonObject.getJSONObject(\"day\").getString(\"daily_chance_of_rain\");\n Twillsnow = jsonObject.getJSONObject(\"day\").getString(\"daily_chance_of_snow\");\n\n }\n forecastWeather.setText(tWeather+\" later\");\n tempTommorrowF.setText(\"Avg daily °F: \"+tTempF);\n tempTommorowC.setText(\"Avg daily °C: \"+tTempC);\n TchanceRain.setText(\"Chances of Rain \"+TwillRain+\" %\");\n TchanceSnow.setText(\"Chances of Snow \"+Twillsnow+\" %\");\n humidityT.setText(\"Humidity: \"+tHumidity);\n //myuri = Uri.parse(uriS);\n Tphases.setText(\"Moon Phases \"+phases);\n Tsunrise.setText(\"Sunsrise: \"+sunriseT);\n Tsunset.setText(\"Sunset: \"+sunsetT);\n Tmoonrise.setText(\"moonrise: \"+moonriseT);\n Tmoonset.setText(\"moonset: \"+moonsetT);\n\n\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error)\n {\n Toast.makeText(\n MainActivity.this,\n error.getMessage(),\n Toast.LENGTH_SHORT)\n .show();\n }\n });\n\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n requestQueue.add(request);\n requestQueue.getCache().clear();\n }",
"public static String getData(Location center, long proximity) throws MalformedURLException, IOException {\n String responseString = \"\";\r\n String outputString = \"\";\r\n\r\n //String wsURL = \"http://www.deeptraining.com/webservices/weather.asmx\";\r\n URL url = new URL(WS_URL);\r\n URLConnection connection = url.openConnection();\r\n HttpURLConnection httpConn = (HttpURLConnection)connection;\r\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\r\n String message = String.format(XML_INPUT, USER, PASS, proximity, center.getLatitude(), center.getLongitude());\r\n byte[] buffer = new byte[message.length()];\r\n buffer = message.getBytes();\r\n bout.write(buffer);\r\n byte[] b = bout.toByteArray();\r\n\r\n //String SOAPAction = \"http://litwinconsulting.com/webservices/GetWeather\";\r\n String SOAPAction = \"urn:provider/interface/chargepointservices/getPublicStations\";\r\n\r\n // Set the appropriate HTTP parameters.\r\n httpConn.setRequestProperty(\"Content-Length\",\r\n String.valueOf(b.length));\r\n httpConn.setRequestProperty(\"Content-Type\", \"text/xml; charset=utf-8\");\r\n httpConn.setRequestProperty(\"SOAPAction\", SOAPAction);\r\n httpConn.setRequestMethod(\"POST\");\r\n httpConn.setDoOutput(true);\r\n httpConn.setDoInput(true);\r\n OutputStream out = httpConn.getOutputStream();\r\n //Write the content of the request to the outputstream of the HTTP Connection.\r\n out.write(b);\r\n out.close();\r\n //Ready with sending the request.\r\n\r\n //Read the response.\r\n InputStreamReader isr =\r\n new InputStreamReader(httpConn.getInputStream());\r\n BufferedReader in = new BufferedReader(isr);\r\n\r\n //Write the SOAP message response to a String.\r\n while ((responseString = in.readLine()) != null) {\r\n outputString = outputString + responseString;\r\n }\r\n return outputString;\r\n }",
"@Override\n public String getWeatherAtCoords(@PathVariable(\"lat\") String lat, @PathVariable(\"lon\") String lon, @RequestParam(value = \"period\", defaultValue = \"0\") int period) {\n byte[] bytes;\n String utfLat = null;\n String utfLon = null;\n\n try {\n // First recode lat\n bytes = lat.getBytes(\"ISO-8859-1\");\n utfLat = new String(bytes, \"UTF-8\");\n\n // Now recode lon\n bytes = lon.getBytes(\"ISO-8859-1\");\n utfLon = new String(bytes, \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n logger.error(\"Failed to handle byte encoding of url parameter\", e);\n }\n\n if (utfLat != null && utfLon != null) {\n return weatherRequest.requestWeather(utfLat, utfLon, period);\n }\n else {\n return \"Error: please try your request again!\";\n }\n }",
"public static WeatherInfo extractWeather(String response) {\n JsonParser parser = new JsonParser();\n JsonElement jsonElement = parser.parse(response);\n JsonObject rootObject = jsonElement.getAsJsonObject();\n JsonObject location = rootObject.getAsJsonObject(\"location\");\n String city = location.get(\"name\").getAsString();\n String country = location.get(\"country\").getAsString();\n JsonObject current = rootObject.getAsJsonObject(\"current\");\n Double temp = current.get(\"temp_c\").getAsDouble();\n JsonObject condition = current.getAsJsonObject(\"condition\");\n String conditionText = condition.get(\"text\").getAsString();\n return new WeatherInfo(city, country, conditionText, temp);\n}",
"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 }",
"@Override\r\n\tpublic CinemaCondition getByDate(Date date) {\n\t\tString hql = \"from cinema_condition cc where cc.date = ?\";\r\n\t\tQuery query = this.getCurrentSession().createQuery(hql);\r\n\t\tquery.setParameter(0, date);\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<CinemaCondition> cinemaConditions = query.list();\r\n\t\tif(cinemaConditions!=null&&!cinemaConditions.isEmpty()){\r\n\t\t\treturn cinemaConditions.get(0);\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}"
] |
[
"0.63722724",
"0.6057269",
"0.60296744",
"0.5778082",
"0.5527695",
"0.54936033",
"0.5490559",
"0.54859775",
"0.54753196",
"0.546534",
"0.54472995",
"0.5342098",
"0.5310028",
"0.5307954",
"0.5245625",
"0.52390766",
"0.5226616",
"0.5189817",
"0.51778316",
"0.5176953",
"0.5170624",
"0.5167712",
"0.5155165",
"0.51188385",
"0.51179653",
"0.5106387",
"0.5089003",
"0.5088232",
"0.50830185",
"0.5081145",
"0.5066959",
"0.506259",
"0.5040935",
"0.5014702",
"0.49982914",
"0.4973971",
"0.4949584",
"0.49411035",
"0.49387166",
"0.49250135",
"0.4910571",
"0.48987404",
"0.48828095",
"0.48731008",
"0.48639318",
"0.48587114",
"0.48465455",
"0.48404852",
"0.48395246",
"0.48316315",
"0.48247716",
"0.48138118",
"0.4794623",
"0.4793965",
"0.4792352",
"0.4789137",
"0.47768295",
"0.47647402",
"0.47637638",
"0.4745166",
"0.47345147",
"0.47170636",
"0.47087905",
"0.47054935",
"0.46977064",
"0.4686593",
"0.46858457",
"0.46851248",
"0.46794277",
"0.46791637",
"0.46695563",
"0.4665384",
"0.46436507",
"0.46393716",
"0.4635324",
"0.4626974",
"0.46262336",
"0.46247342",
"0.4616897",
"0.46124387",
"0.4612294",
"0.46071452",
"0.45954",
"0.45865178",
"0.45821422",
"0.45724446",
"0.4570286",
"0.45680064",
"0.45578653",
"0.45549354",
"0.45517343",
"0.4551672",
"0.45390737",
"0.4538856",
"0.45341212",
"0.45340192",
"0.4533359",
"0.45267248",
"0.45216104",
"0.45115697"
] |
0.7002869
|
0
|
This method defines a way of getting the hourly weather forecast conditions for a given coordinate.
|
public abstract WeatherData[] getHourlyWeatherForecast(LocationCoordinate _location) throws Exception;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public abstract WeatherData[] getDailyWeatherForecast(LocationCoordinate _location) throws Exception;",
"public abstract WeatherData getCurrentWeather(LocationCoordinate _location) throws Exception;",
"@Override\n\tpublic String getHourlyWeatherData(String city, String country) throws IOException {\n\t\t\n\t\treturn connectFiveDayForecast(city, country);\n\t\t\n\t}",
"private void findHumidities(ForecastIO FIO, WeatherlyDayForecast day){\n FIOHourly hourlyForecast = new FIOHourly(FIO);\n int numHours = hourlyForecast.hours();\n\n //Determine the number of hours left in the day\n Calendar rightNow = Calendar.getInstance();\n int dayHoursLeft = 24 - rightNow.get(Calendar.HOUR_OF_DAY);\n\n //Find the lowest and highest chances for precipitation for the rest of the day\n double minHum = hourlyForecast.getHour(0).humidity();\n double maxHum = minHum;\n int maxHour = rightNow.get(Calendar.HOUR_OF_DAY);\n for (int i = 1; i < dayHoursLeft; i++){\n double hum = hourlyForecast.getHour(i).humidity();\n if (minHum > hum)\n minHum = hum;\n if (maxHum < hum) {\n maxHum = hum;\n maxHour = i + rightNow.get(Calendar.HOUR_OF_DAY);\n }\n\n }\n\n day.setHumMin((int) (minHum * 100));\n day.setHumMax((int) (maxHum * 100));\n day.setHumMaxTime(maxHour);\n }",
"private static boolean fetchYahooWeather() {\n try {\n SAXParserFactory spf = SAXParserFactory.newInstance();\n spf.setNamespaceAware(true);\n SAXParser parser = spf.newSAXParser();\n \n String yql_format = String.format(\"select %%s from %%s where woeid in (select woeid from geo.places(1) where text=\\\"%s, %s\\\")\", CITY, ST);\n \n /* Fetch Wind Data (temp, windDir, and windSpeed) */\n String yql_wind = String.format(yql_format, \"wind\", \"weather.forecast\");\n String url_wind = String.format(\"https://query.yahooapis.com/v1/public/yql?q=%s&format=xml&u=f\", URLEncoder.encode(yql_wind, \"UTF-8\"));\n \n DefaultHandler wind_handler = new DefaultHandler() {\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n //System.out.printf(\"uri=%s\\nlocalName=%s\\nqName=%s\\nattributes=%s\\n\\n\", uri, localName, qName, attributes);\n if (!qName.equals(\"yweather:wind\")) return;\n \n temp = Integer.parseInt(attributes.getValue(\"chill\"));\n \n int dir = Integer.parseInt(attributes.getValue(\"direction\")); // number from 0-359 indicating direction\n // I began writing an if tree, then remembered I was lazy.\n String[] dir_words = new String[] {\n \"east\", \"northeast\", \"north\", \"northwest\", \"west\", \"southwest\", \"south\", \"southeast\"\n };\n windDir = dir_words[dir/45];\n \n windSpeed = Integer.parseInt(attributes.getValue(\"speed\")); // speed in mph\n }\n };\n parser.parse(url_wind, wind_handler);\n \n /* Fetch Atronomy Data (sunriseHour and sunsetHour) */\n String yql_astro = String.format(yql_format, \"astronomy\", \"weather.forecast\");\n String url_astro = String.format(\"https://query.yahooapis.com/v1/public/yql?q=%s&format=xml&u=f\", URLEncoder.encode(yql_astro, \"UTF-8\"));\n \n DefaultHandler astro_handler = new DefaultHandler() {\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n //System.out.printf(\"uri=%s\\nlocalName=%s\\nqName=%s\\nattributes=%s\\n\\n\", uri, localName, qName, attributes);\n if (!qName.equals(\"yweather:astronomy\")) return;\n \n sunriseHour = Util.parseTime(attributes.getValue(\"sunrise\"));\n sunsetHour = Util.parseTime(attributes.getValue(\"sunset\"));\n \n }\n };\n parser.parse(url_astro, astro_handler);\n \n /* Fetch Description Data (sky) */\n String yql_sky = String.format(yql_format, \"item.condition.text\", \"weather.forecast\");\n String url_sky = String.format(\"https://query.yahooapis.com/v1/public/yql?q=%s&format=xml&u=f\", URLEncoder.encode(yql_sky, \"UTF-8\"));\n \n DefaultHandler sky_handler = new DefaultHandler() {\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n //System.out.printf(\"uri=%s\\nlocalName=%s\\nqName=%s\\nattributes=%s\\n\\n\", uri, localName, qName, attributes);\n if (!qName.equals(\"yweather:condition\")) return;\n \n sky = attributes.getValue(\"text\").toLowerCase();\n \n }\n };\n parser.parse(url_sky, sky_handler);\n \n return E.sky != null;\n \n } catch (java.net.UnknownHostException uhe) {\n if (Data.DEBUG) System.err.println(\"You are offline!\");\n return false;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }",
"void getForecastInitially(DarkSkyApi api, PlaceWeather weather){\n\n long newWeatherPlaceId = databaseInstance.weatherDao().insertPlaceWeather(weather);\n\n weather.getDaily().setParentPlaceId(newWeatherPlaceId);\n databaseInstance.weatherDao().insertDaily(weather.getDaily());\n\n List<DailyData> dailyData = weather.getDaily().getData();\n\n for(int i = 0; i < dailyData.size(); ++i){\n dailyData.get(i).setParentPlaceId(newWeatherPlaceId);\n dailyData.get(i).setId(\n databaseInstance.weatherDao().insertDailyData(dailyData.get(i))\n );\n }\n\n long currentDayId = dailyData.get(0).getId();\n\n weather.getHourly().setParentDayId(currentDayId);\n databaseInstance.weatherDao().insertHourly(weather.getHourly());\n\n List<HourlyData> hourlyData = weather.getHourly().getData();\n\n for(int i = 0; i < hourlyData.size(); ++i){\n hourlyData.get(i).setParentDayId(currentDayId);\n databaseInstance.weatherDao().insertHourlyData(hourlyData.get(i));\n }\n\n //now load hours of next 7 days initially\n String apiKey = context.getString(R.string.api_key);\n Map<String, String> avoid = new HashMap<>();\n avoid.put(\"units\", \"si\");\n avoid.put(\"lang\", \"en\");\n avoid.put(\"exclude\", \"alerts,daily\");\n\n\n PlaceWeather dayWeather;\n for(int i = 1; i < dailyData.size(); ++i){\n try{\n dayWeather = api.getTimeForecast(apiKey,\n weather.getLatitude(),\n weather.getLongitude(),\n dailyData.get(i).getTime()+1,\n avoid).execute().body();\n }catch (IOException e){\n break;\n }\n\n dayWeather.getHourly().setParentDayId(dailyData.get(i).getId());\n dayWeather.getHourly().setId(\n databaseInstance.weatherDao().insertHourly(dayWeather.getHourly())\n );\n\n hourlyData = dayWeather.getHourly().getData();\n\n for(int j = 0; j < hourlyData.size(); ++j){\n hourlyData.get(j).setParentDayId(dailyData.get(i).getId());\n databaseInstance.weatherDao().insertHourlyData(hourlyData.get(j));\n }\n }\n\n }",
"private static void getWeatherDataForInputValues(BigDecimal lat, BigDecimal lon) throws RemoteException{\n\t\t\n\t\tCalendar time = new GregorianCalendar();\t\t\t\t// Pass this as a GregorianCalendar for the Calendar to understand\n\t\ttime.setTime(new Date());\n\t\tSystem.out.println(\"Fetaching data from SOAP Web Service... Please wait\");\n\t\tString result = proxy.NDFDgen(lat,lon,\"time-series\",time,time,\"e\",wp);\n\t\tDocument dom= convertStringToDocument(result);\n\t\ttry{\n\t\t\t//Displaying the result on the output screen\n\t\t\tXPathFactory xpathFactory = XPathFactory.newInstance();\n\t\t\tXPath xpath = xpathFactory.newXPath();\n\t\t\tSystem.out.println(\"Minimum Temperature: \"+getValuesFromDom(dom,xpath,\"temperature[@type='minimum']\")); //print the minimum temp\n\t\t\tSystem.out.println(\"Maximum Temperature: \"+getValuesFromDom(dom,xpath,\"temperature[@type='maximum']\")); // print the maximum temp\n\t\t\tSystem.out.println(\"Wind Direction: \"+getValuesFromDom(dom,xpath,\"direction\")); // print the wind direction\n\t\t\tSystem.out.println(\"Wind Speed: \"+getValuesFromDom(dom,xpath,\"wind-speed\")); // print the wind speed\n\t\t\tSystem.out.println(\"Temperature Dew point: \"+getValuesFromDom(dom,xpath,\"temperature[@type='dew point']\")); // print the dew point temperature\n\t\t\tSystem.out.println(\"12 Hour Probability of Precipitation:\"+getValuesFromDom(dom,xpath,\"probability-of-precipitation\"));\n\t\t\tString command = isRefreshed();\n\t\t\tif(command.trim().toLowerCase().equals(\"yes\")){\n\t\t\t\t\n\t\t\t\tgetWeatherDataForInputValues(lat,lon);\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Test\n\tpublic void dayTimeAndNightTimeAreDetectedCorrectlyTest() {\n\t\tcurrentDate = LocalDate.of(2019, 01, 27);\n\t\tAverageTemperatureAndPressure atp = forecastService.getAverageTemperatureAndPressure(city, currentDate, 3);\n\t\t\n\t\tassertEquals(3, atp.getAvrgDayTimeTemperature(), 0.000000001);\n\t\tassertEquals(7, atp.getAvrgNightTimeTemperature(), 0.000000001);\n\t\tassertEquals(6, atp.getAvrgPressure(), 0.000000001);\n\t}",
"public void getWeather(String city, String units);",
"private void getWeatherData() {\n System.out.println(\"at getWeather\");\n String url = \"https://api.openweathermap.org/data/2.5/onecall/timemachine?lat=\";\n url += databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE);\n url += \"&lon=\" + databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LONGITUDE);\n url += \"&dt=\" + databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.START_TIME).substring(0, 10);\n url += \"&appid=your openweathermap API key\";\n new ClientThread(ClientThread.GET_WEATHER, new String[]{url, Integer.toString(experimentNumber)}, this).start();\n }",
"private void readWeatherConditions(XmlPullParser xpp)\n throws XmlPullParserException, IOException\n {\n int eventType = xpp.next();\n while (eventType != XmlPullParser.END_DOCUMENT)\n {\n if (eventType == XmlPullParser.START_TAG)\n {\n // Read a tag <weather-conditions weather-summary=\"Mostly Cloudy\"/>\n if (xpp.getName().equalsIgnoreCase(WEATHER_CONDITIONS))\n {\n String attrValue = readAttributeValue(xpp, WEATHER_SUMMARY,\n INVALID);\n this.forecast.addCondition(attrValue);\n }\n }\n else if (eventType == XmlPullParser.END_TAG)\n {\n // exit when we get to \"</weather>\"\n if (xpp.getName().equalsIgnoreCase(WEATHER))\n break;\n }\n eventType = xpp.next();\n }\n }",
"private void findWindSpeeds(ForecastIO FIO, WeatherlyDayForecast day){\n FIOHourly hourlyForecast = new FIOHourly(FIO);\n\n //Determine the number of hours left in the day\n Calendar rightNow = Calendar.getInstance();\n int dayHoursLeft = 24 - rightNow.get(Calendar.HOUR_OF_DAY);\n\n //Find the lowest and highest chances for precipitation for the rest of the day\n double minSpeed = hourlyForecast.getHour(0).windSpeed();\n double maxSpeed = minSpeed;\n int maxHour = rightNow.get(Calendar.HOUR_OF_DAY);\n for (int i = 1; i < dayHoursLeft; i++){\n double speed = hourlyForecast.getHour(i).windSpeed();\n if (minSpeed > speed)\n minSpeed = speed;\n if (maxSpeed < speed) {\n maxSpeed = speed;\n maxHour = i + rightNow.get(Calendar.HOUR_OF_DAY);\n }\n\n }\n\n day.setWindMin((int) (minSpeed + 0.5));\n day.setWindMax((int) (maxSpeed + 0.5));\n day.setWindMaxTime(maxHour);\n }",
"public HashMap<String,Weather> getPrecipData() {\n HashMap<String, Weather> result = new HashMap<String, Weather>();\n //String url = NOAA.PRECIP_URL.replace(\"*STARTDATE*\", startDate).replace(\"*ENDDATE*\", endDate);\n try {\n // Get and parse the JSON\n Response res = makeRequest(NOAA.PRECIP_URL);\n JsonParser parser = new JsonParser();\n JsonArray results = parser.parse(res.body().string())\n .getAsJsonObject()\n .getAsJsonArray(\"results\");\n\n // Iterate over results, storing the values un the hashmap,\n // the key is the StationID, the value is a weather object of the\n // conditions and information about the station.\n Iterator<JsonElement> iterator = results.iterator();\n while (iterator.hasNext()) {\n JsonObject e = iterator.next().getAsJsonObject();\n String type = e.get(\"datatype\").getAsString();\n String station = e.get(\"station\").getAsString();\n String attributes = e.get(\"attributes\").getAsString();\n String date = e.get(\"date\").getAsString();\n int value = e.get(\"value\").getAsInt();\n\n result.put(station, new Weather(type, station, attributes, date, value));\n }\n return result;\n } catch (IOException e) {\n e.printStackTrace();\n } catch (IllegalStateException e) {\n e.printStackTrace();\n }\n return null;\n }",
"net.webservicex.www.WeatherForecasts getWeatherForecasts();",
"private List<Tuple> weatherMap(Tuple input) {\n \n Map<String, String> mockLocationService = new HashMap<String, String>();\n mockLocationService.put(\"Harrisburg\", \"PA\");\n mockLocationService.put(\"Pittsburgh\", \"PA\");\n mockLocationService.put(\"Phildelphia\", \"PA\");\n mockLocationService.put(\"Houston\", \"TX\");\n mockLocationService.put(\"SanAntonio\", \"TX\");\n mockLocationService.put(\"Austin\", \"TX\");\n mockLocationService.put(\"Sacramento\", \"CA\");\n mockLocationService.put(\"LosAngeles\", \"CA\");\n mockLocationService.put(\"SanFransico\", \"CA\");\n \n List<Tuple> output = new ArrayList<Tuple>();\n \n String city = input.fst();\n String hiLow = input.snd();\n \n output.add(new Tuple(mockLocationService.get(city), hiLow));\n \n lolligag();\n \n //<state, hi low>\n return output;\n }",
"GeneralWeatherReport queryWeatherReport(String cityId);",
"@GET(\"/api/\" + BuildConfig.API_KEY + \"/conditions/hourly10day/q/{zip}.json\")\n Observable<WeatherModel> fetchWeather\n (@Path(\"zip\") String zipCode);",
"@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}",
"public void updateConditions() {\n\n weatherTower = new WeatherTower();\n String newWeather = weatherTower.getWeather(coordinates); // this is the currentWeather algorythm\n\n switch (newWeather) {\n\n case WeatherType.SUN:\n coordinates.setLongitude(coordinates.getLongitude() + 2);\n coordinates.setHeight(coordinates.getHeight() + 4);\n message = \"Baloon# \" + this.getName() + \"(\" + this.getId() + \"): \" + \"It is so sunny and hot.\";\n System.out.println(\"message\");\n try(PrintWriter pw = new PrintWriter(new FileOutputStream(new File(\"outputFile.txt\"), true))){\n pw.println(message);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n break;\n\n case WeatherType.RAIN:\n coordinates.setLatitude(coordinates.getLatitude() - 5);\n message = \"Baloon#\" + this.getName() + \"(\" + this.getId() + \"): \" + \"Damn you rain! You messed up my baloon.\";\n System.out.println(\"message\");\n try(PrintWriter pw = new PrintWriter(new FileOutputStream(new File(\"outputFile.txt\"), true))){\n pw.println(message);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n break;\n\n case WeatherType.FOG:\n coordinates.setLatitude(coordinates.getLatitude() - 3);\n message = \"Baloon#\" + this.getName() + \"(\" + this.getId() + \"): \" + \"Even though it's fog, let's take some pics!\";\n System.out.println(\"message\");\n try(PrintWriter pw = new PrintWriter(new FileOutputStream(new File(\"outputFile.txt\"), true))){\n pw.println(message);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n break;\n\n case WeatherType.SNOW:\n coordinates.setHeight(coordinates.getHeight() - 15);\n message = \"Baloon#\" + this.getName() + \"(\" + this.getId() + \"): \" + \" It's snowing. We're gonna crash.\\n\";\n System.out.println(\"message\");\n try(PrintWriter pw = new PrintWriter(new FileOutputStream(new File(\"outputFile.txt\"), true))){\n pw.println(message);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n break;\n }\n }",
"@Override\n\t\tprotected GetWeatherRes doInBackground(Void... params) {\n\t\t\treturn JsonOA.getWeatherInfo(cityId, timeStamp);\n\t\t}",
"boolean hasForecast();",
"@Override\n public void requestWeatherSuccess(Weather weather, Location requestLocation) {\n try {\n if (request != null) {\n List<WeatherInfo.DayForecast> forecastList = new ArrayList<>();\n for (int i = 0; i < weather.dailyList.size(); i++) {\n forecastList.add(\n new WeatherInfo.DayForecast.Builder(\n WeatherConditionConvertHelper.getConditionCode(\n weather.dailyList.get(i).weatherKinds[0],\n true))\n .setHigh(weather.dailyList.get(i).temps[0])\n .setLow(weather.dailyList.get(i).temps[1])\n .build());\n }\n WeatherInfo.Builder builder = new WeatherInfo.Builder(\n weather.base.city,\n weather.realTime.temp,\n WeatherContract.WeatherColumns.TempUnit.CELSIUS)\n .setWeatherCondition(\n WeatherConditionConvertHelper.getConditionCode(\n weather.realTime.weatherKind,\n TimeManager.getInstance(this)\n .getDayTime(this, weather, false)\n .isDayTime()))\n .setTodaysHigh(weather.dailyList.get(0).temps[0])\n .setTodaysLow(weather.dailyList.get(0).temps[1])\n .setTimestamp(weather.base.timeStamp)\n .setHumidity(\n Double.parseDouble(\n weather.index.humidities[1]\n .split(\" : \")[1]\n .split(\"%\")[0]))\n .setWind(\n Double.parseDouble(weather.realTime.windSpeed.split(\"km/h\")[0]),\n weather.realTime.windDegree,\n WeatherContract.WeatherColumns.WindSpeedUnit.KPH)\n .setForecast(forecastList);\n\n request.complete(new ServiceRequestResult.Builder(builder.build()).build());\n }\n } catch (Exception ignore) {\n requestWeatherFailed(requestLocation);\n }\n }",
"void handleWeatherDataForLocation(String lon, String lat);",
"IConditionsRequest getConditionsRequest(double lat, double lon, IRequestListener listener);",
"public static WeatherInfo extractWeather(String response) {\n JsonParser parser = new JsonParser();\n JsonElement jsonElement = parser.parse(response);\n JsonObject rootObject = jsonElement.getAsJsonObject();\n JsonObject location = rootObject.getAsJsonObject(\"location\");\n String city = location.get(\"name\").getAsString();\n String country = location.get(\"country\").getAsString();\n JsonObject current = rootObject.getAsJsonObject(\"current\");\n Double temp = current.get(\"temp_c\").getAsDouble();\n JsonObject condition = current.getAsJsonObject(\"condition\");\n String conditionText = condition.get(\"text\").getAsString();\n return new WeatherInfo(city, country, conditionText, temp);\n}",
"@Override\n public Single<WeatherData> getForecastData(@NonNull final Location location) {\n return Single.just(true)\n .observeOn(Schedulers.io())\n .flatMap(aBoolean -> api.getForecast(apiKey, location.latitude(), location.longitude(), EXCLUDE_DATA_BLOCKS, \"ca\"));\n }",
"float hour() {\n switch (this) {\n case NORTH_4M:\n case NORTH_16M:\n case SOUTH_4M:\n case SOUTH_16M:\n return 0f;\n case WILTSHIRE_4M:\n case WILTSHIRE_16M:\n /*\n * At 10h33m, Orion is about to set in the west and the\n * Pointers of the Big Dipper are near the meridian.\n */\n return 10.55f;\n }\n throw new IllegalStateException();\n }",
"public WeatherCondition getCondition() {\n return condition;\n }",
"@GetMapping(\"/weather/current\")\n public Location getCurrentWeather(@RequestParam(value = \"city\", required = false) final String city, @RequestParam(value = \"country\", required = false) final String country, @RequestParam(value = \"lon\", required = false) final String lon, @RequestParam(value = \"lat\", required = false) final String lat) {\n final StringBuilder locationBuilder = new StringBuilder();\n validator.getCurrentWeatherValidator(city, country, lon, lat);\n\n if (city != null) {\n locationBuilder.append(\"city=\").append(city);\n if(country != null) {\n locationBuilder.append(\"&country=\").append(country);\n }\n } else if (lat != null) {\n final double latitude = Double.parseDouble(lat);\n final double longitude = Double.parseDouble(lon);\n final Coordinates latLong = new Coordinates(longitude, latitude);\n locationBuilder.append(latLong.getUriComponent());\n } else {\n Coordinates randomCoordinates = getRandomCoordinates();\n locationBuilder.append(randomCoordinates.getUriComponent());\n }\n\n final String location = locationBuilder.toString();\n return weatherService.getCurrentConditions(location);\n }",
"@Override\n public void run() {\n for(int i=0;i<TheWeatherMan.WEATHER_CHECKS; i++) {\n\n // Have some delay\n try {\n Thread.sleep(1000* startTime);\n } catch (InterruptedException e) {\n System.out.println(\"『 Weather Report 』 Pacific has gone berserk and cant sleep.\\n\" +\n \"Terminating Program...\");\n System.exit(1);\n }\n\n /**\n * Handling Different City Temperatures -------------------------------------------\n */\n\n\n // Handling Singapore Temperatures\n if(cityName == \"Singapore\") {\n\n // Generates a random number between -.3 and .3\n double randNum = (Math.random() * (.6)) - .3;\n // Formats decimals to 2 places\n DecimalFormat df = new DecimalFormat(\"#.##\");\n\n cityTemperature = Double.valueOf(df.format((cityTemperature + randNum)));\n // Set Temp\n ((Satellite) satellite).setWeather1(cityTemperature);\n }\n\n // Handling Melbourne Temperatures\n if(cityName == \"Melbourne\") {\n Random random = new Random();\n double temp = (double) random.nextInt(45) + random.nextDouble();\n\n cityTemperature = temp;\n // Set Temp\n ((Satellite) satellite).setWeather2(cityTemperature);\n }\n\n // Handling Shanghai Temperatures\n if(cityName == \"Shanghai\") {\n\n // Fluctuate +-5\n Random random = new Random();\n double temp = ((double) random.nextInt(5) +\n random.nextDouble()) * (random.nextBoolean() ? 1 : -1);\n\n\n cityTemperature = cityTemperature + temp;\n // Set Temp\n ((Satellite) satellite).setWeather3(cityTemperature);\n }\n\n }\n }",
"@Override\n protected WeatherInfo doInBackground(Void... params) {\n String weatherID = \"\";\n String areaID = \"\";\n try {\n String cityIds = null;\n if (mRequest.getRequestInfo().getRequestType()\n == RequestInfo.TYPE_WEATHER_BY_WEATHER_LOCATION_REQ) {\n cityIds = mRequest.getRequestInfo().getWeatherLocation().getCityId();\n weatherID = cityIds.split(\",\")[0];\n areaID = cityIds.split(\",\")[1];\n } else if (mRequest.getRequestInfo().getRequestType() ==\n RequestInfo.TYPE_WEATHER_BY_GEO_LOCATION_REQ) {\n double lat = mRequest.getRequestInfo().getLocation().getLatitude();\n double lng = mRequest.getRequestInfo().getLocation().getLongitude();\n\n String cityNameResponse = HttpRetriever.retrieve(String.format(GEO_URL, lat, lng));\n if (TextUtils.isEmpty(cityNameResponse)) {\n return null;\n }\n cityNameResponse = cityNameResponse.replace(\"renderReverse&&renderReverse(\", \"\").replace(\")\", \"\");\n Log.d(TAG, \"cityNameResponse\" + cityNameResponse);\n JSONObject jsonObjectCity = JSON.parseObject(cityNameResponse);\n String areaName = jsonObjectCity.getJSONObject(\"result\").getJSONObject(\"addressComponent\").getString(\"district\");\n String cityName = jsonObjectCity.getJSONObject(\"result\").getJSONObject(\"addressComponent\").getString(\"city\");\n areaName = TextUtil.getFormatArea(areaName);\n cityName = TextUtil.getFormatArea(cityName);\n City city = cityDao.getCityByCityAndArea(cityName, areaName);\n if (city == null) {\n city = cityDao.getCityByCityAndArea(cityName, cityName);\n if (city == null)\n return null;\n }\n weatherID = city.getWeatherId();\n areaID = city.getAreaId();\n } else {\n return null;\n }\n\n //miui天气\n String miuiURL = String.format(URL_WEATHER_MIUI, weatherID);\n if (DEBUG) Log.d(TAG, \"miuiURL \" + miuiURL);\n String miuiResponse = HttpRetriever.retrieve(miuiURL);\n if (miuiResponse == null) return null;\n if (DEBUG) Log.d(TAG, \"Rmiuiesponse \" + miuiResponse);\n\n //2345天气\n String ttffUrl = String.format(URL_WEATHER_2345, areaID);\n if (DEBUG) Log.d(TAG, \"ttffUrl \" + ttffUrl);\n String ttffResponse = DecodeUtil.decodeResponse(HttpRetriever.retrieve(ttffUrl));\n if (ttffResponse == null) return null;\n if (DEBUG) Log.d(TAG, \"ttffResponse \" + ttffResponse);\n\n\n JSONObject ttffAll = JSON.parseObject(ttffResponse);\n String cityName = ttffAll.getString(\"cityName\");\n //实时\n JSONObject sk = ttffAll.getJSONObject(\"sk\");\n String humidity = sk.getString(\"humidity\");\n String sk_temp = sk.getString(\"sk_temp\");\n\n //日落日升\n JSONObject sunrise = ttffAll.getJSONObject(\"sunrise\");\n\n ArrayList<WeatherInfo.DayForecast> forecasts =\n parse2345(ttffAll.getJSONArray(\"days7\"), true);\n\n WeatherInfo.Builder weatherInfo = null;\n weatherInfo = new WeatherInfo.Builder(\n cityName, sanitizeTemperature(Double.parseDouble(sk_temp), true),\n WeatherContract.WeatherColumns.TempUnit.CELSIUS);\n //湿度\n humidity = humidity.replace(\"%\", \"\");\n weatherInfo.setHumidity(Double.parseDouble(humidity));\n\n if (miuiResponse != null) {\n //风速,风向\n JSONObject weather = JSON.parseObject(miuiResponse);\n JSONObject accu_cc = weather.getJSONObject(\"accu_cc\");\n weatherInfo.setWind(accu_cc.getDouble(\"WindSpeed\"), accu_cc.getDouble(\"WindDirectionDegrees\"),\n WeatherContract.WeatherColumns.WindSpeedUnit.KPH);\n }\n\n weatherInfo.setTimestamp(System.currentTimeMillis());\n weatherInfo.setForecast(forecasts);\n\n if (forecasts.size() > 0) {\n weatherInfo.setTodaysLow(sanitizeTemperature(forecasts.get(0).getLow(), true));\n weatherInfo.setTodaysHigh(sanitizeTemperature(forecasts.get(0).getHigh(), true));\n weatherInfo.setWeatherCondition(IconUtil.getWeatherCodeByType(\n ttffAll.getJSONArray(\"days7\").getJSONObject(0).getString(\n DateTimeUtil.isNight(sunrise.getString(\"todayRise\"), sunrise.getString(\"todaySet\"))\n ? \"nightWeaShort\" : \"dayWeaShort\"), sunrise.getString(\"todayRise\"), sunrise.getString(\"todaySet\")));\n }\n\n if (lastWeatherInfo != null)\n lastWeatherInfo = null;\n\n lastWeatherInfo = weatherInfo.build();\n\n return lastWeatherInfo;\n } catch (Exception e) {\n if (DEBUG) Log.w(TAG, \"JSONException while processing weather update\", e);\n }\n return null;\n }",
"boolean isSet(Coordinates coord, double horizon, long time)throws AstrometryException;",
"public ArrayList<Weather> getDarkSkyWeather(String longitude, String latitude) {\n\n Log.i(\"long: \", longitude);\n Log.i(\"lat: \", latitude);\n\n Weather weather = new Weather();\n ArrayList<Weather> weatherArr = new ArrayList<Weather>();\n ArrayList<String> temp = new ArrayList<String>();\n String content;\n try {\n content = weather.execute(\"https://api.darksky.net/forecast/a4b289aa3abfbee48b4fc1df98208a34/\"+ latitude + \",\" + longitude + \"?lang=vi&exclude=minutely,flags,currently\").get();\n\n if(content == null)\n {\n return null;\n }\n JSONObject obj = new JSONObject(content);\n\n JSONObject daily = obj.getJSONObject(\"daily\");\n JSONArray dataDaily = daily.getJSONArray(\"data\");\n\n String summary;\n String temperatureMin;\n String temperatureMax;\n String humidity;\n String windSpeed;\n String windGust;\n String airPressure;\n String visibility;\n String ozoneDensity;\n String uvIndex;\n String cloudCover;\n String precipProbability;\n String time;\n\n Bundle bundle2 = new Bundle();\n images = new Integer[dataDaily.length()];\n\n for(int i = 0; i < dataDaily.length(); i++)\n {\n Weather result = new Weather();\n\n JSONObject detail = dataDaily.getJSONObject(i);\n\n summary = detail.getString(\"summary\");\n temperatureMin = detail.getString(\"temperatureMin\");\n temperatureMax = detail.getString(\"temperatureMax\");\n precipProbability = detail.getString(\"precipProbability\");\n humidity = detail.getString(\"humidity\");\n windSpeed = detail.getString(\"windSpeed\");\n windGust = detail.getString(\"windGust\");\n airPressure = detail.getString(\"pressure\");\n visibility = detail.getString(\"visibility\");\n ozoneDensity = detail.getString(\"ozone\");\n uvIndex = detail.getString(\"uvIndex\");\n cloudCover = detail.getString(\"cloudCover\");\n time = unixTimeToDate(detail.getString(\"time\"));\n\n\n String precipProb = String.valueOf(String.format(\"%.0f\", (Float.parseFloat(precipProbability)*100))+ \"%\");\n\n // Update UI\n result.setDate(normalizeDate(time.substring(0, 10)));\n result.setWeather(summary);\n result.setDescription(\"Khả năng mưa: \" + precipProb);\n result.setTemperature(celsiusToFahrenheit(temperatureMax) + \"\\u2103\");\n result.setWind(\"Gió: \" + windSpeed + \"mph\");\n weatherArr.add(result);\n\n if(summary.toLowerCase().contains(\"quang\"))\n {\n images[i] = R.drawable.sunny;\n }\n if(summary.toLowerCase().contains(\"mưa\"))\n {\n images[i] = R.drawable.rainy;\n }\n else if (summary.toLowerCase().contains(\"âm u\"))\n {\n images[i] = R.drawable.foggy;\n }\n else if (summary.toLowerCase().contains(\"mây\"))\n {\n images[i] = R.drawable.cloudy;\n }\n else\n {\n images[i] = R.drawable.sunny;\n }\n\n\n// Bundle bundlee = new Bundle();\n// ArrayList<String> dailyData = new ArrayList<String>();\n//\n// dailyData.add(summary);\n// dailyData.add(precipProb);\n// dailyData.add(normalizeDate(time.substring(0, 10)));\n// dailyData.add(temperatureMin +\"\\u2103\");\n// dailyData.add(temperatureMax +\"\\u2103\");\n// dailyData.add(humidity + \"%\");\n// dailyData.add(windSpeed + \" mph\");\n// dailyData.add(windGust + \" mph\");\n// dailyData.add(airPressure + \" mb\");\n// dailyData.add(visibility + \" mi\");\n// dailyData.add(ozoneDensity + \" DU\");\n// dailyData.add(uvIndex);\n// dailyData.add(cloudCover);\n// dailyData.add(String.valueOf(i)); // fragment-tag\n//\n// bundlee.putStringArrayList(\"daily-data\",dailyData);\n\n\n Bundle bundle = new Bundle();\n bundle.putString(\"weather\", summary);\n bundle.putString(\"PoP\", precipProb);\n bundle.putString(\"date\", normalizeDate(time.substring(0, 10)));\n bundle.putString(\"tempMin\", temperatureMin +\"\\u2103\");\n bundle.putString(\"tempMax\", temperatureMax +\"\\u2103\");\n bundle.putString(\"humidity\", humidity + \"%\");\n bundle.putString(\"windSpeed\", windSpeed + \" mph\");\n bundle.putString(\"winGust\", windGust + \" mph\");\n bundle.putString(\"airPressure\", airPressure + \" mb\");\n bundle.putString(\"visibility\", visibility + \" mi\");\n bundle.putString(\"ozoneDensity\", ozoneDensity + \" DU\");\n bundle.putString(\"uvIndex\", uvIndex);\n bundle.putString(\"cloudCover\", cloudCover);\n bundle.putString(\"fragmentTag\", String.valueOf(i));\n\n temp.add(temperatureMin);\n\n bundleDailyArr.add(bundle);\n// bundleDailyArr.add(bundlee);\n\n// Log.i(\"Index: \", String.valueOf(i));\n// Log.i(\"summary :\", summary);\n// Log.i(\"temperatureMin :\", temperatureMin);\n// Log.i(\"temperatureMax :\", temperatureMax);\n// Log.i(\"humidity :\", humidity);\n// Log.i(\"windSpeed :\", windSpeed);\n// Log.i(\"winGust :\", windGust);\n// Log.i(\"airPressure :\", airPressure);\n// Log.i(\"visibility :\", visibility);\n// Log.i(\"ozoneDensity :\", ozoneDensity);\n// Log.i(\"uvIndex :\", uvIndex);\n// Log.i(\"cloudCover :\", cloudCover);\n// Log.i(\"cloudCover :\", \"\\n\");\n// Log.i(\"precipProbability :\", precipProbability);\n }\n\n for(int i = 0; i < temp.size(); i++)\n {\n bundle2.putString(\"temp\"+String.valueOf(i), temp.get(i));\n }\n\n\n\n// Get weather hourly\n\n JSONObject hourly = obj.getJSONObject(\"hourly\");\n JSONArray dataHourly = hourly.getJSONArray(\"data\");\n String temperature;\n\n for(int i = 0; i < dataHourly.length(); i++)\n {\n JSONObject detail = dataHourly.getJSONObject(i);\n\n temperature = detail.getString(\"temperature\");\n precipProbability = detail.getString(\"precipProbability\");\n windSpeed = detail.getString(\"windSpeed\");\n cloudCover = detail.getString(\"cloudCover\");\n\n Bundle bundle = new Bundle();\n bundle.putString(\"PoP\", precipProbability);\n //bundle.putString(\"temp\", String.valueOf((int)(Float.parseFloat(temperatureMin) + Float.parseFloat(temperatureMax) / 2)));\n bundle.putString(\"temperature\", temperature);\n bundle.putString(\"windSpeed\", windSpeed);\n bundle.putString(\"cloudCover\", cloudCover);\n bundle.putString(\"fragmentTagasd\", String.valueOf(i));\n\n\n bundleHourlyArr.putBundle(String.valueOf(i),bundle);\n\n\n Log.i(\"Hourly Index: \", String.valueOf(i));\n// Log.i(\"summary :\", summary);\n// Log.i(\"temperatureMin :\", temperatureMin);\n// Log.i(\"temperatureMax :\", temperatureMax);\n// Log.i(\"humidity :\", humidity);\n// Log.i(\"windSpeed :\", windSpeed);\n// Log.i(\"winGust :\", windGust);\n// Log.i(\"airPressure :\", airPressure);\n// Log.i(\"visibility :\", visibility);\n// Log.i(\"ozoneDensity :\", ozoneDensity);\n// Log.i(\"uvIndex :\", uvIndex);\n// Log.i(\"cloudCover :\", cloudCover);\n// Log.i(\"cloudCover :\", \"\\n\");\n// Log.i(\"precipProbability :\", precipProbability);\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return weatherArr;\n }",
"@Cacheable(\"weather\")\r\n\tpublic Weather getWeatherByLatitudeAndLongitude(String lat, String lon) {\n\t\tlogger.info(\"Requesting current weather for {}/{}\", lat, lon);\r\n\t\t\t\t\r\n\t\tURI url = new UriTemplate(WEATHER_URL1).expand(lat, lon, this.apiKey);\r\n\t\treturn invoke(url, Weather.class);\r\n\t}",
"@Override\n @Cacheable(\"darkSkyHumidity\")\n public WeatherDataDto getHumidity(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String humidity = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"humidity\")*100);\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setHumidity(humidity);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }",
"protected String[] doInBackground(String... args) {\n //Create string xml\n String xml;\n String cityName = \"Custom Location\";\n //if statement to determine if city name or coords\n if (args.length == 1) {\n //set xml to String returned from Function.executeGet() method sending API request to http address as parameter\n xml = Function.excuteGet(\"http://api.openweathermap.org/data/2.5/weather?q=\" + args[0] +\n \"&units=metric&appid=\" + OPEN_WEATHER_MAP_API);\n\n try {\n JSONObject json = new JSONObject(xml);\n JSONObject coord = json.getJSONObject(\"coord\");\n String lat = coord.getString(\"lat\");\n String lon = coord.getString(\"lon\");\n cityName = json.getString(\"name\");\n\n xml = Function.excuteGet(\"https://api.openweathermap.org/data/2.5/onecall?lat=\" + lat + \"&lon=\" + lon + \"&exclude=minutely&units=metric&appid=\" + OPEN_WEATHER_MAP_API);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n } else {\n\n xml = Function.excuteGet(\"http://api.openweathermap.org/data/2.5/weather?lat=\" + args[0] + \"&lon=\" + args[1] +\n \"&units=metric&appid=\" + OPEN_WEATHER_MAP_API);\n try {\n\n JSONObject json = new JSONObject(xml);\n cityName = json.getString(\"name\");\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n //set xml to String returned from Function.executeGet() method sending API request to http address as parameter\n xml = Function.excuteGet(\"https://api.openweathermap.org/data/2.5/onecall?lat=\" + args[0] +\n \"&lon=\" + args[1] + \"&exclude=minutely&units=metric&appid=\" + OPEN_WEATHER_MAP_API);\n }\n\n String[] json = {xml, cityName};\n\n return json;\n }",
"public interface IWeatherProvider {\r\n\r\n public CurrentWeather getCurrentCondition(String data) throws WeatherLibException;\r\n\r\n public WeatherForecast getForecastWeather(String data) throws WeatherLibException;\r\n\r\n public List<City> getCityResultList(String data) throws WeatherLibException;\r\n\r\n public WeatherHourForecast getHourForecastWeather(String data) throws WeatherLibException;\r\n\r\n public String getQueryCityURL(String cityNamePattern) throws ApiKeyRequiredException;\r\n\r\n // public String getQueryCurrentWeatherURL(String cityId) throws ApiKeyRequiredException;\r\n\r\n // public String getQueryForecastWeatherURL(String cityId) throws ApiKeyRequiredException;\r\n\r\n public HistoricalWeather getHistoricalWeather(String data) throws WeatherLibException;\r\n\r\n public String getQueryCityURLByLocation(Location location) throws ApiKeyRequiredException;\r\n\r\n public String getQueryCityURLByCoord(double lon, double lat) throws ApiKeyRequiredException;\r\n\r\n\r\n public void setConfig(WeatherConfig config);\r\n\r\n public void setWeatherCodeProvider(IWeatherCodeProvider codeProvider);\r\n\r\n public String getQueryImageURL(String weatherId) throws ApiKeyRequiredException;\r\n\r\n //public String getQueryHourForecastWeatherURL(String cityId) throws ApiKeyRequiredException;\r\n\r\n //public String getQueryHistoricalWeatherURL(String cityId, Date startDate, Date endDate) throws ApiKeyRequiredException;\r\n\r\n public String getQueryLayerURL(String cityId, Params params) throws ApiKeyRequiredException;\r\n\r\n\r\n\r\n public String getQueryCurrentWeatherURL(WeatherRequest request) throws ApiKeyRequiredException;\r\n\r\n public String getQueryForecastWeatherURL(WeatherRequest request) throws ApiKeyRequiredException;\r\n\r\n public String getQueryHourForecastWeatherURL(WeatherRequest request) throws ApiKeyRequiredException;\r\n\r\n public String getQueryHistoricalWeatherURL(WeatherRequest request, Date startDate, Date endDate) throws ApiKeyRequiredException;\r\n\r\n}",
"@Override\n @Cacheable(\"darkSkyFullWeather\")\n public WeatherDataDto getFullWeather(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String temperature = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"temperature\"));\n String pressure = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"pressure\"));\n String windSpeed = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"windSpeed\"));\n String humidity = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"humidity\")*100);\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setTemperature(temperature);\n weatherDataDto.setPressure(pressure);\n weatherDataDto.setWindSpeed(windSpeed);\n weatherDataDto.setHumidity(humidity);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }",
"public HistoricalWeather getHistoricalWeather(String data) throws WeatherLibException;",
"public String condition(String map, int x, int y, long date) {\n\tWeatherUnit weath = getWeather(date);\n if (weath == null) return \"dry\"; // No calendar present\n\t// Water is handled different, only wind counts\n\tScaledMap local = (ScaledMap)maps.get(map);\n\tif (local != null && local.getTerrain(x,y).equals(\"water\")) {\n\t return windCondition(local.getVegetation(x,y), weath);\n\t}\n\t\n\tData.HashList list = Data.getCondList();\n\tfor (int i = 0; i < list.keySet().size(); i++) {\n\t String n = list.getKey(i);\n\t int thresh = ((Data.Condition)list.get(n)).threshhold;\n\t String lvl = ((Data.Condition)list.get(n)).lvlname.toString();\n if ((weath.levels.get(lvl) != null) &&\n ((Integer)weath.levels.get(lvl)).intValue() >= thresh)\n\t\treturn n;\n\t}\n\n\t// Default\n\treturn \"dry\";\n }",
"@Override\n @Cacheable(\"darkSkySunriseTime\")\n public WeatherDataDto getSunriseTime(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n String sunrise = \"Api does not support this field.\";\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setSunrise(sunrise);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }",
"public Map getWeatherHourList(Map<String, String> paramMap) throws Exception {\n\t\t\n\t\tString sql=getSql(paramMap);\n\t\t\n\t\treturn baseDao.queryGridListNoPage(sql, paramMap);\n\t}",
"@GET(\"https://api.openweathermap.org/data/2.5/weather?\")\n Call<WeatherResponse> getWeatherData(@Query(\"q\") String city, @Query(\"appid\") String apiID, @Query(\"units\") String units);",
"void handleWeatherDataForCity(String cityName);",
"@Cacheable(\"darkSkyTemperature\")\n public WeatherDataDto getTemperature(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String temperature = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"temperature\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(getServiceName());\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setTemperature(temperature);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }",
"private WeatherUnit getWeather(long time, int stack) {\n if (time < 0) return null;\n\tString sidx = Data.stringDateTime(Main.WATCH*(time/Main.WATCH));\n if (sidx == null) return null; // No calendar present\n\tWeatherUnit weath = (WeatherUnit) availWeath.get(sidx);\n\t// Weather unit isn't there yet.\n\tif (weath == null) {\n\t if (stack > 0) {\n\t\tWeatherUnit old = getWeather(time - main.WATCH, stack - 1);\n if (old != null)\n weath = new WeatherUnit(old, time);\n else\n weath = new WeatherUnit(time);\n\t }\n\t else {\n\t\tweath = new WeatherUnit(time);\n\t }\n\t changed = true;\n\t setDirty(true);\n\t availWeath.put(sidx, weath);\n\n\t // Get parent in DOM document\n\t Node parent = stateDoc.getDocumentElement();\n\n\t // Put into DOM document\n\t Element nn = stateDoc.createElement(\"date\");\n\t nn.setAttribute(\"name\", Data.stringDateTime(time));\n\t weath.setAttributes(nn);\n\t parent.appendChild(nn);\n\t}\n\treturn weath;\n }",
"public HashMap<String, String> getSomeDaydata(int day) {\n\t\tif(day >= 0 && day <=4){\n\t\t\ttry {\n\t\t\t\tHashMap<String, String> day2Map = new HashMap<String, String>();\n\t\t\t\tJsonObject day2Object = this.jsonForecastArray.get(day).getAsJsonObject();\n\t\t\t\tday2Map.put(\"日期\", day2Object.get(\"date\").getAsString());\n\t\t\t\tday2Map.put(\"最高温\", day2Object.get(\"high\").getAsString());\n\t\t\t\tday2Map.put(\"最低温\", day2Object.get(\"low\").getAsString());\n\t\t\t\tday2Map.put(\"风力\", day2Object.get(\"fengli\").getAsString());\n\t\t\t\tday2Map.put(\"天气\", day2Object.get(\"type\").getAsString());\n\t\t\t\treturn day2Map;\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.e(\"WeatherRequest Class\", \"Hashmap hasn't init\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public static ArrayList<Weather> getForecast(String[][] array) { \n \t\t\n \t\tArrayList<Weather> hours = new ArrayList<Weather>();\t// array to hold weather info \n \t\t\n \t\t// iterates through database array\n \t\tfor( int i = 0; i < 30; i++) {\n\t\t\tString pretty = array[i][1];\n\t\t\tString cond = array[i][2];\n\t\t\tString temp = array[i][3];\n\t\t\tString humid = array[i][4];\n\t\t\tString icon = array[i][5];\n\t\t\thours.add(new Weather(pretty, cond, \"Temperature: \" + temp + \" degrees\", \"Humidity: \" + humid + \"%\", icon));\n \t\t}\n \t\treturn hours; \n \t}",
"private void getTemperatureAndHumidity() {\n // Get Temp and Humid sensors only at PM10 locations, otherwise\n // the connection takes too long to load all\n for (Sensor pm10sensor : this.sensorsPm10) {\n this.sensorsTempHumid.addAll(\n this.getSensors(\n this.readHTML(\n this.buildURLTempHumid(\n pm10sensor.getLatLng()))));\n }\n }",
"public WeatherNow getSingleWeather(int position){\n return weatherNow.get(position);\n }",
"@Cacheable(\"weather\")\r\n\tpublic Weather getWeatherByCityAndCountry(String country, String city) {\n\t\tlogger.info(\"Requesting current weather for {}/{}\", country, city);\r\n\t\t\r\n\t\tURI url = new UriTemplate(WEATHER_URL).expand(city, country, this.apiKey);\r\n\t\treturn invoke(url, Weather.class);\r\n\t}",
"@GET(\"/v3/weather/now.json\")\n Call<City> getCity(@Query(\"key\")String key,@Query(\"location\")String location);",
"public static WeatherDataModel hourlyForecastFromJson(final JSONObject jsonObject) throws JSONException {\n final WeatherDataModel model = new WeatherDataModel();\n List<WeatherDataModel> list = model.getHourlyForecast();\n for(int i=0; i<jsonObject.getJSONArray(\"list\").length(); i++) {\n list.add(hourlyWeatherElement(jsonObject.getJSONArray(\"list\").getJSONObject(i)));\n }\n return model;\n }",
"@Test(priority = 2)\n\tpublic void WeatherReportForParticularCity() {\n\t\ttest.homepage.searchForLocation(ReadWrite.getProperty(\"Noida_City_State\"));\n\t\ttest.currentWeatherReportPage.verifyCurrentDayAndTime();\n\t\tweatherMap = test.currentWeatherReportPage.storeInformationOfWeather();\n\n\t}",
"public YahooWeatherInformation getResult_Weather_Information(){\n return this.Result_Weather_Information;\n }",
"private List<WeatherStation> getWeatherStations(){\n List<WeatherStation> weatherStations = new ArrayList<>();\n List<String> weatherStationList = new ArrayList<>();\n weatherStationList.add(Constants.STATION_CODE_ADELAIDE);\n weatherStationList.add(Constants.STATION_CODE_BRISBANE);\n weatherStationList.add(Constants.STATION_CODE_CAIRNS);\n weatherStationList.add(Constants.STATION_CODE_CANBERRA);\n weatherStationList.add(Constants.STATION_CODE_DARWIN);\n weatherStationList.add(Constants.STATION_CODE_GOLD_COAST);\n weatherStationList.add(Constants.STATION_CODE_HOBART);\n weatherStationList.add(Constants.STATION_CODE_MELBOURNE);\n weatherStationList.add(Constants.STATION_CODE_PERTH);\n weatherStationList.add(Constants.STATION_CODE_SYDNEY);\n\n for(String weatherStationCode : weatherStationList){\n weatherStations.add(WeatherStationFactory.getWeatherStation(weatherStationCode));\n }\n return weatherStations;\n }",
"void updateForecast(DarkSkyApi api, PlaceWeather weather){\n\n long now = Calendar.getInstance().getTimeInMillis()/1000;\n\n deleteObsoleteEntries(now);\n\n long placeId = weather.getId();\n long currentDay = databaseInstance.weatherDao().selectObsoleteDayCount(now);\n long daysSaved = databaseInstance.weatherDao().selectDayCount();\n\n //check if need to load data\n if(daysSaved - currentDay < 7){\n\n List<HourlyData> hourlyData;\n\n String apiKey = context.getString(R.string.api_key);\n Map<String, String> avoid = new HashMap<>();\n avoid.put(\"units\", \"si\");\n avoid.put(\"lang\", \"en\");\n avoid.put(\"exclude\", \"alerts,daily\");\n\n long currentTime = weather.getDaily().getData().get(\n weather.getDaily().getData().size()-1\n ).getTime() + 1;\n\n //load days\n for(long day = daysSaved - currentDay; day < 7; ++day){\n currentTime += 3600 * 24;\n PlaceWeather nextDay;\n try{\n nextDay = api.getTimeForecast(apiKey,\n weather.getLatitude(),\n weather.getLongitude(),\n now, avoid).execute().body();\n }catch (IOException e){\n //log network failure\n break;\n }\n\n nextDay.getDaily().getData().get(0).setParentPlaceId(placeId);\n\n long nextDailyDataId =\n databaseInstance.weatherDao().insertDailyData(\n nextDay.getDaily().getData().get(0)\n );\n\n nextDay.getHourly().setParentDayId(nextDailyDataId);\n nextDay.getHourly().setId(\n databaseInstance.weatherDao().insertHourly(nextDay.getHourly())\n );\n\n hourlyData = nextDay.getHourly().getData();\n\n for(int j = 0; j < hourlyData.size(); ++j){\n hourlyData.get(j).setParentDayId(nextDailyDataId);\n databaseInstance.weatherDao().insertHourlyData(hourlyData.get(j));\n }\n }\n }\n }",
"public void getData(String lat, String lon) {\n // Instantiate the RequestQueue.\n RequestQueue queue = Volley.newRequestQueue(this);\n String url = \"https://api.openweathermap.org/data/2.5/air_pollution?lat=\"+lat+\"&lon=\"+lon+\"&appid=2bcdd94a20ae1c5acd2f35b063bb3a0f\";\n String forecast_url = \"https://api.openweathermap.org/data/2.5/air_pollution/forecast?lat=\"+lat+\"&lon=\"+lon+\"&appid=2bcdd94a20ae1c5acd2f35b063bb3a0f\";\n\n //*****************GET THE CURRENT VALUES***********************\n // Request a JSON response for the current values from the provided URL.\n JsonObjectRequest stringRequest = new JsonObjectRequest(Request.Method.GET, url, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n JSONObject details = response.getJSONArray(\"list\").getJSONObject(0);\n\n //Get day of the week\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"EEEE\");\n Date date = new java.util.Date(Long.valueOf(details.getInt(\"dt\"))*1000);\n String day = dateFormat.format(date );\n System.out.println(day);\n\n //Insert the retrieved to an object in order to be visualized\n Pollutants data = new Pollutants(day,\n details.getJSONObject(\"main\").getString(\"aqi\"),\n details.getJSONObject(\"components\").getString(\"pm2_5\"),\n details.getJSONObject(\"components\").getString(\"pm10\"),\n details.getJSONObject(\"components\").getString(\"o3\"),\n details.getJSONObject(\"components\").getString(\"co\"),\n details.getJSONObject(\"components\").getString(\"so2\"),\n details.getJSONObject(\"components\").getString(\"no2\"));\n\n //sending the data to be visualized\n visualizeUp(data);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(MainActivity.this, \"An error occurred!\", Toast.LENGTH_SHORT).show();\n Log.i(\"error\", String.valueOf(error));\n }\n }\n );\n\n // Add the request to the RequestQueue.\n queue.add(stringRequest);\n\n\n //***********************GET THE FORECAST VALUES**************************\n Pollutants[] forecast = new Pollutants[5];\n // Request a JSON response for the current values from the provided URL.\n JsonObjectRequest stringRequestF = new JsonObjectRequest(Request.Method.GET, forecast_url, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n for (int i = 0; i<5; i++) {\n JSONObject details = response.getJSONArray(\"list\").getJSONObject(132+(i*24)); //calculate date numbers by adding 24 hours per day\n\n //Get day of the week\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"EEEE\");\n Date date = new java.util.Date(Long.valueOf(details.getInt(\"dt\"))*1000);\n String day = dateFormat.format(date );\n System.out.println(day);\n\n forecast[i] = new Pollutants(day,\n details.getJSONObject(\"main\").getString(\"aqi\"),\n details.getJSONObject(\"components\").getString(\"pm2_5\"),\n details.getJSONObject(\"components\").getString(\"pm10\"),\n details.getJSONObject(\"components\").getString(\"o3\"),\n details.getJSONObject(\"components\").getString(\"co\"),\n details.getJSONObject(\"components\").getString(\"so2\"),\n details.getJSONObject(\"components\").getString(\"no2\"));\n }\n //Call visualize function to view the results\n visualizeForecast(forecast);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(MainActivity.this, \"An error occurred!\", Toast.LENGTH_SHORT).show();\n Log.i(\"error\", String.valueOf(error));\n }\n }\n );\n\n // Add the request to the RequestQueue.\n queue.add(stringRequestF);\n }",
"String[] getRawWeatherData(String city) throws JsonSyntaxException, Exception\n\t{\n\t\tfinal String urlHalf1 = \"http://api.openweathermap.org/data/2.5/weather?q=\";\n\t\tfinal String apiCode = \"&APPID=0bc46790fafd1239fff0358dc4cbe982\";\n\n\t\tString url = urlHalf1 + city + apiCode;\n\n\t\tString[] weatherData = new String[4];\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString hitUrl = url;\n\t\tString jsonData = getJsonData(hitUrl);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject jsonObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement weather = jsonObject.get(\"weather\");\n\t\t\tJsonElement main = jsonObject.get(\"main\");\n\n\t\t\tif (weather.isJsonArray())\n\t\t\t{\n\t\t\t\tJsonArray weatherArray = weather.getAsJsonArray();\n\n\t\t\t\tJsonElement skyElement = weatherArray.get(0);\n\n\t\t\t\tif (skyElement.isJsonObject())\n\t\t\t\t{\n\t\t\t\t\tJsonObject skyObject = skyElement.getAsJsonObject();\n\n\t\t\t\t\tJsonElement skyData = skyObject.get(\"description\");\n\n\t\t\t\t\tweatherData[0] = skyData.getAsString();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (main.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject mainToObject = main.getAsJsonObject();\n\t\t\t\tSystem.out.println(mainToObject.toString());\n\n\t\t\t\tJsonElement tempMin = mainToObject.get(\"temp_min\");\n\t\t\t\tJsonElement tempMax = mainToObject.get(\"temp_max\");\n\t\t\t\tJsonElement temp = mainToObject.get(\"temp\");\n\n\t\t\t\tweatherData[1] = tempMax.getAsString();\n\t\t\t\tweatherData[2] = tempMin.getAsString();\n\t\t\t\tweatherData[3] = temp.getAsString();\n\t\t\t}\n\t\t}\n\n\t\treturn weatherData;\n\t}",
"@Cacheable(\"darkSkyFeelsLikeTemperature\")\n public WeatherDataDto getFeelsLikeTemperature(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String temperatureFeelsLike = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"apparentTemperature\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setTemperatureFeelsLike(temperatureFeelsLike);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }",
"public double getWeatherAPI() {\n\t\tRestAssured.baseURI= props.getProperty(\"BaseURI\");\n\t\tString response = \tgiven().log().all().header(\"Content-Type\",\"application/json\").\n\t\t\t\tqueryParam(\"q\", props.getProperty(\"city\")).\n\t\t\t\tqueryParam(\"appid\", props.getProperty(\"key\")).\n\t\t\t\tqueryParam(\"units\", props.getProperty(\"unit\"))\n\t\t\t\t.when().get(\"data/2.5/weather\")\n\t\t\t\t.then().log().all().assertThat().statusCode(200).header(\"charset\", \"UTF-8\").extract().response().asString();\n\n\n\t\tSystem.out.println(response);\n\n\t\tJsonPath json = new JsonPath(response); // parsing the String response to Json\n\t\tString temp = json.getString(\".main.temp\");\n\t\tSystem.out.println(temp);\n\t\t\n\t\tdouble tempurature = Double.parseDouble(temp);\n\t\t\n\t\treturn tempurature;\n\t\t\n\t\t\n\t\t\n\t}",
"private void requestWeatherTypes() {\n SharedPreferences preferences = getSharedPreferences(CommonConstants.APP_SETTINGS, MODE_PRIVATE);\n String url = \"https://api.openweathermap.org/data/2.5/forecast?\" +\n \"id=\" + input.get(CommonConstants.ARRIVAL_CITY_ID) +\n \"&appid=\" + CommonConstants.OWM_APP_ID +\n \"&lang=\" + Locale.getDefault().getLanguage() +\n \"&units=\" + preferences.getString(CommonConstants.TEMPERATURE_UNIT, \"Standard\");\n ForecastListener listener = new ForecastListener(weatherList -> {\n try {\n WeatherTypeMapper mapper = new WeatherTypeMapper();\n fillPreview(mapper.from(weatherList));\n if (input.containsKey(CommonConstants.SELECTIONS)) {\n //noinspection unchecked\n setSelections((List<Settings.Selection>) input.get(CommonConstants.SELECTIONS));\n }\n } catch (ExecutionException | InterruptedException e) {\n Log.e(TAG, \"onSuccess: \" + e.getMessage(), e);\n }\n });\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null, listener, null);\n TravelRequestQueue.getInstance(this).addRequest(request);\n }",
"HashMap<String, Double> getPortfolioData(String date);",
"@GET(\"weather?APPID=bec2ea2f434c848c09196f2de96e3c4c&units=metric\")\n Single<Weather> getWeatherData(@Query(\"q\") String name);",
"@Override\n public Day getCurrentDay(double lat, double lon) throws Exception {\n String tempUnitPref = sharedPref.getString(SettingsFragment.TEMP_UNIT_KEY,\"\");\n\n String res = this.httpRequester.getWeatherByCoordinates(lat, lon);\n WeatherResponse weather = this.jsonConverter.jsonToWeatherResponse(res);\n\n Day current = new Day();\n current.setLocationCity(weather.getName());\n\n switch(tempUnitPref){\n case \"Celsius\":\n current.setTemperature((float)TemperatureUnitConvertor.\n kelvinToCelsius(weather.getMain().getTemp()));\n current.setTemperatureUnit(\"C\");\n break;\n case \"Fahrenheit\":\n current.setTemperature((float)TemperatureUnitConvertor.\n kelvinToFahrenheit(weather.getMain().getTemp()));\n current.setTemperatureUnit(\"F\");\n break;\n }\n\n int weatherConditionsCode = weather.getWeather()[0].getId();\n\n current.setWeather(this.getWeatherConditionsByCode(weatherConditionsCode));\n current.setWindSpeed((float) weather.getWind().getSpeed());\n current.setLastUpdated(new Date());\n\n return current;\n }",
"public void updateWeatherConditions(Place p) {\n\t\ttry {\n\t\t\tWeatherCondition.deleteAllForPlace(p.getId(), db);\n\t\t\tp_id = p.getId();\n\n\t\t\tLog.d(\"WWO\", WWO_URL + WWO_NUMDAYS + \"&q=\" + p.getLatitude() + \",\"\n\t\t\t\t\t+ p.getLongitude());\n\n\t\t\tURL url = new URL(WWO_URL + WWO_NUMDAYS + \"&q=\" + p.getLatitude()\n\t\t\t\t\t+ \",\" + p.getLongitude());\n\n\t\t\tSAXParserFactory spf = SAXParserFactory.newInstance();\n\t\t\tSAXParser sp = spf.newSAXParser();\n\t\t\tXMLReader xr = sp.getXMLReader();\n\n\t\t\t// handler para lidar com o parsing do XML\n\t\t\txr.setContentHandler(this);\n\n\t\t\tURLConnection conn = url.openConnection();\n\t\t\t// os timeouts asseguram que o cliente não fica indefinidamente\n\t\t\t// bloqueado quando o servidor ou a ligação está com problemas\n\t\t\tconn.setConnectTimeout(WWO_TIMEOUT);\n\t\t\tconn.setReadTimeout(WWO_TIMEOUT);\n\t\t\tInputStream in = conn.getInputStream();\n\t\t\txr.parse(new InputSource(in));\n\n\t\t} catch (Exception e) {\n\t\t\t// FIXME e pode ser null?\n\t\t\tStackTraceElement[] st = e.getStackTrace();\n\t\t\tLog.d(\"WWO\", e.toString());\n\t\t\tfor (StackTraceElement el : st)\n\t\t\t\tLog.d(\"WWO\", el.toString());\n\t\t}\n\t}",
"@CrossOrigin(origins = \"*\")\n @GetMapping(\"buildings/{building_id}/floors/floor_plan\")\n public @ResponseBody\n Iterable<Sensor> searchSensorByLocation(\n @PathVariable final long building_id,\n @RequestParam final Integer floor_number,\n @RequestParam final String x_coordinate,\n @RequestParam final String y_coordinate) {\n return sensorService.searchSensorByLocation(building_id, floor_number, x_coordinate, y_coordinate);\n }",
"Weather getById(Long id);",
"com.google.ads.googleads.v13.services.ForecastMetrics getForecast();",
"protected String doInBackground(Object... args) \n {\n try \n {\n // the url for the WorldWeatherOnline JSON service\n URL webServiceURL = new URL(resources.getString(\n R.string.pre_zipcode_url) + zipcodeString\n + \"&format=json&num_of_days=1&fx=yes&includelocation=no&key=400a485fad960489458a8cea3e1fc\");\n \n // create a stream Reader from the WeatherBug url\n Reader forecastReader = new InputStreamReader(\n webServiceURL.openStream());\n \n // create a JsonReader from the Reader\n JsonReader forecastJsonReader = new JsonReader(forecastReader);\n \n forecastJsonReader.beginObject(); // read the first Object\n\n // get the next name\n String name = forecastJsonReader.nextName();\n \n // if its the name expected for current conditions\n if (name.equals(resources.getString(R.string.hourly_forecast))) \n {\n readForecast(forecastJsonReader); // read the forecast\n } // end if\n \n forecastJsonReader.close(); // close the JsonReader\n } // end try\n catch (MalformedURLException e) \n {\n Log.v(TAG, e.toString());\n } // end catch\n catch (IOException e) \n {\n Log.v(TAG, e.toString());\n } // end catch\n catch (IllegalStateException e)\n {\n Log.v(TAG, e.toString() + zipcodeString);\n } // end catch\n return null; \n }",
"public List<WeatherModel> getPastWeather() {\n return getPastWeather(5);\n }",
"Weather create(WeatherInformation weatherInformation);",
"@Test(priority = 4)\n\tpublic void verify_Weather_Data_Appears_OnSearching_By_CityAndStateCode() {\n\t\tWeatherAPI.getWeatherInfo(ReadWrite.getProperty(\"London_City_State\"), ConfigFileReader.getProperty(\"appid\"),\n\t\t\t\t200);\n\n\t}",
"public static ContentValues[] parseJson(String jsonData, Context context){\n ContentValues contentValues[];\n try{\n Boolean isCelcius = SunshinePreference.isMetric(context);\n String maxTemp = \"\";\n String minTemp = \"\";\n JSONObject root = new JSONObject(jsonData);\n JSONObject current = root.getJSONObject(\"current\");\n String current_TempC = current.getString(\"temp_c\");\n String current_TempF = current.getString(\"temp_f\");\n String current_pressure = current.getString(\"pressure_in\");\n JSONObject forecast = root.getJSONObject(\"forecast\");\n JSONArray forecastlist = forecast.getJSONArray(\"forecastday\");\n JSONObject rootData = null;\n\n contentValues = new ContentValues[forecastlist.length()];\n\n for(int i=0;i<forecastlist.length();i++){\n rootData = forecastlist.getJSONObject(i);\n String date = rootData.getString(\"date_epoch\");\n JSONObject days = rootData.getJSONObject(\"day\");\n if(isCelcius) {\n maxTemp = days.getString(\"maxtemp_c\");\n minTemp = days.getString(\"mintemp_c\");\n }else{\n maxTemp = days.getString(\"maxtemp_f\");\n minTemp = days.getString(\"mintemp_f\");\n }\n String condition = days.getJSONObject(\"condition\").getString(\"text\");\n String iconAndDaynight = days.getJSONObject(\"condition\").getString(\"icon\");\n String wind = days.getString(\"maxwind_kph\");\n String humidity = days.getString(\"avghumidity\");\n\n //data.add(date+\"-\"+maxTemp+\"-\"+minTemp+\"-\"+condition);\n contentValues[i] = new ContentValues();\n if(i == 0){\n if(isCelcius)\n contentValues[i].put(WeatherContract.WeatherEntry.COLUMN_CURRENT_TEMP,Double.valueOf(current_TempC));\n else\n contentValues[i].put(WeatherContract.WeatherEntry.COLUMN_CURRENT_TEMP,Double.valueOf(current_TempF));\n contentValues[i].put(WeatherContract.WeatherEntry.COLUMN_PRESSURE,Double.valueOf(current_pressure));\n }\n contentValues[i].put(WeatherContract.WeatherEntry.COLUMN_ICON,iconAndDaynight);\n contentValues[i].put(WeatherContract.WeatherEntry.COLUMN_DATE,Long.valueOf(date));\n contentValues[i].put(WeatherContract.WeatherEntry.COLUMN_MAX_TEMP,Double.valueOf(maxTemp));\n contentValues[i].put(WeatherContract.WeatherEntry.COLUMN_MIN_TEMP,Double.valueOf(minTemp));\n contentValues[i].put(WeatherContract.WeatherEntry.COLUMN_WIND_SPEED,Double.valueOf(wind));\n contentValues[i].put(WeatherContract.WeatherEntry.COLUMN_HUMIDITY,Double.valueOf(humidity));\n contentValues[i].put(WeatherContract.WeatherEntry.COLUMN_CONDITION,condition);\n contentValues[i].put(WeatherContract.WeatherEntry.COLUMN_WEATHER_ID,i);\n }\n }catch(JSONException e){\n e.printStackTrace();\n return null;\n }\n return contentValues;\n }",
"@RequestMapping(\"/weather-forecast\")\r\n\tpublic ModelAndView getWeatherForecast(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tSystem.out.println(\"~~~~~ INFO: inside getWeatherForecast() - WeatherNowController.java ~~~~~\");\r\n\t\t\r\n\t\tString location = request.getParameter(\"area\");\r\n\r\n\t\tWeatherService ws = new WeatherService();\r\n\t\tws.getWeatherForecast(location);\r\n\t\t\r\n\t\tModelAndView mv = new ModelAndView();\r\n\t\tmv.setViewName(\"display-weather.jsp\");\r\n\t\t\r\n\t\tmv.addObject(\"location\", location);\r\n\t\tmv.addObject(\"temperature\", ws.temperature);\r\n\t\tmv.addObject(\"description\", ws.description);\r\n\t\tmv.addObject(\"humidity\", ws.humidity);\r\n\t\tmv.addObject(\"wind_speed\", ws.wind_speed);\r\n\t\tmv.addObject(\"wind_angle\", ws.wind_angle);\r\n\t\t\r\n\t\t/* For debug purpose only */\r\n\t\tSystem.out.println(\"~~~~~ INFO: exiting getWeatherForecast() - WeatherNowController.java ~~~~~\");\r\n\t\t\r\n\t\treturn mv;\r\n\t}",
"public void setClimate(float temp, MaxThermostateMode mode, Date until) {\n\t\tif (until != null && config.mode == MaxThermostateMode.TEMPORARY)\n\t\t\tthrow new IllegalArgumentException(\"An until date may only be set in temporary mode.\");\n\n\t\tpersistence.beginTransaction();\n\n\t\t// validate and correct temperatures\n\t\tif (temp < MaxUtil.MIN_TEMPERATURE) {\n\t\t\ttemp = MaxUtil.MIN_TEMPERATURE;\n\t\t} else if (temp > MaxUtil.MAX_TEMPERATURE) {\n\t\t\ttemp = MaxUtil.MAX_TEMPERATURE;\n\t\t}\n\n\t\t// handle boost params\n\t\tif (mode == MaxThermostateMode.BOOST) {\n\t\t\t// save state before boost for a restore if boost is switched off via setBoostMode()\n\t\t\tif (config.mode != MaxThermostateMode.BOOST) {\n\t\t\t\tconfig.modeBeforeBoost = config.mode;\n\t\t\t}\n\t\t\tCalendar boostUntil = GregorianCalendar.getInstance();\n\t\t\tboostUntil.add(Calendar.MINUTE, config.boostDurationMins);\n\t\t\tconfig.boostUntil = boostUntil.getTime();\n\t\t} else {\n\t\t\tconfig.modeBeforeBoost = mode;\n\t\t}\n\n\t\t// handle auto mode params\n\t\tif (mode == MaxThermostateMode.AUTO) {\n\t\t\tuntil = null;\n\t\t\t// if the minimum temperature is given we correct the value to actual from the current week profile\n\t\t\tif (temp <= MaxUtil.MIN_TEMPERATURE) {\n\t\t\t\ttemp = getCurrentTemperatureFromWeekProfile();\n\t\t\t}\n\t\t}\n\n\t\t// handle maual mode\n\t\tif (mode == MaxThermostateMode.MANUAL) {\n\t\t\tuntil = null;\n\t\t}\n\n\t\t// common handling\n\t\tconfig.mode = mode;\n\t\tconfig.temperature = temp;\n\t\tconfig.temporaryUntil = until;\n\n\t\t// set time out marker to false\n\t\tfor (MaxComponent current : config.devices.values()) {\n\t\t\tif (current instanceof Thermostat) {\n\t\t\t\tcurrent.setTimedOut(false);\n\t\t\t}\n\t\t}\n\n\t\t// persist changes\n\t\tpersistence.commitTransaction();\n\n\t\t// send temperature to all thermostates. they should react automatically like their link partners. but sometimes they miss\n\t\t// an update. so get sure that all thermostates get their update\n\t\tfor (MaxComponent current : config.devices.values()) {\n\t\t\tif (current instanceof Thermostat) {\n\t\t\t\tMaxSetTemperatureMessage outMessage = new MaxMessageCreator(config).getSetTempForDevice(current.getAdress());\n\t\t\t\tqueueManager.putOutMessage(outMessage);\n\t\t\t\tSystem.out.println(\"Climate Manager - setClimate(): sending climate message:\\n\" + outMessage);\n\t\t\t}\n\t\t}\n\n\t\tcallBackMananger.roomConfigurationChanged();\n\t}",
"public LongTermForecast(JSONObject j, char tempUnits){\n \n /*Set sub-JSONObjects\n *OpenWeatherMap returns a large JSONObject that contains multiple\n *smaller JSONObjects; we get these during this step\n */\n \ttry{\n this.jCity = j.getJSONObject(\"city\");\n this.jListArray = j.getJSONArray(\"list\");\n this.jTempList = new ArrayList<JSONObject>();\n this.jWeatherList = new ArrayList<JSONObject>();\n int dateOffset = 0; // <--- To exclude the current day, change this to 1\n for (int i = dateOffset; i < 5 + dateOffset; i++) \n {\n JSONObject nextObject = jListArray.getJSONObject(i);\n this.jTempList.add(nextObject.getJSONObject(\"temp\"));\n this.jWeatherList.add(nextObject.getJSONArray(\"weather\").getJSONObject(0));\n }\n this.tempUnits = tempUnits;\n\n \n //Set the variable values based on the JSON data\n this.fullCityName = getFullCityName(jCity);\n this.temperatureList = new ArrayList<String>();\n this.minTempList = new ArrayList<String>();\n this.maxTempList = new ArrayList<String>();\n this.skyConditionList = new ArrayList<String>();\n this.skyIconList = new ArrayList<ImageIcon>();\n this.dateList = new ArrayList<String>();\n for (int i = 0; i < 5; i++)\n {\n JSONObject nextTemp = jTempList.get(i);\n JSONObject nextWeather = jWeatherList.get(i);\n this.temperatureList.add(getTemperature(nextTemp));\n this.minTempList.add(getMinTemp(nextTemp));\n this.maxTempList.add(getMaxTemp(nextTemp));\n this.skyConditionList.add(getSkyCondition(nextWeather));\n try{\n this.skyIconList.add(getSkyIcon(nextWeather));\n }\n catch(IOException e){\n System.out.println(\"Error: Can't obtain sky icon\");\n }\n this.dateList.add(getDate(jListArray, i + dateOffset));\n }\n \t} catch (Exception e){\n\t\t\tthis.temperatureList = new ArrayList<String>();\n\t\t\tthis.skyConditionList = new ArrayList<String>();\n\t\t\tthis.skyIconList = new ArrayList<ImageIcon>();\n\t\t\tthis.minTempList = new ArrayList<String>();\n\t\t\tthis.maxTempList = new ArrayList<String>();\n\t this.dateList = new ArrayList<String>();\n\t\t\tfor (int i = 0; i < 8; i++)\n\t\t\t{\n\t\t\t\tthis.minTempList.add(\"No Data \");\n\t\t\t\tthis.maxTempList.add(\"No Data \");\n\t\t\t\tthis.temperatureList.add(\"No Data \");\n\t\t\t\tthis.dateList.add(\"No Data \");\n\t\t\t\ttry {\n\t\t\t\t\tthis.skyIconList.add(getSkyIcon(new JSONObject(\"{icon:01d}\")));\n\t\t\t\t} catch (JSONException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tthis.skyConditionList.add(\"No Data \");\n\t\t\t} \n\t\t}\n\n }",
"public interface IWeatherDataProvider {\n\n\tpublic WeatherData getWeatherData(Location location);\n\t\n}",
"void loadData() {\n Request request = new Request.Builder()\n .url(\"https://www.metaweather.com/api/location/search/?lattlong=20.5937,78.9629\")\n .get().build();\n //Create OkHttpClient Object\n OkHttpClient client = new OkHttpClient();\n\n // Call the request using client we just created\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Request request, IOException e) {\n //Use this code to Handle Failed Request mostly due to internet issue\n // we will just Create a Tost Message for user\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onResponse(Response response) throws IOException {\n //Here we will check is reponse is Sucessfull or is their any\n // request error i.e url error\n if (!response.isSuccessful()) {\n //Here our reponse is UnSucessfull so we inform the user\n // about the same as before\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n return;\n }\n //If Response is sucessfull we move forward and convert the\n // reponse which is in JSON format to String\n String respFromApi = response.body().string();\n\n //We will Log this LogCat in order to view the Raw Format recieved\n //you can open the log cat go in debug section and type RawData you\n // will be able to observe data there\n Log.d(\"RawData\", respFromApi);\n\n //Now We will call Extract Data Function which will retrieve the\n // woied and name of each city from the response\n try {\n extractData(respFromApi);\n } catch (Exception e) {\n //Informing Data is Not in JSON Format\n Toast.makeText(MainActivity.this, \"Response Not in JSON Format\", Toast.LENGTH_SHORT).show();\n }\n ;\n }\n });\n\n\n //---------------------------------FOR United States----------------------------------------\n\n //Following codes has similar output as before but the difference is the city Names here\n //is of United States\n request = new Request.Builder()\n .url(\"https://www.metaweather.com/api/location/search/?lattlong=38.899101,-77.028999\")\n .get().build();\n client = new OkHttpClient();\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Request request, IOException e) {\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onResponse(Response response) throws IOException {\n if (!response.isSuccessful()) {\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n return;\n }\n String respFromApi = response.body().string();\n Log.d(\"RawData\", respFromApi);\n try {\n extractData(respFromApi);\n } catch (Exception e) {\n Toast.makeText(MainActivity.this, \"Response Not in JSON Format\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n\n\n }",
"private VisitTimesCellData getVisitTimesForCells(final List<Object[]> listVisitTimes) {\n VisitTimesCellData visitTimesCellData = new VisitTimesCellData();\n Map<Short, Long> mapValues = new HashMap<>();\n for (Map.Entry<Short, String> entry : SummaryReportConstants.MonthlyReport.getMapVisitTimeCellCoordinates()\n .entrySet()) {\n final List<Object[]> object = listVisitTimes.stream()\n .filter(p -> p[1] != null ? entry.getKey() == (short) p[1] : false).collect(Collectors.toList());\n final long cellValue = CollectionUtils.isNotEmpty(object) ? (long) object.get(0)[0] : 0;\n mapValues.put(entry.getKey(), cellValue);\n }\n visitTimesCellData.setSoftware(mapValues.get(Constants.BusinessTypeConstant.SOFTWARE));\n visitTimesCellData.setNetwork(mapValues.get(Constants.BusinessTypeConstant.NETWORK));\n visitTimesCellData.setArchitect(mapValues.get(Constants.BusinessTypeConstant.ARCHITECT));\n visitTimesCellData.setBuilding(mapValues.get(Constants.BusinessTypeConstant.BUILDING));\n visitTimesCellData.setEquipment(mapValues.get(Constants.BusinessTypeConstant.EQUIPMENT));\n visitTimesCellData.setFactory(mapValues.get(Constants.BusinessTypeConstant.FACTORY));\n visitTimesCellData.setElectric(mapValues.get(Constants.BusinessTypeConstant.ELECTRIC));\n visitTimesCellData.setCommon(mapValues.get(Constants.BusinessTypeConstant.COMMON));\n visitTimesCellData\n .setWirelessCommunication(mapValues.get(Constants.BusinessTypeConstant.WIRELESS_COMMUNICATION));\n visitTimesCellData.setWiredCommunication(mapValues.get(Constants.BusinessTypeConstant.WIRED_COMMUNICATION));\n visitTimesCellData.setHardware(mapValues.get(Constants.BusinessTypeConstant.HARDWARE));\n visitTimesCellData.setOffice(mapValues.get(Constants.BusinessTypeConstant.OFFICE));\n visitTimesCellData.setCallCenter(mapValues.get(Constants.BusinessTypeConstant.CALL_CENTER));\n return visitTimesCellData;\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}",
"private void updateWeather() {\n\t\tFetchWeatherTask weatherTask = new FetchWeatherTask(getActivity()); \n\t\tString location = Utility.getPreferredLocation(getActivity());\n\t\tweatherTask.execute(location); \n\t}",
"@Override\n public void check(int nObsTypeId, ISensor iSensor,\n IObs iObs, QChResult oResult) {\n // only set the number of hours to retrieve once\n if (m_nHours < 0)\n m_nHours = m_oConfig.getInt(Integer.toString(nObsTypeId), 0);\n\n if (m_nHours == 0)\n return;\n\n int nLat = iObs.getLatitude();\n int nLon = iObs.getLongitude();\n long lTimestamp = iObs.getObsTimeLong();\n // retrieve the background field in a 50km radious about the test point\n double[][] dValues = m_oPrecip.getPrecipAccum(MathUtil.fromMicro(nLat),\n MathUtil.fromMicro(nLon), 50000, m_nHours);\n\n if (dValues == null)\n return;\n\n double dMin = Double.MAX_VALUE;\n double dMax = -Double.MAX_VALUE;\n // determine the percentage of background values that have no data\n int nTotal = 0;\n int nNoData = 0;\n int n1CmCount = 0;\n for (int nY = 0; nY < dValues.length; nY++) {\n for (int nX = 0; nX < dValues[nY].length; nX++) {\n ++nTotal;\n double dValue = dValues[nY][nX];\n if (Double.isNaN(dValue))\n ++nNoData;\n else {\n // count how many stage neighbors are 1 cm or less\n if (dValue <= 1.0)\n ++n1CmCount;\n\n // determine the min and max stage values\n if (dValue > dMax)\n dMax = dValue;\n\n if (dValue < dMin)\n dMin = dValue;\n }\n }\n }\n\n // the algorithm requires more than 3/4 valid background field values\n if (nTotal < nNoData * 4)\n return;\n\n // precipitation values are in cm\n double dValue = iObs.getValue();\n if (dValue > 0.1) {\n // retrieve a background field for the current obs type\n ArrayList<IObs> oObsSet = new ArrayList<IObs>();\n m_oObsMgr.getBackground(nObsTypeId, nLat - m_nGeoRadiusMax,\n nLon - m_nGeoRadiusMax, nLat + m_nGeoRadiusMax,\n nLon + m_nGeoRadiusMax, lTimestamp + m_lTimerangeMin,\n lTimestamp + m_lTimerangeMax, oObsSet);\n\n // update the min and max neighbor values\n int nIndex = oObsSet.size();\n while (nIndex-- > 0) {\n double dNeighborValue = oObsSet.get(nIndex).getValue();\n if (dNeighborValue > dMax)\n dMax = dNeighborValue;\n\n if (dNeighborValue < dMin)\n dMin = dNeighborValue;\n }\n\n // create the comparison range\n double dTmin = dMin - 0.5;\n double dTmax = dMax * 2.0;\n\n if (dTmax < 0.8)\n dTmax = 0.8;\n if (dTmax > 5.0)\n dTmax = dMax + 2.5;\n\n // the test passes if the target value is within the range\n oResult.setPass(dTmin < dValue && dValue < dTmax);\n } else {\n // at least 3 stage neighbors must be <= 10mm to pass\n oResult.setPass(n1CmCount > 2);\n }\n\n if (oResult.getPass())\n oResult.setConfidence(1.0);\n oResult.setRun();\n }",
"@Test\n\tpublic void noValidForecastsReturnZeroResultTest() {\n\t\tcurrentDate = LocalDate.of(2019, 01, 28);\n\t\tAverageTemperatureAndPressure atp = forecastService.getAverageTemperatureAndPressure(city, currentDate, 3);\n\t\t\n\t\tassertEquals(0, atp.getAvrgDayTimeTemperature(), 0.000000001);\n\t\tassertEquals(0, atp.getAvrgNightTimeTemperature(), 0.000000001);\n\t\tassertEquals(0, atp.getAvrgPressure(), 0.000000001);\n\t}",
"void getWeatherObject(WeatherObject weatherObject);",
"protected byte[] getMeasuredFloorTemperature() {return null;}",
"public void coord_to_horizon( Calendar utc, String ra_in, String dec_in, double lat_in, double lon_in )\r\n {\n\r\n \tCoordConverter myConverter = new CoordConverter();\r\n \t\r\n \tdouble ra = myConverter.RAString2Double(ra_in);\r\n \tdouble dec = myConverter.DecString2Double(dec_in);\r\n \t\r\n \tdouble lat = lat_in;//dms2real( Integer.parseInt(lat_str[0]), Double.parseDouble(lat_str[1]) );\r\n double lon = lon_in;//dms2real( Integer.parseInt(lon_str[0]), Double.parseDouble(lon_str[1]) );\r\n\r\n // compute hour angle in degrees\r\n double ha = GetSiderealTime( utc, lon ) - ra;\r\n if (ha < 0) ha = ha + 360;\r\n\r\n // convert degrees to radians\r\n ha = ha*Math.PI/180;\r\n dec = dec*Math.PI/180;\r\n lat = lat*Math.PI/180;\r\n\r\n // compute altitude in radians\r\n double sin_alt = Math.sin(dec)*Math.sin(lat) + Math.cos(dec)*Math.cos(lat)*Math.cos(ha);\r\n double alt = Math.asin(sin_alt);\r\n \r\n // compute azimuth in radians\r\n // divide by zero error at poles or if alt = 90 deg\r\n double cos_az = (Math.sin(dec) - Math.sin(alt)*Math.sin(lat))/(Math.cos(alt)*Math.cos(lat));\r\n double az = Math.acos(cos_az);\r\n\r\n // convert radians to degrees\r\n hrz_altitude = alt*180/Math.PI;\r\n hrz_azimuth = az*180/Math.PI;\r\n\r\n // choose hemisphere\r\n if (Math.sin(ha) > 0)\r\n hrz_azimuth = 360 - hrz_azimuth;\r\n }",
"@Override\n @Cacheable(\"darkSkyWindSpeed\")\n public WeatherDataDto getWindSpeed(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String windSpeed = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"windSpeed\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setWindSpeed(windSpeed);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }",
"Long getTemperatureForLastHour();",
"interface OpenWeatherMapService {\n @GET(\"forecast/daily\")\n Call<Forecast> dailyForecast(\n @Query(\"q\") String city,\n @Query(\"mode\") String format,\n @Query(\"units\") String units,\n @Query(\"cnt\") Integer num,\n @Query(\"appid\") String appid);\n}",
"@Test\n public void testTimezone() {\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/Paris\"));\n\n SunTimes paris = SunTimes.compute()\n .on(2020, 5, 1) // May 1st, 2020, starting midnight\n .latitude(48, 51, 24.0) // Latitude of Paris: 48°51'24\" N\n .longitude(2, 21, 6.0) // Longitude: 2°21'06\" E\n .execute();\n System.out.println(\"Sunrise in Paris: \" + paris.getRise());\n System.out.println(\"Sunset in Paris: \" + paris.getSet());\n\n SunTimes newYork = SunTimes.compute()\n .on(2020, 5, 1) // May 1st, 2020, starting midnight\n .at(40.712778, -74.005833) // Coordinates of New York\n .execute();\n System.out.println(\"Sunrise in New York: \" + newYork.getRise());\n System.out.println(\"Sunset in New York: \" + newYork.getSet());\n\n SunTimes newYorkTz = SunTimes.compute()\n .on(2020, 5, 1) // May 1st, 2020, starting midnight\n .timezone(\"America/New_York\") // ...New York timezone\n .at(40.712778, -74.005833) // Coordinates of New York\n .execute();\n System.out.println(\"Sunrise in New York: \" + newYorkTz.getRise());\n System.out.println(\"Sunset in New York: \" + newYorkTz.getSet());\n }",
"@Override\n\tpublic Response weather(String iata, String radiusString) {\n\t\treturn null;\n\t}",
"@Override\n protected String[] doInBackground(String... params) {\n HttpURLConnection urlConnection = null;\n BufferedReader reader = null;\n\n // Will contain the raw JSON response as a string.\n String forecastJsonStr = null;\n\n String location = params[0];\n String format = \"json\";\n String units = params[1];\n String lang = \"fr\";\n int numDays = 14;\n\n try {\n // Construct the URL for the OpenWeatherMap query\n // Possible parameters are avaiable at OWM's forecast API page, at\n // http://openweathermap.org/API#forecast\n final String FORECAST_BASE_URL =\n \"http://api.openweathermap.org/data/2.5/forecast/daily?\";\n final String QUERY_PARAM = \"q\";\n final String FORMAT_PARAM = \"mode\";\n final String UNITS_PARAM = \"units\";\n final String DAYS_PARAM = \"cnt\";\n final String LANGUAGE_PARAM = \"lang\";\n final String APPID_PARAM = \"appid\";\n\n Uri builtUri = Uri.parse(FORECAST_BASE_URL).buildUpon()\n .appendQueryParameter(QUERY_PARAM, location)\n .appendQueryParameter(FORMAT_PARAM, format)\n .appendQueryParameter(UNITS_PARAM, units)\n .appendQueryParameter(DAYS_PARAM, Integer.toString(numDays))\n .appendQueryParameter(LANGUAGE_PARAM, lang)\n .appendQueryParameter(APPID_PARAM, \"232763e5b836e83388caca0749577747\")\n .build();\n\n URL url = new URL(builtUri.toString());\n// Log.v(LOG_TAG, url.toString());\n\n // Create the request to OpenWeatherMap, and open the connection\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // Read the input stream into a String\n InputStream inputStream = urlConnection.getInputStream();\n StringBuilder builder = new StringBuilder();\n if (inputStream == null) {\n // Nothing to do.\n return null;\n }\n reader = new BufferedReader(new InputStreamReader(inputStream));\n\n String line;\n while ((line = reader.readLine()) != null) {\n // Since it's JSON, adding a newline isn't necessary (it won't affect parsing)\n // But it does make debugging a *lot* easier if you print out the completed\n // builder for debugging.\n builder.append(line).append(\"\\n\");\n }\n\n if (builder.length() == 0) {\n // Stream was empty. No point in parsing.\n return null;\n }\n forecastJsonStr = builder.toString();\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Error \" + e, e);\n\n // If the code didn't successfully get the weather data, there's no point in attempting\n // to parse it.\n return null;\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (reader != null) {\n try {\n reader.close();\n } catch (final IOException e) {\n Log.e(LOG_TAG, \"Error closing stream\", e);\n }\n }\n }\n\n try {\n return getWeatherDataFromJson(forecastJsonStr, numDays);\n } catch (JSONException e) {\n Log.e(LOG_TAG, e.getMessage(), e);\n e.printStackTrace();\n }\n\n // This will only happen if there was an error getting or parsing the forecast.\n return null;\n }",
"@Override\n protected Void doInBackground(Void... voids) {\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(BaseUrl)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n WeatherService service = retrofit.create(WeatherService.class);\n Call<CurrentWeatherCallResult> call = service.getCurrentWeatherDataLatLng(String.valueOf(latLng.latitude), String.valueOf(latLng.longitude), AppId);\n call.enqueue(new Callback<CurrentWeatherCallResult>() {\n @Override\n public void onResponse(@NonNull Call<CurrentWeatherCallResult> call, @NonNull Response<CurrentWeatherCallResult> response) {\n if (response.code() == 200 && response.body() != null) {//TODO DEFINE 200\n\n CurrentWeatherCallResult currentWeatherCallResult = response.body();\n CurrentWeather currentWeather =\n new CurrentWeather(\n position,\n currentWeatherCallResult.weather.get(0).description,\n currentWeatherCallResult.weather.get(0).icon,\n String.valueOf(Math.round((double) currentWeatherCallResult.main.temp_max - 273)),\n String.valueOf(Math.round((double) currentWeatherCallResult.main.temp_min - 273)),\n String.valueOf(Math.round((double) currentWeatherCallResult.main.temp - 273)),\n currentWeatherCallResult.name);\n Intent i;\n switch (position) {\n case -2:\n i = new Intent(\"CURRENT_WEATHER_SEARCH_A\");\n break;\n case -1:\n i = new Intent(\"CURRENT_WEATHER\");\n break;\n default:\n i = new Intent(\"CURRENT_WEATHER_F\");\n break;\n\n\n }\n i.putExtra(\"CURRENT_WEATHER_OBJECT\", currentWeather);\n mContext.sendBroadcast(i);\n }\n }\n\n @Override\n public void onFailure(@NonNull Call<CurrentWeatherCallResult> call, @NonNull Throwable t) {\n t.getMessage();\n }\n });\n return null;\n }",
"public List<DataCenterForecast> execute(TimeSlotBasedEntity timeRange) {\n \tlogger.debug(\"Starting power planning loop for time range: \" + timeRange);\n \tlogger.debug(\"Requesting energy forecasts...\");\n\t\tList<DataCenterForecast> forecasts = erdsHandler.getEnergyForecasts(timeRange);\n logger.debug(\"Got energy forecasts: \" + forecasts);\n return forecasts;\n }",
"public synchronized void getWeeklyForecast(String city){\r\n\t\t// Create a new Handler\r\n\t\tHandlerThread handlerThread = new HandlerThread(\"Weekly_Forecast\");\r\n\t\thandlerThread.start();\r\n\t\tHandler handler = new Handler(handlerThread.getLooper(), this);\r\n\t\t\r\n\t\tMessage msg = handler.obtainMessage();\r\n\t\tmsg.what = WEEKLY_FORECAST;\r\n\t\tmsg.obj = \"http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml?query=\".concat(city);\r\n\t\thandler.sendMessage(msg);\r\n\t}",
"private void getWeekActiveTimeData(String accessToken) {\r\n String[] taskParams = new String[3];\r\n\r\n taskParams[0] = 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 // Fairly active and very active minutes are added to get active minutes total\r\n taskParams[1] = \"https://api.fitbit.com/1/user/-/activities/minutesFairlyActive/date/\" +\r\n formattedStartDate + \"/\" + formattedEndDate + \".json\";\r\n\r\n taskParams[2] = \"https://api.fitbit.com/1/user/-/activities/minutesVeryActive/date/\" +\r\n formattedStartDate + \"/\" + formattedEndDate + \".json\";\r\n\r\n updateRequestCount(taskParams.length - 1);\r\n\r\n new FitbitGetRequestTask(this).execute(taskParams);\r\n }",
"public interface IOpenWeatherAPI {\n String ENDPOINT = \"http://api.openweathermap.org/\";\n\n String KEY_OPEN_WEATHER_API = \"0d664d5c76a364c4e18b207ac25a0ef4\";\n\n //******** 5 DÍAS/8 HORAS *******\n //@GET(\"/data/2.5/forecast\")\n //Call<RootPredicciones> getPredicciones(@Query(\"lat\") String latitud, @Query(\"lon\") String longitud);//Información meteorológica de 5 días de la latitud y longitud\n\n\n //******** Actual ***********\n @GET(\"data/2.5/weather\")\n Call<Prediccion> getPrediccionActual(@Query(\"lat\") String latitud, @Query(\"lon\") String longitud);//Información meteorológica actual de la latitud y longitud\n}",
"public void getForecasts() {\r\n\r\n\t\tWeatherDAO weatherDao = new WeatherDAO();\r\n\r\n\t\tforecasts = weatherDao.getForecasts(this.getSceneNumber());\r\n\r\n\t\tif (forecasts == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tisUpdated(forecasts[0]);\r\n\r\n\t\tsetLabels(forecasts);\r\n\r\n\t\tsetGif(forecasts[0].getDayPhrase());\r\n\t}",
"@SneakyThrows\n String getTemperature(String city) throws MalformedURLException, IOException {\n double current_temperature = 0;\n JSONObject json = new JSONObject(IOUtils.toString(new URL(\"https://api.openweathermap.org/data/2.5/weather?q=\" + city.toLowerCase(Locale.ROOT) + \"&appid=\"), Charset.forName(\"UTF-8\")));\n current_temperature = (Float.parseFloat(json.getJSONObject(\"main\").get(\"temp\").toString()));\n current_temperature = Math.round(current_temperature*100.0)/100.0;\n System.out.println(json);\n return current_temperature + \"\";\n }"
] |
[
"0.6325478",
"0.57907045",
"0.5565308",
"0.5435895",
"0.54276663",
"0.53921247",
"0.53891265",
"0.53751147",
"0.5371733",
"0.5314582",
"0.5305638",
"0.52903014",
"0.5290045",
"0.52559435",
"0.5248497",
"0.5210306",
"0.52071464",
"0.51117754",
"0.5107469",
"0.50737566",
"0.50644934",
"0.5063108",
"0.505617",
"0.504394",
"0.50037813",
"0.49847504",
"0.49695987",
"0.49455023",
"0.49359226",
"0.49308714",
"0.4925927",
"0.49110535",
"0.49040154",
"0.48963776",
"0.4846541",
"0.48191935",
"0.48171145",
"0.48130003",
"0.4807009",
"0.48008576",
"0.4790696",
"0.47709623",
"0.47704497",
"0.47645682",
"0.47608536",
"0.47517577",
"0.4741957",
"0.47415525",
"0.47283265",
"0.47265622",
"0.4722862",
"0.47126895",
"0.47108737",
"0.47066492",
"0.47026548",
"0.46932185",
"0.46910116",
"0.4688768",
"0.46730486",
"0.46721953",
"0.46583432",
"0.46544296",
"0.46398363",
"0.46253553",
"0.461876",
"0.46047893",
"0.46013874",
"0.45902932",
"0.4586169",
"0.4561662",
"0.455155",
"0.45347366",
"0.45311764",
"0.45209324",
"0.45182577",
"0.45174772",
"0.4515634",
"0.45123333",
"0.4500082",
"0.44986212",
"0.44953486",
"0.4493901",
"0.44869423",
"0.44864142",
"0.44855043",
"0.44850522",
"0.44755593",
"0.4473627",
"0.44634613",
"0.44602242",
"0.4457975",
"0.44507566",
"0.44501495",
"0.44447553",
"0.44443274",
"0.44432425",
"0.44356376",
"0.4431999",
"0.4428758",
"0.44184402"
] |
0.7056682
|
0
|
Takes the item code and assigns a String value according to the type name.
|
ItemType(String itemCode) {
code = itemCode;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"ItemType(String code) {\n this.code = code;\n }",
"ItemType(String code) {\n this.code = code;\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic void put(int typecode, String value) {\r\n\t\tdefaults.put( new Integer(typecode), value );\r\n\t}",
"public void put(int typeCode, String value) {\n\t\tdefaults.put(typeCode, value);\n\t}",
"public void put(int typecode, String value) {\n\t\tdefaults.put( typecode, value );\n\t}",
"public void put(int typecode, String value)\n {\n validateTypecode(typecode);\n defaults.put(typecode, value.toLowerCase());\n }",
"private LocalrmnameType(int type, java.lang.String value) {\n super();\n this.type = type;\n this.stringValue = value;\n }",
"public void setItemCode(String itemCode) {\n this.itemCode = itemCode;\n }",
"private String translateType(String subsetCode, String qdmSubsetCode) {\n String combined = String.format(\"%s:%s\", qdmSubsetCode, subsetCode);\n if (QDM_TYPE_MAP.containsKey(combined)) {\n return QDM_TYPE_MAP.get(combined);\n }\n else {\n return subsetCode;\n }\n }",
"private String recognizeType(String code) {\n String subCode = StringUtils.substring(code, 0, 2);\n String type;\n switch (subCode) {\n case \"00\":\n type = \"sz\"; // A\n break;\n case \"20\":\n type = \"sz\"; // B\n break;\n case \"30\":\n type = \"sz\"; // Entrepreneurship 创业板\n break;\n case \"60\":\n type = \"sh\"; // A\n break;\n case \"90\":\n type = \"sh\"; // B\n break;\n default:\n type = \"sz\";\n }\n return type;\n }",
"public String getItemcode() {\n return itemcode;\n }",
"public TypeCode(String code) {\n this.code = code;\n }",
"public String getAsString(String itemName, String defaultValue);",
"public void setItemType(String itemType) {\n\t\tthis.itemType = itemType;\n\t}",
"public abstract String mapKeyToItem(String str);",
"public void setItemCode(String itemCode) {\n\t\tthis.itemCode = itemCode == null ? null : itemCode.trim();\n\t}",
"public abstract void addValue(String str, Type type);",
"public String getItemType() {\n\t\treturn itemType;\n\t}",
"public void setTypeCode(String typeCode) {\n this.typeCode = typeCode;\n }",
"public void setTypeCode(String typeCode) {\n this.typeCode = typeCode == null ? null : typeCode.trim();\n }",
"public void setTypeCode(String typeCode) {\n this.typeCode = typeCode == null ? null : typeCode.trim();\n }",
"public void setTypeCode(String typeCode) {\n this.typeCode = typeCode == null ? null : typeCode.trim();\n }",
"public PurchaseType(java.lang.String code)\r\n {\r\n super(code);\r\n }",
"public void generateCodeItemCode() {\n\t\tcodeItem.generateCodeItemCode();\n\t}",
"public void setItemcode(String itemcode) {\n this.itemcode = itemcode == null ? null : itemcode.trim();\n }",
"private static Object makeItem(final String item){\n return new Object(){\n public String toString() {\n return item;\n }\n };\n }",
"@Override\n public int getItemType() {\n return ITEM_TYPE;\n }",
"public String getTypeCode() {\n return typeCode;\n }",
"public String getTypeCode() {\n return typeCode;\n }",
"public String getTypeCode() {\n return typeCode;\n }",
"public String getTypeCode() {\n return typeCode;\n }",
"void setCode(String code);",
"public String code() {\r\n return code == null ? String.format(\"%s%04d\", type, num) : code;\r\n }",
"public String getMapItemTypeName() {\n return mapItemTypeName;\n }",
"void changeMenuItemName(String itemName, byte type, String msgPlus);",
"public void setType(String value) {\n this.type = value;\n }",
"public String getTypeName(int typecode)\n {\n String result = defaults.get(typecode);\n if (result == null)\n {\n throw new RuntimeException(\"No Dialect mapping for JDBC type: \" + typecode);\n }\n return result;\n }",
"public void setTypeName(java.lang.String value);",
"public void addType(String value) {\n/* 380 */ addStringToBag(\"type\", value);\n/* */ }",
"java.lang.String getCodeName();",
"public Item(String name, ItemType type)\n {\n\tthis.name = name;\n\tthis.type = type;\n }",
"@Test\n public void getItemType () {\n Assert.assertEquals(\"SPECIAL\", bomb.getItemType().name());\n }",
"public String getItemCode() {\n\t\treturn itemCode;\n\t}",
"public void setCode(java.lang.String code) {\r\n this.code = code;\r\n }",
"public CodeItem getCodeItem() {\n\t\treturn codeItem;\n\t}",
"public abstract String mapItemToKey(String str);",
"public void setNametype(Integer nametype) {\r\n this.nametype = nametype;\r\n }",
"@Override\n\tpublic void setTypeCode(java.lang.String typeCode) {\n\t\t_permissionType.setTypeCode(typeCode);\n\t}",
"public interface ListItemType {\n int TYPE_UNKNOWN = -1;\n int TYPE_DUOBAO_LABEL = 0;\n int TYPE_DUOBAO = 1;\n int TYPE_JIFEN_LABEL = 2;\n int TYPE_JIFEN = 3;\n}",
"public void put(int typecode, long capacity, String value)\n {\n validateTypecode(typecode);\n Map<Long, String> map = weighted.get(typecode);\n if (map == null)\n {// add new ordered map\n map = new TreeMap<>();\n weighted.put(typecode, map);\n }\n map.put(capacity, value.toLowerCase());\n }",
"public Item convertToItem(Object value, XQItemType type) throws XQException;",
"@Override\n\tprotected DataTypes getDataType() {\n\t\treturn DataTypes.ITEM;\n\t}",
"void setType(java.lang.String type);",
"public void put(int typeCode, long capacity, String value) {\n\t\tMap<Long, String> map = weighted.get(typeCode);\n\t\tif (map == null) {\n\t\t\t// add new ordered map\n\t\t\tmap = new TreeMap<Long, String>();\n\t\t\tweighted.put(typeCode, map);\n\t\t}\n\t\tmap.put(capacity, value);\n\t}",
"String buildLabelFromType(String type);",
"public static RegisterModuleType codeOf(Object code) {\n if (code == null) { return null; }\n if (code instanceof RegisterModuleType) { return (RegisterModuleType)code; }\n return _codeValueMap.get(code.toString().toLowerCase());\n }",
"public String getCode() {\n return super.getString(Constants.Properties.CODE);\n }",
"public void setCode(String code) {\n\t\tCode = code;\n\t}",
"public Item getItem(String typeItem){\r\n if(typeItem.equals(\"coeur\")){\r\n Item coeur = new Coeur();\r\n return coeur;\r\n } else if(typeItem.equals(\"potionvie\")){\r\n Item potion = new Potion();\r\n return potion;\r\n } else if(typeItem.equals(\"hexaforce\")){\r\n Item hexa = new Hexaforce();\r\n return hexa;\r\n } else {\r\n return null;\r\n }\r\n }",
"public static String getItemValue(String item_string, String item_name)\n {\n StringTokenizer st = new StringTokenizer(item_string, Character.toString(RECORD_SEPARATOR));\n\n item_name += FIELD_SEPARATOR;\n while (st.hasMoreTokens())\n {\n String str = st.nextToken();\n if (str.startsWith(item_name))\n {\n return str.substring(item_name.length());\n }\n }\n return \"\";\n }",
"public void setType(CharSequence value) {\n this.type = value;\n }",
"public final void setCode(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String code)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.Code.toString(), code);\n\t}",
"public static final String getTypeNamePartString(int itemTemplateId) {\n/* 607 */ String toReturn = \"Focus\";\n/* 608 */ int rand = Server.rand.nextInt(10);\n/* 609 */ toReturn = getTypeNamePartStringWithPart(itemTemplateId, rand);\n/* 610 */ return toReturn;\n/* */ }",
"private static String mapType(final FieldType.Type type) {\n switch (type) {\n case DATE:\n return \"Date\";\n case INTEGER:\n return \"Integer\";\n case REAL:\n return \"Double\";\n case STRING:\n return \"String\";\n default:\n return null;\n }\n }",
"public static UpdateModuleType codeOf(Object code) {\n if (code == null) { return null; }\n if (code instanceof UpdateModuleType) { return (UpdateModuleType)code; }\n return _codeValueMap.get(code.toString().toLowerCase());\n }",
"java.lang.String getAppType();",
"public void setCode(String code){\n\t\tthis.code = code;\n\t}",
"ConfigType getConfigTypeByCode(String typeCode);",
"public void put(int typecode, long capacity, String value) {\n\t\tMap<Long, String> map = weighted.get( typecode );\n\t\tif (map == null) {// add new ordered map\n\t\t\tmap = new TreeMap<Long, String>();\n\t\t\tweighted.put( typecode, map );\n\t\t}\n\t\tmap.put(capacity, value);\n\t}",
"public void setCode(String code)\n {\n this.code = code;\n }",
"public String get(int typecode) throws DialectException {\r\n\t\tString result = (String) defaults.get( new Integer(typecode) );\r\n\t\tif (result==null) throw new DialectException(\"No Dialect mapping for JDBC type: \" + typecode);\r\n\t\treturn result;\r\n\t}",
"public void setCode (String code) {\r\n\t\tthis.code = code;\r\n\t}",
"public String getCode()\n {\n return code;\n}",
"java.lang.String getProductCode();",
"private Object createObjectFromAttName(final AttImpl item) {\n \n \t\tif (item.getType().equals(STRING_TYPE)) {\n \t\t\treturn item.getName();\n \t\t} else if (item.getType().equals(INT_TYPE)) {\n \t\t\treturn new Integer(item.getName());\n \t\t} else if (item.getType().equals(FLOAT_TYPE)) {\n \t\t\treturn new Double(item.getName());\n \t\t} else if (item.getType().equals(BOOLEAN_TYPE)) {\n \t\t\treturn new Boolean(item.getName());\n \t\t}\n \t\t// outta here\n \t\treturn null;\n \t}",
"public void setTypeCode(Integer typeCode) {\n this.typeCode = typeCode;\n }",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"public void setCodetypemessage(java.lang.String codetypemessage) {\r\n\t\tthis.codetypemessage = codetypemessage;\r\n\t}",
"public static String convertToString(int type) {\n\t\tswitch(type) {\n\t\tcase LOCATION:\t\t\t\treturn \"Location\";\n\t\tcase ACCELEROMETER:\t\t\treturn \"Acceleration\";\n\t\tcase MAGNETIC_FIELD:\t\treturn \"Magnetic Field\";\n\t\tcase ORIENTATION:\t\t\treturn \"Orientation\";\n\t\tcase GYROSCOPE:\t\t\t\treturn \"Gyroscope\";\n\t\tcase LIGHT:\t\t\t\t\treturn \"Light\";\n\t\tcase PRESSURE:\t\t\t\treturn \"Pressure\";\n\t\tcase TEMPERATURE:\t\t\treturn \"Temperature\";\n\t\tcase PROXIMITY:\t\t\t\treturn \"Proximity\";\n\t\tcase GRAVITY:\t\t\t\treturn \"Gravity\";\n\t\tcase LINEAR_ACCELERATION:\treturn \"Linear Acceleration\";\n\t\tcase ROTATION_VECTOR:\t\treturn \"Rotation Vector\";\n\t\tcase RELATIVE_HUMIDITY:\t\treturn \"Relative Humidity\";\n\t\tcase AMBIENT_TEMPERATURE:\treturn \"Ambient Temperature\";\n\t\t}\n\t\treturn \"\";\n\t}",
"public void setType(String aType) {\n iType = aType;\n }",
"java.lang.String getCode();",
"java.lang.String getCode();",
"public static String getHoldTypeText(int infoCode, Context mContext) {\n\n DatabaseHelper handler = new DatabaseHelper(mContext);\n SQLiteDatabase database = handler.getWritableDatabase();\n\n //ascent type\n String[] projection = {\n DatabaseContract.HoldTypeEntry._ID,\n DatabaseContract.HoldTypeEntry.COLUMN_HOLDTYPE};\n String whereClause = DatabaseContract.HoldTypeEntry._ID + \"=?\";\n String[] whereValue = {String.valueOf(infoCode)};\n\n Cursor cursor = database.query(DatabaseContract.HoldTypeEntry.TABLE_NAME,\n projection,\n whereClause,\n whereValue,\n null,\n null,\n null);\n\n int idColumnOutput = cursor.getColumnIndex(DatabaseContract.HoldTypeEntry.COLUMN_HOLDTYPE);\n\n try {\n cursor.moveToFirst();\n return cursor.getString(idColumnOutput);\n } finally {\n cursor.close();\n database.close();\n }\n\n\n }",
"public static MonitorType setType(String code) {\n if (code == null) {\n return MonitorType.LED;\n } else if (code.equalsIgnoreCase(\"LED\")) {\n return MonitorType.LED;\n } else if (code.equalsIgnoreCase(\"lcd\")) {\n return MonitorType.LCD;\n } else if (code.equalsIgnoreCase(\"ips\")) {\n return MonitorType.IPS;\n }\n\n System.out.println(\"Could not Identify type:[ \" + code + \" ] from Database \");\n return MonitorType.LED;\n }",
"public void setCode(String code) {\n this.code = code;\n }",
"public void setCode(String code) {\n this.code = code;\n }",
"public void setCode(String code) {\n this.code = code;\n }",
"public void setCode(String code) {\n this.code = code;\n }"
] |
[
"0.73800373",
"0.73800373",
"0.679248",
"0.6631405",
"0.6554892",
"0.6431378",
"0.60576123",
"0.5990002",
"0.58789724",
"0.5829449",
"0.57807535",
"0.57634264",
"0.5718033",
"0.5715836",
"0.5697801",
"0.5696597",
"0.56938195",
"0.5687047",
"0.56591266",
"0.5625799",
"0.5625799",
"0.5625799",
"0.5622476",
"0.5580692",
"0.55754024",
"0.556245",
"0.55438375",
"0.55437",
"0.55437",
"0.55437",
"0.55437",
"0.55382323",
"0.5531007",
"0.5521239",
"0.5502472",
"0.55001414",
"0.546671",
"0.54645133",
"0.5462456",
"0.54340667",
"0.54279846",
"0.54060906",
"0.5405147",
"0.5404045",
"0.53868544",
"0.53866255",
"0.5380644",
"0.5371591",
"0.5365633",
"0.53633946",
"0.5358282",
"0.5345036",
"0.5344288",
"0.5342243",
"0.5325813",
"0.532494",
"0.5306831",
"0.53048015",
"0.5293213",
"0.5292344",
"0.52855814",
"0.52765447",
"0.527637",
"0.5272876",
"0.5267337",
"0.5266701",
"0.52635187",
"0.5259471",
"0.5253734",
"0.52536464",
"0.5251585",
"0.52497596",
"0.52483267",
"0.52408004",
"0.5239554",
"0.5239425",
"0.5236399",
"0.5236399",
"0.5236399",
"0.5236399",
"0.5236399",
"0.5236399",
"0.5236399",
"0.5236399",
"0.5236399",
"0.5236399",
"0.5236399",
"0.5236399",
"0.5236399",
"0.5235824",
"0.52224326",
"0.5221157",
"0.52204806",
"0.52204806",
"0.52141696",
"0.51997215",
"0.51976025",
"0.51976025",
"0.51976025",
"0.51976025"
] |
0.7488397
|
0
|
replace the node as the next, which is very smart :) however, it's bloody slow.
|
public void deleteNode(ListNode node) {
node.val = node.next.val;
node.next = node.next.next;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Node setNextNode(Node node);",
"public void setNext(Node<E> next) { this.next = next; }",
"public void setNext(Node n) { next = n; }",
"public void setNext(DNode newNext) { next = newNext; }",
"public void setNextNode(Node<T> next) {\n itsNext = next;\n }",
"public void setNext(Node<D> n){\n\t\tnext = n;\n\t}",
"public void setNextNode(Node newnext)\n {\n next = newnext;\n }",
"public void setNext()\n {\n\t int currentIndex = AL.indexOf(currentObject);\n\t currentObject = AL.get(currentIndex +1);\n\t \n\t// never let currentNode be null, wrap to head\n\tif (currentObject == null)\n\t\tcurrentObject = firstObject;\n }",
"public void setNext(LinearNode<T> node) {\r\n\t\t\r\n\t\tnext = node;\r\n\t\t\r\n\t}",
"public void setNext(Node<T> next) {\n this.next = next;\n }",
"private void setNext(Node n) {\n\t\t\tnext = n;\n\t\t}",
"public void setNext(DoubleNode<T> node)\n {\n\n next = node;\n }",
"public void setNext(Node newNode){\n\t\t\tnext = newNode;\n\t\t}",
"public void setNext(Node<T> next) {\r\n this.next = next;\r\n }",
"public void setNext(Node<T> next) {\n\t\tthis.next = next;\n\t}",
"public void setNext(Node<T> another)\n\t{\tthis.next = another; }",
"public void setNext(MyNode<? super E> _next)\n\t{\n\t\tthis.next = _next;\n\t\t//this.next = _next;\n\t}",
"public void setNextNode(Node<T> nextNode) {\n\t\tthis.nextNode = nextNode;\n\t}",
"public void setNext(Node n) {\n next = n;\n }",
"private void prepareNext() {\n this.hasNext = false;\n while (!this.hasNext && this.nodesIterator.hasNext()) {\n this.next = this.nodesIterator.next();\n this.hasNext = this.computeHasNext();\n }\n }",
"public void setNext(Node next){\n\t\tthis.next = next;\n\t}",
"void setNext (ListNode newNext) { /* package access */ \n\t\tnext = newNext;\n\t}",
"public void setNext(Node n)\n {\n n.prev = this.next.prev;\n n.next = this.next;\n this.next.prev = n;\n this.next = n;\n }",
"public void setNext(Node next) {\n this.next = next;\n }",
"public void setNext(Node next) {\n\t\tthis.next = next;\n\t}",
"public void setNext(Node next)\r\n\t{\r\n\t\tthis.next = next;\r\n\t}",
"private void updateNextNode(SkiNode head, int nextI, int nextJ, int nextId) {\n\t\tif (!MatrixHelper.isPosValid(nextI, nextJ, map)) {\n\t\t\treturn;\n\t\t}\n\t\tif (head.v <= map[nextI][nextJ]) {\n\t\t\treturn;\n\t\t}\n\t\tif (hMap[nextI][nextJ] != 0) {\n\t\t\thead.level = Math.max(head.level, hMap[nextI][nextJ] + 1);\n\t\t} else {\n\t\t\thead.next[nextId] = new SkiNode(map[nextI][nextJ], nextI, nextJ, head);\n\t\t\tbuildSkiTree(head.next[nextId]);\n\t\t}\n\t}",
"public void setNext(Node next)\n\t{\n\t\tthis.next = next;\n\t}",
"public void setNext(Node n)\r\n\t{\r\n\t\tnext = n;\r\n\t}",
"public void setNextNode(Node nextNode) {\n this.nextNode = nextNode;\n }",
"void setNext(HashNode newNext){\n\t\tnext = newNext; \n\t}",
"public void setNext(SimpleNode next) {\n this.next = next;\n }",
"public void setNext(ListNode<E> next)\n {\n nextNode = next;\n }",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tprivate void setNext(k key, v value) {\n\t\t\tnext = new Node (key, value, null);\n\t\t}",
"public void setNext(CommitNode x){\r\n\t\tnext = x;\r\n\t}",
"@Override public void setNextNode(BTreeNode nextNode) {\n // no required in case of non leaf node\n }",
"public void next() {\r\n\t\tif (curr != tail)\r\n\t\t\tcurr = curr.next();\r\n\t}",
"protected void next() {\n\t\t// Next node\n\t\tnode = path.remove(0);\n\t\ttransition(NavigatorState.ROTATE_TO);\n\t}",
"private void moveMatchingNodeToNextElement(Node tmp) {\n for (int i = 0; i < ALL_LINKED_LISTS.size();i++) {\n Node next = ALL_LINKED_LISTS.get(i);\n if (tmp.equals(next)) {\n next = next.next;\n ALL_LINKED_LISTS.put(i, next);\n break;\n }\n }\n }",
"public void setNext(final LinkedNode<T> theNode) {\n\t myNextNode = theNode;\n }",
"public void setNext(GameNode next) {\n this.next = next;\n }",
"Node(Object newItem){\n item = newItem; //--points to a different\n next = null;\n }",
"public void setNext(ListNode<Item> next) {\n this.next = next;\n }",
"public void setNext(ObjectListNode p) {\n next = p;\n }",
"public SkipListNode<K> setNext(int i, SkipListNode<K> node)\n {\n\treturn next.set(i,node);\n }",
"public void setNext(LLNode<T> next) {\n this.next = next;\n }",
"public T next(){\r\n\t\t\tif (expectedModCount != modCount){\r\n\t\t\t\tthrow new ConcurrentModificationException();\r\n\t\t\t}\r\n\t\t\tT passed = current;\r\n\t\t\tif ((currentNode.next==endMarker)&&(currentNode.getLast()==current)){\r\n\t\t\t\tcurrentNode = endMarker;\r\n\t\t\t\tcurrent = null;\r\n\t\t\t\treturn passed;\r\n\t\t\t}\r\n\t\t\tif (currentNode.indexOf(current)==currentNode.getArraySize()-1){\r\n\t\t\t\tcurrentNode = currentNode.next;\r\n\t\t\t\tcurrent = currentNode.getFirst();\r\n\t\t\t\tidx = 0;\r\n\t\t\t\treturn passed;\r\n\t\t\t}\t\r\n\t\t\tidx++;\r\n\t\t\tcurrent = currentNode.get(idx);\r\n\t\t\treturn passed;\r\n\t\t}",
"public void setNext(ListElement<T> next)\n\t{\n\t\tthis.next = next;\n\t}",
"protected abstract void recombineNext();",
"public void setNext(SortedLinkedListNode pNode) {\n next = pNode;\n }",
"public void setNext(Node node)\n\t{\n\t\tnodeLinks.setNext(node);\n\t}",
"private SkiNode updateNextNodeToBestTail(SkiNode head, int nextI, int nextJ, int nextId) {\n\t\tif (!MatrixHelper.isPosValid(nextI, nextJ, map)) {\n\t\t\treturn null;\n\t\t}\n\t\tif (head.level - 1 != hMap[nextI][nextJ]) {\n\t\t\treturn null;\n\t\t}\n\t\thead.next[nextId] = new SkiNode(map[nextI][nextJ], nextI, nextJ, head);\n\t\thead.next[nextId].level = hMap[nextI][nextJ];\n\t\tif (head.next[nextId].level == 1) {\n\t\t\treturn head.next[nextId];\n\t\t}\n\t\treturn findBestTail(head.next[nextId]);\n\t}",
"public void gotoNext(){\r\n if(curr == null){\r\n return;\r\n }\r\n prev = curr;\r\n curr = curr.link;\r\n }",
"@Override\n\tpublic Node getNextSibling() {\n\t\treturn null;\n\t}",
"public void setNext(ListNode next)\r\n {\r\n this.next = next;\r\n }",
"@Override\r\n\t\tpublic Node getNextSibling()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"public void setNext(SlideNode node) {\n\t\tthis.next = node;\n\t}",
"private void InsertAt(IntRepList.OpNode node, IntRepList.OpNode current) {\n current.prev.next = node;\n node.prev = current.prev;\n node.next = current;\n }",
"public void setNext(ListEntry next) {\n if (next != null)\n this.next = next;\n else\n this.next = null;\n }",
"public DNode getNext() { return next; }",
"@Override\n\t\tpublic Node next() {\n\t\t\tif (this.next == null) {\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\tNode element = this.next;\n\t\t\t\tthis.next = (Node) this.next.getNextNode();\n\t\t\t\treturn (Node) element;\n\t\t\t}\n\t\t}",
"public void setNext(Cell link)\n { next = link; }",
"public com.Node<T> getNextRef() {\n\t\treturn null;\n\t}",
"public ListNode<T> getNext();",
"public void setNext(Tile next){\n\t\tthis.next=next;\n\t}",
"public Node getNext() { return next; }",
"void setNext(Cell next) {\n if (this.next == null) {\n this.next = next;\n }\n }",
"@Override \r\n\tpublic LLNode<T> next() throws NoSuchElementException{\r\n\t\tLLNode<T> node = nodeptr;\r\n\t\tif (nodeptr == null)\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\tnodeptr = nodeptr.getNext();\r\n\t\treturn node;\r\n\t}",
"public LinkedNode() {\n\t myNextNode = null;\n }",
"public Node() {\n pNext = null;\n }",
"public Node (Object newItem) {\n next = null; // set intially to null\n item = newItem;\n }",
"public void setNext(Variable next){\n\t\tthis.next = next;\n\t}",
"public void setNext(Linkable nextObject);",
"NodeIterable(Node firstChild) {\n next = firstChild;\n }",
"private void changeHead(Node node){\n node.next = head;\n node.pre = head == null ? null : head.pre;\n // node.pre = null;\n\n // if (head != null)\n // head.pre = node;\n\n head = node;\n \n if(end == null)\n end = head;\n }",
"HNode getNextSibling();",
"private void setNext(WeakOrderQueue next)\r\n/* 242: */ {\r\n/* 243:268 */ assert (next != this);\r\n/* 244:269 */ this.next = next;\r\n/* 245: */ }",
"public void advance( )\r\n {\r\n\t if(isCurrent() != true){// Implemented by student.\r\n\t throw new IllegalStateException(\"no current element\");\r\n\t }\r\n\t else\r\n\t \t precursor = cursor;\r\n\t \t cursor = cursor.getLink(); // Implemented by student.\r\n }",
"public void setNextCell(Cell next)\r\n {\r\n this.next = next;\r\n }",
"public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }",
"public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }",
"public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }",
"public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }",
"public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }",
"public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }",
"public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }",
"public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }",
"public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }",
"public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }",
"public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }",
"public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }",
"public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }",
"public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }",
"public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }",
"public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }",
"public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }",
"public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }",
"public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }",
"public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }",
"public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }",
"public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }"
] |
[
"0.78883415",
"0.74440813",
"0.7421473",
"0.73009145",
"0.71842957",
"0.7063635",
"0.7062256",
"0.70427847",
"0.7036158",
"0.70129424",
"0.70110285",
"0.70048445",
"0.6969508",
"0.6964685",
"0.69584626",
"0.6940348",
"0.693265",
"0.68760324",
"0.68739754",
"0.68637323",
"0.6851501",
"0.6813982",
"0.678427",
"0.6773291",
"0.67543113",
"0.675043",
"0.6749234",
"0.6731312",
"0.67306733",
"0.6724413",
"0.6719593",
"0.6690114",
"0.66592604",
"0.665685",
"0.6635355",
"0.6634363",
"0.6588237",
"0.65776634",
"0.657096",
"0.6566455",
"0.65093535",
"0.64700824",
"0.6454322",
"0.6441692",
"0.63928455",
"0.63895804",
"0.63867295",
"0.636936",
"0.6365422",
"0.6361288",
"0.6357622",
"0.6352425",
"0.6334499",
"0.63198406",
"0.63057685",
"0.62932605",
"0.6265038",
"0.62589574",
"0.6225885",
"0.6222116",
"0.6217448",
"0.62142956",
"0.6193956",
"0.6185969",
"0.61855435",
"0.6183456",
"0.6181186",
"0.6164696",
"0.61630386",
"0.6150992",
"0.61449695",
"0.61435455",
"0.6139217",
"0.6117378",
"0.61090326",
"0.6099575",
"0.609516",
"0.60872364",
"0.60808516",
"0.608066",
"0.608066",
"0.608066",
"0.608066",
"0.608066",
"0.608066",
"0.608066",
"0.608066",
"0.608066",
"0.608066",
"0.608066",
"0.608066",
"0.608066",
"0.608066",
"0.608066",
"0.608066",
"0.608066",
"0.608066",
"0.608066",
"0.608066",
"0.608066",
"0.608066"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
public static void main(String[] args) {
LinkedList<Q7e> employee = new LinkedList<Q7e>();
employee.add(new Q7e("Dell","Engineering",40));
employee.add(new Q7e("Jane","Management",35));
Collections.sort(employee);
for(Q7e x : employee) {
System.out.println(x);
}
}
|
{
"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
|
/CallShowSetVideoProtocol callShowSetVideoProtocol; UpCallShowSetVideoData upCallShowSetVideoData;
|
private void setVideo(){
/* if(detailsBean==null){
showToast("没有获取到信息");
return;
}
UserManager.getInstance().setDetailsBean(detailsBean);
upCallShowSetVideoData = new UpCallShowSetVideoData();
upCallShowSetVideoData.smobile = Preferences.getString(Preferences.UserMobile,null);
upCallShowSetVideoData.iringid = detailsBean.iringid;
if (callShowSetVideoProtocol == null) {
callShowSetVideoProtocol = new CallShowSetVideoProtocol(null, upCallShowSetVideoData, handler);
callShowSetVideoProtocol.showWaitDialog();
}
callShowSetVideoProtocol.stratDownloadThread(null, ServiceUri.Spcl, upCallShowSetVideoData, handler,true);*/
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"protected void startVideoCall() {\n if (!EMClient.getInstance().isConnected())\n Toast.makeText(ChatDetailsActivity.this, R.string.not_connect_to_server, Toast.LENGTH_SHORT).show();\n else {\n startActivity(new Intent(ChatDetailsActivity.this, VideoCallActivity.class).putExtra(\"username\", mBean.getMobile())\n .putExtra(\"isComingCall\", false).putExtra(\"nickname\", mBean.getUser_nickname()));\n // videoCallBtn.setEnabled(false);\n// inputMenu.hideExtendMenuContainer();\n }\n }",
"public void recordVideo() {\n\n }",
"public void setVideoPort(int port);",
"public interface LiveVideoAllCallBack extends VideoAllCallBack{\n //暂时保留standardVideo方法\n //点击了空白区域开始播放\n void onClickStartThumb(String url, Object... objects);\n\n //点击了播放中的空白区域\n void onClickBlank(String url, Object... objects);\n\n //点击了全屏播放中的空白区域\n void onClickBlankFullscreen(String url, Object... objects);\n}",
"public void onVideoStarted () {}",
"public void setVideoDevice(String id);",
"public void setPreviewVideoDefinition(VideoDefinition vdef);",
"public void playVideo() {\n }",
"private void videoVisible() {\n }",
"void addVideoListener(CallPeer peer, VideoListener listener);",
"Call createVideoCall(Contact callee)\n throws OperationFailedException;",
"public void enableVideoPreview(boolean val);",
"void answerVideoCallPeer(CallPeer peer)\n throws OperationFailedException;",
"@Override\r\n public void call() {\n System.out.println(\"开始视频通话\");\r\n }",
"public void setNativeVideoWindowId(Object id);",
"public void enableVideoMulticast(boolean yesno);",
"@Override\n public void onVideoStarted() {\n }",
"public interface IMojingAppCallback {\n\n public void changeVideoType(String path,int video3dType,int videoModeType);\n\n}",
"public void reloadVideoDevices();",
"private void updateVideoCallDefaultSIM() {\n\t\tXlog.d(TAG,\"updateVideoCallDefaultSIM()+mVTCallSupport=\"+mVTCallSupport);\n\t\tif (iTelephony != null) {\n\n\t\t\ttry {\n\t\t\t\tint videocallSlotID = iTelephony.get3GCapabilitySIM();\n\t\t\t\tXlog.d(TAG,\"updateVideoCallDefaultSIM()---videocallSlotID=\"+videocallSlotID);\n\t\t\t\tGeminiUtils.m3GSlotID = videocallSlotID;\n\t\t\t\t\n\t\t\t\tif (videocallSlotID < 0)\n\t\t\t\t\treturn;\n\n\t\t\t\tSIMInfo siminfo = SIMInfo.getSIMInfoBySlot(getActivity(), videocallSlotID);\n\n\t\t\t\tif (siminfo != null) {\n\t\t\t\t\tInteger intIndex = mSimIdToIndexMap.get(siminfo.mSimId);\n\t\t\t\t\tXlog.d(TAG,\"updateVideoCallDefaultSIM()---intIndex=\"+intIndex);\n\t\t\t\t\tif (intIndex == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tint index = intIndex.intValue();\n\t\t\t\t\tXlog.d(TAG,\"updateVideoCallDefaultSIM()---index=\"+index);\n\t\t\t\t\tif ((index >= 0) && (siminfo != null)) {\n\t\t\t\t\t if(mVTCallSupport){\n\t\t\t\t\t\tmVideoCallSimSetting.setInitValue(index);\n\t\t\t\t\t\tmVideoCallSimSetting.setSummary(siminfo.mDisplayName);\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t if(mVTCallSupport){\n\t\t\t\t\t\tXlog.d(TAG,\"mVideoCallSimSetting.setInitValue(-1)\");\n\t\t\t\t\t\tmVideoCallSimSetting.setInitValue(-1);\n\t\t\t\t\t }\n\t\t\t\t}\n\t\t\t} catch (RemoteException e){\n\t\t\t\tXlog.e(TAG, \"iTelephony exception\");\n\t\t\t\treturn;\n\t\t\t}\n\n\n\t\t}\n\t}",
"@Override\n public void onReceive(Context context, Intent intent) {\n Toast.makeText(VideoDetailsActivity.this,\"Reciever fot the result. Do some processing bro\",Toast.LENGTH_LONG).show();\n mVideoView.setVideoURI();\n }",
"public String getVideoDevice();",
"public boolean isIPVideoCallSupported() {\n\t\tLogger.i(TAG, \"isIPVideoCallSupported value \" + ipVideoCall);\n\t\treturn ipVideoCall;\t\t\t\t\n\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void onLoadVideo(String result) {\n\n\t\t\t\t\t\t\t\t}",
"public abstract void videoMessage(Message m);",
"public void onVideoCallReply(int dwUserId, int dwErrorCode,\r\n\t\t\tint dwFlags, int dwParam, String szUserStr) {\n\t\tString strMessage = null;\r\n\t\tswitch (dwErrorCode) {\r\n\t\tcase AnyChatDefine.BRAC_ERRORCODE_SESSION_BUSY:\r\n\t\t\tstrMessage = mContext.getString(R.string.str_returncode_bussiness);\r\n\t\t\tbreak;\r\n\t\tcase AnyChatDefine.BRAC_ERRORCODE_SESSION_REFUSE:\r\n\t\t\tstrMessage = mContext.getString(R.string.str_returncode_requestrefuse);\r\n\t\t\tbreak;\r\n\t\tcase AnyChatDefine.BRAC_ERRORCODE_SESSION_OFFLINE:\r\n\t\t\tstrMessage = mContext.getString(R.string.str_returncode_offline);\r\n\t\t\tbreak;\r\n\t\tcase AnyChatDefine.BRAC_ERRORCODE_SESSION_QUIT:\r\n\t\t\tstrMessage = mContext.getString(R.string.str_returncode_requestcancel);\r\n\t\t\tbreak;\r\n\t\tcase AnyChatDefine.BRAC_ERRORCODE_SESSION_TIMEOUT:\r\n\t\t\tstrMessage = mContext.getString(R.string.str_returncode_timeout);\r\n\t\t\tbreak;\r\n\t\tcase AnyChatDefine.BRAC_ERRORCODE_SESSION_DISCONNECT:\r\n\t\t\tstrMessage = mContext.getString(R.string.str_returncode_disconnect);\r\n\t\t\tbreak;\r\n\t\tcase AnyChatDefine.BRAC_ERRORCODE_SUCCESS:\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tif (strMessage != null) {\r\n\t\t\tBaseMethod.showToast(strMessage, mContext);\r\n\t\t\t// 如果程序在后台,通知通话结束\r\n\t\t\tif (bBack) {\r\n\t\t\t\tBundle bundle = new Bundle();\r\n\t\t\t\tbundle.putInt(\"USERID\", dwUserId);\r\n\t\t\t\tBaseMethod.sendBroadCast(mContext,\r\n\t\t\t\t\t\tBaseConst.ACTION_BACK_CANCELSESSION, null);\r\n\t\t\t}\r\n\t\t\tstopSessionMusic();\r\n\t\t}\r\n\t}",
"@Override\n public boolean isShowVideoCallBtn(Object contactImpl)\n {\n return isShowButton((MetaContact) contactImpl, OperationSetVideoTelephony.class)\n && (AndroidCamera.getCameras().length != 0);\n }",
"public void enableVideoDisplay(boolean enable);",
"public int getVideoPort();",
"default void onVideoStarted() {\n }",
"private void toggleScreenShare(View v) {\n\n if(((ToggleButton)v).isChecked()){\n initRecorder();\n recordScreen();\n }\n else\n {\n mediaRecorder.stop();\n mediaRecorder.reset();\n stopRecordScreen();\n\n //play in videoView\n //videoView.setVisibility(View.VISIBLE);\n //videoView.setVideoURI(Uri.parse(videoUri));\n //videoView.start();\n\n\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\" Location of video : \");\n builder.setMessage(videoUri);\n builder.show();\n\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent i = new Intent(MainActivity.this, PlayVideo.class);\n i.putExtra(\"KEY\", videoUri);\n //Toast.makeText(this, videoUri, Toast.LENGTH_SHORT).show();\n startActivity(i);\n }\n }, 2000);\n Toast.makeText(this, \"Loading video...\", Toast.LENGTH_SHORT).show();\n\n\n\n }\n }",
"Call createVideoCall(Contact callee, QualityPreset qualityPreferences)\n throws OperationFailedException;",
"@Override\n public void handleMessage(Message msg) {\n super.handleMessage(msg);\n switch (msg.what) {\n case PLAY_VIDEO:\n JCVideoPlayer.releaseAllVideos();\n /* if (topVideoList.size() == 1) {\n videoplayer.setUp(topVideoList.get(videotype).getPath()\n , JCVideoPlayerStandard.SCREEN_LAYOUT_NORMAL, \"视频播放\");\n } else {\n videoplayer.setUp(topVideoList.get(videotype).getPath()\n , JCVideoPlayerStandard.SCREEN_LAYOUT_NORMAL, \"视频播放\");\n if (videotype == topVideoList.size() - 1) {\n videotype = 0;\n } else {\n videotype++;\n }\n }*/\n if (videotype == 0) {\n videoplayer.setUp(Constant.fileSavePath + \"lx2.mp4\"\n , JCVideoPlayerStandard.SCREEN_LAYOUT_NORMAL, \"视频播放\");\n videotype = 1;\n } else {\n videoplayer.setUp(Constant.fileSavePath + \"lx1.mp4\"\n , JCVideoPlayerStandard.SCREEN_LAYOUT_NORMAL, \"视频播放\");\n videotype = 0;\n }\n videoplayer.startVideo();\n break;\n case PLAY_BANNER:\n loadTestDatas();\n break;\n case PLAY_BANNERAPAWAIT:\n loadTestApawaitDatas();\n break;\n case PLAY_VIDEOHEIGHT:\n ViewGroup.LayoutParams params = rel_top.getLayoutParams();\n if (msg.arg1 == 1) {\n params.height = 506;\n } else if (msg.arg1 == 2) {\n params.height = 607;\n }\n rel_top.setLayoutParams(params);\n break;\n case PY_START:\n cabinetTransaction.start(Constant.pypwd, Constant.dev, Constant.pytype, 1, Constant.guiBean.getNumber(), cabinetTransactionEventListener);\n break;\n case 12345:\n tvloginfo.setText(msg.obj.toString());\n break;\n case MSG_CLOSE_CHECK_PENDING:\n Log.i(\"TCP\", \"开始添加\");\n synchronized (boxesPendingList) {\n for (int i = 0; i < boxesPendingList.length; i++) {\n if (boxesPendingList[i].boxId == 0) {//无效的格子编号,当前位置 可以存储格子数据\n try {\n Thread.sleep(500);\n CloseCheckBox closeCheckBox = (CloseCheckBox) msg.obj;\n boxesPendingList[i] = closeCheckBox;\n } catch (InterruptedException e) {\n e.printStackTrace();\n Log.i(\"TCP\", \">锁boxesPendingList2<\" + e.toString());\n }\n break;\n }\n }\n }\n Log.i(\"TCP\", \"结束添加\");\n break;\n default:\n break;\n }\n }",
"public void OnRtcLiveApplyLine(String strPeerId, String strUserName, String strBrief);",
"void setLocalVideoAllowed(Call call, boolean allowed)\n throws OperationFailedException;",
"@Override\r\n\t\tpublic void onVideoSizeChanged(int width, int height) {\n\t\t\tUtils.printLog(TAG, \"onVideoSizeChanged width =\" + width + \" height =\" + height+\" mVideoContrl.isbVideoDisplayByHardware()=\"+mVideoContrl.isbVideoDisplayByHardware());\r\n//\t\t\tmSurfaceView.setBackgroundColor(getResources().getColor(R.color.transparent_background));\r\n\r\n\t\t\tif(clienttype.contains(\"938\")|| clienttype.contains(\"838\")){\r\n\t\t\t\tif(mVideoContrl.isbVideoDisplayByHardware()){//0067739: 多屏互动:手机端推送用手机拍的视频(竖着拍)到电视,在电视端播放时图像里的景物和人都压得很扁,没做适配处理\r\n\t\t\t\t\tsetVideoDisplayFullScreen();\r\n\t\t\t\t\tmVideoContrl.setbVideoDisplayByHardware(false);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tsetVideoDisplayRotate90();\r\n\t\t\t\t}\r\n\t\t\t\tif(mVideoContrl.getPlayMediaBean()!=null){\r\n\t\t\t\t\tLog.d(TAG\t,\"onVideoSizeChanged mVideoContrl.getPlayMediaBean()=\"+mVideoContrl.getPlayMediaBean().mPath);\r\n\t\t\t\t}\r\n\t\t\t}\r\n//\t\t\tif(mVideoContrl.isbVideoDisplayByHardware()){//如果返回硬解标志,App不处理\r\n//\t\t\t\tmVideoContrl.setbVideoDisplayByHardware(false);\r\n//\t\t\t\treturn;\r\n//\t\t\t}\r\n//\t\t\tif(mVideoContrl.getPlayMediaBean()!=null){\r\n//\t\t\t\tLog.d(TAG\t,\"onVideoSizeChanged mVideoContrl.getPlayMediaBean()=\"+mVideoContrl.getPlayMediaBean().mPath);\r\n//\t\t\t}\r\n//\t\t\tif(mVideoContrl.getPlayMediaBean()!=null){\r\n//\t\t\t\tMediaMetadataRetriever mediaMetadataRetriever = new MediaMetadataRetriever();\r\n//\t\t\t\tmediaMetadataRetriever.setDataSource(mVideoContrl.getPlayMediaBean().mPath);\r\n//\t\t\t\tString rotation = mediaMetadataRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_ROTATION);\r\n//\t\t\t\tUtils.printLog(TAG, \"onVideoSizeChanged mediaMetadataRetriever rotation = \"+rotation);\r\n//\t\t\t\tif(rotation.equals(\"90\")||rotation.equals(\"270\")){\r\n//\t\t\t\t\tsetVideoDisplayRotate90();\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n\t\t}",
"public void onVideoCallRequest(int dwUserId, int dwFlags,\r\n\t\t\tint dwParam, String szUserStr) {\n\t\tplayCallReceivedMusic(mContext);\r\n\t\t// 如果程序在后台,通知有呼叫请求\r\n\t\tif (bBack) {\r\n\t\t\tUserItem item = getUserItemByUserId(dwUserId);\r\n\t\t\tBundle bundle = new Bundle();\r\n\t\t\tif (item != null) {\r\n\t\t\t\tbundle.putString(\"USERNAME\", item.getUserName()\t+ mContext.getString(R.string.sessioning_reqite));\r\n\t\t\t} else {\r\n\t\t\t\tbundle.putString(\"USERNAME\", \"some one call you\");\r\n\t\t\t}\r\n\t\t\tbundle.putInt(\"USERID\", dwUserId);\r\n\t\t\tBaseMethod.sendBroadCast(mContext, BaseConst.ACTION_BACK_EQUESTSESSION, bundle);\r\n\t\t}\r\n\t}",
"public void mo71540w() {\n boolean z;\n VideoItemParams requestId = VideoItemParams.newBuilder().setFragment(this.f73947d).setAweme(this.f73950g).setAwemeFromPage(this.f73953m).setEventType(this.f73944a).setMyProfile(this.f73946c).setPageType(this.f73954n).setEnterMethodValue(this.f74254j).setRequestId(this.f73952l);\n if (this.f74252h != null) {\n this.f74252h.mo60134a(\"video_params\", (Object) requestId);\n }\n mo71773u();\n User author = this.f73950g.getAuthor();\n if (author != null) {\n this.mTitleView.setText(this.f73949f.getString(R.string.b5s, new Object[]{author.getNickname()}));\n this.mTitleView.getPaint().setFakeBoldText(true);\n } else {\n this.mTitleView.setText(\"\");\n }\n if (this.f73950g == null || this.f73950g.isCanPlay()) {\n this.mTitleView.setVisibility(0);\n } else {\n this.mTitleView.setVisibility(4);\n }\n this.tagLayout.setEventType(this.f73944a);\n List videoLabels = this.f73950g.getVideoLabels();\n m91744a(videoLabels);\n if (!RelationLabelHelper.hasDuoShanLabel(this.f73950g)) {\n if (C6319n.m19594a(this.f73944a, \"homepage_hot\")) {\n this.tagLayout.mo61051c(this.f73950g, videoLabels, new C23440a(7, 20));\n } else {\n this.tagLayout.mo61050b(this.f73950g, videoLabels, new C23440a(7, 20));\n }\n }\n if (TextUtils.isEmpty(this.f73950g.getExtra()) || !C6399b.m19928c()) {\n this.mTxtExtra.setVisibility(8);\n } else {\n this.mTxtExtra.setText(this.f73950g.getExtra());\n this.mTxtExtra.setVisibility(0);\n }\n if (this.f73950g.getUserDigg() == 1) {\n z = true;\n } else {\n z = false;\n }\n mo71770a(z);\n if (this.f73953m == 1) {\n mo71533d(m91740N());\n }\n AwemeStatus status = this.f73950g.getStatus();\n if (status == null) {\n this.mAwemeInCheckLayout.setVisibility(8);\n } else if (status.isInReviewing()) {\n this.mAwemeInCheckLayout.setVisibility(0);\n } else {\n this.mAwemeInCheckLayout.setVisibility(8);\n }\n }",
"@Override\n\tvoid postarVideo() {\n\n\t}",
"@Override\n public void onServerStart(String videoStreamUrl)\n {\n\n\n\n Log.d(\"Activity\",\"URL: \"+ videoStreamUrl);\n\n\n video = (VideoView)findViewById(R.id.video);\n\n Uri uri = Uri.parse(videoStreamUrl);\n video.setVideoURI(uri);\n video.start();\n\n\n\n }",
"@SuppressLint(\"NewApi\") @Override\n\t\tpublic void onPrepared(MediaPlayer mp) {\n\t\t\tplayer = mp;\n\t\t\tpb.setVisibility(View.GONE);\n\t\t\t//img_volumvideo.setVisibility(View.VISIBLE);\n\t\t\t mp.setVideoScalingMode(MediaPlayer.VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING);\n\t\t\t\tStringBuffer sbf = new StringBuffer();\n\t\t\t\tsbf.append(Constant.AppVideoApi);\n\t\t\t\tsbf.append(\"offer_id=\"\n\t\t\t\t\t\t+AppofferUtil.getIntsance().getList().get(0).getOffer_id());\n\t\t\t\tsbf.append(\"&dev_id=\" + AppofferUtil.getIntsance().getList().get(0).getDev_id());\n\t\t\t\tsbf.append(\"&app_id=\" + AppofferUtil.getIntsance().getList().get(0).getApp_id());\n\t\t\t\tsbf.append(\"&is_integral=\" + AppofferUtil.getIntsance().getList().get(0).getIs_integral());\n\t\t\t\tsbf.append(\"&ad_type=\" + AppofferUtil.getIntsance().getList().get(0).getApp_type());\n\t\t\t\tsbf.append(\"&android_id=\" + Constant.getAndroidID(AlertVideoActivity.this));\n\t\t\t\tTapfunsCommandExecute.getInstance().executeGet(AlertVideoActivity.this, sbf.toString(),\n\t\t\t\t\t\tnew RequestCallBack() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void getRequestResult(String command) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tTapfunsLogUtil.logI(command);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t mp.setOnInfoListener(new MediaPlayer.OnInfoListener() {\n\t\t\t\t\t @Override\n\t\t\t\t\t public boolean onInfo(MediaPlayer mp, int what, int extra) {\n\n\t\t\t\t\t if (what == MediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START) {\n\t\t\t\t\t // video started\n\t\t\t\t\t videoView.setBackgroundColor(Color.TRANSPARENT);\n\t\t\t\t\t return true;\n\t\t\t\t\t }\n\t\t\t\t\t return false;\n\t\t\t\t\t }\n\t\t\t\t });\n\t\t\t\t mp.setOnVideoSizeChangedListener(new MediaPlayer.OnVideoSizeChangedListener() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onVideoSizeChanged(MediaPlayer mp, int width, int height) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t // video started\n\t\t\t\t\t videoView.setBackgroundColor(Color.TRANSPARENT);\n\t\t\t\t\t}\n\t\t\t\t}); \n\t\t}",
"public abstract void addReceivedVideo(Video video) throws UnsuportedOperationException;",
"public abstract void addReceivedVideo(Video video) throws UnsuportedOperationException;",
"public interface OperationSetVideoTelephony extends OperationSet\n{\n /**\n * Adds a specific <code>VideoListener</code> to this telephony in order to receive notifications\n * when visual/video <code>Component</code>s are being added and removed for a specific <code>CallPeer</code>.\n *\n * @param peer the <code>CallPeer</code> whose video the specified listener is to be notified about\n * @param listener the <code>VideoListener</code> to be notified when visual/video <code>Component</code>s are\n * being added or removed for <code>peer</code>\n */\n void addVideoListener(CallPeer peer, VideoListener listener);\n\n /**\n * Gets the visual <code>Component</code> which depicts the local video being streamed to a specific <code>CallPeer</code>.\n *\n * @param peer the <code>CallPeer</code> to whom the local video which is to be depicted by the returned\n * visual <code>Component</code> is being streamed\n * @return a visual <code>Component</code> which depicts the local video being streamed to the\n * specified <code>CallPeer</code> if this telephony chooses to carry out the creation\n * synchronously; <code>null</code> if this telephony chooses to create the requested visual\n * <code>Component</code> asynchronously\n * @throws OperationFailedException if creating the component fails for whatever reason.\n */\n Component getLocalVisualComponent(CallPeer peer)\n throws OperationFailedException;\n\n /**\n * Gets the visual/video <code>Component</code> available in this telephony for a specific\n * <code>CallPeer</code>.\n *\n * @param peer the <code>CallPeer</code> whose video is to be retrieved\n * @return the visual/video <code>Component</code> available in this telephony for the specified\n * <code>peer</code> if any; otherwise, <code>null</code>\n */\n @Deprecated\n Component getVisualComponent(CallPeer peer);\n\n /**\n * Gets the visual/video <code>Component</code>s available in this telephony for a specific <code>CallPeer</code>.\n *\n * @param peer the <code>CallPeer</code> whose videos are to be retrieved\n * @return the visual/video <code>Component</code>s available in this telephony for the specified <code>peer</code>\n */\n List<Component> getVisualComponents(CallPeer peer);\n\n /**\n * Removes a specific <code>VideoListener</code> from this telephony in order to no longer have it\n * receive notifications when visual/video <code>Component</code>s are being added and removed for a\n * specific <code>CallPeer</code>.\n *\n * @param peer the <code>CallPeer</code> whose video the specified listener is to no longer be notified about\n * @param listener the <code>VideoListener</code> to no longer be notified when visual/video\n * <code>Component</code>s are being added or removed for <code>peer</code>\n */\n void removeVideoListener(CallPeer peer, VideoListener listener);\n\n /**\n * Sets the indicator which determines whether the streaming of local video in a specific\n * <code>Call</code> is allowed. The setting does not reflect the availability of actual video\n * capture devices, it just expresses the desire of the user to have the local video streamed in\n * the case the system is actually able to do so.\n *\n * @param call the <code>Call</code> to allow/disallow the streaming of local video for\n * @param allowed <code>true</code> to allow the streaming of local video for the specified <code>Call</code>;\n * <code>false</code> to disallow it\n * @throws OperationFailedException if initializing local video fails.\n */\n void setLocalVideoAllowed(Call call, boolean allowed)\n throws OperationFailedException;\n\n /**\n * Gets the indicator which determines whether the streaming of local video in a specific\n * <code>Call</code> is allowed. The setting does not reflect the availability of actual video\n * capture devices, it just expresses the desire of the user to have the local video streamed in\n * the case the system is actually able to do so.\n *\n * @param call the <code>Call</code> to get the indicator of\n * @return <code>true</code> if the streaming of local video for the specified <code>Call</code> is\n * allowed; otherwise, <code>false</code>\n */\n boolean isLocalVideoAllowed(Call call);\n\n /**\n * The property which indicates whether a specific <code>Call</code> is currently streaming the\n * local video (to a remote destination).\n */\n static final String LOCAL_VIDEO_STREAMING = \"LOCAL_VIDEO_STREAMING\";\n\n /**\n * Gets the indicator which determines whether a specific <code>Call</code> is currently streaming\n * the local video (to a remote destination).\n *\n * @param call the <code>Call</code> to get the indicator of\n * @return <code>true</code> if the specified <code>Call</code> is currently streaming the local video\n * (to a remote destination); otherwise, <code>false</code>\n */\n boolean isLocalVideoStreaming(Call call);\n\n /**\n * Adds a specific <code>PropertyChangeListener</code> to the list of listeners which get notified\n * when the properties (e.g. {@link #LOCAL_VIDEO_STREAMING}) associated with a specific\n * <code>Call</code> change their values.\n *\n * @param call the <code>Call</code> to start listening to the changes of the property values of\n * @param listener the <code>PropertyChangeListener</code> to be notified when the properties associated with\n * the specified <code>Call</code> change their values\n */\n void addPropertyChangeListener(Call call, PropertyChangeListener listener);\n\n /**\n * Removes a specific <code>PropertyChangeListener</code> from the list of listeners which get\n * notified when the properties (e.g. {@link #LOCAL_VIDEO_STREAMING}) associated with a specific\n * <code>Call</code> change their values.\n *\n * @param call the <code>Call</code> to stop listening to the changes of the property values of\n * @param listener the <code>PropertyChangeListener</code> to no longer be notified when the properties\n * associated with the specified <code>Call</code> change their values\n */\n void removePropertyChangeListener(Call call, PropertyChangeListener listener);\n\n /**\n * Create a new video call and invite the specified CallPeer to it.\n *\n * @param uri the address of the callee that we should invite to a new call.\n * @return CallPeer the CallPeer that will represented by the specified uri. All following state\n * change events will be delivered through that call peer. The Call that this peer is a\n * member of could be retrieved from the CallParticipatn instance with the use of the\n * corresponding method.\n * @throws OperationFailedException with the corresponding code if we fail to create the video call.\n * @throws ParseException if <code>callee</code> is not a valid sip address string.\n */\n Call createVideoCall(String uri)\n throws OperationFailedException, ParseException;\n\n /**\n * Create a new video call and invite the specified CallPeer to it.\n *\n * @param callee the address of the callee that we should invite to a new call.\n * @return CallPeer the CallPeer that will represented by the specified uri. All following state\n * change events will be delivered through that call peer. The Call that this peer is a\n * member of could be retrieved from the CallParticipatn instance with the use of the\n * corresponding method.\n * @throws OperationFailedException with the corresponding code if we fail to create the video call.\n */\n Call createVideoCall(Contact callee)\n throws OperationFailedException;\n\n /**\n * Create a new video call and invite the specified CallPeer to it.\n *\n * @param uri the address of the callee that we should invite to a new call.\n * @param qualityPreferences the quality preset we will use establishing the video call, and we will expect from\n * the other side. When establishing call we don't have any indications whether remote\n * part supports quality presets, so this setting can be ignored.\n * @return CallPeer the CallPeer that will represented by the specified uri. All following state\n * change events will be delivered through that call peer. The Call that this peer is a\n * member of could be retrieved from the CallParticipatn instance with the use of the\n * corresponding method.\n * @throws OperationFailedException with the corresponding code if we fail to create the video call.\n * @throws ParseException if <code>callee</code> is not a valid sip address string.\n */\n Call createVideoCall(String uri, QualityPreset qualityPreferences)\n throws OperationFailedException, ParseException;\n\n /**\n * Create a new video call and invite the specified CallPeer to it.\n *\n * @param callee the address of the callee that we should invite to a new call.\n * @param qualityPreferences the quality preset we will use establishing the video call, and we will expect from\n * the other side. When establishing call we don't have any indications whether remote\n * part supports quality presets, so this setting can be ignored.\n * @return CallPeer the CallPeer that will represented by the specified uri. All following state\n * change events will be delivered through that call peer. The Call that this peer is a\n * member of could be retrieved from the CallParticipatn instance with the use of the\n * corresponding method.\n * @throws OperationFailedException with the corresponding code if we fail to create the video call.\n */\n Call createVideoCall(Contact callee, QualityPreset qualityPreferences)\n throws OperationFailedException;\n\n /**\n * Indicates a user request to answer an incoming call with video enabled from the specified CallPeer.\n *\n * @param peer the call peer that we'd like to answer.\n * @throws OperationFailedException with the corresponding code if we encounter an error while performing this operation.\n */\n void answerVideoCallPeer(CallPeer peer)\n throws OperationFailedException;\n\n /**\n * Returns the quality control for video calls if any. It can be null if we were able to\n * successfully determine that other party does not support it.\n *\n * @param peer the peer which this control operates on.\n * @return the implemented quality control.\n */\n QualityControl getQualityControl(CallPeer peer);\n\n /**\n * Determines the <code>ConferenceMember</code> which is participating in a telephony conference\n * with a specific <code>CallPeer</code> as its focus and which is sending a video content/RTP\n * stream displayed in a specific visual <code>Component</code>.\n *\n * @param peer the <code>CallPeer</code> which is the conference focus of the telephony conference to be\n * examined in order to locate the <code>ConferenceMember</code> which is sending the video\n * content/RTP stream displayed in the specified <code>visualComponent</code>\n * @param visualComponent the visual <code>Component</code> which displays the video content/RTP stream of the\n * <code>ConferenceMember</code> to be located\n * @return the <code>ConferenceMember</code>, if any, which is sending the video content/RTP stream\n * displayed in the specific <code>visualComponent</code>\n */\n ConferenceMember getConferenceMember(CallPeer peer, Component visualComponent);\n}",
"public interface IVideoView {\n\n public void showLoading();\n\n public void clearLoading();\n\n public void showSuccess(VideoEvent videoEvent);\n\n public void showError();\n\n}",
"void onVideoInputSelected(int type);",
"public void setPreferredVideoDefinition(VideoDefinition vdef);",
"@Override\n\t\t\t\t\tpublic void onLoadVideo(String result) {\n\n\t\t\t\t\t}",
"public ImsVideoCallProviderWrapper(IImsVideoCallProvider VideoProvider)\n throws RemoteException {\n mVideoCallProvider = VideoProvider;\n mVideoCallProvider.asBinder().linkToDeath(mDeathRecipient, 0);\n\n mBinder = new ImsVideoCallCallback();\n mVideoCallProvider.setCallback(mBinder);\n }",
"protected void mo5608a() {\n super.mo5608a();\n if (getVideoView() != null) {\n getVideoView().getEventBus().m5029a(this.f5897d, this.f5895b, this.f5896c);\n }\n }",
"public void onDouyinDetectStart() {\n HwAPPStateInfo curAppInfo = getCurStreamAppInfo();\n if (curAppInfo != null && 100501 == curAppInfo.mScenceId) {\n curAppInfo.mIsVideoStart = true;\n }\n }",
"public final void mo60146a(View view) {\n super.mo60146a(view);\n DataCenter dataCenter = this.f60922e;\n if (dataCenter != null) {\n C25638a aVar = (C25638a) dataCenter.mo60135a(\"ad_feed_video_params\");\n if (aVar != null) {\n mo66457a(aVar);\n }\n }\n }",
"@Override\n\tpublic void videoStart() {\n\t\t\n\t}",
"private native static int shout_set_protocol(long shoutInstancePtr, int protocol);",
"public void onShowCameraClicked(View view) {\n if (mUIState == UIState.CONNECTED_FULLSCREEN) {\n // Toggle to split screen while showing remote camera\n if (mRemoteCameraUid != 0)\n setupRemoteVideo(mRemoteCameraUid, mRemoteCameraContainer);\n removeRemoteShare();\n setupRemoteVideo(WINDOW_SHARE_UID, mRemoteShareContainerSplit);\n setUIState(UIState.CONNECTED_SPLITSCREEN);\n } else if (mUIState == UIState.CONNECTED_SPLITSCREEN) {\n // Toggle to full screen while hiding remote camera\n removeRemoteCamera();\n removeRemoteShare();\n setupRemoteVideo(WINDOW_SHARE_UID, mRemoteShareContainerFull);\n setUIState(UIState.CONNECTED_FULLSCREEN);\n }\n }",
"public void mo66455a() {\n DataCenter dataCenter = this.f60922e;\n if (dataCenter != null) {\n dataCenter.mo60132a(\"ad_feed_video_params\", (C0053p<C23083a>) this);\n }\n }",
"public interface VideoThreadShow {\n void AddMySurfaceView(int threadnum);\n void DeleMySurfaceView(int threadnum);\n void TryAddVideoThread();//开启新的线程\n void ShowBitmap(Bitmap bitmap,int sufacenum);\n void ToastShow(String ss);\n ServerSocket getServerSocket();\n Handler GetUIHandler();\n void StopActivity();\n}",
"private void displayVideo(){\n ButtonBack displayVideo = new ButtonBack(\"/view/VideoWindow.fxml\");\n displayVideo.displayVideo(\"winner\",\"Congratulation\");\n }",
"public ShowVideoResponse() {\n }",
"@Override\n public void run() {\n setupRemoteVideo(uid);\n }",
"public void onVideoCallEnd(int dwUserId, int dwFlags, int dwParam,\r\n\t\t\tString szUserStr) {\n\t\tsessionItem = null;\r\n\t}",
"void closeVideo();",
"public void setVideoDscp(int dscp);",
"boolean isLocalVideoAllowed(Call call);",
"@Override\n\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\n\t\t\tStringBuffer sbfs = new StringBuffer();\n\t\t\tsbfs.append(Constant.AppVideoEndApi);\n\t\t\tsbfs.append(\"offer_id=\"\n\t\t\t\t\t+AppofferUtil.getIntsance().getList().get(0).getOffer_id());\n\t\t\tsbfs.append(\"&dev_id=\" + AppofferUtil.getIntsance().getList().get(0).getDev_id());\n\t\t\tsbfs.append(\"&app_id=\" + AppofferUtil.getIntsance().getList().get(0).getApp_id());\n\t\t\tsbfs.append(\"&is_integral=\" + AppofferUtil.getIntsance().getList().get(0).getIs_integral());\n\t\t\tsbfs.append(\"&ad_type=\" + AppofferUtil.getIntsance().getList().get(0).getApp_type());\n\t\t\tsbfs.append(\"&android_id=\" + Constant.getAndroidID(AlertVideoActivity.this));\n\t\t\tTapfunsCommandExecute.getInstance().executeGet(AlertVideoActivity.this, sbfs.toString(),\n\t\t\t\t\tnew RequestCallBack() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void getRequestResult(String command) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tTapfunsLogUtil.logI(command);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t});\n\t\t}",
"public void setVideoState(java.lang.String r1, int r2) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.telecom.ConnectionServiceAdapterServant.2.setVideoState(java.lang.String, int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.2.setVideoState(java.lang.String, int):void\");\n }",
"@Override\n\t\t\tpublic void onLoadVideo(String result) {\n\t\t\t}",
"@Override\r\n\t\tpublic void onVideoPlayInfoNotify(int infoCode) {\n\t\t\tUtils.printLog(TAG, \"onVideoPlayInfoNotify infoCode=\"+infoCode);\r\n\t\t\tif(infoCode == CommonConst.GET_DATA_TIMEOUT){ //WJ\r\n\t\t\t\tmVideoPlayerHander.removeMessages(DISMISS_DIALOG_FOR_TIMEOUT);\r\n\t\t\t\tmVideoPlayerHander.sendEmptyMessageDelayed(DISMISS_DIALOG_FOR_TIMEOUT, 30000);\r\n\t\t\t Log.d(TAG,\"send time out message 30s later\");\r\n\t\t\t}\r\n\t\t\tif (infoCode == CommonConst.media_player_buffering) {\r\n\t\t\t\tmVideoPlayerHander.sendEmptyMessage(SHOW_WAIT_DIALOG);\r\n\t\t\t\tmVideoPlayerHander.removeMessages(DISMISS_DIALOG_FOR_TIMEOUT);\r\n\t\t\t\tmVideoPlayerHander.sendEmptyMessageDelayed(DISMISS_DIALOG_FOR_TIMEOUT, 30000);\r\n\t\t\t Log.d(TAG,\"send time out message 30s later\");\r\n\t\t\t} else if (infoCode == CommonConst.media_player_buffered) {\r\n\t\t\t\tmVideoPlayerHander.removeMessages(DISMISS_DIALOG_FOR_TIMEOUT);\r\n\t\t\t\tLog.d(TAG,\"remove time out message 30s later\");\r\n\t\t\t\tmVideoPlayerHander.sendEmptyMessage(DISSMISS_WAIT_DIALOG);\r\n\r\n\t\t\t} else if (infoCode == CommonConst.media_player_subtitle_update) {\r\n\t\t\t\tString subtitle = mVideoContrl.getCurrentSubtitleText();\r\n\t\t\t\tUtils.printLog(TAG, \"setsubtiteltext = \" + subtitle);\r\n\t\t\t\tmSubtitleTextView.setText(subtitle);\r\n\t\t\t} else if (infoCode == CommonConst.media_player_subtitle_null) {\r\n\t\t\t\tmSubtitleTextView.setText(\"\");\r\n\r\n\t\t\t} else if(infoCode == ErrorConsts.media_player_getsubtitleinfo_mtk){\r\n//\t\t\t\tint subnum = mVideoContrl.getSubtitleNms();\r\n\t\t\t\tLog.d(TAG,\"now get mtk subtitle info get\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\telse if (infoCode == CommonConst.media_player_startplayer_firstframe) {\r\n\t\t\t\tmSurfaceView.setBackgroundColor(getResources().getColor(R.color.transparent_background));\r\n\t\t\t\tif(clienttype.contains(\"CN\")||clienttype.contains(\"HK\")){\r\n\t\t\t//\tif (splitArrayStrings.length<2 || splitArrayStrings[1] == null || splitArrayStrings[1].equals(\"CN\") || splitArrayStrings[1].equals(\"HK\")) // now\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\t\t\t\t\t\t\t\t// is\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\t\t\t\t\t\t\t\t// CN\r\n\t\t\t\t\tLog.d(TAG, \"now is CN method======\");\r\n\r\n\t\t\t\t\tsetTVToFullScreen(); // add here for 小窗口播放问�?20151027\r\n\t\t\t\t\t// setCNScreenMode();\r\n\t\t\t\t\t// refreshPicMode();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tLog.d(TAG, \"now is EM method======\");\r\n\t\t\t\t\tsetTVToFullScreen(); // add here for 小窗口播放问�?20151027\r\n\t\t\t\t\t// setEMScreenMode();\r\n\t\t\t\t\t// refreshPicMode();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (mVideoContrl != null && mVideoContrl.isMediaPlayerPrepared() && mTvmanager != null) {\r\n\t\t\t\t\tint dolbyvision = mVideoContrl.isDolbyVision(mTvmanager);\r\n\t\t\t\t\tint isdts = mVideoContrl.isDTS();\r\n\t\t\t\t\tLog.d(TAG, \"-------------dolby=\"+dolbyvision); //for video\r\n\t\t\t\t\tLog.d(TAG, \"-------------isdts=\"+isdts); //for audio\r\n\t\t\t\t\tif(dolbyvision == CommonConst.VIDEO_DOBBY_VISION){//2 dobbyvision\r\n\t\t\t\t\t\tUtils.printLog(TAG, \"Current audio is dobby vision\");\r\n\t\t\t\t\t\tmVideoPlayerHander.sendEmptyMessage(REFRESH_DOLBY_PLUS_IMAGE);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (isdts == CommonConst.STREAM_DOLBY) {//1 --audio AC3 //open here for 938 96947\r\n\t\t\t\t\t\tUtils.printLog(TAG, \"Current audio is DOLBY\");\r\n\t\t\t\t\t\tmVideoPlayerHander.sendEmptyMessage(REFRESH_DOLBY_IMAGE);\r\n\t\t\t\t\t}else if (isdts == CommonConst.STREAM_DOLBY_PLUS) {//2 audio_EAC3\r\n\t\t\t\t\t\tUtils.printLog(TAG, \"Current audio is DOLBY_plus\");\r\n\t\t\t\t\t\tmVideoPlayerHander.sendEmptyMessage(REFRESH_DOLBY_IMAGE);\r\n\t\t\t\t\t}else if (isdts == CommonConst.STREAM_DTS) {//3\r\n\t\t\t\t\t\tUtils.printLog(TAG, \"Current audio is DTS\");\r\n\t\t\t\t\t\tmVideoPlayerHander.sendEmptyMessage(REFRESH_DTS_IMAGE);\r\n\t\t\t\t\t}else if (isdts == CommonConst.STREAM_DTSHD_MASTER_AUDIO) {//4\r\n\t\t\t\t\t\t\tUtils.printLog(TAG, \"Current audio is DTS_MASTER_AUDIO)\");\r\n\t\t\t\t\t\t\tmVideoPlayerHander.sendEmptyMessage(REFRESH_DTSHD_MASTER_AUDIO_IMAGE);\r\n\t\t\t\t\t}else if (isdts == CommonConst.STREAM_DTS_EXPRESS) {//5\r\n\t\t\t\t\t\t\tUtils.printLog(TAG, \"Current audio is DTS_EXPRESS\");\r\n\t\t\t\t\t\t\tmVideoPlayerHander.sendEmptyMessage(REFRESH_DTS_EXPRESS_IMAGE);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t}\r\n\t\t\t\tplayStatus = PLAYING;\r\n\t\t\t\tdmrSetPlayStatus(playStatus);\r\n\t\t\t\tsendPlayEventBroadCast(mCurrIndex,playStatus);\r\n\r\n\t\t\t}else if(infoCode == CommonConst.unknown_video_format){\t\r\n\t\t\t\tmMediaHanler.sendEmptyMessage(infoCode);\t\r\n\t\t\t}else if(infoCode == CommonConst.unknown_audio_format){\r\n\t\t\t\tmMediaHanler.sendEmptyMessage(infoCode);\r\n\t\t\t}else {\r\n\t\t\t\tif (infoCode == CommonConst.media_player_not_seekable) {\r\n\t\t\t\t\tmIsSeeking = false;\r\n\t\t\t\t\tmVideoPlayerHander.sendEmptyMessage(DISSMISS_WAIT_DIALOG);\r\n\t\t\t\t}\r\n\t\t\t\tmMediaHanler.removeMessages(infoCode);\r\n\t\t\t\tmMediaHanler.sendEmptyMessageDelayed(infoCode, 500);\r\n\t\t\t} \r\n\t\t}",
"@Override\n\tpublic void receiveFrameData(Camera camera, int avChannel, Bitmap bmp) {\n\t}",
"default void uploadVideo() {\r\n\t\tSystem.out.println(\"upload the video\");\r\n\t}",
"public static native int freenect_set_video_mode_proxy(Pointer<libfreenectLibrary.freenect_device > dev, ValuedEnum<libfreenectLibrary.freenect_resolution > res, ValuedEnum<libfreenectLibrary.freenect_video_format > fmt);",
"static /* synthetic */ void m81321a(AppBrandVideoWrapper appBrandVideoWrapper) {\n AppMethodBeat.m2504i(131627);\n if (!C5046bo.isNullOrNil(appBrandVideoWrapper.url) && appBrandVideoWrapper.url.startsWith(\"http\")) {\n try {\n C1936u a = C1897b.m4020a(appBrandVideoWrapper.url, null);\n a.connect();\n int responseCode = a.getResponseCode();\n C4990ab.m7417i(\"MicroMsg.AppBrandVideoWrapper\", \"check video url http ret code: %s\", Integer.valueOf(responseCode));\n if (responseCode >= 400 && appBrandVideoWrapper.hZZ != null) {\n appBrandVideoWrapper.hZZ.mo34677H(\"http error\", -1, responseCode);\n }\n a.connection.disconnect();\n AppMethodBeat.m2505o(131627);\n return;\n } catch (Exception e) {\n C4990ab.printErrStackTrace(\"MicroMsg.AppBrandVideoWrapper\", e, \"check video url error: %s\", e.getMessage());\n if (null != null) {\n null.connection.disconnect();\n AppMethodBeat.m2505o(131627);\n return;\n }\n } catch (Throwable th) {\n if (null != null) {\n null.connection.disconnect();\n }\n AppMethodBeat.m2505o(131627);\n }\n }\n AppMethodBeat.m2505o(131627);\n }",
"public final void mo9618b(C32183a c32183a) {\n AppMethodBeat.m2504i(6293);\n C4990ab.m7416i(\"MicroMsg.JsApiChooseMedia\", \"invoke\");\n this.hwd = (MMActivity) ((C24905d) c32183a.bOZ).mContext;\n this.ujY = c32183a;\n if (this.hwd == null) {\n m34672b(\"fail\", null);\n AppMethodBeat.m2505o(6293);\n return;\n }\n JSONObject jSONObject = c32183a.bPa.bOf;\n C4990ab.m7417i(\"MicroMsg.JsApiChooseMedia\", \" checkPermission checkcamera[%b]\", Boolean.valueOf(C35805b.m58707a(this.hwd, \"android.permission.CAMERA\", C31128d.MIC_AVROUND_BLUR, \"\", \"\")));\n C4990ab.m7417i(\"MicroMsg.JsApiChooseMedia\", \" checkPermission checkMicroPhone[%b]\", Boolean.valueOf(C35805b.m58707a(this.hwd, \"android.permission.RECORD_AUDIO\", 120, \"\", \"\")));\n if (C35805b.m58707a(this.hwd, \"android.permission.RECORD_AUDIO\", 120, \"\", \"\") && r0) {\n String str;\n String nullAsNil = C5046bo.nullAsNil(jSONObject.optString(\"sourceType\"));\n String optString = jSONObject.optString(\"mediaType\", \"\");\n int min = Math.min(jSONObject.optInt(\"maxDuration\", 10), 10);\n final String optString2 = jSONObject.optString(\"camera\", \"\");\n int optInt = jSONObject.optInt(\"count\", 1);\n String optString3 = jSONObject.optString(\"sizeType\", \"\");\n C4990ab.m7417i(\"MicroMsg.JsApiChooseMedia\", \"doChooseMedia sourceType:%s, mediaType:%s, maxDuration:%d, camera:%s, count:%d, sizeType:%s\", nullAsNil, optString, Integer.valueOf(min), optString2, Integer.valueOf(optInt), optString3);\n final Intent intent = new Intent();\n intent.putExtra(\"key_pick_local_pic_count\", optInt);\n if (min <= 0) {\n min = 10;\n }\n intent.putExtra(\"key_pick_local_media_duration\", min);\n intent.putExtra(\"query_media_type\", 3);\n intent.putExtra(\"key_pick_local_media_video_type\", 2);\n intent.putExtra(\"key_pick_local_media_sight_type\", optString);\n intent.putExtra(\"key_pick_local_pic_query_source_type\", (optString3.contains(\"original\") ^ optString3.contains(\"compressed\")) != 0 ? 7 : 8);\n intent.putExtra(\"key_pick_local_pic_send_raw\", Boolean.valueOf(optString3.contains(\"compressed\")));\n if (C5046bo.isNullOrNil(nullAsNil)) {\n str = \"album|camera\";\n } else {\n str = nullAsNil;\n }\n if (str.contains(FFmpegMetadataRetriever.METADATA_KEY_ALBUM) && str.contains(\"camera\")) {\n C46696j c46696j = new C46696j(this.hwd);\n c46696j.mo75009b(null, new C228451(), new C5279d() {\n public final void onMMMenuItemSelected(MenuItem menuItem, int i) {\n AppMethodBeat.m2504i(6289);\n switch (menuItem.getItemId()) {\n case 1:\n C22846h.m34668a(C22846h.this, optString2, intent);\n AppMethodBeat.m2505o(6289);\n return;\n case 2:\n C22846h.m34666a(C22846h.this, intent);\n break;\n }\n AppMethodBeat.m2505o(6289);\n }\n });\n c46696j.mo75012e(new C228483());\n c46696j.cuu();\n AppMethodBeat.m2505o(6293);\n return;\n } else if (str.contains(FFmpegMetadataRetriever.METADATA_KEY_ALBUM)) {\n m34670aA(intent);\n AppMethodBeat.m2505o(6293);\n return;\n } else if (str.contains(\"camera\")) {\n m34671b(optString2, intent);\n AppMethodBeat.m2505o(6293);\n return;\n } else {\n m34672b(\"sourceType_error\", null);\n AppMethodBeat.m2505o(6293);\n return;\n }\n }\n m34672b(\"no_user_permission\", null);\n AppMethodBeat.m2505o(6293);\n }",
"public void onVideoCallStart(int dwUserId, int dwFlags, int dwParam,\r\n\t\t\tString szUserStr) {\n\t\tstopSessionMusic();\r\n\t\tsessionItem = new SessionItem(dwFlags, selfUserId, dwUserId);\r\n\t\tsessionItem.setRoomId(dwParam);\r\n\t\tIntent intent = new Intent();\r\n\t\tintent.setClass(mContext, VideoActivity.class);\r\n\t\tmContext.startActivity(intent);\r\n\t}",
"private void switchVideoCallDefaultSIM(long value) {\n\t\tXlog.i(TAG, \"switchVideoCallDefaultSIM to \"+value);\n\t\t\n\n\t\tif (iTelephony != null) {\n\t\t\t\n\t\t\tSIMInfo siminfo = SIMInfo.getSIMInfoById(getActivity(), value);\n\t\t\tXlog.i(TAG, \"siminfo = \"+siminfo);\t\n\t\t\t\n\t\t\tif(siminfo == null)\n\t\t\t\treturn;\n\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tXlog.i(TAG, \"sim slot = \"+siminfo.mSlot);\n\t\t\t\tif (iTelephony.set3GCapabilitySIM(siminfo.mSlot) == true) {\n\t\t\t\t\tXlog.i(TAG, \"result is true\");\n\t\t\t\t\tmIsModemSwitching = true;\n\t\t\t\t\tif(mStatusBarManager != null) {\n\t\t\t\t\t\tmStatusBarManager.disable(StatusBarManager.DISABLE_EXPAND);\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\tshowDialog(DIALOG_3G_MODEM_SWITCHING);\n\t\t\t\t\tmIsShowDlg = 3;\n\t\t\t\t\tsetCancelable(false);\n\n\t\t\t\t} else {\n\t\t\t\t\tupdateVideoCallDefaultSIM();\n\t\t\t\t}\n\t\t\t} catch (RemoteException e){\n\t\t\t\tXlog.e(TAG, \"iTelephony exception\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t}\n\t}",
"private void showVideoSizeOptionDialog() {\n\t\t// TODO Auto-generated method stub\n\t\tCharSequence title = res.getString(R.string.stream_set_res_vid);\n\n\t\tfinal String[] videoSizeUIString = uiDisplayResource.getVideoSize();\n\t\tif (videoSizeUIString == null) {\n\t\t\tWriteLogToDevice.writeLog(\"[Error] -- SettingView: \",\n\t\t\t\t\t\"videoSizeUIString == null\");\n\t\t\tpreviewHandler\n\t\t\t\t\t.obtainMessage(GlobalApp.MESSAGE_UPDATE_UI_VIDEO_SIZE)\n\t\t\t\t\t.sendToTarget();\n\t\t\treturn;\n\t\t}\n\t\tint length = videoSizeUIString.length;\n\n\t\tint curIdx = 0;\n\t\tUIInfo uiInfo = reflection.refecltFromSDKToUI(\n\t\t\t\tSDKReflectToUI.SETTING_UI_VIDEO_SIZE,\n\t\t\t\tcameraProperties.getCurrentVideoSize());\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tif (videoSizeUIString[i].equals(uiInfo.uiStringInSetting)) {\n\t\t\t\tcurIdx = i;\n\t\t\t}\n\t\t}\n\n\t\tDialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\tfinal String value = (String) reflection.refecltFromUItoSDK(\n\t\t\t\t\t\tUIReflectToSDK.SETTING_SDK_VIDEO_SIZE,\n\t\t\t\t\t\tvideoSizeUIString[arg1]);\n\t\t\t\targ0.dismiss();\n\t\t\t\tif (value.equals(\"2704x1524 15\")\n\t\t\t\t\t\t|| value.equals(\"3840x2160 10\")) {\n\t\t\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(\n\t\t\t\t\t\t\tcontext);\n\t\t\t\t\tbuilder.setMessage(R.string.not_support_preview);\n\t\t\t\t\tbuilder.setNegativeButton(R.string.setting_no,\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t\tpreviewHandler\n\t\t\t\t\t\t\t\t\t\t\t.obtainMessage(\n\t\t\t\t\t\t\t\t\t\t\t\t\tGlobalApp.MESSAGE_UPDATE_UI_VIDEO_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t.sendToTarget();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\tbuilder.setPositiveButton(R.string.setting_yes,\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t\tcameraProperties.setVideoSize(value);\n\t\t\t\t\t\t\t\t\tpreviewHandler\n\t\t\t\t\t\t\t\t\t\t\t.obtainMessage(\n\t\t\t\t\t\t\t\t\t\t\t\t\tGlobalApp.MESSAGE_UPDATE_UI_VIDEO_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t.sendToTarget();\n\t\t\t\t\t\t\t\t\tsettingValueList = getSettingValue();\n\t\t\t\t\t\t\t\t\tif (optionListAdapter == null) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\toptionListAdapter.notifyDataSetChanged();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\tbuilder.create().show();\n\t\t\t\t} else {\n\t\t\t\t\tcameraProperties.setVideoSize(value);\n\t\t\t\t\tpreviewHandler.obtainMessage(\n\t\t\t\t\t\t\tGlobalApp.MESSAGE_UPDATE_UI_VIDEO_SIZE)\n\t\t\t\t\t\t\t.sendToTarget();\n\t\t\t\t\tsettingValueList = getSettingValue();\n\t\t\t\t\tif (optionListAdapter == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\toptionListAdapter.notifyDataSetChanged();\n\t\t\t\t}\n\t\t\t\t/**/\n\t\t\t}\n\t\t};\n\t\tshowOptionDialog(title, videoSizeUIString, curIdx, listener, false);\n\t}",
"public void OnRtcLiveCancelLine(String strPeerId, String strUserName);",
"public interface IPresentationVideo extends IPresentationMaterial {\n\n String getYouTubeId();\n void setYouTubeId(String youTubeId);\n\n boolean isHighlighted();\n void setHighlighted(boolean highlighted);\n\n long getViews();\n void setViews(long views);\n\n Date getDateUploaded();\n void setDateUploaded(Date dateUploaded);\n}",
"public void setVideo(String video) {\n this.video = video;\n }",
"Builder addVideo(VideoObject value);",
"boolean isLocalVideoStreaming(Call call);",
"public void setVideoDisplayFilter(String filtername);",
"public interface VideoConsumer {\n public void onVideoStart(int width, int height) throws IOException;\n\n public int onVideo(byte []data, int format);\n\n public void onVideoStop();\n}",
"private void setupPlayer() {\n\n\n\n Video video = createVideoFromUrl(\"https://sonyhdslive-lh.akamaihd.net/i/LIVELINEARCHANNELWAHSD_2@324771/index_100_av-p.m3u8?sd=10&rebase=on&id=AgC2SfL6YBG2JpMHMVl8BkTC0SpVbBy%2frYkaeUHMRu8inYQ3DHLx4I+pRLNhOPyxeLBTSrs2hL4lZw%3d%3d&hdntl=exp=1496471827~acl=%2fi%2f*~data=hdntl~hmac=808df26a60cb28eff4d28a242510d2dba361d9d8658f1e3bbe3090f85e633632\");\n brightcoveVideoView.add(video);\n brightcoveVideoView.start();\n// ImaManager.setupIma(brightcoveVideoView, googleAds);\n\n }",
"@Override\n public void run() {\n mLogView.logI(\"Remote video starting, uid: \" + (uid & 0xFFFFFFFFL));\n setupRemoteVideo(uid, uid == WINDOW_SHARE_UID ? mRemoteShareContainerSplit : mRemoteCameraContainer);\n }",
"@Override\n public void onSuccess(Location location) {\n createVideo(location);\n }",
"@Override\n public void onSuccess(Location location) {\n createVideo(location);\n }",
"public final void mo61580c(boolean z, String str, int i) {\n boolean z2;\n int i2 = 1;\n AppMethodBeat.m2504i(131589);\n this.iad = i;\n this.bkJ = z;\n PString pString = new PString();\n pString.value = str;\n if (C5046bo.isNullOrNil(pString.value) || pString.value.indexOf(\"file://\") != 0) {\n z2 = false;\n } else {\n pString.value = pString.value.substring(7);\n z2 = true;\n }\n this.iae = z2;\n this.url = pString.value;\n if (this.hZY == null) {\n if (m81322a(this.bkJ, this.url, \"\")) {\n C4990ab.m7417i(\"MicroMsg.AppBrandVideoWrapper\", \"%d use common video view !\", Integer.valueOf(hashCode()));\n this.hZY = aFT();\n } else {\n C4990ab.m7417i(\"MicroMsg.AppBrandVideoWrapper\", \"%d use mm video view !\", Integer.valueOf(hashCode()));\n this.hZY = aFU();\n }\n } else if (m81322a(this.bkJ, this.url, \"\")) {\n if (this.hZY instanceof MMVideoView) {\n this.hZY.stop();\n this.hZY.cpU();\n removeView((View) this.hZY);\n C4990ab.m7417i(\"MicroMsg.AppBrandVideoWrapper\", \"%d use common video view !\", Integer.valueOf(hashCode()));\n this.hZY = aFT();\n } else {\n C4990ab.m7417i(\"MicroMsg.AppBrandVideoWrapper\", \"%d use last common video view !\", Integer.valueOf(hashCode()));\n this.hZY.stop();\n i2 = 0;\n }\n } else if (this.hZY instanceof CommonVideoView) {\n this.hZY.stop();\n this.hZY.cpU();\n removeView((View) this.hZY);\n C4990ab.m7417i(\"MicroMsg.AppBrandVideoWrapper\", \"%d use mm video view !\", Integer.valueOf(hashCode()));\n this.hZY = aFU();\n } else {\n C4990ab.m7417i(\"MicroMsg.AppBrandVideoWrapper\", \"%d use last mm video view !\", Integer.valueOf(hashCode()));\n this.hZY.stop();\n i2 = 0;\n }\n setScaleType(this.iab);\n mo61579as(this.iac);\n setMute(this.fdh);\n if (i2 != 0) {\n setVideoFooterView(this.iaa);\n addView((View) this.hZY, new LayoutParams(-1, -1));\n }\n this.hZY.mo9063c(this.bkJ, this.url, this.iad);\n C7305d.post(new C383972(), \"AppBrandVideo_checkVideoUrl\");\n AppMethodBeat.m2505o(131589);\n }",
"public String getVideoDisplayFilter();",
"@Override\n public void onVideoEnd() {\n super.onVideoEnd();\n }",
"public void enableVideoCapture(boolean enable);",
"@Override\n public void receiveFrameDataForMediaCodec(Camera camera, int avChannel, byte[] buf, int length, int pFrmNo, byte[] pFrmInfoBuf, boolean\n isIframe, int codecId) {\n\n }",
"public interface VideoContract {\n interface P extends VideoControl{\n void onCreate(Context context);\n void setBuilder(VideoBuilder builder);\n void onPause();\n void onResume();\n void onDestroy();\n void playOrPause();\n void onViewDownTouch();\n void stopHideControlRunnable();\n void startHideControlRunnable();\n }\n interface V extends VideoControl{\n void showNotFoundVideo();\n //是否显示播放的按钮,则是在暂停的时候显示\n void setIsShowPlayIcon(boolean isShow);\n void setTimeTotal(int seconds);\n void setBufferingUpdatePosition(int seconds);\n void setTimeCurrent(int seconds);\n void playCompleteCleanFlags();\n void setTitle(String title);\n void showControlView();\n void hideControlView();\n }\n interface VideoControl {\n void seekToSecond(int seconds);\n void pauseVideo();\n void resumeVideo();\n void stopVideo();\n void playVideo(String url);\n }\n}",
"@Override\r\n //TODO add button for location control \r\n public void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState); \r\n \r\n //TODO still hav action VIEW instead of get_rtsp\r\n Log.i(TAG, getIntent().getAction());\r\n if (this.getIntent().getAction().equalsIgnoreCase(ACTION_GET_RTSP) ){\r\n \tLog.i(TAG, \"hav sku : d : ex \" +this.getIntent().getData() +\" \" +this.getIntent().getStringExtra(\"sku\"));\r\n }\r\n //TODO start the player 'audioTrack' to accept bytesBuffr on predicted codec\r\n \r\n RTSPDialog _dial = new RTSPDialog();\r\n\t\tRTSPClient client = new RTSPClient();\r\n\t\tclient.setTransport(new PlainTCP());\r\n\t\tclient.setClientListener(_dial);\r\n\t\ttry {\r\n\t\t\tclient.describe(new URI(_dial.TARGET_URI));\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (URISyntaxException 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\t_dial.resourceList = Collections.synchronizedList(new LinkedList<String>());\r\n\t\t// port is advertised in reply from setup?? why demand 2000\r\n\t\t//port = 2000;\r\n\t\t_dial.port = 49060;\r\n \r\n\r\n \r\n }",
"private void setupRemoteVideo(int uid) {\n int count = mRemoteContainer.getChildCount();\n View view = null;\n for (int i = 0; i < count; i++){\n View v = mRemoteContainer.getChildAt(i);\n if (v.getTag() instanceof Integer && ((int) v.getTag()) == uid) {\n view = v;\n }\n }\n\n if (view != null) {\n return;\n }\n\n mRemoteView = RtcEngine.CreateRendererView(getBaseContext());\n mRemoteContainer.addView(mRemoteView);\n mRtcEngine.setupRemoteVideo(new VideoCanvas(mRemoteView, VideoCanvas.RENDER_MODE_HIDDEN, uid));\n }",
"public void setVideoPayloadTypes(PayloadType[] payloadTypes);",
"public boolean addVideo(Video newVideo)throws NullPointerException;",
"@Override\n\tpublic void afterUpdate(VideoDisplay<MBFImage> display) {\n\n\t}",
"Builder addVideo(String value);",
"public void takevideo() {\nSystem.out.println(\"take a video\");\r\n}"
] |
[
"0.66157794",
"0.61970925",
"0.61487514",
"0.6088574",
"0.6065898",
"0.60593057",
"0.60545",
"0.60409456",
"0.60400486",
"0.60067296",
"0.59028167",
"0.58791846",
"0.5875489",
"0.5875473",
"0.58741564",
"0.5859121",
"0.58480453",
"0.58404",
"0.5806685",
"0.5804457",
"0.5785745",
"0.57730705",
"0.57563066",
"0.57558686",
"0.5750813",
"0.5733848",
"0.57216537",
"0.5707426",
"0.56757694",
"0.567027",
"0.56628627",
"0.5655488",
"0.5654242",
"0.5652682",
"0.5622331",
"0.5613451",
"0.56115896",
"0.5610102",
"0.5603479",
"0.55768514",
"0.5568876",
"0.5564295",
"0.5564295",
"0.55597174",
"0.5553684",
"0.55294025",
"0.55116314",
"0.55001515",
"0.5450014",
"0.54499495",
"0.5436751",
"0.54338145",
"0.54301274",
"0.542753",
"0.5421908",
"0.5421515",
"0.5402167",
"0.54011565",
"0.5400118",
"0.5372867",
"0.5370455",
"0.53680354",
"0.5361386",
"0.53598595",
"0.53548115",
"0.5354116",
"0.53517306",
"0.53458816",
"0.5345303",
"0.53406024",
"0.534023",
"0.5334242",
"0.5331688",
"0.53292644",
"0.5315558",
"0.53150946",
"0.5310203",
"0.530121",
"0.52903783",
"0.52879214",
"0.52720124",
"0.52670383",
"0.52657574",
"0.526554",
"0.52631456",
"0.5255651",
"0.5255651",
"0.52518076",
"0.52496886",
"0.5244987",
"0.52424717",
"0.52400714",
"0.5238849",
"0.5236056",
"0.52358454",
"0.5235678",
"0.52354246",
"0.52277446",
"0.5226463",
"0.52238053"
] |
0.77203727
|
0
|
this method calls the twilio api to send sms to users
|
public String sendSms(String receiverMobNumber, String actualMessage) {
String ack = "failed";
String sid = ExternalProperties.getAppConfig("sms.auth.sid");
String decryptedSid = AES.decrypt(sid);
String token = ExternalProperties.getAppConfig("sms.auth.token");
String decryptedToken = AES.decrypt(token);
Twilio.init(decryptedSid, decryptedToken);
String formattedMessage = "Dear Customer,\n" + actualMessage;
Message twilioMessage = null;
String senderNumber = ExternalProperties.getAppConfig("sms.sender.number");
twilioMessage = Message.creator(new PhoneNumber(receiverMobNumber), // to
new PhoneNumber(senderNumber), // from
formattedMessage).create();
if (twilioMessage != null && null != twilioMessage.getSid())
ack = "ReceivedByTwilio";
return ack;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"SendSMSResponse sendSMSProcess(SendSMSRequest smsRequest) throws Exception;",
"public void sendSms() {\n\n }",
"void requestSendSMSCode(Context context,String phone);",
"@Override\n public void sendSms(String smsBody) {\n }",
"public java.lang.String sendSMS(java.lang.String accessCode, java.lang.String toNumber, java.lang.String body) throws java.rmi.RemoteException;",
"private void sendSMS() {\n String msg = \"\";\n\n switch (s) {\n case \"Accelerometre\":\n msg = acce;\n break;\n case \"Lumiere\":\n msg = light;\n break;\n case \"Proximite\":\n msg = proxi;\n break;\n case \"Gyroscope\":\n msg = gyro;\n break;\n }\n\n String num = numero.getText().toString();\n\n final int PERMISSION_REQUEST_CODE = 1;\n\n if (checkSelfPermission(android.Manifest.permission.SEND_SMS) ==\n PackageManager.PERMISSION_DENIED) {\n Log.d(\" permission \", \" permission denied to SEND_SMS - requesting it \");\n String[] permissions = {android.Manifest.permission.SEND_SMS};\n requestPermissions(permissions, PERMISSION_REQUEST_CODE);\n } else {\n if (num.length() == 10) {\n SmsManager.getDefault().sendTextMessage(num, null, msg, null, null);\n numero.setText(\"\");\n } else {\n //On affiche un petit message d'erreur dans un Toast\n Toast toast = Toast.makeText(CapteurActivity.this, \"Veuilliez écrire un numero a 10 chiffres\", Toast.LENGTH_LONG);\n toast.show();\n\n }\n }\n }",
"public String sendSms() {\r\n\t\ttry {\r\n\t\t\t// Construct data\r\n\t\t\tString user = \"username=\" + \"leonxandercs@gmail.com\";\r\n\t\t\tString hash = \"&hash=\" + \"Leonxandercs3\";\r\n\t\t\tString message = \"&message=\" + \"Prueba de Envio de Sms desde Java...by tu papi Alexander\";\r\n\t\t\tString sender = \"&sender=\" + \"Alexander\t\";\r\n\t\t\tString numbers = \"&numbers=\" + \"51954191116\";\r\n\r\n\t\t\t// Send data\r\n\t\t\tHttpURLConnection conn = (HttpURLConnection) new URL(\"https://api.txtlocal.com/send/?\").openConnection();\r\n\t\t\tString data = user + hash + numbers + message + sender;\r\n\t\t\tconn.setDoOutput(true);\r\n\t\t\tconn.setRequestMethod(\"POST\");\r\n\t\t\tconn.setRequestProperty(\"Content-Length\", Integer.toString(data.length()));\r\n\t\t\tconn.getOutputStream().write(data.getBytes(\"UTF-8\"));\r\n\t\t\tfinal BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));\r\n\t\t\tfinal StringBuffer stringBuffer = new StringBuffer();\r\n\t\t\tString line;\r\n\t\t\twhile ((line = rd.readLine()) != null) {\r\n\t\t\t\tstringBuffer.append(line);\r\n\t\t\t\tSystem.out.println(line);\r\n\t\t\t}\r\n\t\t\trd.close();\r\n\t\t\t\r\n\t\t\treturn stringBuffer.toString();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Error SMS \"+e);\r\n\t\t\treturn \"Error \"+e;\r\n\t\t}\r\n\t}",
"public void sendSMS() {\n //http://www.mkyong.com/android/how-to-send-sms-message-in-android/\n\n Intent intent = getIntent();\n String userName = intent.getStringExtra(LoginActivity.USER_NAME);\n String userDOB = intent.getStringExtra(LoginActivity.DOB);\n String doctorName = intent.getStringExtra(LoginActivity.DOCTOR_NAME);\n String doctorNumber = intent.getStringExtra(LoginActivity.DOCTOR_NUMBER);\n String sms = \"Hello Dr. \" + doctorName + \", your patient \" + userName + \" \" +\n \"whose date of birth is \" + userDOB + \" is suspected of having dementia \" +\n \"based on the anomalous behavior tracked on the Early Detection Dementia App.\";\n\n\n try {\n SmsManager smsManager = SmsManager.getDefault();\n smsManager.sendTextMessage(doctorNumber, null, sms, null, null);\n Toast.makeText(getApplicationContext(), \"SMS Sent!\",\n Toast.LENGTH_LONG).show();\n } catch (Exception e) {\n Toast.makeText(getApplicationContext(),\n \"SMS faild, please try again later!\",\n Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n\n }",
"public void send(View v)\r\n {\r\n \t// get the phone number from the phone number text field\r\n String phoneNumber = phoneTextField.getText().toString();\r\n // get the message from the message text box\r\n String msg = msgTextField.getText().toString(); \r\n\r\n // make sure the fields are not empty\r\n if (phoneNumber.length()>0 && msg.length()>0)\r\n {\r\n \t// call the sms manager\r\n PendingIntent pi = PendingIntent.getActivity(this, 0,\r\n new Intent(this, SendSMSActivity.class), 0);\r\n SmsManager sms = SmsManager.getDefault();\r\n \r\n // this is the function that does all the magic\r\n sms.sendTextMessage(phoneNumber, null, msg, pi, null);\r\n \r\n }\r\n else\r\n {\r\n \t// display message if text fields are empty\r\n Toast.makeText(getBaseContext(),\"All field are required\",Toast.LENGTH_SHORT).show();\r\n }\r\n\r\n }",
"private void sendSms(String strPhoneNumber, String strSms) {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.SEND_SMS) == PackageManager.PERMISSION_GRANTED) {// checking runtime permission for Sending SMS\n try {\n SmsManager smsManager = SmsManager.getDefault();\n smsManager.sendTextMessage(strPhoneNumber, null, strSms, null, null);// this statement send sms(background)\n Toast.makeText(getApplicationContext(), \"Message Sent Successful\", Toast.LENGTH_LONG).show();// Showing Toast after sending SMS\n } catch (Exception e) {\n Toast.makeText(getApplicationContext(), e.getMessage().toString(), Toast.LENGTH_LONG).show();// Showing Toast if SMS sending fail\n e.printStackTrace();\n }\n } else {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[]{Manifest.permission.SEND_SMS}, 10);// Grant runtime permission for sending SMS\n }\n }\n\n }",
"public static void sendSMS(final String api, final String api_key, final String to, final String from, final String message)\n\t{\n\t\tThread thread = new Thread(){\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run(){\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tTwilioRestClient t = new TwilioRestClient(api, api_key, null);\n\t\t\t\t\tMap<String,String> map = new HashMap<String,String>();\n\t\t\t\t\tmap.put(\"To\", TwilioUtil.sanitizeInternationalNumber(to));\n\t\t\t\t\tmap.put(\"From\", TwilioUtil.sanitizeInternationalNumber(from));\n\t\t\t\t\tmap.put(\"Body\", message);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tTwilioRestResponse response = t.request(\"/2010-04-01/Accounts/\" + t.getAccountSid() + \"/SMS/Messages\", \"POST\", map);\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex) { LogUtil.printErrorDetails(logger, ex); }\n\t\t\t}\n\t\t};\n\t\t\n\t\tthread.start();\n\t}",
"public void sms(int nr, String text) {\n Provider.sendeSms (nr, text);\n }",
"public void testSendSmsTest() {\n String from = \"14121234567\";\n String to = \"14121234567\";\n assertThat(messagingClient).isNotNull();\n\n SendMessageResponse messageResponse = messagingClient.sendSms(jwt, to, from, \"This is a test message\");\n assertThat(messageResponse).isNotNull();\n assertThat(messageResponse.getMessageUuid()).isNotBlank();\n }",
"private static void sendSms(Context context, String number, String message)\n {\n \t// Create an intent for sending an sms to a specified number\n \t\tIntent intent = new Intent(Intent.ACTION_SENDTO, Uri.parse(Constants.URI_SMS + number));\n \t\t\n \t\t// Optional, text to send\n \t\tintent.putExtra(Constants.URI_SMS_BODY, message);\n \t\t\n \t\t((Activity) context).finish();\n \t\tcontext.startActivity(intent);\n }",
"public void sendToAdmin(String sessionid, Smsmodel sms, String vals) throws ProtocolException, MalformedURLException, IOException {\r\n String val = null;\r\n System.out.println(\"hello boy \" + vals);\r\n String sender = \"DND_BYPASSGetItDone\";\r\n URL url = new URL(\"http://www.smslive247.com/http/index.aspx?cmd=sendmsg&sessionid=\" + sessionid + \"&message=\" + sms.getVendorMessage() + \"&sender=\" + sender + \"&sendto=\" + vals + \"&msgtype=0\");\r\n //http://www.bulksmslive.com/tools/geturl/Sms.php?username=abc&password=xyz&sender=\"+sender+\"&message=\"+message+\"&flash=0&sendtime=2009-10- 18%2006:30&listname=friends&recipients=\"+recipient; \r\n //URL gims_url = new URL(\"http://smshub.lubredsms.com/hub/xmlsmsapi/send?user=loliks&pass=GJP8wRTs&sender=nairabox&message=Acct%3A5073177777%20Amt%3ANGN1%2C200.00%20CR%20Desc%3ATesting%20alert%20Avail%20Bal%3ANGN%3A1%2C342%2C158.36&mobile=08065711040&flash=0\");\r\n final String USER_AGENT = \"Mozilla/5.0\";\r\n\r\n HttpURLConnection con = (HttpURLConnection) url.openConnection();\r\n con.setRequestMethod(\"GET\");\r\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\r\n int responseCode = con.getResponseCode();\r\n BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\r\n String inputLine;\r\n StringBuffer response = new StringBuffer();\r\n // System.out.println(messageModel.getBody() + \" dude\");\r\n while ((inputLine = in.readLine()) != null) {\r\n response.append(inputLine);\r\n }\r\n in.close();\r\n String responseCod = response.toString();\r\n }",
"private void SendSms()\n {\n try {\n Intent i = new Intent();\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"sms:\" + number[index])));\n startActivity(i);\n Toast.makeText(this, \"Option sms Chosen...\", Toast.LENGTH_LONG).show();\n } catch (Exception e) {\n\n }\n }",
"protected void sendSMS(String number) {\n Uri uri = Uri.parse(\"smsto:\" + number);\n Intent sendIntent = new Intent(Intent.ACTION_SENDTO, uri);\n sendIntent.putExtra(\"sms_body\", \"Denk an deinen TODO\");\n context.startActivity(sendIntent);\n }",
"protected void sendSMSMessage(String phonnumber) {\n String message = null;\r\n if (BookElectionFrgament.BTTtime == true) {\r\n message = \"Hey! The tee time booking is confirmed as follows Date -\" + BookElectionFrgament.formattedDate + \"\\n, Time - \" + BookElectionFrgament.timeselected + \"\\n, No. of Holes - \" + BookElectionFrgament.hole + \"\\nSee you at Karma Lakelands! \";\r\n } else if (Bookingdriverange.BDRTime == true) {\r\n message = \"Hey! The driving range booking is confirmed as follows Date -\" + Bookingdriverange.formattedDate + \"\\n, Time - \" + Bookingdriverange.timeselected + \"\\n, Balls - \" + Bookingdriverange.bucketselected + \"\\nSee you at Karma Lakelands! \";\r\n\r\n }\r\n\r\n try {\r\n SmsManager smsManager = SmsManager.getDefault();\r\n\r\n smsManager.sendTextMessage(phonnumber, null, message, null, null);\r\n\r\n // Customdialog messagedialog= new Customdialog(SMS1.this);\r\n // messagedialog.show();\r\n\r\n Toast.makeText(getApplicationContext(), \"Your message has been sent successfully!\", Toast.LENGTH_SHORT).show();\r\n } catch (Exception e) {\r\n Toast.makeText(getApplicationContext(), \"SMS failed, please try again.\", Toast.LENGTH_SHORT).show();\r\n e.printStackTrace();\r\n }\r\n }",
"public static ApiResponse sendSms(String host, String accessToken, String tel, String message) throws ApiRequestException {\n String url = host + SMS_MESSAGING_OUTBOX;\n String[] telArray = tel.split(\",\");\n JSONObject object = new JSONObject();\n\n try {\n if (telArray.length == 1) {\n object.put(\"Address\", \"tel:\" + telArray[0]);\n } else {\n for (int i = 0; i < telArray.length; i++) {\n telArray[i] = \"tel:\" + telArray[i];\n }\n object.put(\"Address\", telArray);\n }\n object.put(\"Message\", message);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n \n HttpPost post = new HttpPost(url);\n post.setHeader(\"Authorization\", \"Bearer \"+accessToken);\n \n\t log.info(\"ServiceProviderSMS :: sendSms POST to url: \" + url);\n\t log.info(\"ServiceProviderSMS :: sendSms Request: \" + object);\n\t \n ApiResponse response = ApiRequestManager.postJSON(object, post);\n\n\t log.info(\"ServiceProviderSMS :: sendSms Response: \" + response.toJson());\n\n return response;\n }",
"SendSmsResponse sendSms(String templateId, String phoneNumber, Map<String, String> personalisation, String reference) throws NotificationClientException;",
"@Override\n public String sendSms(String phone, String smsContext) {\n String extno = \"\";\n StringBuilder param = new StringBuilder();\n param.append(\"&account=\" + account);\n param.append(\"&pswd=\" + password);\n param.append(\"&mobile=\" + phone);\n try {\n param.append(\"&msg=\" + URLEncoder.encode(smsContext, \"utf-8\"));\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n return \"\";\n }\n param.append(\"&needstatus=\" + false);\n param.append(\"&extno=\" + extno);\n\n try {\n return SmsUtil.sendSms(url, param.toString());\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }",
"@Override\n public void send() {\n System.out.println(\"send message by SMS\");\n }",
"public void sendSMS(String incomingNumber, Context context){\n\t\tString t = getContactText(incomingNumber);\n\t\tif(t != null){\n\t\t\tLog.d(TAG,\"Contact Specific\");\n\t\t\tsend(incomingNumber,context,t);\n\t\t}\n\t\telse{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// If not\n\t\t\tLog.d(TAG,\"in sendSMS non Contact Specific\");\n\t\t\tsend(incomingNumber,context);\n\t\t}\n\t}",
"public void onClick(View v) {\n String voipprovider = preferences.getString(\"voipprovider\", \"n/a\");\n String username = preferences.getString(\"username\", \"n/a\");\n String password = preferences.getString(\"password\", \"n/a\");\n if(voipprovider == \"n/a\" || username == \"n/a\" || password == \"n/a\") {\n /* On any Error we want to display it. */\n Toast.makeText(SendVoipSMS.this, \"Not enough credentials provided, please press the menu button and enter the required info\", \n Toast.LENGTH_LONG).show();\t\t\t\t\t\n return;\n }\n EditText text = (EditText) findViewById(R.id.ToNumberText);\n String toNumber = text.getText().toString();\n String fromNumber = preferences.getString(\"number\", \"\");\n text = (EditText) findViewById(R.id.SMSText);\n String smsText = text.getText().toString();\n //Toast.makeText(\n //\t\tSendVoipSMS.this,\n //\t\t\"You entered user: \" + username + \" and password: \"\n //\t\t+ password + \" voip: \" + voipprovider + \" text: \" + smsText, Toast.LENGTH_LONG).show();\n\n String postURL = \"https://www.\" + voipprovider + \".com/myaccount/sendsms.php\";\n Integer nSend = 0;\n\t\t\t\t\n for (String token: StringUtility.splitEqually(smsText, 159)) {\n Log.e(\"Log\", token);\n try {\n // *** BELOW IS FAILSAFE BETTER VERSION UNCOMMENT IF OTHER FAILS***\n //SchemeRegistry schemeRegistry = new SchemeRegistry();\n //schemeRegistry.register(new Scheme(\"http\", PlainSocketFactory.getSocketFactory(), 80));\n //schemeRegistry.register(new Scheme(\"https\", new EasySSLSocketFactory(), 443));\n\t\t\t\t\t\t \n //HttpParams params = new BasicHttpParams();\n //params.setParameter(ConnManagerPNames.MAX_TOTAL_CONNECTIONS, 30);\n //params.setParameter(ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE, new ConnPerRouteBean(30));\n //params.setParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, false);\n //HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);\n\t\t\t\t\t\t \n //ClientConnectionManager cm = new SingleClientConnManager(params, schemeRegistry);\n //DefaultHttpClient httpClient = new DefaultHttpClient(cm, params);\n // ***FAILSAFE CONNECTION ENDS***\n\t\t\t\t\t\t\n // create a secure ssl connection that accepts all certificates (how secure is that :))\n HostnameVerifier hostnameVerifier = org.apache.http.conn.ssl.SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER;\n DefaultHttpClient client = new DefaultHttpClient();\n SchemeRegistry registry = new SchemeRegistry();\n SSLSocketFactory socketFactory = SSLSocketFactory.getSocketFactory();\n socketFactory.setHostnameVerifier((X509HostnameVerifier) hostnameVerifier);\n registry.register(new Scheme(\"https\", socketFactory, 443));\n // single thread for now, no need for thread safe conn manager\n //ThreadSafeClientConnManager mgr = new ThreadSafeClientConnManager (client.getParams(), registry);\n SingleClientConnManager mgr = new SingleClientConnManager(client.getParams(), registry);\n // the actual client\n DefaultHttpClient httpClient = new DefaultHttpClient(mgr, client.getParams());\n // Set verifier \n HttpsURLConnection.setDefaultHostnameVerifier(hostnameVerifier);\n\n if(token.charAt(token.length()-1) == ' ') {\n token = token.substring(0, token.length()-1);\n }\n\t\t\t\t\t\t\n // ***HTTP POST STOPPED WORKING - COMMENTED OUT***\n // setup the HTTP POST Request\n //HttpPost post = new HttpPost(postURL);\n //List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(5);\n //nameValuePairs.add(new BasicNameValuePair(\"username\", username));\n //nameValuePairs.add(new BasicNameValuePair(\"password\", password));\n //nameValuePairs.add(new BasicNameValuePair(\"to\", toNumber));\n //nameValuePairs.add(new BasicNameValuePair(\"from\", fromNumber));\n //nameValuePairs.add(new BasicNameValuePair(\"text\", token));\n //post.setEntity(new UrlEncodedFormEntity(nameValuePairs));\n // ***HTTP POST ENDS HERE ***\n\n String strURL = postURL + \"?username=\"+username+\"&password=\"+password+\"&to=\"+toNumber+\"&from=\"+fromNumber+\"&text=\"+token;\n Log.e(\"Log\",strURL +\" \" + token.length());\n HttpGet httpGet = new HttpGet(strURL);\n // *** Tried to do the HttpGet with a Uri Builder but consumed more memory \n // and decided to keep the above 3 line solution***\n //HttpGet httpGet = new HttpGet();\n //Uri uri = new Uri.Builder()\n //.scheme(\"https\")\n //.authority(\"www.\"+ voipprovider+\".com\")\n //.path(\"myaccount/sendsms.php\")\n //.appendQueryParameter(\"username\", username)\n //.appendQueryParameter(\"password\", password)\n //.appendQueryParameter(\"to\", toNumber)\n //.appendQueryParameter(\"from\", fromNumber)\n //.appendQueryParameter(\"text\", token)\n //.build();\n //httpGet.setURI(new URI(uri.toString()));\n //Log.e(\"Log\",uri.toString() +\" \" + token.length());\n // *** Uri Builder ends here ***\t\t\t\n\n // Execute the request\n HttpResponse response = httpClient.execute(httpGet);\n HttpEntity entity = response.getEntity();\n // get the response string\n String responseText = EntityUtils.toString(entity);\n\n //Toast.makeText(SendVoipSMS.this, \"Result\" + response.getStatusLine(), Toast.LENGTH_LONG).show();\n Log.e(\"Error\", \"Result\" + responseText);\n\n nSend++;\n } catch (Exception e) {\n Log.e(\"log_tag\", \"Error in http connection, did you enter the correct user/password ?. error trace: \"+e.toString());\n e.printStackTrace ();\t\t \t\n /* On any Error we want to display it. */\n Toast.makeText(SendVoipSMS.this, \"Error in sending Voip SMS\" + e.getStackTrace(), Toast.LENGTH_LONG).show();\n return;\n }\n\n }\n // Notify the user that the SMS has been sent successfully along with the actual number of SMSs sent\n Toast.makeText(SendVoipSMS.this, nSend.toString() + \" SMS send successfully!\", Toast.LENGTH_LONG).show();\n //Toast.makeText(\n //\t\tSendVoipSMS.this,\n //\t\t\"Server responed with \" + myString, Toast.LENGTH_LONG).show();\t\t\t\t\n }",
"public String sendPushSMS(String username,String password,String message,String mobiles ,String smsId,String vendorID,String sender, String flash, String scheduleDate, String scheduleTime ){\n\t\tString user = \"mahaforest\";\n\t\tString pass = \"1327e811606505f48ce612a22b2979e6\";\n\t\tString route = \"4\";;\n\t\tString unicode = \"0\";\n\n\t\tString parameter = \"authkey=\" +vendorID+ \"mobiles=\"+ mobiles + \"&message=\" + message + \"&sender=\"\n\t\t\t\t+ sender + \"&route=\"+route+\"unicode=\"+unicode;\n\t\n\n\t\tbyte[] postData = parameter.getBytes(StandardCharsets.UTF_8);\n\t\tint postDataLength = postData.length;\n\n\t\tBufferedReader rd = null;\n\t\tStringBuilder sb = null;\n\t\tString line = null;\n\n\t\tString MainURL = \"https://control.msg91.com/api/sendhttp.php\";\n\n\t\tString FinalUrl = MainURL + parameter;\n\n\t\tURL url;\n\t\ttry {\n\t\t\t// url = new URL(\n\t\t\t// \"https://control.msg91.com/api/sendhttp.php?authkey=85509AJLB0vH7J55642514&mobiles=8149799364&message=Welcome to MahaOnline SMS Gateway&sender=MAHGOV&route=4&unicode=0\");\n\t\t\turl = new URL(MainURL);\n\n\t\t\tHttpURLConnection http = (HttpURLConnection) url\n\t\t\t\t\t.openConnection();\n\t\t\thttp.setDoOutput(true);\n\t\t\thttp.setInstanceFollowRedirects(false);\n\t\t\thttp.setRequestMethod(\"POST\");\n\t\t\thttp.setRequestProperty(\"Content-Type\",\n\t\t\t\t\t\"application/x-www-form-urlencoded\");\n\t\t\thttp.setRequestProperty(\"Content-Length\",\n\t\t\t\t\tInteger.toString(postDataLength));\n\t\t\thttp.setRequestProperty(\"charset\", \"UTF8\");\n\t\t\thttp.setUseCaches(false);\n\n\t\t\tDataOutputStream wr = new DataOutputStream(\n\t\t\t\t\thttp.getOutputStream());\n\t\t\twr.write(postData);\n\t\t\twr.flush();\n\t\t\twr.close();\n\t\t\t// http.connect();\n\n\t\t\tint statusCode;\n\t\t\tstatusCode = http.getResponseCode();\n\t\t\trd = new BufferedReader(new InputStreamReader(\n\t\t\t\t\thttp.getInputStream(), \"UTF8\"));\n\t\t\tsb = new StringBuilder();\n\n\t\t\tsb.append(\"{ data :\");\n\t\t\twhile ((line = rd.readLine()) != null) {\n\t\t\t\tsb.append(line + '\\n');\n\t\t\t}\n\n\t\t\tsb.append(\"}\");\n\t\t\trd.close();\n\n\t\t\tString jsonResponse = sb.toString();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"RunJob Exception \" + e.toString());\n\t\t}\n\t\t\n\t\t\n\t\treturn null;\n\t}",
"public void sendMessage() {\n //Get data from preferences\n SharedPreferences SP = PreferenceManager.getDefaultSharedPreferences(DashItApplication.getAppContext());\n if (SP.getBoolean(\"sendSms\", false)) {\n String myName = SP.getString(\"myName\", \"NA\");\n String myPhoneNumber = SP.getString(\"myPhoneNumber\", \"NA\");\n String emergencyContact = SP.getString(\"contact\", \"NA\");\n String location = \"http://maps.google.com/?q=\";\n location += accidentLocation;\n String message = getString(R.string.sms_message_contact) + myName + getString(R.string.sms_message_help) +\n getString(R.string.sms_message_your_phone_number) + myPhoneNumber + \",\" +\n getString(R.string.sms_message_location) + location;\n String hashMessage = \"SHA-256 Hash:\" + hashFromFilesAndLocation;\n //Send SMS\n if (emergencyContact.length() > 2 && !emergencyContact.equalsIgnoreCase(\"NA\")) {\n try {\n SmsManager smsManager = SmsManager.getDefault();\n smsManager.sendTextMessage(emergencyContact, null, message, null, null);\n smsManager.sendTextMessage(emergencyContact, null, hashMessage, null, null);\n handler.post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(DashItApplication.getAppContext(), R.string.instruction_sms_sent_successful, Toast.LENGTH_LONG).show();\n }\n });\n } catch (Exception e) {\n handler.post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(DashItApplication.getAppContext(), R.string.instruction_sms_sent_unsuccessful, Toast.LENGTH_LONG).show();\n }\n });\n e.printStackTrace();\n }\n }\n }\n }",
"@Override\n public void onClick(View v) {\n if (v == mBtnSendSms) {\n String strMobileNumber = mEditTextMobileNumber.getText().toString().trim();\n String strSmeBody = mEditTextSmsBody.getText().toString().trim();\n sendSms(strMobileNumber, strSmeBody);// Send SMS Method\n }\n\n }",
"public static void enviarSMS(Activity actividad, String texto, String numerodestino) {\n Uri uri = Uri.parse(\"smsto:\" + numerodestino);\n Intent i = new Intent(Intent.ACTION_SENDTO, uri);\n i.putExtra(\"sms_body\", texto);\n //i.setPackage(\"com.whatsapp\");\n actividad.startActivity(i);\n }",
"public OtherResponse sendMT(String mobilenumber, String message, String shortcode, int carrierid, int campaignid, Date sendat, String msgfxn, int priority, String fteu, float tariff) throws PrepException, SQLException, JAXBException, SAXException, MalformedURLException, IOException{\n String response;\n\n if(canSendMT(mobilenumber)){\n //System.out.print(\"User with mobile number:\"+mobilenumber+\" exist!\");\n\n String mt_request_xml = createXml(mobilenumber, message, shortcode, carrierid, campaignid, sendat, msgfxn, priority, fteu, tariff);\n response = postMT(mt_request_xml);\n\n com.novartis.xmlbinding.mt_response.Response res = getResponse(response);\n\n\n\n List<String> statusmsg = getStatusmessage(response);\n\n return new OtherResponse(res.getStatus(), statusmsg);\n }\n else{//if user not registerd or opted-in send back message on how to register for GetOnTrack\n String registerMsg = \"Novartis Pharmaceuticals Corp: You have to register for the GetOnTrack BP Tracker to use the service. Didn't mean to? Call 877-577-7726 for more information\";\n String mt_request_xml = createXml(mobilenumber, registerMsg, shortcode, carrierid, campaignid, sendat, msgfxn, priority, fteu, tariff);\n response = postMT(mt_request_xml);\n com.novartis.xmlbinding.mt_response.Response res = getResponse(response);\n //com.novartis.xmlbinding.mt_response.Response res = getResponse(\"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?><response><mts><mt><mobilenumber>\"+mobilenumber+\"</mobilenumber></mt></mts><status>FAIL</status><statusmessage><exceptions><exception>User not opted in for SMS</exception></exceptions></statusmessage></response>\");\n\n\n //System.out.print(\"User with mobile number:\"+mobilenumber+\" does not exist!\");\n List<String> statusmsg = getStatusmessage(response);\n\n return new OtherResponse(res.getStatus(), statusmsg);\n }\n\n }",
"public void sendSmsMessage(String phoneNumber, String message)\n throws Exception {\n }",
"@Override\n\tpublic void sendSMS() {\n\t\tSystem.out.println(\"Logic B\" + \" Send By: \" + getVendorName());\n\t}",
"public void sendSmsMessage(String message)\n throws Exception {\n }",
"public void sendmessage(String recipients,String message){\n String username = \"tolclin\";\n String apiKey = \"a134b86cef192b3e597957d96fe486f6dd887ba4592ecf31ed737c2f1407b348\";\n // Specify the numbers that you want to send to in a comma-separated list\n // Please ensure you include the country code (+254 for Kenya in this case)\n //String recipients = \"+254723095840\";--------------------was active\n // And of course we want our recipients to know what we really do\n //String message = \"We are tolclin IT. We code all day and sleep all night\";--------------was active\n // Create a new instance of our awesome gateway class\n AfricasTalkingGateway gateway = new AfricasTalkingGateway(username, apiKey);\n /*************************************************************************************\n NOTE: If connecting to the sandbox:\n 1. Use \"sandbox\" as the username\n 2. Use the apiKey generated from your sandbox application\n https://account.africastalking.com/apps/sandbox/settings/key\n 3. Add the \"sandbox\" flag to the constructor\n AfricasTalkingGateway gateway = new AfricasTalkingGateway(username, apiKey, \"sandbox\");\n **************************************************************************************/\n // Thats it, hit send and we'll take care of the rest. Any errors will\n // be captured in the Exception class below\n try {\n JSONArray results = gateway.sendMessage(recipients, message);\n //JOptionPane.showMessageDialog(null, \"Message Sent Successfully...\");\n// for( int i = 0; i < results.length(); ++i ) {\n// JSONObject result = results.getJSONObject(i);\n// //System.out.print(result.getString(\"status\") + \",\"); // status is either \"Success\" or \"error message\"\n// System.out.print(result.getString(\"statusCode\") + \",\");\n// System.out.print(result.getString(\"number\") + \",\");\n// System.out.print(result.getString(\"messageId\") + \",\");\n// System.out.println(result.getString(\"cost\"));\n// \n// }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null,\"Encountered an error while sending. Check on your internet connection...\");\n }\n }",
"@Override\r\n\t public void onClick(View arg0) {\n\t screenDialog.dismiss();\r\n\t String sms = messageText.getText().toString();\r\n\t \ttry {\r\n\t\t\t\tSmsManager smsManager = SmsManager.getDefault();\r\n\t\t\t\tsmsManager.sendTextMessage(phone, null, sms, null, null);\r\n\t\t\t\tToast.makeText(getApplicationContext(), \"SMS Sent!\",\r\n\t\t\t\t\t\tToast.LENGTH_LONG).show();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\t\"SMS faild, please try again later!\",\r\n\t\t\t\t\t\tToast.LENGTH_LONG).show();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t }",
"public void sendMail() {\n String email = emailID.getText().toString();\n String subject = \"BlueBucket One-Time OTP\";\n otp=generateOTP();\n String message = \"\"+otp;\n\n //Creating SendMail object\n SendMail sm = new SendMail(this, email, subject, message);\n\n //Executing sendmail to send email\n sm.execute();\n }",
"private void sendSMS(String phoneNumber, String message) {\n ArrayList<PendingIntent> sentPendingIntents = new ArrayList<PendingIntent>();\n ArrayList<PendingIntent> deliveredPendingIntents = new ArrayList<PendingIntent>();\n PendingIntent sentPI = PendingIntent.getBroadcast(this, 0,\n new Intent(this, SmsSentReceiver.class), 0);\n PendingIntent deliveredPI = PendingIntent.getBroadcast(this, 0,\n new Intent(this, SmsDeliveredReceiver.class), 0);\n try {\n SmsManager sms = SmsManager.getDefault();\n ArrayList<String> mSMSMessage = sms.divideMessage(message);\n for (int i = 0; i < mSMSMessage.size(); i++) {\n sentPendingIntents.add(i, sentPI);\n deliveredPendingIntents.add(i, deliveredPI);\n }\n sms.sendMultipartTextMessage(phoneNumber, null, mSMSMessage,\n sentPendingIntents, deliveredPendingIntents);\n\n } catch (Exception e) {\n Snackbar.make(fab, \"SMS sending failed...\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n e.printStackTrace();\n }\n\n }",
"@Override\r\n\tpublic void mesage() {\n\t\tSystem.out.println(\"通过语音发短信\");\r\n\t}",
"private void showSendSMSActivity() {\n Uri uri = getIntent().getData();\n if (uri == null) {\n return;\n }\n\n // get phone number where to send the SMS\n String ssp = uri.getSchemeSpecificPart();\n String number = ContactsAccessHelper.normalizePhoneNumber(ssp);\n if (number.isEmpty()) {\n return;\n }\n\n // find person by phone number in contacts\n String person = null;\n ContactsAccessHelper db = ContactsAccessHelper.getInstance(this);\n Contact contact = db.getContact(this, number);\n if (contact != null) {\n person = contact.name;\n }\n\n // get SMS thread id by phone number\n int threadId = db.getSMSThreadIdByNumber(this, number);\n if (threadId >= 0) {\n // get the count of unread sms of the thread\n int unreadCount = db.getSMSMessagesUnreadCountByThreadId(this, threadId);\n\n // open thread's SMS conversation activity\n Bundle arguments = new Bundle();\n arguments.putInt(FragmentArguments.THREAD_ID, threadId);\n arguments.putInt(FragmentArguments.UNREAD_COUNT, unreadCount);\n arguments.putString(FragmentArguments.CONTACT_NUMBER, number);\n String title = (person != null ? person : number);\n CustomFragmentActivity.show(this, title, SMSConversationFragment.class, arguments);\n }\n\n // open SMS sending activity\n Bundle arguments = new Bundle();\n arguments.putString(FragmentArguments.CONTACT_NAME, person);\n arguments.putString(FragmentArguments.CONTACT_NUMBER, number);\n String title = getString(R.string.New_message);\n CustomFragmentActivity.show(this, title, SMSSendFragment.class, arguments);\n }",
"private void sendSMS(String msg) {\n SmsManager smsManager = SmsManager.getDefault();\n for (String destinationAddress : destinationAddresses) {\n smsManager.sendTextMessage(\n destinationAddress,\n null,\n msg,\n null,\n null\n );\n }\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 }",
"private void shareSMS() {\r\n EventSharer.shareSMS(this, event.uid);\r\n }",
"@POST(\"chat.postMessage\")\n Call<SendMessageResponse> sendMessage(@Query(\"token\") String token, @Query(\"channel\") String channel, @Query(\"as_user\") String asUser, @Query(\"text\") String messageText);",
"public String\tsendSingleSMS(\n\t\t\t\tString\tuserId,\n\t\t\t\tString\tpassword,\n\t\t\t\tString\tmobilePhoneNo,\n\t\t\t\tString\tmessage,\n\t\t\t\tString\tlocale,\n\t\t\t\tString\tscheduleDate,\n\t\t\t\tString\tuserName\n\t\t\t)\n\t{\n\t\tString\tresult \t=\tnull;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tMessageSoap\t\tmessageSoap\t\t=\tnew MessageSoap();\n\t\t\tSendSMS1Soap\tsendSMS1Soap\t=\tmessageSoap.SendSingleSMS();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tresult\t\t\t=\tsendSMS1Soap.SendSingleSMS(userId, password, mobilePhoneNo, message, locale, scheduleDate, userName);\n\t\t}\n\t\tcatch(Exception ex)\n\t\t{\n\t\t\tlogger.error(\"Message sending failure : \"+ex.getMessage());\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"private void sendSms(SmsTracker tracker) {\n HashMap map = tracker.mData;\n\n byte smsc[] = (byte[]) map.get(\"smsc\");\n byte pdu[] = (byte[]) map.get(\"pdu\");\n\n Message reply = obtainMessage(EVENT_SEND_SMS_COMPLETE, tracker);\n mCm.sendSMS(SimUtils.bytesToHexString(smsc),\n SimUtils.bytesToHexString(pdu), reply);\n }",
"@Override\n public void onClick(View arg0) {\n\n String messageToSend = \"Thank you for shopping. Your order will be delivered soon.\";\n String number = \"6476710881\";\n SmsManager.getDefault().sendTextMessage(number, null, messageToSend, null,null);\n Toast.makeText(getApplicationContext(), \"Your Payment is done\", Toast.LENGTH_LONG).show();\n\n Intent myIntent = new Intent(getApplicationContext(),LoginActivity.class);\n startActivity(myIntent);\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 }",
"public void smsSendMessage(String phoneNumber, String messageContent) {\n try {\n //EditText editText = (EditText) findViewById(R.id.editText_main);\n // Set the destination phone number to the string in editText.\n String destinationAddress = \"07956765611\";\n // Find the sms_message view.\n //EditText smsEditText = (EditText) findViewById(R.id.sms_message);\n // Get the text of the SMS message.\n String smsMessage = \"Hi Kobi\";\n // Set the service center address if needed, otherwise null.\n String scAddress = null;\n // Set pending intents to broadcast\n // when message sent and when delivered, or set to null.\n PendingIntent sentIntent = null, deliveryIntent = null;\n // Use SmsManager.\n SmsManager smsManager = SmsManager.getDefault();\n\n smsManager.sendTextMessage\n (destinationAddress, scAddress, smsMessage,\n sentIntent, deliveryIntent);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public interface SmsClient {\n\n\t/**\n\t * Delivers a text-sms-request to the websms-api.\n\t * \n\t * @param textMessage\n\t * A derived message-object which holds every possible parameters\n\t * needed for sending an text-sms.\n\t * @param maxSmsPerMessage\n\t * Defines an upper-limit of how many messages should be sent.\n\t * @param test\n\t * True if the use of the function is for testing-purposes, and\n\t * no real-sms should be send.\n\t * @return The status-code for successful requests.\n\t * @throws ApiException\n\t * Returns an exception with a status-code, that was thrown at\n\t * api-level.\n\t * @throws ParameterValidationException\n\t * The parameters which where provided are invalid. No request\n\t * was made to the server.\n\t * @throws AuthorizationFailedException\n\t * Is thrown when the authorization by username/password failed.\n\t * @throws HttpConnectionException\n\t * Is thrown when a problem occurs while connecting to the api.\n\t */\n\tpublic int send(TextMessage textMessage, int maxSmsPerMessage, boolean test)\n\t\t\tthrows ApiException, ParameterValidationException,\n\t\t\tAuthorizationFailedException, HttpConnectionException;\n\n\t/**\n\t * Delivers a sms-request with binary-content to the websms-api.\n\t * \n\t * @param binaryMessage\n\t * A derived message-object which holds every possible parameters\n\t * needed for sending an binary-sms.\n\t * @param test\n\t * True if the use of the function is for testing-purposes, and\n\t * no real-sms should be send.\n\t * \n\t * @return The status-code for successful requests.\n\t * @throws ApiException\n\t * Returns an exception with a status-code, that was thrown at\n\t * api-level.\n\t * @throws ParameterValidationException\n\t * The parameters which where provided are invalid. No request\n\t * was made to the server.\n\t * @throws AuthorizationFailedException\n\t * Is thrown when the authorization by username/passsword\n\t * failed.\n\t * @throws HttpConnectionException\n\t * Is thrown when connection is refused or a timeout occured.\n\t */\n\tpublic int send(BinaryMessage binaryMessage, boolean test)\n\t\t\tthrows ApiException, ParameterValidationException,\n\t\t\tAuthorizationFailedException, HttpConnectionException;\n\n}",
"com.polytech.spik.protocol.SpikMessages.Sms getSms();",
"public void onClick(View v)\r\n {\n sendSMS(textView.getText().toString());\r\n }",
"public void sendMessage(String phoneNumber, String message) {\n\n if(message.isEmpty() || message.replace(\" \",\"\").isEmpty()){\n Toast.makeText(getApplicationContext(), \"Empty SMS!\",\n Toast.LENGTH_LONG).show();\n return;\n }\n\n if(phoneNumber != null) {\n PendingIntent piSent = PendingIntent.getBroadcast(getApplicationContext(), 0, new Intent(SENT), 0);\n PendingIntent piDelivered = PendingIntent.getBroadcast(getApplicationContext(), 0, new Intent(DELIVERED), 0);\n SmsManager smsManager = SmsManager.getDefault();\n\n int length = message.length();\n try {\n if (length > MAX_SMS_MESSAGE_LENGTH) {\n ArrayList<String> messagelist = smsManager.divideMessage(message);\n smsManager.sendMultipartTextMessage(phoneNumber, null, messagelist, null, null);\n Toast.makeText(getApplicationContext(), \"More than one SMS sent.\",\n Toast.LENGTH_LONG).show();\n } else {\n smsManager.sendTextMessage(phoneNumber, null, message, piSent, piDelivered);\n Toast.makeText(getApplicationContext(), \"SMS sent.\",\n Toast.LENGTH_LONG).show();\n }\n addSentMessageToDB(phoneNumber,message);\n addSentMessageToThread(message);\n } catch (Exception e) {\n Toast.makeText(getApplicationContext(),\n \"SMS failed, please try again.\",\n Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n }\n else{\n Toast.makeText(getApplicationContext(),\n \"The contact does not have a phone number\",\n Toast.LENGTH_LONG).show();\n }\n }",
"private void smsRetrieverCall() {\n SmsRetrieverClient client = SmsRetriever.getClient(this /* context */);\n\n // Starts SmsRetriever, which waits for ONE matching SMS message until timeout\n // (5 minutes). The matching SMS message will be sent via a Broadcast Intent with\n // action SmsRetriever#SMS_RETRIEVED_ACTION.\n Task<Void> task = client.startSmsRetriever();\n\n // Listen for success/failure of the start Task. If in a background thread, this\n // can be made blocking using Tasks.await(task, [timeout]);\n task.addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n // Successfully started retriever, expect broadcast intent\n Log.d(\"TAG\", \"smsRetrieverCall SUCCESS\");\n }\n });\n\n task.addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Failed to start retriever, inspect Exception for more details\n // ...\n Log.d(\"TAG\", \"smsRetrieverCall FAIL\");\n result.setText(\"Retriever start Fail\");\n }\n });\n }",
"public interface SendSmsService {\n public String sendSms(String phoneNum);\n public boolean checkSmsCode(String phoneNum, String smsCode);\n}",
"public String userSendMessage(){\r\n if( porukeBeanLocal.userSendMessage(userName, email, question)){\r\n return \"Success\";\r\n }\r\n return \"Failure\";\r\n }",
"public void sendOTP(String username){\n }",
"@Override\n\tpublic boolean insertSendSms(String userName, String pwd, String mobile,\n\t\t\tString url) {\n\t\treturn false;\n\t}",
"public void sendSMS (String mobile, String code) throws Exception {\n com.aliyun.dysmsapi20170525.Client client = SMSUtils.createClient(aliyunResource.getAccessKeyID(), aliyunResource.getAccessKeySecret());\n SendSmsRequest sendSmsRequest = new SendSmsRequest()\n .setPhoneNumbers(mobile)\n .setSignName(\"iNews\")\n .setTemplateCode(\"SMS_216427312\")\n .setTemplateParam(\"{\\\"code\\\": \\\"\" + code + \"\\\"}\");\n // 复制代码运行请自行打印 API 的返回值\n client.sendSms(sendSmsRequest);\n }",
"@Test\r\n public void testSendWelcomeSignupMessageSMS_ExistingUser() {\n String mobile = \"9908599937\";//\"9887589396\";\r\n boolean smsSendEnabled= false;\r\n //Commuter commuter = commuterService.getCommuterById(commuter_id);\r\n Commuter commuter = commuterService.getCommuterByMobile(mobile);\r\n boolean userRegistrationExist = true;\r\n boolean status = commuterService.sendWelcomeSignupMessageSMS(commuter, -1, userRegistrationExist, smsSendEnabled);\r\n if (status) {\r\n System.out.println(\"status:\" + status);\r\n }\r\n }",
"@Override\n public void sendMessage(String message, String phoneNumber, final int command) {\n String SENT = \"SMS_SENT\";\n String DELIVERED = \"SMS_DELIVERED\";\n\n PendingIntent sentPI = PendingIntent.getBroadcast(this, 0, new Intent(\n SENT), 0);\n\n // DELIVER PendingIntent\n PendingIntent deliveredPI = PendingIntent.getBroadcast(this, 0,\n new Intent(DELIVERED), 0);\n\n BroadcastReceiver sendSMS = new BroadcastReceiver() {\n @Override\n public void onReceive(Context arg0, Intent arg1) {\n switch (getResultCode()) {\n case Activity.RESULT_OK:\n Toast.makeText(getBaseContext(), \"SMS sent\",\n Toast.LENGTH_SHORT).show();\n break;\n case SmsManager.RESULT_ERROR_GENERIC_FAILURE:\n Toast.makeText(getBaseContext(), \"Generic failure\",\n Toast.LENGTH_SHORT).show();\n break;\n case SmsManager.RESULT_ERROR_NO_SERVICE:\n Toast.makeText(getBaseContext(), \"No service\",\n Toast.LENGTH_SHORT).show();\n break;\n case SmsManager.RESULT_ERROR_NULL_PDU:\n Toast.makeText(getBaseContext(), \"Null PDU\",\n Toast.LENGTH_SHORT).show();\n break;\n case SmsManager.RESULT_ERROR_RADIO_OFF:\n Toast.makeText(getBaseContext(), \"Radio off\",\n Toast.LENGTH_SHORT).show();\n break;\n }\n }\n };\n\n // DELIVERY BroadcastReceiver\n BroadcastReceiver deliverSMS = new BroadcastReceiver() {\n @Override\n public void onReceive(Context arg0, Intent arg1) {\n switch (getResultCode()) {\n case Activity.RESULT_OK:\n\n hideProgressDialog();\n\n mPresenter.updateDatabase(command,mVehicle.getId());\n\n /*Toast.makeText(getBaseContext(), \"SMS delivered\",\n Toast.LENGTH_SHORT).show();*/\n break;\n case Activity.RESULT_CANCELED:\n Toast.makeText(getBaseContext(), \"SMS not delivered\",\n Toast.LENGTH_SHORT).show();\n break;\n }\n }\n };\n// STEP-3___\n // ---Notify when the SMS has been sent---\n registerReceiver(sendSMS, new IntentFilter(SENT));\n\n // ---Notify when the SMS has been delivered---\n registerReceiver(deliverSMS, new IntentFilter(DELIVERED));\n\n SmsManager sms = SmsManager.getDefault();\n sms.sendTextMessage(phoneNumber, null, message, sentPI, deliveredPI);\n\n }",
"@Async\n public boolean sendTransferFromNotificationSMS(Customer source, Customer dest, Double rewardQty, RewardCurrency rewardCurrency, MessageWrapper messageWrapper) throws InspireNetzException {\n HashMap<String,String> fields = new HashMap<>(0);\n\n // Add the qty\n fields.put(\"#qty\",generalUtils.getFormattedValue(rewardQty));\n\n // Add the currencyname\n fields.put(\"#currencyname\",rewardCurrency.getRwdCurrencyName());\n\n // Add the recepient name\n fields.put(\"#receipientname\",dest.getCusLoyaltyId());\n\n /* // Get the reward balance\n CustomerRewardBalance customerRewardBalance = customerRewardBalanceService.findByCrbLoyaltyIdAndCrbMerchantNoAndCrbRewardCurrency(source.getCusLoyaltyId(),source.getCusMerchantNo(),rewardCurrency.getRwdCurrencyId());\n*/\n //get the reward balance\n List<CustomerRewardBalance> customerRewardBalances = customerRewardBalanceService.searchBalances(source.getCusMerchantNo(),source.getCusLoyaltyId(),rewardCurrency.getRwdCurrencyId());\n\n //if the list contains any entries set reward balance to the placeholder\n if(customerRewardBalances != null && customerRewardBalances.size()>0){\n\n // Send the points formatted\n fields.put(\"#points\",generalUtils.getFormattedValue(customerRewardBalances.get(0).getCrbRewardBalance()));\n\n }\n\n // Set the date\n String toDay = generalUtils.convertDateToFormat(new Date(System.currentTimeMillis()),\"dd MMM yyyy\");\n\n // Set the value for #date placeholder\n fields.put(\"#date\", toDay);\n\n //log the activity\n customerActivityService.logActivity(source.getCusLoyaltyId(), CustomerActivityType.TRANSFER_POINT, \"Transferred \" + generalUtils.getFormattedValue(rewardQty) + \" points to :\" + dest.getCusLoyaltyId(), source.getCusMerchantNo(), \"\");\n\n messageWrapper.setParams(fields);\n\n messageWrapper.setSpielName(MessageSpielValue.SPIEL_TRANSFER_POINT_FROM);\n\n\n messageWrapper.setMerchantNo(source.getCusMerchantNo());\n\n messageWrapper.setLoyaltyId(source.getCusLoyaltyId());\n\n messageWrapper.setChannel(MessageSpielChannel.ALL);\n\n messageWrapper.setIsCustomer(IndicatorStatus.YES);\n\n return userMessagingService.transmitNotification(messageWrapper);\n\n }",
"@Override\n public void done(Integer smsId, BmobException ex) {\n if (ex == null) {//验证码发送成功\n show(\"发送成功!\");\n } else {\n show(\"发送失败!\");\n }\n }",
"private void sentSMS(String taskName){\n\n AmazonSNSClient snsClient = new AmazonSNSClient();\n String message = taskName + \" has completed.\";\n String phoneNumber = \"+15809196943\";\n Map<String, MessageAttributeValue> smsAttributes =\n new HashMap<String, MessageAttributeValue>();\n //<set SMS attributes>\n PublishResult result = snsClient.publish(new PublishRequest()\n .withMessage(message)\n .withPhoneNumber(phoneNumber)\n .withMessageAttributes(smsAttributes));\n System.out.println(result); // Prints the message ID.\n\n }",
"@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tRandom ra=new Random();\r\n\t\t\t\tint val=ra.nextInt(999);\r\n\t\t\t\tSmsManager sms=SmsManager.getDefault();\r\n\t\t\t\tsms.sendTextMessage(txt_phone.getText().toString(), null, val+\"\", null, null);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tIntent i=new Intent(getApplicationContext(), OTP_Reg.class);\r\n\t\t\t\ti.putExtra(\"name\", txt_name.getText().toString());\r\n\t\t\t\ti.putExtra(\"phone\", txt_phone.getText().toString());\r\n\t\t\t\ti.putExtra(\"otp\", val+\"\");\r\n\t\t\t\t\r\n\t\t\t\tstartActivity(i);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t}",
"@Override\n\tprotected void send(ServletWebRequest request, ValidateCode validateCode) throws Exception {\n\t\tString mobile= ServletRequestUtils.getRequiredStringParameter(request.getRequest(),\"mobile\");\n\t\tsmsCodeSender.send(mobile, validateCode.getCode());\n\t}",
"public void onClick(View view) {\n sendSMSMessage(profile_general,phoneNo);\n GoHome();\n }",
"protected void TextHttp() {\n\t\tLoginBean loginb = new LoginBean();\n\t\tloginb.setPhone(\"15236290644\");\n\t\tActivityDataRequest.getLoginCheck(TagConfig.TAG_MSG,this, loginb);\n\t\t\n\t\tLoginBean loginb2 = new LoginBean();\n\t\tloginb2.setPhone(\"15631001601\");\n\t\tActivityDataRequest.getLoginCheck(2,this, loginb2);\n\t\t\n\t}",
"void sendTo(String from, String to, String m_id);",
"public void sendConfirmPaid(Long telegramId, String text) {\n String url = \"https://api.telegram.org/bot%s/sendMessage?chat_id=%s&text=%s\";\n// url = String.format(url, properties.getProperties().getProperty(\"botToken\"), String.valueOf(telegramId), text);\n url = String.format(url, \"967287812:AAEAjnZ6gIVczLECLc9J99KAz9oYWORaE9Q\", String.valueOf(telegramId), text);\n try {\n restTemplate.exchange(url, HttpMethod.POST, new HttpEntity<>(\"\"), String.class);\n } catch (HttpClientErrorException | ResourceAccessException e) {\n e.printStackTrace();\n } finally {\n System.out.println(Thread.currentThread() + \" RUNNING\");\n }\n }",
"public String sendSingleSMS(String userId, String password,\n\t\t\tString mobilePhoneNo, String message, String locale,\n\t\t\tString scheduleDate, String sender, String appName, String appRef,\n\t\t\tString refKey)\n\t{\n\t\tString result = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tMessageSoap messageSoap = new MessageSoap();\n\t\t\tSendSMS1Soap sendSMS1Soap = messageSoap.SendSingleSMS();\n\t\t\t\n\t\t\tresult = sendSMS1Soap.SendSingleSMS(userId, password,\n\t\t\t\t\tmobilePhoneNo, message, locale, scheduleDate, sender);\n\t\t\taddNotification2DB(\"sms\", result, mobilePhoneNo, message, locale,\n\t\t\t\t\tappName, appRef, refKey, \"\", \"\");\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\tlogger.error(\"Message sending failure : \" + ex.getMessage());\n\t\t}\n\t\t\n\t\treturn result;\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 enviarMensaje (String numero, String mensaje){\n try {\n SmsManager sms = SmsManager.getDefault();\n sms.sendTextMessage(numero,null,mensaje,null,null);\n Toast.makeText(getApplicationContext(), \"Mensaje Enviado.\", Toast.LENGTH_LONG).show();\n }\n catch (Exception e) {\n Toast.makeText(getApplicationContext(), \"Mensaje no enviado, datos incorrectos.\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n }",
"@Test\n\tpublic void testSms() {\n\t}",
"public interface SMSService {\n\n public static final String SMS_TXT = \"txt\";\n public static final String SMS_VOICE = \"voice\";\n\n /**\n * 发送短信\n * @param smsCheckCode 短信内容\n * @param isChange 是否改变发送渠道\n * @return\n */\n boolean sendSMS(SMSCheckCode smsCheckCode, boolean isChange);\n\n /**\n * 发送语音短信\n * @param smsCheckCode\n * @param isChange\n * @return\n */\n boolean sendVoiceSMS(SMSCheckCode smsCheckCode, boolean isChange);\n\n\n /**\n * 发送vip卡号\n * @return\n */\n boolean sendVipCard(SMSSendVipCard smsSendVipCard);\n}",
"private boolean sendSms(final Event event2send) {\n final Customer customer = event2send.getCustomer();\n final Unit unit = customer.getUnit();\n\n final String text2send = TextUtils.convert2ascii(format(event2send));\n final Map<String, Object> unitOptions = getUnitOptions(unit);\n @SuppressWarnings(\"unchecked\")\n final Map<String, String> smsOptions = (Map<String, String>) unitOptions.get(\"sms\");\n\n try {\n assertSmsOptions(smsOptions);\n smsGatewayService.send(customer.getPhoneNumber(), text2send, smsOptions);\n LOG.info(\"event sent via SMS, id=\" + event2send.getId() + \", phone=\" + customer.getPhoneNumber());\n } catch (Throwable t) {\n if (t instanceof SmsException\n && SmsGatewayService.FailureType.BAD_PHONE_NUMBER == ((SmsException) t).getFailureType()) {\n LOG.warning(\"failed to send SMS (bad phone number), ID= + event2send.getId()\");\n } else {\n LOG.log(Level.SEVERE, \"failed to send SMS, ID=\" + event2send.getId(), t);\n }\n return false;\n }\n return true;\n }",
"@Async\n public boolean sendTransferToNotificationSMS(Customer source, Customer dest, Double rewardQty, RewardCurrency rewardCurrency, MessageWrapper messageWrapper) throws InspireNetzException {\n HashMap<String,String> fields = new HashMap<>(0);\n\n // Add the qty\n fields.put(\"#qty\",generalUtils.getFormattedValue(rewardQty));\n\n // Add the currencyname\n fields.put(\"#currencyname\",rewardCurrency.getRwdCurrencyName());\n\n // Add the sender name\n fields.put(\"#sender\",source.getCusLoyaltyId());\n\n /*// Get the reward balance\n CustomerRewardBalance customerRewardBalance = customerRewardBalanceService.findByCrbLoyaltyIdAndCrbMerchantNoAndCrbRewardCurrency(dest.getCusLoyaltyId(),dest.getCusMerchantNo(),rewardCurrency.getRwdCurrencyId());*/\n\n //get the reward balance\n List<CustomerRewardBalance> customerRewardBalances = customerRewardBalanceService.searchBalances(dest.getCusMerchantNo(),dest.getCusLoyaltyId(),rewardCurrency.getRwdCurrencyId());\n\n //if the list contains any entries set reward balance to the placeholder\n if(customerRewardBalances != null && customerRewardBalances.size()>0){\n\n // Send the points formatted\n fields.put(\"#points\",generalUtils.getFormattedValue(customerRewardBalances.get(0).getCrbRewardBalance()));\n\n }\n\n\n // Set the date\n String toDay = generalUtils.convertDateToFormat(new Date(System.currentTimeMillis()),\"dd MMM yyyy\");\n\n // Replace the date\n fields.put(\"#date\", toDay);\n\n //log the activity\n customerActivityService.logActivity(dest.getCusLoyaltyId(), CustomerActivityType.TRANSFER_POINT, \"Received \" + generalUtils.getFormattedValue(rewardQty) + \" points from :\" + source.getCusLoyaltyId(), source.getCusMerchantNo(), \"\");\n\n messageWrapper.setParams(fields);\n\n messageWrapper.setSpielName(MessageSpielValue.SPIEL_TRANSFER_POINT_TO);\n\n messageWrapper.setLoyaltyId(dest.getCusLoyaltyId());\n messageWrapper.setMerchantNo(dest.getCusMerchantNo());\n messageWrapper.setChannel(MessageSpielChannel.ALL);\n messageWrapper.setIsCustomer(IndicatorStatus.YES);\n\n return userMessagingService.transmitNotification(messageWrapper);\n\n }",
"public static void sendSMS(Map map) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tString username = \"contact@pool4u.in\";\r\n\t\tString password = \"password4u\";\r\n\t\t Email email = new SimpleEmail();\r\n email.setHostName(host);\r\n email.setSmtpPort(25);\r\n email.setAuthenticator(new DefaultAuthenticator(username, password));\r\n //email.setTLS(true);\r\n try {\r\n \t email.setFrom(from);\r\n\t\t\r\n\t // email.setSubject((String)alertMap.get(CarPoolConstants.SUBJECT));\r\n\t //email.setMsg((String)alertMap.get(CarPoolConstants.ALERT));\r\n\t email.setSubject(\"bara\");\r\n\t email.setMsg(\"naay\");\r\n\t \r\n\t email.addTo(\"deepakndhage@gmail.com\");//(String)alertMap.get(CarPoolConstants.TO)\r\n\t email.setDebug(true);\r\n\t //919970169928@smscountry.net,\r\n\t email.send();\r\n } catch (EmailException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t}\r\n\t}",
"@Override\n\tpublic void onWebServiceReceive(String method, int id, String result) {\n\t\ttry {\n\t\t\tJSONObject jsonObject = new JSONObject(result);\n\t\t\tif (id == _SaveDeviceSMS) {\n\t\t\t\tint code = jsonObject.getInt(\"Code\");\n\t\t\t\tif(code == 1){\n\t\t\t\t\tGetDeviceSMS();\n\t\t\t\t} else {\n\t\t\t\t\t//-1输入参数错误,0登录异常,6无权修改管理员信息\n\t\t\t\t\t//MToast.makeText(jsonObject.getString(\"Message\")).show();\n\t\t\t\t} \n\t\t\t}else if(id == _GetDeviceSMS){\n\t\t\t\tint code = jsonObject.getInt(\"Code\");\n\t\t\t\tif(code == 1){\n\t\t\t\t\tJSONArray arrs = jsonObject.getJSONArray(\"SMSList\");\n\t\t\t\t\tint j;\n\t\t\t\t\tfor(j = 0; j < arrs.length(); j++){\n\t\t\t\t\t\tJSONObject items = arrs.getJSONObject(j);\n\t\t\t\t\t\tSMSModel mSMSModel = new SMSModel();\n\t\t\t\t\t\tmSMSModel.setDeviceSMSID(items.getString(\"DeviceSMSID\"));\n\t\t\t\t\t\tmSMSModel.setDeviceID(items.getString(\"DeviceID\"));\n\t\t\t\t \tmSMSModel.setUserID(String.valueOf(AppData.GetInstance(mContext).getUserId()));\n\t\t\t\t \tmSMSModel.setType(items.getString(\"Type\"));\n\t\t\t\t \tmSMSModel.setPhone(items.getString(\"Phone\"));\n\t\t\t\t \tmSMSModel.setSms(items.getString(\"SMS\"));\n\t\t\t\t \tmSMSModel.setCreateTime(items.getString(\"CreateTime\"));\n\t\t\t\t \tmSMSList.add(mSMSModel);\n\t\t\t\t \tSMSDao mSMSDao = new SMSDao(mContext);\n\t\t\t\t \tmSMSDao.saveSMS(mSMSModel);\n\t\t\t\t \tmyAdapter.notifyDataSetChanged();\n\t\t\t\t \tlv.setSelection(lv.getCount() - 1);\n\t\t\t\t\t}\n\t\t\t\t} else if (code == 2){\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\t//-1输入参数错误,0登录异常,6无权修改管理员信息\n\t\t\t\t\t//MToast.makeText(jsonObject.getString(\"Message\")).show();\n\t\t\t\t} \n\t\t\t}\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void resendOTP() {\n ApiInterface apiInterface = RestClient.getApiInterface();\n apiInterface.userResendOTP(\"bearer\" + \" \" + CommonData.getAccessToken())\n .enqueue(new ResponseResolver<CommonResponse>(OtpActivity.this, true, true) {\n @Override\n public void success(final CommonResponse commonResponse) {\n Log.d(\"debug\", commonResponse.getMessage());\n Toast.makeText(OtpActivity.this, \"New OTP Sent\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void failure(final APIError error) {\n Log.d(\"debug\", error.getMessage());\n\n }\n });\n\n\n }",
"@SuppressLint(\"NewApi\")\n @Override\n public void onClick(View v) {\n sPhone = etPhone.getText().toString();\n sSms = etSms.getText().toString();\n\n //if (sPhone.length() > 0 && sSms.length() > 0)\n // sendSMS(sPhone, sSms);\n\n\n etSms.getText().clear();\n\n Intent i = new Intent(SMSActivity.this, AlarmService.class);\n i.putExtra(\"exPhone\", sPhone);\n i.putExtra(\"exSmS\", sSms);\n\n smsData.put(\"Phone\", sPhone);\n smsData.put(\"Message\", sSms);\n\n\n pIntent = PendingIntent.getService(getApplicationContext(), 0, i, PendingIntent.FLAG_UPDATE_CURRENT);\n\n aManager = (AlarmManager) getSystemService(ALARM_SERVICE);\n c.setTimeInMillis(System.currentTimeMillis());\n c.set(Calendar.HOUR_OF_DAY, hour);\n c.set(Calendar.MINUTE, minute);\n aManager.set(AlarmManager.RTC_WAKEUP, c.getTimeInMillis(), pIntent);\n Toast.makeText(getApplicationContext(), \"Sms scheduled! \", Toast.LENGTH_SHORT).show();\n\n\n onSaveClickedSP(v);\n send15minNotification(hour, minute);\n sendsentNotification(hour, minute);\n\n Intent intent = new Intent(SMSActivity.this, SucessSMSActivity.class);\n startActivity(intent);\n\n }",
"public SendSmsRingtoneResponse sendSmsRingtone(SendSmsRingtone request) {\n\t\treturn null;\n\t}",
"@Override\n public void onClick(View v) {\n sendMessage(phone_from_intent);\n }",
"public interface LKSmsService {\n\n /**\n * 发送 短信\n * @param sms\n *\n * @return\n */\n Result sendSms(SmsRequest sms) throws IOException;\n\n\n\n}",
"@Override\n public void callUsers(String userPhone) {\n }",
"public ApplicationCreator setSmsMethod(final HttpMethod smsMethod) {\n this.smsMethod = smsMethod;\n return this;\n }",
"@Override\r\n public void sendBySI(String teacherID, String studentID,String content)\r\n throws Exception {\n \tString url = \"http://wps.139910.com:88/XXT_Assist/servlet/XXT_TeacherSms?TeacherID=\"+teacherID+\"&StudentID=\"+studentID+\"&Message=\"+URLEncoder.encode(content, \"gb2312\");\r\n// \tSystem.out.println(teacherID);\r\n// \tSystem.out.println(studentID);\r\n// \tSystem.out.println(content);\r\n// \tSystem.out.println(url);\r\n HttpClient client = new HttpClient(new MultiThreadedHttpConnectionManager());\r\n client.getHostConfiguration().setHost(\"wps.139910.com\", 88);\r\n\r\n // PostMethod method = new PostMethod(url);\r\n // post.setParameter(\"mobiles\", mobile);\r\n // post.setParameter(\"content\", content);\r\n GetMethod method = new GetMethod(url);\r\n int statusCode = client.executeMethod(method);\r\n\r\n try {\r\n if (statusCode != HttpStatus.SC_OK) {\r\n throw new Exception(\"SI外挂教育OA短信发送接口访问失败\");\r\n }\r\n\r\n InputStream responseStream = method.getResponseBodyAsStream();\r\n String res = FileUtil.inputStream2String(responseStream, \"utf-8\");\r\n System.out.println(\"========================>\"+res);\r\n if (res.indexOf(\"发送成功\") == -1) {\r\n throw new Exception(\"SI外挂教育OA短信发送接口发送失败\");\r\n }\r\n } catch (Exception e) {\r\n throw e;\r\n } finally {\r\n method.releaseConnection();\r\n }\r\n }",
"private void sendMessage(String contactNumber) {\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"sms:\" + contactNumber));\n startActivity(intent);\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsendSmsNew(phoneNum);\r\n\t\t\t\tsetTextSend();\r\n\t\t\t}",
"public void onClick(View v) {\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString phoneno=phonenoET.getText().toString();\n\t\t\t\t\t\t\tif(phoneno.equals(\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\"Enter Phone No.\",Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(phoneno.length()!=10)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\"Wrong Phone No.\",Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//uniquecode=\"hello\";\n\t\t\t\t\t\t\t\t//double code=Math.random();\n\t\t\t\t\t\t\t\t//Toast.makeText(getApplicationContext(),\"\"+code+\"\",Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\tuniquecode=Integer.toString((int)(Math.random()*1000000000));\n\t\t\t\t\t\t\t\t//Toast.makeText(getApplicationContext(),\"Unique CODE: \"+uniquecode,Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\tSmsManager sms=SmsManager.getDefault();\n\t\t\t\t\t\t\t\tsms.sendTextMessage(phoneno, null,\"Unique CODE: \"+uniquecode, null, null);\n\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\"Msg Sent\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\tDate date = new Date();\n\t\t\t\t\t\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\t\t\t\t\t\tString currentDate = dateFormat.format(date);\n\t\t\t\t\t\t\t\tSimpleDateFormat timeFormat = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\t\t\t\t\t\tString currentTime = timeFormat.format(date);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmBuilder.setContentTitle(\"Unique Code Sent\");\n\t\t\t\t\t\t\t\tmBuilder.setContentText(\"to \"+phoneno+\"\\non \"+currentDate+\"\");\n\t\t\t\t\t\t\t\tmBuilder.setTicker(\"Password Alert!\");\n\t\t\t\t\t\t\t\tmBuilder.setSmallIcon(R.drawable.ic_launcher);\n\t\t\t\t\t\t\t\t//mBuilder.setNumber(++numMessages);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\t\t\t\t\t\t\t\t/* notificationID allows you to update the notification later on. */ \n\t\t\t\t\t\t\t\tmNotificationManager.notify((int)(Math.random()*1000), mBuilder.build());\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Intent i=new Intent(getApplicationContext(),Read_Activity.class);\n\t\t\t\t\t\t\t\t//startActivity(i);\n\t\t\t\t\t\t\t\tphonenoET.setEnabled(false);\n\t\t\t\t\t\t\t\tsendb.setEnabled(false);\n\t\t\t\t\t\t\t\tucodeET.setVisibility(0);\n\t\t\t\t\t\t\t\tnextb.setVisibility(0);\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\tcatch(Exception ex)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),ex.toString(),Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\"Msg not Sent\",Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"public void SendOTP(final SendOtpModel.SendOtpreq sendOtpreq)\n {\n AppLog.e(TAG,\"SendOTPReq : \"+sendOtpreq);\n\n if(!isOnline())\n {\n showSnake(binding.rlMain,\"Internet Not Available , Please Try Again\");\n return;\n }\n\n showLoading();\n apiService.sendOTP(sendOtpreq)\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new Observer<Response<SendOtpModel.SendOtpRes>>() {\n @Override\n public void onSubscribe(Disposable d) {\n disposable.add(d);\n showLoading();\n }\n\n @Override\n public void onNext(Response<SendOtpModel.SendOtpRes> sendOtpResResponse) {\n AppLog.e(TAG,\"sendOtpRes :\"+sendOtpResResponse.body());\n onSendOTPRes(sendOtpResResponse.body());\n }\n\n @Override\n public void onError(Throwable e) {\n onFailure(e);\n }\n\n @Override\n public void onComplete() {\n onDone();\n }\n });\n }",
"private void sendEmailToSubscriberForHealthTips() {\n\n\n\n }",
"private void makeSampleHttpRequest2(String url) {\r\n StringRequest stringRequest = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {\r\n @Override\r\n public void onResponse(String response) {\r\n result_msn = response.toString();\r\n //Enviamos el mensaje de texto\r\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {\r\n int hasSMSPermission = checkSelfPermission(Manifest.permission.SEND_SMS);\r\n if (hasSMSPermission != PackageManager.PERMISSION_GRANTED) {\r\n requestPermissions(new String[] {Manifest.permission.SEND_SMS},0);\r\n }\r\n sendMySMS();\r\n }\r\n }\r\n }, new Response.ErrorListener() {\r\n @Override\r\n public void onErrorResponse(VolleyError error) {\r\n // Handle your error types accordingly.For Timeout & No connection error, you can show 'retry' button.\r\n // For AuthFailure, you can re login with user credentials.\r\n // For ClientError, 400 & 401, Errors happening on client side when sending api request.\r\n // In this case you can check how client is forming the api and debug accordingly.\r\n // For ServerError 5xx, you can do retry or handle accordingly.\r\n if( error instanceof NetworkError) {\r\n } else if( error instanceof ClientError) {\r\n result_msn = error.toString();\r\n } else if( error instanceof ServerError) {\r\n result_msn = error.toString();\r\n } else if( error instanceof AuthFailureError) {\r\n result_msn = error.toString();\r\n } else if( error instanceof ParseError) {\r\n result_msn = error.toString();\r\n } else if( error instanceof NoConnectionError) {\r\n result_msn = error.toString();\r\n } else if( error instanceof TimeoutError) {\r\n result_msn = error.toString();\r\n }\r\n showToast(error.getMessage());\r\n }\r\n });\r\n stringRequest.setShouldCache(true);\r\n stringRequest.setTag(TAG_REQUEST);\r\n mVolleyQueue2.add(stringRequest);\r\n }",
"@Override\r\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) { \r\n case R.id.send: \r\n \tif(!number.getText().toString().equals(\"\")&&number.getText().toString()!=null){\r\n\t\t\t\tif(!content.getText().toString().equals(\"\")&&content.getText().toString()!=null){\r\n\t\t\t\t\t//创建一个PendingIntent对象\r\n\t\t\t\t\tPendingIntent pi = PendingIntent.getActivity(SendSmsAct.this, 0, new Intent(), 0);\r\n\t\t\t\t\t//发送短信\r\n\t\t\t\t\t//短信具有字数限制,分条发送\r\n//\t\t\t\t\t ArrayList<String> list = sManager.divideMessage(content.getText().toString()); //因为一条短信有字数限制,因此要将长短信拆分 \r\n//\t\t\t for(String text:list){ \r\n//\t\t\t\t\t\t\tsManager.sendTextMessage(number.getText().toString(), null, text, pi, null);\r\n//\t\t\t }\r\n//\t\t\t\t\t\tsManager.sendTextMessage(number.getText().toString(), null, content.getText().toString(), pi, null);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (content.getText().toString().length() > 70) { \r\n\t\t\t\t\t\t ArrayList<String> msgs = sManager.divideMessage(content.getText().toString()); \r\n\t\t\t\t\t\t ArrayList<PendingIntent> sentIntents = new ArrayList<PendingIntent>(); \r\n\t\t\t\t\t\t for(int i = 0;i<msgs.size();i++){ \r\n\t\t\t\t\t\t sentIntents.add(pi); \r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t\t sManager.sendMultipartTextMessage(number.getText().toString(), null, msgs, sentIntents, null); \r\n\t\t\t\t\t\t} else { \r\n\t\t\t\t\t\t\tsManager.sendTextMessage(number.getText().toString(), null, content.getText().toString(), pi, null); \r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t//提示短信发送成功\r\n\t\t\t\t\tToast.makeText(SendSmsAct.this, \"短信发送成功\", 8000).show();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tToast.makeText(SendSmsAct.this, \"无信息内容\", 8000).show();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tToast.makeText(SendSmsAct.this, \"无号码\", 8000).show();\r\n\t\t\t}\r\n break; \r\n case R.id.encrysend: \r\n \tif(!number.getText().toString().equals(\"\")&&number.getText().toString()!=null){\r\n\t\t\t\tif(!content.getText().toString().equals(\"\")&&content.getText().toString()!=null){\r\n\t\t\t\t\t//从数据库中读取私钥,并使用MD5解密\r\n\t\t\t\t\tString userName = \"\";\r\n\t\t\t\t\tuserName = FileUtil.readFileSdcard(FileUtil.Folder_NAME+\"/me.txt\");\r\n\t\t\t\t\tif(userName.equals(\"\")){\r\n\t\t\t\t\t\tToast.makeText(SendSmsAct.this, \"未创建密钥\", 8000).show();\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tSQLiteHelper sqlLH = new SQLiteHelper(SendSmsAct.this);\r\n\t\t\t\t\t\tprivateKey2 = sqlLH.queryPrivateKey(userName);\r\n\t\t\t\t\t\tSystem.out.println(\"@@@@@@@@privateKey2\"+privateKey2);\r\n\t\t\t\t\t\tif(privateKey2.equals(\"\")){\r\n\t\t\t\t\t\t\tToast.makeText(SendSmsAct.this, \"未创建密钥\", 8000).show();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t//通过弹出窗口来输入私钥,获取privateKey\r\n\t\t\t\t\t\t\tAlertDialog.Builder builder = new Builder(SendSmsAct.this);\r\n\t\t\t\t\t\t\tbuilder.setTitle(\"请输入口令\"); //设置对话框标题\r\n\t\t\t\t\t\t\tbuilder.setIcon(android.R.drawable.btn_star); //设置对话框标题前的图标\r\n\t\t\t\t\t\t\tfinal EditText edit = new EditText(SendSmsAct.this);\r\n\t\t\t\t\t\t\tedit.setTransformationMethod(PasswordTransformationMethod.getInstance());\r\n\t\t\t\t\t\t\tbuilder.setView(edit);\r\n\t\t\t\t\t\t\tbuilder.setPositiveButton(\"确认\", \r\n\t\t\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\r\n\t\t\t\t\t\t\t\tprivateKey = edit.getText().toString();\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"@@@@@@@@privateKey\"+privateKey);\r\n\t\t\t\t\t\t\t\tif(!MD5Util.encryph(privateKey).equals(privateKey2)){\r\n\t\t\t\t\t\t\t\t\tToast.makeText(SendSmsAct.this, \"口令不符\", 8000).show();\r\n\r\n\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\t//从本地文件中读取收件人的公钥\r\n\t\t\t\t\t\t\t\t\t\tString name = number.getText().toString();\r\n\t\t\t\t\t\t\t\t\t\tString publicKey = \"\";\r\n\t\t\t\t\t\t\t\t\t\tpublicKey = FileUtil.readFileSdcard(FileUtil.File_NAME+name+\".txt\");\r\n\t\t\t\t\t\t\t\t\t\tif(!publicKey.equals(\"\")){\r\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"@@@@@@@@publicKey\"+publicKey);\r\n\t\t\t\t\t\t\t\t\t\t\tDhKey dhkey = new DhKey(MD5Util.encryph(privateKey));\r\n\t\t\t\t\t\t\t\t\t\t\tBigInteger k = dhkey.getK(publicKey);\r\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"@@@@@@@@K\"+k);\r\n\t\t\t\t\t\t\t\t\t\t\tString message = content.getText().toString();\r\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"@@@@@@@@message\"+message);\r\n//\t\t\t\t\t\t\t\t\t\t\tAESUtil aes = new AESUtil();\r\n//\t\t\t\t\t\t\t\t\t\t\tString ciphermessage = \"yyyy:\"+aes.AESEncode(k.toString(), message);\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\tDESUtil Des = new DESUtil();\r\n\t\t\t\t\t\t\t\t\t\t\tString ciphermessage = \"yyyy:\"+Des.DESEncode(k.toString(), message);\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\t\r\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"@@@@@@@@AESEncode\"+ciphermessage);\r\n\t\t\t\t\t\t\t\t\t\t\t//创建一个PendingIntent对象\r\n\t\t\t\t\t\t\t\t\t\t\tPendingIntent pi = PendingIntent.getActivity(SendSmsAct.this, 0, new Intent(), 0);\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\t//短信具有字数限制,分条发送\r\n//\t\t\t\t\t\t\t\t\t\t\t ArrayList<String> list = sManager.divideMessage(ciphermessage); //因为一条短信有字数限制,因此要将长短信拆分 \r\n//\t\t\t\t\t\t\t\t\t for(String text:list){ \r\n//\t\t\t\t\t\t\t\t\t\t\t\t\tsManager.sendTextMessage(number.getText().toString(), null, text, pi, null);\r\n//\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\t\t\t\tsManager.sendTextMessage(number.getText().toString(), null, ciphermessage, pi, null);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (ciphermessage.length() > 70) { \r\n\t\t\t\t\t\t\t\t\t\t\t\t ArrayList<String> msgs = sManager.divideMessage(ciphermessage); \r\n\t\t\t\t\t\t\t\t\t\t\t\t ArrayList<PendingIntent> sentIntents = new ArrayList<PendingIntent>(); \r\n\t\t\t\t\t\t\t\t\t\t\t\t for(int i = 0;i<msgs.size();i++){ \r\n\t\t\t\t\t\t\t\t\t\t\t\t sentIntents.add(pi); \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\t sManager.sendMultipartTextMessage(number.getText().toString(), null, msgs, sentIntents, null); \r\n\t\t\t\t\t\t\t\t\t\t\t\t} else { \r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsManager.sendTextMessage(number.getText().toString(), null, ciphermessage, pi, null); \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//提示短信发送成功\r\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(SendSmsAct.this, \"短信发送成功\", 8000).show();\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(SendSmsAct.this, \"无收件人公钥,查证\", 8000).show();\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}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tbuilder.setNegativeButton(\"取消\", new DialogInterface.OnClickListener() {\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tbuilder.setCancelable(true); //设置按钮是否可以按返回键取消,false则不可以取消\r\n\t\t\t\t\t\t\tAlertDialog dialog = builder.create(); //创建对话框\r\n\t\t\t\t\t\t\tdialog.setCanceledOnTouchOutside(true); //设置弹出框失去焦点是否隐藏,即点击屏蔽其它地方是否隐藏\r\n\t\t\t\t\t\t\tdialog.show();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\tToast.makeText(SendSmsAct.this, \"无信息内容\", 8000).show();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tToast.makeText(SendSmsAct.this, \"无号码\", 8000).show();\r\n\t\t\t}\r\n break; \r\n \r\n case R.id.nokey:\r\n \tIntent intent = new Intent();\r\n \tintent.setClass(SendSmsAct.this,ProduceKeyAct.class); \r\n \tstartActivity(intent);\r\n default: \r\n break; \r\n } \r\n\t}",
"boolean hasSms();",
"@Override\n public boolean request(AuthToken token, Client client, List<Handler> method, String data) {\n\n if (!method.isEmpty()) {\n\n setNextHandler(method.remove(0));\n }\n\n String smsPhone = client.getPhoneNumber();\n\n if (null != smsPhone) {\n\n SMS.sendInvoice(token, client.getFName(), client.getLName(), data, smsPhone);\n\n return true;\n\n } else {\n\n nextHandler.request(token, client, method, data);\n\n return false;\n\n }\n }",
"@Test\n public void testShouldExecuteRequest() throws Exception {\n // GIVEN\n SmsSubmissionResult smsSubmissionResult = mock(SmsSubmissionResult.class);\n when(smsSubmissionResult.getStatus()).thenReturn(SmsSubmissionResult.STATUS_OK);\n when(nexmoSmsSenderService.getResults(anyObject())).thenReturn(Optional.of(new SmsSubmissionResult[]{smsSubmissionResult}));\n\n // WHEN\n SmsResponse smsResponse = smsClient.sendMessage(FROM, TO, TEXT_TO_SEND);\n\n // THEN\n assertEquals(SmsResponse.StatusCode.OK, smsResponse.getStatus());\n assertEquals(\"Sms successfully sent\", smsResponse.getMessage());\n }",
"public String\tsendSingleSMS(\n\t\t\tString\tmobilePhoneNo,\n\t\t\tString\tmessage,\n\t\t\tString\tlocale,\n\t\t\tString\tscheduleDate,\n\t\t\tString\tuserName\n\t\t)\n\t{\n\t\tString\tresult \t=\tnull;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tMessageSoap\t\tmessageSoap\t\t=\tnew MessageSoap();\n\t\t\tSendSMS1Soap\tsendSMS1Soap\t=\tmessageSoap.SendSingleSMS();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tresult\t\t\t=\tsendSMS1Soap.SendSingleSMS(this.smsUserId, this.smsPassword, mobilePhoneNo, message, locale, scheduleDate, userName);\n\t\t}\n\t\tcatch(Exception ex)\n\t\t{\n\t\t\tlogger.error(\"Message sending failure : \"+ex.getMessage());\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"private void sendVerificationCode(String phone_number){\n Log.d(TAG, \"sendVerificationCode: SENDING OTP\");\n progressBar.setVisibility(View.VISIBLE);\n PhoneAuthProvider.getInstance().verifyPhoneNumber(\n phone_number,\n 60,\n TimeUnit.SECONDS,\n TaskExecutors.MAIN_THREAD,\n mCallBack\n );\n }",
"public static void sendSMS(String recNumString, String encryptedMsg) {\n try {\n // get a SmsManager\n SmsManager smsManager = SmsManager.getDefault();\n // MessageActivity may exceed 160 characters\n // need to divide the message into multiples\n ArrayList<String> parts = smsManager.divideMessage(encryptedMsg);\n smsManager.sendMultipartTextMessage(recNumString, null, parts, null, null);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n\n\n // this opens the activity. note the Intent.ACTION_GET_CONTENT\n // and the intent.setType\n ((Button)findViewById(R.id.PickNumber)).setOnClickListener( new OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.setType(ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE);\n startActivityForResult(intent, 1); \n }\n });\n\n Button button = (Button) findViewById(R.id.SendButton);\n // Initialize preferences\n preferences = PreferenceManager.getDefaultSharedPreferences(this);\n\n // Called when the Send button is pressed\n button.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n // Get the parameters from the preferences, should have added them using the menu button\n String voipprovider = preferences.getString(\"voipprovider\", \"n/a\");\n String username = preferences.getString(\"username\", \"n/a\");\n String password = preferences.getString(\"password\", \"n/a\");\n if(voipprovider == \"n/a\" || username == \"n/a\" || password == \"n/a\") {\n /* On any Error we want to display it. */\n Toast.makeText(SendVoipSMS.this, \"Not enough credentials provided, please press the menu button and enter the required info\", \n Toast.LENGTH_LONG).show();\t\t\t\t\t\n return;\n }\n EditText text = (EditText) findViewById(R.id.ToNumberText);\n String toNumber = text.getText().toString();\n String fromNumber = preferences.getString(\"number\", \"\");\n text = (EditText) findViewById(R.id.SMSText);\n String smsText = text.getText().toString();\n //Toast.makeText(\n //\t\tSendVoipSMS.this,\n //\t\t\"You entered user: \" + username + \" and password: \"\n //\t\t+ password + \" voip: \" + voipprovider + \" text: \" + smsText, Toast.LENGTH_LONG).show();\n\n String postURL = \"https://www.\" + voipprovider + \".com/myaccount/sendsms.php\";\n Integer nSend = 0;\n\t\t\t\t\n for (String token: StringUtility.splitEqually(smsText, 159)) {\n Log.e(\"Log\", token);\n try {\n // *** BELOW IS FAILSAFE BETTER VERSION UNCOMMENT IF OTHER FAILS***\n //SchemeRegistry schemeRegistry = new SchemeRegistry();\n //schemeRegistry.register(new Scheme(\"http\", PlainSocketFactory.getSocketFactory(), 80));\n //schemeRegistry.register(new Scheme(\"https\", new EasySSLSocketFactory(), 443));\n\t\t\t\t\t\t \n //HttpParams params = new BasicHttpParams();\n //params.setParameter(ConnManagerPNames.MAX_TOTAL_CONNECTIONS, 30);\n //params.setParameter(ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE, new ConnPerRouteBean(30));\n //params.setParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, false);\n //HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);\n\t\t\t\t\t\t \n //ClientConnectionManager cm = new SingleClientConnManager(params, schemeRegistry);\n //DefaultHttpClient httpClient = new DefaultHttpClient(cm, params);\n // ***FAILSAFE CONNECTION ENDS***\n\t\t\t\t\t\t\n // create a secure ssl connection that accepts all certificates (how secure is that :))\n HostnameVerifier hostnameVerifier = org.apache.http.conn.ssl.SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER;\n DefaultHttpClient client = new DefaultHttpClient();\n SchemeRegistry registry = new SchemeRegistry();\n SSLSocketFactory socketFactory = SSLSocketFactory.getSocketFactory();\n socketFactory.setHostnameVerifier((X509HostnameVerifier) hostnameVerifier);\n registry.register(new Scheme(\"https\", socketFactory, 443));\n // single thread for now, no need for thread safe conn manager\n //ThreadSafeClientConnManager mgr = new ThreadSafeClientConnManager (client.getParams(), registry);\n SingleClientConnManager mgr = new SingleClientConnManager(client.getParams(), registry);\n // the actual client\n DefaultHttpClient httpClient = new DefaultHttpClient(mgr, client.getParams());\n // Set verifier \n HttpsURLConnection.setDefaultHostnameVerifier(hostnameVerifier);\n\n if(token.charAt(token.length()-1) == ' ') {\n token = token.substring(0, token.length()-1);\n }\n\t\t\t\t\t\t\n // ***HTTP POST STOPPED WORKING - COMMENTED OUT***\n // setup the HTTP POST Request\n //HttpPost post = new HttpPost(postURL);\n //List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(5);\n //nameValuePairs.add(new BasicNameValuePair(\"username\", username));\n //nameValuePairs.add(new BasicNameValuePair(\"password\", password));\n //nameValuePairs.add(new BasicNameValuePair(\"to\", toNumber));\n //nameValuePairs.add(new BasicNameValuePair(\"from\", fromNumber));\n //nameValuePairs.add(new BasicNameValuePair(\"text\", token));\n //post.setEntity(new UrlEncodedFormEntity(nameValuePairs));\n // ***HTTP POST ENDS HERE ***\n\n String strURL = postURL + \"?username=\"+username+\"&password=\"+password+\"&to=\"+toNumber+\"&from=\"+fromNumber+\"&text=\"+token;\n Log.e(\"Log\",strURL +\" \" + token.length());\n HttpGet httpGet = new HttpGet(strURL);\n // *** Tried to do the HttpGet with a Uri Builder but consumed more memory \n // and decided to keep the above 3 line solution***\n //HttpGet httpGet = new HttpGet();\n //Uri uri = new Uri.Builder()\n //.scheme(\"https\")\n //.authority(\"www.\"+ voipprovider+\".com\")\n //.path(\"myaccount/sendsms.php\")\n //.appendQueryParameter(\"username\", username)\n //.appendQueryParameter(\"password\", password)\n //.appendQueryParameter(\"to\", toNumber)\n //.appendQueryParameter(\"from\", fromNumber)\n //.appendQueryParameter(\"text\", token)\n //.build();\n //httpGet.setURI(new URI(uri.toString()));\n //Log.e(\"Log\",uri.toString() +\" \" + token.length());\n // *** Uri Builder ends here ***\t\t\t\n\n // Execute the request\n HttpResponse response = httpClient.execute(httpGet);\n HttpEntity entity = response.getEntity();\n // get the response string\n String responseText = EntityUtils.toString(entity);\n\n //Toast.makeText(SendVoipSMS.this, \"Result\" + response.getStatusLine(), Toast.LENGTH_LONG).show();\n Log.e(\"Error\", \"Result\" + responseText);\n\n nSend++;\n } catch (Exception e) {\n Log.e(\"log_tag\", \"Error in http connection, did you enter the correct user/password ?. error trace: \"+e.toString());\n e.printStackTrace ();\t\t \t\n /* On any Error we want to display it. */\n Toast.makeText(SendVoipSMS.this, \"Error in sending Voip SMS\" + e.getStackTrace(), Toast.LENGTH_LONG).show();\n return;\n }\n\n }\n // Notify the user that the SMS has been sent successfully along with the actual number of SMSs sent\n Toast.makeText(SendVoipSMS.this, nSend.toString() + \" SMS send successfully!\", Toast.LENGTH_LONG).show();\n //Toast.makeText(\n //\t\tSendVoipSMS.this,\n //\t\t\"Server responed with \" + myString, Toast.LENGTH_LONG).show();\t\t\t\t\n }\n }); \n\n\n }",
"public void sendSmsMessage(String phoneNumber, String message)\n {\n if(phoneNumber != null)\n chatTransport.getParentChatSession()\n .setDefaultSmsNumber(phoneNumber);\n\n SMSManager.sendSMS(phoneNumber, message, chatTransport, chatPanel);\n\n this.dispose();\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 }"
] |
[
"0.75879985",
"0.7406161",
"0.6965352",
"0.68259984",
"0.67904896",
"0.6769133",
"0.6751193",
"0.6743582",
"0.67432034",
"0.67243725",
"0.66391766",
"0.6538997",
"0.653233",
"0.65259933",
"0.6443084",
"0.64365375",
"0.6422887",
"0.63886875",
"0.6339056",
"0.63288975",
"0.6288149",
"0.627249",
"0.6254704",
"0.6210869",
"0.61992717",
"0.61219066",
"0.6092228",
"0.60889053",
"0.6072333",
"0.60555696",
"0.60311496",
"0.5993848",
"0.5976979",
"0.59617037",
"0.59490424",
"0.5948976",
"0.5899451",
"0.58946615",
"0.5884882",
"0.5869841",
"0.5856123",
"0.5845051",
"0.583914",
"0.58336467",
"0.5829282",
"0.58242315",
"0.5810823",
"0.58012366",
"0.5795165",
"0.57915795",
"0.5786791",
"0.5772804",
"0.574032",
"0.5731282",
"0.5692114",
"0.56754637",
"0.567534",
"0.56706417",
"0.5667569",
"0.5644154",
"0.56316215",
"0.56239057",
"0.56061757",
"0.5599852",
"0.55830854",
"0.5563847",
"0.5555424",
"0.5550226",
"0.5522193",
"0.55192393",
"0.55065787",
"0.5493163",
"0.5474215",
"0.5471087",
"0.544346",
"0.5440019",
"0.5437912",
"0.5434232",
"0.54259014",
"0.5424537",
"0.542354",
"0.54204637",
"0.5414131",
"0.54135126",
"0.5410561",
"0.5400091",
"0.5394868",
"0.5390903",
"0.5386477",
"0.53847265",
"0.53775996",
"0.5375695",
"0.5366043",
"0.5363801",
"0.536045",
"0.53570294",
"0.534425",
"0.53392714",
"0.53360206",
"0.5335271",
"0.53328204"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
public static void main(String[] args) {
Members_Inner_class a = new Members_Inner_class();
Members_Inner_class.Inner obj = a.new Inner();//Members
obj.msg();
}
|
{
"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
|
long fixedDelay = getFixedDelayComponentNanos(timeout, unit); long randMod = getRandomDelayModulusNanos(timeout, unit);
|
public boolean transferMoney(Account fromAcct, Account toAcct, DollarAmount amount,
long timeout, TimeUnit unit)
throws DollarAmount.InsufficientFundsException, InterruptedException {
long stopTime = System.nanoTime() + unit.toNanos(timeout);
for (; ; ) {
if (fromAcct.lock.tryLock()) {
try {
if (toAcct.lock.tryLock()) {
try {
if (fromAcct.getBalance().compareTo(amount) < 0) {
throw new DollarAmount.InsufficientFundsException();
} else {
fromAcct.debit(amount);
toAcct.credit(amount);
return true;
}
} finally {
toAcct.lock.unlock();
}
}
} finally {
fromAcct.lock.unlock();
}
}
if (System.nanoTime() > stopTime)
return false;
// TimeUnit.NANOSECONDS.sleep(fixedDelay + rnd.nextLong() % randMod);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public long getDelay();",
"public double getDelay();",
"long getInitialDelayInSeconds();",
"private void changeDelay() {\n delay = ((int) (Math.random() * 10000) + 1000) / MAX_FRAMES;\n }",
"public static void randomDelay() {\n\n Random random = new Random();\n int delay = 500 + random.nextInt(2000);\n try {\n sleep(delay);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"@Test\n public void testDelay() {\n long future = System.currentTimeMillis() + (rc.getRetryDelay() * 1000L);\n\n rc.delay();\n\n assertTrue(System.currentTimeMillis() >= future);\n }",
"public void setDelay(long d){delay = d;}",
"int getNominalDelay();",
"public static int randomSleepTime() {\n return ThreadLocalRandom.current().nextInt(2000);\n }",
"int getChronicDelayTime();",
"public void setDelay(double clock);",
"public Integer threadDelay();",
"int getMaximumDelay();",
"int getAbsoluteMaximumDelay();",
"public long getDelay() {\n return this.delay;\n }",
"private double generateTimeServ() throws ExceptionInvalidTimeDelay {\n if (distribution != null) {\n if (distribution.equalsIgnoreCase(\"exp\")) {\n timeServ = FunRand.exp(parametr);\n } else if (distribution.equalsIgnoreCase(\"unif\")) {\n timeServ = FunRand.unif(parametr - paramDeviation, parametr + paramDeviation);\n } else if (distribution.equalsIgnoreCase(\"norm\")) {\n timeServ = FunRand.norm(parametr, paramDeviation);\n }\n } else {\n timeServ = parametr;\n }\n return timeServ;\n }",
"public long getDelay()\n {\n return delay;\n }",
"long getRevokeDelay();",
"public int getDelayedTimeout();",
"@Override\n public native int getAutoDelay();",
"public abstract int delay();",
"public long getStartDelay() {\n/* 201 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public UGen getDelayUGen() {\r\n\t\tif (isDelayStatic) {\r\n\t\t\treturn null;\r\n\t\t} else {\r\n\t\t\treturn delayUGen;\r\n\t\t}\r\n\t}",
"@Override\n public long getDelay(TimeUnit unit) {\n return unit.convert( delayOffset + delayPerElement - System.currentTimeMillis(), TimeUnit.MILLISECONDS );\n }",
"public double nextServiceTime() {\n return (-1 / mu) * Math.log(1 - randomST.nextDouble());\n }",
"private void randomDelay(double min, double max) {\n\t\ttry {\n\t\t\tdouble delaySecs = rnd.nextDouble() * (max - min) + min;\n\n\t\t\tThread.sleep((long) (delaySecs * 1000));\n\t\t} catch (InterruptedException e) {\n\t\t\t// ignore\n\t\t}\n\t}",
"public void setDelay(long delay) {\n this.delay = delay;\n }",
"long random(long ws) {\r\n\t\treturn (System.currentTimeMillis() % ws);\r\n\t}",
"static int getRandomDelta() {\n int d = rand.nextInt(100);\n if (d < 50) {\n return -1;\n } else {\n return 1;\n }\n }",
"private void simulateDelay(long millis) {\n try {\n Thread.sleep(millis);\n } catch (InterruptedException ignored) {\n }\n }",
"public native int getDelay() throws MagickException;",
"private static void delay() throws InterruptedException {\n\t\tTimeUnit.MILLISECONDS.sleep((long) (minDelay + (long)(Math.random() * ((maxDelay - minDelay) + 1))));\n\t}",
"public long getDelay(TimeUnit timeUnit) {\n return future.getDelay(timeUnit);\n }",
"public Long getDelaytime() {\n return delaytime;\n }",
"public int getDelay()\n {\n return delay;\n }",
"public long getDelay() {\n return mDelay;\n }",
"String getDelayPattern();",
"public static long randomTime() {\n return (random.nextInt(11) + 25)*1000;\n }",
"public int getDelay() {\r\n return delay;\r\n }",
"public NaughtyModule(int period)\n\t{\n\t\tdelay = 2 * period;\n\t}",
"private long getDelayTimeInMilliseconds(LocalDateTime now, LocalDateTime until) {\n long millis = (long) (Duration.between(now, until).toMillis() * CHECK_RENEW_RATIO);\n if (millis > 0) {\n return millis;\n }\n return 0;\n }",
"public long getDelayTime() {\n return (long) this.DELAY_TIME;\n }",
"public int getDelay()\r\n {\r\n return this.delay;\r\n }",
"public float getDelay()\n\t{\n\t\treturn delay;\n\t}",
"private Duration nextDelay() {\n return this.reconnectDelay.nextDelay();\n }",
"public int getDelayTime()\n\t{\n\t\treturn delayTime;\n\t}",
"public int getDelay() {\n return delay;\n }",
"private void emulateDelay() {\n try {\n Thread.sleep(700);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"public float getRepeatDelay()\n\t{\n\t\treturn repeatDelay;\n\t}",
"@WithName(\"schedule.delay\")\n @WithDefault(\"5s\")\n Duration scheduleDelay();",
"@Override\n public long generateNewTimeToNextContract() {\n return new Random().nextInt(5);\n }",
"public BigDecimal getDelay() {\r\n return delay;\r\n }",
"public static void sleep(int delay) {\n try {\n \t// int delay = (int)(Math.random()*maxDelay);\n Thread.sleep(delay);\n } catch (InterruptedException e) {}\n\t}",
"public int getDelay() {\r\n\t\treturn delay;\r\n\t}",
"public static double genRandomServiceTime() {\n return Simulator.randomGenerator.genServiceTime();\n }",
"private int calcOrderDelay()\r\n {\r\n int frameDelay = 0;\r\n if (totalSecondsElapsed >= 120)\r\n {\r\n frameDelay = 2;\r\n }\r\n else if (totalSecondsElapsed >= 90)\r\n {\r\n frameDelay = 3;\r\n }\r\n else if (totalSecondsElapsed >= 60)\r\n {\r\n frameDelay = 4;\r\n }\r\n else if (totalSecondsElapsed >= 45)\r\n {\r\n frameDelay = 5;\r\n }\r\n else if (totalSecondsElapsed >= 30)\r\n {\r\n frameDelay = 6;\r\n }\r\n else if (totalSecondsElapsed >= 15)\r\n {\r\n frameDelay = 7;\r\n }\r\n else if (totalSecondsElapsed >= 0)\r\n {\r\n frameDelay = 8;\r\n }\r\n \r\n return frameDelay * 60;\r\n }",
"public int getDelay() {\n\t\treturn delay;\n\t}",
"public static int getRandomStayDuration() {\n\t\tint stayDuration = (int)(Math.random()*3+1);\n\t\treturn stayDuration;\n\t}",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.PaymentDelay getPaymentDelay();",
"public static void randomSleep(int maxDelay) {\n \tint delay = (int)(Math.random()*maxDelay);\n \tsleep(delay);\n\t}",
"void delayForDesiredFPS(){\n delayMs=(int)Math.round(desiredPeriodMs-(float)getLastDtNs()/1000000);\n if(delayMs<0) delayMs=1;\n try {Thread.currentThread().sleep(delayMs);} catch (java.lang.InterruptedException e) {}\n }",
"public AutonDelay(double timeout) {\n super(\"autonDelay\");\n setTimeout(timeout);\n }",
"ScheduledFuture<?> scheduleAtFixedRate(Runnable publisher, long period, TimeUnit timeUnit, ProbeLevel probeLevel);",
"public int getDelay() {\n\t\treturn timer.getDelay();\n\t}",
"public static void testDelayElements() {\n Flux<Integer> flux2 = Flux.range(0, 2).delayElements(Duration.ofMillis(1));\n SchedulerUtils.createSubscribers(flux2);\n}",
"long getVoteFinalizeDelaySeconds();",
"@ParameterizedTest(name = \"[{index}] first digit: {0}\")\n @ValueSource(strings = {\"0\"})\n void resetRequest_PaymentResponseWithDelay(int lastDigit) {\n\n Map<String, ContractProperty> contractProperties = new HashMap<>();\n contractProperties.put(\"delay\", new ContractProperty(\"true\"));\n\n // given: the payment request containing the magic amount and a contractConfiguration\n ResetRequest request = MockUtils.aResetRequestBuilder()\n .withAmount(new Amount(new BigInteger(\"6000\" + lastDigit), Currency.getInstance(\"EUR\")))\n .withContractConfiguration(new ContractConfiguration(\"Sandbox APM\", contractProperties))\n .build();\n\n long startTime = System.currentTimeMillis();\n\n // when: calling the method paymentRequest\n ResetResponse response = service.resetRequest(request);\n\n long endTime = System.currentTimeMillis();\n\n long duration = (endTime - startTime);\n\n // then: the response is a success\n assertEquals(ResetResponseSuccess.class, response.getClass());\n assertTrue(duration > 2000);\n }",
"private long calculateTimeToWait(int min, int max, long totalRunningTime)\n {\n double randomNumber = Math.random();\n\n if (randomNumber < 0.003)\n return Random.nextInt(60523, 127443);\n\n if (randomNumber < 0.05)\n return Random.nextInt(2519, 28111);\n\n long waitTime = (long) Random.nextInt(min, max);\n return (long) Math.floor(waitTime * (1 / (1 - (totalRunningTime / FIVE_HOURS_MILLIS))));\n }",
"public double getTotalDelayTime() {\r\n return totalDelayTime;\r\n }",
"static public Long randomval() {\n Random rand = new Random();\n Long val = rand.nextLong() % p;\n return val;\n }",
"public double generateDropTime() {\n return LOWERLIMTIME + (Math.random() * ((UPPERLIMTIME - LOWERLIMTIME) + 1));\n\n }",
"@Override\n public native void delay(int ms);",
"private double getRandom() {\n return 2*Math.random() - 1;\n }",
"private long sleepForRandomAmountOfTime() throws InterruptedException {\n final long backOffMillis = zeroTo(MAX_BACK_OFF_MILLIS);\n if (LOGGER.isTraceEnabled()) {\n LOGGER.trace(\"Backing off for \" + backOffMillis + \"ms\");\n }\n Thread.sleep(backOffMillis);\n return backOffMillis;\n }",
"private int get_delay() {\n double exp = slider1.getValue() / 100.0 - 9; // Range -9, 1\n exp = Math.min(0, exp); // Range -9, 0\n return (int) (Math.pow(10.0, exp) * 100000000.0);\n }",
"public double CPUServiceTime()\r\n\t{\r\n\t\treturn Math.random()* (30.0 - 10.0) + 10.0;\r\n\t}",
"private static void addDelay() {\n try {\n Thread.sleep(4000);\n } catch (InterruptedException ignored) {\n }\n }",
"String getRedeliveryDelay();",
"@Scheduled(fixedDelay = 3000)\n\tpublic void scheduleTaskWithFixedDelay() {\n\t\tlog.info(\"Fixed Delay Task :: Execution Time - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t\t//Sleep TimeUnit\n//\t\ttry {\n//\t\t\tTimeUnit.SECONDS.sleep(5);\n//\t\t} catch (Exception e) {\n//\t\t\tlog.error(\"Ran into an error {}\", e);\n//\t throw new IllegalStateException(e);\n//\t\t}\n\t}",
"public static int getRandomEventChance() {\r\n\t\treturn 10; // 1-in\r\n\t}",
"public int generateServiceTime()\n\t{\n\t\tmyRandom = new Random();\n\t\treturn myRandom.nextInt(this.getMyMaxTimeOfService()) + 1;\n\t}",
"static final int fast_rand()\n\t{\n\t\tRz = 36969 * (Rz & 65535) + (Rz >>> 16);// ((Rz >>> 16) & 65535);\n\t\tRw = 18000 * (Rw & 65535) + (Rw >>> 16);// ((Rw >>> 16) & 65535);\n\t\treturn (Rz << 16) + Rw;\n\t}",
"public void delay(){\n try {\n Thread.sleep((long) ((samplingTime * simulationSpeed.factor)* 1000));\n } catch (InterruptedException e) {\n started = false;\n }\n }",
"private Duration calculateRetryDelay(int backoffCount) {\n long delayWithJitterInNanos = ThreadLocalRandom.current()\n .nextLong((long) (throttlingDelay.toNanos() * (1 - JITTER_FACTOR)),\n (long) (throttlingDelay.toNanos() * (1 + JITTER_FACTOR)));\n\n return Duration.ofNanos(Math.min((1L << backoffCount) * delayWithJitterInNanos, maxThrottlingDelay.toNanos()));\n }",
"public static double ParaTimer(){\n return (System.nanoTime() - timer)/(1000000000.);\n }",
"static int randomDelta(int average)\n\t{\n\t\treturn rand.nextInt(4*average + 1) - 2*average;\n\t}",
"private static long computeSleepTimeMillis(int retryCount, long baseSleepTimeMillis, long maxSleepMillis)\n {\n long baseTime = baseSleepTimeMillis * (1L << retryCount);\n // its possible that this overflows, so fall back to max;\n if (baseTime <= 0)\n {\n baseTime = maxSleepMillis;\n }\n // now make sure this is capped to target max\n baseTime = Math.min(baseTime, maxSleepMillis);\n\n return (long) (baseTime * (ThreadLocalRandom.current().nextDouble() + 0.5));\n }",
"public org.apache.axis.types.UnsignedInt getDelay() {\n return delay;\n }",
"public int getDelay() {\n return Math.abs(currentRequest.getRequestToFloor() - currentRequest.getRequestFromFloor()) * 1000;\n }",
"public int wait_cycle(){\n\t\tRandom r1=new Random();\n\t\tint r2=r1.nextInt((999)+1)+1;\n\t\treturn r2;\n\t}",
"long getRepeatIntervalPref();",
"public void setStartDelay(long startDelay) {\n/* 211 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void delay(long waitAmount){\r\n long time = System.currentTimeMillis();\r\n while ((time+waitAmount)>=System.currentTimeMillis()){ \r\n //nothing\r\n }\r\n }",
"public Delay(int sd){\n super(\"delay\");\n delay = sd;\n\n }",
"public Long getMaxDelayTime() {\n return this.MaxDelayTime;\n }",
"public void setDelaytime(Long delaytime) {\n this.delaytime = delaytime;\n }",
"public void setDelay(int delay)\n {\n this.delay = delay;\n }",
"public static void randomSleep(int minDelay, int maxDelay) {\n \tint delay = (int)(minDelay + Math.random()*(maxDelay-minDelay));\n \tsleep(delay);\n\t}",
"@Nonnull\r\n\tpublic static <T> Observable<T> delay(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\tfinal long time,\r\n\t\t\t@Nonnull final TimeUnit unit,\r\n\t\t\t@Nonnull final Scheduler pool) {\r\n\t\treturn new Delay.ByTime<T>(source, time, unit, pool, true);\r\n\t}",
"public long getRandLong()\n {\n long lowerBound = 2000;\n long upperBound = 6000;\n Random r = new Random();\n \n long randLong = lowerBound + (long)(r.nextDouble()*(upperBound - lowerBound));\n return randLong;\n }",
"@Test\n public void genRandom() {\n runAndWait(() -> genRandom(10_000, 500, 1), 32, 2000);\n runAndWait(() -> genRandom(10_000, 500, 100), 32, 2000);\n runAndWait(() -> genRandom(250_000, 4000, 50), 4, 5_000);\n }"
] |
[
"0.7037306",
"0.68387073",
"0.6730982",
"0.66528946",
"0.650288",
"0.64582163",
"0.63528764",
"0.6333456",
"0.6299099",
"0.6265326",
"0.6226698",
"0.6180986",
"0.61597735",
"0.6094301",
"0.6044113",
"0.6039049",
"0.59824485",
"0.5968935",
"0.5962792",
"0.5954478",
"0.5941531",
"0.59395605",
"0.5920052",
"0.5908495",
"0.58807546",
"0.5871572",
"0.58481205",
"0.5843283",
"0.58126193",
"0.5809576",
"0.58032566",
"0.57888025",
"0.5781855",
"0.5774895",
"0.5743512",
"0.5740519",
"0.57397425",
"0.57202286",
"0.5715183",
"0.5715098",
"0.570399",
"0.5703304",
"0.56506455",
"0.56444013",
"0.5643459",
"0.56420654",
"0.5640922",
"0.5637335",
"0.5624907",
"0.5623741",
"0.56226456",
"0.5616462",
"0.5602981",
"0.5591957",
"0.55773747",
"0.55569744",
"0.55117214",
"0.5503175",
"0.5498725",
"0.5496801",
"0.5490895",
"0.54848015",
"0.547811",
"0.54763156",
"0.54731",
"0.5429053",
"0.5426913",
"0.53840804",
"0.53717697",
"0.5364098",
"0.5363712",
"0.53580767",
"0.53511995",
"0.5343993",
"0.53385943",
"0.5337479",
"0.5335695",
"0.5335567",
"0.5322656",
"0.5312632",
"0.5311344",
"0.530148",
"0.5298751",
"0.5282792",
"0.5281981",
"0.527781",
"0.52754045",
"0.52654535",
"0.5250439",
"0.5242344",
"0.52362746",
"0.5234842",
"0.52271825",
"0.5225076",
"0.522312",
"0.5216615",
"0.521082",
"0.5195747",
"0.51904976",
"0.51840067",
"0.51832294"
] |
0.0
|
-1
|
/Cover the concept of Inheritance using constructor and Inheritance using Method Overriding
|
public static void main(String args[]) {
InheritanceUsingConstrChild child=new InheritanceUsingConstrChild();
child.display();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public ConStructorInheritance(){\r\n\t\t\r\n\t\tSystem.out.println(\"Parent Class Constructor\");\r\n\t\t\r\n\t\t\r\n\t}",
"Inheritance createInheritance();",
"protected Animal() {\t\r\n\t}",
"_ExtendsNotAbstract() {\n super(\"s\"); // needs this if not default ctor;\n }",
"Base1()\r\n\t{\r\n\t\tSystem.out.println(\"Base Constructor Called\");\r\n\t}",
"private void testInheritance() {\n AbstractVehicle myCar = new Car();\n\n myCar.drive();\n\n //So a super class can be instantiated using instance of its subclass\n //But reverse is not true, so although VolvoCar extends Car,\n //we cannot create instance of VolvoCar from Car instance.\n //VolvoCar volvoCar = new Car();\n VolvoCar volvoCar = new VolvoCar();\n volvoCar.drive();\n\n //However, in such a scenario the super class can only invoke its own methods,\n // and not methods of the sub-class.....\n //So myCar can invoke methods defined in Vehicle class where actual\n //implementation comes from Car instance.\n //so getNoOfDoors will return 4.\n System.out.println(\"Car doors - \" + myCar.getNoOfDoors());\n\n //But myCar cannot invoke isInsured() which is defined only in subclass Car.\n //Below line gives error cannot resolve isInsured() in Vehicle.\n //myCar.isInsured();\n \n Car testCar = new Car();\n testCar.isInsured();\n\n }",
"protected ChildType() {/* intentionally empty block */}",
"private static void LessonInheritance() {\n Employee employee1 = new Employee();\n\n //Set Id , firstName and lastName of Employee from Person Class and BaseBO\n employee1.setId(13);\n employee1.setFirstName(\"Jordan(e)\");\n employee1.setLastName(\"Walker(e)\");\n\n //Print info out\n System.out.println(\"Id#\" + employee1.getId() + \" \" + employee1.getFirstName() + \" \" + employee1.getLastName());\n\n //create a Person object and inherit from BaseBO class Id\n Person person3 = new Person();\n person3.setId(7);\n person3.setFirstName(\"Jordan(p)\");\n person3.setLastName(\"Walker(p)\");\n\n System.out.println(\"Id#\" + person3.getId() + \" \" + person3.getFirstName() + \" \" + person3.getLastName());\n }",
"public AbstractClassExtend() {\n\t\tsuper(\"hello\");\n\t}",
"protected abstract void construct();",
"public ChildOfInheritance(String name) {\n\t\tsuper(name, 1);\n\t\t\n\t}",
"public Person(){\r\n\t\tsuper();\r\n\t}",
"Parent() {\n\t System.out.println(\"i am from Parent Class\");\n\t }",
"public SavingsAccount(double startBalance, double startInterestRate)\n {\n super(startBalance);\n setInterestRate(startInterestRate);\n System.out.println(\"Overloaded Constructor called.\");\n }",
"Parent()\n\t{\n\t\tSystem.out.println(\"This is parent's default constructor\");\n\t}",
"protected BaseFeat()\n {\n super(TYPE);\n }",
"Vehicle() \n {\n System.out.println(\"Constructor of the Super class called\");\n noOfTyres = 5;\n accessories = true;\n brand = \"X\";\n counter++;\n }",
"public static void main(String[] args) {\n\t\t// 7.2 Inheritance in Java\n\t\t// Relationship between two classes, Cat and HouseCat\n\t\t// HouseCat extends Cat, in other words HouseCat is a subclass of Cat\n\n\t\t// Remember our access modifiers..\n\t\t// HouseCat has access to any public or protected variables/methods of Cat\n\n\t\t// 7.3.1 - Inheriting fields/properties/methods\n\t\tHouseCat garfield = new HouseCat(\"Garfield\", 12);\n\t\t\n\t\t// HouseCat class doesn't have an eat method, but Cat class does! (inheritance\n\t\t// at work)\n\t\tgarfield.eat();\n\t\t\n\t\t// prints true\n\t\tSystem.out.println(garfield.isTired());\n\n\t\t// 7.3.2 - Super\n\t\tHouseCat mittens = new HouseCat(8.4);\n\t\t// Super calls the constructor of the parent class (see HouseCat constructor)\n\t\t// Also note that the super() - default constructor - is called by default\n\n\t\t// 7.3.3 @Override\n\t\t// A new annotation!\n\n\t\t// When extending a class, occasionally we want to modify or override the\n\t\t// behavior provided by the parent class, when we do, we use the @override annotation!\n\t\t\n\t\t// See: Cat and HouseCat classes noise() method\n\t\t// Both Cat and HouseCat class have a noise() method\n\t\t\n\t\tCat plainCat = new Cat(8.6);\n\t\tHouseCat cheshireCat = new HouseCat(\"Cheshire\", 12);\n\n\t\tSystem.out.println(plainCat.noise()); // prints \"Meeeeeeooooowww!\"\n\t\tSystem.out.println(cheshireCat.noise()); // prints \"Hello, my name is Cheshire!\"\n\t\t\n\t\t// 7.4.1 Abstract classes\n\t\t// Abstract classes allow for \"base\" classes where you have a lot of shared functionality.\n\t\t// However, when you have an abstract class you cannot instantiate an instance of that class!\n\t\t\n\t\t// For example, if we make the Cat class abstract, we can no longer do the following:\n\t\t// Cat salem = new Cat(8);\n\t\t\n\t\t// 7.4.2 Abstract methods\n\t\t// Just as we can have abstract classes, we can have abstract methods. Abstract methods are different\n\t\t// than abstract classes though. Abstract methods are more like interface methods in that they only have\n\t\t// a method signature, no body and MUST be implemented by any sub-classes.\n\t\t\n\t\t// 7.5 Casting\n\t\t// When one class extends another, as HouseCat extends Cat, a field or local variable of the type of \n\t\t// the base class may hold an object that is of the type of the child class.\n\t\tCat suki = new HouseCat(\"Suki\", 8);\n\t\tsuki.eat();\n\t\tSystem.out.println(suki.noise()); // Hello, my name is Suki!\n\t\t \n\n\t\t// Remember, as far as it knows, it's declared as a Cat, instantiated as a HouseCat\n\t\t// Side note: Most developers create interfaces that have all declared methods and have implementations\n\t\t// that implement them, so this doesn't become a problem.\n\t\t// suki.isSatisfied();\t\t\t// doesn't have such a method\n\t\t\n\t\t// As long as suki really is a HouseCat, this works by Casting it to the right class \n\t\t// and calling the method on it!\n\t\t\n\t\t// Something I would do...\n\t\tif (suki instanceof HouseCat) {\n\t\t\t// safely cast\n\t\t\t((HouseCat) suki).isSatisfied();\n\t\t}\n\t\t\n\t\t// 7.6 - Testing inheritance\n\t\t// See CatTest\n\t\t\n\t\t// Lets do some checking on your learning :)\n\t\tCat baseCat = new Cat(5.0);\n\t\tHouseCat houseCat = new HouseCat(10.0);\n\t\t\n\n\t\tif(baseCat instanceof Cat) {\n\t\t\t// This better be true\n\t\t\tSystem.out.println(\"Cat is an instance of Cat\");\n\t\t}\n\t\t\n\t\tif(baseCat instanceof HouseCat) {\n\t\t\t// True or false?\n\t\t\tSystem.out.println(\"Cat is an instance of HouseCat\");\n\t\t}\n\t\t\n\t\tif(houseCat instanceof Cat) {\n\t\t\t// True or false?\n\t\t\tSystem.out.println(\"HouseCat is an instance of Cat\");\n\t\t}\n\t\t\n\t\tif(houseCat instanceof HouseCat) {\n\t\t\t// True or false?\n\t\t\tSystem.out.println(\"HouseCat is an instance of HouseCat\");\n\t\t}\n\t}",
"public Employee() {\r\n\t\t// super should be 1st line \r\n\t\tsuper();\r\n\t\tSystem.out.println(\"Hi i'm from constructor \");\r\n\t}",
"public static void main(String[] args) {\n// iron.setAge(38);\n// System.out.println(iron.getAge());\n\n\n SuperHero ironMan = new IronMan(100, 1000, 10);\n System.out.println(ironMan.getName());\n // DownCasting (SuperHero superclass -> IronMan subclass)\n System.out.println(((IronMan) ironMan).getNumOfSuits());\n ironMan.fight();\n\n SuperHero sp1 = new SpiderMan();\n SuperHero sp2 = new SpiderMan(70);\n SpiderMan sp3 = new SpiderMan(100,1000, 50);\n\n sp1.fight();\n sp2.fight();\n sp3.fight();\n\n SuperHero[] heros = new SuperHero[10];\n heros[0] = ironMan;\n heros[1] = sp1;\n heros[2] = sp2;\n\n // * inheritance (\"extends\" super class)\n // - subclass must call super class' constructor\n // (except when super class has a default constructor, Java automatically adds\n // a default constructor with super(); in it)\n // - everything (except for private fields) can be accessed from subclasses\n // - you can even override methods from super class - (\"method overriding\")\n // - you can create many methods with the same name unless they have different set of\n // parameters(arguments) - (\"method overloading\")\n // - method overloading example: many different constructors!\n // - inheritance creates \"is-a\" relationship.\n // * IronMan \"is-a\" SuperHero\n\n\n }",
"protected abstract void _extends( ClassOutlineImpl derived, ClassOutlineImpl base );",
"@Override // opcional\n public void init(){\n\n }",
"public b3(){\n super();\n }",
"public Supercar() {\r\n\t\t\r\n\t}",
"public AI(String n) {//constructor for super class\n super(n);\n }",
"private BigB()\r\n{\tsuper();\t\r\n}",
"public aed(World paramaqu)\r\n/* 9: */ {\r\n/* 10: 24 */ super(paramaqu);\r\n/* 11: */ }",
"public Dog(String Breed, String PrimaryColor, String Size, String name, int age){\r\n // setting the parent animal name\r\n super(name,age);\r\n // setting the parent animal age\r\n // System.out.println(\"Setting Breed...\");\r\n this.Breed = Breed ;\r\n // System.out.println(\"Setting PrimaryColor...\");\r\n this.PrimaryColor = PrimaryColor;\r\n //System.out.println(\"Setting Size...\");\r\n this.Size = Size;\r\n\r\n\r\n\r\n }",
"public SuperClass(int x)\r\n {\r\n _x = x;\r\n }",
"public Boop() {\n\t\tsuper();\n\t}",
"public Cat(){\n\t\tsuper();\n\t}",
"public SuperProduct() {\n\t\tsuper();\n\t}",
"private void __sep__Constructors__() {}",
"Doctor(){\n super();\n }",
"protected Betaling()\r\n\t{\r\n\t\t\r\n\t}",
"ConstuctorOverloading(){\n\t\tSystem.out.println(\"I am non=argument constructor\");\n\t}",
"public BaseParameters(){\r\n\t}",
"public static void main(String[] args) {\n ChildOfderived1 cd = new ChildOfderived1(10,20,30);\r\n }",
"TypicalCustomer() {\n super();\n }",
"public Child() {\n\t\tsuper(20);\n\t}",
"public Person1() {\n\t\tsuper();\n\t}",
"public Constructor(){\n\t\t\n\t}",
"ByCicle(int weight, String name) {\r\n //super keyword can be used to access the instance variables of superclass\r\n //\"super\" can also be used to invoke parent class constructor and method\r\n super(weight);//Accessign Superclass constructor and its variable\r\n //Global Variable=Local variable\r\n this.name = name;\r\n }",
"public Family(){\n super();\n }",
"public Picture ()\n {\n /* not needed but use it to show students the implicit call to super()\n * child constructors always call a parent constructor \n */\n super(); \n }",
"public Picture ()\n {\n /* not needed but use it to show students the implicit call to super()\n * child constructors always call a parent constructor \n */\n super(); \n }",
"public void constructor() {\n setEdibleAnimals();\n }",
"private static void LessonPolymorphism() {\n Employee empOne = new Employee(\"Bob\");\n Employee empTwo = new Employee(\"Linda\", \"Belcher\");\n System.out.println(empOne.getFirstName());\n System.out.println(empTwo.getFirstName() + \" \" + empTwo.getLastName());\n // run-time polymorphism - override\n //Override a method that is in a super class in a lower class\n // Create a method in BaseBO and create the same method in Empl\n BaseBO obj1 = new BaseBO();\n System.out.println(obj1.test_method());\n\n EntityType obj2 = new EntityType();\n System.out.println(obj2.test_method());\n }",
"public MountainBike() {\n super();\n }",
"public Student(Person person) {\r\n\t\tsuper(person);\r\n\t}",
"public Parent() {\n super();\n }",
"O() { super(null); }",
"public Implementor(){}",
"public Apple(){\n\n super();\n //super(\"\");\n System.out.println(\"appleapple\");\n\n\n }",
"public Shape(){\n\t\t//System.out.println(\"This is abstract class Shape\");\n\t}",
"public ChaCha()\n\t{\n\t\tsuper();\n\t}",
"protected AbstractReadablePacket() {\n this.constructor = createConstructor();\n }",
"public OOP_207(){\n\n }",
"public PennyFarthing(int startCadence, int startSpeed) {\n // Call the parent constructor with super\n super(startCadence, startSpeed, 0, \"PennyFarthing\");\n System.out.println(\"PennyFarthing.PennyFarthing- constructor with arguments\");\n }",
"public static void main(String[] args) {\n\t\tSuper s1 = new Super();\n\t\tSystem.out.println(s1.age);\n\t\ts1.work();\n\t\ts1.playBadook();\n\t\tSystem.out.println();\n\n\t\tSub s2 = new Sub();\n\t\tSystem.out.println(s2.height);\n\t\ts2.playGame();\n\t\ts2.work(); // overriding 했음\n\t\ts2.age = 20;\n\t\tSystem.out.println(s2.age);\n\t\tSystem.out.println(s1.age);\n\t\ts2.playBadook();\n\t\tSystem.out.println();\n\n//\t\tSuper s3=new Sub(); //오버라이딩일경우 자식의 메소드 호출 //추상클래스일경우 사용, 추상클래스는 new 불가\n\n\t\tSuper s3 = s2; // s2 가 Sub이지만 s3 타입이 Super이기 때문에 Super를 가리킴\n\t\t\n\t\tSystem.out.println(s3.age);\n\t\ts3.playBadook();\n\t\ts3.work(); // 원래는 자식꺼라 안되는데 overriding해서 됨\n\n\t\t// s3.height; //자식꺼라 안됨\n\t\t// s3.playGame() //자식꺼라 안됨\n\t}",
"public Dog ()\n {\n super (\"Dog\", \"Hi! My name is Snoop Dawg\");\n this.x = \"A bone\";\n /*\n * This dog has many features to it\n * Do not provoke it or else it will bite!\n * Otherwise, It's a nice dog so have fun!\n */\n \n \n }",
"Constructor() {\r\n\t\t \r\n\t }",
"public Retrait() {\n\t\tsuper();\n\t}",
"public static void main(String[] args) {\n\n\t\tDerived a = new Derived();\n\t\ta.method();\n\t\ta.method(10);\n\t\ta.methodToOverrride(100);\n\t\t\n\t\tBase b = new Derived();\n\t\tb.method(11);\n\t\tb.methodToOverrride(100);\n\t\t\n\t\t\n\t\tBase c = new Base();\n\t\tc.method(100);\n\t\tc.methodToOverrride(100);\n\t\t\n\t\t//constructor\n\t\tBase aa = new Derived();\n\t\tDerived aa1 = new Derived();\n\t\t\n\t\t\n\t\tString aaa = \"Infosys\";\n\t\tString abb = \"Infosys\";\n\t\t\n\t\tSystem.out.println(aaa==abb);\n\t\tSystem.out.println(aaa.equals(abb));\n\n\t\t\n\t\t\n\t}",
"protected Demon(int str, int hp)\n {\n super(str, hp);\n }",
"protected Shape() {}",
"public AbstractRecombinator() \r\n\t{\r\n\t\tsuper();\r\n\t\tsetPpl();\r\n\t\tsetSpl();\t\t\r\n\t}",
"public void init() {\r\n\t\t// to override\r\n\t}",
"public static void main(String[] args) {\n\n\t\t\tAbstractSuper obj = new AbstractSuper();\n\t\t}",
"public Car() {\r\n super();\r\n }",
"protected Product()\n\t{\n\t}",
"public PlantingHarvester(int x, int y)\n {\n super(x, y);\n }",
"public static void main(String[] args) {\n\t\t\n\t\tChild1 ch = new Child1();\n\t\t\n\t\tSystem.out.println(Inheritance.race); // static oldugundan kendi class adiyla cagirdik.\n\t\t\n\t\tSystem.out.println(ch.eyeColor);\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\tch.sing(); // parenttan geldi. inheritance class yani\n\t\tch.code(); // child1 den geldi. \n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"parent:\\n\");\n\t\t\n\t\tInheritance parent = new Inheritance();\n\t\t\t\n\t\tSystem.out.println(parent.hairColor);\t\n\t\t\n\t\tSystem.out.println(parent.eyeColor);\n\t\t\n\t\tSystem.out.println(Inheritance.race); \n\n\t\tSystem.out.println();\n\t\t\n\t\tparent.sing();\n//\t\tparent.code(); // cocugun behaviorlarini method kullanamaz\n\t\t\n}",
"public Human(int theShipType){\n super(theShipType);\n }",
"public Scale(Scale newScale){\n \tsuper(newScale);\n }",
"public Armor() {\n super();\n}",
"public HandLead(EntityHumanBase owner, ItemStack itemStack)\n/* 19: */ {\n/* 20:18 */ super(owner, itemStack);\n/* 21: */ }",
"public static void main(String[] args) {\n Derived d=new Derived();\r\n d.Cricket();\r\n d.Motor();\r\n\t}",
"public BarSeat(){\n\t\tsuper(1);\n\t}",
"public tn(String paramString, ho paramho)\r\n/* 12: */ {\r\n/* 13:11 */ super(paramString, paramho);\r\n/* 14: */ }",
"public AbstractClass() { //Sobrecarga del constructor AbstractClass ya que se puede inicializar de 2 maneras\n }",
"@Override\r\n\tpublic void method() {\n\t\tsuper.method();\r\n\t\tSystem.out.println(\"Iam in a subclass\");\r\n\t}",
"ParentClassTwo() {\n\t\tint i = 100;\n\t\tSystem.out.println(i);\n\t}",
"protected void childInit()\n {\n }",
"public Car() {\n super();\n }",
"public AbstractPurchaseSubCategory()\r\n {\r\n }",
"void DefaultConstructor(){}",
"Third()\n\t{\n\t\tsuper();\n\t\tSystem.out.println(\"Third level Constructor\");\n\t}",
"public static void main(String[] args) {\n\n\t\tDerived d2 = new Derived(\"홍길동\");\n\t\t//부모쪽에도 내가 처리하는 홍길동 넘겨서 overloading 된 생성자 호출..\n\t\td2.baseMethod(); //재정의 한 함수만 호출\n\t\t\n\t\t//어느날 부모님 자원이 그리워요 ....재정의 (x)\n\t\t//유일한 방법 : super 사용 (자식 클래스 내부)\n\t\td2.p_method();\n\t}",
"public CircusDog(String b)\n {\n super(b);\n }",
"Rule Inheritance() {\n return Sequence(\"extends \", Identifier());\n }",
"public ScribbleFactoryImpl()\n {\n\t\tsuper();\n\t}",
"public VariabilityFactoryImpl() {\n\t\tsuper();\n\t}",
"public Employee(String firstName, String lastName, int age, double salary) {\r\n //envoke the super class's constructor\r\n super(firstName, lastName, age);\r\n \r\n //set the instance variables specific to this class. \r\n this.salary = salary;\r\n employeeNumber = nextEmployeeNumber;\r\n nextEmployeeNumber++;\r\n }",
"public Hourly (String eName, String eAddress, String ePhone,\r\nString socSecNumber, double rate)\r\n{\r\nsuper(eName, eAddress, ePhone, socSecNumber, rate);\r\n//IMPLEMENT THIS\r\n}",
"public static void main(String [] args){\n MethodOverridingParentClass obj = new MethodOverridingChildClass();\n // It calls the child class method myMethod()\n obj.myMethod();\n\n\n\t\t/* When Parent class reference refers to the parent class object\n\t\t * then the method of parent class (overriden method) is called.\n\t\t */\n MethodOverridingParentClass obj1 = new MethodOverridingParentClass();\n obj1.myMethod();\n\n }",
"public BaseElement() {\n }",
"public static void main(String[] args) {\n\n// ChildPrint childPrint = new ChildPrint();\n// childPrint.printName();\n\n// ChildOverridingPrivate child = new ChildOverridingPrivate();\n// child.printName();\n\n ParentCasting parent = new ParentCasting();\n ChildCasting child = new ChildCasting();\n\n ParentCasting obj1 = new ChildCasting();\n ChildCasting obj2 = (ChildCasting) new ParentCasting();\n\n\n }",
"public BaseFeat(String inName)\n {\n super(inName, TYPE);\n }",
"public Cheese(Sandwich sandwich){\n super(sandwich);\n }",
"public Patient(String iD, String givenName, String surName)\n {\n super(iD, givenName, surName); \n }"
] |
[
"0.7186282",
"0.70980686",
"0.66109985",
"0.64565575",
"0.63878334",
"0.63734674",
"0.6257726",
"0.6228441",
"0.62130404",
"0.61823285",
"0.6180804",
"0.61560774",
"0.6143492",
"0.61000395",
"0.60939753",
"0.6046036",
"0.6025775",
"0.60201323",
"0.60126",
"0.5985356",
"0.596298",
"0.59563065",
"0.5952306",
"0.5951969",
"0.59359735",
"0.592353",
"0.5916745",
"0.5909786",
"0.5902727",
"0.59020436",
"0.5900863",
"0.5892325",
"0.5890096",
"0.58898187",
"0.5851147",
"0.5846404",
"0.5822306",
"0.581934",
"0.58168525",
"0.581085",
"0.5795837",
"0.5790243",
"0.57886344",
"0.5786169",
"0.57720035",
"0.57720035",
"0.5769275",
"0.57690525",
"0.5768764",
"0.57658523",
"0.5764293",
"0.57609004",
"0.5744102",
"0.57396907",
"0.57261",
"0.5723279",
"0.5718782",
"0.57045084",
"0.5702107",
"0.57007444",
"0.56791514",
"0.56661725",
"0.565755",
"0.56538767",
"0.5638132",
"0.56299907",
"0.5628194",
"0.56272185",
"0.5619641",
"0.5618594",
"0.5613925",
"0.56048095",
"0.5603805",
"0.56028974",
"0.56023026",
"0.5601382",
"0.55903906",
"0.55891377",
"0.55840564",
"0.5574918",
"0.5569153",
"0.5565978",
"0.5565465",
"0.5562686",
"0.5558753",
"0.5555112",
"0.55546945",
"0.5550937",
"0.55486",
"0.5541044",
"0.5540845",
"0.5538641",
"0.5537899",
"0.5527173",
"0.5525097",
"0.55239046",
"0.552389",
"0.55215645",
"0.5513808",
"0.55112475",
"0.5511036"
] |
0.0
|
-1
|
Returns the Paint object this renderer uses for drawing highlight indicators.
|
public Paint getPaintHighlight() {
return mHighlightPaint;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Paint getPaint() {\n return mPaint;\n }",
"public Paint getPaint()\r\n\t{\r\n\t\treturn _g2.getPaint();\r\n\t}",
"public Paint getPaint() {\n return paint;\n }",
"Shape getHighlightShape();",
"public Painter getPainter()\n/* */ {\n/* 113 */ return this.painter;\n/* */ }",
"public Color getHighlight();",
"public Painter<?> getPainter() {\n\t\tint width = 100;\n\t\tint height = 100;\n\t\tColor color1 = Colors.White.color(0.5f);\n\t\tColor color2 = Colors.Gray.color(0.5f);\n\n\t\tLinearGradientPaint gradientPaint = new LinearGradientPaint(0.0f, 0.0f,\n\t\t\t\twidth, height, new float[] { 0.0f, 1.0f }, new Color[] {\n\t\t\t\t\t\tcolor1, color2 });\n\t\tMattePainter mattePainter = new MattePainter(gradientPaint);\n\t\treturn mattePainter;\n\t}",
"@Override\n public Paint getPaint() {\n if (illegal()){\n Paint temp = new Paint(super.getPaint());\n temp.setColor(Color.RED);\n return temp;\n }\n return super.getPaint();\n }",
"public ColorUIResource getPrimaryControlHighlight() { return fPrimaryHighlight;}",
"public org.openxmlformats.schemas.drawingml.x2006.main.CTColor getPenClr()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTColor target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTColor)get_store().find_element_user(PENCLR$12, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"private SPlotPoint getCurrentHighlight()\r\n {\r\n SPlotPoint plotPoint = null;\r\n SPlotPoint point;\r\n\r\n\r\n // Go through Vector of points to find the point that requires \r\n // highlighting\r\n for (int i = 0; i<pointVector_.size(); i++)\r\n {\r\n point = (SPlotPoint)pointVector_.elementAt(i);\r\n if (point.getIsHilited() == true)\r\n { \r\n plotPoint = point;\r\n \r\n //break out of the loop once the highlighted point is found\r\n break;\r\n }\r\n else\r\n {\r\n plotPoint = null;\r\n }\r\n }\r\n return plotPoint;\r\n }",
"public SmartHighlightPainter() {\n\t\tsuper(DEFAULT_HIGHLIGHT_COLOR);\n\t}",
"public int getDrawingsColor(){\n return mPaintLine.getColor();\n }",
"public Paint getPaintRender() {\n return mRenderPaint;\n }",
"public final Paint getOutlinePaint() {\n return outlinePaint;\n }",
"public Color getHighlightColor() {\n return highlightColor;\n }",
"public final InputMethodHighlight getHighlight() {\n return highlight;\n }",
"public Color getDrawColor() {\n\t\treturn drawColor;\n\t}",
"Color getCurrentPenColour() {\n return this.currentPenColour;\n }",
"public Color getColor() {\n\t\treturn (Color)p.getPaint();\n\t}",
"public ShapeAttributes getHighlightAttributes()\n {\n return highlightAttrs;\n }",
"public LineSymbolPainter getSymbolPainter() {\n return symbolPainter;\n }",
"public Paint getTransportLineSelectedColor()\r\n {\r\n return selected_line_color;\r\n }",
"IfcSpecularHighlightSelect getSpecularHighlight();",
"public PDColor getInteriorColor() {\n/* 435 */ return getColor(COSName.IC);\n/* */ }",
"public boolean getUsePrimitivePaint() {\n/* 66 */ return this.usePrimitivePaint;\n/* */ }",
"public Paint getSeriesPaint() {\n return this.seriesPaint;\n}",
"public float getHighlightLineWidth() { return this.mHighlightLineWidth; }",
"@Override\n public Color getHighlightedColor() { return getLine().getMapColor(); }",
"public org.openxmlformats.schemas.drawingml.x2006.main.CTColor addNewPenClr()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTColor target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTColor)get_store().add_element_user(PENCLR$12);\n return target;\n }\n }",
"protected Highlighter createHighlighter() {\n return new BasicHighlighter();\n }",
"public String getFillColor();",
"public Paint getTool(){\n return this.tool;\n }",
"public LineSymbolPainter getLinePainter() {\n return linePainter;\n }",
"@Override\r\n\tpublic Color getBorderHighlightColor(Object entity) {\n\t\treturn null;\r\n\t}",
"public Color getBrushColor() {\n return this.brushColor;\n }",
"public DashPathEffect getDashPathEffectHighlight() { return this.mHighlightDashPathEffect; }",
"public Paint getBackground() {\r\n return background;\r\n }",
"public Painter findPainter(Integer id) throws NullPointerException;",
"public HighlightMode getHighlightMode() {\n return highlightMode;\n }",
"public Graphics getDrawGraphics()\n {\n return ((front == page1) ? page2 : page1).getGraphics();\n }",
"public Color getScrollBorderColor();",
"public Object addHighlight(int p0, int p1, Highlighter.HighlightPainter p)\n/* */ throws BadLocationException\n/* */ {\n/* 64 */ return new Object();\n/* */ }",
"public boolean getHighlight();",
"public Highlighter.Highlight[] getHighlights()\n/* */ {\n/* 86 */ return null;\n/* */ }",
"public final Painter[] getPainters()\n/* */ {\n/* 157 */ Painter[] results = new Painter[this.painters.length];\n/* 158 */ System.arraycopy(this.painters, 0, results, 0, results.length);\n/* 159 */ return results;\n/* */ }",
"BalloonAttributes getHighlightAttributes();",
"public static Color getButtonColorHighlight() {\n return BUTTONCOLOR_HIGHLIGHT;\n }",
"public final DrawingLibraryInterface getActiveGraphDrawing() {\n int selectedIndex = this.getSelectedIndex();\n\n return this.graphInterfaces.get(selectedIndex);\n }",
"public abstract Rect getRectForNodeHighlight();",
"void drawInterior(DrawContext dc, Object shape);",
"private Texture createInventoryHighlight() {\n Pixmap highlightPixmap = new Pixmap(1, 1, Pixmap.Format.RGBA8888);\n highlightPixmap.setColor(1, 1, 0, 0.5f);\n highlightPixmap.fill();\n Texture highlight = new Texture(highlightPixmap);\n highlightPixmap.dispose();\n return highlight;\n }",
"@FromAnyThread\n public static @Nullable PaintingControl getPaintingControl(@NotNull Node cursorNode) {\n return cursorNode.getControl(PaintingControl.class);\n }",
"@Override\r\n\tpublic Color getHighlightColor(Object rel) {\n\t\treturn DARK_RED;\r\n\t}",
"public static Color getTextHighlightColor() {\n return TEXT_HIGHLIGHT;\n }",
"public DefaultHighlighter() {\n setDrawsLayeredHighlights(true);\n }",
"@Override\r\n\tpublic Image getHighlightImage() {\n\t\treturn null;\r\n\t}",
"@Nonnull\n protected ImagePainter getImagePainter() {\n return fromNullable(painter).or(new DefaultImagePainter());\n }",
"private IRenderingElement generateHighlightElement( IAtom atom ) {\n return null;\n }",
"public int getPaintAlpha(){\n return Math.round((float)paintAlpha/255*100);\n }",
"public final PaintObject clone() {\n \t\n \ttry {\n\t\t\treturn (PaintObject) super.clone();\n\t\t} catch (CloneNotSupportedException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n }",
"public Color getColorObject() {\n switch (this) {\n case WHITE:\n return new Color(255,255,255);\n case BLACK:\n return new Color(0,0,0);\n case RED:\n return new Color(255,0,0);\n case GREEN:\n return new Color(0,255,0);\n case BLUE:\n return new Color(0,0,255);\n default:\n return null;\n }\n\n }",
"public ColorAction getHighlightColorAction() {\n return colorAction;\n }",
"public String getOutlineColor();",
"private Decoration getDecoration(Annotation annotation, Decoration decoration, boolean isDrawingSquiggles, boolean isHighlighting) {\n \n \t\tif (annotation.isMarkedDeleted())\n \t\t\treturn null;\n \n \t\tColor color= null;\n \n \t\tif (isDrawingSquiggles || isHighlighting)\n \t\t\tcolor= findColor(annotation.getType());\n \n \t\tif (color == null)\n \t\t\treturn null;\n \n \t\tPosition position= fModel.getPosition(annotation);\n \t\tif (position == null || position.isDeleted())\n \t\t\treturn null;\n \n \t\tif (decoration == null)\n \t\t\tdecoration= new Decoration();\n \n \t\tdecoration.fPosition= position;\n \t\tdecoration.fColor= color;\n \t\tif (fAnnotationAccess instanceof IAnnotationAccessExtension) {\n \t\t\tIAnnotationAccessExtension extension= (IAnnotationAccessExtension) fAnnotationAccess;\n \t\t\tdecoration.fLayer= extension.getLayer(annotation);\n \t\t} else {\n \t\t\tdecoration.fLayer= IAnnotationAccessExtension.DEFAULT_LAYER;\n \t\t}\n \t\tdecoration.fPainter= getDrawingStrategy(annotation);\n \n \t\treturn decoration;\n \t}",
"public boolean getPaintBorder() {\n\t\treturn paintBorder;\n\t}",
"public static int getDrawingTool(){ return selectedDrawingTool; }",
"public final native Colour getStroke() /*-{\n\t\treturn @net.edzard.kinetic.Colour::new(Ljava/lang/String;)(this.getStroke());\n\t}-*/;",
"protected Drawing createDrawing() {\n return new StandardDrawing();\n }",
"public interface Canvas {\n\tpublic String LABEL_CHANGE = \"label_change_property\";\n\t/**\n\t * @return name of Canvas or an empty String by default. MAY NOT BE NULL.\n\t */\n\tpublic String getName();\n\t/**\n\t * @return color of Canvas or null by default\n\t */\n\tpublic Color getColor();\n\t/**\n\t * @return the JComponent representation of this Canvas. MAY NOT BE NULL.\n\t */\n\tpublic JComponent getJComponent();\n\t/**\n\t * If this canvas is to be highlighted (because it might\n\t * have focus for example), then getHighlight should return\n\t * the color of that highlight. Otherwise, it should\n\t * return null\n\t * @return highlighting color or null by default.\n\t */\n\tpublic Color getHighlight();\n}",
"public void createPainter(Painter painter);",
"public Color getLineColor();",
"public DrawingModel getDrawingModel() {\r\n\t\treturn drawingModel;\r\n\t}",
"public boolean getPaintBorder() {\n\t\treturn p.getPaintBorder();\n\t}",
"public final Brush getActiveBrush() {\n return activeBrush;\n }",
"public RecodedColor getLineColor(){\n return ps == null ? null :(RecodedColor) ps.getFillLegend().getFillColorLegend();\n }",
"private void initPaint() {\n mPaint = new Paint();\n mPaint.setAntiAlias(true);\n mStrokeWidth = 2.0f;\n mPaint.setStyle(Paint.Style.STROKE);// Hollow effect\n mPaint.setColor(mRippleColor);\n mPaint.setStrokeWidth(mStrokeWidth);// set the line width\n }",
"public Shape getRenderObject(\n )\n {return renderObject;}",
"public DirectShapeRenderer getRenderer() {\n \t\treturn renderer;\n \t}",
"public RMColor getStrokeColor() { return getStroke()==null? RMColor.black : getStroke().getColor(); }",
"@Override\n public ColorModel getColorModel() {\n return getGraphicsConfiguration().getColorModel();\n }",
"public int getSelectionColor()\n\t{\n\t\treturn getObject().getSelectionColor();\n\t}",
"public boolean isPaint() {\n\t\treturn isPaint;\n\t}",
"String getTextStrokeColorAsString();",
"public Color getCurrentColor();",
"@Override\n\tpublic CSSCanvas getCanvas() {\n\t\tif (targetMedium == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (canvases.containsKey(targetMedium)) {\n\t\t\treturn canvases.get(targetMedium);\n\t\t}\n\t\tCSSCanvas canvas;\n\t\tDeviceFactory df = getStyleSheetFactory().getDeviceFactory();\n\t\tif (df != null) {\n\t\t\tcanvas = df.createCanvas(targetMedium, this);\n\t\t\tcanvases.put(targetMedium, canvas);\n\t\t} else {\n\t\t\tcanvas = null;\n\t\t}\n\t\treturn canvas;\n\t}",
"public List<Painter> findAllPainters();",
"public Color getFillColor() {\n return (((Color) data[GENERAL_BACKGROUND][PROP_VAL_VALUE]));\n }",
"public short getColor()\n {\n return font.getColorPaletteIndex();\n }",
"public java.lang.String getCrossBorderIndicator() {\r\n return crossBorderIndicator;\r\n }",
"private DrawingObject createDrawingObject(\n Rect rect, String colorResourceThemeId, int stroke) {\n DrawingObject out = new DrawingObject();\n out.mSweepAngle = 0;\n Theme theme = ThemeManager.getCurrentTheme(getContext());\n out.mPaint.setColor(theme.getColor(getContext(), colorResourceThemeId));\n out.mPaint.setStrokeWidth(stroke);\n out.mPaint.setAntiAlias(true);\n out.mPaint.setStrokeCap(Paint.Cap.BUTT);\n out.mPaint.setStyle(Paint.Style.STROKE);\n out.mRectF = new RectF(rect);\n return out;\n }",
"public Drawing drawing() {\n return fDrawing;\n }",
"org.chromium.components.paint_preview.common.proto.PaintPreview.PaintPreviewFrameProto getRootFrame();",
"public Renderer getRenderer()\n\t{\n\t\treturn getObject().getRenderer();\n\t}",
"@Override\n public ShapeColor getColor() {\n return new ShapeColor(this.r, this.g, this.b);\n }",
"public org.openxmlformats.schemas.drawingml.x2006.main.CTColorMapping getClrMap()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTColorMapping target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTColorMapping)get_store().find_element_user(CLRMAP$2, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public DrawList getDrawList()\n {\n return(drawList);\n }",
"public boolean isHighlight() {\r\n\t\treturn _highlight;\r\n\t}",
"@Override\n\tpublic String getType() {\n\t\treturn getColor()+\"圆形\";\n\t}",
"public Integer getCurrentColor() {\n for (int i = 0; i < colorPickers.size(); i++) {\n if (colorPickers.get(i).isSelected()) {\n return colorPickers.get(i).getColor();\n }\n }\n return null;\n }"
] |
[
"0.66284037",
"0.6607929",
"0.66024023",
"0.6511628",
"0.6489654",
"0.63783115",
"0.6163262",
"0.61030847",
"0.6075627",
"0.60704315",
"0.60555106",
"0.6019328",
"0.6003425",
"0.59156626",
"0.58868223",
"0.5820639",
"0.57156706",
"0.57136124",
"0.56824875",
"0.56669706",
"0.56607103",
"0.5649949",
"0.5599439",
"0.5585268",
"0.55660397",
"0.5556167",
"0.55493325",
"0.5539275",
"0.5518394",
"0.549928",
"0.5499272",
"0.54944056",
"0.5486064",
"0.54560286",
"0.54073757",
"0.5392521",
"0.5385577",
"0.5373433",
"0.53653276",
"0.53645736",
"0.5361465",
"0.53585994",
"0.53448075",
"0.534267",
"0.5341104",
"0.532047",
"0.5318983",
"0.52762955",
"0.5255234",
"0.52451897",
"0.5242334",
"0.5240152",
"0.5222164",
"0.5213948",
"0.5209133",
"0.5207431",
"0.52017057",
"0.517716",
"0.5175499",
"0.5161988",
"0.5155984",
"0.51387453",
"0.51366574",
"0.5123622",
"0.5110217",
"0.5106545",
"0.50992066",
"0.5088608",
"0.50877607",
"0.5085064",
"0.5073981",
"0.5072064",
"0.505748",
"0.5054666",
"0.5049448",
"0.50383264",
"0.4992413",
"0.49903515",
"0.49902314",
"0.49849206",
"0.49784976",
"0.49733186",
"0.49701816",
"0.49670744",
"0.49538374",
"0.49423385",
"0.49348477",
"0.4931871",
"0.49126717",
"0.4908666",
"0.49031514",
"0.48985365",
"0.4896095",
"0.48943335",
"0.48935843",
"0.48827305",
"0.48814768",
"0.48797122",
"0.48643863",
"0.48640874"
] |
0.7637198
|
0
|
Returns the Paint object used for rendering.
|
public Paint getPaintRender() {
return mRenderPaint;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Paint getPaint() {\n return mPaint;\n }",
"public Paint getPaint() {\n return paint;\n }",
"public Paint getPaint()\r\n\t{\r\n\t\treturn _g2.getPaint();\r\n\t}",
"@Override\n public Paint getPaint() {\n if (illegal()){\n Paint temp = new Paint(super.getPaint());\n temp.setColor(Color.RED);\n return temp;\n }\n return super.getPaint();\n }",
"public Painter getPainter()\n/* */ {\n/* 113 */ return this.painter;\n/* */ }",
"public Painter<?> getPainter() {\n\t\tint width = 100;\n\t\tint height = 100;\n\t\tColor color1 = Colors.White.color(0.5f);\n\t\tColor color2 = Colors.Gray.color(0.5f);\n\n\t\tLinearGradientPaint gradientPaint = new LinearGradientPaint(0.0f, 0.0f,\n\t\t\t\twidth, height, new float[] { 0.0f, 1.0f }, new Color[] {\n\t\t\t\t\t\tcolor1, color2 });\n\t\tMattePainter mattePainter = new MattePainter(gradientPaint);\n\t\treturn mattePainter;\n\t}",
"public Shape getRenderObject(\n )\n {return renderObject;}",
"public boolean getUsePrimitivePaint() {\n/* 66 */ return this.usePrimitivePaint;\n/* */ }",
"public long getPaintTime() {\n return this.paintTime;\n }",
"public Graphics2D getGraphics(){\n\t\ttry {\n\t\t\treturn (Graphics2D)this.getBufferStrategy().getDrawGraphics();\n\t\t} catch (Exception ex1) {\n\t\t\treturn null;\n\t\t}\n\t}",
"public boolean isPaint() {\n\t\treturn isPaint;\n\t}",
"protected Drawing createDrawing() {\n return new StandardDrawing();\n }",
"public Graphics2D getGraphics(){\n Window w = vc.getFullScreenWindow();\n if(w != null){\n BufferStrategy bs = w.getBufferStrategy();\n //return (Graphics2D)bs.getDrawGraphics();\n return (Graphics2D)strategy.getDrawGraphics();\n } else {\n return null;\n }\n }",
"public Paint getTool(){\n return this.tool;\n }",
"private JPanel createCanvas() {\n return new JPanel() {\n\n @Override\n protected void paintComponent(Graphics g) {\n super.paintComponent(g);\n element.drawMe((Graphics2D) g);\n }\n\n };\n }",
"@Override\n\tpublic CSSCanvas getCanvas() {\n\t\tif (targetMedium == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (canvases.containsKey(targetMedium)) {\n\t\t\treturn canvases.get(targetMedium);\n\t\t}\n\t\tCSSCanvas canvas;\n\t\tDeviceFactory df = getStyleSheetFactory().getDeviceFactory();\n\t\tif (df != null) {\n\t\t\tcanvas = df.createCanvas(targetMedium, this);\n\t\t\tcanvases.put(targetMedium, canvas);\n\t\t} else {\n\t\t\tcanvas = null;\n\t\t}\n\t\treturn canvas;\n\t}",
"public Color getColor() {\n\t\treturn (Color)p.getPaint();\n\t}",
"public Object getGraphicsCreator(Graphics g);",
"public Graphics2D createGraphics()\n {\n return this.image.createGraphics();\n }",
"public Graphics create()\r\n\t{\r\n\t\t// System.out.println(\"create\");\r\n\t\treturn null;\r\n\t}",
"public Graphics getGraphics()\n\t{\n\t\treturn g;\n\t}",
"public final Graphics getOnscreenGraphics() {\n final LWWindowPeer wp = getWindowPeerOrSelf();\n return wp.getOnscreenGraphics(getForeground(), getBackground(),\n getFont());\n\n }",
"protected abstract void paint(Graphics g, Object iDrawSurfaceID);",
"public Graphics2D createGraphics() {\n\treturn recorder.createGraphics();\n }",
"public Stroke<R> getStroke() {\n if (stroke == null) {\n stroke = factory.createStroke();\n }\n return stroke;\n }",
"public Graphics2D getGraphics()\n \t{\n \t\tif(g2==null)\n \t\t{\n \t\t\tg2=getImage().createGraphics();\n \t\t\tboolean bAntiAlias;\n \t\t\ttry\n \t\t\t{\n \t\t\t\tbAntiAlias=getBoolean(\"antialias\");\n \t\t\t}\n \t\t\tcatch(OmDeveloperException e)\n \t\t\t{\n \t\t\t\tthrow new OmUnexpectedException(e);\n \t\t\t}\n \t\t\tg2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n \t\t\t\tbAntiAlias ? RenderingHints.VALUE_ANTIALIAS_ON : RenderingHints.VALUE_ANTIALIAS_OFF);\n \t\t\tg2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,\n \t\t\t\tbAntiAlias ? RenderingHints.VALUE_TEXT_ANTIALIAS_ON : RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);\n \n \t\t\tdouble dZoom=getQuestion().getZoom();\n \t\t\tif(dZoom!=1.0) g2.scale(dZoom,dZoom);\n \t\t}\n \t\treturn g2;\n \t}",
"public Drawing drawing() {\n return fDrawing;\n }",
"public Graphics getDrawGraphics()\n {\n return ((front == page1) ? page2 : page1).getGraphics();\n }",
"@Override\n public Shape getShape() {\n myPencil.moveTo(getStartPoint().getX(), getStartPoint().getY());\n myPencil.lineTo(getEndPoint().getX(), getEndPoint().getY());\n setStartPoint(getEndPoint());\n \n return myPencil;\n }",
"public Graphics getGraphics() {\r\n\t\treturn this.graphics;\r\n\t}",
"public Graphics getGraphics() {\n return graphics_;\n }",
"public Paint getSeriesPaint() {\n return this.seriesPaint;\n}",
"public final PaintObject clone() {\n \t\n \ttry {\n\t\t\treturn (PaintObject) super.clone();\n\t\t} catch (CloneNotSupportedException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n }",
"public PSRenderingMode getRenderingMode() {\n return this.renderingMode;\n }",
"public Graphics2D getRenderContext(\n )\n {return renderContext;}",
"protected DrawSurface() {\n\t\taiDrawingOrder = new Object[] { RANGE_CURSOR_DRAWSURFACE, GRID_DRAWSURFACE, GRAPH_DRAWSURFACE,\n\t\t\t\tCURSOR_DRAWSURFACE, ZOOM_DRAWSURFACE, };\n\n\t\t// we know that we paint all our own pixels.\n\t\tsetOpaque(false);\n\n\t\t// default background\n\t\tsetBackground(Color.BLACK);\n\n\t\t// give us the same default front as a JPanel\n\t\tsetFont(UIManager.getFont(\"Panel.font\"));\n\n\t\t/*\n\t\t * We create our own cursor because the default cross-hair cursor has\n\t\t * some weird display issues - it seems to fade into some waterfall\n\t\t * graphs, and seems to interact with the green FFT line to produce red\n\t\t * pixels. Weird.\n\t\t */\n\t\tsetCursor(DEFAULT_CROSSHAIR_CURSOR);\n\n\t\tPeralexLibsBundle.addLocaleListener(this); // do after components have\n\t\t\t\t\t\t\t\t\t\t\t\t\t// been initialised\n\t}",
"public void render(GameContainer gc, Painter p) {\n\n }",
"Paint getFilling() {\n return bufFill;\n }",
"public VectorGraphics2D createGraphics() {\n\t\treturn new VectorGraphics2D(new Graphics2DContext(), operations);\n\t}",
"private void paintPainter(Graphics g)\n/* */ {\n/* 165 */ if (this.painter == null) { return;\n/* */ }\n/* */ \n/* */ \n/* 169 */ Graphics2D scratch = (Graphics2D)g.create();\n/* */ try {\n/* 171 */ this.painter.paint(scratch, this, getWidth(), getHeight());\n/* */ }\n/* */ finally {\n/* 174 */ scratch.dispose();\n/* */ }\n/* */ }",
"public Color getDrawColor() {\n\t\treturn drawColor;\n\t}",
"protected StandardDrawingView createDrawingView() {\n return new StandardDrawingView(this, 410, 370);\n }",
"public void drawPrimitive(Canvas tempCanvas, int x, int y, float height, float width, Paint paint);",
"JComponent getRenderComponent();",
"public void createPainter(Painter painter);",
"public final Paint getGridPaint() {\n return gridPaint;\n }",
"public Paint() {\n shapes = new ArrayList<>();\n }",
"public interface Painter {\n /**\n * Draws a rectangle. Parameters x and y specify the top left corner of the\n * oval. Parameters width and height specify its width and height.\n */\n public void drawRect(int x, int y, int width, int height);\n\n /**\n * Draws an oval. Parameters x and y specify the top left corner of the\n * oval. Parameters width and height specify its width and height.\n */\n public void drawOval(int x, int y, int width, int height);\n\n /**\n * Draws a line. Parameters x1 and y1 specify the starting point of the\n * line, parameters x2 and y2 the ending point.\n */\n public void drawLine(int x1, int y1, int x2, int y2);\n\n /**\n * Draws a text string. Parameters x and y represent the centre point of a\n * bounding box in which the text is to be painted.\n */\n public void drawCenteredText(String text, int x, int y);\n\n /**\n * Draws a filled rectangle. Parameters x1 and y1 specify the starting point\n * of the rectangle, parameters width and height specify its width and\n * height.\n */\n public void fillRect(int x, int y, int width, int height);\n\n /**\n * Returns the current color this GraphicsPainter object is using to paint.\n */\n public Color getColor();\n\n /**\n * Sets the color this GraphicsPainter object will use to paint with.\n */\n public void setColor(Color color);\n\n /**\n * Translates the current coordinate system by x and y.\n */\n public void translate(int x, int y);\n\n public void drawImage(Image img, int x, int y, int width, int height);\n}",
"@FromAnyThread\n public static @Nullable PaintingControl getPaintingControl(@NotNull Node cursorNode) {\n return cursorNode.getControl(PaintingControl.class);\n }",
"public GraphicsContext getGraphicsContext2D(){\n return canvas.getGraphicsContext2D();\n }",
"private DrawingObject createDrawingObject(\n Rect rect, String colorResourceThemeId, int stroke) {\n DrawingObject out = new DrawingObject();\n out.mSweepAngle = 0;\n Theme theme = ThemeManager.getCurrentTheme(getContext());\n out.mPaint.setColor(theme.getColor(getContext(), colorResourceThemeId));\n out.mPaint.setStrokeWidth(stroke);\n out.mPaint.setAntiAlias(true);\n out.mPaint.setStrokeCap(Paint.Cap.BUTT);\n out.mPaint.setStyle(Paint.Style.STROKE);\n out.mRectF = new RectF(rect);\n return out;\n }",
"private void initPaint() {\n mPaint = new Paint();\n mPaint.setAntiAlias(true);\n mStrokeWidth = 2.0f;\n mPaint.setStyle(Paint.Style.STROKE);// Hollow effect\n mPaint.setColor(mRippleColor);\n mPaint.setStrokeWidth(mStrokeWidth);// set the line width\n }",
"public DirectShapeRenderer getRenderer() {\n \t\treturn renderer;\n \t}",
"public void paint(Graphics g)\n/* */ {\n/* 100 */ Graphics2D g2d = (Graphics2D)g.create();\n/* */ try\n/* */ {\n/* 103 */ this.painter.paint(g2d, this.c, this.c.getWidth(), this.c.getHeight());\n/* */ } finally {\n/* 105 */ g2d.dispose();\n/* */ }\n/* */ }",
"public String draw() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic Graphics getGraphics() {\n\t\treturn null;\n\t}",
"public Canvas getCanvas()\n\t{\n\t\treturn canvas;\n\t}",
"protected abstract void paint(Painter painter);",
"public Renderer getRenderer()\n\t{\n\t\treturn getObject().getRenderer();\n\t}",
"public final Paint getOutlinePaint() {\n return outlinePaint;\n }",
"RenderTool getRenderTool();",
"public final Painter[] getPainters()\n/* */ {\n/* 157 */ Painter[] results = new Painter[this.painters.length];\n/* 158 */ System.arraycopy(this.painters, 0, results, 0, results.length);\n/* 159 */ return results;\n/* */ }",
"public interface Canvas {\n\tpublic String LABEL_CHANGE = \"label_change_property\";\n\t/**\n\t * @return name of Canvas or an empty String by default. MAY NOT BE NULL.\n\t */\n\tpublic String getName();\n\t/**\n\t * @return color of Canvas or null by default\n\t */\n\tpublic Color getColor();\n\t/**\n\t * @return the JComponent representation of this Canvas. MAY NOT BE NULL.\n\t */\n\tpublic JComponent getJComponent();\n\t/**\n\t * If this canvas is to be highlighted (because it might\n\t * have focus for example), then getHighlight should return\n\t * the color of that highlight. Otherwise, it should\n\t * return null\n\t * @return highlighting color or null by default.\n\t */\n\tpublic Color getHighlight();\n}",
"public GraphicsDevice getGraphicsDevice() {\n\t\treturn gd;\n\t}",
"public abstract void selfPaint(Graphics g);",
"public Canvas getCanvas() {\n\t\treturn canvas;\n\t}",
"public Canvas getCanvas()\n {\n return canvas;\n }",
"public Path getPath(Canvas canvas, Paint paint) {\n double d;\n Path path = new Path();\n double relativeOnWidth = relativeOnWidth(this.mCx);\n double relativeOnHeight = relativeOnHeight(this.mCy);\n if (PropHelper.isPercentage(this.f2270mR)) {\n d = relativeOnOther(this.f2270mR);\n } else {\n d = Double.parseDouble(this.f2270mR) * ((double) this.mScale);\n }\n path.addCircle((float) relativeOnWidth, (float) relativeOnHeight, (float) d, Path.Direction.CW);\n return path;\n }",
"public DrawingModel getDrawingModel() {\r\n\t\treturn drawingModel;\r\n\t}",
"public final native Colour getStroke() /*-{\n\t\treturn @net.edzard.kinetic.Colour::new(Ljava/lang/String;)(this.getStroke());\n\t}-*/;",
"public Graphics2D getGraphGraphics() {\r\n \t\t// DEK (Federico Granata) 17-11-2003\r\n \t\treturn (Graphics2D) graph.getGraphics();\r\n \t\t// end 17-11-2003\r\n \t\t// return mainWindow.getGraphics();\r\n \t}",
"public Shapes draw ( );",
"public Graphics getOffscreenGraphics() {\r\n return offscreenGraphics;\r\n }",
"public boolean isPaintable() {\n\t\treturn false;\n\t}",
"public interface Context extends Paintable {\n\t/**\n\t * Clear the screen of current context.\n\t */\n\tpublic void clear();\n\t\n\t/**\n\t * Force the context to redraw.\n\t */\n\tpublic void repaint();\n}",
"public Bitmap getPath(){\n\n // Path defines line, Paint defines the color\n Path path = new Path();\n Paint paint = new Paint();\n\n paint.setAntiAlias(true);\n\n // Defines shape and size\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeJoin(Paint.Join.ROUND);\n paint.setStrokeCap(Paint.Cap.SQUARE);\n\n // Creates a drawing block\n Bitmap bitmap = Bitmap.createBitmap(\n BITMAP_SIZE,\n BITMAP_SIZE,\n Bitmap.Config.ARGB_8888);\n\n // What draws on the bitmap\n Canvas canvas = new Canvas(bitmap);\n\n // Background color\n canvas.drawColor(Color.LTGRAY);\n\n // Draws 4 circles: green, yellow, red, gray\n paint.setStrokeWidth(15);\n paint.setColor(Color.GREEN);\n canvas.drawCircle(BITMAP_SIZE/2,BITMAP_SIZE/2,BITMAP_SIZE *.125f,paint);\n paint.setColor(Color.YELLOW);\n canvas.drawCircle(BITMAP_SIZE/2,BITMAP_SIZE/2,BITMAP_SIZE *.25f,paint);\n paint.setColor(Color.RED);\n canvas.drawCircle(BITMAP_SIZE/2,BITMAP_SIZE/2,BITMAP_SIZE *.375f,paint);\n paint.setColor(Color.DKGRAY);\n canvas.drawCircle(BITMAP_SIZE/2,BITMAP_SIZE/2,BITMAP_SIZE *.5f,paint);\n\n // Defines a line being drawn\n paint.setColor(Color.BLACK);\n paint.setStrokeWidth(5);\n path.moveTo(BITMAP_SIZE/2,BITMAP_SIZE/2);\n\n // Translate the XY coordinates to our coordinate system\n float[] translationVector = getTranslationVector(\n center.getX(),\n center.getY(),\n BITMAP_SIZE,\n BITMAP_SIZE,\n CONSTANT);\n //Draws the path\n for(MeasurementService.DataPoint p: list){\n path.lineTo(\n (p.getX() * CONSTANT) + translationVector[0],\n (p.getY() * CONSTANT) + translationVector[1]\n );\n }\n // Finalize the drawings in to the bitmap; (\"Push the drawings to the bitmap\")\n canvas.drawPath(path,paint);\n\n // Return the bitmap\n return bitmap;\n }",
"public Canvas getCanvas() {\n return mCanvas;\n }",
"public double draw() {\n\t\treturn this.bp.P1P2();\n\t}",
"public GraphicsContext getGraphicsContext(){\n return this.graphicsContext;\n }",
"public int getDrawingsColor(){\n return mPaintLine.getColor();\n }",
"public RepaintThread getRepaintThread() {\n return repaintThread;\n }",
"void render(GraphicsContext gc, double xOffSet, double yOffSet);",
"public Canvas getCanvas() {\n return canvas;\n }",
"public Paint convertToPaint(String str) {\r\n\t\tswitch (str) {\r\n\t\tcase(\"BLU\"): return Color.BLUE; \r\n\t\tcase(\"YEL\"): return Color.YELLOW;\r\n\t\tcase(\"BLA\"): return Color.BLACK;\r\n\t\tcase(\"RED\"): return Color.RED;\r\n\t\tcase(\"BRO\"): return Color.BROWN;\r\n\t\tcase(\"GRE\"): return Color.GREEN;\r\n\t\tcase(\"WHI\"): return Color.WHITE;\r\n\t\tcase(\"PUR\"): return Color.PURPLE;\r\n\t\tcase(\"PIN\"): return Color.PINK;\r\n\t\tcase(\"TEA\"): return Color.TEAL;\r\n\t\tcase(\"GRA\"): return Color.GRAY;\r\n\t\tcase(\"VIO\"): return Color.VIOLET;\r\n\t\tdefault: throw new UnsupportedOperationException(\"Why is the string not a valid paint?\");\r\n\t\t}\r\n\t}",
"public LineSymbolPainter getSymbolPainter() {\n return symbolPainter;\n }",
"public EnvironmentPaint getGroundPaint() {\n return this.groundPaint;\n }",
"public Paint getBackground() {\r\n return background;\r\n }",
"public abstract void paint(Graphics2D g);",
"com.google.protobuf.ByteString\n getRendererBytes();",
"public interface Render2DProvider {\n /*---------------------------------------Static params-------------------------------------------------------------*/\n public enum STYLE {\n COLOR, GRADIENT\n }\n\n public enum CAP {BUTT, ROUND, SQUARE}\n\n public enum JOIN {ROUND, BEVEL, MITER}\n\n public enum TEXT_ALIGN {START, END, LEFT, RIGHT, CENTER}\n\n public enum TEXT_BASELINE {TOP, HANGING, MIDDLE, ALPHABETIC, IDEOGRAPHIC, BOTTOM}\n\n\n /*---------------------------------------Screen details-------------------------------------------------------------*/\n\n /**\n * Returns the current screen width.\n *\n * @return screen width.\n */\n public int getScreenWidth();\n\n /**\n * Returns the current screen height.\n *\n * @return screen height.\n */\n public int getScreenHeight();\n\n /**\n * Converts the formatted length string into the corresponding dimension in pixels. The formatted string includes\n * a number and a suffix, which can be one of the fallowing : px for pixels, % for percent fallowed by w or h (w\n * for a percentage based of the width of the screen and h for a percentage based on the height on the screen).\n *\n * @param dimension a formatted string representing the dimension to be converted.\n * @return the dimension converted to pixels. If the formatted string contains errors , then the function\n * will return -1.\n */\n public int convertDimension(String dimension);\n\n /**\n * Converts the given color formatted as a string, into a {@link Color} object. The formatted string can be one of\n * two types:\n * <ul>\n * <li>\n * A color comprised of a # symbol fallowed by four pairs of hexadecimal numbers, which represent,\n * in order : red, green, blue, and alpha. For example #A000007F results in a dark semitransparent red.\n * </li>\n * <li>\n * A color comprised of a function call to rgba(...) which takes 4 params, all numbers between 0 and 255,\n * representing , in order : red, green , blue and alpha. For example rgba(160, 0, 0, 127) yelds the\n * same color as before.\n * </li>\n * <li>\n * A color comprised of a function call to rgb(...) which takes 3 params, all numbers between 0 and 255,\n * representing , in order : red, green and blue. For example rgb(160, 0, 0) yields the same color as before,\n * except it is now fully opaque. The value of alpha is considered to be fully opaque.\n * </li>\n * </ul>\n *\n * @param color the color formatted as a string.\n * @return the corresponding {@link Color} object.\n */\n public Color convertColor(String color);\n\n /**\n * Returns the given string's width when drawn, using the current text metrics.\n *\n * @param text which text to calculate it's dimension.\n * @return the width of the string as it will be rendered on the screen.\n */\n public int getStringWidth(String text);\n\n /*---------------------------------------Drawing style-------------------------------------------------------------*/\n\n\n /**\n * Sets the active fille color.\n *\n * @param color the color to use for future drawings.\n */\n public void setFillColor(Color color);\n\n /**\n * Sets the active fill gradient.\n */\n public void setFillGradient(Gradient gradient);\n\n /**\n * Sets the active stroke color.\n *\n * @param color the color to use for future drawings.\n */\n public void setStrokeColor(Color color);\n\n /**\n * Sets the active stroke gradient.\n */\n public void setStrokeGradient(Gradient gradient);\n\n\n /**\n * Sets the active drawing color for filled shapes.\n *\n * @param style drawing style (either color mode or gradient).\n */\n public void setFillStyle(STYLE style);\n\n /**\n * Sets the active drawing color for stroked shapes.\n *\n * @param style drawing style (either color mode or gradient).\n */\n public void setStrokeStyle(STYLE style);\n\n /**\n * Cap style for line drawings.\n *\n * @param cap cap style (butt, round or square endings).\n */\n public void setDrawingCap(CAP cap);\n\n /**\n * Sets the type of join used for line only drawings.\n *\n * @param join the type of line join(round, bevel or miter). Miter size can be set using the setMiterLimit function.\n */\n public void setDrawingJoin(JOIN join);\n\n /**\n * Sets the miter limit when the join type is miter.\n *\n * @param limit miter limit.\n */\n public void setMiterLimit(float limit);\n\n /**\n * Sets the line width when drawing only with lines.\n *\n * @param lineWidth line width.\n */\n public void setLineWidth(float lineWidth);\n\n /**\n * Sets the font for when drawing / stroking text.\n *\n * @param font which font to use given\n */\n public void setTextFont(Font font);\n\n /**\n * Sets which text align to use when drawing strings.\n *\n * @param align\n */\n public void setTextAlign(TEXT_ALIGN align);\n\n /**\n * Sets which baseline to use when drawing strings.\n *\n * @param baseline\n */\n public void setTextBaseline(TEXT_BASELINE baseline);\n\n /**\n * Sets the current drawing alpha. All subsequent drawing operations will be affected by this alpha value.\n *\n * @param alpha a value between 0 and 1 representing drawing alpha.\n */\n public void setAlpha(float alpha);\n\n /**\n * Returns the current drawing alpha.\n *\n * @return the current drawing alpha.\n */\n public float getAlpha();\n\n /*---------------------------------------General drawing-----------------------------------------------------------*/\n\n /**\n * Begins the drawing cycle. Useful for double buffering and predrawing techniques.\n */\n public void beginDrawing();\n\n /**\n * Ends the current drawing cycle. Useful for flushing the double buffer to the screen.\n */\n public void endDrawing();\n\n /**\n * This method saves all the current params for the drawing api (like color, clipping area etc). This method\n * should be called before setting custom drawing params.\n */\n public void pushState();\n\n /**\n * This method restores current drawing params (like color, fill styles etc.). This method should be called\n * after setting cutom params for drawing.\n */\n public void popState();\n\n /**\n * Clear the entire screen using a complete transparent black.\n */\n public void clearAll();\n\n /**\n * Clear only a portion of the screen using a complete transparent black.\n *\n * @param x x coordinate for the top left corner of the rectangle.\n * @param y y coordinate for the top left corner of the rectangle.\n * @param width width of the rectangle.\n * @param height height of the rectangle.\n */\n public void clearRect(int x, int y, float width, float height);\n\n /**\n * Sets clipping area for future drawing. Any drawings outside this rectangle will not be rendered.\n *\n * @param x x coordinate for the top left corner of the rectangle.\n * @param y y coordinate for the top left corner of the rectangle.\n * @param width width of the rectangle.\n * @param height height of the rectangle.\n */\n public void setRectangleClip(int x, int y, float width, float height);\n\n /**\n * Sets the clipping area for future drawings in the shape of a rounded rectangle.\n *\n * @param x x coordinate for the top left corner of the rectangle.\n * @param y y coordinate for the top left corner of the rectangle.\n * @param width width of the rectangle.\n * @param height height of the rectangle.\n * @param radius the radius of the rounded rectangle.\n */\n public void setRoundedRectangleClip(int x, int y, int width, int height, int radius);\n\n /**\n * Sets the clipping area for future drawings in the shape of a circle.\n *\n * @param x the x coordinate for the center of the circle.\n * @param y the y coordinate for the center of the circle.\n * @param radius the radius of the circle.\n */\n public void setCircleClip(int x, int y, int radius);\n\n /**\n * Removes clipping area. Has the same affect as calling {@link Render2DProvider#setRectangleClip(int, int, float, float)}\n * with a rectangle described by coordinates (0, 0) and dimensions (\n * {@link edu.catalindumitru.bee.graphics.Render2DProvider#getScreenWidth(),\n * ({@link edu.catalindumitru.bee.graphics.Render2DProvider#getScreenWidth()}}\n */\n public void removeClip();\n\n /*-------------------------------------Drawing Transform------------------------------------------------------------*/\n\n /**\n * Translates the origin of future drawing on the screen.\n *\n * @param x amount on the x axis to translate.\n * @param y amount on the y axis to translate.\n */\n public void translate(float x, float y);\n\n /**\n * Rotates the drawing api which will affect all future drawings.\n *\n * @param angle the amount to rotate in radians.\n */\n public void rotate(float angle);\n\n /**\n * Scales the drawing api which will affect all future drawings.\n *\n * @param x amount on the x axis to scale.\n * @param y amount on the y axis to scale.\n */\n public void scale(float x, float y);\n\n /**\n * Adds the given values to the transform of the drawing api, which will affect all future drawings.\n * Values (a11, a21, a12, a22) affect scale and rotation and values (x, y) affect translation.\n *\n * @param a11 value from position (1,1) of the transform matrix.\n * @param a21 value from position (2,1) of the transform matrix.\n * @param a12 value from position (2,1) of the transform matrix.\n * @param a22 value from position (2,2) of the transform matrix.\n * @param x value from position (3,1) of the transform matrix.\n * @param y value from position (3,2) of the transform matrix.\n */\n public void transform(float a11, float a12, float a21, float a22, float x, float y);\n\n /**\n * Sets the transform of the drawing api to the given values, which will affect all future drawings.\n * Values (a11, a21, a12, a22) affect scale and rotation and values (x, y) affect translation.\n *\n * @param a11 value from position (1,1) of the transform matrix.\n * @param a21 value from position (2,1) of the transform matrix.\n * @param a12 value from position (2,1) of the transform matrix.\n * @param a22 value from position (2,2) of the transform matrix.\n * @param x value from position (3,1) of the transform matrix.\n * @param y value from position (3,2) of the transform matrix.\n */\n public void setTransform(float a11, float a12, float a21, float a22, float x, float y);\n /*---------------------------------------Shape drawing ------------------------------------------------------------*/\n\n /**\n * Fills a rectangle using the current drawing color.\n *\n * @param x x coordinate for the left bottom vertex of the rectangle.\n * @param y x coordinate for the left bottom vertex of the rectangle.\n * @param width width of the rectangle\n * @param height height of the rectangle\n */\n public void fillRectangle(int x, int y, int width, int height);\n\n /**\n * Fills a rectangle using the current drawing color. Ignores whether or not the shape has the \"filled\" and \"stroked\"\n * params sets to true or false.\n */\n public void fillRectangle(RectangleShape rectangle);\n\n /**\n * Fills the rectangle where the corners are rounded to the given radius.\n *\n * @param x the x coordinate of where the rectangle should begin.\n * @param y the y coordinate of where the rectangle should begin.\n * @param width the width of the rectangle\n * @param height the height of the rectangle.\n * @param radius the radius of the rectangle.\n */\n public void fillRoundRectangle(int x, int y, int width, int height, int radius);\n\n /**\n * Fills the rectangle where the corners are rounded to the given radius.\n *\n * @param rectangle the rectangle to fill.\n * @param radius the radius of the corners.\n */\n public void fillRoundRectangle(RectangleShape rectangle, int radius);\n\n\n /**\n * Strokes a rectangle using the current drawing color.\n *\n * @param x x coordinate for the left bottom vertex of the rectangle.\n * @param y x coordinate for the left bottom vertex of the rectangle.\n * @param width width of the rectangle\n * @param height height of the rectangle\n */\n public void strokeRectangle(int x, int y, int width, int height);\n\n /**\n * Strokes a rectangle using the current drawing color. Ignores whether or not the shape has the \"filled\" and \"stroked\"\n * params sets to true or false.\n */\n public void strokeRectangle(RectangleShape rectangle);\n\n /**\n * Strokes the rectangle where the corners are rounded to the given radius.\n *\n * @param x the x coordinate of where the rectangle should begin.\n * @param y the y coordinate of where the rectangle should begin.\n * @param width the width of the rectangle\n * @param height the height of the rectangle.\n * @param radius the radius of the rectangle.\n */\n public void strokeRoundRectangle(int x, int y, int width, int height, int radius);\n\n /**\n * Strokes the rectangle where the corners are rounded to the given radius.\n *\n * @param rectangle the rectangle to stroke.\n * @param radius the radius of the corners.\n */\n public void strokeRoundRectangle(RectangleShape rectangle, int radius);\n\n /**\n * Fills an arc using the current drawing color.\n *\n * @param x x coordinate of where the center of the arc should be.\n * @param y y coordinate of where the center of the arc should be.\n * @param radius radius of the arc.\n * @param startAngle staring angle of the arc (measured in radian).\n * @param endAngle ending angle of the arc (measured in radian).\n */\n public void fillArc(float x, float y, float radius, float startAngle, float endAngle);\n\n /**\n * Strokes an arc using the current drawing color.\n *\n * @param x x coordinate of where the center of the arc should be.\n * @param y y coordinate of where the center of the arc should be.\n * @param radius radius of the arc.\n * @param startAngle staring angle of the arc (measured in radian).\n * @param endAngle ending angle of the arc (measured in radian).\n */\n public void strokeArc(float x, float y, float radius, float startAngle, float endAngle);\n\n /**\n * Creates a filled shape using the current drawing color.Ignores whether or not the shape has the \"filled\" and \"stroked\"\n * params sets to true or false.\n *\n * @param shape which shape to draw.\n */\n public void fillShape(Shape shape);\n\n /**\n * Creates a stroked shape using the current drawing color.Ignores whether or not the shape has the \"filled\" and \"stroked\"\n * params sets to true or false.\n *\n * @param shape which shape to draw.\n */\n public void strokeShape(Shape shape);\n\n /**\n * Draws the given shape using the current fill and stroke color. This uses the shapes own \"filled\" and \"stroked\"\n * params to determine whether or not it should be filled and / or stroked.\n *\n * @param shape which shape to draw.\n */\n public void drawShape(Shape shape);\n\n /*-------------------------------------------Text Drawing ---------------------------------------------------------*/\n\n /**\n * Draws the given text at the given location using preset font, text align, and text baseline.\n *\n * @param x x coordinate for text placement.\n * @param y y coordinate for text placement.\n * @param text which text to draw.\n */\n public void fillString(float x, float y, String text);\n\n /**\n * Strokes the given text at the given location using preset font, text align, and text baseline.\n *\n * @param x x coordinate for text placement.\n * @param y y coordinate for text placement.\n * @param text which text to stroke.\n */\n public void strokeString(float x, float y, String text);\n\n /*---------------------------------------------ImageResource Drawing-------------------------------------------------------*/\n\n /**\n * Draw the specified imageResource to the canvas. The imageResource will retain it's dimensions when drawn.\n *\n * @param imageResource which imageResource to draw to the canvas.\n * @param destinationX the x coordinate of the top left point on the canvas where the imageResource should be drawn.\n * @param destinationY the y coordinate of the top left point on the canvas where the imageResource should be drawn.\n */\n public void drawImage(ImageResource imageResource, float destinationX, float destinationY);\n\n /**\n * Draw the specified imageResource to the canvas. The source imageResource will be drawn at coordinates destinationX,\n * destinationY with the dimensions destinationWidth and destinationHeight. If the height or width differ from\n * the source imageResource, then the imageResource will be scaled accordingly.\n *\n * @param imageResource which imageResource to draw to the canvas.\n * @param destinationX the x coordinate of the top left point on the canvas where the imageResource should be drawn.\n * @param destinationY the y coordinate of the top left point on the canvas where the imageResource should be drawn.\n * @param destinationWidth the destination width of the final imageResource to be drawn.\n * @param destinationHeight the destination height of the final imageResource to be drawn.\n */\n public void drawImage(ImageResource imageResource, float destinationX, float destinationY, float destinationWidth, float destinationHeight);\n\n /**\n * Draw the specified imageResource to the canvas. The imageResource will be cropped using a rectangle described the the parameters:\n * sourceX, sourceY, sourceWidth and sourceHeight. The cropped imageResource will be drawn at coordinates destinationX,\n * destinationY with the dimensions destinationWidth and destinationHeight. If the height or width differ from\n * the source imageResource, then the imageResource will be scaled accordingly.\n *\n * @param imageResource which imageResource to draw to the canvas.\n * @param destinationX the x coordinate of the top left point on the canvas where the imageResource should be drawn.\n * @param destinationY the y coordinate of the top left point on the canvas where the imageResource should be drawn.\n * @param destinationWidth the destination width of the final imageResource to be drawn.\n * @param destinationHeight the destination height of the final imageResource to be drawn.\n * @param sourceX the x coordinate of the top left corner of the rectangle which will crop the imageResource.\n * @param sourceY the y coordinate of the top left corner of the rectangle which will crop the imageResource.\n * @param sourceWidth the width of the rectangle which will crop the source imageResource.\n * @param sourceHeight the height of the rectangle which will crop the source imageResource.\n */\n public void drawImage(ImageResource imageResource, float destinationX, float destinationY, float destinationWidth, float destinationHeight,\n float sourceX, float sourceY, float sourceWidth, float sourceHeight);\n\n\n}",
"public void setUsePrimitivePaint(boolean usePrimitivePaint) {\n/* 75 */ this.usePrimitivePaint = usePrimitivePaint;\n/* */ }",
"@Nonnull\n protected ImagePainter getImagePainter() {\n return fromNullable(painter).or(new DefaultImagePainter());\n }",
"public Paint(){\n triangles = new ArrayList<>();\n rectangles = new ArrayList<>();\n circles = new ArrayList<>();\n }",
"@Override\n protected void paintInternal(IGraphicsTarget target,\n PaintProperties paintProps) throws VizException {\n }",
"public RMStroke getStroke() { return _stroke; }",
"@Override\n protected void paintInternal(IGraphicsTarget target,\n PaintProperties paintProps) throws VizException {\n displayedDataTime = paintProps.getDataTime();\n if (displayedDataTime == null) {\n return;\n }\n\n // get the renderable for the current frame\n IRenderable renderable = renderableMap.get(displayedDataTime);\n\n // if the renderable is null or has pending updates submit a request\n // for the new frame to be calculated\n if (renderable == null || pendingUpdates.contains(displayedDataTime)) {\n new Request(displayedDataTime);\n pendingUpdates.remove(displayedDataTime);\n }\n\n // if the renderable is not null display it\n if (renderable != null) {\n if (renderable instanceof GriddedImageDisplay) {\n GriddedImageDisplay image = (GriddedImageDisplay) renderable;\n ImagingCapability imagingCap = getCapability(ImagingCapability.class);\n GriddedImagePaintProperties giProps = new GriddedImagePaintProperties(\n paintProps, imagingCap.getBrightness(),\n imagingCap.getContrast(),\n imagingCap.isInterpolationState());\n\n ColorMapParameters parameters = getCapability(\n ColorMapCapability.class).getColorMapParameters();\n\n if (parameters.getColorMap() == null) {\n parameters.setColorMap(target.buildColorMap(parameters\n .getColorMapName()));\n }\n\n image.setColorMapParameters(parameters);\n image.paint(target, giProps);\n } else if (renderable instanceof GriddedContourDisplay) {\n GriddedContourDisplay contour = (GriddedContourDisplay) renderable;\n\n RGB color = getCapability(ColorableCapability.class).getColor();\n contour.setColor(color);\n\n OutlineCapability outlineCap = getCapability(OutlineCapability.class);\n contour.setLineStyle(outlineCap.getLineStyle());\n contour.setOutlineWidth(outlineCap.getOutlineWidth());\n DensityCapability densityCap = getCapability(DensityCapability.class);\n contour.setDensity(densityCap.getDensity());\n MagnificationCapability magCap = getCapability(MagnificationCapability.class);\n if (magCap != null) {\n contour.setMagnification(magCap.getMagnification());\n }\n contour.paint(target, paintProps);\n } else if (renderable instanceof GriddedVectorDisplay) {\n GriddedVectorDisplay vector = (GriddedVectorDisplay) renderable;\n RGB color = getCapability(ColorableCapability.class).getColor();\n vector.setColor(color);\n OutlineCapability outlineCap = getCapability(OutlineCapability.class);\n vector.setLineStyle(outlineCap.getLineStyle());\n vector.setLineWidth(outlineCap.getOutlineWidth());\n DensityCapability densityCap = getCapability(DensityCapability.class);\n vector.setDensity(densityCap.getDensity());\n MagnificationCapability magCap = getCapability(MagnificationCapability.class);\n vector.setMagnification(magCap.getMagnification());\n vector.paint(target, paintProps);\n }\n }\n }",
"public Stroke getStroke()\r\n\t{\r\n\t\treturn _g2.getStroke();\r\n\t}",
"private void setupDrawing(){\n brushSize = 1;\n lastBrushSize = brushSize;\n drawPath = new Path();\n drawPaint = new Paint();\n drawPaint.setColor(paintColor);\n drawPaint.setAntiAlias(true);\n drawPaint.setStrokeWidth(brushSize);\n drawPaint.setStyle(Paint.Style.STROKE);\n drawPaint.setStrokeJoin(Paint.Join.ROUND);\n drawPaint.setStrokeCap(Paint.Cap.ROUND);\n canvasPaint = new Paint(Paint.DITHER_FLAG);\n }",
"public DrawingView view() {\n return fView;\n }",
"public org.openxmlformats.schemas.drawingml.x2006.main.CTColor getPenClr()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTColor target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTColor)get_store().find_element_user(PENCLR$12, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }"
] |
[
"0.7617022",
"0.7569715",
"0.7437127",
"0.6884111",
"0.6499319",
"0.64691263",
"0.62456167",
"0.6102692",
"0.5995833",
"0.59666246",
"0.5908288",
"0.58734745",
"0.58725595",
"0.58485407",
"0.5706731",
"0.5685949",
"0.5676435",
"0.5573267",
"0.55467117",
"0.5535918",
"0.5535284",
"0.5532382",
"0.5518344",
"0.5499814",
"0.5487459",
"0.5483881",
"0.54832226",
"0.54652363",
"0.54633325",
"0.54507715",
"0.54362756",
"0.54198444",
"0.5418769",
"0.5417979",
"0.5413966",
"0.5409964",
"0.5407425",
"0.54009545",
"0.53784674",
"0.5373073",
"0.53583366",
"0.53500766",
"0.533613",
"0.533171",
"0.5324328",
"0.53150696",
"0.5298008",
"0.52854776",
"0.52684605",
"0.52606994",
"0.52592885",
"0.5258503",
"0.5256134",
"0.52448696",
"0.5235441",
"0.52297413",
"0.5222484",
"0.5201301",
"0.51970804",
"0.5195276",
"0.51917696",
"0.5191593",
"0.51651645",
"0.5147554",
"0.5137511",
"0.51358706",
"0.51236314",
"0.51173365",
"0.51167405",
"0.5100966",
"0.5097248",
"0.50923055",
"0.5091766",
"0.5090356",
"0.5081208",
"0.5065467",
"0.5063353",
"0.5063311",
"0.50565875",
"0.50558853",
"0.5052621",
"0.50426954",
"0.5042658",
"0.5038073",
"0.5028614",
"0.50234705",
"0.5019285",
"0.50013083",
"0.499784",
"0.49945357",
"0.49911317",
"0.49907175",
"0.4987334",
"0.49792153",
"0.49683022",
"0.4964291",
"0.49639615",
"0.49600038",
"0.49593264",
"0.49555448"
] |
0.74309784
|
3
|
still without memory management
|
public Path insidePath(float startAngle, float sweepAngle, float radius){
Path path = new Path();
//FPoint startPoint = sliceStartPoit(startAngle, radius);
//path.moveTo(startPoint.x, startPoint.y);
FPoint center = mChart.getCenterOfCircleBox();
RectF rect = new RectF();
rect.set(center.x - radius, center.y - radius, center.x + radius, center.y + radius);
path.arcTo(rect, startAngle, sweepAngle);
path.close();
return path;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"StackManipulation cached();",
"protected java.util.List x (java.lang.String r19){\n /*\n r18 = this;\n r0 = r18;\n r2 = r0.K;\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\n r2 = (java.util.List) r2;\n if (r2 == 0) goto L_0x000f;\n L_0x000e:\n return r2;\n L_0x000f:\n r12 = java.util.Collections.emptyList();\n r2 = r18.bp();\n r3 = r18.TaskHandler(r19);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r4 = r2.setDrawable(r3);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n if (r4 != 0) goto L_0x0026;\n L_0x0021:\n r18.bq();\n r2 = r12;\n goto L_0x000e;\n L_0x0026:\n r13 = r2.getScaledMaximumFlingVelocity(r3);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r14 = new java.io.ByteArrayOutputStream;\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r2 = 2048; // 0x800 float:2.87E-42 double:1.0118E-320;\n r14.<creatCallTask>(r2);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r13, r14);\t Catch:{ all -> 0x00f2 }\n r2 = r14.toByteArray();\t Catch:{ all -> 0x00f2 }\n r2 = com.duokan.kernel.DkUtils.decodeSimpleDrm(r2);\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.String;\t Catch:{ all -> 0x00f2 }\n r4 = \"UTF-8\";\n r3.<creatCallTask>(r2, r4);\t Catch:{ all -> 0x00f2 }\n r2 = new org.json.JSONObject;\t Catch:{ all -> 0x00f2 }\n r2.<creatCallTask>(r3);\t Catch:{ all -> 0x00f2 }\n if (r2 != 0) goto L_0x0055;\n L_0x004a:\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r18.bq();\n r2 = r12;\n goto L_0x000e;\n L_0x0055:\n r3 = \"pictures\";\n r15 = com.duokan.reader.common.getPhysicalYPixels.setDrawable(r2, r3);\t Catch:{ all -> 0x00f2 }\n r16 = new java.util.ArrayList;\t Catch:{ all -> 0x00f2 }\n r2 = r15.length();\t Catch:{ all -> 0x00f2 }\n r0 = r16;\n r0.<creatCallTask>(r2);\t Catch:{ all -> 0x00f2 }\n r2 = 0;\n L_0x0067:\n r3 = r15.length();\t Catch:{ all -> 0x00f2 }\n if (r2 >= r3) goto L_0x00d0;\n L_0x006d:\n r3 = r15.getJSONObject(r2);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_md5\";\n r7 = r3.getString(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_url\";\n r6 = r3.getString(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_size\";\n r8 = r3.getLong(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"width\";\n r10 = r3.getInt(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"height\";\n r11 = r3.getInt(r4);\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<creatCallTask>();\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r3 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r4 = \".\";\n r3 = r3.append(r4);\t Catch:{ all -> 0x00f2 }\n r3 = r3.append(r2);\t Catch:{ all -> 0x00f2 }\n r4 = r3.toString();\t Catch:{ all -> 0x00f2 }\n r5 = new java.lang.String;\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<creatCallTask>();\t Catch:{ all -> 0x00f2 }\n r17 = \"file:///stuffs/\";\n r0 = r17;\n r3 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r3 = r3.append(r7);\t Catch:{ all -> 0x00f2 }\n r3 = r3.toString();\t Catch:{ all -> 0x00f2 }\n r5.<creatCallTask>(r3);\t Catch:{ all -> 0x00f2 }\n r3 = r18;\n r3 = r3.setDrawable(r4, r5, r6, r7, r8, r10, r11);\t Catch:{ all -> 0x00f2 }\n r0 = r16;\n r0.add(r3);\t Catch:{ all -> 0x00f2 }\n r2 = r2 + 1;\n goto L_0x0067;\n L_0x00d0:\n r0 = r18;\n r2 = r0.K;\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r1 = r16;\n r2.putIfAbsent(r0, r1);\t Catch:{ all -> 0x00f2 }\n r0 = r18;\n r2 = r0.K;\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\t Catch:{ all -> 0x00f2 }\n r2 = (java.util.List) r2;\t Catch:{ all -> 0x00f2 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x0106, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x0106, all -> 0x0101 }\n r18.bq();\n goto L_0x000e;\n L_0x00f2:\n r2 = move-exception;\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n throw r2;\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n L_0x00fa:\n r2 = move-exception;\n r2 = r12;\n L_0x00fc:\n r18.bq();\n goto L_0x000e;\n L_0x0101:\n r2 = move-exception;\n r18.bq();\n throw r2;\n L_0x0106:\n r3 = move-exception;\n goto L_0x00fc;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.duokan.reader.domain.bookshelf.jv.MyContextWrapper(java.lang.String):java.util.List\");\n }",
"private void remplirFabricantData() {\n\t}",
"public void p() {\n try {\n if (this.f80656a.a().size() > 0) {\n this.f80657b.a((f) new f() {\n public void a(Object obj, boolean z) {\n }\n }, this.f80656a.a());\n }\n if (this.f80658c.a().size() > 0) {\n this.f80657b.b(new f() {\n public void a(Object obj, boolean z) {\n if (obj instanceof String) {\n m.this.f80658c.b();\n }\n }\n }, this.f80658c.a());\n }\n if (this.l.size() > 0) {\n this.f80657b.a(new f(), this.l);\n }\n } catch (Throwable th) {\n by.b(\"convertMemoryToCacheTable happen error: \" + th.toString());\n }\n }",
"public void reuse() {}",
"static com.qiyukf.nimlib.p470f.p471a.C5826a m23369a(android.os.Parcel r4) {\n /*\n com.qiyukf.nimlib.f.a.a r0 = new com.qiyukf.nimlib.f.a.a\n r1 = 0\n r0.m50001init(r1)\n int r2 = r4.readInt()\n r0.f18499a = r2\n int r2 = r4.readInt()\n if (r2 <= 0) goto L_0x001d\n byte[] r2 = r4.createByteArray()\n java.nio.ByteBuffer r2 = java.nio.ByteBuffer.wrap(r2)\n r0.f18501c = r2\n L_0x001d:\n int r2 = r4.readInt()\n r0.f18500b = r2\n int r2 = r4.readInt()\n if (r2 <= 0) goto L_0x0061\n byte[] r4 = r4.createByteArray()\n int r3 = r0.f18500b\n if (r3 <= 0) goto L_0x005c\n int r1 = r0.f18500b\n if (r1 != r2) goto L_0x0049\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.wrap(r4)\n r0.f18502d = r4\n java.nio.ByteBuffer r4 = r0.f18502d\n r4.position(r2)\n goto L_0x0068\n L_0x0049:\n int r1 = r0.f18500b\n java.nio.ByteBuffer r1 = java.nio.ByteBuffer.allocate(r1)\n r0.f18502d = r1\n java.nio.ByteBuffer r1 = r0.f18502d\n r1.put(r4)\n goto L_0x0068\n L_0x005c:\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.wrap(r4, r1, r2)\n goto L_0x0065\n L_0x0061:\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.allocate(r1)\n L_0x0065:\n r0.f18502d = r4\n L_0x0068:\n boolean r4 = m23372b(r0)\n if (r4 == 0) goto L_0x006f\n return r0\n L_0x006f:\n int r4 = r0.f18500b\n if (r4 <= 0) goto L_0x007d\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r4 = f18504a\n int r1 = r0.f18499a\n r4.put(r1, r0)\n goto L_0x00a2\n L_0x007d:\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r4 = f18504a\n int r1 = r0.f18499a\n java.lang.Object r4 = r4.get(r1)\n com.qiyukf.nimlib.f.a.a r4 = (com.qiyukf.nimlib.p470f.p471a.C5826a) r4\n if (r4 == 0) goto L_0x00a2\n java.nio.ByteBuffer r1 = r4.f18502d\n java.nio.ByteBuffer r0 = r0.f18502d\n r1.put(r0)\n boolean r0 = m23372b(r4)\n if (r0 == 0) goto L_0x00a2\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r0 = f18504a\n int r1 = r4.f18499a\n r0.remove(r1)\n return r4\n L_0x00a2:\n r4 = 0\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.qiyukf.nimlib.p470f.p471a.C5826a.C5829b.m23369a(android.os.Parcel):com.qiyukf.nimlib.f.a.a\");\n }",
"private static byte[] m2539e(Context context) {\n Throwable th;\n int i = 0;\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n byte[] bArr = new byte[0];\n String a = Log.m2547a(context, Log.f1857e);\n DiskLruCache diskLruCache = null;\n try {\n diskLruCache = DiskLruCache.m2767a(new File(a), 1, 1, 10240);\n File file = new File(a);\n if (file != null && file.exists()) {\n String[] list = file.list();\n int length = list.length;\n while (i < length) {\n String str = list[i];\n if (str.contains(\".0\")) {\n byteArrayOutputStream.write(StatisticsManager.m2535a(diskLruCache, str.split(\"\\\\.\")[0]));\n }\n i++;\n }\n }\n bArr = byteArrayOutputStream.toByteArray();\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n try {\n diskLruCache.close();\n } catch (Throwable th2) {\n th = th2;\n }\n }\n } catch (IOException th3) {\n BasicLogHandler.m2542a(th3, \"StatisticsManager\", \"getContent\");\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e2) {\n e2.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n diskLruCache.close();\n }\n } catch (Throwable th4) {\n th3 = th4;\n }\n return bArr;\n th3.printStackTrace();\n return bArr;\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private static void iterator() {\n\t\t\r\n\t}",
"int memSize() {\n return super.memSize() + 4 * 4; }",
"protected abstract SharedMemory make_infos();",
"@Override\n protected Object freshBatch(Object reuse)\n {\n throw new NotImplementedException();\n }",
"private static void cajas() {\n\t\t\n\t}",
"private static void sortingMemo() {\n\t\t\n\t}",
"void loadNext();",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"private void parseData() {\n\t\t\r\n\t}",
"long memoryUnused();",
"private void m50366E() {\n }",
"private void poetries() {\n\n\t}",
"private void kk12() {\n\n\t}",
"private final void zacb() {\n ArrayList<Integer> arrayList;\n Throwable th;\n StringBuilder sb;\n synchronized (this) {\n try {\n if (!this.zame) {\n int count = this.mDataHolder.getCount();\n new ArrayList();\n this.zamf = arrayList;\n if (count > 0) {\n boolean add = this.zamf.add(0);\n String primaryDataMarkerColumn = getPrimaryDataMarkerColumn();\n String string = this.mDataHolder.getString(primaryDataMarkerColumn, 0, this.mDataHolder.getWindowIndex(0));\n for (int i = 1; i < count; i++) {\n int windowIndex = this.mDataHolder.getWindowIndex(i);\n String string2 = this.mDataHolder.getString(primaryDataMarkerColumn, i, windowIndex);\n String str = string2;\n if (string2 == null) {\n Throwable th2 = th;\n new StringBuilder(78 + String.valueOf(primaryDataMarkerColumn).length());\n new NullPointerException(sb.append(\"Missing value for markerColumn: \").append(primaryDataMarkerColumn).append(\", at row: \").append(i).append(\", for window: \").append(windowIndex).toString());\n throw th2;\n }\n if (!str.equals(string)) {\n string = str;\n boolean add2 = this.zamf.add(Integer.valueOf(i));\n }\n }\n }\n this.zame = true;\n }\n } catch (Throwable th3) {\n Throwable th4 = th3;\n throw th4;\n }\n }\n }",
"@Override\n\tpublic void finalize() {\n\t\t\n\t}",
"@Override\r\n protected void finalize() throws Throwable {\n System.out.println(\"元素死亡\");\r\n super.finalize();\r\n }",
"private Set<T> getMemory() { return null; }",
"public final void mo51373a() {\n }",
"@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}",
"public final void run() {\n /*\n r11 = this;\n java.util.ArrayList r4 = new java.util.ArrayList\n r4.<init>()\n java.util.List r0 = r11.f7254\n java.util.Iterator r6 = r0.iterator()\n goto L_0x00fb\n L_0x000d:\n java.lang.Object r0 = r6.next()\n o.刴 r0 = (p004o.C1530) r0\n r5 = r0\n o.鑺 r7 = r11.f7255 // Catch:{ 櫂 -> 0x00f5 }\n r8 = r5\n java.lang.String r0 = \"consume\"\n r7.mo4508(r0) // Catch:{ 櫂 -> 0x00f5 }\n java.lang.String r0 = r8.f7295 // Catch:{ 櫂 -> 0x00f5 }\n java.lang.String r1 = \"inapp\"\n boolean r0 = r0.equals(r1) // Catch:{ 櫂 -> 0x00f5 }\n if (r0 != 0) goto L_0x0045\n o.櫂 r0 = new o.櫂 // Catch:{ 櫂 -> 0x00f5 }\n java.lang.StringBuilder r1 = new java.lang.StringBuilder // Catch:{ 櫂 -> 0x00f5 }\n java.lang.String r2 = \"Items of type '\"\n r1.<init>(r2) // Catch:{ 櫂 -> 0x00f5 }\n java.lang.String r2 = r8.f7295 // Catch:{ 櫂 -> 0x00f5 }\n java.lang.StringBuilder r1 = r1.append(r2) // Catch:{ 櫂 -> 0x00f5 }\n java.lang.String r2 = \"' can't be consumed.\"\n java.lang.StringBuilder r1 = r1.append(r2) // Catch:{ 櫂 -> 0x00f5 }\n java.lang.String r1 = r1.toString() // Catch:{ 櫂 -> 0x00f5 }\n r2 = -1010(0xfffffffffffffc0e, float:NaN)\n r0.<init>(r2, r1) // Catch:{ 櫂 -> 0x00f5 }\n throw r0 // Catch:{ 櫂 -> 0x00f5 }\n L_0x0045:\n java.lang.String r9 = r8.f7289 // Catch:{ RemoteException -> 0x00c2 }\n java.lang.String r10 = r8.f7290 // Catch:{ RemoteException -> 0x00c2 }\n if (r9 == 0) goto L_0x0053\n java.lang.String r0 = \"\"\n boolean r0 = r9.equals(r0) // Catch:{ RemoteException -> 0x00c2 }\n if (r0 == 0) goto L_0x009d\n L_0x0053:\n java.lang.StringBuilder r0 = new java.lang.StringBuilder // Catch:{ RemoteException -> 0x00c2 }\n java.lang.String r1 = \"Can't consume \"\n r0.<init>(r1) // Catch:{ RemoteException -> 0x00c2 }\n java.lang.StringBuilder r0 = r0.append(r10) // Catch:{ RemoteException -> 0x00c2 }\n java.lang.String r1 = \". No token.\"\n java.lang.StringBuilder r0 = r0.append(r1) // Catch:{ RemoteException -> 0x00c2 }\n java.lang.String r5 = r0.toString() // Catch:{ RemoteException -> 0x00c2 }\n java.lang.String r0 = r7.f8316 // Catch:{ RemoteException -> 0x00c2 }\n java.lang.StringBuilder r1 = new java.lang.StringBuilder // Catch:{ RemoteException -> 0x00c2 }\n java.lang.String r2 = \"In-app billing error: \"\n r1.<init>(r2) // Catch:{ RemoteException -> 0x00c2 }\n java.lang.StringBuilder r1 = r1.append(r5) // Catch:{ RemoteException -> 0x00c2 }\n java.lang.String r1 = r1.toString() // Catch:{ RemoteException -> 0x00c2 }\n android.util.Log.e(r0, r1) // Catch:{ RemoteException -> 0x00c2 }\n o.櫂 r0 = new o.櫂 // Catch:{ RemoteException -> 0x00c2 }\n java.lang.StringBuilder r1 = new java.lang.StringBuilder // Catch:{ RemoteException -> 0x00c2 }\n java.lang.String r2 = \"PurchaseInfo is missing token for sku: \"\n r1.<init>(r2) // Catch:{ RemoteException -> 0x00c2 }\n java.lang.StringBuilder r1 = r1.append(r10) // Catch:{ RemoteException -> 0x00c2 }\n java.lang.String r2 = \" \"\n java.lang.StringBuilder r1 = r1.append(r2) // Catch:{ RemoteException -> 0x00c2 }\n java.lang.StringBuilder r1 = r1.append(r8) // Catch:{ RemoteException -> 0x00c2 }\n java.lang.String r1 = r1.toString() // Catch:{ RemoteException -> 0x00c2 }\n r2 = -1007(0xfffffffffffffc11, float:NaN)\n r0.<init>(r2, r1) // Catch:{ RemoteException -> 0x00c2 }\n throw r0 // Catch:{ RemoteException -> 0x00c2 }\n L_0x009d:\n o.鷭 r0 = r7.f8308 // Catch:{ RemoteException -> 0x00c2 }\n android.content.Context r1 = r7.f8307 // Catch:{ RemoteException -> 0x00c2 }\n r1.getPackageName() // Catch:{ RemoteException -> 0x00c2 }\n int r7 = r0.mo4540() // Catch:{ RemoteException -> 0x00c2 }\n if (r7 == 0) goto L_0x00da\n p004o.C1782.m2448(r7) // Catch:{ RemoteException -> 0x00c2 }\n o.櫂 r0 = new o.櫂 // Catch:{ RemoteException -> 0x00c2 }\n java.lang.StringBuilder r1 = new java.lang.StringBuilder // Catch:{ RemoteException -> 0x00c2 }\n java.lang.String r2 = \"Error consuming sku \"\n r1.<init>(r2) // Catch:{ RemoteException -> 0x00c2 }\n java.lang.StringBuilder r1 = r1.append(r10) // Catch:{ RemoteException -> 0x00c2 }\n java.lang.String r1 = r1.toString() // Catch:{ RemoteException -> 0x00c2 }\n r0.<init>(r7, r1) // Catch:{ RemoteException -> 0x00c2 }\n throw r0 // Catch:{ RemoteException -> 0x00c2 }\n L_0x00c2:\n r9 = move-exception\n o.櫂 r0 = new o.櫂 // Catch:{ 櫂 -> 0x00f5 }\n java.lang.StringBuilder r1 = new java.lang.StringBuilder // Catch:{ 櫂 -> 0x00f5 }\n java.lang.String r2 = \"Remote exception while consuming. PurchaseInfo: \"\n r1.<init>(r2) // Catch:{ 櫂 -> 0x00f5 }\n java.lang.StringBuilder r1 = r1.append(r8) // Catch:{ 櫂 -> 0x00f5 }\n java.lang.String r1 = r1.toString() // Catch:{ 櫂 -> 0x00f5 }\n r2 = -1001(0xfffffffffffffc17, float:NaN)\n r0.<init>(r2, r1, r9) // Catch:{ 櫂 -> 0x00f5 }\n throw r0 // Catch:{ 櫂 -> 0x00f5 }\n L_0x00da:\n o.ậ r0 = new o.ậ // Catch:{ 櫂 -> 0x00f5 }\n java.lang.StringBuilder r1 = new java.lang.StringBuilder // Catch:{ 櫂 -> 0x00f5 }\n java.lang.String r2 = \"Successful consume of sku \"\n r1.<init>(r2) // Catch:{ 櫂 -> 0x00f5 }\n java.lang.String r2 = r5.f7290 // Catch:{ 櫂 -> 0x00f5 }\n java.lang.StringBuilder r1 = r1.append(r2) // Catch:{ 櫂 -> 0x00f5 }\n java.lang.String r1 = r1.toString() // Catch:{ 櫂 -> 0x00f5 }\n r2 = 0\n r0.<init>(r2, r1) // Catch:{ 櫂 -> 0x00f5 }\n r4.add(r0) // Catch:{ 櫂 -> 0x00f5 }\n goto L_0x00fb\n L_0x00f5:\n r5 = move-exception\n o.ậ r0 = r5.f7614\n r4.add(r0)\n L_0x00fb:\n boolean r0 = r6.hasNext()\n if (r0 != 0) goto L_0x000d\n o.鑺 r5 = r11.f7255\n java.lang.String r0 = \"\"\n r5.f8306 = r0\n r0 = 0\n r5.f8310 = r0\n o.鑺$鷭 r0 = r11.f7253\n if (r0 == 0) goto L_0x011c\n android.os.Handler r0 = r11.f7252\n o.閇 r1 = new o.閇\n o.鑺$鷭 r2 = r11.f7253\n java.util.List r3 = r11.f7254\n r1.<init>(r11, r2, r3, r4)\n r0.post(r1)\n L_0x011c:\n o.鑺$if r0 = r11.f7251\n if (r0 == 0) goto L_0x012e\n android.os.Handler r0 = r11.f7252\n o.祽 r1 = new o.祽\n o.鑺$if r2 = r11.f7251\n java.util.List r3 = r11.f7254\n r1.<init>(r11, r2, r3, r4)\n r0.post(r1)\n L_0x012e:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p004o.C1509.run():void\");\n }",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"static void inr_mem(String passed){\n\t\tint val = hexa_to_deci(memory.get(memory_address_hl()));\n\t\tval++;\n\t\tmemory.put(memory_address_hl(), decimel_to_hexa_8bit(val));\n\t\tmodify_status(memory.get(memory_address_hl()));\n\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"@Override\n public int retroceder() {\n return 0;\n }",
"private SBomCombiner()\n\t{}",
"public void processMemory()\n {\n try{\n String memory = oReader.readLine();\n int index = 0;\n //adding mememory to and array\n for(int i = 0; i<memory.length()-2; i+=2)\n {\n String hexbyte = memory.substring(i, i+2); //get the byt ein hex\n mem.addEntry(\"0x\"+hexbyte, index, 1);\n index++;\n }\n } catch(IOException e)\n {\n e.printStackTrace();\n }\n }",
"static void recorreT(){\r\n\tStruct aux=lt;\r\n\twhile(aux!=null){\r\n\t\taux.view();\r\n\t\taux=aux.sig;\r\n\t}\r\n }",
"private long size() {\n\t\treturn 0;\n\t}",
"protected Object[][] getContents() {\n/* 447 */ return contents;\n/* */ }",
"private void c() {\n /*\n r14 = this;\n r12 = android.os.SystemClock.elapsedRealtime();\n r8 = r14.d();\n r0 = r14.t;\n if (r0 == 0) goto L_0x007a;\n L_0x000c:\n r0 = 1;\n r7 = r0;\n L_0x000e:\n r0 = r14.r;\n r0 = r0.a();\n if (r0 != 0) goto L_0x0018;\n L_0x0016:\n if (r7 == 0) goto L_0x007d;\n L_0x0018:\n r0 = 1;\n r10 = r0;\n L_0x001a:\n if (r10 != 0) goto L_0x0095;\n L_0x001c:\n r0 = r14.d;\n r0 = r0.b;\n if (r0 != 0) goto L_0x0028;\n L_0x0022:\n r0 = -1;\n r0 = (r8 > r0 ? 1 : (r8 == r0 ? 0 : -1));\n if (r0 != 0) goto L_0x0032;\n L_0x0028:\n r0 = r14.p;\n r0 = r12 - r0;\n r2 = 2000; // 0x7d0 float:2.803E-42 double:9.88E-321;\n r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1));\n if (r0 <= 0) goto L_0x0095;\n L_0x0032:\n r14.p = r12;\n r0 = r14.d;\n r1 = r14.f;\n r1 = r1.size();\n r0.a = r1;\n r0 = r14.c;\n r1 = r14.f;\n r2 = r14.o;\n r4 = r14.m;\n r6 = r14.d;\n r0.getChunkOperation(r1, r2, r4, r6);\n r0 = r14.d;\n r0 = r0.a;\n r0 = r14.a(r0);\n r1 = r14.d;\n r1 = r1.b;\n if (r1 != 0) goto L_0x0080;\n L_0x0059:\n r4 = -1;\n L_0x005b:\n r0 = r14.b;\n r2 = r14.m;\n r1 = r14;\n r6 = r10;\n r0 = r0.update(r1, r2, r4, r6);\n if (r7 == 0) goto L_0x0087;\n L_0x0067:\n r0 = r14.v;\n r0 = r12 - r0;\n r2 = r14.u;\n r2 = (long) r2;\n r2 = r14.c(r2);\n r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1));\n if (r0 < 0) goto L_0x0079;\n L_0x0076:\n r14.e();\n L_0x0079:\n return;\n L_0x007a:\n r0 = 0;\n r7 = r0;\n goto L_0x000e;\n L_0x007d:\n r0 = 0;\n r10 = r0;\n goto L_0x001a;\n L_0x0080:\n if (r0 == 0) goto L_0x0095;\n L_0x0082:\n r4 = r14.d();\n goto L_0x005b;\n L_0x0087:\n r1 = r14.r;\n r1 = r1.a();\n if (r1 != 0) goto L_0x0079;\n L_0x008f:\n if (r0 == 0) goto L_0x0079;\n L_0x0091:\n r14.f();\n goto L_0x0079;\n L_0x0095:\n r4 = r8;\n goto L_0x005b;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.exoplayer.chunk.ChunkSampleSource.c():void\");\n }",
"static void sub_with_mem(String passed){\n\t\tint subt = hexa_to_deci(registers.get('A'));\n\t\tint minu = hexa_to_deci(memory.get(memory_address_hl()));\n\t\tminu = 256-minu;\n\t\tminu%=256;\n\t\tsubt+=minu;\n\t\tCS = subt>255?true:false;\n\t\tregisters.put('A',decimel_to_hexa_8bit(subt));\n\t\tmodify_status(registers.get('A'));\n\t}",
"private void iterativeDataPropertyMetrics() {\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"double passer();",
"static void dcr_mem(String passed){\n\t\tint val = hexa_to_deci(memory.get(memory_address_hl()));\n\t\tval--;\n\t\tmemory.put(memory_address_hl(), decimel_to_hexa_8bit(val));\n\t\tmodify_status(memory.get(memory_address_hl()));\n\t}",
"public void smell() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"private static void searchMemo() {\n\t\t\n\t}",
"private void m1do() {\n for (int i = 0; i < 2; i++) {\n this.my[i] = null;\n }\n for (int i2 = 0; i2 < 2; i2++) {\n this.mz[i2] = 0;\n }\n this.mC = 0.0d;\n this.lf = 0;\n }",
"@Override\n\t\tpublic void reduce() {\n\t\t\t\n\t\t}",
"@Override\r\npublic int getNumcopy() {\n\treturn super.getNumcopy();\r\n}",
"@Override\n public byte[] recDirect() {\n return null;\n }",
"private void assignment() {\n\n\t\t\t}",
"private synchronized void flushCache() {\n /*\n r6 = this;\n monitor-enter(r6)\n r0 = 0\n java.util.Map<java.lang.String, java.lang.String> r1 = r6.cdY // Catch:{ all -> 0x005a }\n boolean r1 = r1.isEmpty() // Catch:{ all -> 0x005a }\n if (r1 == 0) goto L_0x000c\n monitor-exit(r6)\n return\n L_0x000c:\n r1 = 4\n if (r0 >= r1) goto L_0x0058\n int r1 = r6.cdS // Catch:{ all -> 0x005a }\n r2 = 64\n if (r1 > r2) goto L_0x001e\n int r1 = r6.cdT // Catch:{ all -> 0x005a }\n long r1 = (long) r1 // Catch:{ all -> 0x005a }\n long r3 = r6.cdV // Catch:{ all -> 0x005a }\n int r1 = (r1 > r3 ? 1 : (r1 == r3 ? 0 : -1))\n if (r1 <= 0) goto L_0x0058\n L_0x001e:\n java.util.Map<java.lang.String, java.lang.String> r1 = r6.cdY // Catch:{ all -> 0x005a }\n java.util.Set r1 = r1.entrySet() // Catch:{ all -> 0x005a }\n java.util.Iterator r1 = r1.iterator() // Catch:{ all -> 0x005a }\n java.lang.Object r1 = r1.next() // Catch:{ all -> 0x005a }\n java.util.Map$Entry r1 = (java.util.Map.Entry) r1 // Catch:{ all -> 0x005a }\n java.io.File r2 = new java.io.File // Catch:{ all -> 0x005a }\n java.lang.Object r3 = r1.getValue() // Catch:{ all -> 0x005a }\n java.lang.String r3 = (java.lang.String) r3 // Catch:{ all -> 0x005a }\n r2.<init>(r3) // Catch:{ all -> 0x005a }\n long r2 = r2.length() // Catch:{ all -> 0x005a }\n java.util.Map<java.lang.String, java.lang.String> r4 = r6.cdY // Catch:{ all -> 0x005a }\n java.lang.Object r1 = r1.getKey() // Catch:{ all -> 0x005a }\n r4.remove(r1) // Catch:{ all -> 0x005a }\n java.util.Map<java.lang.String, java.lang.String> r1 = r6.cdY // Catch:{ all -> 0x005a }\n int r1 = r1.size() // Catch:{ all -> 0x005a }\n r6.cdS = r1 // Catch:{ all -> 0x005a }\n int r1 = r6.cdT // Catch:{ all -> 0x005a }\n long r4 = (long) r1 // Catch:{ all -> 0x005a }\n long r4 = r4 - r2\n int r1 = (int) r4 // Catch:{ all -> 0x005a }\n r6.cdT = r1 // Catch:{ all -> 0x005a }\n int r0 = r0 + 1\n goto L_0x000c\n L_0x0058:\n monitor-exit(r6)\n return\n L_0x005a:\n r0 = move-exception\n monitor-exit(r6)\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.introvd.template.common.bitmapfun.util.DiskLruCache.flushCache():void\");\n }",
"@Override\r\n\tpublic Buffer copy() {\n\t\t\r\n\t\treturn null;\r\n\t}",
"private void m24354e() {\n String[] strArr = this.f19529f;\n this.f19529f = (String[]) Arrays.copyOf(strArr, strArr.length);\n C4216a[] aVarArr = this.f19530g;\n this.f19530g = (C4216a[]) Arrays.copyOf(aVarArr, aVarArr.length);\n }",
"private static void loadMemo() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n protected void finalize() throws Throwable\n {\n finalize(pointer);\n super.finalize();\n }",
"public void l()\r\n/* 190: */ {\r\n/* 191:221 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 192:222 */ this.a[i] = null;\r\n/* 193: */ }\r\n/* 194: */ }",
"private final void asx() {\n /*\n r12 = this;\n r0 = r12.cFE;\n if (r0 == 0) goto L_0x0073;\n L_0x0004:\n r1 = r12.cxs;\n if (r1 == 0) goto L_0x0073;\n L_0x0008:\n r1 = r12.ayL;\n if (r1 != 0) goto L_0x000d;\n L_0x000c:\n goto L_0x0073;\n L_0x000d:\n r2 = 0;\n if (r1 == 0) goto L_0x0027;\n L_0x0010:\n r1 = r1.Km();\n if (r1 == 0) goto L_0x0027;\n L_0x0016:\n r1 = r1.aar();\n if (r1 == 0) goto L_0x0027;\n L_0x001c:\n r3 = r0.getName();\n r1 = r1.get(r3);\n r1 = (java.util.ArrayList) r1;\n goto L_0x0028;\n L_0x0027:\n r1 = r2;\n L_0x0028:\n if (r1 == 0) goto L_0x0051;\n L_0x002a:\n r1 = (java.lang.Iterable) r1;\n r1 = kotlin.collections.u.Z(r1);\n if (r1 == 0) goto L_0x0051;\n L_0x0032:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$1;\n r3.<init>(r12);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.b(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x003f:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$2;\n r3.<init>(r0);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.f(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x004c:\n r1 = kotlin.sequences.n.f(r1);\n goto L_0x0052;\n L_0x0051:\n r1 = r2;\n L_0x0052:\n r3 = r12.asr();\n if (r1 == 0) goto L_0x0059;\n L_0x0058:\n goto L_0x005d;\n L_0x0059:\n r1 = kotlin.collections.m.emptyList();\n L_0x005d:\n r4 = r12.bub;\n if (r4 == 0) goto L_0x006d;\n L_0x0061:\n r5 = 0;\n r6 = 0;\n r7 = 1;\n r8 = 0;\n r9 = 0;\n r10 = 19;\n r11 = 0;\n r2 = com.iqoption.core.util.e.a(r4, r5, r6, r7, r8, r9, r10, r11);\n L_0x006d:\n r3.c(r1, r2);\n r12.d(r0);\n L_0x0073:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.asx():void\");\n }",
"private static void doMemoryReleases() {\n\r\n OptimizedJavaRecognizer.releaseMemory();\r\n FastJavaLexer.clear();\r\n }",
"private Retorno( )\r\n {\r\n val = null;\r\n izq = null;\r\n der = null;\r\n\r\n }",
"public void o() {\n try {\n if (this.f80656a.a().size() > 0) {\n this.f80657b.c(new f() {\n public void a(Object obj, boolean z) {\n if (obj instanceof String) {\n m.this.f80656a.d();\n }\n }\n }, this.f80656a.a());\n }\n if (this.f80658c.a().size() > 0) {\n this.f80657b.b(new f() {\n public void a(Object obj, boolean z) {\n if (obj instanceof String) {\n m.this.f80658c.b();\n }\n }\n }, this.f80658c.a());\n }\n if (this.l.size() > 0) {\n this.f80657b.a(new f(), this.l);\n }\n } catch (Throwable th) {\n by.b(\"converyMemoryToDataTable happen error: \" + th.toString());\n }\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"public static void main(String[] args) \r\n {\n\t\tint numberOfIterations = 100000;\r\n\t\tFoo mass[] = new Foo[numberOfIterations];\r\n\t\tfor (int i = 0; i < numberOfIterations; i++) \r\n {\r\n\t\t\t//TODO: collect references to foo at an array to prevent object being deleted by GC\r\n\t\t\tmass[i] = new Foo(i);\r\n\t\t\t\r\n\t\t}\r\n\t}",
"private oa a(int paramInt)\r\n/* 185: */ {\r\n/* 186:195 */ if (c[paramInt] == null) {\r\n/* 187:196 */ c[paramInt] = new oa(String.format(\"textures/font/unicode_page_%02x.png\", new Object[] { Integer.valueOf(paramInt) }));\r\n/* 188: */ }\r\n/* 189:199 */ return c[paramInt];\r\n/* 190: */ }",
"void mo72113b();",
"public void redibujarAlgoformers() {\n\t\t\n\t}",
"@Override\n\tpublic void findLastOverData() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"private static byte[] m17790a(Bitmap bitmap) {\n int i;\n int i2;\n int i3;\n int width = bitmap.getWidth();\n int height = bitmap.getHeight();\n OutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n for (i = 0; i < 32; i++) {\n byteArrayOutputStream.write(0);\n }\n int[] iArr = new int[(width - 2)];\n bitmap.getPixels(iArr, 0, width, 1, 0, width - 2, 1);\n Object obj = iArr[0] == -16777216 ? 1 : null;\n Object obj2 = iArr[iArr.length + -1] == -16777216 ? 1 : null;\n int length = iArr.length;\n width = 0;\n int i4 = 0;\n for (i2 = 0; i2 < length; i2++) {\n if (width != iArr[i2]) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, i2);\n width = iArr[i2];\n }\n }\n if (obj2 != null) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, length);\n }\n int i5 = i4;\n int i6 = i5 + 1;\n if (obj != null) {\n i = i6 - 1;\n } else {\n i = i6;\n }\n if (obj2 != null) {\n i3 = i - 1;\n } else {\n i3 = i;\n }\n iArr = new int[(height - 2)];\n bitmap.getPixels(iArr, 0, 1, 0, 1, 1, height - 2);\n obj = iArr[0] == -16777216 ? 1 : null;\n obj2 = iArr[iArr.length + -1] == -16777216 ? 1 : null;\n length = iArr.length;\n width = 0;\n i4 = 0;\n for (i2 = 0; i2 < length; i2++) {\n if (width != iArr[i2]) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, i2);\n width = iArr[i2];\n }\n }\n if (obj2 != null) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, length);\n }\n i6 = i4 + 1;\n if (obj != null) {\n i = i6 - 1;\n } else {\n i = i6;\n }\n if (obj2 != null) {\n i--;\n }\n for (i6 = 0; i6 < i3 * i; i6++) {\n C5225r.m17788a(byteArrayOutputStream, 1);\n }\n byte[] toByteArray = byteArrayOutputStream.toByteArray();\n toByteArray[0] = (byte) 1;\n toByteArray[1] = (byte) i5;\n toByteArray[2] = (byte) i4;\n toByteArray[3] = (byte) (i * i3);\n C5225r.m17787a(bitmap, toByteArray);\n return toByteArray;\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"private final synchronized void zzem() {\n /*\n r5 = this;\n monitor-enter(r5);\n r0 = r5.zzvw;\t Catch:{ all -> 0x005b }\n r1 = \"save_data\";\n r2 = 0;\n r0 = r0.getString(r1, r2);\t Catch:{ all -> 0x005b }\n if (r0 != 0) goto L_0x000e;\n L_0x000c:\n monitor-exit(r5);\n return;\n L_0x000e:\n r1 = new org.json.JSONObject;\t Catch:{ JSONException -> 0x0047 }\n r1.<init>(r0);\t Catch:{ JSONException -> 0x0047 }\n r0 = \"castSessionId\";\n r0 = r1.getString(r0);\t Catch:{ JSONException -> 0x0047 }\n r2 = r5.zzvx;\t Catch:{ JSONException -> 0x0047 }\n r0 = r2.equals(r0);\t Catch:{ JSONException -> 0x0047 }\n if (r0 == 0) goto L_0x0045;\n L_0x0021:\n r0 = \"playerTokenMap\";\n r0 = r1.getJSONObject(r0);\t Catch:{ JSONException -> 0x0047 }\n r1 = r0.keys();\t Catch:{ JSONException -> 0x0047 }\n L_0x002b:\n r2 = r1.hasNext();\t Catch:{ JSONException -> 0x0047 }\n if (r2 == 0) goto L_0x0041;\n L_0x0031:\n r2 = r1.next();\t Catch:{ JSONException -> 0x0047 }\n r2 = (java.lang.String) r2;\t Catch:{ JSONException -> 0x0047 }\n r3 = r5.zzvv;\t Catch:{ JSONException -> 0x0047 }\n r4 = r0.getString(r2);\t Catch:{ JSONException -> 0x0047 }\n r3.put(r2, r4);\t Catch:{ JSONException -> 0x0047 }\n goto L_0x002b;\n L_0x0041:\n r0 = 0;\n r5.zzwe = r0;\t Catch:{ JSONException -> 0x0047 }\n L_0x0045:\n monitor-exit(r5);\n return;\n L_0x0047:\n r0 = move-exception;\n r1 = zzbf;\t Catch:{ all -> 0x005b }\n r2 = \"Error while loading data: %s\";\n r3 = 1;\n r3 = new java.lang.Object[r3];\t Catch:{ all -> 0x005b }\n r4 = 0;\n r0 = r0.getMessage();\t Catch:{ all -> 0x005b }\n r3[r4] = r0;\t Catch:{ all -> 0x005b }\n r1.w(r2, r3);\t Catch:{ all -> 0x005b }\n monitor-exit(r5);\n return;\n L_0x005b:\n r0 = move-exception;\n monitor-exit(r5);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.cast.zzcb.zzem():void\");\n }",
"@Override\r\n\t\t\tpublic void reset() {\n\t\t\t\t\r\n\t\t\t}",
"public void method_4270() {}",
"@Override\n\tpublic void finalize() throws java.lang.Throwable {\n super.finalize();\n\n nodeCount = 0;\n patternCount = 0;\n matrixCount = 0;\n\n partials = null;\n// storedPartials = null;\n \n currentPartialsIndices = null;\n storedPartialsIndices = null;\n// states = null;\n matrices = null;\n currentMatricesIndices = null;\n storedMatricesIndices = null;\n\n scalingFactors = null;\n }",
"fileInfo(){\n\t\tsymbol = new node[MAXLINECOUNT + 2];\n\t\tother = null; // allocated later!\n\t}",
"private List<Instance> flushResultBuffer() {\n\t\tList<Instance> resultBuffer = this.resultBuffer;\n\t\tthis.resultBuffer = new LinkedList<Instance>();\n\t\treturn resultBuffer;\n\t}",
"@Override\n\t\t\tpublic void clear() {\n\t\t\t\t\n\t\t\t}",
"private void updateInternalState()\n {\n m_isCodePointHiragana_ = false;\n m_buffer_.setLength(0);\n m_bufferOffset_ = -1;\n m_CEBufferOffset_ = 0;\n m_CEBufferSize_ = 0;\n m_FCDLimit_ = -1;\n m_FCDStart_ = m_source_.getLength();\n //m_isHiragana4_ = m_collator_.m_isHiragana4_;\n m_isForwards_ = true;\n }",
"private static java.lang.String m149886a() {\n /*\n r0 = 0\n java.io.BufferedReader r1 = new java.io.BufferedReader // Catch:{ Throwable -> 0x0072, all -> 0x0068 }\n java.io.InputStreamReader r2 = new java.io.InputStreamReader // Catch:{ Throwable -> 0x0072, all -> 0x0068 }\n java.io.FileInputStream r3 = new java.io.FileInputStream // Catch:{ Throwable -> 0x0072, all -> 0x0068 }\n java.lang.StringBuilder r4 = new java.lang.StringBuilder // Catch:{ Throwable -> 0x0072, all -> 0x0068 }\n java.lang.String r5 = \"/proc/\"\n r4.<init>(r5) // Catch:{ Throwable -> 0x0072, all -> 0x0068 }\n int r5 = android.os.Process.myPid() // Catch:{ Throwable -> 0x0072, all -> 0x0068 }\n r4.append(r5) // Catch:{ Throwable -> 0x0072, all -> 0x0068 }\n java.lang.String r5 = \"/cmdline\"\n r4.append(r5) // Catch:{ Throwable -> 0x0072, all -> 0x0068 }\n java.lang.String r4 = r4.toString() // Catch:{ Throwable -> 0x0072, all -> 0x0068 }\n r3.<init>(r4) // Catch:{ Throwable -> 0x0072, all -> 0x0068 }\n java.lang.String r4 = \"iso-8859-1\"\n r2.<init>(r3, r4) // Catch:{ Throwable -> 0x0072, all -> 0x0068 }\n r1.<init>(r2) // Catch:{ Throwable -> 0x0072, all -> 0x0068 }\n java.lang.StringBuilder r2 = new java.lang.StringBuilder // Catch:{ Throwable -> 0x0073, all -> 0x0066 }\n r2.<init>() // Catch:{ Throwable -> 0x0073, all -> 0x0066 }\n L_0x002e:\n int r3 = r1.read() // Catch:{ Throwable -> 0x0073, all -> 0x0066 }\n if (r3 <= 0) goto L_0x0039\n char r3 = (char) r3 // Catch:{ Throwable -> 0x0073, all -> 0x0066 }\n r2.append(r3) // Catch:{ Throwable -> 0x0073, all -> 0x0066 }\n goto L_0x002e\n L_0x0039:\n org.chromium.f r3 = org.chromium.C48317f.m149883a() // Catch:{ Throwable -> 0x0073, all -> 0x0066 }\n boolean r3 = r3.loggerDebug() // Catch:{ Throwable -> 0x0073, all -> 0x0066 }\n if (r3 == 0) goto L_0x005e\n org.chromium.f r3 = org.chromium.C48317f.m149883a() // Catch:{ Throwable -> 0x0073, all -> 0x0066 }\n java.lang.String r4 = \"Process\"\n java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ Throwable -> 0x0073, all -> 0x0066 }\n java.lang.String r6 = \"get processName = \"\n r5.<init>(r6) // Catch:{ Throwable -> 0x0073, all -> 0x0066 }\n java.lang.String r6 = r2.toString() // Catch:{ Throwable -> 0x0073, all -> 0x0066 }\n r5.append(r6) // Catch:{ Throwable -> 0x0073, all -> 0x0066 }\n java.lang.String r5 = r5.toString() // Catch:{ Throwable -> 0x0073, all -> 0x0066 }\n r3.loggerD(r4, r5) // Catch:{ Throwable -> 0x0073, all -> 0x0066 }\n L_0x005e:\n java.lang.String r2 = r2.toString() // Catch:{ Throwable -> 0x0073, all -> 0x0066 }\n r1.close() // Catch:{ Exception -> 0x0065 }\n L_0x0065:\n return r2\n L_0x0066:\n r0 = move-exception\n goto L_0x006c\n L_0x0068:\n r1 = move-exception\n r7 = r1\n r1 = r0\n r0 = r7\n L_0x006c:\n if (r1 == 0) goto L_0x0071\n r1.close() // Catch:{ Exception -> 0x0071 }\n L_0x0071:\n throw r0\n L_0x0072:\n r1 = r0\n L_0x0073:\n if (r1 == 0) goto L_0x0078\n r1.close() // Catch:{ Exception -> 0x0078 }\n L_0x0078:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.chromium.C48320i.m149886a():java.lang.String\");\n }",
"private static void testStringPoolGarbageCollection() {\n //first method call - use it as a reference\n test(1000 * 1000);\n //we are going to clean the cache here.\n System.gc();\n //check the memory consumption and how long does it take to intern strings\n //in the second method call.\n test(1000 * 1000);\n }",
"private static void testStringPoolGarbageCollection() {\n //first method call - use it as a reference\n test(1000 * 1000);\n //we are going to clean the cache here.\n System.gc();\n //check the memory consumption and how long does it take to intern strings\n //in the second method call.\n test(1000 * 1000);\n }",
"private final void m11968d() {\n synchronized (this.f10173g) {\n for (zzsk a : this.f10174h) {\n a.m11971a();\n }\n }\n }",
"public void method_6436() {\r\n super();\r\n this.field_6225 = new ArrayList();\r\n this.field_6226 = new HashMap();\r\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"public com.yandex.metrica.impl.bc.c H() {\n /*\n r9 = this;\n r0 = 0\n android.database.Cursor r1 = r9.I() // Catch:{ Exception -> 0x0048, all -> 0x003f }\n if (r1 == 0) goto L_0x0013\n boolean r2 = r1.moveToFirst() // Catch:{ Exception -> 0x0049, all -> 0x003d }\n if (r2 == 0) goto L_0x0013\n int r2 = r1.getCount() // Catch:{ Exception -> 0x0049, all -> 0x003d }\n if (r2 != 0) goto L_0x0049\n L_0x0013:\n com.yandex.metrica.impl.ob.fo r2 = r9.m // Catch:{ Exception -> 0x0049, all -> 0x003d }\n long r3 = r9.D() // Catch:{ Exception -> 0x0049, all -> 0x003d }\n com.yandex.metrica.impl.ob.en r5 = com.yandex.metrica.impl.ob.en.BACKGROUND // Catch:{ Exception -> 0x0049, all -> 0x003d }\n android.database.Cursor r0 = r2.a((long) r3, (com.yandex.metrica.impl.ob.en) r5) // Catch:{ Exception -> 0x0049, all -> 0x003d }\n if (r0 == 0) goto L_0x0049\n boolean r2 = r0.moveToFirst() // Catch:{ Exception -> 0x0049, all -> 0x003d }\n if (r2 == 0) goto L_0x0049\n int r2 = r0.getCount() // Catch:{ Exception -> 0x0049, all -> 0x003d }\n if (r2 <= 0) goto L_0x0049\n com.yandex.metrica.impl.ob.fo r3 = r9.m // Catch:{ Exception -> 0x0049, all -> 0x003d }\n long r4 = r9.D() // Catch:{ Exception -> 0x0049, all -> 0x003d }\n com.yandex.metrica.impl.ob.en r6 = com.yandex.metrica.impl.ob.en.BACKGROUND // Catch:{ Exception -> 0x0049, all -> 0x003d }\n long r7 = java.lang.System.currentTimeMillis() // Catch:{ Exception -> 0x0049, all -> 0x003d }\n r3.a((long) r4, (com.yandex.metrica.impl.ob.en) r6, (long) r7) // Catch:{ Exception -> 0x0049, all -> 0x003d }\n goto L_0x0049\n L_0x003d:\n r2 = move-exception\n goto L_0x0041\n L_0x003f:\n r2 = move-exception\n r1 = r0\n L_0x0041:\n com.yandex.metrica.impl.bv.a((android.database.Cursor) r1)\n com.yandex.metrica.impl.bv.a((android.database.Cursor) r0)\n throw r2\n L_0x0048:\n r1 = r0\n L_0x0049:\n com.yandex.metrica.impl.bv.a((android.database.Cursor) r1)\n com.yandex.metrica.impl.bv.a((android.database.Cursor) r0)\n com.yandex.metrica.impl.bc$c r0 = super.H()\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.yandex.metrica.impl.bd.H():com.yandex.metrica.impl.bc$c\");\n }",
"public void Mirror() {\n\t\t\r\n\t}",
"public void mo21877s() {\n }",
"public abstract Object mo26777y();",
"public void freeScrap() {\n\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"void mo57277b();",
"@SuppressWarnings(\"unused\")\n\t\t\tprivate void dispose() {\n\t\t\t\t\n\t\t\t}",
"private void grow() {\n OmaLista<OmaPari<K, V>>[] newList = new OmaLista[this.values.length * 2];\n\n for (int i = 0; i < this.values.length; i++) {\n copy(newList, i);\n }\n\n this.values = newList;\n }"
] |
[
"0.54520375",
"0.5442649",
"0.5325575",
"0.5300844",
"0.5257499",
"0.5253955",
"0.5237158",
"0.5235677",
"0.5229169",
"0.5198539",
"0.5163469",
"0.5126427",
"0.5121691",
"0.511925",
"0.51005566",
"0.50985897",
"0.50948405",
"0.50589645",
"0.5049344",
"0.50330096",
"0.50263685",
"0.50063825",
"0.4997825",
"0.49950492",
"0.4994353",
"0.49895063",
"0.49856827",
"0.49844906",
"0.49805313",
"0.49727228",
"0.4969923",
"0.49694026",
"0.49641913",
"0.49636057",
"0.49427724",
"0.49364296",
"0.4934656",
"0.4932811",
"0.49299943",
"0.49253762",
"0.4924189",
"0.4922844",
"0.49224398",
"0.49212888",
"0.4919534",
"0.4918253",
"0.49139977",
"0.49064115",
"0.48919958",
"0.4886333",
"0.4879626",
"0.4879009",
"0.48687044",
"0.48646978",
"0.4864237",
"0.48616278",
"0.486058",
"0.48603618",
"0.48603618",
"0.48603618",
"0.48603618",
"0.48559913",
"0.48557088",
"0.48461726",
"0.48455292",
"0.48449668",
"0.48424608",
"0.4835208",
"0.48305535",
"0.48258156",
"0.48211303",
"0.4817753",
"0.48156983",
"0.4812672",
"0.4811768",
"0.480947",
"0.4808355",
"0.4808355",
"0.48049003",
"0.48037794",
"0.47995508",
"0.4797803",
"0.47944438",
"0.4793201",
"0.4792928",
"0.47895524",
"0.4789107",
"0.47882083",
"0.47882083",
"0.47878048",
"0.47874448",
"0.47840583",
"0.4782592",
"0.47823936",
"0.47799703",
"0.4778809",
"0.4776094",
"0.47758573",
"0.47752425",
"0.47746864",
"0.4773028"
] |
0.0
|
-1
|
Create job with given argument.
|
private VisorPortableCollectMetadataJob(Long lastUpdate) {
super(lastUpdate);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"JobResponse create();",
"@Override\n\tpublic PdiJobWrapper createJob(String jobFile, String[] args) {\n\t\ttry {\n\t\t\tLOGGER.info(\"Creating job based upon \" + jobFile);\n\t\t\tJobMeta jobMeta = new JobMeta(this.getLogWriter(), jobFile, null, null);\n\t\t\tJob job = new Job(this.getLogWriter(), this.getStepLoader(), null, jobMeta);\n\t\t\tjob.getJobMeta().setArguments(args);\n\n\t\t\t// setup internal and external variables of job\n\t\t\tjob.initializeVariablesFrom(null);\n\t\t\tjob.getJobMeta().setInternalKettleVariables(job);\n\t\t\tjob.copyParametersFrom(job.getJobMeta());\n\t\t\tjob.activateParameters();\n\t\t\treturn new PdiJob324(job);\n\t\t} catch (KettleException e) {\n\t\t\tthrow new PdiException(e);\n\t\t}\n\t}",
"JobResponse create(Context context);",
"private synchronized void createJob\n\t\t(Channel theChannel)\n\t\t{\n\t\t// Create Job Frontend proxy object for the channel.\n\t\tJobFrontendRef frontend =\n\t\t\tnew JobFrontendProxy (myChannelGroup, theChannel);\n\t\ttheChannel.info (frontend);\n\n\t\t// Create job information record.\n\t\tJobInfo jobinfo = getJobInfo (frontend);\n\n\t\t// Start lease timers.\n\t\tjobinfo.renewTimer.start\n\t\t\t(Constants.LEASE_RENEW_INTERVAL,\n\t\t\t Constants.LEASE_RENEW_INTERVAL);\n\t\tjobinfo.expireTimer.start\n\t\t\t(Constants.LEASE_EXPIRE_INTERVAL);\n\t\t}",
"public ConversionJob createJob(ConfigProperties cprop){\n\t\tConversionJobFactory cjf = new ConversionJobFactory(cprop);\n\t\t//add new job with proj.id as name\n\t\tjlog.info(\"Create Job \"+cprop.getProperty(\"PROJ.id\"));\n\t\treturn cjf.getConversionJobInstance();\n\t\t//jobs.put(cprop.getProperty(\"PROJ.id\"),tjf.getInstance());\n\n\t}",
"CreateWorkerResult createWorker(CreateWorkerRequest createWorkerRequest);",
"public Job createAndSubmitJob(String jobName,\n\t\t\tString pathToDataFilesDirectory, boolean inputCompressed,\n\t\t\tExecutable executable, Resource resource, Region region,\n\t\t\tInstanceType instanceType, int nodes, String argumentString,\n\t\t\tString stdinFileName) throws IOException, ClassNotFoundException {\n\t\treturn createAndSubmitJob(jobName, pathToDataFilesDirectory,\n\t\t\t\tinputCompressed, executable, resource, region, instanceType,\n\t\t\t\tnodes, argumentString, stdinFileName, \"\", true, false);\n\t}",
"public Job createAndSubmitJob(String jobName,\n\t\t\tString pathToDataFilesDirectory, boolean inputCompressed,\n\t\t\tExecutable executable, Resource resource, Region region,\n\t\t\tInstanceType instanceType, int nodes, String argumentString)\n\t\t\tthrows IOException, ClassNotFoundException {\n\t\treturn createAndSubmitJob(jobName, pathToDataFilesDirectory,\n\t\t\t\tinputCompressed, executable, resource, region, instanceType,\n\t\t\t\tnodes, argumentString, \"\");\n\t}",
"@Override\n public BlueRun create(StaplerRequest request) {\n job.checkPermission(Item.BUILD);\n if (job instanceof Queue.Task) {\n ScheduleResult scheduleResult;\n\n List<ParameterValue> parameterValues = getParameterValue(request);\n int expectedBuildNumber = job.getNextBuildNumber();\n if(parameterValues.size() > 0) {\n scheduleResult = Jenkins.get()\n .getQueue()\n .schedule2((Queue.Task) job, 0, new ParametersAction(parameterValues),\n new CauseAction(new Cause.UserIdCause()));\n }else {\n scheduleResult = Jenkins.get()\n .getQueue()\n .schedule2((Queue.Task) job, 0, new CauseAction(new Cause.UserIdCause()));\n }\n // Keep FB happy.\n // scheduleResult.getItem() will always return non-null if scheduleResult.isAccepted() is true\n final Queue.Item item = scheduleResult.getItem();\n if(scheduleResult.isAccepted() && item != null) {\n return new QueueItemImpl(\n pipeline.getOrganization(),\n item,\n pipeline,\n expectedBuildNumber, pipeline.getLink().rel(\"queue\").rel(Long.toString(item.getId())),\n pipeline.getLink()\n ).toRun();\n } else {\n throw new ServiceException.UnexpectedErrorException(\"Queue item request was not accepted\");\n }\n } else {\n throw new ServiceException.NotImplementedException(\"This pipeline type does not support being queued.\");\n }\n }",
"public Job newJob() throws IOException {\n return newJob(outputDir, getConfiguration(), attempt0);\n }",
"public Job createAndSubmitJob(String jobName,\n\t\t\tString pathToDataFilesDirectory, boolean inputCompressed,\n\t\t\tExecutable executable, Resource resource, Region region,\n\t\t\tInstanceType instanceType, int nodes, String argumentString,\n\t\t\tString stdinFileName, String jobTagContent,\n\t\t\tboolean startImmediately, boolean noInstanceShutdown)\n\t\t\tthrows IOException, ClassNotFoundException {\n\t\treturn Core.createAndSubmitJob(jobName, pathToDataFilesDirectory,\n\t\t\t\tinputCompressed, executable, resource, region, instanceType,\n\t\t\t\tnull, nodes, argumentString, getHttpMethodExecutor(),\n\t\t\t\tstdinFileName, jobTagContent, startImmediately,\n\t\t\t\tnoInstanceShutdown);\n\t}",
"public Job createAndSubmitJob(String jobName,\n\t\t\tString pathToDataFilesDirectory, boolean inputCompressed,\n\t\t\tExecutable executable, Resource resource, Region region,\n\t\t\tInstanceType instanceType, int nodes, String argumentString,\n\t\t\tString stdinFileName, String jobTagContent) throws IOException,\n\t\t\tClassNotFoundException {\n\t\treturn createAndSubmitJob(jobName, pathToDataFilesDirectory,\n\t\t\t\tinputCompressed, executable, resource, region, instanceType,\n\t\t\t\tnodes, argumentString, stdinFileName, jobTagContent, true,\n\t\t\t\tfalse);\n\t}",
"public Job() {\n }",
"public Job() {\n }",
"public Job() {\n\t\t\t\n\t\t}",
"JobClient createJobClient();",
"public Job(int id) {\n this.id = id;\n }",
"public JobBuilder() {\r\n job = new Job();\r\n }",
"public static JobBuilder newJob() {\n return new JobBuilder();\n }",
"public static JobID generate() {\n return new JobID();\n }",
"Job(int id, int time) {\n this.id = id;\n this.time = time;\n }",
"public static Job create(long jobId) {\n\t\treturn getPersistence().create(jobId);\n\t}",
"public AutomaticJob() {\r\n \r\n }",
"public static void createNewJob(BotUI botUI, String partner, String task,\n\t\t\tString cronExpression) {\n\t\tdisplayAndWriteLog(partner + \"- \" + task + \": createNewJob\");\n\t\ttry {\n\n\t\t\tJobDataMap jobDataMap = new JobDataMap();\n\t\t\tjobDataMap.put(\"partner\", partner);\n\t\t\tjobDataMap.put(\"task\", task);\n\n\t\t\tdisplayAndWriteLog(partner + \": createNewJob 2\");\n\n\t\t\tMessageObservable observable = new MessageObservable();\n\t\t\tobservable.addObserver(botUI);\n\t\t\tjobDataMap.put(\"observable\", observable);\n\n\t\t\tdisplayAndWriteLog(partner + \": createNewJob 3\");\n\n\t\t\tJobDetail job = JobBuilder\n\t\t\t\t\t.newJob(ScreeningJob.class)\n\t\t\t\t\t.withIdentity(\n\t\t\t\t\t\t\tpartner.toUpperCase() + \"_\" + task.toUpperCase(),\n\t\t\t\t\t\t\t\"GROUP_01\").usingJobData(jobDataMap).build();\n\n\t\t\tdisplayAndWriteLog(partner + \": createNewJob 4\");\n\n\t\t\tTrigger trigger = TriggerBuilder\n\t\t\t\t\t.newTrigger()\n\t\t\t\t\t.withIdentity(\n\t\t\t\t\t\t\tpartner.toUpperCase() + \"_\" + task.toUpperCase(),\n\t\t\t\t\t\t\t\"GROUP_01\")\n\t\t\t\t\t.withSchedule(\n\t\t\t\t\t\t\tCronScheduleBuilder.cronSchedule(cronExpression))\n\t\t\t\t\t.build();\n\n\t\t\tdisplayAndWriteLog(partner + \": scheduler is null: \"\n\t\t\t\t\t+ (scheduler == null));\n\n\t\t\tif (scheduler == null) {\n\t\t\t\tscheduler = new StdSchedulerFactory().getScheduler();\n\t\t\t\tscheduler.start();\n\t\t\t\tdisplayAndWriteLog(partner + \": scheduler start\");\n\t\t\t}\n\t\t\tscheduler.scheduleJob(job, trigger);\n\n\t\t} catch (SchedulerException e) {\n\t\t\tSystem.out.println(\"SchedulerException: \" + e.toString());\n\t\t\tScreeningJob.displayAndWriteLogError(e);\n\t\t}\n\t}",
"public void createJob(String jobRecruiterUsername, String title, String description, int salary, String location, ArrayList<String> category, ArrayList<String> skillsets)\n {\n Job job = new Job();\n job.setJobRecruiterUsername(jobRecruiterUsername);\n job.setTitle(title);\n job.setDescription(description);\n job.setSalary(salary);\n job.setLocation(location);\n job.setCategory(category);\n job.setSkillsets(skillsets);\n \n jobList.add(job);\n }",
"public Job createAndSubmitJob(String jobName,\n\t\t\tString pathToDataFilesDirectory, boolean inputCompressed,\n\t\t\tExecutable executable, Job previousJob, int nodes,\n\t\t\tString argumentString, String stdinFileName) throws IOException,\n\t\t\tClassNotFoundException {\n\t\treturn Core.createAndSubmitJob(jobName, pathToDataFilesDirectory,\n\t\t\t\tinputCompressed, executable, null, null, null, previousJob,\n\t\t\t\tnodes, argumentString, getHttpMethodExecutor(), stdinFileName,\n\t\t\t\t\"\", true, false);\n\t}",
"public void createWorker(Worker worker){\n }",
"@Override\n\t@Transactional\n\tpublic long createJob(Job job) {\n\t\treturn 0;\n\t}",
"public AbstractJob(){\n \n }",
"public schedulerJob() {\n }",
"WithCreate withProperties(JobDetails properties);",
"public interface JobManager {\n void startJob(JobConfig<String, JsonRecord> name);\n}",
"public int addJob(String cust, int copies, int pages, \n boolean isColour, boolean isHQuality, boolean isDSided);",
"public Job() {\r\n\t\tSystem.out.println(\"Constructor\");\r\n\t}",
"private Job newJob(Path dir, Configuration configuration,\n String taskAttemptId) throws IOException {\n Job job = Job.getInstance(configuration);\n Configuration conf = job.getConfiguration();\n conf.set(MRJobConfig.TASK_ATTEMPT_ID, taskAttemptId);\n enableManifestCommitter(conf);\n FileOutputFormat.setOutputPath(job, dir);\n return job;\n }",
"public SystemCallJob(final String name, final String [] args) {\n super(name);\n fArgs = args;\n }",
"T execute(String jobName) throws Exception;",
"@PUT\n @Path( \"/add\" )\n @Produces( { MediaType.APPLICATION_JSON } )\n public JobStatus addJob( String xml ) { Parse the XML, create a job configuration\n //\n // System.out.println(xml);\n //\n JobConfiguration jobConfiguration;\n try {\n jobConfiguration = JobConfiguration.fromXML( xml.toString() );\n JobMeta jobMeta = jobConfiguration.getJobMeta();\n JobExecutionConfiguration jobExecutionConfiguration = jobConfiguration.getJobExecutionConfiguration();\n jobMeta.setLogLevel( jobExecutionConfiguration.getLogLevel() );\n jobMeta.injectVariables( jobExecutionConfiguration.getVariables() );\n\n // If there was a repository, we know about it at this point in time.\n //\n final Repository repository = jobConfiguration.getJobExecutionConfiguration().getRepository();\n\n String carteObjectId = UUID.randomUUID().toString();\n SimpleLoggingObject servletLoggingObject =\n new SimpleLoggingObject( getClass().getName(), LoggingObjectType.CARTE, null );\n servletLoggingObject.setContainerObjectId( carteObjectId );\n servletLoggingObject.setLogLevel( jobExecutionConfiguration.getLogLevel() );\n\n // Create the transformation and store in the list...\n //\n final Job job = new Job( repository, jobMeta, servletLoggingObject );\n\n // Setting variables\n //\n job.initializeVariablesFrom( null );\n job.getJobMeta().setInternalKettleVariables( job );\n job.injectVariables( jobConfiguration.getJobExecutionConfiguration().getVariables() );\n job.setArguments( jobExecutionConfiguration.getArgumentStrings() );\n\n // Also copy the parameters over...\n //\n job.copyParametersFrom( jobMeta );\n job.clearParameters();\n String[] parameterNames = job.listParameters();\n for ( int idx = 0; idx < parameterNames.length; idx++ ) {\n // Grab the parameter value set in the job entry\n //\n String thisValue = jobExecutionConfiguration.getParams().get( parameterNames[idx] );\n if ( !Utils.isEmpty( thisValue ) ) {\n // Set the value as specified by the user in the job entry\n //\n jobMeta.setParameterValue( parameterNames[idx], thisValue );\n }\n }\n jobMeta.activateParameters();\n\n job.setSocketRepository( CarteSingleton.getInstance().getSocketRepository() );\n\n CarteSingleton.getInstance().getJobMap().addJob( job.getJobname(), carteObjectId, job, jobConfiguration );\n\n // Make sure to disconnect from the repository when the job finishes.\n //\n if ( repository != null ) {\n job.addJobListener( new JobAdapter() {\n public void jobFinished( Job job ) {\n repository.disconnect();\n }\n } );\n }\n return getJobStatus( carteObjectId );\n } catch ( KettleException e ) {\n e.printStackTrace();\n }\n return null;\n }",
"private static String createNewJobid(V2JobDefinition jobDefinition, NamedJobs namedJobs) throws InvalidNamedJobException {\n final NamedJobs.JobIdForSubmit jobIdForSubmit = namedJobs.getJobIdForSubmit(jobDefinition.getName(), jobDefinition);\n return jobIdForSubmit.getJobId();\n }",
"public Job(int jobID, String username, String company, String industry,\n String title, Double salary, boolean isAvailable) {\n super(username, company, industry);\n this.jobID = jobID;\n this.title = title;\n this.salary = salary;\n this.isAvailable = isAvailable;\n }",
"java.lang.String getJobId();",
"public Command create(Object... param);",
"@Test\n public void testCreateConfirmDepositAmountsJob() throws Exception {\n Job asj = new AllocationScraperJob();\n asj.setStatus( JobStatus.completed );\n dao.insertJob( asj );\n\n // setup the job\n Job j = new CreateConfirmDepositAmountsJob();\n j.setStatus( JobStatus.submitted );\n j.getDependentJobs().add( asj );\n int jobId = dao.insertJob( j );\n\n // this should now run the job\n processorService.processJobs();\n\n // verify that the job completed successfully\n Job jobVerify = dao.fetchJobById( jobId );\n Assert.assertEquals( JobStatus.completed, jobVerify.getStatus() );\n }",
"public String createJobId(String date) {\n\t\t// if not date is specified take todaays date. that is not usable in a\n\t\t// same software.\n\t\t// otherwise database foramt for id would change. its only for using in\n\t\t// some other context.\n\t\tif (date.equals(null) || date.equals(\"\"))\n\t\t\tif (!this.startDate.equals(null))\n\t\t\t\tdate = DateMethods.getDate(\"yyyy-MM-dd\", this.startDate);\n\t\t\telse\n\t\t\t\tdate = DateMethods.getDate(\"-\");\n\t\telse\n\t\t\tdate = DateMethods.getDate(\"yyyy-MM-dd\",\n\t\t\t\t\tDateMethods.parseDate(date, \"MMM dd, yyyy\"));\n\t\t// get jobs to get the last digit\n\t\tLinkedList<Job> jobs = Jobs.getJobs(\"startDate='\" + date + \"'\");\n\t\tint lastId = 0;\n\t\tif (jobs.size() > 0) {\n\t\t\tJob lastJob = jobs.getLast();\n\t\t\tlastId = (Integer.parseInt((lastJob.jobId.substring(7, 9))));\n\t\t\t// making next id\n\t\t\tlastId++;\n\t\t}\n\t\tdate = DateMethods.getDate(\"yyMMdd\",\n\t\t\t\tDateMethods.parseDate(date, \"yyyy-MM-dd\"));\n\t\tString id = date + \"-\" + (lastId < 10 ? \"0\" + lastId : lastId);\n\t\treturn id;\n\t}",
"public Job(String username, String password, String company, String industry,\n String title, Double salary) {\n super(username, password, company, industry);\n this.title = title;\n this.salary = salary;\n this.isAvailable = false;\n }",
"public Job(int id, String name, Recruiter recruiter, int fee, String category)\n {\n this.id = id;\n this.name = name;\n this.recruiter = recruiter;\n this.fee = fee;\n this.category = category;\n }",
"boolean createWork(Work work);",
"public interface ITalent {\n\n void newJob(String job);\n}",
"@Override\n protected Object createJobInstance(TriggerFiredBundle bundle) throws Exception {\n Object jobInstance = super.createJobInstance(bundle);\n autowireCapableBeanFactory.autowireBean(jobInstance);\n return jobInstance;\n }",
"interface WithCreate\n extends DefinitionStages.WithLocation,\n DefinitionStages.WithTags,\n DefinitionStages.WithProperties,\n DefinitionStages.WithClientTenantId {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n JobResponse create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n JobResponse create(Context context);\n }",
"FileLoader createJob(Reader reader);",
"public static JobDetails newInstance(String param1, String param2) {\n JobDetails fragment = new JobDetails();\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 BNHaystackLearnStructureJob() {}",
"public static void main(String[] args) {\n\t SimpleDateFormat DateFormat = new SimpleDateFormat(\"yyyyMMddHHmmss\"); \n\t Date d = new Date(); \n\t String returnstr = DateFormat.format(d); \n\t \n\t QuartzPush job = new QuartzPush(); \n\t String job_name =\"11\"; \n\t try {\n\t\t\t\tSystem.out.println(\"★★★★★★★★★★★ \"+\"The QuartzPush Strat,Date is \" +returnstr +\" ★★★★★★★★★★★\");\n\t\t\t\tClass jobClass = Class.forName(\"com.tinytree.job.QuartzPush\");\n\t\t\t\tMap<String ,Object> map = new HashMap<>();\n\t\t\t\tmap.put(\"name\",\"testname\");\n\t\t\t\tmap.put(\"jobName\",\"testname\");\n\t\t\t\tmap.put(\"jobGroup\",\"group\");\n\t\t\t\tmap.put(\"group\",\"group\");\n\t\t\t\tmap.put(\"jobClass\",\"com.tinytree.job.QuartzPush\");\n\t\t\t\t//String cronExpression = \"0 37 16 ? * *\";\n\t\t\t\tString cronExpression = \"0/10 * * * * ?\";//\"0 37 16 ? * *\"\n\t\t\t\tmap.put(\"cronExpression\",cronExpression);\n\n\t QuartzManager.addJob(map);\n\n\t \n\t } catch (Exception e) { \n\t e.printStackTrace(); \n\t } \n\t }",
"public String getJobId();",
"@Override\n public Void run() throws Exception {\n Callable<Job> jobCreator = ReflectionUtils.newInstance(jobConfig.getJobCreator(), jobConfiguration);\n Job job = jobCreator.call();\n job.submit();\n\n // Blocking mode is only for testing\n if(waitForCompletition) {\n job.waitForCompletion(true);\n }\n\n // And generate event with further job details\n EventRecord event = getContext().createEventRecord(\"job-created\", 1);\n Map<String, Field> eventMap = ImmutableMap.of(\n \"tracking-url\", Field.create(job.getTrackingURL()),\n \"job-id\", Field.create(job.getJobID().toString())\n );\n event.set(Field.create(eventMap));\n getContext().toEvent(event);\n return null;\n }",
"public void setJob(String job) {\n this.job = job;\n }",
"public void scheduleJob() {\n JobInfo.Builder builder = null;\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {\n builder = new JobInfo.Builder(mJobId++, mServiceComponent);\n builder.setMinimumLatency(1000);\n builder.setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY);\n // Extras, work duration.\n PersistableBundle extras = new PersistableBundle();\n extras.putLong(WORK_DURATION_KEY, Long.valueOf(1) * 1000);\n extras.putString(\"gsonData\", gsonDataa);\n extras.putInt(\"servicetype\", 1);\n builder.setExtras(extras);\n // Schedule job\n Log.d(TAG, \"Scheduling job\");\n JobScheduler tm = (JobScheduler) getSystemService(Context.JOB_SCHEDULER_SERVICE);\n tm.schedule(builder.build());\n\n }\n\n\n\n }",
"public static Job getJob(Scanner in) {\r\n String[] s = in.nextLine().split(\" \");\r\n int a = Integer.parseInt(s[0]);\r\n int d = Integer.parseInt(s[1]);\r\n return new Job(a, d);\r\n }",
"void allocateWorker(Work work);",
"public static void main(String[] args) {\n\t\tJobDetail job = JobBuilder.newJob(TimeJob.class).withIdentity(\"Time INfo\", \"group1\").build();\n\t\t// Create a trigger with identity\n\t\tTrigger trigger = TriggerBuilder.newTrigger().withIdentity(\"triggerINfo\", \"group1\")\n\t\t\t\t.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever()).build();\n\t\t// Tie both Job and trigger to a scheduler\n\t\tScheduler scheduler;\n\t\ttry {\n\t\t\tscheduler = new StdSchedulerFactory().getScheduler();\n\t\t\tscheduler.start();\n\t\t\tscheduler.scheduleJob(null, trigger);\n\t\t} catch (SchedulerException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"public void createJob(int i, int s, int p, int a) {\n\n //Integer.parseInt(s,16)\n pcb_e = new PCB_block(i, s, p, a);\n\n }",
"public static String createAzkabanJob(String sessionId, AzkabanProjectConfig azkabanProjectConfig)\n throws IOException {\n log.info(\"Creating Azkaban project for: \" + azkabanProjectConfig.getAzkabanProjectName());\n\n // Create zip file\n String zipFilePath = createAzkabanJobZip(azkabanProjectConfig);\n log.info(\"Zip file path: \" + zipFilePath);\n\n // Upload zip file to Azkaban\n String projectId = AzkabanAjaxAPIClient.createAzkabanProject(sessionId, zipFilePath, azkabanProjectConfig);\n log.info(\"Project Id: \" + projectId);\n\n return projectId;\n }",
"public JobID() {\n super();\n }",
"Task createTask();",
"Task createTask();",
"Task createTask();",
"public static JobBuilder newJob(Class<? extends Job> jobClass) {\n JobBuilder b = new JobBuilder();\n b.ofType(jobClass);\n return b;\n }",
"public void addNewJob(String jobId, String shipTo, String shipperContact, String paymentDue){\n JobInfo job = new JobInfo(shipTo,\n shipperContact,\n paymentDue,\n address,\n String.valueOf(latitude),\n String.valueOf(longitude));\n Map<String, Object> postValues = job.toMap();\n Map<String, Object> childUpdates = new HashMap<>();\n childUpdates.put(\"deliverybot/jobs/\" + jobId + \"/info\", postValues);\n firebaseDatabaseReference.updateChildren(childUpdates);\n\n if (selectedDriver.isEmpty())\n firebaseDatabaseReference.child(\"deliverybot/jobs/\" + jobId + \"/status\").setValue(\"Unassigned\");\n else\n firebaseDatabaseReference.child(\"deliverybot/jobs/\" + jobId + \"/status\").setValue(\"Assigned\");\n firebaseDatabaseReference.child(\"deliverybot/jobs/\" + jobId + \"/driver\").setValue(selectedDriver);\n\n // Add route information to firebase\n Route route = new Route(address,\n String.valueOf(latitude),\n String.valueOf(longitude),\n selectedDriver);\n Map<String, Object> postRouteUpdate = route.toMap();\n Map<String, Object> routeChildUpdates = new HashMap<>();\n routeChildUpdates.put(\"deliverybot/routes/\" + jobId, postRouteUpdate);\n firebaseDatabaseReference.updateChildren(routeChildUpdates);\n String toastMessage = getResources().getString(R.string.job_creation_toast);\n Toast.makeText(getApplicationContext(), toastMessage, Toast.LENGTH_LONG).show();\n finish();\n }",
"protected JobConf createJobConf() \n {\n return new JobConf();\n }",
"public static void main(String[] args) throws Exception {\n String projectId = \"your-project-id\";\n String gcsPath = \"gs://\" + \"your-bucket-name\" + \"path/to/file.txt\";\n createJobs(projectId, gcsPath);\n }",
"public Job getJob();",
"String submitJob(JPPFJob job);",
"UUID createArgument(ArgumentCreateRequest request);",
"@Override\n public String getType() {\n return Const.JOB;\n }",
"Argument createArgument();",
"@Override\r\n public File createJobFile(AbstractBuild<?, ?> build, BuildListener listener) throws InterruptedException,\r\n IOException {\n FilePath fp = new FilePath(build.getWorkspace(), expandJobPath(build, listener)); \r\n // TODO not very safe, if e.g. some malicious user provide path to a huge file \r\n String jobContent = fp.readToString(); \r\n FilePath path = createDefaultJobFile(jobContent, build, listener);\r\n return new File(path.getRemote());\r\n }",
"public Job build() {\r\n return job;\r\n }",
"public JobBean() {\n }",
"public JobBuilder name(String name) {\r\n job.setName(name);\r\n return this;\r\n }",
"@PostMapping(\"/job-bids\")\n @Timed\n public ResponseEntity<JobBid> createJobBid(@RequestBody JobBid jobBid) throws URISyntaxException {\n log.debug(\"REST request to save JobBid : {}\", jobBid);\n if (jobBid.getId() != null) {\n throw new BadRequestAlertException(\"A new jobBid cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n JobBid result = jobBidRepository.save(jobBid);\n jobBidSearchRepository.save(result);\n return ResponseEntity.created(new URI(\"/api/job-bids/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"public void creatTask(int uid,String title,String detail,int money,String type,int total_num,Timestamp end_time,String state);",
"public DreamJob (String title) {\r\n System.out.println(\"Message from: DreamJob(String title)\");\r\n this.title = title;\r\n\t}",
"private void scheduleJob() {\n\n }",
"public interface Job {\n\n /** unique id for this job that is used as a reference in the service methods */\n String getId();\n\n /** job executor identification that has acquired this job and is going to execute it */\n String getLockOwner();\n\n /** in case this is a timer, it is the time that the timer should fire, in case this \n * is a message, it is null. */\n Date getDueDate();\n\n /** in case this is a timer, it is the time that the timer should fire, in case this \n * is a message, it is null.\n * @deprecated call {@link #getDueDate()} instead */\n @Deprecated\n Date getDuedate();\n\n /** exception that occurred during the last execution of this job. The transaction \n * of the job execution is rolled back. A synchronization is used to create \n * a separate transaction to update the exception and decrement the retries. */\n String getException();\n\n /** number of retries left. This is only decremented when an exception occurs during job \n * execution. The transaction of the job execution is rolled back. A synchronization is used to create \n * a separate transaction to update the exception and decrement the retries. */\n int getRetries();\n\n /** indicates if this job should be executed separate from any other job \n * in the same process instance */\n boolean isExclusive();\n\n /** the related execution */\n Execution getExecution();\n\n /** the related process instance */\n Execution getProcessInstance();\n\n Date getLockExpirationTime();\n\n}",
"@RequestMapping( value = \"/buildJob/{jobName}\", method = RequestMethod.GET)\n public String startJob(@PathVariable(\"jobName\") String jobName) throws IOException {\n QueueReference queueReference= jenkinsServer\n .getJob(jobName)\n .build();\n// .build(scrum_token);\n\n\n\n return queueReference.getQueueItemUrlPart();\n\n }",
"public Job(String JobID, int RunTime) {\n\t\t\tthis.JobID = JobID;\n\t\t\tthis.RunTime = RunTime;\n\t\t}",
"public CronJobTrigger(String entry) throws IllegalArgumentException {\n try {\n init();\n parse(entry);\n } catch (Exception e) {\n throw new IllegalArgumentException(\"Cron schedule \" + entry + \" is malformed: \" + e.getMessage(), e);\n }\n }",
"boolean addJob(PrintJob job);",
"public Task(String creator) {\r\n \t\tthis(creator, \"Untitled\", \"\", true, false);\r\n \t}",
"@Nonnull\n public JDK8TriggerBuilder <T> forJob (final IJobDetail jobDetail)\n {\n final JobKey k = jobDetail.getKey ();\n if (k.getName () == null)\n throw new IllegalArgumentException (\"The given job has not yet had a name assigned to it.\");\n m_aJobKey = k;\n return this;\n }",
"public DreamJob (String title, String company, double annualSalary ) {\r\n\t System.out.println(\"Message from: DreamJob(String title, String company, double annualSalary)\");\r\n\t this.title = title;\r\n\t this.company = company;\r\n\t this.annualSalary = annualSalary;\r\n\t\t}",
"public void createMission(Mission mission) throws IllegalArgumentException;",
"public static void writeNewJob(Job job) {\n DatabaseReference database = FirebaseDatabase.getInstance().getReference();\n database.child(\"jobs\").push().setValue(job);\n }",
"@Test\n public void parameterTest () throws SchedulerException, InterruptedException {\n // define the job and tie it to our SimpleJob class\n JobDetail job = JobBuilder.newJob(DataParseJob.class)\n .withIdentity(\"dataParseJob\", \"group2\") // name \"dataParseJob\", group \"group2\"\n .usingJobData(\"jobSays\", \"Hello World!\")\n .usingJobData(\"myFloatValue\", 3.141f)\n .build();\n\n // Trigger the job to run now, and then repeat every 40 seconds\n Trigger trigger = TriggerBuilder.newTrigger()\n .withIdentity(\"trigger2\", \"group2\")\n .startNow()\n .withSchedule(SimpleScheduleBuilder.simpleSchedule()\n .withIntervalInSeconds(10)\n .repeatForever())\n .build();\n\n // Tell quartz to schedule the job using our trigger\n scheduler.scheduleJob(job, trigger);\n\n // make quartz keep going\n while(true) {\n Thread.sleep(3000);\n }\n }",
"void storeJob(Job job, JobStatus status, Map<String, Object> jobOutput, String[] standardOutput);",
"public int getJobId() ;",
"public JobV3 run(int version, CreateFrameV3 cf) {\n if (cf.dest == null) {\n cf.dest = new KeyV3.FrameKeyV3();\n cf.dest.name = Key.rand();\n }\n\n\n CreateFrame cfr = new CreateFrame(cf.dest.key());\n cf.fillImpl(cfr);\n return new JobV3(cfr.execImpl());\n }",
"private Task createTaskFromGivenArgs(Name name, TaskDate taskStartDate, TaskDate taskEndDate, Status taskStatus) {\n\t if (isEventTask(taskStartDate, taskEndDate)) {\n\t return new EventTask(name, taskStartDate, taskEndDate, taskStatus);\n\t }\n\t if (isDeadline(taskEndDate)) {\n\t return new DeadlineTask(name, taskEndDate, taskStatus);\n\t }\n\t return new Task(name, taskStatus);\n\t}",
"T create(R argument);",
"@Test\n public void testAllocationScraperJob() throws Exception {\n AllocationScraperJob j = new AllocationScraperJob();\n j.setStatus( JobStatus.submitted );\n j.setStartDate( Calendar.getInstance().getTime() );\n j.setDaysAhead( 27 );\n int jobId = dao.insertJob( j );\n\n // this should now run the job\n processorService.processJobs();\n\n // verify that the job completed successfully\n Job jobVerify = dao.fetchJobById( jobId );\n Assert.assertEquals( JobStatus.completed, jobVerify.getStatus() );\n }"
] |
[
"0.6856663",
"0.6730894",
"0.666986",
"0.64441156",
"0.6228099",
"0.617468",
"0.6170687",
"0.6151155",
"0.6093322",
"0.59966135",
"0.5992709",
"0.5957167",
"0.5933924",
"0.5933924",
"0.59184384",
"0.59121007",
"0.59016985",
"0.5887618",
"0.58843654",
"0.58829343",
"0.5850708",
"0.58226943",
"0.58066165",
"0.578918",
"0.5772167",
"0.5733445",
"0.56682",
"0.5633567",
"0.56291413",
"0.5620288",
"0.55981106",
"0.5575943",
"0.55734915",
"0.5563596",
"0.5549331",
"0.55313545",
"0.5512432",
"0.54500943",
"0.54436773",
"0.5440997",
"0.54241663",
"0.5397095",
"0.5395041",
"0.5384257",
"0.53805035",
"0.5369106",
"0.5364356",
"0.5349161",
"0.5323919",
"0.5317952",
"0.52820355",
"0.5276035",
"0.5273926",
"0.52705157",
"0.52651066",
"0.52531713",
"0.5251661",
"0.52505493",
"0.52457875",
"0.5238942",
"0.52275723",
"0.5223556",
"0.522168",
"0.522144",
"0.52183115",
"0.52183115",
"0.52183115",
"0.52068293",
"0.5200758",
"0.51844984",
"0.5183106",
"0.5173235",
"0.5161713",
"0.5143831",
"0.5124915",
"0.5122336",
"0.511954",
"0.51161766",
"0.5112282",
"0.5108511",
"0.51047665",
"0.51039284",
"0.50934577",
"0.5090419",
"0.5086456",
"0.50810736",
"0.507925",
"0.5073931",
"0.5043141",
"0.50330997",
"0.50309896",
"0.5024469",
"0.5010893",
"0.5007682",
"0.50055546",
"0.49951965",
"0.49935684",
"0.498873",
"0.49877352",
"0.4984398",
"0.4983208"
] |
0.0
|
-1
|
Multiply two colors by each other. Treats 0xff as 1.0. Yourself came up with the algorithm, I'm sure it makes sense to someone
|
public int colorMult(int x, int y) {
int res = 0;
for (int octet = 0; octet < 3; ++octet) {
res |= (((x & 0xff) * (y & 0xff)) / 0xff) << (octet << 3);
x >>= 8;
y >>= 8;
}
return res;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private static int mixSigColor(int c1, int c2, int ratio) {//0~100\r\n return 0xff & (((c2 * ratio) + (c1 * (100 - ratio))) / 100);\r\n }",
"private static int mixColors(float t, byte r1, byte g1, byte b1, byte a1, byte r2, byte g2, byte b2, byte a2) {\n final int r = lerp(t, r1, r2);\n final int g = lerp(t, g1, g2);\n final int b = lerp(t, b1, b2);\n final int a = lerp(t, a1, a2);\n return (r << 24) | (g << 16) | (b << 8) | a;\n }",
"public Color4 getEffectColorMul();",
"private static final int mult (int a, int b, int g) {\n int p = 0;\n while (b != 0) {\n if ((b & 0x01) != 0) p ^= a;\n a <<= 1;\n if (a > 0xFF) a ^= g;\n b >>>= 1;\n }\n return p;\n }",
"private static double dif(Color one, Color two) {\n\t\treturn Math.abs(one.getRed() - two.getRed()) + Math.abs(one.getGreen() - two.getGreen()) + Math.abs(one.getBlue() - two.getBlue());\n\t}",
"public static int mixColors(int a, int b) {\r\n int[] av = Colors.hexToRgb(a);\r\n int[] bv = Colors.hexToRgb(b);\r\n int[] ret = { (int) (((long) av[0] + (long) bv[0]) >> 1), (int) (((long) av[1] + (long) bv[1]) >> 1), (int) (((long) av[2] + (long) bv[2]) >> 1) };\r\n return rgbToHex(ret);\r\n }",
"@SideOnly(Side.CLIENT)\n public int colorMultiplier(IBlockAccess p_149720_1_, int p_149720_2_, int p_149720_3_, int p_149720_4_)\n {\n return 0xFFFFFF;\n }",
"private int mediePixeli(int pixel1, int pixel2) {\n\t return (int) (((((pixel1) ^ (pixel2)) & 0xfffefefeL) >> 1) + ((pixel1) & (pixel2)));\n\t }",
"public abstract int rgbColor(double u, double v);",
"int mul( int a , int b)\n {\n double c,d;\n \tif (a==0)\n\t c=65536;\n\tif(b==0)\n\t d=65536;\n c=(double)a;\n d=(double)b;\n a= (int)((c*d)%65537);\n return a;\n }",
"public static void mult(LedColor[] colors, float p) {\r\n\t\tfor (int i = 0; i < colors.length; i++) {\r\n\t\t\tcolors[i].mult(p);\r\n\t\t}\r\n\t}",
"public static byte GMul(int a, int b) {\n\n byte p = 0;\n byte counter;\n byte hi_bit_set;\n for (counter = 0; counter < 8; counter++) {\n if ((b & 1) != 0) {\n p ^= a;\n }\n hi_bit_set = (byte) (a & 0x80);\n a <<= 1;\n if (hi_bit_set != 0) {\n a ^= 0x1b; /* x^8 + x^4 + x^3 + x + 1 */\n }\n b >>= 1;\n }\n return p;\n}",
"private static int galoisMult(int a, int b)\n\t{\n\t\tint result = 0;\n\t\tfor (int i=0; i<8; i++)\n\t\t{\n\t\t\tif((b&1) == 1) //low bit of b set\n\t\t\t\tresult = result^a;\n\t\t\tboolean aHighSet = (a & 128) == 128; //8th bit of a set\n\t\t\ta <<= 1;\n\t\t\tassert (a&1) == 0;\n\t\t\t\n\t\t\ta &= 255; //getting rid of 9th bit\n\t\t\tassert ((a&256) != 256);\n\t\t\t\n\t\t\tif (aHighSet)\n\t\t\t\ta ^= (0x1b);\n\t\t\t\n\t\t\tb >>= 1;\n\t\t\tassert (b&128) != 128; //8 bit is zero\n\t\t}\n\t\treturn result;\n\t}",
"public void fade2black() {\n int var3 = this.field_723 * this.field_724;\n int var2 = 0;\n if(field_759 || var2 < var3) {\n do {\n int var1 = this.pixels[var2] & 16777215;\n this.pixels[var2] = (var1 >>> 1 & 8355711) + (var1 >>> 2 & 4144959) + (var1 >>> 3 & 2039583) + (var1 >>> 4 & 986895);\n ++var2;\n } while(var2 < var3);\n\n }\n }",
"public int colorMultiplier(IBlockAccess p_149720_1_, int p_149720_2_, int p_149720_3_, int p_149720_4_)\n {\n int var5 = this.func_149885_e(p_149720_1_, p_149720_2_, p_149720_3_, p_149720_4_);\n return var5 != 2 && var5 != 3 ? 16777215 : p_149720_1_.getBiomeGenForCoords(p_149720_2_, p_149720_4_).getBiomeGrassColor(p_149720_2_, p_149720_3_, p_149720_4_);\n }",
"private Color addColors(Color a, Color b) {\n int red = Math.min(255, a.getRed() + b.getRed());\n int green = Math.min(255, a.getGreen() + b.getGreen());\n int blue = Math.min(255, a.getBlue() + b.getBlue());\n return new Color(red, green, blue);\n }",
"public static Color mix(Color colorA, Color colorB){\n\t\tKMColor color = new KMColor(colorA);\n\t\tcolor.mix(colorB);\n\t\treturn color.getColor();\n\t}",
"private static Color newColor(int red, int green, int blue) {\n return new Color(red / 255.0, green / 255.0, blue / 255.0);\n }",
"public static int mult(int color, float v) {\n return fromRGB((int) (getRed(color) * v), (int) (getGreen(color) * v), (int) (getBlue(color) * v));\n }",
"private static void multiply(float[] a, float[] b, float[] destination) {\r\n\t\tfor(int i = 0; i < 4; i++){\r\n\t\t\tfor(int j = 0; j < 4; j++){\r\n\t\t\t\tfor(int k = 0; k < 4; k++){\r\n\t\t\t\t\tset(destination, i, j, get(destination, i, j) + get(a, i, k) * get(b, k, j));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private static Image Transform1ColorToTransparency2ToColors(\n\t\t\tfinal BufferedImage image, final Color c1, final Color c2, \n\t\t\tfinal Color c3, final Color c4, final int otherColor1,\n\t\t\tfinal Color c5, final Color c6, final int otherColor2){\n\t\tfinal int r1 = c1.getRed();\n\t\tfinal int g1 = c1.getGreen();\n\t\tfinal int b1 = c1.getBlue();\n\t\tfinal int r2 = c2.getRed();\n\t\tfinal int g2 = c2.getGreen();\n\t\tfinal int b2 = c2.getBlue();\n\t\tfinal int r3 = c3.getRed();\n\t\tfinal int g3 = c3.getGreen();\n\t\tfinal int b3 = c3.getBlue();\n\t\tfinal int r4 = c4.getRed();\n\t\tfinal int g4 = c4.getGreen();\n\t\tfinal int b4 = c4.getBlue();\n\t\tfinal int r5 = c5.getRed();\n\t\tfinal int g5 = c5.getGreen();\n\t\tfinal int b5 = c5.getBlue();\n\t\tfinal int r6 = c6.getRed();\n\t\tfinal int g6 = c6.getGreen();\n\t\tfinal int b6 = c6.getBlue();\n\n\t\tfinal ImageFilter filter = new RGBImageFilter(){\n\t\t\tpublic final int filterRGB(int x, int y, int rgb)\n\t\t\t{\n\t\t\t\tint r = (rgb & 0xFF0000) >> 16;\n\t\tint g = (rgb & 0xFF00) >> 8;\n\t\tint b = rgb & 0xFF;\n\t\tif (r >= r1 && r <= r2 &&\n\t\t\t\tg >= g1 && g <= g2 &&\n\t\t\t\tb >= b1 && b <= b2){\n\t\t\t// Set fully transparent but keep color\n\t\t\treturn rgb & 0xFFFFFF;\n\t\t}\n\t\tif (r >= r3 && r <= r4 &&\n\t\t\t\tg >= g3 && g <= g4 &&\n\t\t\t\tb >= b3 && b <= b4){\n\t\t\t// Set fully transparent but keep color\n\t\t\treturn otherColor1;\n\t\t}\n\t\tif (r >= r5 && r <= r6 &&\n\t\t\t\tg >= g5 && g <= g6 &&\n\t\t\t\tb >= b5 && b <= b6){\n\t\t\t// Set fully transparent but keep color\n\t\t\treturn otherColor2;\n\t\t}\n\t\treturn rgb;\n\t\t\t}\n\t\t};\n\n\t\tImageProducer ip = new FilteredImageSource(image.getSource(), filter);\n\t\treturn Toolkit.getDefaultToolkit().createImage(ip);\n\t}",
"public static int mulColorLightness(int hsl, int scalar, int faceInfo) {\n\t\tif ((faceInfo & 2) == 2) {\n\t\t\tif (scalar < 0) {\n\t\t\t\tscalar = 0;\n\t\t\t} else if (scalar > 127) {\n\t\t\t\tscalar = 127;\n\t\t\t}\n\t\t\tscalar = 127 - scalar;\n\t\t\treturn scalar;\n\t\t}\n\t\tscalar = (scalar * (hsl & 0x7f)) >> 7;\n\t\tif (scalar < 2) {\n\t\t\tscalar = 2;\n\t\t} else if (scalar > 126) {\n\t\t\tscalar = 126;\n\t\t}\n\t\treturn (hsl & 0xff80) + scalar;\n\t}",
"private int ditherPixel(int futurePixel, int quantError, double factor) {\n int futureRed, futureGreen, futureBlue, futureAlpha,\n quantRed, quantGreen, quantBlue, quantAlpha;\n\n quantRed = (int)(Color.red(quantError) * factor);\n quantGreen = (int)(Color.green(quantError) * factor);\n quantBlue = (int)(Color.blue(quantError) * factor);\n quantAlpha = (int)(Color.alpha(quantError));\n\n futureRed = Color.red(futurePixel);\n futureGreen = Color.green(futurePixel);\n futureBlue = Color.blue(futurePixel);\n futureAlpha = Color.alpha(futurePixel);\n\n// return Color.argb(futureAlpha, futureRed + quantRed, futureGreen + quantGreen, futureBlue + quantBlue);\n return Color.argb(futureAlpha, futureRed, futureGreen, futureBlue);\n }",
"public int filterRGB(int x, int y, int argb) {\n color = new Color(argb);\n newBlue = multColor(color.getBlue(), blueMultiplier);\n newGreen = multColor(color.getGreen(), greenMultiplier);\n newRed = multColor(color.getRed(), redMultiplier);\n newColor = new Color(newRed, newGreen, newBlue);\n return (newColor.getRGB());\n }",
"public ColorRgb getColorRgbBiLinear(double x, double y)\n {\n //-----------------------------------------------------------------\n double u = x - Math.floor(x);\n double v = y - Math.floor(y);\n double U = u * ((double)(getXSize()-2));\n double V = v * ((double)(getYSize()-2));\n int i = (int)Math.floor(U);\n int j = (int)Math.floor(V);\n double du = U - (double)i;\n double dv = V - (double)j;\n RGBPixel p;\n\n //-----------------------------------------------------------------\n p = getPixelRgb(i, j);\n ColorRgb F00 = new ColorRgb();\n F00.r = ((double)VSDK.signedByte2unsignedInteger(p.r)) / 255.0;\n F00.g = ((double)VSDK.signedByte2unsignedInteger(p.g)) / 255.0;\n F00.b = ((double)VSDK.signedByte2unsignedInteger(p.b)) / 255.0;\n\n p = getPixelRgb(i+1, j);\n ColorRgb F10 = new ColorRgb();\n F10.r = ((double)VSDK.signedByte2unsignedInteger(p.r)) / 255.0;\n F10.g = ((double)VSDK.signedByte2unsignedInteger(p.g)) / 255.0;\n F10.b = ((double)VSDK.signedByte2unsignedInteger(p.b)) / 255.0;\n\n p = getPixelRgb(i, j+1);\n ColorRgb F01 = new ColorRgb();\n F01.r = ((double)VSDK.signedByte2unsignedInteger(p.r)) / 255.0;\n F01.g = ((double)VSDK.signedByte2unsignedInteger(p.g)) / 255.0;\n F01.b = ((double)VSDK.signedByte2unsignedInteger(p.b)) / 255.0;\n\n p = getPixelRgb(i+1, j+1);\n ColorRgb F11 = new ColorRgb();\n F11.r = ((double)VSDK.signedByte2unsignedInteger(p.r)) / 255.0;\n F11.g = ((double)VSDK.signedByte2unsignedInteger(p.g)) / 255.0;\n F11.b = ((double)VSDK.signedByte2unsignedInteger(p.b)) / 255.0;\n\n //-----------------------------------------------------------------\n ColorRgb FU0 = new ColorRgb();\n FU0.r = F00.r + du * (F10.r-F00.r);\n FU0.g = F00.g + du * (F10.g-F00.g);\n FU0.b = F00.b + du * (F10.b-F00.b);\n\n ColorRgb FU1 = new ColorRgb();\n FU1.r = F01.r + du * (F11.r-F01.r);\n FU1.g = F01.g + du * (F11.g-F01.g);\n FU1.b = F01.b + du * (F11.b-F01.b);\n\n ColorRgb FVAL = new ColorRgb();\n FVAL.r = FU0.r + dv * (FU1.r-FU0.r);\n FVAL.g = FU0.g + dv * (FU1.g-FU0.g);\n FVAL.b = FU0.b + dv * (FU1.b-FU0.b);\n\n return FVAL;\n }",
"public static int weakRGB(int rgb,float alpha){\r\n\t\tif(alpha==1.0){\r\n\t\t\treturn rgb;\r\n\t\t}\r\n\t\t\r\n\t\tint a = (int)(alpha*0xff);\r\n\t\tint nrgb = 0xff000000;\r\n\t\tint r = a*((rgb&0x00ff0000)>>16); //red\r\n\t\tr/=0xff;\r\n\t\tnrgb += r<<16;\r\n\t\tr = a*((rgb&0x0000ff00)>>8); \t //green\r\n\t\tr/=0xff;\r\n\t\tnrgb+=r<<8;\r\n\t\tr = a*(rgb&0x000000ff); \t //blue\r\n\t\tr/=0xff;\r\n\t\tnrgb+=r;\r\n\t//\tnrgb+=0xff000000;\r\n\t\t\r\n\t\treturn nrgb;\r\n\t}",
"public static void mult(LedColor[] colors, LedColor otherCcolor) {\r\n\t\tfor (int i = 0; i < colors.length; i++) {\r\n\t\t\tcolors[i].multiplyComponentsBy(otherCcolor);\r\n\t\t}\r\n\t}",
"void dither();",
"void dither();",
"private static int colorToRGB(int alpha, int red, int green, int blue) {\n \n int newPixel = 0;\n newPixel += alpha; newPixel = newPixel << 8;\n newPixel += red; newPixel = newPixel << 8;\n newPixel += green; newPixel = newPixel << 8;\n newPixel += blue;\n \n return newPixel;\n }",
"private Picture saturate(Picture p, double saturateFactor) {\n\t\tPicture output = copy(p);\n\t\tdouble f = saturateFactor / 100.0;\n\n\t\tfor (int i = 0; i < p.getWidth(); i++) {\n\t\t\tfor (int j = 0; j < p.getHeight(); j++) {\n\t\t\t\tCoordinate c = new Coordinate(i, j);\n\t\t\t\tdouble b = p.getPixel(c).getIntensity();\n\t\t\t\tif (f < 0) {\n\t\t\t\t\tdouble oldRed = p.getPixel(c).getRed();\n\t\t\t\t\tdouble oldGreen = p.getPixel(c).getGreen();\n\t\t\t\t\tdouble oldBlue = p.getPixel(c).getBlue();\n\t\t\t\t\tdouble newRed = oldRed * (1.0 + (f)) - (b * f);\n\t\t\t\t\tdouble newGreen = oldGreen * (1.0 + (f)) - (b * f);\n\t\t\t\t\tdouble newBlue = oldBlue * (1.0 + (f)) - (b * f);\n\t\t\t\t\tdouble[] outs = limits(newRed, newGreen, newBlue);\n\t\t\t\t\toutput.setPixel(c, new ColorPixel(outs[0], outs[1], outs[2]));\n\t\t\t\t} else if (f > 0) {\n\t\t\t\t\tdouble oldRed = p.getPixel(c).getRed();\n\t\t\t\t\tdouble oldGreen = p.getPixel(c).getGreen();\n\t\t\t\t\tdouble oldBlue = p.getPixel(c).getBlue();\n\t\t\t\t\tdouble a = oldRed;\n\t\t\t\t\tif (oldGreen > oldRed && oldGreen > oldBlue) {\n\t\t\t\t\t\ta = oldGreen;\n\t\t\t\t\t} else if (oldBlue > oldRed && oldBlue > oldGreen) {\n\t\t\t\t\t\ta = oldBlue;\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tdouble newRed = oldRed * ((a + ((1.0 - a) * (f))) / a);\n\t\t\t\t\t\tdouble newGreen = oldGreen * ((a + ((1.0 - a) * (f))) / a);\n\t\t\t\t\t\tdouble newBlue = oldBlue * ((a + ((1.0 - a) * (f))) / a);\n\t\t\t\t\t\tdouble[] outs = limits(newRed, newGreen, newBlue);\n\t\t\t\t\t\toutput.setPixel(c, new ColorPixel(outs[0], outs[1], outs[2]));\n\t\t\t\t\t} catch (RuntimeException e) {\n\t\t\t\t\t\toutput.setPixel(c, new ColorPixel(0, 0, 0));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\toutput.setPixel(c, p.getPixel(c));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn output;\n\t}",
"private static String m2380a(byte[] bArr, byte[] bArr2) {\n byte[] bArr3 = new byte[(((bArr.length + 2) / 3) * 4)];\n int length = bArr.length - (bArr.length % 3);\n int i = 0;\n for (int i2 = 0; i2 < length; i2 += 3) {\n int i3 = i + 1;\n bArr3[i] = bArr2[(bArr[i2] & 255) >> 2];\n int i4 = i3 + 1;\n int i5 = i2 + 1;\n bArr3[i3] = bArr2[((bArr[i2] & 3) << 4) | ((bArr[i5] & 255) >> 4)];\n int i6 = i4 + 1;\n int i7 = i2 + 2;\n bArr3[i4] = bArr2[((bArr[i5] & 15) << 2) | ((bArr[i7] & 255) >> 6)];\n i = i6 + 1;\n bArr3[i6] = bArr2[bArr[i7] & 63];\n }\n switch (bArr.length % 3) {\n case 1:\n int i8 = i + 1;\n bArr3[i] = bArr2[(bArr[length] & 255) >> 2];\n int i9 = i8 + 1;\n bArr3[i8] = bArr2[(bArr[length] & 3) << 4];\n int i10 = i9 + 1;\n bArr3[i9] = 61;\n bArr3[i10] = 61;\n break;\n case 2:\n int i11 = i + 1;\n bArr3[i] = bArr2[(bArr[length] & 255) >> 2];\n int i12 = i11 + 1;\n int i13 = length + 1;\n bArr3[i11] = bArr2[((bArr[length] & 3) << 4) | ((bArr[i13] & 255) >> 4)];\n int i14 = i12 + 1;\n bArr3[i12] = bArr2[(bArr[i13] & 15) << 2];\n bArr3[i14] = 61;\n break;\n }\n try {\n return new String(bArr3, \"US-ASCII\");\n } catch (UnsupportedEncodingException e) {\n throw new AssertionError(e);\n }\n }",
"private static int m3068c(int i, int i2) {\n return 255 - (((255 - i2) * (255 - i)) / NormalGiftView.ALPHA_255);\n }",
"public void k() {\n float f2 = BitmapDescriptorFactory.HUE_RED;\n for (float f3 : this.i) {\n if (f3 > BitmapDescriptorFactory.HUE_RED) {\n f2 += f3;\n }\n }\n if (f2 != BitmapDescriptorFactory.HUE_RED) {\n int length = this.i.length;\n for (int i2 = 0; i2 < length; i2++) {\n float[] fArr = this.i;\n if (fArr[i2] > BitmapDescriptorFactory.HUE_RED) {\n fArr[i2] = fArr[i2] / f2;\n }\n }\n }\n }",
"protected int getColorMultiplier(EntityNMCreeper entitylivingbaseIn, float lightBrightness, float partialTickTime)\r\n {\r\n float f = entitylivingbaseIn.getCreeperFlashIntensity(partialTickTime);\r\n\r\n if ((int)(f * 10.0F) % 2 == 0)\r\n {\r\n return 0;\r\n }\r\n else\r\n {\r\n int i = (int)(f * 0.2F * 255.0F);\r\n i = MathHelper.clamp(i, 0, 255);\r\n return i << 24 | 822083583;\r\n }\r\n }",
"private int del_energyCal(int x1, int y1, int x2, int y2) {\n Color a = pic.get(x1, y1);\n Color b = pic.get(x2, y2);\n\n int Red = a.getRed() - b.getRed();\n int Green = a.getGreen() - b.getGreen();\n int Blue = a.getBlue() - b.getBlue();\n\n int RedGreenBlue = (Red * Red) + (Green * Green) + (Blue * Blue);\n return RedGreenBlue;\n\n }",
"public static double getColorDifference(int a, int b) {\r\n if (a == b) {\r\n return 0;\r\n }\r\n return getColorDifference(getRGB(a), getRGB(b));\r\n }",
"public static double getRGBColorDifference1(int color, int color2) {\r\n if (color == color2) {\r\n return 0;\r\n }\r\n Color c = new Color(color);\r\n Color c2 = new Color(color2);\r\n int dif0 = c.getRed() - c2.getRed();\r\n int dif1 = c.getGreen() - c2.getGreen();\r\n int dif2 = c.getBlue() - c2.getBlue();\r\n return Math.sqrt(dif0 * dif0 + dif1 * dif1 + dif2 * dif2);\r\n }",
"public int multiply(int x, int y) {\n int n1 = x; //n1 = c_n * 2^n + c_n-1 * 2^n-1 + ... + c_1 * 2 + c_0 * 1 where c_i = {0, 1} \n int n2 = y; //n2 = c_m * 2^m + c_m-1 * 2^m-1 + ... + c_1 * 2 + c_0 * 1 where c_i ] {0, 1}\n int sum = 0; //named sum b/c represent the product of n1 and n2 as the sum of their constituent parts\n /*\n let n1 be rep as in its binary form (***...***) a bit string\n n1*n2 = (***...***)(c_m * 2^m + ... + c_0 * 1)\n = (***...***)(c_0 * 1) + (***...***)(c_1 * 2) + ... + (***...***)(c_m * 2^m)\n since << has the effect of multiplying a number by 2, can rep as\n = (***...***)(c_0 * 1) + (***...***)(c_1 * 1) << 1 + (***...***)(c_2 * 1) << 2 + ... + (***...***)(c_m * 1) << m\n so for each loop through a loop left shift n1 by one to simulate multiplying the next term by 2\n also right shift n2 to find c_i, the value of the bit in the bit string n2\n */\n while (n2 != 0) { // if n2 == 0 run through the length of n2 and nothing left to do\n if ((n2 & 1) == 0) { //find the last bit of n2; if it is 0 then do nothing because the n1 term will be multiplied by 0\n } else {//else it is 1 so add n1 to the sum\n sum = add(sum, n1); //bitwise addition has already been defined (implemented)\n }\n n1 = n1 << 1; //leftshift n1 to mult by 2; see above comments\n n2 = n2 >>> 1; //rightshift n2 to find value of next bit in bit string\n }\n return sum;\n }",
"public RGBImage makeRGBImage()\r\n {\r\n\tint rows = getHeight();\r\n\tint cols = getWidth();\r\n \r\n\tshort[][] red = new short[rows][cols]; \r\n\tshort[][] green = new short[rows][cols]; \r\n\tshort[][] blue = new short[getHeight()][getWidth()]; \r\n \r\n\t@SuppressWarnings(\"unused\")\r\n\tdouble H, S, I;\r\n\tshort v1, v2, v3, h, h0, sat, intens;\r\n\tint sector;\r\n\r\n\tfor (int row = 0; row < rows; row++)\r\n\t{\r\n\t for (int col = 0; col < cols; col++)\r\n\t {\r\n\r\n\t\tif (saturation[row][col] == 0)\r\n\t\t{\r\n\t\t red[row][col] = intensity[row][col];\r\n\t\t green[row][col] = intensity[row][col];\r\n\t\t blue[row][col] = intensity[row][col];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t h0 = hue[row][col];\r\n\r\n\t\t if (h0 <= (L-1)/3)\r\n\t\t {\r\n\t\t\th = (short)h0;\r\n\t\t\tsector = 1;\r\n\t\t }\r\n\t\t else if (h0 <= 2*(L-1)/3)\r\n\t\t {\r\n\t\t\th = (short)(h0 - (L-1)/3);\r\n\t\t\tsector = 2;\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t\th = (short)(h0 - 2*(L-1)/3);\r\n\t\t\tsector = 3;\r\n\t\t }\r\n\r\n\t\t H = h * 2 * Math.PI / (L-1);\r\n\r\n\t\t sat = saturation[row][col];\r\n\t\t S = (double)sat / (L-1);\r\n\r\n\t\t intens = intensity[row][col]; \r\n\t\t I = (double)intens / (L-1);\r\n\r\n\t\t v1 = (short)Math.round(intens * (1 - S));\r\n\t\t v1 = checkInterval (v1);\r\n\r\n\t\t v2 = (short)Math.round(intens * (1 + S * Math.cos(H)/\r\n\t\t\t\t\t\t Math.cos(Math.PI/3 - H) ));\r\n\t\t v2 = checkInterval (v2);\r\n \r\n\t\t v3 = (short)Math.round(3 * intens - (v1 + v2));\r\n\t\t v3 = checkInterval (v3);\r\n \r\n\t\t if (sector == 1)\r\n\t\t {\r\n\t\t\tblue[row][col] = v1;\r\n\t\t\tred[row][col] = v2;\r\n\t\t\tgreen[row][col] = v3;\r\n\t\t }\r\n\t\t else if (sector == 2)\r\n\t\t {\r\n\t\t\tred[row][col] = v1;\r\n\t\t\tgreen[row][col] = v2;\r\n\t\t\tblue[row][col] = v3;\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t\tgreen[row][col] = v1;\r\n\t\t\tblue[row][col] = v2;\r\n\t\t\tred[row][col] = v3;\r\n\t\t }\r\n\t\t}\r\n\t }\r\n\t}\r\n \r\n\treturn new RGBImage (red, green, blue);\r\n }",
"public static double similarity(Color c1,Color c2){\n LOG.info(\"C1,\"+c1.toString()+\",C2:\"+c2.toString());\n //\n double r2_r1 = distance(c2.getRed(),c1.getRed());\n double g2_g1 = distance(c2.getGreen(),c1.getGreen());\n double b2_b1 = distance(c2.getBlue(),c1.getBlue());\n\n double distance = Math.sqrt(r2_r1+g2_g1+b2_b1);\n double avgRgb = Math.sqrt(Math.pow(255,2)+Math.pow(255,2)+Math.pow(255,2));\n double differ = distance/avgRgb;\n LOG.info(\"differ,\"+differ+\"distance:\"+distance+\",avgRgb:\"+avgRgb);\n return 1.00-differ;\n }",
"private Color calcSpecularComp(double ks, Vector v, Vector normal, Vector l, double shininess, Color lightIntensity){\n Vector R = new Vector(l);\n normal.scale(2*l.dotProduct(normal));\n R.subtract(normal);\n v.normalize();\n R.normalize();\n double KsVdotR = ks * Math.pow(v.dotProduct(R), shininess);\n int red = Math.min(255,(int)(lightIntensity.getRed() * KsVdotR));\n red = Math.max(red, 0);\n int green = Math.min(255,(int)(lightIntensity.getGreen() * KsVdotR));\n green = Math.max(green, 0);\n int blue = Math.min(255,(int)(lightIntensity.getBlue() * KsVdotR));\n blue = Math.max(blue, 0);\n return new Color(red, green, blue);\n }",
"@Test\n public void testMonochromaticPalettesTwo() {\n this.runAnalogousPalette(RGB_RESULTS_TWO, 2);\n }",
"private void c()\r\n/* 81: */ {\r\n/* 82: */ BufferedImage localBufferedImage;\r\n/* 83: */ try\r\n/* 84: */ {\r\n/* 85:102 */ localBufferedImage = cuj.a(bsu.z().O().a(this.g).b());\r\n/* 86: */ }\r\n/* 87: */ catch (IOException localIOException)\r\n/* 88: */ {\r\n/* 89:104 */ throw new RuntimeException(localIOException);\r\n/* 90: */ }\r\n/* 91:107 */ int i1 = localBufferedImage.getWidth();\r\n/* 92:108 */ int i2 = localBufferedImage.getHeight();\r\n/* 93:109 */ int[] arrayOfInt = new int[i1 * i2];\r\n/* 94:110 */ localBufferedImage.getRGB(0, 0, i1, i2, arrayOfInt, 0, i1);\r\n/* 95: */ \r\n/* 96:112 */ int i3 = i2 / 16;\r\n/* 97:113 */ int i4 = i1 / 16;\r\n/* 98: */ \r\n/* 99:115 */ int i5 = 1;\r\n/* 100: */ \r\n/* 101:117 */ float f1 = 8.0F / i4;\r\n/* 102:119 */ for (int i6 = 0; i6 < 256; i6++)\r\n/* 103: */ {\r\n/* 104:120 */ int i7 = i6 % 16;\r\n/* 105:121 */ int i8 = i6 / 16;\r\n/* 106:123 */ if (i6 == 32) {\r\n/* 107:124 */ this.d[i6] = (3 + i5);\r\n/* 108: */ }\r\n\t\t\t\t\tint i9;\r\n/* 109:127 */ for (i9 = i4 - 1; i9 >= 0; i9--)\r\n/* 110: */ {\r\n/* 111:129 */ int i10 = i7 * i4 + i9;\r\n/* 112:130 */ int i11 = 1;\r\n/* 113:131 */ for (int i12 = 0; (i12 < i3) && (i11 != 0); i12++)\r\n/* 114: */ {\r\n/* 115:132 */ int i13 = (i8 * i4 + i12) * i1;\r\n/* 116:134 */ if ((arrayOfInt[(i10 + i13)] >> 24 & 0xFF) != 0) {\r\n/* 117:135 */ i11 = 0;\r\n/* 118: */ }\r\n/* 119: */ }\r\n/* 120:138 */ if (i11 == 0) {\r\n/* 121: */ break;\r\n/* 122: */ }\r\n/* 123: */ }\r\n/* 124:142 */ i9++;\r\n/* 125: */ \r\n/* 126: */ \r\n/* 127:145 */ this.d[i6] = ((int)(0.5D + i9 * f1) + i5);\r\n/* 128: */ }\r\n/* 129: */ }",
"private native int grayToRgb(byte src[],int dst[]);",
"RGB getNewColor();",
"@Override\r\n\tpublic void mul(int x, int y) {\n\t\t\r\n\t}",
"public void alternateRGB(int min, int number, int r1, int g1, int b1, int r2, int g2, int b2) {\n int max = min + number;\n for (int i = min; i < (max); i = i + 2) {\n m_ledBuffer.setRGB(i, r1, g1, b1);\n }\n\n for (int j = min + 1; j < (max); j = j + 2) {\n m_ledBuffer.setRGB(j, r2, g2, b2);\n }\n m_led.setData(m_ledBuffer);\n }",
"public static int mul(int value1, int value2){\r\n return value1 * value2;\r\n }",
"public int transformPixel(int p0, int p1, int p2, int p3, int p4, int p5, int p6, int p7, int p8) {\n\n// int red = constrain(Color.red(inPixel) + ADJUSTMENT);\n// int green = constrain(Color.green(inPixel) + ADJUSTMENT);\n// int blue = constrain(Color.blue(inPixel) + ADJUSTMENT);\n// int outPixel = Color.argb(Color.alpha(inPixel), red, green, blue);\n int west[] = {1, 1, -1, 1, -2, -1, 1, 1, -1};\n int current[] = {p0, p1, p2, p3, p4, p5, p6, p7, p8};\n int outPixelR = 0, outPixelG = 0, outPixelB = 0;\n\n int[] currentR = new int[west.length];\n int[] currentG = new int[west.length];\n int[] currentB = new int[west.length];\n\n\n //separate RGB\n for (int i = 0; i < west.length; i++) {\n currentR[i] = constrain(Color.red(current[i]));\n currentG[i] = constrain(Color.green(current[i]));\n currentB[i] = constrain(Color.blue(current[i]));\n }\n\n //sum\n for (int i = 0; i < west.length; i++) {\n\n outPixelR += currentR[i] * west[i];\n outPixelG += currentG[i] * west[i];\n outPixelB += currentB[i] * west[i];\n\n }\n\n //divide for average\n outPixelG /= 9;\n outPixelR /= 9;\n outPixelB /= 9;\n\n\n\n\n int outPixel = Color.argb(Color.alpha(p4), outPixelR, outPixelG, outPixelB);\n\n\n return outPixel;\n }",
"static public long buildColor(int r, int g, int b) {\n\t\treturn ((r) | ((g) << 8) | ((b) << 16));\n\t}",
"public static int toRGB(byte red, byte green, byte blue) {\n int result = byteToUnsignedShort(red);\n result = (result << 8) + byteToUnsignedShort(green);\n result = (result << 8) + byteToUnsignedShort(blue);\n return result;\n }",
"public void normalize(float alpha, int x1, int y1, int x2, int y2) {\n if (this.offset != null) {\n for (int i = x2 - x1; y1 < y2; ++y1) {\n int offset = y1 * this.W + x1;\n\n for (int j = 0; j < i; ++j) {\n int color = this.offset[offset];\n this.offset[offset] = (int) ((float) (color >>> 24) * alpha) << 24 | color & 0xFFFFFF;\n ++offset;\n }\n }\n\n }\n }",
"private static Image Transform1ColorToTransparency1ToColor(\n\t\t\tfinal BufferedImage image, final Color c1, final Color c2, \n\t\t\tfinal Color c3, final Color c4, final int otherColor){\n\t\tfinal int r1 = c1.getRed();\n\t\tfinal int g1 = c1.getGreen();\n\t\tfinal int b1 = c1.getBlue();\n\t\tfinal int r2 = c2.getRed();\n\t\tfinal int g2 = c2.getGreen();\n\t\tfinal int b2 = c2.getBlue();\n\t\tfinal int r3 = c3.getRed();\n\t\tfinal int g3 = c3.getGreen();\n\t\tfinal int b3 = c3.getBlue();\n\t\tfinal int r4 = c4.getRed();\n\t\tfinal int g4 = c4.getGreen();\n\t\tfinal int b4 = c4.getBlue();\n\n\t\tImageFilter filter = new RGBImageFilter(){\n\t\t\tpublic final int filterRGB(int x, int y, int rgb)\n\t\t\t{\n\t\t\t\tint r = (rgb & 0xFF0000) >> 16;\n\t\t\t\tint g = (rgb & 0xFF00) >> 8;\n\t\tint b = rgb & 0xFF;\n\t\tif (r >= r1 && r <= r2 &&\n\t\t\t\tg >= g1 && g <= g2 &&\n\t\t\t\tb >= b1 && b <= b2){\n\t\t\t// Set fully transparent but keep color\n\t\t\treturn rgb & 0xFFFFFF;\n\t\t}\n\t\tif (r >= r3 && r <= r4 &&\n\t\t\t\tg >= g3 && g <= g4 &&\n\t\t\t\tb >= b3 && b <= b4){\n\t\t\t// Set fully transparent but keep color\n\t\t\treturn otherColor;\n\t\t}\n\t\treturn rgb;\n\t\t\t}\n\t\t};\n\t\tImageProducer ip = new FilteredImageSource(image.getSource(), filter);\n\t\treturn Toolkit.getDefaultToolkit().createImage(ip);\n\t}",
"protected abstract PixelAsColors applyToPixel(Node n) throws IllegalArgumentException;",
"@Test\r\n public void testSingleColor(){\r\n List<Tone> palette = Arrays.asList(new Tone(Color.red));\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/dimensions/2x4.png\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n PaletteDistribution analysis = new Palettester().analyseAllColors(result);\r\n\r\n assertEquals(1, analysis.byCount().size());\r\n assertEquals(palette.get(0), analysis.byCount().get(0).getTone());\r\n }",
"static public int fromRGB(int red, int green, int blue) {\n red = saturate(red, 0, 255);\n green = saturate(green, 0, 255);\n blue = saturate(blue, 0, 255);\n return (0xff << 24) + ((red & 0xff) << 16) + ((green & 0xff) << 8) + (blue & 0xff);\n }",
"public void setColor(Color a, Color b) \n\t{\n\t\tc1 = a.dup(); c2 = b.dup();\n\t}",
"public static void times (int[] n1, int[] n2, int[] result) {\n\t\tint pos = result.length-1;\n\n\t\t// clear all values....\n\t\tfor (int i = 0; i < result.length; i++) { result[i] = 0; }\n\n\t\tfor (int m = n1.length-1; m>=0; m--) {\n\t\t\tint iPos = pos - (n1.length-1 - m);\n\t\t\tint iPosSubOne = iPos-1;\n\t\t\tif (n1[m] == 0) {\n\t\t\t\tcontinue; // skip zero multiplier! Won't affect total.\n\t\t\t}\n\n\t\t\tfor (int n = n2.length-1; n>=0; n--, iPos--,iPosSubOne--) {\n\t\t\t\tint prod = n1[m]*n2[n];\n\t\t\t\t\n\t\t\t\t// GENERATED-BEGIN\n\t\t\t\tswitch (prod) {\n\t\t\t\tcase 0: break;\n\t\t\t\tcase 1: result[iPos] += 1;break;\n\t\t\t\tcase 2: result[iPos] += 2;break;\n\t\t\t\tcase 3: result[iPos] += 3;break;\n\t\t\t\tcase 4: result[iPos] += 4;break;\n\t\t\t\tcase 5: result[iPos] += 5;break;\n\t\t\t\tcase 6: result[iPos] += 6;break;\n\t\t\t\tcase 7: result[iPos] += 7;break;\n\t\t\t\tcase 8: result[iPos] += 8;break;\n\t\t\t\tcase 9: result[iPos] += 9;break;\n\t\t\t\tcase 10: result[iPosSubOne] += 1;break;\n\t\t\t\tcase 11: result[iPos] += 1;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 12: result[iPos] += 2;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 13: result[iPos] += 3;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 14: result[iPos] += 4;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 15: result[iPos] += 5;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 16: result[iPos] += 6;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 17: result[iPos] += 7;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 18: result[iPos] += 8;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 19: result[iPos] += 9;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 20: result[iPosSubOne] += 2;break;\n\t\t\t\tcase 21: result[iPos] += 1;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 22: result[iPos] += 2;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 23: result[iPos] += 3;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 24: result[iPos] += 4;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 25: result[iPos] += 5;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 26: result[iPos] += 6;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 27: result[iPos] += 7;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 28: result[iPos] += 8;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 29: result[iPos] += 9;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 30: result[iPosSubOne] += 3;break;\n\t\t\t\tcase 31: result[iPos] += 1;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 32: result[iPos] += 2;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 33: result[iPos] += 3;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 34: result[iPos] += 4;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 35: result[iPos] += 5;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 36: result[iPos] += 6;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 37: result[iPos] += 7;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 38: result[iPos] += 8;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 39: result[iPos] += 9;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 40: result[iPosSubOne] += 4;break;\n\t\t\t\tcase 41: result[iPos] += 1;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 42: result[iPos] += 2;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 43: result[iPos] += 3;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 44: result[iPos] += 4;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 45: result[iPos] += 5;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 46: result[iPos] += 6;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 47: result[iPos] += 7;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 48: result[iPos] += 8;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 49: result[iPos] += 9;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 50: result[iPosSubOne] += 5;break;\n\t\t\t\tcase 51: result[iPos] += 1;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 52: result[iPos] += 2;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 53: result[iPos] += 3;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 54: result[iPos] += 4;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 55: result[iPos] += 5;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 56: result[iPos] += 6;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 57: result[iPos] += 7;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 58: result[iPos] += 8;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 59: result[iPos] += 9;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 60: result[iPosSubOne] += 6;break;\n\t\t\t\tcase 61: result[iPos] += 1;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 62: result[iPos] += 2;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 63: result[iPos] += 3;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 64: result[iPos] += 4;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 65: result[iPos] += 5;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 66: result[iPos] += 6;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 67: result[iPos] += 7;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 68: result[iPos] += 8;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 69: result[iPos] += 9;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 70: result[iPosSubOne] += 7;break;\n\t\t\t\tcase 71: result[iPos] += 1;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 72: result[iPos] += 2;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 73: result[iPos] += 3;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 74: result[iPos] += 4;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 75: result[iPos] += 5;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 76: result[iPos] += 6;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 77: result[iPos] += 7;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 78: result[iPos] += 8;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 79: result[iPos] += 9;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 80: result[iPosSubOne] += 8;break;\n\t\t\t\tcase 81: result[iPos] += 1;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 82: result[iPos] += 2;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 83: result[iPos] += 3;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 84: result[iPos] += 4;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 85: result[iPos] += 5;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 86: result[iPos] += 6;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 87: result[iPos] += 7;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 88: result[iPos] += 8;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 89: result[iPos] += 9;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 90: result[iPosSubOne] += 9;break;\n\t\t\t\tcase 91: result[iPos] += 1;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 92: result[iPos] += 2;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 93: result[iPos] += 3;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 94: result[iPos] += 4;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 95: result[iPos] += 5;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 96: result[iPos] += 6;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 97: result[iPos] += 7;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 98: result[iPos] += 8;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 99: result[iPos] += 9;result[iPosSubOne] += 9;break;\n\t\t\t\t};\n\t\t\t\tswitch (result[iPos]) {\n\t\t\t\tcase 0: break; \n\t\t\t\tcase 1: break; \n\t\t\t\tcase 2: break; \n\t\t\t\tcase 3: break; \n\t\t\t\tcase 4: break; \n\t\t\t\tcase 5: break; \n\t\t\t\tcase 6: break; \n\t\t\t\tcase 7: break; \n\t\t\t\tcase 8: break; \n\t\t\t\tcase 9: break; \n\t\t\t\tcase 10: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 11: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 12: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 13: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 14: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 15: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 16: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 17: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 18: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 19: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 20: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 21: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 22: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 23: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 24: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 25: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 26: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 27: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 28: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 29: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 30: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 31: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 32: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 33: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 34: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 35: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 36: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 37: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 38: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 39: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 40: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 41: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 42: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 43: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 44: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 45: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 46: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 47: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 48: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 49: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 50: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 51: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 52: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 53: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 54: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 55: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 56: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 57: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 58: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 59: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 60: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 61: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 62: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 63: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 64: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 65: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 66: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 67: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 68: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 69: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 70: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 71: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 72: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 73: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 74: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 75: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 76: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 77: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 78: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 79: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 80: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 81: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 82: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 83: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 84: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 85: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 86: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 87: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 88: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 89: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 90: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 91: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 92: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 93: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 94: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 95: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 96: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 97: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 98: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 99: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\t};\n\t\t\t\t\n\t\t\t\t// GENERATED-END\n\t\t\t}\n\t\t}\n\t}",
"public static String hex_mult(String hex1, String hex2){\n\t\tint decimal1=0,decimal2=0,i,j=1;\n\t\tString hex_result=\"\";\n\t\tfor(i=(hex1.length()-1);i>=0;i--){ //Converts hexadecimal value 1 into decimal form\n\t\t\tdecimal1+=(j*char_to_int(hex1.charAt(i)));\n\t\t\tj=j*16;\n\t\t}\n\t\tj=1;\n\t\tfor(i=(hex2.length()-1);i>=0;i--){ //Converts hexadecimal value 2 into decimal form\n\t\t\tdecimal2+=(j*char_to_int(hex2.charAt(i)));\n\t\t\tj=j*16;\n\t\t}\n\t\tdecimal1*=decimal2;\n\t\thex_result=integer_to_hex(\"\"+decimal1); //Calls function to convert into hex value\n\t\treturn hex_result;\n\t}",
"public Bitmap3DColor(\n float v1Red, float v1Green, float v1Blue, float v1Alpha,\n float v2Red, float v2Green, float v2Blue, float v2Alpha,\n float v3Red, float v3Green, float v3Blue, float v3Alpha,\n float v4Red, float v4Green, float v4Blue, float v4Alpha\n ) {\n if(\n v1Red < 0 || v1Red > 1 || v2Red < 0 || v2Red > 1 || v3Red < 0 || v3Red > 1 || v4Red < 0 || v4Red > 1 ||\n v1Green < 0 || v1Green > 1 || v2Green < 0 || v2Green > 1 || v3Green < 0 || v3Green > 1 || v4Green < 0 || v4Green > 1 ||\n v1Blue < 0 || v1Blue > 1 || v2Blue < 0 || v2Blue > 1 || v3Blue < 0 || v3Blue > 1 || v4Blue < 0 || v4Blue > 1 ||\n v1Alpha < 0 || v1Alpha > 1 || v2Alpha < 0 || v2Alpha> 1 || v3Alpha < 0 || v3Alpha > 1 || v4Alpha < 0 || v4Alpha > 1\n ) {\n throw new IllegalArgumentException(\"Values should be between 0 and 1\");\n }\n\n float[] colors = {\n v1Red, v1Green, v1Blue, v1Alpha,\n v2Red, v2Green, v2Blue, v2Alpha,\n v3Red, v3Green, v3Blue, v3Alpha,\n v4Red, v4Green, v4Blue, v4Alpha\n };\n\n ByteBuffer clb = ByteBuffer.allocateDirect(colors.length * 4);\n clb.order(ByteOrder.nativeOrder());\n this.colorBuffer = clb.asFloatBuffer();\n this.colorBuffer.put(colors);\n this.colorBuffer.position(0);\n }",
"@Override\n public Float mul(Float lhs, Float rhs) {\n\t\n\tfloat res = lhs*rhs;\n\treturn res;\n }",
"int getRed(int x, int y);",
"public Color4 getEffectColorAdd();",
"@Override\r\n\tpublic int mul(int a,int b) {\n\t\treturn a*b;\r\n\t}",
"public static int getColor(int r, int g, int b) {\r\n return 0xff000000 | (r << 16) | (g << 8) | b;\r\n }",
"public static double similarity(ColorHsv c1,ColorHsv c2){\n LOG.info(\"Ch1,\"+c1.toString()+\",Ch2:\"+c2.toString());\n //\n double avgHue = (c1.H + c2.H)/2;\n double distance = Math.abs(c1.H-avgHue);\n double differ = distance/avgHue;\n LOG.info(\"differ:\"+differ+\"distance:\"+distance+\",avgHue:\"+avgHue);\n return 1.00-differ;\n }",
"public BufferedImage arithmetic(BufferedImage image, BufferedImage image1, int type) {\r\n int width = image.getWidth(), height = image.getHeight();\r\n int width1 = image1.getWidth(), height1 = image1.getHeight();\r\n\r\n int[][][] original = convertToArray(image);\r\n int[][][] arr = convertToArray(image);\r\n\r\n int x = (width < width1) ? width : width1; //get area to add\r\n int y = (height < height1) ? height : height1;\r\n\r\n BufferedImage result = new BufferedImage(width, height, 1);\r\n //loop through all pixels.\r\n int min = 255;\r\n int max = 0;\r\n for (int i = 0; i < y; i++) {\r\n for (int j = 0; j < x; j++) {\r\n int p = image.getRGB(j, i);\r\n int a = (p >> 24) & 0xff;\r\n int r = (p >> 16) & 0xff;\r\n int g = (p >> 8) & 0xff;\r\n int b = p & 0xff;\r\n int p1 = image1.getRGB(j, i);\r\n int a1 = (p1 >> 24) & 0xff;\r\n int r1 = (p1 >> 16) & 0xff;\r\n int g1 = (p1 >> 8) & 0xff;\r\n int b1 = p1 & 0xff;\r\n\r\n int r2;\r\n int g2;\r\n int b2;\r\n\r\n if (type == 0) { //add\r\n r2 = r + r1;\r\n g2 = g + g1;\r\n b2 = b + b1;\r\n } else if (type == 1) {\r\n r2 = r - r1;\r\n g2 = g - g1;\r\n b2 = b - b1;\r\n } else if (type == 2) {\r\n r2 = r * r1;\r\n g2 = g * g1;\r\n b2 = b * b1;\r\n } else {\r\n r2 = (r1 != 0) ? r / r1 : 510;\r\n g2 = (g1 != 0) ? g / g1 : 510;\r\n b2 = (b1 != 0) ? b / b1 : 510;\r\n }\r\n\r\n if (r2 < min) {\r\n min = r2;\r\n }\r\n if (r2 > max) {\r\n max = r2;\r\n }\r\n if (g2 < min) {\r\n min = g2;\r\n }\r\n if (g2 > max) {\r\n max = g2;\r\n }\r\n if (b2 < min) {\r\n min = b2;\r\n }\r\n if (b2 > max) {\r\n max = b2;\r\n }\r\n\r\n arr[j][i][0] = a;\r\n arr[j][i][1] = r2;\r\n arr[j][i][2] = g2;\r\n arr[j][i][3] = b2;\r\n }\r\n }\r\n int diff = max - min;\r\n float scale = (255 / (float) diff);\r\n arr = shiftImage(arr, -min);\r\n if (diff == 0) {\r\n diff = 1;\r\n }\r\n System.out.println(255 / diff);\r\n arr = rescaleImage(arr, scale); // multiple by 255 and divide by difference\r\n\r\n return convertToBimage(arr); //return array\r\n }",
"public static float dotProductScore(byte[] a, byte[] b) {\n // divide by 2 * 2^14 (maximum absolute value of product of 2 signed bytes) * len\n float denom = (float) (a.length * (1 << 15));\n return 0.5f + dotProduct(a, b) / denom;\n }",
"protected static int getRGBChannelsDifferenceSum(int rgbA, int rgbB) {\n int differenceSum = 0;\n for (short offset = 0; offset <= 16; offset += 8) {\n differenceSum += Math.abs(((rgbA >> offset) & 0xFF) - ((rgbB >> offset) & 0xFF));\n }\n return differenceSum;\n }",
"public void setIntensities(float r0, float g0, float b0, float a0,\n float r1, float g1, float b1, float a1,\n float r2, float g2, float b2, float a2) {\n // Check if we need alpha or not?\n if ((a0 != 1.0f) || (a1 != 1.0f) || (a2 != 1.0f)) {\n INTERPOLATE_ALPHA = true;\n a_array[0] = (a0 * 253f + 1.0f) * 65536f;\n a_array[1] = (a1 * 253f + 1.0f) * 65536f;\n a_array[2] = (a2 * 253f + 1.0f) * 65536f;\n m_drawFlags|=R_ALPHA;\n } else {\n INTERPOLATE_ALPHA = false;\n m_drawFlags&=~R_ALPHA;\n }\n \n // Check if we need to interpolate the intensity values\n if ((r0 != r1) || (r1 != r2)) {\n INTERPOLATE_RGB = true;\n m_drawFlags |= R_GOURAUD;\n } else if ((g0 != g1) || (g1 != g2)) {\n INTERPOLATE_RGB = true;\n m_drawFlags |= R_GOURAUD;\n } else if ((b0 != b1) || (b1 != b2)) {\n INTERPOLATE_RGB = true;\n m_drawFlags |= R_GOURAUD;\n } else {\n //m_fill = parent.filli;\n m_drawFlags &=~ R_GOURAUD;\n }\n \n // push values to arrays.. some extra scaling is added\n // to prevent possible color \"overflood\" due to rounding errors\n r_array[0] = (r0 * 253f + 1.0f) * 65536f;\n r_array[1] = (r1 * 253f + 1.0f) * 65536f;\n r_array[2] = (r2 * 253f + 1.0f) * 65536f;\n \n g_array[0] = (g0 * 253f + 1.0f) * 65536f;\n g_array[1] = (g1 * 253f + 1.0f) * 65536f;\n g_array[2] = (g2 * 253f + 1.0f) * 65536f;\n \n b_array[0] = (b0 * 253f + 1.0f) * 65536f;\n b_array[1] = (b1 * 253f + 1.0f) * 65536f;\n b_array[2] = (b2 * 253f + 1.0f) * 65536f;\n \n // for plain triangles\n m_fill = 0xFF000000 | \n ((int)(255*r0) << 16) | ((int)(255*g0) << 8) | (int)(255*b0);\n }",
"public void recolor(int src, int dst) {\n\t\tfor (int k = 0; k < faceCount; k++) {\n\t\t\tif (faceColor[k] == src) {\n\t\t\t\tfaceColor[k] = dst;\n\t\t\t}\n\t\t}\n\t}",
"public static void multiply(int[] n1, int[] n2, int[] result) {\n\t\tint pos = result.length-1;\n\t\t// clear all values....\n\t\tfor (int i = 0; i < result.length; i++) {result[i] = 0; }\n\t\t\n\t\tint off;\n\t\tfor (int m = n1.length-1; m>=0; m--) {\n\t\t\toff = n1.length-1 - m;\n\t\t\tif (n1[m] == 0) {\n\t\t\t\tcontinue; // skip zero multiplier! Won't affect total.\n\t\t\t}\n\t\t\tfor (int n = n2.length-1; n>=0; n--) {\n\t\t\t\tint prod = n1[m]*n2[n];\n\t\t\t\t\n\t\t\t\tresult[pos-off] += prod % 10;\n\t\t\t\tif (result[pos-off] > 9) { // carry internally\n\t\t\t\t\tdo {\n\t\t\t\t\t\tresult[pos-off] -= 10;\n\t\t\t\t\t\tresult[pos-off-1]++;\n\t\t\t\t\t} while (result[pos-off] > 9);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (prod > 9) {\n\t\t\t\t\tresult[pos-off-1] += prod / 10; // deal with carry sum later\n\t\t\t\t}\n\t\t\t\toff++;\n\t\t\t}\n\t\t}\n\t}",
"public static int packagePixel (int r, int g, int b, int a)\n {\n int newRGB = (a << 24) | (r << 16) | (g << 8) | b;\n return newRGB;\n }",
"private static int hardLightBlendByte(int A, int B) {\n return overlayBlendByte(B, A);\n }",
"private Color calcDiffusiveComp(double kd, Vector normal, Vector l, Color lightIntensity){\n double kdNdotL = kd * Math.abs(normal.dotProduct(l));\n\n int red = Math.min(255,(int)(kdNdotL * lightIntensity.getRed()));\n\n int green = Math.min(255,(int)(kdNdotL* lightIntensity.getGreen()));\n\n int blue = Math.min(255,(int)(kdNdotL * lightIntensity.getBlue()));\n\n return new Color(red, green, blue);\n }",
"private void equalizeColors(Bitmap bmp, int[] cumulatedH) {\n int w = bmp.getWidth();\n int h = bmp.getHeight();\n int n = w * h;\n\n int pixels[] = new int[n];\n bmp.getPixels(pixels, 0, w, 0, 0, w, h);\n for (int i = 0; i < w*h; i++) {\n int r = (cumulatedH[Color.red(pixels[i])] * 255 / n);\n int g = (cumulatedH[Color.green(pixels[i])] * 255 / n);\n int b = (cumulatedH[Color.blue(pixels[i])] * 255 / n);\n pixels[i] = Color.rgb(r, g, b);\n }\n bmp.setPixels(pixels, 0, w, 0, 0, w, h);\n }",
"void fill(int rgb);",
"private int reduceColorSize(int oldColor, int colorRange) {\n return (int) Math.floor((oldColor / colorRange)) * colorRange;\n }",
"int multiply (int a, int b) {\n\t\t//let me do it in one step\n\t\treturn a * b; \n\t\t\n\t\t\n\t}",
"public static BufferedImage getDifferenceImage(BufferedImage img1, BufferedImage img2) {\n int width1 = img1.getWidth(); // Change - getWidth() and getHeight() for BufferedImage\n int width2 = img2.getWidth(); // take no arguments\n int height1 = img1.getHeight();\n int height2 = img2.getHeight();\n if ((width1 != width2) || (height1 != height2)) {\n System.err.println(\"Error: Images dimensions mismatch\");\n System.exit(1);\n }\n\n // NEW - Create output Buffered image of type RGB\n BufferedImage outImg = new BufferedImage(width1, height1, BufferedImage.TYPE_INT_RGB);\n\n // Modified - Changed to int as pixels are ints\n int diff;\n int result; // Stores output pixel\n for (int i = 0; i < height1; i++) {\n for (int j = 0; j < width1; j++) {\n int rgb1 = img1.getRGB(j, i);\n int rgb2 = img2.getRGB(j, i);\n int r1 = (rgb1 >> 16) & 0xff;\n int g1 = (rgb1 >> 8) & 0xff;\n int b1 = (rgb1) & 0xff;\n int r2 = (rgb2 >> 16) & 0xff;\n int g2 = (rgb2 >> 8) & 0xff;\n int b2 = (rgb2) & 0xff;\n diff = Math.abs(r1 - r2); // Change\n diff += Math.abs(g1 - g2);\n diff += Math.abs(b1 - b2);\n diff /= 3; // Change - Ensure result is between 0 - 255\n // Make the difference image gray scale\n // The RGB components are all the same\n result = (diff << 16) | (diff << 8) | diff;\n outImg.setRGB(j, i, result); // Set result\n }\n }\n\n // Now return\n return outImg;\n}",
"public @NotNull Image dither(int rBpp, int gBpp, int bBpp, int aBpp)\n {\n if (this.data != null)\n {\n Color.Buffer pixels = Objects.requireNonNull(getColorData());\n \n this.data.free(); // free old image data\n \n this.format = ColorFormat.RGBA;\n this.data = Color.malloc(this.format, this.width * this.height);\n this.mipmaps = 1;\n \n Color color;\n \n int r, g, b, a;\n int rErr, gErr, bErr, aErr;\n int rNew, gNew, bNew, aNew;\n \n int rs = (1 << rBpp) - 1;\n int gs = (1 << gBpp) - 1;\n int bs = (1 << bBpp) - 1;\n int as = (1 << aBpp) - 1;\n \n for (int y = 0; y < this.height; y++)\n {\n for (int x = 0; x < this.width; x++)\n {\n color = pixels.get(y * this.width + x);\n \n r = color.r();\n g = color.g();\n b = color.b();\n a = color.a();\n \n // NOTE: New pixel obtained by bits truncate, it would be better to round values (check ImageFormat())\n rNew = rs > 0 ? ((((r + (127 / rs)) * rs) / 255) * 255) / rs : 0;\n gNew = gs > 0 ? ((((g + (127 / gs)) * gs) / 255) * 255) / gs : 0;\n bNew = bs > 0 ? ((((b + (127 / bs)) * bs) / 255) * 255) / bs : 0;\n aNew = as > 0 ? ((((a + (127 / as)) * as) / 255) * 255) / as : 255;\n \n // NOTE: Error must be computed between new and old pixel but using same number of bits!\n // We want to know how much color precision we have lost...\n rErr = r - rNew;\n gErr = g - gNew;\n bErr = b - bNew;\n aErr = a - aNew;\n \n this.data.put(y * this.width + x, rNew, gNew, bNew, aNew);\n \n // NOTE: Some cases are out of the array and should be ignored\n if (x < this.width - 1)\n {\n color = pixels.get(y * this.width + x + 1);\n color.set(color.r() + (int) (rErr * 7F / 16F),\n color.g() + (int) (gErr * 7F / 16F),\n color.b() + (int) (bErr * 7F / 16F),\n color.a() + (int) (aErr * 7F / 16F));\n }\n \n if (x > 0 && y < this.height - 1)\n {\n color = pixels.get((y + 1) * this.width + x - 1);\n color.set(color.r() + (int) (rErr * 3F / 16F),\n color.g() + (int) (gErr * 3F / 16F),\n color.b() + (int) (bErr * 3F / 16F),\n color.a() + (int) (aErr * 3F / 16F));\n }\n \n if (y < this.height - 1)\n {\n color = pixels.get((y + 1) * this.width + x);\n color.set(color.r() + (int) (rErr * 5F / 16F),\n color.g() + (int) (gErr * 5F / 16F),\n color.b() + (int) (bErr * 5F / 16F),\n color.a() + (int) (aErr * 5F / 16F));\n }\n \n if (x < this.width - 1 && y < this.height - 1)\n {\n color = pixels.get((y + 1) * this.width + x + 1);\n color.set(color.r() + (int) (rErr * 1F / 16F),\n color.g() + (int) (gErr * 1F / 16F),\n color.b() + (int) (bErr * 1F / 16F),\n color.a() + (int) (aErr * 1F / 16F));\n }\n }\n }\n }\n return this;\n }",
"private void equalize(BufferedImage img) {\n \t\tfloat minSat = Float.MAX_VALUE, maxSat = Float.MIN_VALUE;\n \t\tfloat minVal = Float.MAX_VALUE, maxVal = Float.MIN_VALUE;\n \t\t\n \t\tint[] prgb = { 0, 0, 0 };\n \t\tfloat[] hsv = { 0, 0, 0 };\n \t\t\n \t\tint[] valCount = new int[16];\n \t\t\n \t\tfor (int y = 0; y < img.getHeight(); y++) {\n \t\t\tfor (int x = 0; x < img.getWidth(); x++) {\n \t\t\t\tint pixel = img.getRGB(x, y);\n \t\t\t\tpixelToRGB(pixel, prgb);\n \t\t\t\trgbToHsv(prgb[0], prgb[1], prgb[2], hsv);\n \t\t\t\tminSat = Math.min(hsv[1], minSat);\n \t\t\t\tmaxSat = Math.max(hsv[1], maxSat);\n \t\t\t\tminVal = Math.min(hsv[2], minVal);\n \t\t\t\tmaxVal = Math.max(hsv[2], maxVal);\n \t\t\t\tvalCount[(int) (hsv[2] / 16)]++;\n \t\t\t}\n \t\t}\n \t\t\n \t\tint maxPt = -1;\n \t\tfor (int i = 1; i < 15; i++) {\n \t\t\tif (maxPt == -1 || valCount[i] >= valCount[maxPt]) {\n \t\t\t\tmaxPt = i;\n \t\t\t}\n \t\t}\n \t\t\n \t\tint valueMidpoint = maxPt * 16;\n \t\t\n \t\tSystem.out.println(\"Equalize: sat = \"+minSat+\" to \" +maxSat+\"; val = \" + minVal + \" to \" + maxVal+\"; value midpoint = \" + valueMidpoint);\n \t\tfloat satScale = 1.0f - minSat;\n \t\tfloat valScale = 255 - minVal;\n \t\tfloat satDiff = maxSat - minSat;\n \t\tfloat valDiff = maxVal - minVal;\n \t\t\n \t\tfor (int y = 0; y < img.getHeight(); y++) {\n \t\t\tfor (int x = 0; x < img.getWidth(); x++) {\n \t\t\t\tint pixel = img.getRGB(x, y);\n \t\t\t\tpixelToRGB(pixel, prgb);\n \t\t\t\trgbToHsv(prgb[0], prgb[1], prgb[2], hsv);\n \t\t\t\t\n \t\t\t\tif (satDiff < 0.5)\n \t\t\t\t\thsv[1] = ((hsv[1] - minSat) / satDiff) * satScale + minSat;\n \t\t\t\tif (valDiff < 128)\n \t\t\t\t\thsv[2] = ((hsv[2] - minVal) / valDiff) * valScale + minVal;\n \n \t\t\t\thsvToRgb(hsv[0], hsv[1], hsv[2], prgb);\n \t\t\t\t\n \t\t\t\timg.setRGB(x, y, rgb8ToPixel(prgb) | (pixel & 0xff000000));\n \t\t\t}\n \t\t}\n \t}",
"@Test\r\n public void testTrivialReplacement(){\r\n List<Tone> palette = Arrays.asList(new Tone(new Color(200,10,10)),\r\n new Tone(new Color(10,200,10)),\r\n new Tone(new Color(10,10,200)));\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/geometric/redBlueQuarter.png\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n PaletteDistribution analysis = new Palettester().analyseAllColors(result);\r\n\r\n assertEquals(2, analysis.byCount().size());\r\n assertEquals(palette.get(0), analysis.byCount().get(0).getTone());\r\n assertEquals(palette.get(2), analysis.byCount().get(1).getTone());\r\n }",
"private static int getGrayTranslucentRGB(int rgb) {\n\t\tint r = (0xff & rgb);\n\t\tint g = (0xff & (rgb >> 8));\n\t\tint b = (0xff & (rgb >> 16));\n\t\trgb = r + (g << 8) + (b << 16) + (100 << 24);\n\t\t// rgb = r + (g << 8) + (b << 16); // 亮一些\n\t\treturn rgb;\n\t}",
"private int b(String paramString, float paramFloat1, float paramFloat2, int paramInt, boolean paramBoolean)\r\n/* 426: */ {\r\n/* 427:421 */ if (paramString == null) {\r\n/* 428:422 */ return 0;\r\n/* 429: */ }\r\n/* 430:424 */ if (this.l) {\r\n/* 431:425 */ paramString = c(paramString);\r\n/* 432: */ }\r\n/* 433:428 */ if ((paramInt & 0xFC000000) == 0) {\r\n/* 434:429 */ paramInt |= 0xFF000000;\r\n/* 435: */ }\r\n/* 436:432 */ if (paramBoolean) {\r\n/* 437:433 */ paramInt = (paramInt & 0xFCFCFC) >> 2 | paramInt & 0xFF000000;\r\n/* 438: */ }\r\n/* 439:436 */ this.m = ((paramInt >> 16 & 0xFF) / 255.0F);\r\n/* 440:437 */ this.n = ((paramInt >> 8 & 0xFF) / 255.0F);\r\n/* 441:438 */ this.o = ((paramInt & 0xFF) / 255.0F);\r\n/* 442:439 */ this.p = ((paramInt >> 24 & 0xFF) / 255.0F);\r\n/* 443: */ \r\n/* 444:441 */ cjm.c(this.m, this.n, this.o, this.p);\r\n/* 445: */ \r\n/* 446:443 */ this.i = paramFloat1;\r\n/* 447:444 */ this.j = paramFloat2;\r\n/* 448:445 */ a(paramString, paramBoolean);\r\n/* 449: */ \r\n/* 450:447 */ return (int)this.i;\r\n/* 451: */ }",
"public static int[] blend(int[] pixel1, int[] pixel2, double alpha) {\n\n\t\tint[] blend = new int[3]; // Creating a new array to blend each pixel\n\n\t\tblend[0] = (int) ((alpha * pixel1[0]) + ((1 - alpha) * pixel2[0]));\n\t\tblend[1] = (int) ((alpha * pixel1[1]) + ((1 - alpha) * pixel2[1]));\n\t\tblend[2] = (int) ((alpha * pixel1[2]) + ((1 - alpha) * pixel2[2]));\n\n\t\treturn blend; // return the new grey pixel\n\n\t}",
"public ColorPlus binary() {\n\t\tint r = this.getRed();\n\t\tint g = this.getGreen();\n\t\tint b = this.getBlue();\n\t\t\n\t\tint cSum = r + g + b;\n\t\tif (cSum >= 382) {\n\t\t\tr = 0;\n\t\t\tg = 0;\n\t\t\tb = 0;\n\t\t}else{\n\t\t\tr = 255;\n\t\t\tg = 255;\n\t\t\tb = 255;\n\t\t}\n\t\treturn new ColorPlus(r,g,b); \n\t}",
"private void showCalc_2(int a, int b){\r\n\t\tsc_calc = lang.newSourceCode(new Offset(10,25,array1,\"NE\"), \"\", null, calc_props);\r\n\t\tsc_calc.addCodeLine(\"255 - ((\"+a+\" + \"+b+\") % 255) = 255 - (\"+(a+b)+\" % 255)\", null, 0, null);\r\n\t\tlang.nextStep();\r\n\t\t\r\n\t\tsc_calc.hide();\r\n\t\tsc_calc = lang.newSourceCode(new Offset(10,25,array1,\"NE\"), \"\", null, calc_props);\r\n\t\tsc_calc.addCodeLine(\"\"+(255 - ( (a+b)% 255) ), null, 0, null);\r\n\t\tsc_calc.highlight(0);\r\n\t\tlang.nextStep();\r\n\t}",
"public int colorMultiplier(IBlockAccess blocks, int x, int y, int z)\n {\n \n \n \tif(blocks.getBlock(x, y, z) instanceof BlockColoredStoneSlab){\n \t\t\n \t\tBlock[] coloredStones = MachineryCraft.blocks.coloredStoneSlab;\n \t\t\n \t\tfor(int i = 0; i<MachineryCraft.blocks.coloredStoneSlab.length; i++){\n \t\t\t\n \t\t\tif(blocks.getBlock(x, y, z).equals(coloredStones[i])){\n \t\t\t\t\n \t\t\t\treturn this.colors[i];\n \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t}\n \t\t\n \t}\n \t\n \t\n \t\n\t\treturn 16777215;\n }",
"private int getCurrentMainColor () {\n int translatedHue = 255 - ( int ) ( mCurrentHue * 255 / 360 );\n int index = 0;\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 255, 0, ( int ) i );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 255 - ( int ) i, 0, 255 );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 0, ( int ) i, 255 );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 0, 255, 255 - ( int ) i );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( ( int ) i, 255, 0 );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 255, 255 - ( int ) i, 0 );\n index++;\n }\n return Color.RED;\n }",
"@LargeTest\n public void testIntrinsicsBlend() {\n TestAction ta = new TestAction(TestName.INTRINSICS_BLEND);\n runTest(ta, TestName.INTRINSICS_BLEND.name());\n }",
"public static int[][] convertToGray(int w, int h, int[][] red, int[][] green,\r\n int[][] blue) {\r\n int [][]gray = new int [w][h];\r\n for( w = 0; w<gray.length;w++) {\r\n for (h = 0; h < gray[0].length; h++) {\r\n\r\n\r\n gray[w][h] =(int) ((0.2126 * red[w][h]) +( 0.7152 * green[w][h]) + (0.0722 * blue[w][h]) );\r\n //two for nested loops\r\n }\r\n }\r\n\r\n return gray;\r\n }",
"public static Color multiplyColor(Color a, double factor) {\n\t\treturn new Color(\n\t\t\t\ta.getRed() * factor,\n\t\t\t\ta.getGreen() * factor,\n\t\t\t\ta.getBlue() * factor,\n\t\t\t\ta.getOpacity() * factor\n\t\t\t);\n\t}",
"static float[] mulMM(float[] m1, float[] m2){\n \t\n \t\tif(m1.length != 16 || m2.length != 16){\n \t\t\tthrow new IllegalArgumentException();\n \t\t}\n \t\n float[] result = new float[16];\n for(int i = 0; i < 4; i++){ \n for(int j = 0; j < 4; j++){ \n float rij = 0;\n for(int k = 0; k < 4; k++){\n rij += m1[j*4+k] * m2[i+4*k];\n }\n// result[i*4+j] = rij;\n result[i+j*4] = rij;\n }\n }\n return result;\n }",
"int getBlue(int x, int y);",
"public static void main(String[] args) {\n\t\tint A = 255;\n\t\tint R = 10;\n\t\tint G = 200;\n\t\tint B = 31;\n\t\t\n\t\tint ARGB = A<<24|R<<16|G<<8|B;\n\t\t\n\t\tint a,r,g,b;\n\t\ta = (ARGB & 0xff000000)>>>24;\n\t\tr = (ARGB & 0x00ff0000)>>16;\n\t\tg = (ARGB & 0x0000ff00)>>8;\n\t\tb = (ARGB & 0x000000ff);\n\t\t\n\t\tSystem.out.println(\"a=\" +a);\n\t\tSystem.out.println(\"r=\" +r);\n\t\tSystem.out.println(\"b=\" +b);\n\t\tSystem.out.println(\"g=\" +g);\n\t\t\n\t}",
"private Color NewColor(int numb) {\r\n\r\n\t\tswitch(numb){\r\n\t\tcase 0: return Color.BLACK;\r\n\t\tcase 1: return Color.RED;\r\n\t\tcase 3: return Color.BLUE;\r\n\t\t}\r\n\t\treturn Color.MAGENTA;\r\n\t}",
"public Color(int r, int g, int b)\n {\n this( ((float)r)/255f,((float)g) /255f,((float)b)/255f );\n }",
"int getMaximalReplaceDistance(int usedColors);"
] |
[
"0.7032716",
"0.6754499",
"0.63465613",
"0.6211575",
"0.6179101",
"0.6082806",
"0.60792506",
"0.60284114",
"0.59882027",
"0.5872322",
"0.5858049",
"0.58530027",
"0.5843057",
"0.5732864",
"0.5721188",
"0.5705787",
"0.57021844",
"0.56729794",
"0.5664708",
"0.5657963",
"0.563485",
"0.562419",
"0.5603997",
"0.56007767",
"0.5577696",
"0.55575716",
"0.55503845",
"0.5546637",
"0.5546637",
"0.55460453",
"0.5518249",
"0.5515607",
"0.5495874",
"0.54786247",
"0.5475432",
"0.54505247",
"0.5408714",
"0.5392478",
"0.5389175",
"0.53672475",
"0.5360781",
"0.5351573",
"0.53351456",
"0.5332043",
"0.52932745",
"0.52708375",
"0.5266306",
"0.5252938",
"0.5246042",
"0.52448756",
"0.5232226",
"0.5229092",
"0.52031314",
"0.5199047",
"0.51910084",
"0.51871",
"0.5182232",
"0.5180777",
"0.517978",
"0.5176515",
"0.5173008",
"0.51654136",
"0.5158812",
"0.5156174",
"0.5152397",
"0.51512444",
"0.5136372",
"0.51325977",
"0.5123853",
"0.511733",
"0.51144785",
"0.51140827",
"0.5107117",
"0.5101843",
"0.5101768",
"0.50989795",
"0.5090209",
"0.5086614",
"0.50854003",
"0.5078155",
"0.5071869",
"0.5064072",
"0.50616837",
"0.5060326",
"0.5059523",
"0.50543994",
"0.50515825",
"0.50499064",
"0.50456065",
"0.50437856",
"0.5039824",
"0.5034055",
"0.50296015",
"0.50287867",
"0.5027343",
"0.5024347",
"0.5024064",
"0.50220895",
"0.5004619",
"0.50045276"
] |
0.7092947
|
0
|
Check if a render is necessary, and if so, do one.
|
private void tryARender() {
if (Minecraft.theMinecraft.thePlayer == null)
return;
try {
if (MinimapConfig.getInstance().isEnabled() && map.isDirty(Minecraft.theMinecraft.thePlayer.posX, Minecraft.theMinecraft.thePlayer.posZ)) {
mapCalc();
map.timer = 1;
}
} catch (RuntimeException e) {
throw e;
} finally {
map.timer++;
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public abstract boolean isRenderRedirectAfterDispatch();",
"public boolean isReadyToRender() {\n return mHasSwapChain;\n }",
"public abstract boolean isRenderRedirect();",
"public boolean isRender()\r\n/* 284: */ {\r\n/* 285:307 */ if (this.tipoReporte.ordinal() == 1) {\r\n/* 286:308 */ this.render = true;\r\n/* 287: */ } else {\r\n/* 288:310 */ this.render = false;\r\n/* 289: */ }\r\n/* 290:311 */ return this.render;\r\n/* 291: */ }",
"public abstract boolean isRendered();",
"void setupRender() {\n\t\tif (!init()) {\n\t\t\tisAccess = false;\n\t\t\treturn;\n\t\t}\n\t}",
"@Override\n\tpublic final boolean canRenderInPass( int pass )\n\t{\n\t\tRenderers.currentRenderPass = pass;\n\n\t\t// We render during both passes\n\t\treturn true;\n\t}",
"public boolean hasRenderers()\r\n {\r\n return !_renderers.isEmpty();\r\n }",
"@Override\n public boolean isToBeRendered()\n {\n return true;\n }",
"private void doBeforeRenderResponse(final PhaseEvent arg0) {\n\t}",
"public void render() {\n\t\t// do nothing... as we should\n\t}",
"@Override\n\tpublic void forceRender() {\n\n\t}",
"private boolean needsRepaintAfterBlit(){\n Component heavyParent=getParent();\n while(heavyParent!=null&&heavyParent.isLightweight()){\n heavyParent=heavyParent.getParent();\n }\n if(heavyParent!=null){\n ComponentPeer peer=heavyParent.getPeer();\n if(peer!=null&&peer.canDetermineObscurity()&&\n !peer.isObscured()){\n // The peer says we aren't obscured, therefore we can assume\n // that we won't later be messaged to paint a portion that\n // we tried to blit that wasn't valid.\n // It is certainly possible that when we blited we were\n // obscured, and by the time this is invoked we aren't, but the\n // chances of that happening are pretty slim.\n return false;\n }\n }\n return true;\n }",
"@Override\n public void setToBeRendered(boolean arg0)\n {\n \n }",
"@Override\r\n public boolean isRendered() {\r\n FacesContext context = FacesContext.getCurrentInstance();\r\n if (!context.getCurrentPhaseId().equals(PhaseId.RENDER_RESPONSE)) {\r\n Integer index = getView().getActiveRowIndex();\r\n return super.isRendered() && index != null && index > -1;\r\n }\r\n return super.isRendered();\r\n }",
"public static boolean isRenderQueueThread() {\n/* 111 */ return (Thread.currentThread() == rqThread);\n/* */ }",
"@SideOnly(Side.CLIENT)\n boolean needsRenderUpdate(World world, BlockPos pos, IBlockState state, T tile);",
"public static void requestRenderFromNUI() {\r\n\t\tif (m_Handler != null) {\t\t\t\r\n\t\t\ts_lRequestTicks = System.currentTimeMillis();\r\n\t\t\tm_SkiaView.postInvalidate();\r\n\t\t}\r\n\t}",
"public void requestrender() {\n\t\trender(g2d);\r\n\t\tGraphics g = getGraphics();\r\n\t\tg.drawImage(image , 0 , 0, null);\r\n\t\tg.dispose();\r\n\t\t\r\n\t}",
"@Override\n public void simpleRender(RenderManager rm) {\n }",
"@Override\n public void simpleRender(RenderManager rm) {\n }",
"@Override\n public void simpleRender(RenderManager rm) {\n }",
"@Override\n public void simpleRender(RenderManager rm) {\n }",
"@Override\n public void simpleRender(RenderManager rm) {\n }",
"@Override\n public void simpleRender(RenderManager rm) {\n }",
"public void startRendering() {\n if (!justRendered) {\n justRendered = true;\n \n if (Flags.wireFrame) p.render_wireFrame();\n else p.render();\n }\n }",
"public boolean isRendered() {\r\n\t\treturn rendered;\r\n\t}",
"public final boolean isRendered() {\n return rendered;\n }",
"protected int shouldRenderPass(EntityLivingBase par1EntityLivingBase, int par2, float par3)\n {\n return this.func_82447_a((EntitySpiritWolf)par1EntityLivingBase, par2, par3);\n }",
"@Override\n public boolean isSetupToBeDrawn() {\n return !(designParameters == null || slabStrip == null || graphicsContext == null || colour == null || slabImageScale == 0);\n }",
"@Override\n public RenderResult renderAndResolve(LoggingAdvisingAppendable appendable, boolean isLast)\n throws IOException {\n RenderResult result = status();\n if (result.type() == Type.DONE) {\n resolve().render(appendable);\n }\n return result;\n }",
"private void doAfterRenderResponse(final PhaseEvent arg0) {\n\t}",
"@Override\r\n\tpublic void simpleRender(RenderManager rm) {\n\t}",
"@Override\n public void render() {\n if (renderInterrupted) {\n log.debug(\"render()\");\n renderInterrupted = false;\n }\n\n }",
"void updateRenderEngine() {\n if (renderEngine == null)\n renderEngine = this.game.p;\n }",
"public void prerender() {\n }",
"public void prerender() {\n }",
"public Void call() throws Exception {\n if (mStopping)\n return null;\n Process.setThreadPriority(getThreadPriority(mPass));\n try {\n Render render = render(mParam, mPass);\n if (render == null) {\n mFailed = true;\n } else {\n // record the render, we will apply to the view it cache it\n // later\n mRender = render;\n // increment the pass now - since later calls aren't\n // guaranteed to occur\n mPass++;\n }\n mHandler.post(this);\n return null;\n } finally {\n Process.setThreadPriority(mInheritedThreadPriority);\n }\n }",
"void dynamicRendering();",
"protected void render(){}",
"public boolean render(InternalContextAdapter context,\n Writer writer, Node node)\n throws MethodInvocationException\n {\n\t Object modeName = getRequiredValue(node, 0, \"buffer mode\", context);\n if (modeName == null) {\n return false;\n }\n\t \n if (! (writer instanceof BufferWriter)) {\n rsvc.error(\"#buffermode() error : writer is not a buffer writer\");\n return false;\n }\n BufferWriter bufferWriter = (BufferWriter) writer;\n\t if (!bufferWriter.setMode((String)modeName)) {\n rsvc.error(\"#buffermode() error : Mode change was unsuccessful\");\n\t\t return false;\n\t }\n\t return true;\n\n }",
"private void render() {\n\t\tBufferStrategy buffStrat = display.getCanvas().getBufferStrategy();\n\t\tif(buffStrat == null) {\n\t\t\tdisplay.getCanvas().createBufferStrategy(3); //We will have 3 buffered screens for the game\n\t\t\treturn;\n\t\t}\n\n\t\t//A bufferstrategy prevents flickering since it preloads elements onto the display.\n\t\t//A graphics object is a paintbrush style object\n\t\tGraphics g = buffStrat.getDrawGraphics();\n\t\t//Clear the screen\n\t\tg.clearRect(0, 0, width, height); //Clear for further rendering\n\t\t\n\t\tif(State.getState() !=null) {\n\t\t\tState.getState().render(g);\n\t\t}\n\t\t//Drawings to be done in this space\n\t\t\n\t\t\n\t\t\n\t\tbuffStrat.show();\n\t\tg.dispose();\n\t}",
"protected void preRender()\n {\n // subclass\n }",
"boolean canRender(IModel model, Entity entity);",
"@Override\n\tpublic void render() {\n\t\t// only render it when visible is true\n\t\tif (visible == false) {\n\t\t\treturn;\n\t\t} else {\n\t\t\tsuper.render();\n\t\t}\n\t}",
"public void setRender(boolean render)\r\n/* 294: */ {\r\n/* 295:315 */ this.render = render;\r\n/* 296: */ }",
"public abstract void setRenderRedirectAfterDispatch(boolean renderRedirectAfterDispatch);",
"public static boolean isRendered(Element sourceElement) {\r\n return !Constants.FALSE.equalsIgnoreCase(sourceElement.getAttribute(\"rendered\")); //$NON-NLS-1$\r\n }",
"public void run() {\n if (mStopping)\n return;\n if (mFailed) {\n // render didn't complete (probably got cancelled)\n // remove from the view (but we may still get cached)\n removeFromViews();\n }\n // the views may be null/empty if we were removed from it while\n // queued by the handler\n if (mViews != null && !mViews.isEmpty()) {\n try {\n for (View view : mViews) {\n // we are safe to update this view,\n // if another task had been started on the view\n // the view would have already have been removed from\n // our set\n update(view, mRender, mPass - 1);\n }\n } finally {\n if (mPass < mPasses) {\n // reschedule again if we need to perform more passes\n enqueue();\n } else {\n // we're done, remove us from all our views\n // we lose the ability to avoid doing the same rendering\n // for the same view (very rare)\n // but this is worth it, so that we can re-use the\n // render from the cache (much more likely)\n removeFromViews();\n }\n }\n }\n // try putting us into the cache\n encache();\n }",
"private void render() {\n final int numBuffers = 3;\n BufferStrategy bs = this.getBufferStrategy(); // starts value at null\n if (bs == null) {\n this.createBufferStrategy(numBuffers); // 3: buffer creations\n return;\n }\n Graphics g = bs.getDrawGraphics();\n\n g.setColor(Color.black); // stops flashing background\n g.fillRect(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);\n\n handler.render(g);\n\n if (gameStart == GAME_STATE.Game) {\n hud.render(g);\n } else if (gameStart == GAME_STATE.Menu || gameStart == GAME_STATE.Help || gameStart == GAME_STATE.GameOver || gameStart == GAME_STATE.GameVictory) {\n menu.render(g);\n }\n\n g.dispose();\n bs.show();\n }",
"abstract protected boolean mustApplyTexture(DrawContext dc);",
"@Override\n\tpublic boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item,\n\t\t\tItemRendererHelper helper) {\n\t\treturn false;\n\t}",
"@Override\n public void beforeRender()\n {\n\n }",
"boolean getRendering(Long id) throws RemoteException;",
"void render(Object rendererTool);",
"public void render()\r\n\t{\n\t}",
"private void checkIfLoading(boolean force) {\n\t\tUtility.checkIfLoading(getLoaderManager(), REQUEST_UPGRADE_CONTENT_LOADER, mProgressView, mContainerView, force);\n\t}",
"void onRender(RenderArguments arguments);",
"@Override\r\n public void render(HttpServletRequest request, HttpServletResponse response, Object result) throws Throwable\r\n {\n \r\n }",
"default boolean renderRequired() {\n // if (!isPrimaryKey() && isRequired() && ) constraints.add(JdlUtils.validationRequired());\n return isRequired() && !(getName().equals(\"id\") && getType().equals(JdlFieldEnum.UUID));\n }",
"@Test\n public void testRender(){\n Mockito.doNothing().when(renderer).renderWorld(level);\n Mockito.doNothing().when(renderer).renderScore();\n Mockito.doNothing().when(renderer).renderLives();\n renderer.render();\n verify(renderer).renderWorld(level);\n verify(renderer).renderScore();\n verify(renderer).renderLives();\n verify(batch).begin();\n verify(batch).end();\n }",
"private boolean skipping(PhaseId phaseId, FacesContext context) {\n \n if (context.getResponseComplete()) {\n return (true);\n } else if (context.getRenderResponse() &&\n !phaseId.equals(PhaseId.RENDER_RESPONSE)) {\n return (true);\n } else {\n return (false);\n }\n \n }",
"protected boolean isFullyInitialized() {\n return html == null;\n }",
"public boolean shouldRenderUpload() {\r\n if (recipe != null && ui.isIsUserAuthenticated()) {\r\n return recipe.getCreator().getUserName().equals(ui.getUser().getUserName());\r\n } else {\r\n return false;\r\n }\r\n }",
"public final void calledDuringRender() {\n calledEveryFrame();\n numFrames++;\n }",
"public void render() {\n }",
"@Nonnegative\r\n protected abstract void onPerform (@Nonnull RenderingContext aCtx) throws IOException;",
"public void render(){\n\t\tBufferStrategy bs = frame.getBufferStrategy();\n\t\tif(bs == null){\n\t\t\tframe.createBufferStrategy(3);\n\t\t\treturn;\n\t\t}\n\t\trenderGraphics(bs);\n\t}",
"@Override\n public void prerender() {\n }",
"@Override\n public void render() {\n GUI.clearScreen();\n if (assetManager.update()) {\n switch (gameState) {\n case MENU:\n GUI.menuLoop();\n break;\n case PAUSE:\n case GAME:\n gameLoop();\n break;\n case LOAD:\n World.load();\n gameState = GameState.GAME;\n break;\n }\n } else {\n GUI.splashScreen(assetManager.getProgress());\n }\n DrawManager.end();\n }",
"@Override\n protected boolean isRenderScriptEnable() {\n return true;\n }",
"private void processRenderFunction() {\n if (!hasInterface(processingEnv, component.asType(), HasRender.class)) {\n return;\n }\n\n componentExposedTypeBuilder.addMethod(MethodSpec\n .methodBuilder(\"vg$render\")\n .addModifiers(Modifier.PUBLIC)\n .addAnnotation(JsMethod.class)\n .returns(VNode.class)\n .addParameter(CreateElementFunction.class, \"createElementFunction\")\n .addStatement(\"return super.render(new $T(createElementFunction))\", VNodeBuilder.class)\n .build());\n\n addMethodToProto(\"vg$render\");\n\n // Register the render method\n optionsBuilder.addStatement(\"options.addHookMethod($S, p.$L)\", \"render\", \"vg$render\");\n }",
"void onRenderTick() {\n \t\tif (zCalc == null || !zCalc.isAlive()) {\n \t\t\tzCalc = new Thread(this);\n \t\t\tzCalc.start();\n \t\t}\n \t\tif (Minecraft.theMinecraft != null && Minecraft.theMinecraft.theWorld != null) {\n \t\t\tif (!Minecraft.theMinecraft.theWorld.isRemote){\n \t\t\t\ttryARender();\n \t\t\t}\n \n \t\t}\n \t}",
"private void render() {\n\n\tbs=display.getCanvas().getBufferStrategy();\t\n\t\n\tif(bs==null) \n\t {\t\n\t\tdisplay.getCanvas().createBufferStrategy(3);\n\t\treturn ;\n\t }\n\t\n\tg=bs.getDrawGraphics();\n\n\t//Clear Screen\n\tg.clearRect(0, 0, width, height);\n\t\n\tif(State.getState()!=null )\n\t\tState.getState().render(g);\n\t\n\t//End Drawing!\n\tbs.show();\n\tg.dispose();\n\t\n\t}",
"private boolean beginDrawing() {\n\t\tif (!p_view.getHolder().getSurface().isValid()) {\n\t\t\treturn false;\n\t\t}\n\t\tp_canvas = p_view.getHolder().lockCanvas();\n\t\treturn true;\n\t}",
"@Override\n public void onFrameAvailable(SurfaceTexture st) {\n mGLView.requestRender();\n }",
"public void onFirstDrawFre() {\n mThreadChecker.assertOnValidThread();\n onFirstDraw(UMA_FRE);\n }",
"@Override\n\tpublic void surfaceCreated(SurfaceHolder holder) {\n\t\trequestRender();\n\t}",
"public abstract void render(Renderer renderer);",
"public boolean isCompatible(android.renderscript.Element e) { throw new RuntimeException(\"Stub!\"); }",
"boolean render(final CoreGL gl, float deltaTime);",
"public void render()\n\t{\n\t\t//double buffering is cool\n\t\tBufferStrategy bs = getBufferStrategy();\n\t\tif (bs == null)\n\t\t{\n\t\t\tcreateBufferStrategy(2);\n\t\t\tbs = getBufferStrategy();\n\t\t}\n\t\t\t\n\t\tGraphics2D g2 = (Graphics2D)bs.getDrawGraphics();\n\t\n\t\t\n\t\t\n\t\tif (true)\t\n\t\t{\n\t\t\tif (level != 0)\n\t\t\t{\n\t\t\t\tg2.setColor(Color.black);\n\t\t\t\tg2.fillRect(0, 0, width, height);\t\t\t\n\t\t\t}\n\t\t\tgameObjectHandler.render(g2,false);\n\t\t}\n\t\tif(currTransition != null)\n\t\t{\n\t\t\tcurrTransition.render(g2);\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\tbs.show();\n\t\tg2.dispose();\n\t\n\t}",
"protected void render() {\n\t\tString accion = Thread.currentThread().getStackTrace()[2].getMethodName();\n\t\trender(accion);\n\t}",
"public void render() {\r\n\r\n }",
"public interface Renderable {\n\n void render();\n}",
"public void render(Callable<Object> callable) {\n\t\trenderQueue.enqueue(callable);\n\t}",
"public int getRenderBlockPass(){\r\n return 1;\r\n }",
"protected void render(JOGLRenderer jr) {\n\t\tif (true || needsRendered) { // return;\n\t\t\tJOGLRenderingState jrs = jr.renderingState;\n\t\t\tglslProgram.setUniform(\"hyperbolic\",\n\t\t\t\t\tjrs.currentMetric == Pn.HYPERBOLIC);\n\t\t\tglslProgram.setUniform(\"useNormals4\", jrs.normals4d);\n\t\t\tglslProgram.setUniform(\"poincareModel\", poincareModel);\n\t\t\tif (poincarePath != null) {\n\t\t\t\tdouble[] H2Cam = Rn.times(null, jrs.worldToCamera,\n\t\t\t\t\t\tpoincarePath.getMatrix(null)), cam2H = Rn.inverse(null,\n\t\t\t\t\t\tH2Cam);\n\t\t\t\tdouble[] H2NDC = Rn.times(null, jrs.cameraToNDC, H2Cam);\n\t\t\t\t// System.err.println(\"c2p = \"+Rn.matrixToString(c2p));\n\t\t\t\tglslProgram\n\t\t\t\t\t\t.setUniform(\"cam2H\", Rn.convertDoubleToFloatArray(Rn\n\t\t\t\t\t\t\t\t.transpose(null, cam2H)));\n\t\t\t\tglslProgram\n\t\t\t\t\t\t.setUniform(\"H2NDC\", Rn.convertDoubleToFloatArray(Rn\n\t\t\t\t\t\t\t\t.transpose(null, H2NDC)));\n\t\t\t}\n\t\t}\n\t\tsuper.render(jr);\n\t\tneedsRendered = false;\n\t}",
"void onPrepareForRender() {\n\t\tcreatePersonsList();\n\n\t\t// If fresh start (ie. not rendering after a redirect), add an example person.\n\n\t\tif (form.isValid()) {\n\t\t\tpersons.set(0, new Person(\"Example\", \"Person\", Regions.EAST_COAST, getTodayDate()));\n\t\t}\n\t}",
"public void render();",
"boolean isForceLoaded();",
"public void render(Graphics g) {\n\t\tif(runOnce==2) {\n\t\t\tgame.render(g);\n\t\t}\n\t\t\n\t}",
"public boolean shouldRenderRelated() {\r\n if (relatedRecipes != null) {\r\n return !this.relatedRecipes.isEmpty();\r\n } else {\r\n return false;\r\n }\r\n }",
"protected void doDispatch (RenderRequest request,\n\t\t\t RenderResponse response) throws PortletException,java.io.IOException\n {\n WindowState state = request.getWindowState();\n \n if ( ! state.equals(WindowState.MINIMIZED)) {\n PortletMode mode = request.getPortletMode();\n if (mode.equals(PortletMode.VIEW)) {\n\tdoView (request, response);\n }\n else if (mode.equals(PortletMode.EDIT)) {\n\tdoEdit (request, response);\n }\n else if (mode.equals(PortletMode.HELP)) {\n\tdoHelp (request, response);\n }\n else {\n\tthrow new PortletException(\"unknown portlet mode: \" + mode);\n }\n }\n\n }",
"protected void doView (RenderRequest request,\n\t\t RenderResponse response)\n throws PortletException, java.io.IOException\n {\n throw new PortletException(\"doView method not implemented\");\n }",
"private boolean browserCantRenderFontsConsistently() {\n\r\n return getPage().getWebBrowser().getBrowserApplication()\r\n .contains(\"PhantomJS\")\r\n || (getPage().getWebBrowser().isIE() && getPage()\r\n .getWebBrowser().getBrowserMajorVersion() <= 9);\r\n }",
"public final void setRendered(final boolean rendered) {\n this.rendered = rendered;\n }",
"protected boolean isToolbarNeeded() {\n return true;\n }",
"@Override\n protected boolean isAppropriate() {\n return true; // always show\n }",
"public boolean setRender(IMmdPmdRender item)\r\n\t{\r\n\t\tif(_renders.contains(item))\r\n\t\t{\r\n\t\t\t_current = item;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t_renders.add(item);\r\n\t\treturn true;\r\n\t}",
"public static boolean shouldRender(InfoUUID uuid) {\n\t\treturn uuid.identity != -2;\n\t}"
] |
[
"0.62552714",
"0.6155259",
"0.59209985",
"0.58129054",
"0.57642466",
"0.57311624",
"0.5721363",
"0.5718536",
"0.5588053",
"0.5566144",
"0.55644894",
"0.54504937",
"0.5425642",
"0.5419135",
"0.53915995",
"0.53890216",
"0.5270776",
"0.52351487",
"0.52211165",
"0.5215279",
"0.5215279",
"0.5215279",
"0.5215279",
"0.5215279",
"0.5215279",
"0.5213787",
"0.5203721",
"0.51958466",
"0.5186",
"0.5171107",
"0.51679045",
"0.5142805",
"0.512508",
"0.5107319",
"0.51032794",
"0.5092065",
"0.5092065",
"0.50877863",
"0.5047451",
"0.5024216",
"0.50232375",
"0.50225353",
"0.5012738",
"0.5009551",
"0.4989096",
"0.49751648",
"0.49562496",
"0.49238178",
"0.4920742",
"0.49097002",
"0.48935536",
"0.48785332",
"0.48782784",
"0.4868647",
"0.4867543",
"0.48467782",
"0.48452547",
"0.48441833",
"0.4837838",
"0.48285356",
"0.481951",
"0.4818421",
"0.4797455",
"0.47829074",
"0.4774871",
"0.47682482",
"0.47576946",
"0.47515282",
"0.47254604",
"0.47171518",
"0.4710193",
"0.47101387",
"0.47080085",
"0.47039205",
"0.46982715",
"0.46900147",
"0.4681067",
"0.46770847",
"0.466985",
"0.46621647",
"0.46564227",
"0.46558747",
"0.4650415",
"0.4649809",
"0.464979",
"0.46490735",
"0.46469116",
"0.46403605",
"0.46374622",
"0.46369618",
"0.46357083",
"0.46294704",
"0.46253487",
"0.4619761",
"0.46175438",
"0.46172243",
"0.460832",
"0.45982614",
"0.45860967",
"0.4581183",
"0.45768413"
] |
0.0
|
-1
|
the run() to implement runnable the main function of the other thread. when threading is disabled, this simply idles and the actual work is done in onRenderTick().
|
public void run() {
while (true) {
try {
if (Minecraft.theMinecraft != null && Minecraft.theMinecraft.theWorld != null) {
//can not multithread in SP
if (!Minecraft.theMinecraft.theWorld.isRemote){
Thread.sleep(1000);
}
else {
tryARender();
}
}
Thread.sleep(100);
} catch (Exception e) {
e.printStackTrace();
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\tpublic void run() {\n\t\t\n\t\t\n\t\twhile (running) {\n\t\t\tupdate();\n\t\t\ttry {\n\t\t\t\tthread.sleep(1);\n\t\t\t} catch (InterruptedException e) {\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\trender();\n\t\t}\n\t\t\n\t}",
"public void run(){\n //logic to execute in a thread \n }",
"@Override\n public void run()\n {\n super.run();\n }",
"@Override\n\tpublic void run() {\n\t\tsuper.run();\n\t}",
"public void run()\r\n\t{\r\n\t\t\r\n\t}",
"protected void run() {\r\n\t\t//\r\n\t}",
"public void run() {\n // run called\n System.out.println(\"Run called\");\n status = true;\n Thread t = new Thread() {\n @Override\n public void run() {\n while(status) {\n\t\t\t\t\tSystem.out.println(\"step\");\n // step();\n\t\t\t\t\t//render();\n }\n }\n };\n t.start();\n\n Thread h = new Thread() {\n @Override\n public void run() {\n while(status) {\n render();\n }\n }\n };\n h.start();\n }",
"public void run () { run (true); }",
"public void run() {\n super.run();\n }",
"public void run() \n \t{\n \t\twhile(m_isDrawing)\n \t\t{\n \t\t\tCanvas canvas = m_surface.lockCanvas();\n \t\t\t\n \t\t\ttry\n \t\t\t{\n \t\t\t\t// clear canvas\n \t\t\t\tcanvas.drawColor(Color.WHITE);\n \t\t\t\t\n \t\t\t\t// draw stuffs\n \t\t\t\tm_grid.Draw(canvas, m_camera);\n \t\t\t}\n \t\t\tfinally\n \t\t\t{\n \t\t\t\tm_surface.unlockCanvasAndPost(canvas);\n \t\t\t}\n \t\t\t\n \t\t\t// then sleep for a bit\n \t\t\ttry \n \t\t\t{\n \t\t\t\tThread.sleep((long) (1000.0f / FPS));\n \t\t\t} \n \t\t\tcatch (InterruptedException e) \n \t\t\t{\n \t\t\t\t// Don't care, just log it and move on\n \t\t\t\tLog.w(TAG, \"Interrupted while sleeping!\");\n \t\t\t}\n \t\t}\n \t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tsuper.run();\r\n\t\t\t}",
"public void run() {\r\n }",
"public void run() {\n\t\t\t heavyResize();\n\t\t\t invokeRedraw();\n\t\t }",
"public final void run() {\r\n }",
"@Override\n\t\tpublic void run() {\n\t\t\tsynchronized (mSync) {\n\t\t\t\t// 描画スレッドが実行されるまで待機\n\t\t\t\tif (!isRunning) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmSync.wait();\n\t\t\t\t\t} catch (final InterruptedException e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tinit();\n\t\t\tif (egl.getGlVersion() > 2) {\n\t\t\t\tcaptureLoopGLES3();\n\t\t\t} else {\n\t\t\t\tcaptureLoopGLES2();\n\t\t\t}\n\t\t\t// release resources\n\t\t\trelease();\n//\t\t\tif (DEBUG) Log.v(TAG, \"captureTask finished\");\n\t\t}",
"public void run()\n\t{\n\t}",
"public void run();",
"public void run();",
"public void run();",
"public void run();",
"public void run();",
"@Override\r\n\tabstract public void run();",
"public void run() {\n\t\t\t\t\t\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n public void run() {}",
"@Override\n public void run() {\n try {\n this.init();\n } catch (IOException e) {\n e.printStackTrace();\n }\n int fps = Const.FPS;\n double ticksPerFrame = 1_000_000_000 / fps;\n double delta = 0;\n long now;\n long lastTimeTicked = System.nanoTime();\n\n\n while (isRunning) {\n now = System.nanoTime();\n delta += (now - lastTimeTicked) / ticksPerFrame;\n lastTimeTicked = now;\n if (delta > 0) {\n tick();\n try {\n render();\n } catch (IOException e) {\n e.printStackTrace();\n }\n delta--;\n\n }\n }\n //Calls the stop method to stop everything\n this.stop();\n }",
"public void run(){\n\t}",
"@Override\r\n\tpublic abstract void run();",
"@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tupdateUI();\n\t\t\t\t\t\t}",
"public void run() {\n try {\n runable.run();\n } catch (Throwable ex) {\n Log.INSTANCE.e(LOG_TAG, LOG_TAG, ex);\n } finally {\n\n // Log.INSTANCE.d(LOG_TAG, \"BGND THREAD \" + msg + \" (\" + (System.nanoTime() - startTime) / 1000000 + \"ms)\");\n }\n }",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t\t\t\t\t\t\n\t}",
"public void run() {\r\n\t\tnotifyViews();\r\n\t\tfor (int i = 0; i < 100000; i++) {\r\n\t\t\ttick();\r\n\t\t}\r\n\t}",
"public void run()\r\n\t{\r\n\t\ttry {\r\n\t\t\twhile(true) {\r\n\t\t\t\tgl.use();\r\n\t\t\t\tspinDisplay();\r\n\t\t\t\tThread.sleep(10);\r\n\t\t\t}\r\n\t\t}\r\n catch (InterruptedException e){\r\n // the user sent an interupt,\r\n // So lets exit...\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}",
"@Override\r\n public void run() {\n }",
"public void run(\r\n ) {\r\n \tboolean isActive = true;\r\n \tStringBuilder aBuffer = new StringBuilder( 256 );\r\n \t\r\n \twhile( isActive ) {\r\n \t\tsynchronized( this ) {\r\n\t \t\tif ( mLoadingScene == null ) try {\r\n\t \t\t\tthis.wait();\r\n\t \t\t} catch( InterruptedException ex ) {\r\n\t \t\t\tisActive = false;\r\n\t \t\t\tmLoadingScene = null;\r\n\t \t\t}\r\n \t\t}\r\n \t\taBuffer.setLength( 0 );\r\n \t\tStringBuilder reportString = null;\r\n \t\ttry {\r\n \t\t\treportString = loadElement( mLoadingScene, aBuffer );\r\n \t\t} catch( CSGConstructionException ex ) {\r\n \t\t\treportString = CSGConstructionException.reportError( ex, \" // \", aBuffer );\r\n \t\t}\r\n \t\tmLoadingScene = null;\r\n \t\t\r\n \t\tif ( reportString != null ) {\r\n \t\t\tmPostText.push( reportString.toString() );\r\n \t\t\tmRefreshText = true;\r\n \t\t}\r\n \t}\r\n }",
"@Override\n protected void runInListenerThread(Runnable runnable) {\n runnable.run();\n }",
"public void run() {\n\t\t\r\n\t}",
"public void run() {\n\t\t\r\n\t}",
"@Override public void run() {\n mRenderer.notifyPausing();\n }",
"public void run() {\n\t}",
"public void run() {\n\t}",
"public void run() {\r\n\t\t// overwrite in a subclass.\r\n\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n abstract public void run();",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"public void run() {\n\t\t\n\t}",
"@Override\n public void run() {\n }",
"@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}",
"public void run() {\n }",
"public void run() {\n }",
"public void run() {\n }",
"@Override\n\tpublic void run()\n\t{\n\t}",
"public void run()\n\t\t{\n\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\"Thread working\");\n\t\t\t}",
"public void run() {\n }",
"public void run() {\n }",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\twhile(true){\r\n\t\t\t\t\tdraw();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\r\n\tpublic Void call(){\r\n\t\tupdateProgress(0, 1);\r\n\t\trendering = true;\r\n\t\t\r\n\t\tlong startTime = System.currentTimeMillis();\r\n\t\t\r\n\t\tfor(int i = 0; i < numberOfThreads; i++){\r\n\t\t\tthreads[i] = new RenderThread(i * (WIDTH / numberOfThreads), (i + 1) * (WIDTH / numberOfThreads), this);\r\n\t\t}\r\n\t\t\r\n\t\twhile(rendering){\r\n\t\t\tint threadsRunning = numberOfThreads;\r\n\t\t\tfloat percentComplete = 0f;\r\n\r\n\t\t\tfor(RenderThread t : threads){\r\n\t\t\t\tif(!t.isRendering()){\r\n\t\t\t\t\tthreadsRunning -= 1;\r\n\t\t\t\t\tpercentComplete += 1f / numberOfThreads;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfloat percent = t.getPercentComplete();\r\n\t\t\t\t\tpercentComplete += (percent / numberOfThreads);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tupdateProgress((double) (percentComplete), 1);\r\n\t\t\t\r\n\t\t\tif(threadsRunning == 0){\r\n\t\t\t\trendering = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tlong renderTime = System.currentTimeMillis() - startTime;\r\n\t\t\r\n\t\trendering = false;\r\n\t\t\r\n\t\tlong hours = TimeUnit.MILLISECONDS.toHours(renderTime);\r\n\t\trenderTime -= TimeUnit.HOURS.toMillis(hours);\r\n\t\tlong minutes = TimeUnit.MILLISECONDS.toMinutes(renderTime);\r\n\t\trenderTime -= TimeUnit.MINUTES.toMillis(minutes);\r\n\t\tlong seconds = TimeUnit.MILLISECONDS.toSeconds(renderTime);\r\n\t\t\r\n\t\tString time = String.format(\"Render Time: %d hours, %d minutes, %d seconds\", hours, minutes, seconds);\r\n\t\tToolkit.getDefaultToolkit().beep();\r\n\t\t\r\n\t\tSystem.out.println(time);\r\n\t\t\r\n\t\tdrawSet();\r\n\t\t\r\n\t\tif(autoSave){\r\n\t\t\tautoSave();\r\n\t\t}\r\n\t\t\r\n\t\tif(iterationChange){\r\n\t\t\tITERATIONS = changedIterations;\r\n\t\t\titerationChange = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(zoomChange){\r\n\t\t\tZOOM = changedZoom;\r\n\t\t\tzoomChange = false;\r\n\t\t\tchangedZoom = null;\r\n\t\t}\r\n\t\t\r\n\t\tif(numberOfThreadsChanged){\r\n\t\t\tnumberOfThreads = changedNumberOfThreads;\r\n\t\t\tnumberOfThreadsChanged = false;\r\n\t\t\tchangedNumberOfThreads = 0;\r\n\t\t}\r\n\t\t\r\n\t\tif(xyChange){\r\n\t\t\txOffset = changedXOffset;\r\n\t\t\tyOffset = changedYOffset;\r\n\t\t\txyChange = false;\r\n\t\t\tchangedXOffset = null;\r\n\t\t\tchangedYOffset = null;\r\n\t\t}\r\n\t\t\r\n\t\tif(imageAspectChanged){\r\n\t\t\tWIDTH = newWIDTH;\r\n\t\t\tHEIGHT = newHEIGHT;\r\n\t\t\timageAspectChanged = false;\r\n\t\t\tnewWIDTH = 0;\r\n\t\t\tnewHEIGHT = 0;\r\n\t\t\timg = new WritableImage(WIDTH, HEIGHT);\r\n\t\t\trgbArray = new int[WIDTH * HEIGHT];\r\n\t\t\tsetMaxAndMins();\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"public void run() {\n\n\t}",
"public void run() {\n\n\t}",
"public void run() {\n }",
"@Override\n public void run()\n {\n }",
"@Override\n public void run()\n {\n }",
"@Override\n\tpublic void run()\n\t{\n\n\t}",
"@Override\r\n\tpublic void run() {\n\r\n\t}",
"@Override\n\tpublic void run() {\n\t\tgameImpl.render();\n\t\tgameImpl.update();\n\t}",
"@Override\r\n\t\t\t\tpublic void run() {\n\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void run() {\n\r\n\t\t\t\t}",
"public void run() {\n if (mStopping)\n return;\n if (mFailed) {\n // render didn't complete (probably got cancelled)\n // remove from the view (but we may still get cached)\n removeFromViews();\n }\n // the views may be null/empty if we were removed from it while\n // queued by the handler\n if (mViews != null && !mViews.isEmpty()) {\n try {\n for (View view : mViews) {\n // we are safe to update this view,\n // if another task had been started on the view\n // the view would have already have been removed from\n // our set\n update(view, mRender, mPass - 1);\n }\n } finally {\n if (mPass < mPasses) {\n // reschedule again if we need to perform more passes\n enqueue();\n } else {\n // we're done, remove us from all our views\n // we lose the ability to avoid doing the same rendering\n // for the same view (very rare)\n // but this is worth it, so that we can re-use the\n // render from the cache (much more likely)\n removeFromViews();\n }\n }\n }\n // try putting us into the cache\n encache();\n }",
"public void run() {\n\n\n }",
"@Override\n public void run() {\n }",
"public void run() {\n\t\t\t\t\n\t\t\t}",
"public void run() {\n }",
"@Override\n public void run()\n {\n\n }",
"@Override\r\n\tpublic void run() {\n\t}",
"@Override\r\n\tpublic void run() {\n\t}"
] |
[
"0.72225463",
"0.71183604",
"0.6975212",
"0.6953414",
"0.69325024",
"0.6929681",
"0.69154876",
"0.6915286",
"0.6910739",
"0.68994105",
"0.68843555",
"0.6841076",
"0.6840096",
"0.6837316",
"0.6836835",
"0.6830212",
"0.682668",
"0.682668",
"0.682668",
"0.682668",
"0.682668",
"0.6816556",
"0.6803479",
"0.677702",
"0.677702",
"0.677702",
"0.677702",
"0.677702",
"0.677702",
"0.677702",
"0.677702",
"0.677702",
"0.6766768",
"0.6758452",
"0.67567074",
"0.6749709",
"0.673399",
"0.672971",
"0.67165375",
"0.67148334",
"0.6713633",
"0.6712959",
"0.6711201",
"0.6709237",
"0.6707682",
"0.6703618",
"0.670093",
"0.670093",
"0.66996473",
"0.6698653",
"0.6698653",
"0.66974664",
"0.66950846",
"0.66950846",
"0.6694733",
"0.6691311",
"0.6691311",
"0.66912055",
"0.66775477",
"0.6677493",
"0.6677493",
"0.6670286",
"0.6670286",
"0.6670286",
"0.6666367",
"0.66634256",
"0.666271",
"0.6660973",
"0.6660973",
"0.66581625",
"0.66566724",
"0.66566724",
"0.66566724",
"0.66551584",
"0.6654155",
"0.6654155",
"0.6654155",
"0.6654155",
"0.6654155",
"0.6654155",
"0.6654155",
"0.6653418",
"0.6653418",
"0.66518575",
"0.66518575",
"0.6650858",
"0.6648052",
"0.6648052",
"0.6642003",
"0.66392606",
"0.66356647",
"0.6635412",
"0.6635412",
"0.6633913",
"0.6630366",
"0.6629622",
"0.66292745",
"0.6621001",
"0.6619839",
"0.66198146",
"0.66198146"
] |
0.0
|
-1
|
Called each tick of the render.
|
void onRenderTick() {
if (zCalc == null || !zCalc.isAlive()) {
zCalc = new Thread(this);
zCalc.start();
}
if (Minecraft.theMinecraft != null && Minecraft.theMinecraft.theWorld != null) {
if (!Minecraft.theMinecraft.theWorld.isRemote){
tryARender();
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\tpublic void tick() {\n\t\trenderer.render(this);\n\t}",
"public void onRenderTick() {\n updateLang();\n updateRenderEngine();\n }",
"public final void calledDuringRender() {\n calledEveryFrame();\n numFrames++;\n }",
"@Override\n\tpublic void render(float deltaTime) {\n\t\t\n\t}",
"@Override\n public void render() {\n if (renderInterrupted) {\n log.debug(\"render()\");\n renderInterrupted = false;\n }\n\n }",
"@Override\n\tpublic void render(float delta) {\n\t}",
"public void render() {\r\n\r\n }",
"@Override\n public void render(float delta) {\n if(counter>1000) counter = 1;\n super.render(delta);\n myCamera.update();\n myCamera.setCamera(renderer, batch);\n batch.begin();\n backgroundSprite.draw(batch, calculateAlpha()/2);\n batch.end();\n drawCurve();\n drawFlights();\n drawFavouritesAndLegend();\n ab.render();\n clicked = false;\n counter++;\n }",
"public void render()\r\n\t{\n\t}",
"public void render() {\n }",
"public void render() {\n this.canvas.repaint();\n }",
"@Override\r\n\tpublic void render() {\n\t\t\r\n\t}",
"@Override\n\tpublic void render(float delta) {\n\n\t}",
"private void render() {\n\n StateManager.getState().render();\n }",
"@Override\n\tpublic void render(float delta) {\n\t\tupdate(delta);\n\t\tdraw(delta);\n\t}",
"@Override\n\tpublic void render() {\n\t\t\n\t}",
"@Override\r\n\tpublic Void call(){\r\n\t\tupdateProgress(0, 1);\r\n\t\trendering = true;\r\n\t\t\r\n\t\tlong startTime = System.currentTimeMillis();\r\n\t\t\r\n\t\tfor(int i = 0; i < numberOfThreads; i++){\r\n\t\t\tthreads[i] = new RenderThread(i * (WIDTH / numberOfThreads), (i + 1) * (WIDTH / numberOfThreads), this);\r\n\t\t}\r\n\t\t\r\n\t\twhile(rendering){\r\n\t\t\tint threadsRunning = numberOfThreads;\r\n\t\t\tfloat percentComplete = 0f;\r\n\r\n\t\t\tfor(RenderThread t : threads){\r\n\t\t\t\tif(!t.isRendering()){\r\n\t\t\t\t\tthreadsRunning -= 1;\r\n\t\t\t\t\tpercentComplete += 1f / numberOfThreads;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfloat percent = t.getPercentComplete();\r\n\t\t\t\t\tpercentComplete += (percent / numberOfThreads);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tupdateProgress((double) (percentComplete), 1);\r\n\t\t\t\r\n\t\t\tif(threadsRunning == 0){\r\n\t\t\t\trendering = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tlong renderTime = System.currentTimeMillis() - startTime;\r\n\t\t\r\n\t\trendering = false;\r\n\t\t\r\n\t\tlong hours = TimeUnit.MILLISECONDS.toHours(renderTime);\r\n\t\trenderTime -= TimeUnit.HOURS.toMillis(hours);\r\n\t\tlong minutes = TimeUnit.MILLISECONDS.toMinutes(renderTime);\r\n\t\trenderTime -= TimeUnit.MINUTES.toMillis(minutes);\r\n\t\tlong seconds = TimeUnit.MILLISECONDS.toSeconds(renderTime);\r\n\t\t\r\n\t\tString time = String.format(\"Render Time: %d hours, %d minutes, %d seconds\", hours, minutes, seconds);\r\n\t\tToolkit.getDefaultToolkit().beep();\r\n\t\t\r\n\t\tSystem.out.println(time);\r\n\t\t\r\n\t\tdrawSet();\r\n\t\t\r\n\t\tif(autoSave){\r\n\t\t\tautoSave();\r\n\t\t}\r\n\t\t\r\n\t\tif(iterationChange){\r\n\t\t\tITERATIONS = changedIterations;\r\n\t\t\titerationChange = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(zoomChange){\r\n\t\t\tZOOM = changedZoom;\r\n\t\t\tzoomChange = false;\r\n\t\t\tchangedZoom = null;\r\n\t\t}\r\n\t\t\r\n\t\tif(numberOfThreadsChanged){\r\n\t\t\tnumberOfThreads = changedNumberOfThreads;\r\n\t\t\tnumberOfThreadsChanged = false;\r\n\t\t\tchangedNumberOfThreads = 0;\r\n\t\t}\r\n\t\t\r\n\t\tif(xyChange){\r\n\t\t\txOffset = changedXOffset;\r\n\t\t\tyOffset = changedYOffset;\r\n\t\t\txyChange = false;\r\n\t\t\tchangedXOffset = null;\r\n\t\t\tchangedYOffset = null;\r\n\t\t}\r\n\t\t\r\n\t\tif(imageAspectChanged){\r\n\t\t\tWIDTH = newWIDTH;\r\n\t\t\tHEIGHT = newHEIGHT;\r\n\t\t\timageAspectChanged = false;\r\n\t\t\tnewWIDTH = 0;\r\n\t\t\tnewHEIGHT = 0;\r\n\t\t\timg = new WritableImage(WIDTH, HEIGHT);\r\n\t\t\trgbArray = new int[WIDTH * HEIGHT];\r\n\t\t\tsetMaxAndMins();\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public void update(){\n\t\tsetChanged();\n\t\trender();\n\t\tprintTimer();\n\t}",
"@Override\r\n\tpublic void render() {\n\r\n\t}",
"@Override\r\n\tpublic void tick() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tick() {\n\t\t\r\n\t}",
"private void render() {\n\n if (state == STATE.PAUSE) {\n\n return;\n }\n\n\n if (state == STATE.MENU) {\n\n menu.draw();\n arrow.render();\n return;\n\n }\n\n if (state == STATE.INSTRUCTIONS) {\n instructions.draw();\n return;\n }\n\n for (int i = 0; i < spaceShips.size(); i++) {\n spaceShips.get(i).render();\n }\n\n\n for (Enemy enemy : enemies) {\n enemy.render();\n }\n\n for (int i = 0; i < powerUps.size(); i++) {\n\n powerUps.get(i).render();\n }\n\n for (int i = 0; i < enemyBullets.size(); i++) {\n\n enemyBullets.get(i).render();\n }\n\n for (int i = 0; i < friendlyBullets.size(); i++) {\n\n friendlyBullets.get(i).render();\n }\n\n topBar.render();\n bottomBar.render();\n fps.render();\n score.render();\n\n\n }",
"@Override\n public void tick() {\n super.tick();\n }",
"public void render() {\n GameApp.getSpritebatch().draw(sprite, position.x, position.y, GridSquare.SIZE, GridSquare.SIZE);\n if (active) {\n if (currTime + attack.getAttackDelay() < System.currentTimeMillis() && attackTargets()) {\n\n currTime = System.currentTimeMillis();\n }\n attack.render();\n }\n }",
"public void render() {\r\n\t\t\r\n\t\tif (page >= 0 && page < pages.length) {\r\n\t\t\tTextures.renderQuad(pages[page][(updates / 90) % pages[page].length], 32, 32, 1024, 512);\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void beforeRender(float dt) {\n\r\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t\t\n\t\twhile (running) {\n\t\t\tupdate();\n\t\t\ttry {\n\t\t\t\tthread.sleep(1);\n\t\t\t} catch (InterruptedException e) {\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\trender();\n\t\t}\n\t\t\n\t}",
"@Override\n\tpublic void render() {\n\t\tScreen.render();\n\t}",
"private void renderHook(){\n\t\thook.setPosition(world.hook.position.x, world.hook.position.y);\n\t\thook.setRotation(world.hook.rotation);\n\t\thook.draw(batch);\n\t}",
"public void render() {\n\t\tBufferStrategy bs = getBufferStrategy();\n\t\tif (bs == null) {\n\t\t\tcreateBufferStrategy(3);\n\t\t\treturn;\n\t\t}\n\t\t// get graphics object for drawing on canvas\n\t\tGraphics g = bs.getDrawGraphics();\n\t\t// clear screen before drawing new objects to it\n\t\tg.setColor(style.getBackCol());\n\t\tg.fillRect(0, 0, getWidth(), getHeight());\n\t\t// use style from server to draw time information, only if we have\n\t\t// synced the time with the server.\n\t\tg.setColor(style.getTimeCol());\n\t\tif (tim.TIME_SYNCED) {\n\t\t\t// set font and font size, perhaps font can also be customizable in\n\t\t\t// the future?\n\t\t\tg.setFont(new Font(\"TimesRoman\", Font.PLAIN, style.getTimePoint()));\n\t\t\tFontMetrics metrics = g.getFontMetrics(new Font(\"TimesRoman\", Font.PLAIN, style.getTimePoint()));\n\t\t\t// get height to offset text by when drawing.\n\t\t\tint hgt = metrics.getHeight();\n\t\t\t// System.out.println(\"\" +style.getLeft() * WIDTH);\n\t\t\tg.drawString(tim.getTime(), (int) (style.getLeft() * WIDTH), (int) (style.getTop() * HEIGHT + hgt));\n\t\t}\n\t\t// clear graphics from memory and draw screen buffer\n\t\tg.dispose();\n\t\tbs.show();\n\t}",
"public void render(float partialTicks){\r\n\t\tif(blocks.size() > 0 && enabled){\r\n\t\t\tfor(int i = 0; i < blocks.size();i++){\r\n\t\t\t\tblocks.get(i).draw(partialTicks);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\n\tpublic void render () {\n\n\t}",
"protected void render(){}",
"@Override\n\tpublic void tick() {\n\n\t}",
"@Override\n public void onTick() {\n \n }",
"public void render () \n\t{ \n\t\trenderWorld(batch);\n\t\trenderGui(batch);\n\t}",
"@Override\r\n\t\tprotected void onTick() {\n\r\n\t\t}",
"@Override\n public void render() {\n super.render();\n }",
"@Override\n public void render() {\n super.render();\n }",
"public void render() {\n\t\tBufferStrategy bs = getBufferStrategy();\n\t\tif (bs == null) { //if the buffer strategy doesnt get created, then you create it\n\t\t\tcreateBufferStrategy(3); //the number 3 means it creates triple buffering\n\t\t\treturn;\t\t\t\t\t//, so when you backup frame gets displayed (2) it will also have a backup\t\n\t\t}\n\t\t\n\t\t//apply data to the buffer \"bs\"\n\t\t//this is creating a link to graphics to drawing graphics to the screen.\n\t\tGraphics g = bs.getDrawGraphics();\n\t\t/**\n\t\t * You input all of your graphics inbetween the g object and g.dispose();\n\t\t */\n\t\t//###################\n\t\t\n\t\tg.setColor(Color.BLACK);\n\t\tg.fillRect(0, 0, getWidth(), getHeight());\n\t\t\n\t\t//###################\n\t\tg.dispose(); //this dispose of all the graphics\n\t\tbs.show(); //this will make the next available buffer visible\n\t}",
"public void render() {\n\t\t// do nothing... as we should\n\t}",
"public void display()\r\n\t{\r\n\t\t//System.out.println(\"Call to display\");\r\n\t\tif (this.isRunning) {\r\n\t\t\tfor (int i=0;i<Actions.size();i++) {\r\n\t\t\t\t((Action)Actions.elementAt(i)).tick(currTime++);\r\n\t\t\t}\r\n\t\t}\r\n\t\trender(true);\r\n\t}",
"@Override\n\tpublic void tick() {\n\t\t\n\t}",
"@Override\n\tpublic void tick() {\n\t\t\n\t}",
"@Override\n\tpublic void tick() {\n\t\t\n\t}",
"@Override\n\tpublic void tick() {\n\t\t\n\t}",
"@Override\n\tpublic void tick() {\n\t\t\n\t}",
"@Override\n\tpublic void tick() {\n\t\t\n\t}",
"@Override\n\tpublic void tick() {\n\t\t\n\t}",
"public void render() {\r\n\t\t\r\n\t\taccum += Gdx.graphics.getDeltaTime();\r\n\t\twhile(accum >= STEP) {\r\n\t\t\taccum -= STEP;\r\n\t\t\tgsm.update(STEP);\r\n\t\t\tgsm.render();\r\n\t\t\tMyInput.update();\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\n public void run() {\n try {\n this.init();\n } catch (IOException e) {\n e.printStackTrace();\n }\n int fps = Const.FPS;\n double ticksPerFrame = 1_000_000_000 / fps;\n double delta = 0;\n long now;\n long lastTimeTicked = System.nanoTime();\n\n\n while (isRunning) {\n now = System.nanoTime();\n delta += (now - lastTimeTicked) / ticksPerFrame;\n lastTimeTicked = now;\n if (delta > 0) {\n tick();\n try {\n render();\n } catch (IOException e) {\n e.printStackTrace();\n }\n delta--;\n\n }\n }\n //Calls the stop method to stop everything\n this.stop();\n }",
"public void tick() {\r\n }",
"@Override\r\n\tpublic void render(){\n\t\tGdx.gl.glClearColor( 0f, 1f, 0f, 1f );\r\n\t\tGdx.gl.glClear( GL20.GL_COLOR_BUFFER_BIT );\r\n\r\n\t\t// output the current FPS\r\n\t\tfpsLogger.log();\r\n\t}",
"public void run() {\r\n\t\tint frames = 0;\r\n\t\tdouble unprocessedSeconds = 0;\r\n\t\tlong previousTime = System.nanoTime();\r\n\t\tdouble secondsPerTick = 1 / 60.0;\r\n\t\tint tickCount = 0;\r\n\t\tboolean ticked = false;\r\n\t\t\r\n\t\twhile (running) {\r\n\t\t\tlong currentTime = System.nanoTime();\r\n\t\t\tlong passedTime = currentTime - previousTime;\r\n\t\t\tpreviousTime = currentTime;\r\n\t\t\tunprocessedSeconds += passedTime / 1000000000.0;\r\n\t\t\trequestFocus();//has the window selected when program is lanched\r\n\r\n\t\t\twhile (unprocessedSeconds > secondsPerTick) {\r\n\t\t\t\tunprocessedSeconds -= secondsPerTick;\r\n\t\t\t\tticked = true;\r\n\t\t\t\ttickCount++;\r\n\t\t\t\tif (tickCount % 3 == 0) {//calls on tick 20x/second\r\n\t\t\t\t\ttick();\r\n\t\t\t\t\tnumberOfTicks++;\r\n\t\t\t\t}\r\n\t\t\t\tif (tickCount % 60 == 0) {\r\n\t\t\t\t\t//System.out.println(frames + \"fps\");\r\n\t\t\t\t\tfps = frames;\r\n\t\t\t\t\tpreviousTime += 1000;\r\n\t\t\t\t\tframes = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\trender();\r\n\t\t\tframes++;\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void render(float delta) {\n\t\trunTime += delta;\n\t\tworld.update(delta);\n\t\trenderer.setDeltaTime(delta);\n\t\trenderer.render(delta, runTime);\n\t\t\n\t}",
"@Override\n\tpublic void render(SpriteBatch batch) {\n\t}",
"public void run() {\r\n\t\tnotifyViews();\r\n\t\tfor (int i = 0; i < 100000; i++) {\r\n\t\t\ttick();\r\n\t\t}\r\n\t}",
"@Override\n public void run() {\n drawComponents();\n // Ve lai sau 1p\n drawComponentsHandler.postDelayed(drawComponentsRunnable, 60000);\n }",
"private void updateAndRender(long deltaMillis) {\n currentState.update(deltaMillis / 1000f); \r\n //Double Buffering (reduce tearing)\r\n prepareGameImage();\r\n currentState.render(gameImage.getGraphics(), this.getWidth(), this.getHeight());\r\n renderGameImage(getGraphics());\r\n }",
"@Override\n\tpublic void run() {\n\t\tgameImpl.render();\n\t\tgameImpl.update();\n\t}",
"@Override\n public void render() { super.render(); }",
"@Override\n\tpublic void render(float delta) {\n\t\tGdx.gl.glClearColor(0.1f, 0.1f, 0.1f, 1);\n\t\tGdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\n\t\tcontroller.update(delta, elapsedTime);\n\t\trenderer.render();\n\t\telapsedTime += 1; // count elapsedTime for further control\n\t}",
"public void render() {\n\t\tscreen.background(255);\n\t\thandler.render();\n\t}",
"void renderLoop(RenderLoopCallback renderLoop);",
"public void tick() {\n\t}",
"public void tick() {\n\t}",
"private void render() {\n\t\tBufferStrategy buffStrat = display.getCanvas().getBufferStrategy();\n\t\tif(buffStrat == null) {\n\t\t\tdisplay.getCanvas().createBufferStrategy(3); //We will have 3 buffered screens for the game\n\t\t\treturn;\n\t\t}\n\n\t\t//A bufferstrategy prevents flickering since it preloads elements onto the display.\n\t\t//A graphics object is a paintbrush style object\n\t\tGraphics g = buffStrat.getDrawGraphics();\n\t\t//Clear the screen\n\t\tg.clearRect(0, 0, width, height); //Clear for further rendering\n\t\t\n\t\tif(State.getState() !=null) {\n\t\t\tState.getState().render(g);\n\t\t}\n\t\t//Drawings to be done in this space\n\t\t\n\t\t\n\t\t\n\t\tbuffStrat.show();\n\t\tg.dispose();\n\t}",
"@Override\n\tpublic void render () {\n super.render();\n\t}",
"private void render() {\n if (game.isEnded()) {\n if (endGui == null) {\n drawEndScreen();\n }\n\n return;\n }\n\n drawScore();\n drawSnake();\n drawFood();\n }",
"@Override\r\n\tpublic void paint(float deltaTime) {\n\t\t\r\n\t}",
"@Override\n public void render() {\n GUI.clearScreen();\n if (assetManager.update()) {\n switch (gameState) {\n case MENU:\n GUI.menuLoop();\n break;\n case PAUSE:\n case GAME:\n gameLoop();\n break;\n case LOAD:\n World.load();\n gameState = GameState.GAME;\n break;\n }\n } else {\n GUI.splashScreen(assetManager.getProgress());\n }\n DrawManager.end();\n }",
"@Override\n public void run() {\n long previousTime = System.currentTimeMillis();\n long timeSinceLastTick = 0L;\n long timeSinceLastDisplayFrame = 0L;\n\n final double millisecondsPerDisplayFrame = 1000.0 / DISPLAY_FPS;\n\n while (this.game.isRunning() && !this.game.isGameOver()) {\n long currentTime = System.currentTimeMillis();\n long elapsedTime = currentTime - previousTime;\n timeSinceLastTick += elapsedTime;\n timeSinceLastDisplayFrame += elapsedTime;\n\n if (timeSinceLastTick >= MILLISECONDS_PER_TICK) { // Check if enough time has passed to update the physics.\n this.updatePhysics(); // Perform one 'step' in the game.\n timeSinceLastTick = 0L;\n }\n if (timeSinceLastDisplayFrame >= millisecondsPerDisplayFrame) { // Check if enough time has passed to refresh the display.\n this.game.notifyListeners(timeSinceLastTick); // Tell the asteroids panel that it should refresh.\n timeSinceLastDisplayFrame = 0L;\n }\n\n previousTime = currentTime;\n }\n }",
"public static void run()\r\n\t{\r\n\t\tlong lastTime = System.nanoTime();\r\n\t\tdouble nsPerTick = 1000000000D / 30D;\r\n\t\t\r\n\t\tlong lastTimer = System.currentTimeMillis();\r\n\t\tdouble delta = 0; \r\n\r\n\t\twhile(isRunning)\r\n\t\t{\r\n\t\t\tlong now = System.nanoTime();\r\n\t\t\tdelta += (now - lastTime) / nsPerTick;\r\n\t\t\tlastTime = now;\r\n\t\t\t\r\n\t\t\twhile(delta >= 1)\r\n\t\t\t{\r\n\t\t\t\tdisplay.update();\r\n\t\t\t\tdisplay.render();\r\n\t\t\t\tdelta -= 1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(System.currentTimeMillis() - lastTimer > 1000)\r\n\t\t\t{\r\n\t\t\t\tlastTimer += 1000;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void run() {\n\t\tif (state != 3) {\n\t\t\tthis.requestFocus();\n\t\t\tlong lastTime = System.nanoTime();\n\t\t\tdouble amountOfTicks = 60.0;\n\t\t\tdouble ns = 1000000000 / amountOfTicks;\n\t\t\tdouble delta = 0;\n\t\t\tlong timer = System.currentTimeMillis();\n\t\t\tint frames = 0;\n\t\t\twhile (isRunning) {\n\n\t\t\t\tlong now = System.nanoTime();\n\n\t\t\t\tdelta += (now - lastTime) / ns;\n\t\t\t\tlastTime = now;\n\n\t\t\t\twhile (delta >= 1) {\n\t\t\t\t\ttick();\n\t\t\t\t\tdelta--;\n\t\t\t\t}\n\t\t\t\trender();\n\t\t\t\tframes++;\n\n\t\t\t\tif (System.currentTimeMillis() - timer > 1000) {\n\t\t\t\t\ttimer += 1000;\n\t\t\t\t\tframes = 0;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tstop();\n\n\t\t}\n\n\t}",
"public void render(){\n //this block is pre-loading 2 frames in\n BufferStrategy bs = this.getBufferStrategy();\n if(bs == null){\n this.createBufferStrategy(2);\n return;\n }\n\n Graphics g = bs.getDrawGraphics();\n Graphics2D g2d = (Graphics2D) g;\n ///////////////////////////\n //Draw things below here!\n g.setColor(Color.white);\n g.fillRect(0, 0, 800, 800);\n\n g2d.translate(-camera.getX(), -camera.getY());\n\n g.setColor(Color.gray);\n g.fillRect(0, 0, 500, 500);\n //render all the objects\n handler.render(g);\n\n //g2d.translate(camera.getX(), camera.getY());\n //Draw things above here!\n ///////////////////////////\n g.dispose();\n bs.show();\n }",
"public void tick() {\n if (this.overlayMessageTime > 0) {\n --this.overlayMessageTime;\n }\n\n if (this.titlesTimer > 0) {\n --this.titlesTimer;\n if (this.titlesTimer <= 0) {\n this.displayedTitle = null;\n this.displayedSubTitle = null;\n }\n }\n\n ++this.ticks;\n Entity entity = this.mc.getRenderViewEntity();\n if (entity != null) {\n this.updateVignetteBrightness(entity);\n }\n\n if (this.mc.player != null) {\n ItemStack itemstack = this.mc.player.inventory.getCurrentItem();\n if (itemstack.isEmpty()) {\n this.remainingHighlightTicks = 0;\n } else if (!this.highlightingItemStack.isEmpty() && itemstack.getItem() == this.highlightingItemStack.getItem() && (itemstack.getDisplayName().equals(this.highlightingItemStack.getDisplayName()) && itemstack.getHighlightTip(itemstack.getDisplayName()).equals(highlightingItemStack.getHighlightTip(highlightingItemStack.getDisplayName())))) {\n if (this.remainingHighlightTicks > 0) {\n --this.remainingHighlightTicks;\n }\n } else {\n this.remainingHighlightTicks = 40;\n }\n\n this.highlightingItemStack = itemstack;\n }\n\n }",
"private void render() {\n\t\tBufferStrategy bs = this.getBufferStrategy();\r\n\t\tif (bs == null) {\r\n\t\t\tcreateBufferStrategy(3);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//Initiates Graphics class using bufferStrategy\r\n\t\tGraphics g = bs.getDrawGraphics();\r\n\t\t\r\n\t\t//displays img on screen\r\n\t\tg.drawImage(img, 0, 0, null);\r\n\t\t\r\n\t\tg.setColor(Color.CYAN);\r\n\t\tg.drawString(fps + \" FPS\", 10, 10);\r\n\t\tg.setFont(new Font(\"Arial\", 0, 45));\r\n\r\n\t\tg.dispose();//clears graphics\r\n\t\tbs.show();//shows graphics\r\n\t}",
"public void render() {\n renderHud();\n }",
"public void onTick() {\n this.count = count + 1;\n if (this.count % 10 == 0) {\n this.waterHeight = waterHeight + 1;\n }\n floodCells();\n worldEnds();\n\n }",
"public void startRendering() {\n if (!justRendered) {\n justRendered = true;\n \n if (Flags.wireFrame) p.render_wireFrame();\n else p.render();\n }\n }",
"private void render() {\n final int numBuffers = 3;\n BufferStrategy bs = this.getBufferStrategy(); // starts value at null\n if (bs == null) {\n this.createBufferStrategy(numBuffers); // 3: buffer creations\n return;\n }\n Graphics g = bs.getDrawGraphics();\n\n g.setColor(Color.black); // stops flashing background\n g.fillRect(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);\n\n handler.render(g);\n\n if (gameStart == GAME_STATE.Game) {\n hud.render(g);\n } else if (gameStart == GAME_STATE.Menu || gameStart == GAME_STATE.Help || gameStart == GAME_STATE.GameOver || gameStart == GAME_STATE.GameVictory) {\n menu.render(g);\n }\n\n g.dispose();\n bs.show();\n }",
"public void render(float dt) {\n SystemManager.find(RenderAction.class).forEach(ra -> ((RenderAction) ra).render(dt));\n }",
"@Override\r\n public void render(float delta) {\n Gdx.gl.glClearColor(0, 0, 0, 1);\r\n Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\r\n\r\n // if the ball ain't moving serve it\r\n if (!ball.isInplay()){\r\n ball.serveRandom();\r\n playServe();\r\n }\r\n // Hey keyboard, did the player want to do anything?\r\n processInputs();\r\n // if the game isn't over, check the update the physics\r\n if (!isOver){ physics.update(); }\r\n\r\n // DRAWING\r\n // tell the batch to do camera magic\r\n batch.setProjectionMatrix(camera.combined);\r\n // Begin the process of rendering\r\n batch.begin();\r\n // Tell our printer to print\r\n printer.draw();\r\n // Cycle through the list the draw everything\r\n for (PongBody p : toDrawList) {\r\n p.draw();\r\n }\r\n // End, and actually draw everything to the screen\r\n batch.end();\r\n }",
"public void run()\r\n {\n long lastTime = System.nanoTime();\r\n long timer = System.currentTimeMillis();\r\n // create quotient\r\n final double ns = 1000000000.0 / 60.0;\r\n // difference between start time and current time\r\n double delta = 0;\r\n // counter for frames per second\r\n int frames = 0;\r\n // counter for updates per second\r\n int updates = 0;\r\n\r\n while (running)\r\n {\r\n long now = System.nanoTime();\r\n // add up the times of every loop run and get the value in seconds /\r\n // 60 (basically increase by 1/60th of a second every loop)\r\n delta += (now - lastTime) / ns;\r\n lastTime = now;\r\n // gets called 60 times per second because of delta calculation\r\n while (delta >= 1)\r\n {\r\n update();\r\n updates++;\r\n delta--;\r\n }\r\n\r\n view.render();\r\n frames++;\r\n\r\n // gets called every second\r\n if (System.currentTimeMillis() - timer > 1000)\r\n {\r\n // \"reset\" timer variable\r\n timer += 1000;\r\n System.out.println(updates + \" ups, \" + frames + \" fps\");\r\n view.setTitle(\"| \" + updates + \" ups, \" + frames + \" fps\" + \" |\");\r\n // reset frames and updates variables to start counting from 0\r\n // at the start of every second\r\n frames = 0;\r\n updates = 0;\r\n }\r\n }\r\n }",
"public void render(int gameSpeed){\n counterFrames++;\n if (counterFrames*gameSpeed*1000 >= (60 * (delay))){\n setDone();\n }\n }",
"@Override\n\tpublic void render() {\n\t\tgraphics.clearRect(0, 0, layerWidth, layerheight);\n\t\t\n\t\tfor(int i = 0, length = renderList.size(); i < length; i++) {\n\t\t\tSprite sprite = renderList.get(i);\n\t\t\trotateImage(sprite);\n\t\t\tgraphics.drawImage(sprite.getImage(), sprite.getX(), sprite.getY());\n\t\t}\n\t\t\n\t\ttimeDelay(3000);\n\t}",
"public void run() {\n\t\tlong lastTime = System.nanoTime();\n\t\tlong timer = System.currentTimeMillis();\n\t\tfinal double ns = 1000000000.0/60;\n\t\tdouble delta = 0;\n\t\tint frames = 0;\n\t\tint updates = 0;\n\t\trequestFocus();\n\t\twhile(running){\n\t\t\tlong now = System.nanoTime();\n\t\t\tdelta += (now-lastTime) /ns;\n\t\t\tlastTime = now;\n\t\t\twhile(delta >= 1){//60 times per sec\n\t\t\t\ttick();\n\t\t\t\tupdates++;\n\t\t\t\tdelta--;\n\t\t\t}\n\t\t\trender();//as fast as i can\n\t\t\tframes ++;\n\t\t\tif(System.currentTimeMillis() -timer > 1000){\n\t\t\t\ttimer += 1000;\n\t\t\t\tSystem.out.println(\"Fps:\"+frames+\" Updates:\"+updates);\n\t\t\t\tupdates = 0;\n\t\t\t\tframes = 0;\n\t\t\t\tthis.seconds++;\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"private void render()\n\t{\n\t\ttheta = (float) (velocity.heading() + Math.toRadians(90.0));\n\n\t\t// se baser sur le temps écoulé depuis le lancement\n\t\tf = parent.frameCount / 4;\n\t\tint fi = f + 1;\n\t\tfloat x = fi % DIM * W;\n\t\tfloat y = fi / DIM % DIM * H;\n\n\t\tparent.pushMatrix();\n\t\tparent.translate(location.x, location.y);\n\t\tparent.rotate(theta);\n\t\tparent.beginShape();\n\t\tparent.texture(spritesheet);\n\t\tparent.vertex(0, 0, x, y);\n\t\tparent.vertex(100, 0, x + W, y);\n\t\tparent.vertex(100, 100, x + W, y + H);\n\t\tparent.vertex(0, 100, x, y + H);\n\t\tparent.endShape();\n\t\tparent.popMatrix();\n\t}",
"private void render() {\n\n\tbs=display.getCanvas().getBufferStrategy();\t\n\t\n\tif(bs==null) \n\t {\t\n\t\tdisplay.getCanvas().createBufferStrategy(3);\n\t\treturn ;\n\t }\n\t\n\tg=bs.getDrawGraphics();\n\n\t//Clear Screen\n\tg.clearRect(0, 0, width, height);\n\t\n\tif(State.getState()!=null )\n\t\tState.getState().render(g);\n\t\n\t//End Drawing!\n\tbs.show();\n\tg.dispose();\n\t\n\t}",
"private void emitTicks() {\n if (gameModel == null || lastTickTime == 0) return; // the game is paused\n\n while (lastTickTime < System.currentTimeMillis()) {\n lastTickTime += 1000f / gameModel.ticksPerSecond();\n ;\n for (Entity go : gameModel.entities) go.tick();\n }\n }",
"public void render(){\n//\t\tsetCards();\n//\t\tsetMurderInfo();\n\t}",
"public void render();",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\twhile(true){\r\n\t\t\t\t\tdraw();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}",
"public void prerender() {\n }",
"public void prerender() {\n }",
"public void render(){\n\t\tBufferStrategy bs = frame.getBufferStrategy();\n\t\tif(bs == null){\n\t\t\tframe.createBufferStrategy(3);\n\t\t\treturn;\n\t\t}\n\t\trenderGraphics(bs);\n\t}",
"@Override\n public void prerender() {\n }",
"@Override\n\tpublic void render(float delta) {\n\t\t//Default render call delegate to GameStateManager\n\t\tgsm.render(sb, sr);\n\t}",
"private void render() {\n\t\ttheMap.draw(g);\n\t\ttheTrainer.draw(g);\n\t}",
"@Override\n public void render(float delta) {\n // Faire clignoter le texte\n if (frame_count == 0) {\n sign = 1;\n } else if (frame_count == 60) {\n sign = -1;\n }\n frame_count += sign;\n layout.setText(font, \"Appuyez sur une touche pour commencer !\", new Color(1f, 1f, 1f, frame_count / 60f), layout.width, 0, false);\n\n batch.begin();\n // J'affiche le background\n batch.draw(background, 0, 0, background_width, background_height);\n //batch.end();\n\n // J'affiche soit le texte d'accueil, soit les boutons\n if (!triggered) {\n // J'affiche le texte centré\n font.draw(batch, layout, background_width * 0.5f - layout.width * 0.5f, 100);\n batch.end();\n }\n else {\n batch.end();\n // J'affiche la table de boutons\n //stage.act(Math.min(Gdx.graphics.getDeltaTime(), 1 / 30f));\n stage.draw();\n\n }\n\n }"
] |
[
"0.83008415",
"0.7945685",
"0.79348207",
"0.744025",
"0.72597426",
"0.71707916",
"0.71469206",
"0.7119619",
"0.71147573",
"0.71115774",
"0.70843935",
"0.7081382",
"0.70740396",
"0.7037303",
"0.70242053",
"0.7000185",
"0.69678557",
"0.69578886",
"0.6951511",
"0.6944905",
"0.6944905",
"0.6936331",
"0.69335604",
"0.69270104",
"0.69163215",
"0.68912244",
"0.68665123",
"0.6847098",
"0.68351096",
"0.6817658",
"0.6810164",
"0.68083966",
"0.67917114",
"0.67872053",
"0.67867017",
"0.6785486",
"0.6781709",
"0.67719835",
"0.67719835",
"0.67633003",
"0.6724945",
"0.671581",
"0.6707881",
"0.6707881",
"0.6707881",
"0.6707881",
"0.6707881",
"0.6707881",
"0.6707881",
"0.66942936",
"0.6693839",
"0.66854",
"0.6682982",
"0.6677414",
"0.66770375",
"0.6674021",
"0.66611314",
"0.6658358",
"0.6649692",
"0.6646005",
"0.6637385",
"0.6625318",
"0.6623996",
"0.6619585",
"0.6619361",
"0.6619361",
"0.66156757",
"0.66140467",
"0.6600281",
"0.6598031",
"0.65929943",
"0.6587696",
"0.6578963",
"0.65660805",
"0.6563329",
"0.65574014",
"0.65403897",
"0.65371084",
"0.65345937",
"0.6533254",
"0.65313286",
"0.65274847",
"0.65116346",
"0.6508831",
"0.64937425",
"0.6487093",
"0.64800185",
"0.64631087",
"0.64624363",
"0.64590836",
"0.64521724",
"0.6431302",
"0.64281636",
"0.6422088",
"0.6422088",
"0.64169216",
"0.64064336",
"0.6402399",
"0.63972324",
"0.63910604"
] |
0.64138323
|
96
|
This constructor inits state, but does not start the thread.
|
public MapCalculator(ZanMinimap minimap) {
map = minimap.map;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public ImageThread() {\n\t}",
"public ThreadState(KThread thread) \n {\n this.thread = thread;\n setPriority(priorityDefault);\n }",
"private ThreadUtil() {\n \n }",
"protected void initialize() {\n \tthis.running= false;\n }",
"public InitialState() {\r\n\t\t}",
"protected TaskChain() {\n\t}",
"private SyncState() {}",
"public State(){}",
"public ThreadState(KThread thread) {\n this.thread = thread;\n this.time = 0;\n this.placement = 0;\n this.priority = priorityDefault;\n setPriority(priorityDefault);\n effectivePriority = priorityMinimum;\n }",
"public void init() {\n Thread run = new Thread(new Run());\n run.start();\n }",
"private ThreadUtil() {\n }",
"NetThread(){}",
"protected StealingThread(StealingPool pool) throws IOException {\n if (pool == null) throw new NullPointerException();\n this.pool = pool;\n this.ioManager = new NioManager();\n // Note: poolIndex is set by pool during construction\n // Remaining initialization is deferred to onStart\n }",
"public ThreadPool()\r\n {\r\n // 20 seconds of inactivity and a worker gives up\r\n suicideTime = 20000;\r\n // half a second for the oldest job in the queue before\r\n // spawning a worker to handle it\r\n spawnTime = 500;\r\n jobs = null;\r\n activeThreads = 0;\r\n askedToStop = false;\r\n }",
"protected Tool() {\n\n\t\t// A hacky way of automatically registering it AFTER the parent constructor, assuming all went okay\n\t\tnew Thread(() -> {\n\n\t\t\ttry {\n\t\t\t\tThread.sleep(3);\n\t\t\t} catch (final InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tfinal Tool instance = Tool.this;\n\n\t\t\tif (!isRegistered(instance))\n\t\t\t\tregister(instance);\n\t\t}).start();\n\t}",
"public AbstractConcurrentTestCase() {\n mainThread = Thread.currentThread();\n }",
"public MainThread()\n {\n super();\n setPriority(1);\n setId(0x55); \n }",
"public void initialize() {\n service = Executors.newCachedThreadPool();\n }",
"public MyRunnable(){\t\n\t}",
"public AlgorithmBase() {\r\n this.destImage = null;\r\n this.srcImage = null;\r\n destFlag = false;\r\n threadStopped = false;\r\n }",
"public ProducerThread() {\n }",
"public Task() {\n\t}",
"public ThreadLocal() {}",
"protected TaskFlow( ) { }",
"public Task() {\r\n }",
"protected void initialize() {\n \tm_cameraThread = new CameraThread();\n \tm_cameraThread.start();\n \tm_onTarget = false;\n \tm_moving = false;\n \tm_desiredYaw = Gyro.getYaw();\n \t\n \t\n \tcount = 0;\n }",
"private Supervisor() {\r\n\t}",
"public Worker(){\n\n }",
"@Override\n public synchronized void start() {\n init();\n }",
"public State(T state) {\r\n\t\tthis.state = state;\r\n\t}",
"protected PayerThread() {\n\t\t\tEvent.ASSERTION.issue(sets == null, \"builders is null\");\n\t\t\tEvent.ASSERTION.issue(workloadConfiguration == null, \"configuration is null\");\n\n\t\t\tsetDaemon(true);\n\t\t}",
"public LocalClient() {\n\t\tsuper(\"SERVER\", Arrays.asList(new String[] {\"*\"}), null, null);\n\t\tinputThread = new Thread(this);\n\t\tinputThread.start();\n\t}",
"public State()\n {\n this(\"\");\n }",
"public JanelaThread() {\n initComponents();\n }",
"public Job() {\r\n\t\tSystem.out.println(\"Constructor\");\r\n\t}",
"public BattleRunnable() {\n\t\tdebug.i(\"BattleRunnable constructor\");\n\t}",
"public TimedStateMachineFactoryImpl() {\n\t\tsuper();\n\t}",
"public void initialize() {\n\n\t\t// Initialize taskList\n\t\tthis.taskList = new LinkedList<Task>();\n\n\t\t// create a new thread for total size of pool\n\t\tfor (int i = 0; i < this.poolSize; ++i) {\n\t\t\tthreadPool.add(new WorkerThread(this));\n\t\t}\n\n\t\t// Start each thread in thread pool\n\t\tfor (WorkerThread t : threadPool) {\n\t\t\tnew Thread(t).start();\n\t\t}\n\n\t}",
"public Task() { }",
"public TicketBoothClient()\n {\n Thread myThread = new Thread(this);\n myThread.start();\n }",
"public ThreadState() {\n initComponents();\n thread1.setOpaque(true);\n thread2.setOpaque(true);\n thread3.setOpaque(true);\n thread4.setOpaque(true);\n thread5.setOpaque(true);\n thread6.setOpaque(true);\n thread7.setOpaque(true);\n Thread8.setOpaque(true);\n thread9.setOpaque(true);\n thread10.setOpaque(true);\n\n }",
"public Job() {\n\t\t\t\n\t\t}",
"protected void onStart() {\n // Allocate while starting to improve chances of thread-local\n // isolation\n queue = new Runnable[INITIAL_QUEUE_CAPACITY];\n // Initial value of seed need not be especially random but\n // should differ across threads and must be nonzero\n int p = poolIndex + 1;\n seed = p + (p << 8) + (p << 16) + (p << 24); // spread bits\n }",
"public TestInvoker()\n {\n super(new TestClient(), new ThreadPoolExecutorImpl(3));\n }",
"public Core(Runnable initialize){\n\t\tthis(initialize, () -> {});\n\t}",
"private UniqueElementSingleThreadWorker()\n {\n _state = ActivityState.INITIALIZING;\n _taskQueue = new UniqueTagQueue<String, Runnable>();\n \n _taskThread = new Thread(\"UniqueElementSingleThreadWorker-\" + COUNTER.incrementAndGet())\n {\n @Override\n public void run()\n {\n while(true)\n {\n try\n {\n Runnable task = _taskQueue.blockingPop();\n if(task == SHUTDOWN_TASK)\n {\n break;\n }\n task.run();\n }\n catch(InterruptedException ex) { }\n //Catch run time exceptions that the runnable might throw so that the thread does not die\n catch(RuntimeException ex)\n {\n ErrorReporter.reportUncaughtException(ex);\n }\n }\n \n _state = ActivityState.SHUT_DOWN;\n }\n };\n }",
"@Override\n protected void initialize() {\n isStarted = false;\n setTimeout(12);\n isDone = false;\n // Start the climb\n Robot.climber.frontDown();\n Robot.climber.rearDown();\n\n }",
"public Task() {\n }",
"public Task(){}",
"public Context() {\n\t\tstates = new ObjectStack<>();\n\t}",
"private Instantiation(){}",
"public Job() {\n }",
"public Job() {\n }",
"public static void initialize()\n {\n // Initiate election\n Runnable sender = new BullyAlgorithm(\"Sender\",\"election\");\n new Thread(sender).start();\n }",
"public void start() {\n\t\tif(t == null) {\n\t\t\tt = new Thread(this);\n\t\t\tt.start();\n\t\t}\n\t}",
"public LateDeliverableProcessorImpl() {\r\n // Empty\r\n }",
"protected void initialize() {\r\n\t\tsubscribeBroadcast(TerminateBroadcast.class, terminate->{\r\n\t\t\tfTimer.cancel();\r\n\t\t\tthis.terminate();\r\n\t\t});\r\n\t\ttry {\r\n\t\t\tfCount.await();\r\n\t\t} catch (InterruptedException e) {\r\n\t\t}\r\n\t\tfTimer.schedule(new TimerTask(){\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tif(fTick < fDuration){\r\n\t\t\t\t\tfTick++;\r\n\t\t\t\t\tSystem.out.println(\"++++++++++++++++++++++++++++++++++ \"+\"Tick \"+fTick +\" ++++++++++++++++++++++++++++++++++++++\");\r\n\t\t\t\t\tsendBroadcast((Broadcast) new TickBroadcast(fTick));\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tsendBroadcast((Broadcast) new TerminateBroadcast());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}, 0, fSpeed);\r\n\t}",
"@Override\n\tpublic void initialize() {\n\t\tthis.begin = System.currentTimeMillis();\n\t\taccumulatorController.setState(AccumulatorState.EJECTING);\n\t}",
"@Override\n\tpublic synchronized void init() {\n\t}",
"public CurrentRobotState() {\r\n currentPos = new RobotCoordinates();\r\n motorState = new Motor();\r\n reInitialize();\r\n }",
"@Override\n public void onStart() {\n this.dataGenerator = new DataGenerator(this.dataSize, this.dataValues, this.dataValuesBalancing);\n this.dataStream = new DataStream();\n if (this.flowRate != 0)\n this.sleepTime = dataStream.convertToInterval(this.flowRate);\n this.count = 0L;\n// this.me = this.me + \"_\" + getRuntimeContext().getIndexOfThisSubtask();\n new Thread(this::receive).start();\n }",
"public TransactionStateUpdater() {\n super();\n }",
"protected void initialize() {\n setTimeout(duration);\n }",
"private RequestExecution() {}",
"public Task(){\n super();\n }",
"private Client() {\n solution_set = new HashSet<>();\n contentsMap = new HashMap<>();\n current_state = new HashSet<>();\n next_state = new HashSet<>();\n }",
"public Lock() {\r\n }",
"@Override\n public void init() {\n tol = new TeleOpLibrary();\n tol.init(this);\n telemetry.addLine(\"Initializing complete.\");\n telemetry.update();\n }",
"public Server(){\n this.tasks = new LinkedBlockingQueue<Task>();\n this.waitingPeriod = new AtomicInteger();\n }",
"public final void initialize() {\n initialize(0);\n }",
"private TransferDispatcher() {\n taskList=new Vector();\n }",
"LockManager() {\n }",
"private void initShooter() {\n m_task = new ShooterThread(this);\n m_task.start();\n }",
"public State () {\n\t\tthis.stateId = generateStateId();\n\t}",
"synchronized public void startWithoutWaiting() throws IOException,\n InterruptedException {\n createInstanceFromConfig(false);\n }",
"protected void initialize() {\n \t\n \tstart_time = System.currentTimeMillis();\n \t\n \tgoal = start_time + duration;\n }",
"protected Step() {\n this(null);\n }",
"PooledThread()\n {\n setDaemon(true);\n\n start();\n }",
"private JobScheduler() {\n // empty\n }",
"protected void initialize() {\n this.setTimeout(timeoutTime);\n }",
"public WorkerMonitor() {\n }",
"public Core(Runnable initialize, Runnable exit){\n\t\tstate = CoreState.INITIALIZE;//begin in initialization\n\t\tthis.initialize = initialize;\n\t\tthis.exit = exit;\n\t\tthis.updates = new ArrayList<>();\n\t}",
"private Timer() {\n myThread = new TimerThread();\n myThread.start();\n }",
"public NewsFilter()\n {\n this.queue = new LinkedBlockingQueue<>();\n this.uiContents = new HashMap<>();\n this.retrieved = new HashMap<>();\n this.running = new LinkedList<>();\n this.cancelled = false;\n\n // Start the filter task\n filter = new Thread( ()-> filter() ); \n filter.start();\n theLogger.info(\"NewsFilter Constructed and filter started\");\n }",
"public StateMaintainer( final StateCaretaker caretaker, final ThreadFactory threadFactory) {\n _caretaker = caretaker;\n _scheduler = Executors.newSingleThreadScheduledExecutor( threadFactory);\n }",
"public EventQueue(){}",
"public State() {\r\n this.root = Directory.createRoot();\r\n this.setExit(false);\r\n this.directoryStack = new Stack<>();\r\n this.returnObject = new ReturnObject();\r\n workingDirectory = this.root;\r\n\r\n // Create a new ArrayList for the command history\r\n commandHistory = new ArrayList<>();\r\n }",
"public Timer()\r\n\t{\r\n\t\tcurrentstate = TIMER_STOP;\r\n\t}",
"DeltaWorker() {\n this.shouldStop = new AtomicBoolean(false);\n }",
"private FlowExecutorUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }",
"public TaskCurrent() {\n\t}",
"private FanState() {\n\t\tinstance = this;\n\t}",
"public Node(Status state, int x, int y){\n this.x=x;\n this.y=y;\n pathsToBaseStation = new LinkedList<>();\n this.neighbors=new LinkedList<>();\n this.liveNeighbors = new LinkedList<>();\n this.state = state;\n queue = new LinkedBlockingQueue<LinkedList<Object>>();\n Thread thread = new Thread(this);\n thread.start();\n }",
"public static synchronized void constructInstance()\n {\n SmartDashboard.putBoolean( TelemetryNames.Elbow.status, false );\n\n if ( ourInstance != null )\n {\n throw new IllegalStateException( myName + \" Already Constructed\" );\n }\n ourInstance = new ElbowSubsystem();\n\n SmartDashboard.putBoolean( TelemetryNames.Elbow.status, true );\n }",
"private Scheduler() {\n\t\tlisteners = new ArrayList<SchedulerListener>();\n\t\tt = new Timer();\n\t\tparseEventList();\n\t}",
"public Agent(StateObservation so, ElapsedCpuTimer elapsedTimer)\n {\n actions = new ArrayList<> ();\n states = new ArrayList<> ();\n success = false;\n step = 0;\n }",
"protected AbstractEvent(long t, EventEngine eng) {\n // this sets the public final variables: time and engine\n time = t;\n engine = eng;\n parameters = null;\n }",
"private StateUtils() {}",
"private StreamFactory()\n {\n /*\n * nothing to do\n */\n }",
"public void start() {\n // EFFECTS: starts a new thread from this instance.\n (new Thread(instance)).start();\n }",
"public baseRunnableCondition() {\r\n }"
] |
[
"0.67689914",
"0.66909444",
"0.6646242",
"0.6613907",
"0.6555319",
"0.65507466",
"0.65195143",
"0.6518641",
"0.65180165",
"0.6509808",
"0.6488413",
"0.6487231",
"0.6472074",
"0.6363015",
"0.6266172",
"0.6235961",
"0.6224247",
"0.61586463",
"0.6145384",
"0.6134115",
"0.6128109",
"0.61269695",
"0.6123997",
"0.61120135",
"0.6109107",
"0.6093983",
"0.6087123",
"0.60853034",
"0.60790116",
"0.60704046",
"0.6059486",
"0.60571337",
"0.6042677",
"0.604105",
"0.6034359",
"0.60317004",
"0.6025624",
"0.60016465",
"0.6000847",
"0.59734505",
"0.59708875",
"0.59706557",
"0.5968944",
"0.5965975",
"0.595924",
"0.595181",
"0.59509796",
"0.5943957",
"0.5916973",
"0.59148073",
"0.5913308",
"0.5912214",
"0.5912214",
"0.5901543",
"0.5892496",
"0.58817214",
"0.58808774",
"0.5873981",
"0.58728963",
"0.58616924",
"0.5857553",
"0.58552754",
"0.5853091",
"0.58442146",
"0.5843964",
"0.5838584",
"0.5834468",
"0.58305246",
"0.582947",
"0.5829138",
"0.582801",
"0.5825907",
"0.58222395",
"0.5816225",
"0.5815377",
"0.58117986",
"0.58094877",
"0.5805356",
"0.5804757",
"0.57991034",
"0.57970434",
"0.579661",
"0.5793399",
"0.5792409",
"0.5787023",
"0.578514",
"0.57842565",
"0.5784185",
"0.57813454",
"0.5778859",
"0.5771921",
"0.57691133",
"0.5766705",
"0.57643235",
"0.5760207",
"0.5756133",
"0.5755752",
"0.5754208",
"0.57505906",
"0.5749539",
"0.5744206"
] |
0.0
|
-1
|
Start up the other thread. The thread may return early at this point, as there might not be a Minecraft instance available yet. if that occurs, the thread will be restarted by the keepalive in onRenderTick().
|
public void start() {
zCalc.start();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void start() {\n // EFFECTS: starts a new thread from this instance.\n (new Thread(instance)).start();\n }",
"void onRenderTick() {\n \t\tif (zCalc == null || !zCalc.isAlive()) {\n \t\t\tzCalc = new Thread(this);\n \t\t\tzCalc.start();\n \t\t}\n \t\tif (Minecraft.theMinecraft != null && Minecraft.theMinecraft.theWorld != null) {\n \t\t\tif (!Minecraft.theMinecraft.theWorld.isRemote){\n \t\t\t\ttryARender();\n \t\t\t}\n \n \t\t}\n \t}",
"private void startThread()\n {\n if (workerThread == null || !workerThread.isLooping())\n {\n workerThread = new LiveViewThread(this);\n workerThread.start();\n }\n }",
"public synchronized void start() {\n\t\tif (running) {\n\t\t\treturn;\n\t\t}\n\t\trunning = true; // thread\n\t\tthread = new Thread(this);\n\t\tthread.start(); // calls run method, where majority of game code wil go\n\t}",
"public synchronized void start() {\n\t\tif(isRunning) return; //If the game is already running, exit method\n\t\tisRunning = true; //Set boolean to true to show that it is running\n\t\tthread = new Thread(this); //Create a new thread\n\t\tthread.start(); //Start the thread\n\t}",
"public void start() {\n\t\t//We are asked to stop (already), so we \n\t\tif (stop) {\n\t\t\t//Wait until we have stopped\n\t\t\ttry {\n\t\t\t\tstopAndWait();\n\t\t\t} catch (InterruptedException ex) {\n\t\t\t\t//Log interruptions, but don't do anything with them.\n\t\t\t\tLog.getLogger().log(LogLevel.ERROR,\n\t\t\t\t\t\t\"[GameThread] Error while trying to start GameThread: interrupted while waiting for game \"\n\t\t\t\t\t\t+ \"thread to stop.\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Reset, so that we can start again.\n\t\treset();\n\t\t\n\t\t//Set that we are starting\n\t\tstateProperty.set(GameState.STARTING);\n\t\t\n\t\t//Create a new thread and start it.\n\t\tthread = new Thread(this);\n\t\tthread.start();\n\t}",
"private static void start()\r\n\t{\r\n\t\tif(isRunning)\r\n\t\t\treturn;\r\n\t\t\r\n\t\tisRunning = true;\r\n\t\t\r\n\t\tdisplay = new Display();\r\n\t\trun();\r\n\t}",
"@Override\n public void start() {\n // only start once, this is not foolproof as the active flag is set only\n // when the watchdog loop is entered\n if ( isActive() ) {\n return;\n }\n\n Log.info( \"Running server with \" + server.getMappings().size() + \" mappings\" );\n try {\n server.start( HTTPD.SOCKET_READ_TIMEOUT, false );\n } catch ( IOException ioe ) {\n Log.append( HTTPD.EVENT, \"ERROR: Could not start server on port '\" + server.getPort() + \"' - \" + ioe.getMessage() );\n System.err.println( \"Couldn't start server:\\n\" + ioe );\n System.exit( 1 );\n }\n\n if ( redirectServer != null ) {\n try {\n redirectServer.start( HTTPD.SOCKET_READ_TIMEOUT, false );\n } catch ( IOException ioe ) {\n Log.append( HTTPD.EVENT, \"ERROR: Could not start redirection server on port '\" + redirectServer.getPort() + \"' - \" + ioe.getMessage() );\n System.err.println( \"Couldn't start redirection server:\\n\" + ioe );\n }\n }\n\n // Save the name of the thread that is running this class\n final String oldName = Thread.currentThread().getName();\n\n // Rename this thread to the name of this class\n Thread.currentThread().setName( NAME );\n\n // very important to get park(millis) to operate\n current_thread = Thread.currentThread();\n\n // Parse through the configuration and initialize all the components\n initComponents();\n\n // if we have no components defined, install a wedge to keep the server open\n if ( components.size() == 0 ) {\n Wedge wedge = new Wedge();\n wedge.setLoader( this );\n components.put( wedge, getConfig() );\n activate( wedge, getConfig() );\n }\n\n Log.info( LogMsg.createMsg( MSG, \"Loader.components_initialized\" ) );\n\n final StringBuffer b = new StringBuffer( NAME );\n b.append( \" v\" );\n b.append( VERSION.toString() );\n b.append( \" initialized - Loader:\" );\n b.append( Loader.API_NAME );\n b.append( \" v\" );\n b.append( Loader.API_VERSION );\n b.append( \" - Runtime: \" );\n b.append( System.getProperty( \"java.version\" ) );\n b.append( \" (\" );\n b.append( System.getProperty( \"java.vendor\" ) );\n b.append( \")\" );\n b.append( \" - Platform: \" );\n b.append( System.getProperty( \"os.arch\" ) );\n b.append( \" OS: \" );\n b.append( System.getProperty( \"os.name\" ) );\n b.append( \" (\" );\n b.append( System.getProperty( \"os.version\" ) );\n b.append( \")\" );\n Log.info( b );\n\n // enter a loop performing watchdog and maintenance functions\n watchdog();\n\n // The watchdog loop has exited, so we are done processing\n terminateComponents();\n\n Log.info( LogMsg.createMsg( MSG, \"Loader.terminated\" ) );\n\n // Rename the thread back to what it was called before we were being run\n Thread.currentThread().setName( oldName );\n\n }",
"public synchronized void start() {\n\t\tif(! alive) {\n\t\t\talive = true;\n\t\t\tthread.start();\n\t\t}\n\t}",
"public void run() {\n \t\twhile (true) {\n \t\t\ttry {\n \t\t\t\tif (Minecraft.theMinecraft != null && Minecraft.theMinecraft.theWorld != null) {\n \t\t\t\t\t//can not multithread in SP\n \t\t\t\t\tif (!Minecraft.theMinecraft.theWorld.isRemote){\n \t\t\t\t\t\tThread.sleep(1000);\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\ttryARender();\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tThread.sleep(100);\n \t\t\t} catch (Exception e) {\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\t}\n \t}",
"public void start(){\r\n\t\tnew Thread(\r\n\t new Runnable() {\r\n\t public void run() {\r\n\t \twhile(true){\r\n\t \t\t try {\r\n\t \t Thread.sleep(200);\r\n\t \t } catch (Exception e) {\r\n\t \t e.printStackTrace();\r\n\t \t }\r\n\t \t // Functions.DEBUG(\r\n\t \t // \"child thread \" + new Date(System.currentTimeMillis()));\r\n\t \t repaint();\r\n\t \t}\r\n\t }\r\n\t }).start();\r\n\t}",
"public void start() {\n this.leftover = 0L;\n this.lastTick = System.nanoTime();\n if (stopped.getAndSet(false)) {\n startThread();\n }\n }",
"public void startAndWait() throws InterruptedException {\n\t\t//Start the game thread\n\t\tstart();\n\t\t\n\t\t//Store reset counter for thread safety.\n\t\tint curReset = resetCounter;\n\t\t\n\t\t//Wait for the game thread to start.\n\t\twhile (!isRunning() && curReset == resetCounter) {\n\t\t\tThread.sleep(25L);\n\t\t}\n\t}",
"public void start() {\n if (!started) {\n thread = new Thread(this);\n thread.start();\n started = true;\n }\n }",
"public void startGame() {\n\t\t//Start the rendering first\n\t\tgetRenderer().startRendering();\n\t\t\n\t\t//Start the game thread after that.\n\t\tgetGameThread().start();\n\t}",
"public void start()\r\n {\r\n if (_keepGoing) return;\r\n\r\n _keepGoing = true;\r\n\r\n Thread thread = new Thread(this);\r\n thread.start();\r\n }",
"public void startThread() {\n\t\tif (this.serverConnectorUsed <= Byte.MAX_VALUE) {\n\t\t\tthis.serverConnectorUsed++;\n\t\t\tLOG.info(\"Running new thread. Now pool is \"+Integer.toString(MAX_THREADS-this.serverConnectorUsed)+\" / \"+Integer.toString(MAX_THREADS));\n\t\t}\n\t}",
"private void startGame() {\r\n\t\tthis.lobbyTimerActive = false;\r\n\t\tthis.gameStarted = true;\r\n\t\tthis.queueMessage(\"% START\");\r\n\t\tthis.dealer = new Dealer(this, this.players);\r\n\r\n\t\t// Start the dealer thread\r\n\t\tThread dealerThread = new Thread(dealer);\r\n\t\tdealerThread.start();\r\n\t}",
"public synchronized void start() {\n if (!running) {\n running = true;\n thread = new Thread(this);\n thread.start();\n }\n }",
"public synchronized void start() {\n if (!running) {\n running = true;\n thread = new Thread(this);\n thread.start();\n }\n }",
"public synchronized void start() {\n\t\trunning=true;\n\t\tnew Thread(this).start();\n\t\t\n\t\tif(JOptionPane.showConfirmDialog(this, \"Do you want to run the server\")==0){\n\t\t\tsocketServer = new GameServer(this);\n\t\t\tsocketServer.start();\n\t\t\t\n\t\t}\n\t\tsocketClient=new GameClient(this, \"localhost\");\n\t\tsocketClient.start();\n\t}",
"@Override\n public void startThread() {\n Log.d(TAG, \"Starting \" + getName() + \" thread!\");\n if (!started)\n start();\n running = enabled;\n doStartAction();\n }",
"public synchronized void start() {\n\t\tif (running)\n\t\t\treturn;\n\t\tthread = new Thread(this);\n\t\tthread.start();\n\t\trunning = true;\n\t}",
"public void start() {\n\t\tmyThread = new Thread(this); myThread.start();\n\t}",
"public void start(){\n runServerGUI();\n // new server thread object created\n ServerThread m_Server = new ServerThread(this);\n m_Server.start();\n }",
"public synchronized void start() {\r\n\t\tthread = new Thread(this);\r\n\t\tthread.start();\r\n\t\tisRunning = true;\r\n\t }",
"public synchronized void start() {\n if (!this.isRunning) {\n isRunning = true;\n thread = new Thread(this);\n thread.start();\n }\n }",
"public synchronized void start(){\n\t\tthis.running = true;\n\t\tthis.thread = new Thread(this,\"Game\");\n\t\tthread.start();\n\n\t}",
"@Override\r\n protected void start() throws StartException {\n\r\n if (!Main.INIT_COMPLETE.isReached()) startServer();\r\n new EDTRunner() {\r\n\r\n @Override\r\n protected void runInEDT() {\r\n initGUI();\r\n }\r\n };\r\n\r\n }",
"public void start() {\r\n\t\tString osName = System.getProperty(\"os.name\");\r\n\t\tif (osName.contains(\"Mac\")) {\r\n\t\t\tgameThread.run();\r\n\t\t} else {\r\n\t\t\tgameThread.start();\r\n\t\t}\r\n\t}",
"@Override\n public void surfaceCreated(SurfaceHolder holder) {\n thread = new MainThread(getHolder(), this);\n\n Constants.INIT_TIME = System.currentTimeMillis();\n\n // Makes game loop start running\n thread.setRunning(true);\n thread.start();\n }",
"public void start() {\n\t\tSystem.out.println(\"Starting new application\");\n\t\texec.init(this);\n\t\tthread = new Thread(this);\n\t\trunning = true;\n\t\tgd.setFullScreenWindow(screen.getFrame());\n\t\tscreen.getFrame().setVisible(true);\n\t\tthread.start();\n\t}",
"public void start() {\n\n\t\tisRunning = true;\n\t\tthread = new Thread(this);\n\t\tthread.start();\n\n\t}",
"private void initShooter() {\n m_task = new ShooterThread(this);\n m_task.start();\n }",
"public static void spielstart() {\n\n\t\tThread thread = new Thread() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tgameboard = new GameFrame();\n\n\t\t\t}\n\t\t};\n\n\t\tthread.start();\n\n\t}",
"private void start() {\r\n\t\tif (running)\r\n\t\t\treturn;\r\n\t\trunning = true;\r\n\t\tthread = new Thread(this);//creates threat to run program on\r\n\t\tthread.start();\r\n\t}",
"public void start() {\n thread = new Thread(this);\n thread.setPriority(Thread.MIN_PRIORITY);\n thread.start();\n }",
"public void init() {\n\t\tThread appThread = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tSwingUtilities.invokeAndWait(doHelloWorld);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Finished on \" + Thread.currentThread());\n\t\t\t}\n\t\t};\n\t\tappThread.start();\n\t}",
"public void startThread() {\n\t\tpm = (PowerManager) getSystemService(Context.POWER_SERVICE);\n\t\twl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, \"My Tag\");\n\t\twl.acquire();\n\t\tthread = new FrameworkThread((Context) this);\n\t\tthread.start();\n\t}",
"public synchronized void startup() {\n\n if (mThread == null) {\n mThread = new CounterThread();\n new Thread(mThread).start();\n }\n Log.d(TAG, \"startup\");\n }",
"public void Start() \r\n {\r\n // Set the canvas as the current phone's screen\r\n mDisplay.setCurrent(this);\r\n\r\n // we call our own initialize function to setup all game objects\r\n GameInitialize();\r\n\r\n // Here we setup the thread and start it\r\n Thread thread = new Thread(this);\r\n thread.start();\r\n }",
"public void startGameAndWait() throws InterruptedException {\n\t\tgetRenderer().startRendering();\n\t\t\n\t\tgetGameThread().startAndWait();\n\t}",
"private void start() {\n \t\tisFinished = false;\n \t\trunning = true;\n \t\tpluginHandler.startAll();\n \t\tThread engine = new Thread(this, \"engine\");\n \t\tengine.start();\n \t\tissueHandler.checkAllIssues();\n \t}",
"public Thread startAndRun() {\r\n\t\tThread gameThread = new Thread(this, \"Coffee Bean Game Thread\");\r\n\t\tgameThread.start();\r\n\r\n\t\treturn gameThread;\r\n\t}",
"public synchronized void startUp() {\n if (coordinatingThread == null) {\n\n // force a change event to tell the controller to load handlerConfig\n configChangedQueue.offer(\"Loading RADIUS Config...\");\n\n Thread t = new Thread(this);\n t.setName(MessageFormat.format(Constants.COORDINATION_THREAD_NAME, this.getClass().getSimpleName()));\n t.setDaemon(true);\n t.start();\n coordinatingThread = t;\n } else {\n cLog.log(Level.WARNING, this.getClass().getSimpleName() + \".setServletConfig() called again. Service \"\n + \"already started. Ignoring.\");\n }\n }",
"@Override\n public synchronized void start() {\n init();\n }",
"private void start(){\n isRunning = true;\n thread = new Thread(this);\n thread.start();\n }",
"public void start() {\n\n\t\tif (worker.isAlive()) {\n\t\t\tthrow new IllegalStateException(\n\t\t\t \"Worker thread is still alive, unexpected.\");\n\t\t}\n\n\t\tif (runflag.get()) {\n\t\t\tthrow new IllegalStateException(\n\t\t\t \"Runflag is inconsistant with thread, unexpected.\");\n\t\t}\n\n\t\trunflag.set(true);\n\t\tworker.start();\n\t}",
"@Override\n public synchronized void start()\n {\n if (run)\n return;\n run = true;\n super.start();\n }",
"public void Start() {\r\n\t\tthread.run();\r\n\t}",
"public void start()\n\t{\n\t\tthread = new Thread(this);\n\t\tthread.start();\n\t}",
"public void start() {\r\n running = true;\r\n new Thread(this).start();;\r\n }",
"public void start() {\n\t\t// initialize stuff\n\t\tinitGL();\n\t\tinit();\n\t\t\n\t\t// main game loop\n\t\twhile (true) {\n\t\t\t// display the title screen\n\t\t\tshowTitleScreen();\n\t\t\t\n\t\t\twhile (!gameOver) {\n\t\t\t\tupdateDelta();\n\t\t\t\trender();\n\t\t\t\tpollInput();\n\t\t\t\tupdate();\n\t\t\t\tupdateDisplay();\n\t\t\t}\n\t\t\t// Game Over\n\t\t\ttry {\n\t\t\t\tThread.sleep(2500);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public void start() {\r\n\t\tisRunning = true;\r\n\t\tnew Thread(this).start();\r\n\t}",
"public synchronized void start() throws Exception {\n if (_runningThread != null) {\n throw new Exception(\"Node already running!\");\n }\n _runningThread = new Thread(this);\n _runningThread.start();\n }",
"public void start() {\r\n isRunning = true;\r\n Thread thread = new myThread();\r\n thread.start();\r\n }",
"public void start() {\n\t\tif(t == null) {\n\t\t\tt = new Thread(this);\n\t\t\tt.start();\n\t\t}\n\t}",
"public void start() {\n\n\t\tif (!started.compareAndSet(false, true)) {\n\t\t\treturn;\n\t\t}\n\n\t\tLOG.debug(\"Starting panel rendering and trying to open attached webcam\");\n\n\t\tstarting = true;\n\n\t\tif (updater == null) {\n\t\t\tupdater = new ImageUpdater();\n\t\t}\n\n\t\tupdater.start();\n\n\t\ttry {\n\t\t\terrored = !webcam.open();\n\t\t} catch (WebcamException e) {\n\n\t\t\terrored = true;\n\n\t\t\tDisplay.getDefault().syncExec(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tredraw();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\tstarting = false;\n\t\t}\n\t}",
"private void startBackgroundThread() {\n backgroundHandlerThread = new HandlerThread(\"Camera2\");\n backgroundHandlerThread.start();\n backgroundHandler = new Handler(backgroundHandlerThread.getLooper());\n }",
"@Override\r\n public synchronized void start() throws Exception {\r\n if (isStopped()) {\r\n startClients();\r\n startServers();\r\n startHelper();\r\n super.start();\r\n }\r\n }",
"public void init()\n\t{\n\t\tplanet = new Planet(750,600);\n\t\tship = new Ship(20.0,750,600,planet);\n\t\tmakeGUI();\n\n\t\tdisplayRefresher = new Thread(gamePanel);\n\t\tmotionThread = new Thread(ship);\n\t\tlabelRefresher = new Thread(buttonPanel);\n\t\ttimer = new Timer();\n\t\ttimerThread = new Thread(timer);\n\n\t\tdisplayRefresher.start();\n\t\tmotionThread.start();\n\t\tlabelRefresher.start();\n\t\ttimerThread.start();\n\t}",
"public void startThread(){\n\t\trunning = true;\n\t\tthread = new Thread(this);\n\t\tthread.start();\n\t}",
"public void start() {\n if (runner == null) {\n runner = new Thread(this, \"Runner\");\n runner.start();\n }\n }",
"synchronized void systemStartThreads() throws Exception {\n myHiddenPause = false;\n if (!myGamePause) {\n startThreads();\n }\n }",
"public static void start(){\n new Light(new Vector3f(getSIZE()*Chunk.getCHUNKSIZE()/2,getSIZE()*Chunk.getCHUNKSIZE()/2,getSIZE()*Chunk.getCHUNKSIZE()/2));\n Keyboard.enableRepeatEvents(true);\n createWindow();\n initGL();\n generateWorld();\n Game.gameLoop();\n }",
"public void start() {\r\n\t\trunning = true;\r\n\t\tt = new Thread(this);\r\n\t\tt.start();\r\n\t}",
"public void startBackgroundThread() {\n this.backgroundThread = new HandlerThread(\"DepthDecoderThread\");\n this.backgroundThread.start();\n this.backgroundHandler = new Handler(backgroundThread.getLooper());\n }",
"private void startThreads() throws Exception {\n if (myGameThread == null) {\n myGameThread = new GameThread(myCanvas);\n myGameThread.start();\n } else {\n myGameThread.resumeGame();\n }\n if (myTumbleweedThread == null) {\n myTumbleweedThread = new TumbleweedThread(myCanvas);\n myTumbleweedThread.start();\n } else {\n myTumbleweedThread.resumeGame();\n }\n if (myMusicMaker == null) {\n myMusicMaker = new ToneControlMusicMaker();\n //myMusicMaker = new MusicMaker();\n myMusicMaker.start();\n } else {\n myMusicMaker.resumeGame();\n }\n }",
"protected void start() {\n if (!this.init || this.started) {\n \tthrow new RuntimeException(\"start() should not be called by hand: to create a new component, use newComponent().\");\n }\n }",
"protected void start() {\n if (!this.init || this.started) {\n \tthrow new RuntimeException(\"start() should not be called by hand: to create a new component, use newComponent().\");\n }\n }",
"protected void start() {\n if (!this.init || this.started) {\n \tthrow new RuntimeException(\"start() should not be called by hand: to create a new component, use newComponent().\");\n }\n }",
"@Override\n public void run() {\n startup();\n }",
"void start() {\n this.wsThread.start();\n this.wrThread.start();\n }",
"@Override\n\tpublic void run() {\n\t\twhile (true) {\n\t\t\t// program loop\n\t\t\trender();\n\t\t\tif (tim.shouldCallHome()) {\n\t\t\t\t// check in with server and reset the timer so that it doesn't\n\t\t\t\t// check in until we need to\n\t\t\t\tnew Thread(Main.checkinRunnable).start();\n\t\t\t\ttim.resetCallHome();\n\t\t\t}\n\t\t\t// System.out.println(tim.getTime());\n\t\t}\n\n\t}",
"@Override\r\n\tpublic void start() {\n\t\tscavenger.start();\r\n\t\tnew Thread() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\twhile (!serverSocket.isClosed()) {\r\n\t\t\t\t\tSocket socket = null;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tsocket = serverSocket.accept();\r\n\t\t\t\t\t\tscavenger.addSocket(socket);\r\n\t\t\t\t\t\tnew SynchronousSocketThread(socket).start();\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.start();\r\n\t}",
"public void start() {\n\t\tcanvas.createBufferStrategy(2);\n\t\tbuffer = canvas.getBufferStrategy();\n\t\tthread = new Thread(this);\n\t\tthread.start();\n\t}",
"void startAIGame() {\n int status = gameServer.restartServer( true, settingsMenu.getMapSize(),\n settingsMenu.getPlayFor(), settingsMenu.getFirstMove(),\n settingsMenu.getServerName() );\n if( status != 0 ) {\n JOptionPane.showMessageDialog( frame, Language.ERROR_STARTUP,\n Language.CAPTION_ERROR, JOptionPane.PLAIN_MESSAGE );\n } else {\n host = \"127.0.0.1\";\n role = \"admin\";\n password = gameServer.getServerPassword();\n ( new Thread( this ) ).start();\n }\n }",
"public void start() {\n // set player number\n playerNumber = clientTUI.getInt(\"set player number (2-4):\");\n while (true) {\n try {\n game = new Game();\n game.setPlayerNumber(playerNumber - 1);\n host = this.clientTUI.getString(\"server IP address:\");\n port = this.clientTUI.getInt(\"server port number:\");\n clientName = this.clientTUI.getString(\"your name:\");\n player = clientTUI.getBoolean(\"are you human (or AI): (true/false)\") ?\n new HumanPlayer(clientName) : new ComputerPlayer(clientName);\n game.join(player);\n // initialize the game\n game.init();\n while (clientName.indexOf(' ') >= 0) {\n clientName = this.clientTUI.getString(\"re-input your name without space:\");\n }\n this.createConnection();\n this.sendJoin(clientName);\n this.handleJoin();\n if (handshake) {\n run();\n } else {\n if (!this.clientTUI.getBoolean(\"Do you want to open a new connection?\")) {\n shutdown();\n break;\n }\n }\n } catch (ServerUnavailableException e) {\n clientTUI.showMessage(\"A ServerUnavailableException error occurred: \" + e.getMessage());\n if (!clientTUI.getBoolean(\"Do you want to open a new connection?\")) {\n shutdown();\n break;\n }\n }\n }\n clientTUI.showMessage(\"Exiting...\");\n }",
"public void start(){\n isRunning = true;\n\n // This is where the magic happens\n Thread loop = new Thread(){\n\t\t\tpublic void run(){\n\t\t final double targetHertz = 30; // target updates per second\n\t\t final double updateTime = 1e9 / targetHertz; // target time between updates\n\t\t final int maxUpdates = 5; // max updates before a render is forced\n\t\t \n\t\t final double targetFps = 60; // target frames per second (fps)\n\t\t final double renderTime = 1e9 / targetFps; // target time between renders\n\t\t \n\t\t double lastUpdate = System.nanoTime();\n\t\t double lastRender = System.nanoTime();\n\n\t\t while (isRunning){\n\t\t \tdouble now = System.nanoTime();\n\t\t \t\n\t\t \tint updates = 0;\n\t\t \twhile (now - lastUpdate > updateTime && updates < maxUpdates){ // Update the game as much as possible before drawing\n\t\t \t\tgamePanel.update();\n\t\t \t\tlastUpdate += updateTime;\n\t\t \t\tupdates++;\n\t\t \t}\n\t\t \t\n\t\t \tif (now - lastUpdate > updateTime){ // Compensate for really long updates\n\t\t \t\tlastUpdate = now - updateTime;\n\t\t \t}\n\t\t \t\n\t\t \t// Draw the game\n\t\t \tgamePanel.repaint();\n\t\t \tlastRender = now;\n\t\t \t\n\t\t \t// kill some time until next draw\n\t\t \t\n\t\t \twhile (now - lastRender < renderTime && now - lastUpdate < updateTime){\n\t\t \t\tThread.yield();\n\t\t \t\t\n\t\t \t\ttry { Thread.sleep(1);} catch (Exception e) { }\n\t\t \t\t\n\t\t \t\tnow = System.nanoTime();\n\t\t \t}\n\t\t }\n\t\t\t}\n\t\t};\n\t\tloop.start();\n }",
"public synchronized void start() {\n\t\tstartSuspended();\r\n\t\tsetRunnable(true);\r\n\t}",
"private void start() {\n\t\tif (null == this.sourceRunner || null == this.channel) {\n\t\t\tthrow new FlumeException(\n\t\t\t\t\t\"Source/Channel is null. Cannot start flume components\");\n\t\t}\n\t\tthis.sourceRunner.start();\n\t\tthis.channel.start();\n\t\tthis.sinkCounter.start();\n\t}",
"public void start(){\r\n if (isInitOk){\r\n if (firstStart) {\r\n firstStart = false;\r\n String userHome = System.getProperty(\"user.home\");\r\n String installDirName = userHome + File.separator + \".jogl_ext\"\r\n + File.separator + installDirectory; // should manage jogl versions here\r\n\r\n final File installDir = new File(installDirName);\r\n\r\n Thread refresher = new Thread() {\r\n public void run() {\r\n refreshJOGL(installDir);\r\n }\r\n };\r\n refresher.setPriority(Thread.NORM_PRIORITY - 1);\r\n refresher.start();\r\n } else if (joglStarted) {\r\n // we have to start again the applet (start can be called multiple times,\r\n // e.g once per tabbed browsing\r\n subApplet.start();\r\n }\r\n }\r\n }",
"void start() {\n\tsleepThread = new Thread(this);\n\tsleepThread.start();\n }",
"public void start(){\n hiloAux = new Thread(this);\n hiloAux.start();\n }",
"public void startTracking()\n {\n if(!pixyThread.isAlive())\n {\n pixyThread = new Thread(this);\n pixyThread.start();\n leds.setMode(LEDController.Mode.ON);\n }\n }",
"private void launchPongManagerThread() {\n \t\tPongManager pongManager = new PongManager(this, listenAddress);\n \t\tfinal Thread t = this.listenChannel.getThreadFactory().newThread(pongManager);\n \t\tt.setName(\"Pong Server Manager\");\n \t\tt.start();\n \t}",
"public void start() {\n\t\tdata = new SharedData(output, input); // handles all shared data\n\t\ttimer = new Thread(new TimeHandler(data)); \n\t\tbuttons = new Thread(new ButtonHandler(input, data, signal));\n\n\t\ttimer.start();\n\t\tbuttons.start();\n\t}",
"public void start() {\n\tanimator = new Thread(this);\n\tanimator.setName(\"erly_boid:::swarm intelligence\");\n\terlang =new Thread(co);\n\terlang.start();\n\tanimator.start();\n \n \n \t\n }",
"public synchronized void start_scn_updates() {\r\n \tif (scn_update_thread == null){\r\n scn_update_thread = new Thread(this);\r\n scn_update_thread.start();\r\n \t}\r\n \tscn_ready = true;\r\n \trepaint();\r\n \tscn_repaint = true;\r\n }",
"protected void start() {\r\n if (!this.init || this.started) {\r\n \tthrow new RuntimeException(\"start() should not be called by hand: to create a new component, use newComponent().\");\r\n }\r\n }",
"public synchronized void start(){\n if(jogoAtivo) return;\n jogoAtivo = true;\n thread = new Thread(this);\n thread.start();\n }",
"public void start(){\n log.debug(\"Starting Host Router\");\n lobbyThread = pool.submit(new Runnable() {\n public void run() {\n waitForClients();\n }\n });\n }",
"public final void start() {\n logger.info(\"Application started.\");\n try {\n getAttributes();\n\n initSystem();\n\n assertDisplayCreated();\n\n timer = Timer.getTimer();\n \n initGame();\n\n //main loop\n while (!finished && !display.isClosing()) {\n //determine time elapsed since last frame\n updateTime();\n\n //handle input events prior to updating the scene\n // - some applications may want to put this into update of the game state\n InputSystem.update();\n\n //update game state, pass amount of elapsed time\n update(frametime);\n\n //render, do not use interpolation parameter\n render(-1.0f);\n\n //swap buffers\n display.getRenderer().displayBackBuffer();\n\n Thread.yield();\n }\n } catch (Throwable t) {\n logger.logp(Level.SEVERE, this.getClass().toString(), \"start()\", \"Exception in game loop\", t);\n } finally {\n cleanup();\n }\n logger.info(\"Application ending.\");\n\n if (display != null) {\n display.reset();\n }\n quit();\n }",
"public synchronized void start() {\r\n\r\n\t\tif (!running) {\r\n\t\t\trunning = true;\r\n\t\t\tnew Thread(this, name).start();\r\n\t\t}\r\n\t}",
"public void start() throws IOException{\n\t\tSystem.out.println(\"starting new chatclient with socket ID ...\"); //socketID is currently determined in chatserverthread so inaccessible\n\t\tstrOut = new DataOutputStream(new BufferedOutputStream (socket.getOutputStream()) );\n\t\tconsole = new BufferedReader(new InputStreamReader(System.in)); //sets up environment for client msgs\n\t\n\t\t//Note: Later, Rather than reading in the console, data must be retrieved consistently from the GUI\n\t\t//Try again\n\t\t\n\t\tif(thread == null){\n\t\t\tclient = new ChatClientThread(this, socket);\n\t\t\tthread = new Thread(this);\n\t\t\tthread.start();\n\t\t\t//Where should this go?\n\t\t\t//Is there another way to start a gui for each new client?\n\t\t\t//Does the run method in here interfere with the run method below?\n\t\t}\n\t\t\n\t}",
"@Override\n public void run() {\n //start the threads\n t1.start();\n t2.start();\n\n LOGGER.log(Level.FINE, \"Starting Server...\");\n\n //wait for the threads to exit.\n try {\n t1.join();\n t2.join();\n } catch (InterruptedException ex) {\n }\n\n //halt (clean up resources).\n halt();\n }",
"public static void startGame(CommandSender cs){\n if (isRunning){\n cs.sendMessage(ChatColor.RED + \"Game is already running!\");\n }\n else if (hiderSpawn == null || seekerSpawn == null){\n cs.sendMessage(ChatColor.RED + \"Make sure you set the spawn locations right!\");\n cs.sendMessage(ChatColor.RED + \"Do /setspawnlocation [seeker/hider] at the appropriate locations.\");\n }\n else if (Bukkit.getOnlinePlayers().size() < 3){\n cs.sendMessage(ChatColor.RED + \"Not enough players to start! Make sure there's at least 3 players online!\");\n }\n else{\n isRunning = true;\n if(gameThread == null){\n gameThread = new Thread(new GameManager());\n gameThread.start();\n }\n }\n }",
"private void createAndStartReconnectionThread() {\n reconnectionThread = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n Thread.sleep(waitTimeBeforeReconnection);\n\n synchronized (globalLock) {\n if (isRunning) {\n webSocketConnection = new WebSocketConnection();\n createAndStartConnectionThread();\n }\n }\n } catch (InterruptedException e) {\n // Expected behavior when the WebSocket connection is closed\n }\n }\n });\n reconnectionThread.start();\n }",
"public void init() {\n Thread run = new Thread(new Run());\n run.start();\n }",
"public void startGame(){\n System.out.println(\"[SERVER]: Starting a new game\");\n mainPage = new MainPage();\n mainPage.setMatch(match);\n mainPage.setRemoteController(senderRemoteController);\n\n Platform.runLater( () -> {\n try {\n firstPage.closePrimaryStage();\n if(chooseMap != null)\n chooseMap.closePrimaryStage();\n mainPage.start(new Stage());\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n );\n }",
"void start() {\n \t\tThread logicThread = new Thread(logic);\n \t\tThread graphicThread = new Thread(graphics);\n \n \t\tlogicThread.start();\n \t\tgraphicThread.start();\n \t}"
] |
[
"0.6483913",
"0.6397103",
"0.6377729",
"0.63560355",
"0.63356686",
"0.6213914",
"0.6139363",
"0.613097",
"0.61171085",
"0.6080935",
"0.60724807",
"0.6068294",
"0.6067886",
"0.605011",
"0.60498583",
"0.60346866",
"0.6022667",
"0.5982767",
"0.59435886",
"0.59435886",
"0.59366775",
"0.59326077",
"0.5927224",
"0.59267795",
"0.5923564",
"0.5904073",
"0.588841",
"0.5887055",
"0.5883864",
"0.5878612",
"0.5862512",
"0.5853765",
"0.5847451",
"0.58473945",
"0.584561",
"0.5836706",
"0.58357304",
"0.5831359",
"0.58170134",
"0.5812112",
"0.57937187",
"0.57935137",
"0.5792399",
"0.57844126",
"0.57827014",
"0.57815444",
"0.57744795",
"0.57551736",
"0.5751361",
"0.5740053",
"0.5732544",
"0.572104",
"0.5719329",
"0.5716441",
"0.5706569",
"0.5704879",
"0.57006395",
"0.5698909",
"0.5694828",
"0.56928533",
"0.568863",
"0.56751657",
"0.56544137",
"0.5648039",
"0.56412053",
"0.56388927",
"0.56329525",
"0.5627597",
"0.56251675",
"0.5615081",
"0.5615081",
"0.56122816",
"0.5609538",
"0.5609046",
"0.560323",
"0.5593871",
"0.5589901",
"0.55871063",
"0.55826277",
"0.5578736",
"0.5578179",
"0.5577543",
"0.5573484",
"0.5570318",
"0.55687267",
"0.5567922",
"0.55643916",
"0.5559582",
"0.5556917",
"0.5554982",
"0.5554",
"0.55530846",
"0.5551039",
"0.5548045",
"0.5543674",
"0.55323356",
"0.55301344",
"0.55295485",
"0.55246097",
"0.5523613",
"0.5516505"
] |
0.0
|
-1
|
Top Menu event handling
|
public void theGameMenuClicked() {
System.out.println("THE GAME (you just lost it)");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void onMenuNew() {\n handleMenuOpen(null);\n }",
"@Override\r\npublic void menuSelected(MenuEvent arg0) {\n\t\r\n}",
"@Override\n public void menuSelected(MenuEvent e) {\n \n }",
"public void menuItemClicked( Menu2DEvent e );",
"@Override\n\tpublic void menuSelected(MenuEvent e) {\n\n\t}",
"public void pressMainMenu() {\n }",
"public void menu(){\n super.goToMenuScreen();\n }",
"void clickAmFromMenu();",
"@FXML protected void MainMenuButtonClicked(ActionEvent event) {\n this.mainMenuCB.launchMainMenu();\r\n }",
"void clickFmFromMenu();",
"void onMenuItemClicked();",
"@Override\n public void onMenuClick() {\n Toast.makeText(activity.getApplicationContext(), \"Menu click\",\n Toast.LENGTH_LONG).show();\n }",
"public void initMenu(){\n\t}",
"@Override\n public void onMenuClick() {\n Toast.makeText(SearchActivity_.this, \"Menu click\", Toast.LENGTH_LONG).show();\n }",
"@Override\n\t\tpublic void openMenu() {\n\t\t}",
"private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }",
"@Override\r\npublic void menuDeselected(MenuEvent arg0) {\n\t\r\n}",
"public void onLoadMenuMyFavoritesSelected();",
"@Override\r\n\tpublic void menu() {\n\t\tSystem.out.println(\"go to menu\");\r\n\t\t\r\n\t}",
"IMenu getMainMenu();",
"@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\tMenuWindow menu = new MenuWindow();\n\t\t\t\t\tmenu.UserMenuStage(stage);\n\t\t\t\t}",
"public void TopDreiEvent();",
"@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}",
"private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }",
"public void menuClicked(MenuItem menuItemSelected);",
"default public void clickMenu() {\n\t\tremoteControlAction(RemoteControlKeyword.MENU);\n\t}",
"public java.awt.Menu getMenuHook();",
"public void onBrowserEvent(Event event) {\n\n\t\tswitch (DOM.eventGetType(event)) {\n\n\t\t//check the type of click (contextment type = rightclick)\n\t\tcase Event.ONCONTEXTMENU:\n\t\t\tevent.preventDefault();\n\n\t\t\tif (itemsActions != null) {\n\t\t\t\tCommandList localRightClickActions = itemsActions\n\t\t\t\t\t\t.getActionsForTrigger(TriggerType.MouseRightClickAction, null);\n\t\t\t\t\n\t\t\t\tprocessActionsFromThisIcon(localRightClickActions);\n\t\t\t}\n\n\t\t\tif (InventoryPanel.globalInventoryActions != null) {\n\t\t\t\tCommandList defaultRightClickActions = InventoryPanel.globalInventoryActions\n\t\t\t\t\t\t.getActionsForTrigger(TriggerType.MouseRightClickAction, null);\n\t\t\t\tprocessActionsFromThisIcon(defaultRightClickActions);\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\tcase Event.ONCLICK:\n\t\t\t\n\t\t\ticonclickedrecently=true;\n\t\t\t\n\t\t\tBoolean actions=false;\n\t\t\t\n\t\t\tif (itemsActions != null) {\n\t\t\t\tCommandList actionsToRunForMouseClick = itemsActions\n\t\t\t\t\t\t.getActionsForTrigger(TriggerType.MouseClickAction, null);\n\t\t\t//\tLog.info(\"_________________Event.BUTTON_Click inv1\");\n\t\t\t\tprocessActionsFromThisIcon(actionsToRunForMouseClick);\n\t\t\t\tactions=true;\n\t\t\t}\n\n\t\t\tif (InventoryPanel.globalInventoryActions != null) {\n\t\t\t\tCommandList defaultMouseClickActions = InventoryPanel.globalInventoryActions\n\t\t\t\t\t\t.getActionsForTrigger(TriggerType.MouseClickAction, null);\n\t\t\t//\tLog.info(\"_________________Event.BUTTON_Click inv2 \");\n\n\t\t\t\tprocessActionsFromThisIcon(defaultMouseClickActions);\n\t\t\t\tactions=true;\n\t\t\t}\n\t\t\t\n\t\t\tif (!actions){\n\t\t\t\t//raise inventory panel to front\n\t\t\t//\tMyApplication.allInventoryFrames.get(NativeInventoryPanel.Title).setZIndexTop();\n\t\t\t\t//\n\t\t\t}\n\t\t\t\n\t\t\tbreak;\n\t\t\n\t\t}\n\n\t\tsuper.onBrowserEvent(event);\n\n\t}",
"public abstract void displayMenu();",
"public void menu() {\n\t\tstate.menu();\n\t}",
"private void goToMenu() {\n\t\tgame.setScreen(new MainMenuScreen(game));\n\n\t}",
"public void setMenuHook(java.awt.Menu menu);",
"void Menu();",
"public void mousePressed(MouseEvent e) {\n JMenu menu = (JMenu)menuItem;\n if (!menu.isEnabled())\n return;\n MenuSelectionManager manager = \n MenuSelectionManager.defaultManager();\n if(menu.isTopLevelMenu()) {\n if(menu.isSelected()) {\n manager.clearSelectedPath();\n } else {\n Container cnt = menu.getParent();\n if(cnt != null && cnt instanceof JMenuBar) {\n MenuElement me[] = new MenuElement[2];\n me[0]=(MenuElement)cnt;\n me[1]=menu;\n manager.setSelectedPath(me); } } }\n MenuElement selectedPath[] = manager.getSelectedPath();\n if (selectedPath.length > 0 && \n selectedPath[selectedPath.length-1] != menu.getPopupMenu()) {\n if(menu.isTopLevelMenu() || \n menu.getDelay() == 0) {\n appendPath(selectedPath, menu.getPopupMenu());\n } else {\n setupPostTimer(menu); } } }",
"private void goToMenu() {\n game.setScreen(new MainMenuScreen(game));\n\n }",
"protected void showSystemMenu() {\n windowMenu.doClick(0);\n }",
"public void onTopUp();",
"public static void updateMainMenu() {\n instance.updateMenu();\n }",
"private static void returnMenu() {\n\t\t\r\n\t}",
"@Override\n protected void hookContextMenu() {\n\n }",
"@Override\r\n\tpublic void onMenuItemSelected(MenuItem item) {\n\r\n\t}",
"public boolean isOnMenu ();",
"@Override\r\n public void run() {\n opsi_menu();\r\n\r\n }",
"public void mouseEntered(MouseEvent e) {\n JMenu menu = (JMenu)menuItem;\n if (!menu.isEnabled())\n return;\n MenuSelectionManager manager = \n MenuSelectionManager.defaultManager();\n MenuElement selectedPath[] = manager.getSelectedPath(); \n if (!menu.isTopLevelMenu()) {\n if(!(selectedPath.length > 0 && \n selectedPath[selectedPath.length-1] == \n menu.getPopupMenu())) {\n if(menu.getDelay() == 0) {\n appendPath(getPath(), menu.getPopupMenu());\n } else {\n manager.setSelectedPath(getPath());\n setupPostTimer(menu); } }\n } else {\n if(selectedPath.length > 0 &&\n selectedPath[0] == menu.getParent()) {\n MenuElement newPath[] = new MenuElement[3];\n // A top level menu's parent is by definition \n // a JMenuBar\n newPath[0] = (MenuElement)menu.getParent();\n newPath[1] = menu;\n newPath[2] = menu.getPopupMenu();\n manager.setSelectedPath(newPath); } } }",
"@Override\r\npublic void menuCanceled(MenuEvent arg0) {\n\t\r\n}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tmenu.setMouseClick(true);\n\t\t\t}",
"public void onSelectFunction$mnu(Event event) {\r\n\r\n\t\tOperacion operacion = (Operacion) event.getData();\r\n\t\t\r\n\t\t\r\n\t\tif (operacion != null) {\r\n\t\t\t\r\n//\t\t\tObject actual = page.getVariable(\"actual\");\r\n\t\t\t\r\n\t\t\tObject actual = getPage().getAttribute(\"actual\");\r\n\t\t\t\r\n\t\t\tGenericList list = (GenericList)self;\r\n\t\t\t\r\n\t\t\tif (actual != null) {\r\n\t\t\t\t\r\n\t\t\t\talert(list.getDialog());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.event_handlers_main, menu);\n return true;\n }",
"private void backToMenu(ActionEvent actionEvent) {\n try {\n ((UserController) changeScene(\"/gui/guiuser/UserUI-ATM.fxml\")).initData(userManager);\n } catch (IOException e) {\n e.printStackTrace();\n }\n displayScene(actionEvent);\n }",
"@Override\n\tpublic void initialize(URL arg0, ResourceBundle arg1) {\n\n\t\thome = new MenuItem(\"Home Page\");\n\t\thome.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tApplication_Navigator.loadVista(Application_Navigator.CREDENTIALS);\n\n\t\t\t}\n\t\t}); \n\n\t\t\n\t\tnewuser = new MenuItem(\"New User\");\n\t\tnewuser.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tSystem.out.println(\"Calling New User window\");\n\t\t\t\tApplication_Navigator.loadVista(Application_Navigator.NEWUSER);\n\t\t\t}\n\t\t}); \n\t\t\n\t\t\n\t\texit = new MenuItem(\"Exit Application\");\n\t\texit.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tSystem.out.println(\"quitting\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}); \n\n\t\t\n\t\tMain.getItems().add(home);\n\t\n\t\tMain.getItems().add(newuser);\n\n\t\tMain.getItems().add(exit);\n\t\t\n\n\t\t//---------------------------- Actions Menu Drop down --------------------------------\n\n\t\thistory = new MenuItem(\"View History\");\n\t\thistory.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) { \t\n\t\t\t\t// open the default web browser for the HTML page\n\t\t\t\ttry {\n\t\t\t\t\tURL webURL = new URL(\"http://webdevelopmentdev.azurewebsites.net/\");\n\t\t\t\t\tDesktop.getDesktop().browse(webURL.toURI());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (URISyntaxException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}); \n\n\t\tActions.getItems().add(history);\n\n\t\tbrowser = new MenuItem(\"View Browser\");\n\t\tbrowser.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tSystem.out.println(\"Inside the browser\");\n\n\t\t\t\tApplication_Navigator.loadVista(Application_Navigator.BROWSER);\n\t\t\t}\n\t\t}); \n\n\t\tActions.getItems().add(browser);\n\t\tbrowser.setDisable(true);\n\t\t\n\t\tissue = new MenuItem(\"Report Issue\");\n\t\tissue.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tApplication_Navigator.loadVista(Application_Navigator.ISSUE);\n\t\t\t}\n\t\t}); \n\n\t\tActions.getItems().add(issue);\n\n\t\tStartConnection();\n\t}",
"@FXML\n\tpublic void handleMenu(){\n\t\tFile file2 = mainApp.getProspectFilePath();\n if (file2 != null) {\n mainApp.saveProspectDataToFile(file2);}\n\t\tmainApp.showMenuPrincipale();\n\t}",
"public void menuItemHasChanged(Object sender, MenuItem item) {\n // Called every time any menu item changes\n }",
"public void onLoadMenuMyPlaylistSelected();",
"private void goToShop() {\n shopMenu.runMenu();\n }",
"public void actionPerformed(ActionEvent e)\r\n\t{\t// see which menu item was clicked\r\n\t\tif(e.getSource() == displayMenu)\r\n\t\t\tdisplayMessage();\r\n\t \tif(e.getSource() == clearMenu)\r\n \t\tclearMessage(); \r\n\t \tif(e.getSource() == closeMenu)\r\n \t \tshutDown(); \r\n\t}",
"public void readTheMenu();",
"@Override\n public void menuCanceled(MenuEvent e) {\n\n }",
"C getMenu();",
"@Override\n public void menuDeselected(MenuEvent e) {\n\n }",
"void goMainScreen(){\n\t\tcheckSavePwd();\n\t\tActionEvent e = new ActionEvent();\n\t\te.sender = this;\n\t\te.action = ActionEventConstant.ACTION_SWITH_TO_CATEGORY_SCREEN;\n\t\tUserController.getInstance().handleSwitchActivity(e);\n\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void onLoadMenuShow(String result) {\n\n\t\t\t\t\t\t\t\t}",
"protected void createMenus(Activity activity, boolean isEntryPoint){\n \t\t\n \t\t//myTts = new TextToSpeechBeta(this, ttsInitListener);\n \t\t\n \t\tthis.isEntryPoint = isEntryPoint;\n \t\tthis.activity = activity;\n \t\t\n \t\tApplicationData applicationData = SplashActivity.getApplicationData();\n \t\tActiveMenus activeMenus = applicationData.getMenu();\n \t\t\n \t\t//TOP MENU\n \t\tif(activeMenus.getTopMenu() != null){\n \t\t\tRelativeLayout topLayout = (RelativeLayout) findViewById(R.id.topLayout);\n \t\t\tcreateCurrentMenu(topLayout, activeMenus.getTopMenu());\n \t\t}\n \t\t\n \t\t//BOTTOM MENU\n \t\tRelativeLayout bottomLayout = (RelativeLayout) findViewById(R.id.bottomLayout);\t\n \t\tif(activeMenus.getBottomMenu() != null){\n \t\t\tcreateCurrentMenu(bottomLayout, activeMenus.getBottomMenu());\n \t\t}else{\n \t\t\tbottomLayout.setVisibility(0);\n \t\t}\n \t\t\n \t\t//CONTEXT MENU\n \t\tif(activeMenus.getContextMenu() != null){\n \t\t\tthis.contextMenuXmlFileName = activeMenus.getContextMenu();\n \t\t}\n \t\t\n \t\t//SIDE MENU\n \t\tif(activeMenus.getSideMenu() != null){\n \t\t\tinitializeSideMenuList(activeMenus.getSideMenu());\n \t\t}\n \t}",
"@Override\n\t\tpublic void popupMenuWillBecomeVisible(PopupMenuEvent e) {\n\n\t\t}",
"public void showTitleScreen() {\n frame.showMenu();\n }",
"void invokeAppLogic(IMenu fromMenu);",
"@FXML\n void handleMenuButton(ActionEvent event){\n MenuConfirmation.showMenuConfirmation(client);\n }",
"public interface Menu2DListener {\n\n /*------------------------------------------------------------------------------------*/\n\n /** Method called when an item has been clicked on an item who is not a menu link.\n * @param e menu event generated.\n */\n public void menuItemClicked( Menu2DEvent e );\n\n /*------------------------------------------------------------------------------------*/\n\n}",
"@Override\n\tpublic void showmenu() {\n\t\t\n\t\tint choice;\n \n System.out.println(\"请选择1.查询 2.退出\");\n choice=console.nextInt();\n \n switch (choice){\n \n case 1:\n Menu.searchMenu();\n break;\n default:\n \tSystem.out.println(\"感谢您使用本系统 欢迎下次使用!\");\n System.exit(0);\n }\n \n \n\t}",
"MenuEx(NeoHaneol owner){\n\t\tthis.owner = owner;\n\t\tcreateMenu();\n\t}",
"@Override\r\n public void onMouseUp(Mouse.ButtonEvent event){\n HomeScreen.settingSound(false);\r\n ss.push(new HomeScreen(ss));\r\n }",
"@Override\n public void onOpened() {\n menu.callOnResumeForUpdate();\n menu.showData();\n isMenuShowing = true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t getMenuInflater().inflate(R.menu.event_history, menu);\n\t \n\t if (ViewConfiguration.get(this).hasPermanentMenuKey()) {\n\t \t\n\t } else {\n\t new ShowcaseView.Builder(this, true)\n\t .setTarget(new ActionViewTarget(this, ActionViewTarget.Type.OVERFLOW))\n\t .setContentTitle(\"Täältä voit vaihtaa jaksoa\")\n\t .setContentText(\"Klikkaamalla tästä voit valita jakson, jonka suunnitelmat näytetään.\")\n\t .hideOnTouchOutside()\n\t .setStyle(R.style.ShowcaseView)\n\t .singleShot(CHANGE_SPRINT_HELP)\n\t .build();\n\t }\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"public void mainMenu() {\n\t\t// main menu\n\t\tdisplayOptions();\n\t\twhile (true) {\n\t\t\tString choice = ValidInputReader.getValidString(\n\t\t\t\t\t\"Main menu, enter your choice:\",\n\t\t\t\t\t\"^[aAcCrRpPeEqQ?]$\").toUpperCase();\n\t\t\tif (choice.equals(\"A\")) {\n\t\t\t\taddPollingPlace();\n\t\t\t} else if (choice.equals(\"C\")) {\n\t\t\t\tcloseElection();\n\t\t\t} else if (choice.equals(\"R\")) {\n\t\t\t\tresults();\n\t\t\t} else if (choice.equals(\"P\")) {\n\t\t\t\tperPollingPlaceResults();\n\t\t\t} else if (choice.equals(\"E\")) {\n\t\t\t\teliminate();\n\t\t\t} else if (choice.equals(\"?\")) {\n\t\t\t\tdisplayOptions();\n\t\t\t} else if (choice.equals(\"Q\")) {\n\t\t\t\tSystem.out.println(\"Goodbye.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"@FXML\n\tprivate void goMainMenu(ActionEvent event) throws IOException {\n\t\tScreenController.goMainMenu(getClass(), event);\n\t}",
"@Override\r\n\t\t\t\tpublic void onDialogMenuPressed() {\n\r\n\t\t\t\t}",
"private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }",
"static void DisplayMainMenu()\n {\n \tSystem.out.println(\"******\");\n \tSystem.out.println(\"Menu\");\n \tSystem.out.println(\"******\");\n \tSystem.out.println(\"Enter Selection\");\n \tSystem.out.println(\"1) Send Message\");\n \tSystem.out.println(\"2) Receive Message\");\n \tSystem.out.println(\"3) Run regression test\");\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.top_menu, menu);\n return true;\n }",
"public void actionPerformed (ActionEvent e) { \n\t\ttry {\n\t\t\tnew HomeMenuGUI ();\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t}",
"@Override\n public void onContextMenuClosed(Menu menu) {\n \tsuper.onContextMenuClosed(menu);\n \tToast.makeText(this, \"Menu Contextual finalizado\", Toast.LENGTH_LONG).show();\n }",
"public void exitMenu(){\n }",
"private void searchMenu(){\n\t\t\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n getMenuInflater().inflate(R.menu.main, menu);\r\n if (userType.equalsIgnoreCase(\"TSE\")) {\r\n MenuItem item = menu.findItem(R.id.home_button);\r\n item.setVisible(false);\r\n }\r\n return true;\r\n }",
"public String getActivationMenu();",
"public static void main(String[] args){\n\n main_menu();\n\n }",
"public void menuDeselected(MenuEvent evt) {\n }",
"public void topBarClicked()\n\t{\n\t\tkillMe();\n\t\tnew AccountScreen() {\n\t\t\tpublic void showNextScreen()\n\t\t\t{\n\t\t\t\tnew EnemyCacheScreen(EnemyCacheScreen.getStaticTheCache(), EnemyCacheScreen.getTheUser());\n\t\t\t}\n\t\t};\n\t}",
"private void callSubMenu() {\n new SubMenu().display();\n }",
"public void initMenuContext(){\n GralMenu menuCurve = getContextMenu();\n //menuCurve.addMenuItemGthread(\"pause\", \"pause\", null);\n menuCurve.addMenuItem(\"refresh\", actionPaintAll);\n menuCurve.addMenuItem(\"go\", actionGo);\n menuCurve.addMenuItem(\"show All\", actionShowAll);\n //menuCurve.addMenuItemGthread(\"zoomOut\", \"zoom in\", null);\n menuCurve.addMenuItem(\"zoomBetweenCursor\", \"zoom between Cursors\", actionZoomBetweenCursors);\n menuCurve.addMenuItem(\"zoomOut\", \"zoom out\", actionZoomOut);\n menuCurve.addMenuItem(\"cleanBuffer\", \"clean Buffer\", actionCleanBuffer);\n //menuCurve.addMenuItemGthread(\"zoomOut\", \"to left\", null);\n //menuCurve.addMenuItemGthread(\"zoomOut\", \"to right\", null);\n \n }",
"static void mainMenu ()\r\n \t{\r\n \t\tfinal byte width = 45; //Menu is 45 characters wide.\r\n \t\tString label [] = {\"Welcome to my RedGame 2 compiler\"};\r\n \t\t\r\n \t\tMenu front = new Menu(label, \"Main Menu\", (byte) width);\r\n \t\t\r\n \t\tMenu systemTests = systemTests(); //Gen a test object.\r\n \t\tMenu settings = settings(); //Gen a setting object.\r\n \t\t\r\n \t\tfront.addOption (systemTests);\r\n \t\tfront.addOption (settings);\r\n \t\t\r\n \t\tfront.select();\r\n \t\t//The program should exit after this menu has returned. CLI-specific\r\n \t\t//exit operations should be here:\r\n \t\t\r\n \t\tprint (\"\\nThank you for using my program.\");\r\n \t}",
"@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}",
"@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}",
"public interface EventPressMenu {\r\n public void OnClickMenu(String name);\r\n}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_top_screen, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.home_page, menu);\n final MenuItem menuItem = menu.findItem(R.id.message);\n View actionView = menuItem.getActionView();\n textCartItemCount = (TextView) actionView.findViewById(R.id.cart_badge);\n setupBadge();\n\n actionView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n onOptionsItemSelected(menuItem);\n\n }\n });\n return true;\n }",
"protected void initEvent() {\n\t\tbase_ib.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\n\t\t\t\tmainActivity.getSlidingMenu().toggle();\n\n\t\t\t}\n\t\t});\n\t}",
"public void menuSelected(MenuEvent evt) {\n JMenu source = (JMenu) evt.getSource();\n\n if (source.getText().equals(\"View...\")) {\n ((JMenuItem) source).setSelected(false);\n }\n }",
"void askMenu();",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_top, menu);\n return true;\n }",
"private void backToMenu() {\n game.setScreen(new StartScreen(game));\n }",
"public interface OnMenuSelectedListener {\n void onMenuSelected(int index);\n}"
] |
[
"0.71405435",
"0.71401507",
"0.70632756",
"0.6974554",
"0.68933505",
"0.68550956",
"0.6657451",
"0.66324896",
"0.6585744",
"0.6562877",
"0.6557576",
"0.65506256",
"0.64267814",
"0.64102966",
"0.6404893",
"0.6370399",
"0.6362467",
"0.6346057",
"0.6335668",
"0.63345915",
"0.63217276",
"0.6316749",
"0.6308669",
"0.6307591",
"0.62889785",
"0.6264536",
"0.6255877",
"0.6211671",
"0.61991596",
"0.6181248",
"0.61768305",
"0.61741567",
"0.6164852",
"0.6157422",
"0.6153685",
"0.6152537",
"0.61429316",
"0.6136169",
"0.61356574",
"0.61291164",
"0.6125303",
"0.6119477",
"0.611435",
"0.6102284",
"0.6083099",
"0.6071374",
"0.60648924",
"0.6059016",
"0.60462534",
"0.6012479",
"0.60114354",
"0.60058665",
"0.599761",
"0.5993811",
"0.59762275",
"0.59685385",
"0.5961573",
"0.5956001",
"0.59516376",
"0.59479165",
"0.59321326",
"0.59260464",
"0.5923403",
"0.5911291",
"0.59051085",
"0.59031177",
"0.5898775",
"0.58853257",
"0.5879613",
"0.587704",
"0.5872983",
"0.5860345",
"0.58566046",
"0.5855482",
"0.5850413",
"0.58479923",
"0.58449996",
"0.58426225",
"0.5842181",
"0.58380455",
"0.58353454",
"0.5831221",
"0.58301914",
"0.5824758",
"0.5819823",
"0.5819222",
"0.5817707",
"0.5817312",
"0.58154315",
"0.58080834",
"0.58052564",
"0.58052564",
"0.58036816",
"0.58008957",
"0.5800616",
"0.57922995",
"0.5791602",
"0.578967",
"0.5788854",
"0.5787253",
"0.57840866"
] |
0.0
|
-1
|
Top Menu event end
|
public void closeOptions() {
PopupManager.closePopup(n, optionsPopup);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void exitMenu(){\n }",
"public void onMenuNew() {\n handleMenuOpen(null);\n }",
"public void exitToMenu()\n {\n exitToMenuFlag = true;\n }",
"@Override\n\t\tpublic void closeMenu() {\n\t\t}",
"@Override\r\npublic void menuDeselected(MenuEvent arg0) {\n\t\r\n}",
"public void end()\n\t{\n\t\tStateManager.setState(StateManager.GameState.MAINMENU);\n\t\tStateManager.setGame(null);\n\t}",
"@Override\n public void onContextMenuClosed(Menu menu) {\n \tsuper.onContextMenuClosed(menu);\n \tToast.makeText(this, \"Menu Contextual finalizado\", Toast.LENGTH_LONG).show();\n }",
"@Override\n public void menuSelected(MenuEvent e) {\n \n }",
"@Override\r\npublic void menuSelected(MenuEvent arg0) {\n\t\r\n}",
"private static void returnMenu() {\n\t\t\r\n\t}",
"protected abstract void quitToMainMenu();",
"@Override\n public void menuCanceled(MenuEvent e) {\n\n }",
"@Override\r\npublic void menuCanceled(MenuEvent arg0) {\n\t\r\n}",
"@Override\n public void onClose() {\n isMenuShowing = false;\n if (0 == vp.getCurrentItem()) {\n menu.callOnPauseForUpdate();\n }\n hideKeyboard(mySlidingMenu);\n Recommend r = (Recommend) list.get(0);\n r.showUser();\n }",
"@Override\n public void menuDeselected(MenuEvent e) {\n\n }",
"@Override\n\tpublic void menuSelected(MenuEvent e) {\n\n\t}",
"public void menu()\r\n\t{\r\n\t\t//TODO\r\n\t\t//Exits for now\r\n\t\tSystem.exit(0);\r\n\t}",
"public void pressMainMenu() {\n }",
"@Override\n\tpublic void msgExitHome() {\n\t\t\n\t}",
"public void TopDreiEvent();",
"@Override\n\tpublic void menuCanceled(MenuEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void menuCanceled(MenuEvent e) {\n\n\t}",
"@Override\r\n\tpublic void menu() {\n\t\tSystem.out.println(\"go to menu\");\r\n\t\t\r\n\t}",
"public void returnToMenu()\n\t{\n\t\tchangePanels(menu);\n\t}",
"@Override\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\n\t\t\t}",
"@Override\n\tpublic void goToMainMenu() {\n\t\tfinish();\n\t}",
"public void menuItemClicked( Menu2DEvent e );",
"@Override\n\tpublic void menuDeselected(MenuEvent e) {\n\t\t\n\t}",
"public void menu(){\n super.goToMenuScreen();\n }",
"public void returnToMenu(){\n client.moveToState(ClientState.WELCOME_SCREEN);\n }",
"public void menuDeselected(MenuEvent evt) {\n }",
"private void backToMenu() {\n game.setScreen(new StartScreen(game));\n }",
"public void menuCanceled(MenuEvent evt) {\n }",
"@Override\n\tpublic void menuDeselected(MenuEvent e) {\n\n\t}",
"@Override\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\n\t\t\t}",
"@Override\r\n\tpublic void onGuiClosed() {\r\n\t\tsuper.onGuiClosed();\r\n\t\t\r\n\t\t// Save any changes made while this menu was open\r\n\t\tUltraTeleportWaypoint.save();\r\n\t}",
"public void back(){\n\t\tswitch(state){\n\t\tcase LOGINID:\n\t\t\tbreak; //do nothing, already at top menu\n\t\tcase LOGINPIN:\n\t\t\tloginMenu();\n\t\t\tbreak;\n\t\tcase TRANSACTION:\n\t\t\tbreak; //do nothing, user must enter the choice to log out\n\t\tcase DEPOSIT:\n\t\t\ttransactionMenu();\n\t\t\tbreak;\n\t\tcase DEPOSITNOTIFICATION:\n\t\t\tbreak; //do nothing, user must press ok\n\t\tcase WITHDRAW:\n\t\t\ttransactionMenu();\n\t\t\tbreak;\n\t\tcase BALANCE:\n\t\t\tbreak; //do nothing, user must press ok\n\t\tcase WITHDRAWALNOTIFICATION:\n\t\t\tbreak; //do onthing, user must press ok\n\t\t}\n\t\t\n\t\tcurrentInput = \"\";\n\t}",
"private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }",
"private void printExitMenu() {\n System.out.println(\"Goodbye! Thanks for using the app!\");\n }",
"@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tif (CommonUtils.getCurrentChildMenuActivity().equals(\"grzl\")) {\r\n\t\t\tCommonUtils.setCurrentChildMenuActivity(\"\");\r\n\t\t}\r\n\t}",
"private void backToMenu()\n\t{\n\t\t//switch to menu screen\n\t\tgame.setScreen(new MenuScreen(game));\n\t}",
"public void onTopUp();",
"private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }",
"private void backToMenu(ActionEvent actionEvent) {\n try {\n ((UserController) changeScene(\"/gui/guiuser/UserUI-ATM.fxml\")).initData(userManager);\n } catch (IOException e) {\n e.printStackTrace();\n }\n displayScene(actionEvent);\n }",
"public void goBackToMainMenu() {\n new MainMenu();\n dispose();\n }",
"@Override\r\n public void run() {\n opsi_menu();\r\n\r\n }",
"public void mouseClicked(MouseEvent e) {\n\t\t\tif(e.getSource()==exit){\n\t\t\t\tm.jumpTomanagerMenuUI();\t\t\t\n\t\t\t}\n\t\t\trepaint();\n\t\t}",
"void onExit();",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\t\t\n\t\t\t}",
"public void menu() {\n\t\tstate.menu();\n\t}",
"private void menu_ExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menu_ExitActionPerformed\n System.exit(0);\n }",
"@Override\n public void onExitAmbient() {\n\n Toast.makeText(getApplicationContext(), \"Exit\", Toast.LENGTH_LONG).show();\n }",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\tmenu.setMouseClick(false);\n\t\t\t}",
"static void mainMenu ()\r\n \t{\r\n \t\tfinal byte width = 45; //Menu is 45 characters wide.\r\n \t\tString label [] = {\"Welcome to my RedGame 2 compiler\"};\r\n \t\t\r\n \t\tMenu front = new Menu(label, \"Main Menu\", (byte) width);\r\n \t\t\r\n \t\tMenu systemTests = systemTests(); //Gen a test object.\r\n \t\tMenu settings = settings(); //Gen a setting object.\r\n \t\t\r\n \t\tfront.addOption (systemTests);\r\n \t\tfront.addOption (settings);\r\n \t\t\r\n \t\tfront.select();\r\n \t\t//The program should exit after this menu has returned. CLI-specific\r\n \t\t//exit operations should be here:\r\n \t\t\r\n \t\tprint (\"\\nThank you for using my program.\");\r\n \t}",
"public void onExit();",
"@Override\r\n\t\tpublic void popupMenuWillBecomeInvisible(PopupMenuEvent arg0) {\n\t\t\t\r\n\t\t}",
"public static void updateMainMenu() {\n instance.updateMenu();\n }",
"@Override\r\n\tpublic void onBackKeyPressed()\r\n\t{\n\t\tSceneManager.getInstance().loadMenuScene(activity.getEngine());\r\n\t}",
"@Override\n\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\n\t\t}",
"public void onExit() {\n Intent homeIntent = new Intent(Intent.ACTION_MAIN);\n homeIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n homeIntent.addCategory(Intent.CATEGORY_HOME);\n startActivity(homeIntent);\n finish();\n }",
"@Override\n\tpublic void onExit() {\n\t\t\n\t}",
"@Override\n public void onMenuClick() {\n Toast.makeText(activity.getApplicationContext(), \"Menu click\",\n Toast.LENGTH_LONG).show();\n }",
"@Override\n public void backToMainMenu() {\n try {\n Thread.sleep((long)480000);\n }\n catch (InterruptedException var1_1) {\n var1_1.printStackTrace();\n }\n if (this.activityActive && !this.getClass().equals((Object)SampleActivity.class)) {\n AudioDemo.Sound().playSound(\"a9\");\n try {\n Thread.sleep((long)10000);\n }\n catch (InterruptedException var2_2) {\n var2_2.printStackTrace();\n }\n this.finishInputMoney(false);\n }\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\texit_click(e);\r\n\t\t\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\t\t\r\n\t\t\t}",
"private void goToMenu() {\n\t\tgame.setScreen(new MainMenuScreen(game));\n\n\t}",
"public void menuDeselected (MenuEvent event) {\n EventQueue.invokeLater(new Runnable() {\n public void run () {\n restoreActions();\n }\n });\n }",
"public void backMenu() {\n openWindowGeneral(\"/gui/administrator/fxml/FXMLMenuAdministrator.fxml\", btnCancel);\n }",
"private void quitJMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_quitJMenuItemActionPerformed\n // TODO add your handling code here:\n System.exit(0);\n }",
"public void onBackPressed() {\r\n if (listviewMode) {\r\n HideListView();\r\n } else {\r\n bottom_menu.onBackPressed();\r\n }\r\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==R.id.action_exit2){\n\t\t\tSysutil mSysUtil= new Sysutil(MainGroupActivity.this); \n mSysUtil.exit(); \n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"public void handleQuit(ApplicationEvent evt) {\n ExitManager em = (ExitManager) bio.getManager(ExitManager.class);\n if (em == null) evt.setHandled(true);\n else {\n evt.setHandled(false);\n em.fileExit();\n }\n }",
"private void menuitemExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuitemExitActionPerformed\n if ( mainApp != null ) {\n mainApp.btnExitActionPerformed(); // note call to method in Main class\n } else {\n System.exit( 0 );\n }\n }",
"public void initMenu(){\n\t}",
"@Override\n\t\tpublic void popupMenuWillBecomeVisible(PopupMenuEvent e) {\n\n\t\t}",
"private void jMenuItem3ActionPerformed(ActionEvent evt) {\n\t\tSystem.exit(0);\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\n\t}",
"private void goToMenu() {\n game.setScreen(new MainMenuScreen(game));\n\n }",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t}",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\n\t\t\t}",
"@Override\n\t public void onExit() {\n\t\t super.onExit();\n\t }",
"@Override\n public void windowClosed(WindowEvent arg0) {\n\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n //your actions\n Main.Logout();\n }"
] |
[
"0.69919854",
"0.69900656",
"0.68556887",
"0.6787083",
"0.67624253",
"0.6733088",
"0.66991484",
"0.6690804",
"0.66663456",
"0.6652836",
"0.66521007",
"0.6650742",
"0.66195464",
"0.657005",
"0.6544851",
"0.6513339",
"0.64818466",
"0.6454876",
"0.63960725",
"0.6384547",
"0.63791955",
"0.63479805",
"0.6340887",
"0.6337128",
"0.63126963",
"0.63116723",
"0.6294868",
"0.62791336",
"0.6268857",
"0.6259298",
"0.6255232",
"0.62382996",
"0.6230945",
"0.6223714",
"0.6207942",
"0.6185568",
"0.6167439",
"0.61588836",
"0.6144561",
"0.61292285",
"0.6098241",
"0.6094424",
"0.6082553",
"0.6081073",
"0.6075614",
"0.606979",
"0.60587656",
"0.6044346",
"0.6042095",
"0.6042095",
"0.6022718",
"0.6020617",
"0.6020269",
"0.6010635",
"0.6010635",
"0.6010635",
"0.6010635",
"0.6005269",
"0.6005269",
"0.6005269",
"0.6005269",
"0.6005269",
"0.6005269",
"0.6005269",
"0.5999015",
"0.59968936",
"0.59846854",
"0.59750813",
"0.59715635",
"0.59702724",
"0.5967058",
"0.5967058",
"0.5965153",
"0.59635985",
"0.595646",
"0.5955218",
"0.5955038",
"0.59549034",
"0.59549034",
"0.59549034",
"0.5954058",
"0.59527266",
"0.5948518",
"0.59464675",
"0.59460247",
"0.59451765",
"0.5931459",
"0.5927119",
"0.59239244",
"0.59214735",
"0.59190816",
"0.59147346",
"0.5903465",
"0.5890212",
"0.5890212",
"0.58710235",
"0.58678627",
"0.5863159",
"0.5861924",
"0.58576196",
"0.5857367"
] |
0.0
|
-1
|
Use null to hide the panel.
|
public void setInfoLabelText(String text) {
Label infoLabel = s.findNiftyControl("infoLabel", Label.class);
if (text != null) {
infoLabel.setText(text);
infoPanel.setVisible(true);
} else
infoPanel.setVisible(false);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void hideIt(){\n this.setVisible(false);\n }",
"public void hide() {\n visible=false;\n }",
"@Override\n\tpublic void hide() {\n\t\tdispose();\n\n\t}",
"@Override\n\tpublic void hide() {\n\t\tdispose();\n\t}",
"public void hide() {\n }",
"private void hide() {\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"void hide();",
"@Override\r\n\tpublic void hide() {\n\t\tthis.dispose();\r\n\t\t\r\n\t}",
"@Override\r\n public void hide() {\r\n\r\n }",
"@Override\r\n public void hide() {\n }",
"public void hideGebruikersBeheerPanel() {gebruikersBeheerView.setVisible(false);}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide()\n\t{\n\n\t}",
"@Override\n\tpublic void hide()\n\t{\n\n\t}",
"public void hide() {\n hidden = true;\n }",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t}",
"@Override\n\tpublic void hide() {\n\t}",
"@Override\n\tpublic void hide() {\n\t}",
"@Override\n\tpublic void hide() {\n\t}",
"public void hide() {\n\t\thidden = true;\n\t}",
"@Override\r\n\tpublic void hide() {\n\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\r\n\t}",
"@Override\n public void hide() {\n\n }",
"@Override\n public void hide() {\n\n }",
"@Override\n public void hide() {\n\n }",
"public void hide() {\n super.hide();\n }",
"default void hide() { }",
"@Override\n public void hide() {\n \n }",
"public void hidePlanels(){\n\t\tlblGradesSubj.getElement().setAttribute(\"style\", \"background: #e5e5e5;\");\n\t\tfilterPanel.addStyleName(LoginPopUpCBundle.INSTANCE.css().PopupMainVSmall());\n\t\tfilterPanel.removeStyleName(LoginPopUpCBundle.INSTANCE.css().PopupMainExtraLarge());\n\n\t\tlblStandards.getElement().getStyle().clearBackgroundColor();\n\t\tstandardsPanel.setVisible(false);\n\t\tgradesPanel.setVisible(true);\n\t}",
"public void hidePanel() {\n\t\tclipRect.layoutYProperty().bind(invertedYTrans);\n\t\ttranslateTrans.setToY(-slidingPanel.getHeight());\n\t\ttranslateTrans.setOnFinished((event)->{\n\t\t\tslidingPanel.setVisible(false);\n\t\t\tslidingPanel.heightProperty().addListener(slidingPanelHeightListener);\n\t\t});\n\t\ttranslateTrans.play();\n\t\tisSlidingPaneShown = false;\n\t}",
"@Override\n public void hide() {\n mHandler.post(mHide);\n }",
"@Override\r\n public void hide() {\r\n dispose();\r\n }",
"public void hide() {\n/* 122 */ Component component = getComponent();\n/* */ \n/* 124 */ if (component instanceof JWindow) {\n/* 125 */ component.hide();\n/* 126 */ ((JWindow)component).getContentPane().removeAll();\n/* */ } \n/* 128 */ dispose();\n/* */ }",
"public void setHide()\n\t{\n\t\tMainController.getInstance().setVisible(name, false);\n\t}",
"private void hideMe() {\n\t\tthis.setVisible(false);\n\t\ttxtName.setText(\"\");\n\t\ttxtEmail.setText(\"\");\n\t\ttxtPhone.setText(\"\");\n\t}",
"public void hide() {\n isVisible = false;\n this.saveBorderColor(Color.BLACK);\n this.setBorderColor(Color.BLACK);\n }",
"public void hidePanelToNewPlayList() {\n\t\tjpIntroduceNameList.setVisible(false);\n\t}",
"public void hideFrmMantenerEmpleado(){\n this.mFrmMantenerEmpleado.setVisible(false);\n }",
"@Override\n public void wasHidden() {\n hide();\n }",
"private final void closePanel() {\r\n\r\n\t\tthis.pnlMain.getRootPane().getParent().setVisible(false);\r\n\t\t\r\n\t}",
"@Override\n\tpublic void onHide() {\n\n\t}",
"void hideNoneParametersView();",
"public native void hide(GInfoWindow self)/*-{\r\n\t\tself.hide();\r\n\t}-*/;",
"@Override\n public void hide() {\n displayWindow.setVisible(false);\n displayWindow.removeWindowFocusListener(this);\n parentDatePicker = null;\n }",
"public void hide(){\n developmentGroup.setVisible(false);\n }",
"public void hideScreen() {\n\t}",
"public void hide() {\n \t\tmContext.unregisterReceiver(mHUDController.mConfigChangeReceiver);\n \t\tmHighlighter.hide();\n \t\tmHUDController.hide();\n \t}",
"@Override\n\tpublic void unsetShowing() {\n\t\tshowing = false;\n\t}",
"public void show() {\n hidden = false;\n }",
"public void hideFrame() {\r\n this.setVisible(false);\r\n this.dispose();\r\n }",
"@Override\n\tpublic void hidePopup() {\n\t\t// logger.info(\"..errr..I'll hide u\");\n\t}",
"protected void hide() {\n fQuickAssistAssistantImpl.closeBox();\n }",
"public void hide() {\n\t\t\n\t\tfor(CustomScoreboardEntry entry : entries)\n\t\t\tentry.hide();\n\t\t\n\t\tthis.board.clearSlot(DisplaySlot.SIDEBAR);\n\t\t\n\t\tshown = false;\n\t}",
"public abstract BossBar hide();",
"public void hide() {\n\t\t// Useless if called in outside animation loop\n\t\tactive = false;\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tsetVisible(false);\n\t\t\t}",
"public void hide() {\r\n\t\tif (item != null) { \r\n\t ShowCaseStandalone.slog(Level.FINEST, \"Hiding showcase: \" + getSHA1());\r\n\t item.remove();\r\n\t \r\n\t int\t\tx\t= getSpawnLocation().getBlockX();\r\n\t int \ty \t= 0;\r\n\t int \tz\t= getSpawnLocation().getBlockZ();\r\n\t World\tw\t= getSpawnLocation().getWorld();\r\n\t \r\n\t item.teleport(new Location(w, x, y, z));\r\n\t\t\titem \t= null;\r\n\t\t}\r\n\t\tisVisible\t= false;\r\n\t}",
"private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n setVisible(false);\n \n }",
"@Override\n public void componentHidden(final ComponentEvent e) {\n // Do nothing\n }",
"@Override\n\tpublic JPanel obtenerPanel() {\n\t\treturn null;\n\t}"
] |
[
"0.77710235",
"0.7691442",
"0.7638738",
"0.7613693",
"0.76125133",
"0.76067823",
"0.7606302",
"0.7606302",
"0.7606302",
"0.7606302",
"0.7606302",
"0.7606302",
"0.7606302",
"0.7606302",
"0.7589128",
"0.75872946",
"0.7559452",
"0.7552929",
"0.75422454",
"0.7521087",
"0.7521087",
"0.7521087",
"0.7521087",
"0.7521087",
"0.7521087",
"0.7521087",
"0.7521087",
"0.7521087",
"0.7521087",
"0.75181973",
"0.75181973",
"0.7496614",
"0.74954116",
"0.74954116",
"0.74954116",
"0.74954116",
"0.74954116",
"0.74954116",
"0.74954116",
"0.74954116",
"0.74954116",
"0.74954116",
"0.74954116",
"0.74954116",
"0.74954116",
"0.74954116",
"0.74954116",
"0.74954116",
"0.74954116",
"0.74954116",
"0.74954116",
"0.74954116",
"0.74954116",
"0.74954116",
"0.7459001",
"0.7459001",
"0.7459001",
"0.7459001",
"0.74521273",
"0.74285513",
"0.74285513",
"0.74285513",
"0.74285513",
"0.7411981",
"0.7411981",
"0.7411981",
"0.73994976",
"0.73645025",
"0.7290253",
"0.72266865",
"0.72060883",
"0.7202851",
"0.71564114",
"0.7082231",
"0.7012473",
"0.6999217",
"0.6947471",
"0.69469166",
"0.68962955",
"0.6854609",
"0.68371373",
"0.68321854",
"0.68301326",
"0.6810256",
"0.6773906",
"0.67723817",
"0.6765982",
"0.6741876",
"0.672031",
"0.6703223",
"0.67012584",
"0.6700214",
"0.669015",
"0.66774565",
"0.6632108",
"0.6607914",
"0.65951204",
"0.65919465",
"0.6554834",
"0.65530264",
"0.6541212"
] |
0.0
|
-1
|
Popups event handling end
|
private void resetMouseCursor() {
GameContainer c = Main.getInstance().getContainer();
c.setDefaultMouseCursor();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void triggerPopup();",
"@Override\n\t\t\tpublic void onClickedPopup(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\tif(e.isPopupTrigger())\n\t\t\t\t{\n\t\t\t\t\tpopup.show(e.getComponent(), e.getX(), e.getY());\n\t\t\t\t}\n\t\t\t}",
"public void getPopup() {\n\t\t\tglobal.btnClick(popup);\n\t\t}",
"public void createPopupWindow() {\r\n \t//\r\n }",
"public void actionPerformed(ActionEvent e) {\r\n\t\t\t\tpopup.show(mainpanel , 660, 40);\r\n\t\t\t}",
"private void popUp() {\n\tpop = new RoomPopUp(this);\n\tnoPopUp = false;\n }",
"@Override\n\t\tpublic void mousePressed(final MouseEvent e) {\n\t\t\tif (e.isPopupTrigger()) {\n\t\t\t\tpopUp(e);\n\t\t\t}\n\t\t}",
"@Override\n\t\tpublic void popupMenuWillBecomeVisible(PopupMenuEvent e) {\n\n\t\t}",
"@Override\r\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\tsuper.mouseClicked(e);\r\n\t\t\tif(e.isPopupTrigger()){\r\n\t\t\t\tdoClick(e);\r\n\t\t\t\tjPopupMenu.show((Component)e.getSource(), e.getX(), e.getY());\r\n\t\t\t}\r\n\t\t}",
"protected Popup() {}",
"public void mousePressed(MouseEvent e) {\r\n maybeShowPopup(e);\r\n }",
"public void mouseReleased(MouseEvent e) {\r\n maybeShowPopup(e);\r\n }",
"public void showPopup(WMSEvent evt) {\n JPanel target = mainPanel;\n JPanel panel = null;\n try {\n panel = JPanel.class.cast(evt.getSource());\n } catch (ClassCastException e) {\n// log.write(\"Exception: \" + e.getMessage());\n }\n if (panel != null) {\n target = panel;\n }\n if (evt.getMessage() == WMSMessage.POPERR) {\n JOptionPane.showMessageDialog(target, evt.getUserMessage(), afMgr.getProductName() + \" Error\",\n JOptionPane.ERROR_MESSAGE);\n } else if (evt.getMessage() == WMSMessage.POPWARN) {\n JOptionPane.showMessageDialog(target, evt.getUserMessage(), afMgr.getProductName() + \" Warning\",\n JOptionPane.WARNING_MESSAGE);\n } else if (evt.getMessage() == WMSMessage.POPMESS) {\n JOptionPane.showMessageDialog(target, evt.getUserMessage(), afMgr.getProductName() + \" Info\",\n JOptionPane.INFORMATION_MESSAGE);\n } else if (evt.getMessage() == WMSMessage.POPDEBUG) {\n if (getLevel().testMoreVerbose(level)) {\n JOptionPane.showMessageDialog(target, evt.getUserMessage(), afMgr.getProductName() + \" Debug\",\n JOptionPane.PLAIN_MESSAGE);\n }\n }\n }",
"@Override\n public void onClick(View v) {\n popup.setOnMenuItemClickListener (new PopupMenu.OnMenuItemClickListener () {\n public boolean onMenuItemClick(MenuItem item) {\n GlobalVariables.indexCityChosen = GlobalVariables.popUpIDToCityIndex.get (item.getItemId ());\n GlobalVariables.CURRENT_CITY_NAME = item.getTitle ().toString ();\n if (GlobalVariables.CITY_GPS != null &&\n item.getTitle ().equals (GlobalVariables.CITY_GPS) &&\n GPSMethods.getCityIndexFromName (GlobalVariables.CITY_GPS) >= 0) {\n currentCityButton.setText (item.getTitle () + \"(GPS)\");\n } else {\n currentCityButton.setText (item.getTitle ());\n }\n ArrayList<EventInfo> tempEventsList =\n FilterMethods.filterByCityAndFilterName (\n GlobalVariables.namesCity[GlobalVariables.indexCityChosen],\n GlobalVariables.CURRENT_FILTER_NAME,\n GlobalVariables.CURRENT_SUB_FILTER,\n GlobalVariables.CURRENT_DATE_FILTER,\n GlobalVariables.CURRENT_PRICE_FILTER,\n GlobalVariables.ALL_EVENTS_DATA);\n filtered_events_data.clear ();\n filtered_events_data.addAll (tempEventsList);\n eventsListAdapter.notifyDataSetChanged ();\n GlobalVariables.USER_CHOSEN_CITY_MANUALLY = true;\n return true;\n }\n });\n popup.show ();//showing popup menu\n }",
"public void mouseReleased(MouseEvent e) {\n\t\t\tshowPopup(e);\n\t\t}",
"public void showGenPopup() {\n\t\ttv_popupTitle.setText(R.string.title3);\n\t\ttv_popupInfo.setText(R.string.description3);\n\t\t\n\t\t// The code below assumes that the root container has an id called 'main'\n\t\t popup.showAtLocation(findViewById(R.id.anchor), Gravity.CENTER, 0, 0);\n\t}",
"public void mousePressed(MouseEvent e) {\n\t\t\tshowPopup(e);\n\t\t}",
"@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onClick(View view) {\n\n LayoutInflater inflater = (LayoutInflater)\n getSystemService(LAYOUT_INFLATER_SERVICE);\n final View popupView = inflater.inflate(R.layout.item_add_popup, null);\n\n // create the popup window\n int width = LinearLayout.LayoutParams.WRAP_CONTENT;\n int height = LinearLayout.LayoutParams.WRAP_CONTENT;\n boolean focusable = true; // lets taps outside the popup also dismiss it\n final PopupWindow popupWindow = new PopupWindow(popupView, width, height, focusable);\n\n // show the popup window\n // which view you pass in doesn't matter, it is only used for the window tolken\n popupWindow.showAtLocation(view, Gravity.CENTER, 0, 0);\n\n // dismiss the popup window when touched\n popupView.setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n popupWindow.dismiss();\n popupView.performClick();\n return true;\n }\n });\n\n\n //Handle the Ok button\n final EditText enterItemNameTextBox = (EditText) popupView.findViewById(R.id.enterItemNameTextBox);\n final Button popupOkButton = (Button) popupView.findViewById(R.id.item_popupOkButton);\n popupOkButton.setOnClickListener(new Button.OnClickListener(){\n\n @Override\n public void onClick(View view) {\n\n String new_item_name = enterItemNameTextBox.getText().toString().trim();\n\n if(!new_item_name.isEmpty()){\n db.insertItemToGroup(group_id, new_item_name);\n adapter.add_data_item(new MyListData(new_item_name, 0,0,0,0,0));\n\n items = db.groupItemsToHashmap(group_id);\n drawbars();\n\n popupWindow.dismiss();\n popupView.performClick();\n }\n else{\n enterItemNameTextBox.setError(\"Please enter an item name!\");\n }\n\n\n }\n });\n }",
"public void proceedOnPopUp() {\n Controllers.button.click(proceedToCheckOutPopUp);\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n helpPopUp();\n }",
"private void popupWindowOfOptions(View v) {\n \t \n \t\tOrderManager.clearOption();\n \t\t\n \t\tint nOrderBoardTextId = v.getId();\n \tOrder _Order = (Order) ResourceManager.get(nOrderBoardTextId);\n \tint nMenuDbId = _Order.MENU_ID;\n \tint nMenuResourceId = MenuManager.getResourceIdByDbId(nMenuDbId);\n \tMenu mMenu = MenuManager.getMenuByResourceId(nMenuResourceId);\n \t\n \tint nTempIdForCurrentOrder = IdManager.getRandomId();\n \tIdManager.setTemporaryId(nTempIdForCurrentOrder);\n \tResourceManager.put(nTempIdForCurrentOrder, _Order);\n \t\n try {\n \t\n \tint nPopupHeight = 760;\n \t\tint nPopupWith = 520;\n \t\n \tint nSubTitleHeight = 40;\n \tint nOptionListLayoutHeight = 210;\n \t\n \tString strMenuNameEng = mMenu.NAME_ENG;\n \tString strMenuNameOth = mMenu.NAME_OTH;\n \t\n \t// Popup layout\n LinearLayout popLayout = new LinearLayout(this);\n popLayout.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));\n popLayout.setGravity(Gravity.CENTER);\n popLayout.setBackgroundColor(0x22000000);\n \n \t // Inner layout\n \t LinearLayout innerLayout = new LinearLayout(this);\n \t innerLayout.setLayoutParams(new LayoutParams(nPopupWith-20,nPopupHeight-20));\n \t innerLayout.setPadding(10,10,10,10);\n \t innerLayout.setOrientation(LinearLayout.VERTICAL);\n \t innerLayout.setGravity(Gravity.CENTER);\n \t innerLayout.setBackgroundColor(0xddffffff);\n \t\t \n \t\t // title eng\n \t\t TextView tvTitleEng = new TextView(this);\n \t\t tvTitleEng.setGravity(Gravity.CENTER);\n \t\t tvTitleEng.setText(strMenuNameEng);\n \t\t tvTitleEng.setTextColor(0xff000000);\n \t\t tvTitleEng.setTextSize(23);\n \t\t tvTitleEng.setHeight(50);\n \t\t tvTitleEng.setWidth(470);\n \t\t \n \t\t // title oth\n \t\t TextView tvTitleOth = new TextView(this);\n \t\t tvTitleOth.setGravity(Gravity.TOP|Gravity.CENTER);\n \t\t tvTitleOth.setText(strMenuNameOth);\n \t\t tvTitleOth.setTextColor(0xff000000);\n \t\t tvTitleOth.setTextSize(13);\n \t\t tvTitleOth.setHeight(55);\n \t\t tvTitleOth.setWidth(470);\n \t\t \n \t\t // common option title\n \t\t TextView tvCO = new TextView(this);\n \t\t tvCO.setText(\"* Common Option\");\n \t\t tvCO.setPadding(10,0,0,0);\n \t\t tvCO.setTextSize(15);\n \t\t tvCO.setTextColor(0xff5f2d09);\n \t\t tvCO.setHeight(nSubTitleHeight);\n \t\t tvCO.setWidth(470);\n \t\t \n \t\t // common option layout\n \t\t ScrollView svCO = new ScrollView(this);\n \t\t svCO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t \n \t\t LinearLayout llCO = new LinearLayout(this);\n \t\t llCO.setLayoutParams(new LayoutParams(470,LayoutParams.WRAP_CONTENT));\n \t\t llCO.setPadding(15,10,10,10);\n \t\t llCO.setOrientation(LinearLayout.VERTICAL);\n \t\t llCO.setGravity(Gravity.TOP);\n \t\t \n \t\t showCommonOptions (mMenu, llCO);\n \t\t \t\n \t\t \tsvCO.addView(llCO);\n \t\t \t\n \t\t\t // specific option title\n \t\t\t \n \t\t TextView tvSO = new TextView(this);\n \t\t tvSO.setPadding(10,0,0,0);\n \t\t tvSO.setText(\"* Specific Option\");\n \t\t tvSO.setTextSize(15);\n \t\t tvSO.setTextColor(0xff5f2d09);\n \t\t tvSO.setHeight(nSubTitleHeight);\n \t\t tvSO.setWidth(470);\n \t \n \t\t ScrollView svSO = new ScrollView(this);\n \t\t svSO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t \n \t\t LinearLayout llSO = new LinearLayout(this);\n \t\t llSO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t llSO.setPadding(15,10,10,10);\n \t\t llSO.setOrientation(LinearLayout.VERTICAL);\n \t\t llSO.setGravity(Gravity.TOP);\n \t\n \t\t showSpecificOptions (mMenu, llSO);\n \t\t \n \t\t svSO.addView(llSO);\n \t\t \n \t\t // button group\n \t\t \n \t\t int nButtonHeight = 50;\n \t\t int nButtonWidth = 100;\n \t\t \n \t\t LinearLayout llButtonGroup = new LinearLayout(this);\n \t\t llButtonGroup.setLayoutParams(new LayoutParams(470,80));\n \t\t llButtonGroup.setPadding(10, 0, 10, 4);\n \t\t llButtonGroup.setOrientation(LinearLayout.HORIZONTAL);\n \t\t llButtonGroup.setGravity(Gravity.CENTER|Gravity.BOTTOM);\n \t\t \n \t\t // confirm button\n \t \n \t \tint nConfirmId = IdManager.getRandomId();\n \t\t Button btnConfirm = new Button(this);\n \t\t btnConfirm.setId(nConfirmId);\n \t\t btnConfirm.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnConfirm.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnConfirm.setText(CaptionManager.getCaption().CONFIRM);\n \t\t btnConfirm.setTextSize(13);\n \t\t \n \t\t // add options to an order\n \t\t btnConfirm.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \t\n \t\t\t \tOrder currentOrder = (Order)ResourceManager.get(IdManager.getTemporaryId());\n \t\t\t \t\n \t\t\t \tArrayList<Order> orderList = addOptionsToOrder(currentOrder);\n \t\t\t \tOrderManager.requestUpdateOptions(currentOrder,orderList);\n \t \t\t\t\tloadOrderBoard();\n \t \t\t\t\tOrderManager.clearOption();\n \t \t\t\t\t_PopupWindowOfOptions.dismiss();\n \t\t\t }\n \t\t });\n \t\t \n \t\t // cancel button\n \t\t Button btnCancel = new Button(this);\n \t\t btnCancel.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnCancel.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnCancel.setText(CaptionManager.getCaption().CANCEL);\n \t\t btnCancel.setTextSize(13);\n \t\t btnCancel.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \tOrderManager.clearOption();\n \t\t\t \t_PopupWindowOfOptions.dismiss();\n \t\t\t }\n \t\t });\n \t\t \n \t\t // detail button\n \t\t final int nTempId = 808080;\n \t\t Mapper.put(Integer.valueOf(nTempId), mMenu);\n \t\t \n \t\t Button btnDetail = new Button(this);\n \t\t btnDetail.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnDetail.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnDetail.setText(CaptionManager.getCaption().DETAIL);\n \t\t btnDetail.setTextSize(13);\n \t\t btnDetail.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \n \t\t\t \tMenu menu = (Menu)Mapper.get(Integer.valueOf(808080));\n \t\t\t \tint nMenuRscId = menu.RESOURCE_ID;\n \t\t\t \tpopupWindowDetail(nMenuRscId);\n \t\t\t }\n \t\t });\n \t\t\t \n \t llButtonGroup.addView(btnConfirm);\n \t llButtonGroup.addView(btnCancel);\n \t llButtonGroup.addView(btnDetail);\n \t \n \t\t innerLayout.addView(tvTitleEng);\n \t innerLayout.addView(tvTitleOth);\n \t innerLayout.addView(tvCO);\n \t innerLayout.addView(svCO);\n \t innerLayout.addView(tvSO);\n \t innerLayout.addView(svSO);\n \t innerLayout.addView(llButtonGroup);\n \t \n popLayout.addView(innerLayout);\n\n // show popup\n _PopupWindowOfOptions = new PopupWindow(popLayout, nPopupWith, nPopupHeight, true);\n _PopupWindowOfOptions.showAtLocation(popLayout, Gravity.CENTER, 0, 0);\n \t\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void popupModify() {\n\t\tboolean doNotShow = false;\n\t\tif (this instanceof Umlenkrolle && ((Umlenkrolle) this).isFree()) {\n\t\t\tdoNotShow = true;\n\t\t} else if (this instanceof DoppelUmlenkrolle) {\n\t\t\tdoNotShow = true;\n\t\t}\n\t\taufzugschacht.mainFrameShowOptionsFrame(this, doNotShow);\n\t}",
"@Override\n public void windowOpened(WindowEvent e)\n {\n\n }",
"ViewGroup activatePopupContainer();",
"boolean isPopUpOpened();",
"@Override\r\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\n\t\t}",
"void showPopup(MouseEvent e) {\n\t\tif (e.isPopupTrigger()) {\n\t\t\tpopup.show((Component) e.getSource(), e.getX(), e.getY());\n\t\t}\n\t}",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"private void showPopup(MouseEvent e) {\n if (e.isPopupTrigger()) {\n jPopupMenu1.show(e.getComponent(), e.getX(), e.getY());\n }\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n \n }",
"public void popup(String a){\n pop.setLayout(null);\n ControlAction c = new ControlAction();\n pop.setBounds(420, 320, 460, 160);\n pop.setBorder(new LineBorder(Color.BLACK, 2));\n //condition for showing popup message\n if(a.startsWith(\"1\")){\n mas.setText(\"Selamat Anda Telah Melakukan Peminjaman\");\n nolocker.setText(\"No. Locker Anda Yaitu 17\");\n yes.setVisible(false);\n no.setVisible(false);\n nolocker.setVisible(true);\n }else if(a.equals(WARN1)){\n mas.setText(\"Maaf Anda Telah Melakukan Peminjaman\");\n yes.setVisible(false);\n no.setVisible(false);\n nolocker.setVisible(false);\n }else if(a.equals(WARN2)){\n mas.setText(\"Maaf Anda Belum Melakukan Peminjaman\");\n yes.setVisible(false);\n no.setVisible(false);\n nolocker.setVisible(false);\n }else if(a.contains(\"BUKA\")){\n mas.setText(\"Anda Ingin Mengakhiri Peminjaman ?\");\n yes.setVisible(true);\n String key = a.substring(4);\n yes.setActionCommand(\"YES\"+key);\n no.setVisible(true);\n nolocker.setVisible(false);\n }else if(a.equals(NO)){\n mas.setText(\"Loker Anda Telah Terbuka\");\n yes.setVisible(false);\n no.setVisible(false);\n nolocker.setVisible(false);\n } \n mas.setFont(new Font(\"arial\", Font.BOLD, 20));\n mas.setOpaque(false);\n mas.setForeground(Color.BLACK);\n Dimension si1 = mas.getPreferredSize();\n mas.setBounds(10, 40, si1.width, si1.height);\n nolocker.setFont(new Font(\"arial\", Font.BOLD, 20));\n nolocker.setOpaque(false);\n nolocker.setForeground(Color.BLACK);\n Dimension si3 = nolocker.getPreferredSize();\n nolocker.setBounds(10, 70, si3.width, si3.height);\n //close button handling\n close.addActionListener(c);\n close.setActionCommand(EXIT);\n Dimension si2 = close.getPreferredSize();\n close.setBounds(420, 10, si2.width, si2.height);\n close.setBorder(BorderFactory.createEmptyBorder());\n close.setContentAreaFilled(false);\n //yes button handling\n yes.addActionListener(c);\n Dimension si4 = yes.getPreferredSize();\n yes.setBounds(100, 100, si4.width, si4.height);\n yes.setBorder(BorderFactory.createEmptyBorder());\n yes.setContentAreaFilled(false);\n //no button handling\n no.addActionListener(c);\n no.setActionCommand(NO);\n Dimension si5 = no.getPreferredSize();\n no.setBounds(250, 100, si5.width, si5.height);\n no.setBorder(BorderFactory.createEmptyBorder());\n no.setContentAreaFilled(false);\n //add to card3 top most layer\n card3.add(pop,6,0);\n }",
"private void handleGSCPop() {\n\t\tShell shell = new Shell(parent.getShell(), SWT.PRIMARY_MODAL | SWT.TOP);\n\t\tComposite composite = null;\n\t\ttry {\n\t\t\tif (null != composite && !composite.isDisposed()) {\n\t\t\t\tcomposite.dispose();\n\t\t\t}\n\t\t\tSalesOtherChargesPop ocPop = new SalesOtherChargesPop(shell, SWT.BORDER, false);\n\t\t\tcomposite = ocPop.loadComposite();\n\t\t\tOtherChargesDTO[] fromPop = ocPop.otherChargesDTO;\n\t\t\tif ( fromPop != null){\n\t\t\t\tgscDTO = fromPop;\n\t\t\t}\n\t\t\t//System.out.println(\"from gsc popup===>\"+gscDTO[0].getLrCharge());\n\t\t\t//System.out.println(\"from gsc popup==>\"+gscDTO[0].getGsc());\n\t\t} catch (Exception exception) {\n\t\t\texception.printStackTrace();\n\t\t}\n\t}",
"private void displayPopup(NativeEvent event, Element parent) {\n if (displayed) {\n return;\n }\n displayed = true;\n\n HorizontalPanel holder = new HorizontalPanel();\n SimplePanel arrow = new SimplePanel();\n arrow.addStyleName(\"arrow-left\");\n\n HTMLPanel panel = new HTMLPanel(tooltip);\n panel.addStyleName(\"panel\");\n\n holder.add(arrow);\n holder.add(panel);\n\n popup.clear();\n popup.add(holder);\n popup.addStyleName(StyleResource.INSTANCE.modal().tooltip());\n popup.show();\n popup.setPopupPosition(parent.getAbsoluteLeft() + 33, parent.getAbsoluteTop() + 2);\n }",
"@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}",
"public void popupMenuCanceled(PopupMenuEvent e) {\n \t\t\t\t\n \t\t\t}",
"@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowActivated(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowActivated(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowActivated(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowActivated(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowActivated(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\t\tpublic void windowOpened(WindowEvent e) {\n\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void windowOpened(WindowEvent e) {\n\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void windowOpened(WindowEvent e) {\n\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void windowOpened(WindowEvent e) {\n\n\t\t\t\t}",
"@Override\r\n\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\r\n\t\t}",
"@Override\r\n public void windowOpened(WindowEvent e) {\n }",
"public static void initializePopup(){\n\n popup = new PopupMenu();\n\n // Initialize menu items\n MenuItem exitItem = new MenuItem(\"Exit\");\n MenuItem pauseItem = new MenuItem(\"Pause\");\n MenuItem resumeItem = new MenuItem(\"Resume\");\n\n // Exit listener\n exitItem.addActionListener(arg0 -> System.exit(0));\n\n // Pause listener\n pauseItem.addActionListener(arg0 -> {\n paused = true;\n pauseItem.setEnabled(false);\n resumeItem.setEnabled(true);\n });\n\n // Resume listener\n resumeItem.addActionListener(arg0 -> {\n paused = false;\n pauseItem.setEnabled(true);\n resumeItem.setEnabled(false);\n });\n\n resumeItem.setEnabled(false);\n\n popup.add(resumeItem);\n popup.add(pauseItem);\n popup.add(exitItem);\n }",
"@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t\t\n\t}",
"private void eventActions() {\n\t\t// TODO Auto-generated method stub\n\t\tlblGradesSubj.addClickHandler(new GradeandSubjectFilter());\n\t\tlblStandards.addClickHandler(new StandardsFilter());\n\t\tlblGradesSubj.getElement().setAttribute(\"style\", \"background: #e5e5e5;\");\n\t\tstandardsPanel.setVisible(false);\n\t}",
"private void popupModify2te() {\n\t\tRolle rolle = (Rolle) this;\n\t\taufzugschacht.mainFrameShowOptionsFrame(rolle.getRolle2teUmschlingung(), true);\n\t}",
"@Override\n public void popupShown(PopupPanelManager.PopupEvent event) {\n if (popupButtonPanel.getSelectedButton() != null) {\n Rectangle selectionButtonBounds = popupButtonPanel.getSelectedButton()\n .getBounds();\n popupButtonPanel.scrollRectToVisible(selectionButtonBounds);\n }\n }",
"public void handleEvent(final Event e) {\n\t\t\tif (e.type == SWT.FocusOut) {\n\t\t\t\tscrollbarClicked = false;\n\t\t\t\t/*\n\t\t\t\t * Ignore this event if it's only happening because focus is\n\t\t\t\t * moving between the popup shells, their controls, or a\n\t\t\t\t * scrollbar. Do this in an async since the focus is not\n\t\t\t\t * actually switched when this event is received.\n\t\t\t\t */\n\t\t\t\te.display.asyncExec(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tif (isValid()) {\n\t\t\t\t\t\t\tif (scrollbarClicked || hasFocus()) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Workaround a problem on X and Mac, whereby at\n\t\t\t\t\t\t\t// this point, the focus control is not known.\n\t\t\t\t\t\t\t// This can happen, for example, when resizing\n\t\t\t\t\t\t\t// the popup shell on the Mac.\n\t\t\t\t\t\t\t// Check the active shell.\n\t\t\t\t\t\t\tShell activeShell = e.display.getActiveShell();\n\t\t\t\t\t\t\tif (activeShell == getShell()\n\t\t\t\t\t\t\t\t\t|| (infoPopup != null && infoPopup\n\t\t\t\t\t\t\t\t\t\t\t.getShell() == activeShell)) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * System.out.println(e);\n\t\t\t\t\t\t\t * System.out.println(e.display.getFocusControl());\n\t\t\t\t\t\t\t * System.out.println(e.display.getActiveShell());\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tclose();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Scroll bar has been clicked. Remember this for focus event\n\t\t\t// processing.\n\t\t\tif (e.type == SWT.Selection) {\n\t\t\t\tscrollbarClicked = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif (e.type == SWT.Resize) {\n\t\t\t\t// Do not close popup on resize for web version.\n\t\t\t\t// RAP raise too many resize event\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// For all other events, merely getting them dictates closure.\n\t\t\tclose();\n\t\t}",
"private void showPopWindow() {\n\t\tfinal PointerPopupWindow p = new PointerPopupWindow(this,\n\t\t\t\tgetResources().getDimensionPixelSize(R.dimen.popup_width));\n\t\tView convertView = setClickListener(p);\n\n\t\tp.setContentView(convertView);\n\t\tp.setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.pop_window_back)));\n\t\tp.setPointerImageRes(R.drawable.ic_popup_pointer);\n\t\tp.setAlignMode(PointerPopupWindow.AlignMode.CENTER_FIX);\n\t\tp.showAsPointer(photo);\n\t}",
"@Override public void windowOpened(WindowEvent evt) { }",
"@Override public void windowOpened(WindowEvent evt) { }",
"private void showPopup(View view) {\n PopupMenu popupMenu = new PopupMenu(context, view);\n final DataResult dataResult = (DataResult) view.getTag();\n MenuInflater menuInflater = popupMenu.getMenuInflater();\n menuInflater.inflate(R.menu.popup_data_result, popupMenu.getMenu());\n if (dataResult.isIs_clouded()) {\n popupMenu.getMenu().getItem(1).setEnabled(false);\n }\n popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.open_csv_data_result:\n openCSVDataResult(dataResult);\n break;\n case R.id.cloud_saved_data_result:\n cloudSavedDataResult(dataResult);\n break;\n case R.id.delete_data_result:\n deleteDataResult(dataResult);\n break;\n }\n return true;\n }\n });\n popupMenu.show();\n }",
"@Override\n\t\tpublic void popupMenuCanceled(PopupMenuEvent e) {\n\n\t\t}",
"@Override\n\t\t\tpublic void windowIconified(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowIconified(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowIconified(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowIconified(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowIconified(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}"
] |
[
"0.7694337",
"0.7641257",
"0.73633003",
"0.7345213",
"0.7198706",
"0.718891",
"0.70822823",
"0.6960151",
"0.68684673",
"0.6761931",
"0.66895473",
"0.66683793",
"0.6652052",
"0.6610314",
"0.65818864",
"0.6575438",
"0.65586257",
"0.6551778",
"0.6545152",
"0.6545152",
"0.6545152",
"0.6545152",
"0.6524519",
"0.6513681",
"0.6512416",
"0.6511755",
"0.65074974",
"0.6495354",
"0.6494213",
"0.646873",
"0.64436716",
"0.64436716",
"0.64375895",
"0.6431525",
"0.6422055",
"0.6422055",
"0.6422055",
"0.6422055",
"0.6422055",
"0.6422055",
"0.6422055",
"0.6422055",
"0.6422055",
"0.6422055",
"0.6422055",
"0.6422055",
"0.6422055",
"0.6422055",
"0.6422055",
"0.6422055",
"0.6422055",
"0.6422055",
"0.6422055",
"0.6422055",
"0.6422055",
"0.6418441",
"0.6407844",
"0.639667",
"0.6383268",
"0.63758767",
"0.6368027",
"0.6368027",
"0.6368027",
"0.6368027",
"0.6368027",
"0.6341553",
"0.6323114",
"0.6323114",
"0.63193715",
"0.6311067",
"0.6311067",
"0.6311067",
"0.6311067",
"0.6311067",
"0.63010436",
"0.63010436",
"0.63010436",
"0.63010436",
"0.62979525",
"0.6290715",
"0.6290256",
"0.6273295",
"0.6272581",
"0.6265148",
"0.6261506",
"0.62548536",
"0.6250379",
"0.62467694",
"0.62467694",
"0.62450343",
"0.6223952",
"0.6222834",
"0.6222834",
"0.6222834",
"0.6222834",
"0.6222834",
"0.62164205",
"0.62164205",
"0.62164205",
"0.62164205",
"0.62164205"
] |
0.0
|
-1
|
Created by tianzl on 2017/11/6.
|
public interface IUserBiz {
@GET("TestServlet")
Call<List<User>> getUsers();
@GET("{username}")
Call<User> getUser(@Path("username")String username);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"private static void cajas() {\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\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"private void poetries() {\n\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n public void init() {\n\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void sacrifier() {\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\r\n\tpublic void rozmnozovat() {\n\t}",
"private void init() {\n\n\t}",
"@Override\n void init() {\n }",
"@Override\n public void init() {\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public void mo38117a() {\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"private void kk12() {\n\n\t}",
"private void strin() {\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 jugar() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {}",
"public void gored() {\n\t\t\n\t}",
"private void m50366E() {\n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"public void mo4359a() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\r\n\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\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 protected void initialize() \n {\n \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}",
"protected boolean func_70814_o() { return true; }",
"@Override\r\n\tpublic void init() {}",
"@Override\n protected void init() {\n }",
"@Override\n public void memoria() {\n \n }",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tpublic void init() {\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"private void init() {\n\n\n\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo6081a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n public void initialize() { \n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"private void init() {\n }",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n }",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"static void feladat4() {\n\t}"
] |
[
"0.60324",
"0.593231",
"0.5765469",
"0.57604516",
"0.57604516",
"0.5759748",
"0.57570213",
"0.57333285",
"0.5686716",
"0.56586504",
"0.5637448",
"0.56060416",
"0.5590048",
"0.55885655",
"0.5564625",
"0.55593544",
"0.5557492",
"0.554691",
"0.5542339",
"0.553908",
"0.55389243",
"0.55389243",
"0.55389243",
"0.55389243",
"0.55389243",
"0.55352575",
"0.5528605",
"0.5519433",
"0.5519291",
"0.5502798",
"0.5500999",
"0.54894614",
"0.547925",
"0.5473037",
"0.5469531",
"0.54516065",
"0.54482734",
"0.54366213",
"0.54366213",
"0.54366213",
"0.5434402",
"0.5433544",
"0.54313445",
"0.54313445",
"0.5413975",
"0.54137224",
"0.5408222",
"0.54079664",
"0.5406175",
"0.54047",
"0.54047",
"0.54047",
"0.54047",
"0.54047",
"0.54047",
"0.54032016",
"0.54032016",
"0.54032016",
"0.53999317",
"0.53999317",
"0.5399228",
"0.5389922",
"0.5389922",
"0.5389922",
"0.5387667",
"0.5386323",
"0.5385525",
"0.53755724",
"0.5365088",
"0.5364941",
"0.5364941",
"0.5360202",
"0.53521323",
"0.5350051",
"0.5343198",
"0.53379893",
"0.53259367",
"0.5321242",
"0.5320727",
"0.5303063",
"0.53019553",
"0.5292632",
"0.5289469",
"0.5283761",
"0.5283761",
"0.5283761",
"0.5283761",
"0.5283761",
"0.5283761",
"0.5283761",
"0.52823937",
"0.52691466",
"0.52372414",
"0.5226404",
"0.5225279",
"0.52241904",
"0.5222459",
"0.52135867",
"0.5212436",
"0.52118367",
"0.51988095"
] |
0.0
|
-1
|
Inflate the menu; this adds items to the action bar if it is present.
|
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}",
"public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}",
"@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }"
] |
[
"0.72461367",
"0.7201596",
"0.7195268",
"0.7177002",
"0.71069986",
"0.7039653",
"0.70384306",
"0.70115715",
"0.7010647",
"0.69803435",
"0.6945406",
"0.69389313",
"0.6933442",
"0.69172275",
"0.69172275",
"0.6890826",
"0.6883689",
"0.687515",
"0.6874831",
"0.68615955",
"0.68615955",
"0.68615955",
"0.68615955",
"0.68522274",
"0.6846375",
"0.68189865",
"0.68165565",
"0.68124795",
"0.6812267",
"0.6812267",
"0.68056566",
"0.6800461",
"0.6797465",
"0.6790805",
"0.6789039",
"0.6787885",
"0.6782993",
"0.67597246",
"0.67570525",
"0.6747535",
"0.6743268",
"0.6743268",
"0.6740546",
"0.67395175",
"0.67256093",
"0.6723954",
"0.6722248",
"0.6722248",
"0.6720444",
"0.67118156",
"0.6706721",
"0.6704184",
"0.66993994",
"0.66988564",
"0.669681",
"0.66943884",
"0.66860807",
"0.668306",
"0.668306",
"0.6682587",
"0.668012",
"0.6678661",
"0.6676379",
"0.6668044",
"0.66669863",
"0.66628903",
"0.6657356",
"0.6657356",
"0.6657356",
"0.66565585",
"0.665397",
"0.665397",
"0.665397",
"0.66525495",
"0.66518986",
"0.66496557",
"0.6648199",
"0.6646489",
"0.66462386",
"0.6646177",
"0.6645531",
"0.66453475",
"0.66446036",
"0.66438025",
"0.6642411",
"0.6641632",
"0.6638948",
"0.6634394",
"0.66336566",
"0.6632082",
"0.66315377",
"0.66315377",
"0.66315377",
"0.6628936",
"0.6627818",
"0.6627061",
"0.66256744",
"0.6623986",
"0.661993",
"0.6618369",
"0.6618369"
] |
0.0
|
-1
|
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
|
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
return id == R.id.action_settings || super.onOptionsItemSelected(item);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }"
] |
[
"0.7904066",
"0.7804976",
"0.7766218",
"0.7726716",
"0.7631313",
"0.76221544",
"0.7584775",
"0.7530617",
"0.74878734",
"0.7457033",
"0.7457033",
"0.74380976",
"0.7421477",
"0.7402898",
"0.7391322",
"0.7386477",
"0.73788774",
"0.7370012",
"0.7362617",
"0.73555875",
"0.73451835",
"0.73418057",
"0.73298967",
"0.73283297",
"0.7325109",
"0.7318501",
"0.73162323",
"0.7313179",
"0.7303658",
"0.7303658",
"0.7301155",
"0.7297718",
"0.7292956",
"0.7286341",
"0.72828627",
"0.72805357",
"0.7278157",
"0.72596914",
"0.72593665",
"0.72593665",
"0.72593665",
"0.7259005",
"0.724937",
"0.72248167",
"0.7219095",
"0.7217289",
"0.72042423",
"0.7200424",
"0.72000813",
"0.71935385",
"0.71848804",
"0.7178161",
"0.71682125",
"0.71670973",
"0.7153767",
"0.71535325",
"0.7136499",
"0.71345866",
"0.71345866",
"0.7129392",
"0.7128763",
"0.71239245",
"0.7122973",
"0.7122687",
"0.7122104",
"0.71169454",
"0.7116821",
"0.71165425",
"0.71165425",
"0.71165425",
"0.71165425",
"0.71160954",
"0.711461",
"0.711215",
"0.71094537",
"0.71084976",
"0.7105594",
"0.70996004",
"0.7098039",
"0.7095679",
"0.70935696",
"0.70935696",
"0.70862824",
"0.70829386",
"0.70803833",
"0.70799434",
"0.7073132",
"0.70682305",
"0.7061713",
"0.7060338",
"0.7060053",
"0.70512676",
"0.7037155",
"0.7037155",
"0.7035636",
"0.70352966",
"0.70352966",
"0.70329386",
"0.70302224",
"0.7029258",
"0.70191014"
] |
0.0
|
-1
|
time and space of O(nk) total coins total amount to look
|
public int change(int amount, int[] coins) {
Integer [][] memo = new Integer[coins.length][amount+1];
return helper(amount, coins, 0 , memo) ;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private static void find_coins(int[] d, int k, int n) {\n\t\t\n\t}",
"private double calculateMoneyInserted() {\r\n double amount = 0.0;\r\n\r\n for(VendingMachine.Coin coin : coins) {\r\n amount += coin.amount();\r\n }\r\n return amount;\r\n }",
"public static int coins(int n) {\n int[] coins = {1,5,10,25};\n int[] s = new int[n+1];\n for(int i=1; i<=n; i++) {\n for(int j=0; j<coins.length && j<=i; j++) {\n if(i-coins[j] == 0) {\n s[i]++;\n }\n if(i-coins[j] > 0) {\n s[i] += s[i-coins[j]];\n }\n }\n }\n return s[n];\n }",
"@Override\n public int howManyCoins() {\n return 7;\n }",
"static long getWays(int amount, int[] coins){\n long[] dp = new long[amount + 1];\n \n //ways to pay amount 0 is only 1 i.e. not to give any coin\n dp[0] = 1;\n \n //outer loop works on coin array\n for(int coin : coins){\n\n //inner loop works on dp array\n for(int i = 1; i < dp.length; i++){\n if(i >= coin){\n\n //adding the number ways to pay i-coin \n dp[i] += dp[i - coin];\n }\n }\n }\n\n //returning no of ways to pay amount. \n return dp[amount];\n }",
"public int coinNeededBU(int[] coins, int amount, int n) {\n int dp[] = new int[amount + 1];\n Arrays.fill(dp, Integer.MAX_VALUE);\n\n dp[0] = 0;\n for (int rupay = 1; rupay <= amount; rupay++) {\n\n //Iterating over Coins\n for (int i = 0; i < n; i++) {\n\n if (rupay - coins[i] >= 0) {\n int smallAnswer = dp[rupay - coins[i]];\n //if (smallAnswer != Integer.MAX_VALUE) {\n dp[rupay] = Math.min(dp[rupay], smallAnswer + 1);\n //}\n }\n }\n }\n for (int i : dp) {\n System.out.print(i + \", \");\n }\n System.out.println();\n return dp[amount];\n }",
"static int coinChangeProblem1(int[] coins,int sum){\n int n = coins.length;\n int[][] dp = new int[n+1][sum+1];\n\n for(int j = 1;j<=sum;j++){\n dp[0][j] = 0;\n }\n for(int i = 0;i<=n;i++){\n dp[i][0] = 1;\n }\n\n for(int i = 1;i<=n;i++){\n for(int j = 1;j<=sum;j++){\n if(coins[i-1]<=j){\n dp[i][j] = dp[i-1][j] + dp[i][j-coins[i-1]];\n }else dp[i][j] = dp[i-1][j];\n }\n }\n return dp[n][sum];\n }",
"private static int sum(int[] coins,int coinsCount,int startIndex){\n int sum = 0;\n for(int c1=startIndex;c1<startIndex+coinsCount;c1++){\n sum += coins[c1];\n }\n return sum;\n }",
"private static int totalNumberOfWays(int[] coins, int sum) {\n\t\tif(coins.length == 0 || sum <=0) {\n\t\t\treturn 0;\n\t\t}\n\t\t// find the length of total denomination\n\t\tint numberOfCoins = coins.length;\n\t\t//create a matrix\n\t\tint [][]arr = new int[numberOfCoins][sum+1];\n\t\tfor(int i = 0; i < numberOfCoins; i++) {\n\t\t\tarr[i][0] = 1;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < numberOfCoins; i++) {\n\t\t for(int j = 1; j <= sum; j++) {\n\t\t \n\t\t int includingCurrentCoin = 0;\n\t\t int excludingCurrentCoin = 0;\n\t\t \n\t\t if(coins[i] <= j) {\n\t\t includingCurrentCoin = arr[i][j - coins[i]];\n\t\t }\n\t\t \n\t\t if(i > 0) {\n\t\t excludingCurrentCoin = arr[i - 1][j];\n\t\t }\n\t\t \n\t\t arr[i][j] = includingCurrentCoin + excludingCurrentCoin;\n\t\t }\n\t\t } \n\t\treturn arr[numberOfCoins - 1][sum];\n\t}",
"private int calculateTotalHeads() { //kept a separate method with a specific purpose instead of writing code in main\n\t\t//no need to static method, althouth static won't hurt in such a small code\n\t\tint headsCount = 0;\n\t\tfor (int currentCoinNo = 1; currentCoinNo <= noCoins; currentCoinNo++) { \n\t\t\tif(isHead(currentCoinNo)) {\n\t\t\t\theadsCount++;\n\t\t\t}\n\t\t}\n\t\treturn headsCount;\n\t}",
"BigInteger getTotalDifficulty();",
"private static int minCoins_bottom_up_dynamic_approach(int[] coins, int amount) {\n if (coins == null || coins.length == 0) return 0;\n if (amount < 0) return 0;\n\n int memo[][] = new int[coins.length + 1][amount + 1];\n\n // populate first row\n for (int col = 0; col <= amount; col++) {\n memo[0][col] = 0;// Important. always initialize 1st row with 1s\n }\n\n // populate first col\n for (int row = 0; row < coins.length; row++) {\n memo[row][0] = 0;// Important. initialize 1st col with 1s or 0s as per your need as explained in method comment\n }\n\n /*\n populate second row\n\n if amount(col) <= coin value, then one coin is required with that value to make that amount\n if amount(col) > coin value, then\n total coins required = amount/coin_value, if remainder=0, otherwise amount/coin_value+1\n */\n for (int col = 1; col <= amount; col++) {\n if (col <= coins[0]) {\n memo[1][col] = 1;\n } else {\n int quotient = col / coins[0];\n\n memo[1][col] = quotient;\n\n int remainder = col % coins[0];\n if (remainder > 0) {\n memo[1][col] += 1;\n }\n }\n }\n\n // start iterating from second row\n for (int row = 2; row < memo.length; row++) {\n // start iterating from second col\n for (int col = 1; col < memo[row].length; col++) {\n\n int coin = coins[row - 1];\n\n // formula to find min required coins for an amount at memo[row][col]\n if (coin > col) { // if coin_value > amount\n memo[row][col] = memo[row - 1][col]; // reserve prev row's value (value determined for prev coins)\n } else {\n memo[row][col] = Math.min(memo[row - 1][col], memo[row][col - coin]) + 1; // min(value determined by prev coins - prev row, value at amount=current_amount-coin_value) + 1\n }\n }\n }\n\n printMemo(coins, memo);\n\n return memo[memo.length - 1][memo[0].length - 1]; // final value is stored in last cell\n }",
"private void countChange() {\n /* To make 0.00, we use 0 coins. */\n myIndices[0] = 0;\n \n /* \n * Work from subproblem $0.01 to target. \n * Because subproblems overlap, we will\n * store them and use them dynamically.\n */\n for (int curr = 1; curr <= myTarget; curr++) {\n /* \n * Adds one coin (current-next used) to\n * the preemptive minimum coins needed.\n */\n myIndices[curr] = getMinPrior(curr) + 1;\n }\n \n myMinCoins = myIndices[myTarget];\n }",
"public int coinChange(int[] coins, int amount) {\n int[] f = new int[amount + 1];\n return search(coins, amount, f);\n }",
"public int giveChange(Coin coinType)\n {\n numberofcoins = 0;\n while(balance> coinType.getValue()-1E-12){\n numberofcoins++;\n balance = balance - coinType.getValue();\n }\n System.out.println(balance);\n System.out.println(numberofcoins);\n return numberofcoins;\n }",
"public int getNumberOfCoins() {\n return coins;\n }",
"public int change(int amount, int[] coins) {\n if(coins == null) {\n return 0;\n }\n int[][] dp = new int[coins.length + 1][amount + 1];\n int m = dp.length, n = dp[0].length;\n for(int i = 0; i < m; i++) {\n dp[i][0] = 1;\n }\n for(int i = 1; i < m; i++){\n for(int j = 1; j < n; j++) {\n if(j < coins[i - 1]) {\n dp[i][j] = dp[i - 1][j];\n } else {\n dp[i][j] = dp[i - 1][j] + dp[i][j - coins[i - 1]];\n }\n }\n }\n return dp[m - 1][n - 1];\n }",
"public int coinChange(int[] coins, int amount) {\n if (coins == null || coins.length == 0) return 0;\n \n Arrays.sort(coins);\n\n memo = new int[amount + 1][coins.length];\n \n ans = dfs(coins, amount, coins.length - 1);\n\n return ans == Integer.MAX_VALUE ? -1 : ans;\n }",
"public int getCoinsNum();",
"public static ArrayList<Integer> get(int[] coins, int amount) {\n // table for minimum number of coins for each value up to amount\n int[] numCoins = new int[amount + 1];\n // table for the last coin used for each value up to amount\n int[] lastCoin = new int[amount + 1];\n numCoins[0] = 0;\n lastCoin[0] = 0;\n \n \n int p = 0;\n for(int k = 0; k < coins.length; k++){\n p += coins[k];\n }\n \n //if array is empty, throws the exception\n if(p == 0){\n throw new IllegalArgumentException(\"Array of size 0 is not allowed\");\n }\n \n \n // iterate through each value up to amount\n for (int i = 1; i <= amount; i++) {\n int min = Integer.MAX_VALUE;\n int used = 0;\n // iterate through coins\n for (int coin: coins) {\n // if the coin is less than the value\n if (coin <= i) {\n // and using the coin results in using less coins overall\n if (1 + numCoins[i - coin] < min) {\n // update the min number of coins\n min = 1 + numCoins[i - coin];\n // and the last coin used\n used = coin;\n }\n }\n }\n // set min number of coins for the value\n numCoins[i] = min;\n // and the last coin used for the value\n lastCoin[i] = used;\n }\n \n // create an array list to store used coins\n ArrayList<Integer> coinsUsed = new ArrayList();\n \n // get first coin\n int last = lastCoin[amount];\n int remaining = amount;\n \n // while there is more change\n while (last != 0) {\n // get next coin and redo\n coinsUsed.add(last);\n remaining = remaining - last;\n last = lastCoin[remaining];\n }\n \n return coinsUsed;\n }",
"private static int minCoins_my_way_one_coin_of_one_value_case(int[] coins, int startIndex, int endIndex, int amount) {\n\n if (coins.length == 0) return 0;\n\n if (startIndex == endIndex) {\n int currentCoin = coins[startIndex];\n\n if (currentCoin == amount) { // coins=(8) amount=8\n return 1;\n }\n if (currentCoin > amount) { // coins=(9) amount=8\n return 0;\n }\n if (currentCoin < amount) { // coins=(1) amount=8\n return 0; // this code changes when you can use infinite number of same coin\n }\n }\n\n // IMPORTANT:\n // Even though, amount is changing in recursive call, you don't need an exit condition for amount because amount will never become 0 or less than 0\n // amount is changing in recursive call when currentCoin < amount and it is doing amount-currentCoin. It means that amount will never become 0 or less than 0\n /*\n if (amount == 0) {\n return 0;\n }\n */\n\n int currentCoin = coins[startIndex];\n\n int minUsingCurrentCoin = 0;\n\n if (currentCoin == amount) {// coins=(8,9) amount=8\n // WRONG - if you see recursive call, you are trying to use remaining array (8) to make amount (8)\n // You are trying to make full amount using remaining array. It means that you will not be including currentCoin in coins that can make full amount.\n // Here, code should be all about including currentCoin in computation.\n /*\n minUsingCurrentCoin = 1\n int minUsingRemainingCoinsToMakeFullAmount = minCoins_my_way_one_coin_of_one_value_case(coins,startIndex+1, endIndex, amount)\n if(minUsingRemainingCoinsToMakeFullAmount > 0) {\n minUsingCurrentCoin = 1 + minUsingRemainingCoinsToMakeFullAmount\n }*/\n\n minUsingCurrentCoin = 1;\n } else if (currentCoin > amount) {// coins=(9,8) amount=8\n minUsingCurrentCoin = 0;\n // WRONG - if you see recursive call, you are trying to use remaining array (8) to make amount (8)\n // You are trying to make full amount using remaining array. It means that you will not be including currentCoin in coins that can make full amount.\n // Here, code should be all about including currentCoin in computation.\n // minUsingCurrentCoin = 0 + minCoins_my_way_one_coin_of_one_value_case(coins,startIndex+1, endIndex, amount);\n } else {\n /*\n case 1:\n coins = (1,6) amount=8\n currentCoin=1\n 1<8\n coinsRequiredUsingRemainingCoins=(6) to make amount (8-1=7) = 0\n coinsRequiredUsingRemainingCoinsAndAmount is 0, so by including current coin (1), you will not be able to make amount=8\n so, you cannot use (1) to make amount=8\n case 2:\n coins = (1,7) amount=8\n currentCoin=1\n 1<6\n coinsRequiredUsingRemainingCoins (7) And Amount (8-1=7) = 1\n so, coinsRequiredUsingCurrentCoin = 1 + coinsRequiredUsingRemainingCoinsAndAmount = 2\n\n */\n // this code changes when you can use infinite number of same coin\n int minUsingRestOfCoinsAndRestOfAmount = minCoins_my_way_one_coin_of_one_value_case(coins, startIndex + 1, endIndex, amount - currentCoin);\n if (minUsingRestOfCoinsAndRestOfAmount == 0) {\n minUsingCurrentCoin = 0;\n } else {\n minUsingCurrentCoin = 1 + minUsingRestOfCoinsAndRestOfAmount;\n }\n\n }\n\n // coins = (8,6) amount=8\n // minUsingCurrentCoin 8 to make amount 8 = 1\n // minWaysUsingRestOfTheCoins (6) to make amount 8 = 0\n // so, you cannot just blindly return Math.min(minUsingCurrentCoin, minWaysUsingRestOfTheCoins)\n // it will return 0 instead of 1\n int minWaysUsingRestOfTheCoins = minCoins_my_way_one_coin_of_one_value_case(coins, startIndex + 1, endIndex, amount);\n\n if (minWaysUsingRestOfTheCoins == 0 && minUsingCurrentCoin > 0) {\n return minUsingCurrentCoin;\n } else if (minWaysUsingRestOfTheCoins > 0 && minUsingCurrentCoin == 0) {\n return minWaysUsingRestOfTheCoins;\n }\n return Math.min(minUsingCurrentCoin, minWaysUsingRestOfTheCoins);\n\n }",
"public int coinChange(int[] coins, int amount) {\n int max = amount + 1; \n int[] dp = new int[amount + 1]; \n Arrays.fill(dp, max); \n dp[0] = 0; \n for (int i = 1; i <= amount; i++) {\n for (int j = 0; j < coins.length; j++) {\n if (coins[j] <= i) {\n dp[i] = Math.min(dp[i], dp[i - coins[j]] + 1);\n }\n }\n }\n return dp[amount] > amount ? -1 : dp[amount];\n }",
"public void countCoins() {\r\n\t\tthis.coinCount = 0;\r\n\t\tfor (int x = 0; x < WIDTH; x++) {\r\n\t\t\tfor (int y = 0; y < HEIGHT; y++) {\r\n\t\t\t\tif (this.accessType(x, y) == 'C')\r\n\t\t\t\t\tthis.coinCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public int coinChange(int[] coins, int amount) {\n int[][] dp = new int[coins.length + 1][amount + 1];\n // base case\n Arrays.fill(dp[coins.length], Integer.MAX_VALUE);\n dp[coins.length][0] = 0;\n // induction rule\n for (int i = coins.length - 1; i >= 0; i--) {\n for (int j = 0; j <= amount; j++) {\n dp[i][j] = dp[i + 1][j];\n int maxK = j / coins[i];\n // Notice 1: k must start from 1, because j - coins[i] might be less than 0.\n for (int k = 1; k <= maxK; ++k) {\n int prev = dp[i + 1][j - k * coins[i]];\n if (prev < Integer.MAX_VALUE) {\n // Notice 2: must explicity compare prev with MAX_VALUE,\n // because if prev is MAX, prev + k will become to MIN_VALUE\n dp[i][j] = Integer.min(dp[i][j], prev + k);\n }\n }\n }\n }\n return dp[0][amount] == Integer.MAX_VALUE ? -1 : dp[0][amount];\n }",
"private static int count(int amount, int coinValueIndex)\n {\n if (coinValueIndex == (coinValues.size() - 1))\n {\n return 1;\n }\n\n int res = 0;\n for (int i = 0; (coinValues.get(coinValueIndex) * i) <= amount; i++)\n {\n res += count(amount - (coinValues.get(coinValueIndex) * i), coinValueIndex + 1);\n }\n\n return res;\n }",
"public int getCoins() {\n return coins; //XXX-CHANGE-XXX\n }",
"private static int minCoins_my_way_infinite_coins_of_one_value_case(int[] coins, int startIndex, int endIndex, int amount) {\n\n if (coins.length == 0) return 0;\n\n if (startIndex == endIndex) {\n int currentCoin = coins[startIndex];\n\n if (currentCoin == amount) {// coins=(8) amount=8\n return 1;\n }\n if (currentCoin > amount) {// coins=(9) amount=8\n return 0;\n }\n if (currentCoin < amount) {\n // IMPORTANT: This code assumes that you can use only 1 coin of the same value (you can't use infinite number of coins of the same value).\n //return 0;\n\n // This code assumes that you can use infinite number of coins of the same value.\n // e.g. currentCoin=1 and amount=8, then 8 coins of 1s can be used\n if (amount % currentCoin == 0) { // coins=(1) amount=8 should return 8 because you can use 8 coins of value 1 to make amount=8\n return amount / currentCoin;\n }\n return 0; // coins=(3) amount=8 should return 0 because you can't use 1 or more coins of value 3 to make amount=8\n }\n }\n\n // IMPORTANT\n // You don't need any coin to make amount=0\n // By seeing recursive call, you will figure out that amount can reach to 0. So, you need an exit condition for amount==0\n if (amount == 0) {\n return 0;\n }\n\n int currentCoin = coins[startIndex];\n\n int minUsingCurrentCoin = 0;\n\n if (currentCoin == amount) {\n minUsingCurrentCoin = 1;\n } else if (currentCoin > amount) {\n minUsingCurrentCoin = 0;\n } else {\n /*\n if currentCoin=1 and amount=8, then maxNumberOfCoinsThatCanBeUsedToMakeAmount will be 8.\n if currentCoin=3 and amount=8, then maxNumberOfCoinsThatCanBeUsedToMakeAmount be 2\n you need to consider both these situations for coming up with the correct code\n\n Case 1:\n coins = (1,6) amount=8\n currentCoin=1. So, maxNumberOfCoinsThatCanBeUsedToMakeAmount = 8\n\n coin numberOfCurrentCoins(i) amountConsumedByCurrentCoin coinsUsedFromRemaining totalCoinsUsed\n remaining coins amount\n 1 1 1 (6) 7 = 0 0 (when you cannot make remaining amount using remaining coins, then you cannot make total amount including current coin also)\n 1 2 2 (6) 6 = 1 2+1=3\n 1 3 3 (6) 5 = 0 0\n 1 4 4 (6) 4 = 0 0\n 1 5 5 (6) 3 = 0 0\n 1 6 6 (6) 2 = 0 0\n 1 7 7 (6) 1 = 0 0\n 1 8 8 (6) 0 = 0 8 (special condition - even though you could not make remaining amount using remaining coins, you could make total amount using current coin)\n\n Case 2:\n coins = (3,6) amount=8\n currentCoin=3. So, maxNumberOfCoinsThatCanBeUsedToMakeAmount = 2\n\n coin numberOfCurrentCoins(i) amountConsumedByCurrentCoin coinsUsedFromRemaining totalCoinsUsed\n remaining coins amount\n 3 1 3 (6) 3 = 0 0 (when you cannot make remaining amount using remaining coins, then you cannot make total amount including current coin also)\n 3 2 6 (6) 2 = 0 0\n\n */\n int maxNumberOfCoinsThatCanBeUsedToMakeAmount = amount / currentCoin;\n\n int min = 0;\n\n for (int i = 1; i <= maxNumberOfCoinsThatCanBeUsedToMakeAmount; i++) {\n int amountConsumedByCurrentCoin = i * currentCoin;\n\n int minFromRemaining = minCoins_my_way_infinite_coins_of_one_value_case(coins, startIndex + 1, endIndex, amount - amountConsumedByCurrentCoin);\n\n if (minFromRemaining == 0) {// If I could not make remaining amount using remaining coins, then I cannot make total amount including current coin (except one special condition)\n if (amountConsumedByCurrentCoin == amount) {// special condition - even though you could not make remaining amount using remaining coins, you could make total amount using current coin\n min = i;\n } else {\n min = 0;\n }\n } else {\n min = i + minFromRemaining;\n }\n\n if (minUsingCurrentCoin == 0 && min > 0) {\n minUsingCurrentCoin = min;\n } else if (minUsingCurrentCoin > 0 && min == 0) {\n // don't change minUsingCurrentCoin\n } else {\n if (min < minUsingCurrentCoin) {\n minUsingCurrentCoin = min;\n }\n }\n }\n }\n\n int minWaysUsingRestOfTheCoins = minCoins_my_way_infinite_coins_of_one_value_case(coins, startIndex + 1, endIndex, amount);\n\n if (minWaysUsingRestOfTheCoins == 0 && minUsingCurrentCoin > 0) {\n return minUsingCurrentCoin;\n } else if (minWaysUsingRestOfTheCoins > 0 && minUsingCurrentCoin == 0) {\n return minWaysUsingRestOfTheCoins;\n }\n return Math.min(minUsingCurrentCoin, minWaysUsingRestOfTheCoins);\n\n }",
"public int getTotalCoins() {\r\n\t\treturn goods.get(Resource.COIN);\r\n\t}",
"int getChestsAmount();",
"private static String CalstealCoin(int[] arr) {\n\t\tString ans = \"Impossible\";\n\t\tint n=arr.length;\n\t\tArrayList<Double>al = new ArrayList<Double>();\n\t\tlong sum=0;\n\t\tfor(int num:arr){\n\t\t\tal.add((double) num);\n\t\t\tsum=sum+num;\n\t\t}\n\t\t//System.out.println(sum);\n\t\tdouble val=(((double)sum/n)*(n-1));\n\t\t//System.out.println(val);\n\t\tdouble val2=sum-val;\n\t\t//System.out.println(val2);\n\t\t//System.out.println(al);\n\t\tif(al.contains(val2)){\n\t\t\treturn String.valueOf(al.indexOf(val2)+1);\n\t\t}\n\t\treturn ans;\n\t}",
"public static int coinChangeDP(int n, int[] coins, int StartCoinIndex, HashMap<String, Integer> temp) {\n\t\tint Comb = 0;\n\t\tString tempKey = n + \"-\" + StartCoinIndex;\n\t\tfor(int i_coin=StartCoinIndex;i_coin<=(coins.length-1);i_coin++) {\n\t\t\tif(temp.containsKey(tempKey)) {\n\t\t\t\treturn temp.get(tempKey);\n\t\t\t}\n\t\t\tint remain = n - coins[i_coin];\n\t\t\t//System.out.println(remain);\n\t\t\tif(remain==0) {\t\t\t\t\n\t\t\t\tComb = Comb + 1;\n\t\t\t} else if (remain < 0) {\n\t\t\t\t// do nothing\n\t\t\t} else {\n\t\t\t\tComb = Comb + coinChangeDP(remain,coins,i_coin,temp);\n\t\t\t}\n\t\t}\n\t\ttemp.put(tempKey, Comb);\n\t\treturn Comb;\n\t}",
"cosmos.base.v1beta1.Coin getTotalDeposit(int index);",
"public int change(int amount, int[] coins) {\n int[] combinations = new int [amount + 1];\n combinations[0] = 1;\n for (int coin : coins) {\n for (int intermediateAmount = coin; intermediateAmount <= amount; intermediateAmount++) {\n combinations[intermediateAmount] += combinations[intermediateAmount - coin];\n }\n }\n return combinations[amount];\n }",
"public int coinChange(int[] coins, int amount) {\r\n if (coins == null || coins.length == 0)\r\n return -1;\r\n\r\n if (amount <= 0)\r\n return 0;\r\n\r\n int dp[] = new int[amount + 1];\r\n for (int i = 1; i < dp.length; i++) {\r\n dp[i] = Integer.MAX_VALUE;\r\n }\r\n\r\n for (int am = 1; am < dp.length; am++) {\r\n for (int i = 0; i < coins.length; i++) {\r\n if (coins[i] <= am) {\r\n int sub = dp[am - coins[i]];\r\n if (sub != Integer.MAX_VALUE)\r\n dp[am] = Math.min(sub + 1, dp[am]);\r\n }\r\n }\r\n }\r\n return dp[dp.length - 1] == Integer.MAX_VALUE ? -1 : dp[dp.length - 1];\r\n }",
"public int getToalCoins()\n\t{\n\t\treturn CoinCount;\n\t}",
"public int coinChange(int[] coins, int amount) {\n if (amount < 1) return 0;\n return helper(coins, amount, new int[amount + 1]);\n }",
"private static int maxMoney(int[] coins,int coinsCount,int startIndex){\n int maxScore = 0;\n if(coinsCount==1) maxScore = coins[startIndex];\n else{\n maxScore = Math.max(coins[startIndex]+sum(coins,coinsCount-1, startIndex+1)-maxMoney(coins,coinsCount-1, startIndex+1),\n coins[coinsCount+startIndex-1]+sum(coins,coinsCount-1,startIndex)-maxMoney(coins,coinsCount-1,startIndex));\n }return maxScore;\n }",
"Double getTotalSpent();",
"public int coinChange(int[] coins, int amount) {\n Arrays.sort(coins); // greedy. Iterate from largest value\n \n int[] ans = new int[]{Integer.MAX_VALUE};\n helper(coins.length - 1, coins, amount, 0, ans);\n \n return ans[0] == Integer.MAX_VALUE ? -1 : ans[0];\n }",
"private BigInteger computeTotalWays(){\n Map<BigInteger, Integer> sumdices = new ConcurrentHashMap<>();\n dice.stream()\n .map( die -> new BigInteger(die.getSides().toString()) )\n .forEach((c) -> {\n sumdices.compute(c, (k,v) -> {return v == null ? 1 : v + 1; });\n });\n \n // How many ways to roll a die are in total.\n return sumdices.entrySet().stream()\n .map(e -> { return e.getKey().pow(e.getValue()); })\n .reduce(BigInteger.ZERO, (a,b) -> a.add(b) );\n \n }",
"public int generateCoins() {\n\t\n Entity e = new Coin();\n\t\n int c = rand.nextInt(6) + 1;\n int r = rand.nextInt(c) + 1;\n\n int w = e.getWidth();\n int h = e.getHeight();\n\t\n int y = rand.nextInt(mMap.getBottomBound() - r * h);\n int x = 1000;\n\n e.setRelativeVelocity(mGame.getPlayer().getVelocity());\n e.setPosition(x, y);\n mGame.addEntity(e);\n\n // Generates a group of coins\n for(int i = 0; i < r; i++) {\n for(int j = 0; j < c; j++) {\n if(i == 0 && j == 0) continue;\n\n e = new Coin();\n e.setRelativeVelocity(mGame.getPlayer().getVelocity());\n e.setPosition(x + w * j, y + h * i);\n mGame.addEntity(e);\n }\n }\n\n return w * c;\n }",
"private void calcCoins() {\n\t\tint changeDueRemaining = (int) Math.round((this.changeDue - (int) this.changeDue) * 100);\n\n\t\tif (changeDueRemaining >= 25) {\n\t\t\tthis.quarter += changeDueRemaining / 25;\n\t\t\tchangeDueRemaining = changeDueRemaining % 25;\n\t\t}\n\t\tif (changeDueRemaining >= 10) {\n\t\t\tthis.dime += changeDueRemaining / 10;\n\t\t\tchangeDueRemaining = changeDueRemaining % 10;\n\t\t}\n\t\tif (changeDueRemaining >= 5) {\n\t\t\tthis.nickel += changeDueRemaining / 5;\n\t\t\tchangeDueRemaining = changeDueRemaining % 5;\n\t\t}\n\t\tif (changeDueRemaining >= 1) {\n\t\t\tthis.penny += changeDueRemaining / 1;\n\t\t}\n\t}",
"public void takeoutMoney (double amount) {\n if(amount >= 2.0) {\n int numberToRemove = (int) Math.min(getToonie(), amount / 2.0);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 2.0) {\n coins.remove(j);\n break;\n }\n }\n }\n NToonie -= numberToRemove;\n amount -= 2.0 * numberToRemove;\n }\n if(amount >= 1.0) {\n int numberToRemove = (int) Math.min(getLoonie(), amount / 1.0);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 1.0) {\n coins.remove(j);\n break;\n }\n }\n }\n NLoonie -= numberToRemove;\n amount -= 1.0 * numberToRemove;\n }\n if(amount >= 0.25) {\n int numberToRemove = (int) Math.min(getQuarter(), amount / 0.25);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 0.25) {\n coins.remove(j);\n break;\n }\n }\n }\n NQuarter -= numberToRemove;\n amount -= 0.25 * numberToRemove;\n }\n if(amount >= 0.1) {\n int numberToRemove = (int) Math.min(getDime(), amount / 0.1);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 0.1) {\n coins.remove(j);\n break;\n }\n }\n }\n NDime -= numberToRemove;\n amount -= 0.1 * numberToRemove;\n }\n if(amount >= 0.05) {\n int numberToRemove = (int) Math.min(getNickel(), amount / 0.05);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 0.05) {\n coins.remove(j);\n break;\n }\n }\n }\n NNickel -= numberToRemove;\n amount -= 0.05 * numberToRemove;\n }\n }",
"public BigDecimal getCoins() {\n return coins;\n }",
"private static int min_coins(int[] d, int k) {\n\t\t\n\t\treturn -1;\n\t}",
"public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] line = br.readLine().split(\" \");\n\t\tint n = Integer.parseInt(line[0]);\n\t\tint k = Integer.parseInt(line[1]);\n\t\tcoins = new int[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tcoins[i] = Integer.parseInt(br.readLine().trim());\n\t\t}\n\t\tArrays.sort(coins);\n\t\td = new int[k+1];\n\t\tArrays.fill(d, -1);\n\t\td[0] = 0;\n\t\tfor(int i = 0; i<=k; i++) {\n\t\t\tif(d[i] < 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor(int j=0;j<n;j++) {\n\t\t\t\tif(i + coins[j] > k) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(d[i+coins[j]] < 0 || d[i+coins[j]] > d[i] + 1) {\n\t\t\t\t\td[i+coins[j]] = d[i] + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(d[k]);\n\t}",
"public int getCoinCount() {\n return coinCount;\n }",
"public int getTotal(){\n\t\tif (getDistance() < N*1000){\n\t\t\treturn firstNKmCost;\n\t\t} else {\n\t\t\treturn firstNKmCost + (getDistance() - N * 1000 ) * costPerKm / 1000;\n\t\t}\n\t}",
"public int coinChange(int[] coins, int amount) {\n int[] num = new int[amount + 1];\n Arrays.fill(num, Integer.MAX_VALUE);\n // initial num\n num[0] = 0;\n for (int coin : coins) {\n if (coin <= amount)\n num[coin] = 1;\n }\n\n for (int i = 1; i <= amount; i++) {\n for (int coin : coins) {\n if (i - coin > 0 && 1 + num[i - coin] > 0) { // prevent int become negative\n num[i] = Math.min(num[i - coin] + 1, num[i]);\n }\n }\n }\n\n return num[amount] == Integer.MAX_VALUE ? -1 : num[amount];\n }",
"private static int count(int S[], int m, int n) {\n // If n is o then there is 1 solution\n if (n == 0 ) return 1;\n // If n is less than 0 then no solution exists\n if (n < 0 ) return 0;\n // If there are no coins and n >= 0, then no solution exists\n if (m <= 0 && n >= 1) return 0;\n\n // Count is sum of solution that do not contain mth coin && contain at least one coin mth.\n // Including S[m-1] && excluding S[m-1]\n return count(S, m-1, n) + count(S, m, n-S[m-1]);\n }",
"public static int sumCoins(int quarters, int dimes, int nickels, int pennies){\n \n return (quarters * 25) + (dimes * 10) + (nickels * 5) + (pennies) * 1;\n }",
"public int getCoins() {\r\n\t\treturn collectionManager.getCoins();\r\n\t}",
"public static void main(String[] args) {\n\n Solution solution = new Solution();\n\n int[] coins = null;\n int amount = 0;\n int expected = 0;\n int answer = 0;\n String format = \"%s, %d -> %d (%d)\";\n\n // [1, 2, 5], 11 -> 3\n coins = new int[]{1, 2, 5};\n amount = 11;\n expected = 3;\n answer = solution.coinChange(coins, amount);\n System.out.println(String.format(format, coins, amount, expected, answer));\n\n // [2], 3 -> -1\n coins = new int[]{2};\n amount = 3;\n expected = -1;\n answer = solution.coinChange(coins, amount);\n System.out.println(String.format(format, coins, amount, expected, answer));\n\n // [1, 2, 5], 21 -> 5\n coins = new int[]{1, 2, 5};\n amount = 21;\n expected = 5;\n answer = solution.coinChange(coins, amount);\n System.out.println(String.format(format, coins, amount, expected, answer));\n\n // [2, 7, 8, 10], 29 -> 4\n coins = new int[]{2, 7, 8, 10};\n amount = 29;\n expected = 4;\n answer = solution.coinChange(coins, amount);\n System.out.println(String.format(format, coins, amount, expected, answer));\n\n // [2, 5, 10, 1], 27 -> 4\n coins = new int[]{2, 5, 10, 1};\n amount = 27;\n expected = 4;\n answer = solution.coinChange(coins, amount);\n System.out.println(String.format(format, coins, amount, expected, answer));\n\n // [186, 419, 83, 408], 6249 -> 20\n coins = new int[]{186, 419, 83, 408};\n amount = 6249;\n expected = 20;\n answer = solution.coinChange(coins, amount);\n System.out.println(String.format(format, coins, amount, expected, answer));\n\n }",
"public static void main(String[] args)\n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint sum = scanner.nextInt();\n\t\tint arrLength = scanner.nextInt();\n\n\t\tint[] coins = new int[arrLength];\n\t\tfor (int i = 0; i < arrLength; i++)\n\t\t{\n\t\t\tcoins[i] = scanner.nextInt();\n\t\t}\n\n\t\tlong[][] board = new long[arrLength][sum + 1];\n\n\t\tfor (int i = 0; i < board.length; i++)\n\t\t{\n\t\t\tfor (int j = 0; j < board[0].length; j++)\n\t\t\t{\n\t\t\t\tif (j == 0)\n\t\t\t\t{\n\t\t\t\t\tboard[i][j] = 1;\n\t\t\t\t}\n\t\t\t\telse if (j < coins[i])\n\t\t\t\t{\n\t\t\t\t\tif (i > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tboard[i][j] = board[i - 1][j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (i > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tboard[i][j] = board[i - 1][j] + board[i][j - coins[i]];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tboard[i][j] = board[i][j - coins[i]];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(board[arrLength - 1][sum]);\n\t}",
"@Override\n public int tonKho() {\n return getAmount() - amountBorrow;\n }",
"public KualiDecimal getCoinTotal(CashDrawer drawer);",
"private static int minCoins_brute_force(int coins[], int coinsEndIndex, int amount) {\n // base case\n if (amount == 0) return 0;\n\n // Initialize result\n int res = Integer.MAX_VALUE;\n\n // Try every coin that has smaller value than amount\n for (int i = 0; i < coinsEndIndex; i++) {\n if (coins[i] <= amount) {\n int sub_res = minCoins_brute_force(coins, coinsEndIndex, amount - coins[i]);\n\n // Check for INT_MAX to avoid overflow and see if\n // result can minimized\n if (sub_res != Integer.MAX_VALUE && sub_res + 1 < res)\n res = sub_res + 1;\n }\n }\n return res;\n }",
"public double getBankMoney(){\n double total = 0.0;\n for(Coin c : bank){\n total += c.getValue();\n }\n return total;\n }",
"int getBlocksAmount();",
"@Override\n public String solve() {\n\n long firstCoin = 1504170715041707L;\n long modValue = 4503599627370517L;\n //System.out.println(\"Second Coin \" + (firstCoin - (4503599627370517L % firstCoin)));\n long secondCoin = firstCoin - (modValue % firstCoin);\n long ans = firstCoin + secondCoin;\n while(secondCoin > 1) {\n modValue = firstCoin;\n firstCoin = secondCoin;\n secondCoin = firstCoin - (modValue % firstCoin);\n //System.out.println(secondCoin);\n ans += secondCoin;\n }\n return Long.toString(ans);\n }",
"private static int coinChange(int[] arr,int n, int sum) {\n\t\tint[][] dp = new int[n+1][sum+1];\n\t\tfor(int i=0;i<n+1;i++) {\n\t\t\tdp[i][0]=1;\n\t\t}\n\t\tfor(int i=0;i<sum+1;i++) {\n\t\t\t\n\t\t\tif(i%arr[0]==0)\n\t\t\tdp[0][i]=i/arr[0];\n\t\t\telse\n\t\t\t\tdp[0][i]=0;\n\t\t}\n\t\t\n\t\tfor(int i=1;i<n+1;i++) {\n\t\t\tfor(int j=1;j<sum+1;j++) {\n\t\t\t\tif(arr[i-1]>j)\n\t\t\t\t\tdp[i][j]=dp[i-1][j];\n\t\t\t\telse\n\t\t\t\t\tdp[i][j]=Math.min(dp[i-1][j], dp[i][j-arr[i-1]]+1);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn dp[n][sum];\n\t}",
"@Test\n public void coinsC() throws EmptyListE {\n Coin quarter = new Coin(25);\n Coin dime = new Coin(10);\n Coin nickel = new Coin(5);\n Coin penny = new Coin(1);\n List<Coin> coins =\n new Node<>(quarter,\n new Node<>(dime, new Node<>(nickel, new Node<>(penny, new Empty<>()))));\n assertEquals(1, DP.coinChange(coins, 3));\n assertEquals(2, DP.coinChange(coins, 6));\n assertEquals(242, DP.coinChange(coins, 100));\n assertEquals(1, DP.bucoinChange(coins, 3));\n assertEquals(2, DP.bucoinChange(coins, 6));\n assertEquals(242, DP.bucoinChange(coins, 100));\n }",
"int count(int S[], int m, int n) {\n if (n == 0) return 1;\n\n // If n is less than 0 then no solution exists\n if (n < 0) return 0;\n\n // If there are no coins and n is greater than 0, then no solution exist\n if (m <= 0 && n >= 1) return 0;\n\n // count is sum of solutions (i) including S[m-1] (ii) excluding S[m-1]\n return count(S, m - 1, n) + count(S, m, n - S[m - 1]);\n }",
"public int getCoinCount() {\r\n\t\treturn this.coinCount;\r\n\t}",
"@Override\n public long totalBalances() {\n long total = 0;\n for(Account account : accounts.values()){\n total += account.balance();\n }\n return total;\n }",
"private long getValueRecursive(double amount, boolean isBuyOrder)\n\t{\n if (amount < 0)\n throw new RuntimeException(\"Cannot compute for amount <= 0 on material \" + getAbsoluteId());\n int calcAmount = (int)(amount+0.5);\n if (calcAmount == 0)\n return 0;\n \n /* Ending recursive case. I've heard that the math here\n * can look scary at first. */\n if (isRaw())\n {\n int blockQty = SQL.getInstance().sQuantity(blockName.toString());\n\n int leftover, end, start = blockQty;\n if (isBuyOrder) {\n leftover = calcAmount - (blockQty - minQty);\n end = leftover <= 0 ? blockQty - calcAmount + 1 : minQty + 1;\n } else {\n leftover = calcAmount - (maxQty - blockQty);\n end = leftover <= 0 ? blockQty + calcAmount - 1 : maxQty - 1;\n }\n\n double total;\n if (start == end)\n total = getPrice(start);\n else {\n total = getPrice(start) + getPrice(end);\n int entries;\n if (start > end)\n entries = start - end + 1;\n else\n entries = end - start + 1;\n\n if (entries % 2 == 0)\n total *= entries / 2;\n else\n total = total * ((entries - 1) / 2) + (total / 2);\n }\n if (leftover > 0)\n if (isBuyOrder)\n total += maxPrice * leftover;\n else\n total += minPrice * leftover;\n\n return (long)total;\n }\n\n //Recursive Step\n long costPerOne = 0;\n int ingredients = formula.getIngredientsCount();\n for (int i = 0; i < ingredients; i++)\n costPerOne += formula.getIngredient(i).getValueRecursive(formula.getIngredientCount(i), isBuyOrder);\n costPerOne /= produces;\n return calcAmount * costPerOne;\n\t}",
"public int getCoin() {\n return getStat(coin);\n }",
"private int totalInfeasibility(int[] chromosome) {\n\t\tint infeasibility = 0;\n\t\tint[] bins = new int[binCount];\n\t\tfor (int i = 0; i < chromosome.length; i++) {\n\t\t\tif (chromosome[i] >= bins.length) {\n\t\t\t\tinfeasibility += 10;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tbins[chromosome[i]] += packageWeights[i]; //put package into bin\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"noooo\");\n\t\t\t}\n\n\t\t}\n\n\t\tfor (int i = 0; i < bins.length; i++) {\n\t\t\tif (bins[i] > binSize)\n\t\t\t\tinfeasibility += bins[i] - binSize;\n\t\t}\n\t\treturn infeasibility;\n\t}",
"public int arrangeCoins(int n) { // score 7\n return (int) ((Math.sqrt(8 * n + 1) - 1) / 2);\n }",
"static BigInteger findSum(BigInteger n) {\n if (n.equals(BigInteger.ZERO))\n return BigInteger.ZERO;\n BigInteger TWO = BigInteger.valueOf(2);\n\n BigInteger sum = BigInteger.ZERO;\n sum = sum.add(\n n.multiply(n.add(BigInteger.ONE))\n .divide(TWO)\n );\n\n BigInteger flooredN = findFraction(n);\n sum = sum.add(\n n.multiply(flooredN)\n );\n\n sum = sum.subtract(\n flooredN.multiply(flooredN.add(BigInteger.ONE))\n .divide(TWO)\n );\n\n sum = sum.subtract(findSum(flooredN));\n\n return sum;\n }",
"public void addCoins(int coins) {\n total_bal += coins;\n }",
"static int distributeCandy(int[] score) {\n java.util.TreeMap<Integer,Integer> candcalmap=new java.util.TreeMap<Integer,Integer>();\n int totcand=0,numcan=1;\n /* for(int indx=1;indx<score.length;indx++)\n {\n while(score[indx-1]<(indx<score.length?score[indx]:Integer.MAX_VALUE))\n {\n numcan++;\n indx++;\n totcand+=numcan;\n //System.out.println(numcan+\"-\"+indx+\":\"+totcand);\n if(indx==score.length)\n break;\n }\n numcan=1;\n totcand+=numcan;\n \n }\n*/\tfor(int sc:score)\n {\n candcalmap.put(sc,candcalmap.get(sc)==null?1:candcalmap.get(sc)+1);\n }\n for(Map.Entry<Integer,Integer> e:candcalmap.entrySet())\n {\n totcand+=numcan*e.getValue();\n// System.out.println(e.getValue()+\"-\"+e.getKey()+\":\"+numcan+\" \"+totcand);\n numcan++;\n }\n return totcand;\n }",
"public static int numPennies(double money) {\n // REPLACE THIS WITH YOUR CODE\n return 0;\n }",
"public double findWeight(){\n int totalCoins = gold + silver + copper + electrum + platinum;\n if((totalCoins % 3) == 0){\n return totalCoins/3;\n }\n return totalCoins * weight;\n }",
"BigInteger getCount();",
"public int maxCoins(int[] nums) {\n if (nums == null || nums.length == 0) {\n return 0;\n }\n int len = nums.length;\n //composite new input array\n int[] input = new int[len + 2];\n for (int i = 1; i <= len; i++) {\n input[i] = nums[i - 1];\n }\n input[0] = 1;\n input[len + 1] = 1;\n boolean[][] visited = new boolean[len + 2][len + 2];\n int[][] dp = new int[len + 2][len + 2];\n return searchHelper(input, dp, visited, 1, len);\n }",
"private static int getChange(int m) {\n int[] change = new int[m+1];\n int[] coins = {1, 3, 4};\n for(int i = 1; i <= m; i++){\n \tchange[i] = Integer.MAX_VALUE;\n \tfor(int j = 0; j < 3; j++){\n \t\tif(i >= coins[j]){\n \t\t\tint temp = change[i-coins[j]] + 1;\n \t\t\tif (temp < change[i])\n \t\t\t\tchange[i] = temp;\n \t\t}\n \t}\n }\n return change[m];\n }",
"public double getBitcoins(){\r\n return bitcoins;\r\n }",
"public static String getChange(int amount){\n String result = \"\";\n for (Coins c : Coins.values()) {\n if(amount >= c.value()){\n int numberOfCoins = amount / c.value();\n amount = amount % c.value();\n result += c + \" : \" + numberOfCoins + \"\\n\";\n }\n }\n return result;\n }",
"public static void main(String[] args) {\n\t\tchar[][] matrix = {\t{'E', 'C', 'C', 'C', 'C'},\n\t\t\t\t\t\t\t{'C', '#', 'C', '#', 'E'},\n\t\t\t\t\t\t\t{'#', 'C', 'C', '#', 'C'},\n\t\t\t\t\t\t\t{'C', 'E', 'E', 'C', 'E'},\n\t\t\t\t\t\t\t{'C', 'E', '#', 'C', 'E'}\n \t\t\t};\n\t\t//1 - right & 0 - left\n\t\tint coins = getMaxCoinsRec(matrix, 0, 0, 1);\n\t\tSystem.out.println(\"Max Coins Rec : \"+ coins);\n\t\t\n\t\tint[][][] dp = new int[matrix.length][matrix[0].length][3];\n\t\tdp = Utils.fill3DMatrix(dp, -1);\n\t\tint countDP = getMaxCoinsDP(matrix, dp, 0, 0, 1 );\n\t\tSystem.out.println(\"Max Coins DP : \"+ countDP);\n\t}",
"public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }",
"public void setCoinCount(int coins){\n coinCount = coins;\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 }",
"int getBlockNumsCount();",
"int getBlockNumsCount();",
"static int getMoneySpent(int[] keyboards, int[] drives, int b) {\n int max = 0, sum = 0;\n for (int i = 0; i < keyboards.length; i++) {\n for (int j = 0; j < drives.length; j++) {\n sum = keyboards[i] + drives[j];\n\n if (sum >= max && sum <= b){\n max = sum;\n\n }\n }\n }\n\n if (max == 0) return -1;\n return max;\n\n }",
"public int maxCoins(int[] nums) {\n if (nums == null || nums.length == 0) {\n return 0;\n }\n int n = nums.length;\n //composite input\n int[] input = new int[n + 2];\n for (int i = 1; i <= n; i++) {\n input[i] = nums[i - 1];\n }\n input[0] = 1;\n input[n + 1] = 1;\n int[][] dp = new int[n + 2][n + 2];\n for (int len = 1; len <= n; len++) {\n //left moves between[1, n - len + 1]\n for (int left = 1; left <= n - len + 1; left++) {\n int right = left + len - 1; //right - left + 1 = len\n for (int k = left; k <= right; k++) {\n dp[left][right] = Math.max(dp[left][right], \n input[left - 1] * input[k] * input[right + 1] + dp[left][k - 1] + dp[k + 1][right]);\n }\n }\n }\n return dp[1][n];\n }",
"public int totalCostOfComponents( ){\n\t\tint total=0;\n\t\tfor (Component temp : components){\n\t\t\ttotal+=temp.getCost();\n\t\t}\n\t\treturn total;\n\t}",
"public static void main(String[] args) {\n\t\tArrayList<Integer> primelist = sieve(7071);\n\t\tArrayList<Double> second = new ArrayList<Double>();\n\t\tfor(int one : primelist) \n\t\t\tsecond.add(Math.pow(one, 2));\n\t\tArrayList<Double> third = new ArrayList<Double>();\n\t\tprimelist = sieve(368);\n\t\tfor(int one : primelist)\n\t\t\tthird.add(Math.pow(one, 3));\n\t\tArrayList<Double> fourth = new ArrayList<Double>();\n\t\tprimelist = sieve(84);\n\t\tfor(int one : primelist)\n\t\t\tfourth.add(Math.pow(one, 4));\n\n\t\tArrayList<Double> possibilities = new ArrayList<Double>();\n\t\tfor (int k = fourth.size() - 1; k >=0 ; k--) {\n\t\t\tfor (int j = 0; j < third.size(); j++) {\n\t\t\t\tdouble sum = fourth.get(k) + third.get(j);\n\t\t\t\tif (sum > 50000000)\n\t\t\t\t\tbreak;\n\t\t\t\telse {\n\t\t\t\t\tfor (int i = 0; i < second.size(); i++) {\n\t\t\t\t\t\tdouble nextsum = sum + second.get(i);\n\t\t\t\t\t\tif (nextsum > 50000000)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// I am not sure whether it can be proved that the sum is unique.\n\t\t\t\t\t\t\tif (!possibilities.contains(nextsum))\n\t\t\t\t\t\t\t\tpossibilities.add(nextsum);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint totalcount = possibilities.size();\n\t\tSystem.out.println(totalcount);\n\t}",
"double getTotalCost();",
"int getTotalLeased();",
"private int[] maxMoney(TreeNode root) {\n\t\tif (root == null) return new int[2];\n\t\tint[] ans = new int[2], l = maxMoney(root.left), r = maxMoney(root.right);\n\t\tans[0] = l[1] + r[1];\n\t\tans[1] = Math.max(root.val + l[0] + r[0], ans[0]);\n\t\treturn ans;\n\t}",
"@Override\n public long getTotalBalances() {\n return accountMap.values()\n .stream()\n .map(account -> account.getBalance())\n .reduce(0L, Long::sum);\n }",
"public int awardTriviaCoins (double pct) {\n Random r = new Random();\n int min = 1;\n if (pct > 0.75) {\n min = 15;\n } else if (pct > 0.5) {\n min = 10;\n } else if (pct > 0.25) {\n min = 5;\n }\n int winnings = min + (int)(Math.ceil(r.nextInt(10) * pct));\n this.coinCount += winnings;\n this.save();\n \n UserEvent.NewCoins message = new UserEvent.NewCoins(this.id, winnings);\n notifyMe(message);\n \n return winnings;\t \n\t}",
"public static void numOfWrappersAndCoins(BigDecimal penny, BigDecimal nickel, BigDecimal dime, BigDecimal quarter){\n // Find the approximate number of each individual coin type\n BigDecimal numOfPennies = penny.divide(new BigDecimal(\"2.50\"), RoundingMode.FLOOR);\n BigDecimal numOfNickels = nickel.divide(new BigDecimal(\"5\"), RoundingMode.FLOOR);\n BigDecimal numOfDimes = dime.divide(new BigDecimal(\"2.268\"), RoundingMode.FLOOR);\n BigDecimal numOfQuarters = quarter.divide(new BigDecimal(\"5.670\"), RoundingMode.FLOOR);\n\n /* Find the number of wrappers needed to hold each coin type, num of wrappers is always rounded up, even if the\n last wrapper would be left with some empty space.\n */\n BigDecimal numOfPennyWrappers = numOfPennies.divide(new BigDecimal(\"50\"), 0, RoundingMode.CEILING);\n BigDecimal numOfNickelWrappers = numOfNickels.divide(new BigDecimal(\"40\"),0, RoundingMode.CEILING);\n BigDecimal numOfDimeWrappers = numOfDimes.divide(new BigDecimal(\"50\"), 0, RoundingMode.CEILING);\n BigDecimal numOfQuarterWrappers = numOfQuarters.divide(new BigDecimal(\"40\"), 0, RoundingMode.CEILING);\n\n // Find total estimated value of each coin type\n BigDecimal penniesTotalValue = numOfPennies.multiply(new BigDecimal(\"0.01\"), new MathContext(3));\n BigDecimal nickelsTotalValue = numOfNickels.multiply(new BigDecimal(\"0.05\"), new MathContext(3));\n BigDecimal dimesTotalValue = numOfDimes.multiply(new BigDecimal(\"0.10\"), new MathContext(3));\n BigDecimal quartersTotalValue = numOfQuarters.multiply(new BigDecimal(\"0.25\"), new MathContext(3));\n\n System.out.println(\"Result: \\n\");\n System.out.println(\"Number of Pennies: \" + numOfPennies.intValue() + \"\\nWrappers: \" + numOfPennyWrappers +\n \"\\nTotal estimated value: $\" + penniesTotalValue + \"\\n\");\n System.out.println(\"Number of Nickels: \" + numOfNickels.intValue() + \"\\nWrappers: \" + numOfNickelWrappers +\n \"\\nTotal estimated value: $\" + nickelsTotalValue + \"\\n\");\n System.out.println(\"Number of Dimes: \" + numOfDimes.intValue() + \"\\nWrappers: \" + numOfDimeWrappers +\n \"\\nTotal estimated value: $\" + dimesTotalValue + \"\\n\");\n System.out.println(\"Number of Quarters: \" + numOfQuarters.intValue() + \"\\nWrappers: \" + numOfQuarterWrappers +\n \"\\nTotal estimated value: $\" + quartersTotalValue);\n }",
"public void addCoins (int n) {\n this.coinCount += n;\n this.coinsEarned += n;\n this.save();\n }",
"public static int[] mucScore(LeanDocument key, LeanDocument response)\n{\n // System.out.println(\"==========================================================\");\n // System.out.println(\"Key:\\n\"+key.toStringNoSing()+\"\\n*************************\\nResponse:\\n\"+response.toStringNoSing());\n\n Iterator<TreeMap<Integer, Integer>> goldChains = key.chainIterator();\n // double mucRecall = 0.0;\n int mucRecallNom = 0;\n int mucRecallDenom = 0;\n while (goldChains.hasNext()) {\n TreeMap<Integer, Integer> keyChain = goldChains.next();\n if (keyChain.size() > 1) {\n int numInt = numIntersect(key, keyChain, response);\n\n // int numMatched = getNumMatched(key, keyChain);\n // if(numMatched>0){\n // mucRecallNom += numMatched-numInt;\n mucRecallNom += (keyChain.size() - numInt);\n // mucRecallDenom += numMatched-1;\n mucRecallDenom += keyChain.size() - 1;\n\n // System.out.println(keyChain+\"\\n\"+(keyChain.size() - numInt)+\"/\"+(keyChain.size()-1));\n // }\n }\n }\n int[] result = { mucRecallNom, mucRecallDenom };\n\n return result;\n}",
"public double calculateNet(){\r\n double total = 0;\r\n for (Map.Entry<String, Account[]> list : allAccounts.entrySet()){\r\n Account[] accountList = list.getValue();\r\n String accountName = list.getKey();\r\n for (Account account : accountList){\r\n if (account == null){\r\n break;\r\n }\r\n if (accountName.equals(\"CreditCard\") || accountName.equals(\"LineOfCredit\")){\r\n total -= account.getCurrentBalance();\r\n } else{\r\n total += account.getCurrentBalance();\r\n }\r\n }\r\n }\r\n return Double.valueOf(twoDec.format(total));\r\n }",
"private static int coinExchange(int N, int[] S, int n) {\n\t\tif (N == 0)\n\t\t\treturn 1;\n\n\t\t// If N is less than 0 then no solution exists\n\t\tif (N < 0)\n\t\t\treturn 0;\n\n\t\t// If there are no coins and N is greater than 0, then no solution exist\n\t\tif (n <= 0 && N >= 1)\n\t\t\treturn 0;\n\n\t\tif (memo[n][N] != 0) {\n\t\t\tmemoHits++;\n\t\t\treturn memo[n][N];\n\t\t}\n\n\t\trecursionHits++;\n\n\t\tint retval = coinExchange(N - S[n - 1], S, n) + coinExchange(N, S, n - 1);\n\t\tmemo[n][N] = retval;\n\t\treturn retval;\n\t}",
"private double infobits(double[] probs) {\r\n\t\tdouble sum = 0;\r\n\t\tfor (int i = 0; i < probs.length; i++) {\r\n\t\t\tsum += entropy(probs[i]);\r\n\t\t}\r\n\t\treturn sum;\r\n\t}"
] |
[
"0.730174",
"0.6899739",
"0.67968553",
"0.6650341",
"0.6612896",
"0.657404",
"0.65342414",
"0.652656",
"0.6494794",
"0.6473905",
"0.6446622",
"0.6429012",
"0.64088964",
"0.63852656",
"0.63618183",
"0.63510954",
"0.626221",
"0.62608093",
"0.6211947",
"0.61903775",
"0.61898154",
"0.6177581",
"0.61530495",
"0.6150427",
"0.61151826",
"0.6085256",
"0.6069344",
"0.6069219",
"0.60421705",
"0.602465",
"0.6019411",
"0.59830976",
"0.59801304",
"0.59666896",
"0.59565914",
"0.59494174",
"0.59488994",
"0.594798",
"0.59421104",
"0.5939397",
"0.59176946",
"0.58740705",
"0.58642876",
"0.58556855",
"0.58532375",
"0.58376545",
"0.58272314",
"0.581246",
"0.5807006",
"0.5796443",
"0.576712",
"0.57572204",
"0.5755853",
"0.5752899",
"0.57345206",
"0.57246566",
"0.571836",
"0.5708663",
"0.5698223",
"0.5696103",
"0.5694356",
"0.5691792",
"0.5683373",
"0.56685925",
"0.5654735",
"0.5654682",
"0.5643804",
"0.563347",
"0.5629817",
"0.56277525",
"0.5622101",
"0.558942",
"0.5571317",
"0.5558246",
"0.5553343",
"0.55503225",
"0.5543321",
"0.5534993",
"0.55262333",
"0.5515683",
"0.54952526",
"0.54935646",
"0.54904467",
"0.5484208",
"0.5484208",
"0.5482604",
"0.5476747",
"0.54704887",
"0.54703456",
"0.54646647",
"0.5444506",
"0.5444078",
"0.54367554",
"0.54366",
"0.5433127",
"0.5421953",
"0.54203814",
"0.5411486",
"0.54102015",
"0.5399125"
] |
0.5744809
|
54
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.